1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("react"), require("react-dom"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["react", "react-dom"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["ReactBootstrap"] = factory(require("react"), require("react-dom"));
|
8 | else
|
9 | root["ReactBootstrap"] = factory(root["React"], root["ReactDOM"]);
|
10 | })(self, function(__WEBPACK_EXTERNAL_MODULE__698__, __WEBPACK_EXTERNAL_MODULE__207__) {
|
11 | return (() => {
|
12 | var __webpack_modules__ = ({
|
13 |
|
14 | 814:
|
15 | ((module, exports) => {
|
16 |
|
17 | var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; |
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | (function () {
|
25 | 'use strict';
|
26 |
|
27 | var hasOwn = {}.hasOwnProperty;
|
28 |
|
29 | function classNames() {
|
30 | var classes = [];
|
31 |
|
32 | for (var i = 0; i < arguments.length; i++) {
|
33 | var arg = arguments[i];
|
34 | if (!arg) continue;
|
35 | var argType = typeof arg;
|
36 |
|
37 | if (argType === 'string' || argType === 'number') {
|
38 | classes.push(arg);
|
39 | } else if (Array.isArray(arg)) {
|
40 | if (arg.length) {
|
41 | var inner = classNames.apply(null, arg);
|
42 |
|
43 | if (inner) {
|
44 | classes.push(inner);
|
45 | }
|
46 | }
|
47 | } else if (argType === 'object') {
|
48 | if (arg.toString === Object.prototype.toString) {
|
49 | for (var key in arg) {
|
50 | if (hasOwn.call(arg, key) && arg[key]) {
|
51 | classes.push(key);
|
52 | }
|
53 | }
|
54 | } else {
|
55 | classes.push(arg.toString());
|
56 | }
|
57 | }
|
58 | }
|
59 |
|
60 | return classes.join(' ');
|
61 | }
|
62 |
|
63 | if ( true && module.exports) {
|
64 | classNames.default = classNames;
|
65 | module.exports = classNames;
|
66 | } else if (true) {
|
67 |
|
68 | !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
69 | return classNames;
|
70 | }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
71 | __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
72 | } else {}
|
73 | })();
|
74 |
|
75 | }),
|
76 |
|
77 | 286:
|
78 | ((module) => {
|
79 |
|
80 | "use strict";
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | var invariant = function (condition, format, a, b, c, d, e, f) {
|
100 | if (false) {}
|
101 |
|
102 | if (!condition) {
|
103 | var error;
|
104 |
|
105 | if (format === undefined) {
|
106 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
107 | } else {
|
108 | var args = [a, b, c, d, e, f];
|
109 | var argIndex = 0;
|
110 | error = new Error(format.replace(/%s/g, function () {
|
111 | return args[argIndex++];
|
112 | }));
|
113 | error.name = 'Invariant Violation';
|
114 | }
|
115 |
|
116 | error.framesToPop = 1;
|
117 |
|
118 | throw error;
|
119 | }
|
120 | };
|
121 |
|
122 | module.exports = invariant;
|
123 |
|
124 | }),
|
125 |
|
126 | 946:
|
127 | ((module, exports, __webpack_require__) => {
|
128 |
|
129 | "use strict";
|
130 |
|
131 |
|
132 | Object.defineProperty(exports, "__esModule", ({
|
133 | value: true
|
134 | }));
|
135 | exports.default = all;
|
136 |
|
137 | var _createChainableTypeChecker = __webpack_require__(844);
|
138 |
|
139 | var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
|
140 |
|
141 | function _interopRequireDefault(obj) {
|
142 | return obj && obj.__esModule ? obj : {
|
143 | default: obj
|
144 | };
|
145 | }
|
146 |
|
147 | function all() {
|
148 | for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {
|
149 | validators[_key] = arguments[_key];
|
150 | }
|
151 |
|
152 | function allPropTypes() {
|
153 | for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
154 | args[_key2] = arguments[_key2];
|
155 | }
|
156 |
|
157 | var error = null;
|
158 | validators.forEach(function (validator) {
|
159 | if (error != null) {
|
160 | return;
|
161 | }
|
162 |
|
163 | var result = validator.apply(undefined, args);
|
164 |
|
165 | if (result != null) {
|
166 | error = result;
|
167 | }
|
168 | });
|
169 | return error;
|
170 | }
|
171 |
|
172 | return (0, _createChainableTypeChecker2.default)(allPropTypes);
|
173 | }
|
174 |
|
175 | module.exports = exports['default'];
|
176 |
|
177 | }),
|
178 |
|
179 | 964:
|
180 | ((module, exports, __webpack_require__) => {
|
181 |
|
182 | "use strict";
|
183 |
|
184 |
|
185 | Object.defineProperty(exports, "__esModule", ({
|
186 | value: true
|
187 | }));
|
188 |
|
189 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
190 | return typeof obj;
|
191 | } : function (obj) {
|
192 | return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
193 | };
|
194 |
|
195 | var _react = __webpack_require__(698);
|
196 |
|
197 | var _react2 = _interopRequireDefault(_react);
|
198 |
|
199 | var _createChainableTypeChecker = __webpack_require__(844);
|
200 |
|
201 | var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
|
202 |
|
203 | function _interopRequireDefault(obj) {
|
204 | return obj && obj.__esModule ? obj : {
|
205 | default: obj
|
206 | };
|
207 | }
|
208 |
|
209 | function validate(props, propName, componentName, location, propFullName) {
|
210 | var propValue = props[propName];
|
211 | var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
|
212 |
|
213 | if (_react2.default.isValidElement(propValue)) {
|
214 | return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');
|
215 | }
|
216 |
|
217 | if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {
|
218 | return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');
|
219 | }
|
220 |
|
221 | return null;
|
222 | }
|
223 |
|
224 | exports.default = (0, _createChainableTypeChecker2.default)(validate);
|
225 | module.exports = exports['default'];
|
226 |
|
227 | }),
|
228 |
|
229 | 647:
|
230 | ((module, exports, __webpack_require__) => {
|
231 |
|
232 | "use strict";
|
233 |
|
234 |
|
235 | Object.defineProperty(exports, "__esModule", ({
|
236 | value: true
|
237 | }));
|
238 | exports.default = deprecated;
|
239 |
|
240 | var _warning = __webpack_require__(459);
|
241 |
|
242 | var _warning2 = _interopRequireDefault(_warning);
|
243 |
|
244 | function _interopRequireDefault(obj) {
|
245 | return obj && obj.__esModule ? obj : {
|
246 | default: obj
|
247 | };
|
248 | }
|
249 |
|
250 | var warned = {};
|
251 |
|
252 | function deprecated(validator, reason) {
|
253 | return function validate(props, propName, componentName, location, propFullName) {
|
254 | var componentNameSafe = componentName || '<<anonymous>>';
|
255 | var propFullNameSafe = propFullName || propName;
|
256 |
|
257 | if (props[propName] != null) {
|
258 | var messageKey = componentName + '.' + propName;
|
259 | (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.'));
|
260 | warned[messageKey] = true;
|
261 | }
|
262 |
|
263 | for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
|
264 | args[_key - 5] = arguments[_key];
|
265 | }
|
266 |
|
267 | return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
|
268 | };
|
269 | }
|
270 |
|
271 |
|
272 |
|
273 | function _resetWarned() {
|
274 | warned = {};
|
275 | }
|
276 |
|
277 | deprecated._resetWarned = _resetWarned;
|
278 |
|
279 |
|
280 | module.exports = exports['default'];
|
281 |
|
282 | }),
|
283 |
|
284 | 835:
|
285 | ((module, exports, __webpack_require__) => {
|
286 |
|
287 | "use strict";
|
288 |
|
289 |
|
290 | Object.defineProperty(exports, "__esModule", ({
|
291 | value: true
|
292 | }));
|
293 |
|
294 | var _react = __webpack_require__(698);
|
295 |
|
296 | var _react2 = _interopRequireDefault(_react);
|
297 |
|
298 | var _reactIs = __webpack_require__(532);
|
299 |
|
300 | var _createChainableTypeChecker = __webpack_require__(844);
|
301 |
|
302 | var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
|
303 |
|
304 | function _interopRequireDefault(obj) {
|
305 | return obj && obj.__esModule ? obj : {
|
306 | default: obj
|
307 | };
|
308 | }
|
309 |
|
310 | function elementType(props, propName, componentName, location, propFullName) {
|
311 | var propValue = props[propName];
|
312 |
|
313 | if (_react2.default.isValidElement(propValue)) {
|
314 | return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`,expected an element type (a string ') + ', component class, or function component).');
|
315 | }
|
316 |
|
317 | if (!(0, _reactIs.isValidElementType)(propValue)) {
|
318 | return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + ', component class, or function component).');
|
319 | }
|
320 |
|
321 | return null;
|
322 | }
|
323 |
|
324 | exports.default = (0, _createChainableTypeChecker2.default)(elementType);
|
325 | module.exports = exports['default'];
|
326 |
|
327 | }),
|
328 |
|
329 | 517:
|
330 | ((__unused_webpack_module, exports, __webpack_require__) => {
|
331 |
|
332 | "use strict";
|
333 | var __webpack_unused_export__;
|
334 |
|
335 |
|
336 | __webpack_unused_export__ = ({
|
337 | value: true
|
338 | });
|
339 | __webpack_unused_export__ = exports.nm = __webpack_unused_export__ = exports.ax = __webpack_unused_export__ = undefined;
|
340 |
|
341 | var _all = __webpack_require__(946);
|
342 |
|
343 | var _all2 = _interopRequireDefault(_all);
|
344 |
|
345 | var _componentOrElement = __webpack_require__(964);
|
346 |
|
347 | var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
|
348 |
|
349 | var _deprecated = __webpack_require__(647);
|
350 |
|
351 | var _deprecated2 = _interopRequireDefault(_deprecated);
|
352 |
|
353 | var _elementType = __webpack_require__(835);
|
354 |
|
355 | var _elementType2 = _interopRequireDefault(_elementType);
|
356 |
|
357 | var _isRequiredForA11y = __webpack_require__(422);
|
358 |
|
359 | var _isRequiredForA11y2 = _interopRequireDefault(_isRequiredForA11y);
|
360 |
|
361 | function _interopRequireDefault(obj) {
|
362 | return obj && obj.__esModule ? obj : {
|
363 | default: obj
|
364 | };
|
365 | }
|
366 |
|
367 | __webpack_unused_export__ = _all2.default;
|
368 | exports.ax = _componentOrElement2.default;
|
369 | __webpack_unused_export__ = _deprecated2.default;
|
370 | exports.nm = _elementType2.default;
|
371 | __webpack_unused_export__ = _isRequiredForA11y2.default;
|
372 |
|
373 | }),
|
374 |
|
375 | 422:
|
376 | ((module, exports) => {
|
377 |
|
378 | "use strict";
|
379 |
|
380 |
|
381 | Object.defineProperty(exports, "__esModule", ({
|
382 | value: true
|
383 | }));
|
384 | exports.default = isRequiredForA11y;
|
385 |
|
386 | function isRequiredForA11y(validator) {
|
387 | return function validate(props, propName, componentName, location, propFullName) {
|
388 | var componentNameSafe = componentName || '<<anonymous>>';
|
389 | var propFullNameSafe = propFullName || propName;
|
390 |
|
391 | if (props[propName] == null) {
|
392 | return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.');
|
393 | }
|
394 |
|
395 | for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
|
396 | args[_key - 5] = arguments[_key];
|
397 | }
|
398 |
|
399 | return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
|
400 | };
|
401 | }
|
402 |
|
403 | module.exports = exports['default'];
|
404 |
|
405 | }),
|
406 |
|
407 | 844:
|
408 | ((module, exports) => {
|
409 |
|
410 | "use strict";
|
411 |
|
412 |
|
413 | Object.defineProperty(exports, "__esModule", ({
|
414 | value: true
|
415 | }));
|
416 | exports.default = createChainableTypeChecker;
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 | function createChainableTypeChecker(validate) {
|
428 | function checkType(isRequired, props, propName, componentName, location, propFullName) {
|
429 | var componentNameSafe = componentName || '<<anonymous>>';
|
430 | var propFullNameSafe = propFullName || propName;
|
431 |
|
432 | if (props[propName] == null) {
|
433 | if (isRequired) {
|
434 | return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
|
435 | }
|
436 |
|
437 | return null;
|
438 | }
|
439 |
|
440 | for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
|
441 | args[_key - 6] = arguments[_key];
|
442 | }
|
443 |
|
444 | return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
|
445 | }
|
446 |
|
447 | var chainedCheckType = checkType.bind(null, false);
|
448 | chainedCheckType.isRequired = checkType.bind(null, true);
|
449 | return chainedCheckType;
|
450 | }
|
451 |
|
452 | module.exports = exports['default'];
|
453 |
|
454 | }),
|
455 |
|
456 | 428:
|
457 | ((module, __unused_webpack_exports, __webpack_require__) => {
|
458 |
|
459 | "use strict";
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 | var ReactPropTypesSecret = __webpack_require__(134);
|
469 |
|
470 | function emptyFunction() {}
|
471 |
|
472 | function emptyFunctionWithReset() {}
|
473 |
|
474 | emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
475 |
|
476 | module.exports = function () {
|
477 | function shim(props, propName, componentName, location, propFullName, secret) {
|
478 | if (secret === ReactPropTypesSecret) {
|
479 |
|
480 | return;
|
481 | }
|
482 |
|
483 | var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
|
484 | err.name = 'Invariant Violation';
|
485 | throw err;
|
486 | }
|
487 |
|
488 | ;
|
489 | shim.isRequired = shim;
|
490 |
|
491 | function getShim() {
|
492 | return shim;
|
493 | }
|
494 |
|
495 | ;
|
496 |
|
497 |
|
498 | var ReactPropTypes = {
|
499 | array: shim,
|
500 | bool: shim,
|
501 | func: shim,
|
502 | number: shim,
|
503 | object: shim,
|
504 | string: shim,
|
505 | symbol: shim,
|
506 | any: shim,
|
507 | arrayOf: getShim,
|
508 | element: shim,
|
509 | elementType: shim,
|
510 | instanceOf: getShim,
|
511 | node: shim,
|
512 | objectOf: getShim,
|
513 | oneOf: getShim,
|
514 | oneOfType: getShim,
|
515 | shape: getShim,
|
516 | exact: getShim,
|
517 | checkPropTypes: emptyFunctionWithReset,
|
518 | resetWarningCache: emptyFunction
|
519 | };
|
520 | ReactPropTypes.PropTypes = ReactPropTypes;
|
521 | return ReactPropTypes;
|
522 | };
|
523 |
|
524 | }),
|
525 |
|
526 | 526:
|
527 | ((module, __unused_webpack_exports, __webpack_require__) => {
|
528 |
|
529 |
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 | if (false) { var throwOnDirectAccess, ReactIs; } else {
|
536 |
|
537 |
|
538 | module.exports = __webpack_require__(428)();
|
539 | }
|
540 |
|
541 | }),
|
542 |
|
543 | 134:
|
544 | ((module) => {
|
545 |
|
546 | "use strict";
|
547 |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
556 | module.exports = ReactPropTypesSecret;
|
557 |
|
558 | }),
|
559 |
|
560 | 15:
|
561 | ((__unused_webpack_module, exports) => {
|
562 |
|
563 | "use strict";
|
564 |
|
565 |
|
566 |
|
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 | var b = "function" === typeof Symbol && Symbol.for,
|
575 | c = b ? Symbol.for("react.element") : 60103,
|
576 | d = b ? Symbol.for("react.portal") : 60106,
|
577 | e = b ? Symbol.for("react.fragment") : 60107,
|
578 | f = b ? Symbol.for("react.strict_mode") : 60108,
|
579 | g = b ? Symbol.for("react.profiler") : 60114,
|
580 | h = b ? Symbol.for("react.provider") : 60109,
|
581 | k = b ? Symbol.for("react.context") : 60110,
|
582 | l = b ? Symbol.for("react.async_mode") : 60111,
|
583 | m = b ? Symbol.for("react.concurrent_mode") : 60111,
|
584 | n = b ? Symbol.for("react.forward_ref") : 60112,
|
585 | p = b ? Symbol.for("react.suspense") : 60113,
|
586 | q = b ? Symbol.for("react.suspense_list") : 60120,
|
587 | r = b ? Symbol.for("react.memo") : 60115,
|
588 | t = b ? Symbol.for("react.lazy") : 60116,
|
589 | v = b ? Symbol.for("react.block") : 60121,
|
590 | w = b ? Symbol.for("react.fundamental") : 60117,
|
591 | x = b ? Symbol.for("react.responder") : 60118,
|
592 | y = b ? Symbol.for("react.scope") : 60119;
|
593 |
|
594 | function z(a) {
|
595 | if ("object" === typeof a && null !== a) {
|
596 | var u = a.$$typeof;
|
597 |
|
598 | switch (u) {
|
599 | case c:
|
600 | switch (a = a.type, a) {
|
601 | case l:
|
602 | case m:
|
603 | case e:
|
604 | case g:
|
605 | case f:
|
606 | case p:
|
607 | return a;
|
608 |
|
609 | default:
|
610 | switch (a = a && a.$$typeof, a) {
|
611 | case k:
|
612 | case n:
|
613 | case t:
|
614 | case r:
|
615 | case h:
|
616 | return a;
|
617 |
|
618 | default:
|
619 | return u;
|
620 | }
|
621 |
|
622 | }
|
623 |
|
624 | case d:
|
625 | return u;
|
626 | }
|
627 | }
|
628 | }
|
629 |
|
630 | function A(a) {
|
631 | return z(a) === m;
|
632 | }
|
633 |
|
634 | exports.AsyncMode = l;
|
635 | exports.ConcurrentMode = m;
|
636 | exports.ContextConsumer = k;
|
637 | exports.ContextProvider = h;
|
638 | exports.Element = c;
|
639 | exports.ForwardRef = n;
|
640 | exports.Fragment = e;
|
641 | exports.Lazy = t;
|
642 | exports.Memo = r;
|
643 | exports.Portal = d;
|
644 | exports.Profiler = g;
|
645 | exports.StrictMode = f;
|
646 | exports.Suspense = p;
|
647 |
|
648 | exports.isAsyncMode = function (a) {
|
649 | return A(a) || z(a) === l;
|
650 | };
|
651 |
|
652 | exports.isConcurrentMode = A;
|
653 |
|
654 | exports.isContextConsumer = function (a) {
|
655 | return z(a) === k;
|
656 | };
|
657 |
|
658 | exports.isContextProvider = function (a) {
|
659 | return z(a) === h;
|
660 | };
|
661 |
|
662 | exports.isElement = function (a) {
|
663 | return "object" === typeof a && null !== a && a.$$typeof === c;
|
664 | };
|
665 |
|
666 | exports.isForwardRef = function (a) {
|
667 | return z(a) === n;
|
668 | };
|
669 |
|
670 | exports.isFragment = function (a) {
|
671 | return z(a) === e;
|
672 | };
|
673 |
|
674 | exports.isLazy = function (a) {
|
675 | return z(a) === t;
|
676 | };
|
677 |
|
678 | exports.isMemo = function (a) {
|
679 | return z(a) === r;
|
680 | };
|
681 |
|
682 | exports.isPortal = function (a) {
|
683 | return z(a) === d;
|
684 | };
|
685 |
|
686 | exports.isProfiler = function (a) {
|
687 | return z(a) === g;
|
688 | };
|
689 |
|
690 | exports.isStrictMode = function (a) {
|
691 | return z(a) === f;
|
692 | };
|
693 |
|
694 | exports.isSuspense = function (a) {
|
695 | return z(a) === p;
|
696 | };
|
697 |
|
698 | exports.isValidElementType = function (a) {
|
699 | return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
700 | };
|
701 |
|
702 | exports.typeOf = z;
|
703 |
|
704 | }),
|
705 |
|
706 | 532:
|
707 | ((module, __unused_webpack_exports, __webpack_require__) => {
|
708 |
|
709 | "use strict";
|
710 |
|
711 |
|
712 | if (true) {
|
713 | module.exports = __webpack_require__(15);
|
714 | } else {}
|
715 |
|
716 | }),
|
717 |
|
718 | 459:
|
719 | ((module) => {
|
720 |
|
721 | "use strict";
|
722 |
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 | var __DEV__ = "production" !== 'production';
|
737 |
|
738 | var warning = function () {};
|
739 |
|
740 | if (__DEV__) {
|
741 | var printWarning = function printWarning(format, args) {
|
742 | var len = arguments.length;
|
743 | args = new Array(len > 1 ? len - 1 : 0);
|
744 |
|
745 | for (var key = 1; key < len; key++) {
|
746 | args[key - 1] = arguments[key];
|
747 | }
|
748 |
|
749 | var argIndex = 0;
|
750 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
751 | return args[argIndex++];
|
752 | });
|
753 |
|
754 | if (typeof console !== 'undefined') {
|
755 | console.error(message);
|
756 | }
|
757 |
|
758 | try {
|
759 |
|
760 |
|
761 |
|
762 | throw new Error(message);
|
763 | } catch (x) {}
|
764 | };
|
765 |
|
766 | warning = function (condition, format, args) {
|
767 | var len = arguments.length;
|
768 | args = new Array(len > 2 ? len - 2 : 0);
|
769 |
|
770 | for (var key = 2; key < len; key++) {
|
771 | args[key - 2] = arguments[key];
|
772 | }
|
773 |
|
774 | if (format === undefined) {
|
775 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
776 | }
|
777 |
|
778 | if (!condition) {
|
779 | printWarning.apply(null, [format].concat(args));
|
780 | }
|
781 | };
|
782 | }
|
783 |
|
784 | module.exports = warning;
|
785 |
|
786 | }),
|
787 |
|
788 | 698:
|
789 | ((module) => {
|
790 |
|
791 | "use strict";
|
792 | module.exports = __WEBPACK_EXTERNAL_MODULE__698__;
|
793 |
|
794 | }),
|
795 |
|
796 | 207:
|
797 | ((module) => {
|
798 |
|
799 | "use strict";
|
800 | module.exports = __WEBPACK_EXTERNAL_MODULE__207__;
|
801 |
|
802 | })
|
803 |
|
804 | });
|
805 |
|
806 |
|
807 | var __webpack_module_cache__ = {};
|
808 |
|
809 |
|
810 | function __webpack_require__(moduleId) {
|
811 |
|
812 | var cachedModule = __webpack_module_cache__[moduleId];
|
813 | if (cachedModule !== undefined) {
|
814 | return cachedModule.exports;
|
815 | }
|
816 |
|
817 | var module = __webpack_module_cache__[moduleId] = {
|
818 |
|
819 |
|
820 | exports: {}
|
821 | };
|
822 |
|
823 |
|
824 | __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
825 |
|
826 |
|
827 | return module.exports;
|
828 | }
|
829 |
|
830 |
|
831 |
|
832 | (() => {
|
833 |
|
834 | __webpack_require__.n = (module) => {
|
835 | var getter = module && module.__esModule ?
|
836 | () => (module['default']) :
|
837 | () => (module);
|
838 | __webpack_require__.d(getter, { a: getter });
|
839 | return getter;
|
840 | };
|
841 | })();
|
842 |
|
843 |
|
844 | (() => {
|
845 |
|
846 | __webpack_require__.d = (exports, definition) => {
|
847 | for(var key in definition) {
|
848 | if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
849 | Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
850 | }
|
851 | }
|
852 | };
|
853 | })();
|
854 |
|
855 |
|
856 | (() => {
|
857 | __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
858 | })();
|
859 |
|
860 |
|
861 | (() => {
|
862 |
|
863 | __webpack_require__.r = (exports) => {
|
864 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
865 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
866 | }
|
867 | Object.defineProperty(exports, '__esModule', { value: true });
|
868 | };
|
869 | })();
|
870 |
|
871 |
|
872 | var __webpack_exports__ = {};
|
873 |
|
874 | (() => {
|
875 | "use strict";
|
876 |
|
877 | __webpack_require__.r(__webpack_exports__);
|
878 |
|
879 |
|
880 | __webpack_require__.d(__webpack_exports__, {
|
881 | "Accordion": () => ( src_Accordion),
|
882 | "AccordionCollapse": () => ( src_AccordionCollapse),
|
883 | "AccordionContext": () => ( AccordionContext),
|
884 | "AccordionToggle": () => ( src_AccordionToggle),
|
885 | "Alert": () => ( src_Alert),
|
886 | "Badge": () => ( src_Badge),
|
887 | "Breadcrumb": () => ( src_Breadcrumb),
|
888 | "BreadcrumbItem": () => ( src_BreadcrumbItem),
|
889 | "Button": () => ( src_Button),
|
890 | "ButtonGroup": () => ( src_ButtonGroup),
|
891 | "ButtonToolbar": () => ( src_ButtonToolbar),
|
892 | "Card": () => ( src_Card),
|
893 | "CardColumns": () => ( CardColumns),
|
894 | "CardDeck": () => ( CardDeck),
|
895 | "CardGroup": () => ( CardGroup),
|
896 | "CardImg": () => ( src_CardImg),
|
897 | "Carousel": () => ( src_Carousel),
|
898 | "CarouselItem": () => ( src_CarouselItem),
|
899 | "CloseButton": () => ( src_CloseButton),
|
900 | "Col": () => ( src_Col),
|
901 | "Collapse": () => ( src_Collapse),
|
902 | "Container": () => ( src_Container),
|
903 | "Dropdown": () => ( src_Dropdown),
|
904 | "DropdownButton": () => ( src_DropdownButton),
|
905 | "Fade": () => ( src_Fade),
|
906 | "Figure": () => ( src_Figure),
|
907 | "Form": () => ( Form),
|
908 | "FormCheck": () => ( src_FormCheck),
|
909 | "FormControl": () => ( src_FormControl),
|
910 | "FormFile": () => ( src_FormFile),
|
911 | "FormGroup": () => ( src_FormGroup),
|
912 | "FormLabel": () => ( src_FormLabel),
|
913 | "FormText": () => ( src_FormText),
|
914 | "Image": () => ( src_Image),
|
915 | "InputGroup": () => ( src_InputGroup),
|
916 | "Jumbotron": () => ( src_Jumbotron),
|
917 | "ListGroup": () => ( src_ListGroup),
|
918 | "ListGroupItem": () => ( src_ListGroupItem),
|
919 | "Media": () => ( src_Media),
|
920 | "Modal": () => ( src_Modal),
|
921 | "ModalBody": () => ( ModalBody),
|
922 | "ModalDialog": () => ( src_ModalDialog),
|
923 | "ModalFooter": () => ( ModalFooter),
|
924 | "ModalTitle": () => ( ModalTitle),
|
925 | "Nav": () => ( src_Nav),
|
926 | "NavDropdown": () => ( src_NavDropdown),
|
927 | "NavItem": () => ( src_NavItem),
|
928 | "NavLink": () => ( src_NavLink),
|
929 | "Navbar": () => ( src_Navbar),
|
930 | "NavbarBrand": () => ( src_NavbarBrand),
|
931 | "Overlay": () => ( src_Overlay),
|
932 | "OverlayTrigger": () => ( src_OverlayTrigger),
|
933 | "PageItem": () => ( src_PageItem),
|
934 | "Pagination": () => ( src_Pagination),
|
935 | "Popover": () => ( src_Popover),
|
936 | "PopoverContent": () => ( src_PopoverContent),
|
937 | "PopoverTitle": () => ( src_PopoverTitle),
|
938 | "ProgressBar": () => ( src_ProgressBar),
|
939 | "ResponsiveEmbed": () => ( src_ResponsiveEmbed),
|
940 | "Row": () => ( src_Row),
|
941 | "SafeAnchor": () => ( src_SafeAnchor),
|
942 | "Spinner": () => ( src_Spinner),
|
943 | "SplitButton": () => ( src_SplitButton),
|
944 | "Tab": () => ( src_Tab),
|
945 | "TabContainer": () => ( src_TabContainer),
|
946 | "TabContent": () => ( src_TabContent),
|
947 | "TabPane": () => ( src_TabPane),
|
948 | "Table": () => ( src_Table),
|
949 | "Tabs": () => ( src_Tabs),
|
950 | "ThemeProvider": () => ( src_ThemeProvider),
|
951 | "Toast": () => ( src_Toast),
|
952 | "ToastBody": () => ( ToastBody),
|
953 | "ToastHeader": () => ( src_ToastHeader),
|
954 | "ToggleButton": () => ( src_ToggleButton),
|
955 | "ToggleButtonGroup": () => ( src_ToggleButtonGroup),
|
956 | "Tooltip": () => ( src_Tooltip),
|
957 | "useAccordionToggle": () => ( useAccordionToggle)
|
958 | });
|
959 |
|
960 | ;
|
961 | function extends_extends() {
|
962 | extends_extends = Object.assign || function (target) {
|
963 | for (var i = 1; i < arguments.length; i++) {
|
964 | var source = arguments[i];
|
965 |
|
966 | for (var key in source) {
|
967 | if (Object.prototype.hasOwnProperty.call(source, key)) {
|
968 | target[key] = source[key];
|
969 | }
|
970 | }
|
971 | }
|
972 |
|
973 | return target;
|
974 | };
|
975 |
|
976 | return extends_extends.apply(this, arguments);
|
977 | }
|
978 | ;
|
979 | function objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(source, excluded) {
|
980 | if (source == null) return {};
|
981 | var target = {};
|
982 | var sourceKeys = Object.keys(source);
|
983 | var key, i;
|
984 |
|
985 | for (i = 0; i < sourceKeys.length; i++) {
|
986 | key = sourceKeys[i];
|
987 | if (excluded.indexOf(key) >= 0) continue;
|
988 | target[key] = source[key];
|
989 | }
|
990 |
|
991 | return target;
|
992 | }
|
993 |
|
994 | var classnames = __webpack_require__(814);
|
995 | var classnames_default = __webpack_require__.n(classnames);
|
996 |
|
997 | var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(698);
|
998 | var external_root_React_commonjs2_react_commonjs_react_amd_react_default = __webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
999 |
|
1000 | var prop_types = __webpack_require__(526);
|
1001 | var prop_types_default = __webpack_require__.n(prop_types);
|
1002 |
|
1003 | var browser = __webpack_require__(286);
|
1004 | var browser_default = __webpack_require__.n(browser);
|
1005 | ;
|
1006 |
|
1007 |
|
1008 | var noop = function noop() {};
|
1009 |
|
1010 | function readOnlyPropType(handler, name) {
|
1011 | return function (props, propName) {
|
1012 | if (props[propName] !== undefined) {
|
1013 | if (!props[handler]) {
|
1014 | return new Error("You have provided a `" + propName + "` prop to `" + name + "` " + ("without an `" + handler + "` handler prop. This will render a read-only field. ") + ("If the field should be mutable use `" + defaultKey(propName) + "`. ") + ("Otherwise, set `" + handler + "`."));
|
1015 | }
|
1016 | }
|
1017 | };
|
1018 | }
|
1019 |
|
1020 | function uncontrolledPropTypes(controlledValues, displayName) {
|
1021 | var propTypes = {};
|
1022 | Object.keys(controlledValues).forEach(function (prop) {
|
1023 |
|
1024 | propTypes[defaultKey(prop)] = noop;
|
1025 |
|
1026 | if (false) { var handler; }
|
1027 | });
|
1028 | return propTypes;
|
1029 | }
|
1030 | function isProp(props, prop) {
|
1031 | return props[prop] !== undefined;
|
1032 | }
|
1033 | function defaultKey(key) {
|
1034 | return 'default' + key.charAt(0).toUpperCase() + key.substr(1);
|
1035 | }
|
1036 |
|
1037 |
|
1038 |
|
1039 |
|
1040 |
|
1041 |
|
1042 |
|
1043 |
|
1044 |
|
1045 | function canAcceptRef(component) {
|
1046 | return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent);
|
1047 | }
|
1048 | ;
|
1049 |
|
1050 |
|
1051 |
|
1052 | function _toPropertyKey(arg) {
|
1053 | var key = _toPrimitive(arg, "string");
|
1054 |
|
1055 | return typeof key === "symbol" ? key : String(key);
|
1056 | }
|
1057 |
|
1058 | function _toPrimitive(input, hint) {
|
1059 | if (typeof input !== "object" || input === null) return input;
|
1060 | var prim = input[Symbol.toPrimitive];
|
1061 |
|
1062 | if (prim !== undefined) {
|
1063 | var res = prim.call(input, hint || "default");
|
1064 | if (typeof res !== "object") return res;
|
1065 | throw new TypeError("@@toPrimitive must return a primitive value.");
|
1066 | }
|
1067 |
|
1068 | return (hint === "string" ? String : Number)(input);
|
1069 | }
|
1070 |
|
1071 |
|
1072 |
|
1073 |
|
1074 | function useUncontrolledProp(propValue, defaultValue, handler) {
|
1075 | var wasPropRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(propValue !== undefined);
|
1076 |
|
1077 | var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(defaultValue),
|
1078 | stateValue = _useState[0],
|
1079 | setState = _useState[1];
|
1080 |
|
1081 | var isProp = propValue !== undefined;
|
1082 | var wasProp = wasPropRef.current;
|
1083 | wasPropRef.current = isProp;
|
1084 | |
1085 |
|
1086 |
|
1087 |
|
1088 |
|
1089 | if (!isProp && wasProp && stateValue !== defaultValue) {
|
1090 | setState(defaultValue);
|
1091 | }
|
1092 |
|
1093 | return [isProp ? propValue : stateValue, (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (value) {
|
1094 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
1095 | args[_key - 1] = arguments[_key];
|
1096 | }
|
1097 |
|
1098 | if (handler) handler.apply(void 0, [value].concat(args));
|
1099 | setState(value);
|
1100 | }, [handler])];
|
1101 | }
|
1102 |
|
1103 |
|
1104 | function useUncontrolled(props, config) {
|
1105 | return Object.keys(config).reduce(function (result, fieldName) {
|
1106 | var _extends2;
|
1107 |
|
1108 | var _ref = result,
|
1109 | defaultValue = _ref[defaultKey(fieldName)],
|
1110 | propsValue = _ref[fieldName],
|
1111 | rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, [defaultKey(fieldName), fieldName].map(_toPropertyKey));
|
1112 |
|
1113 | var handlerName = config[fieldName];
|
1114 |
|
1115 | var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),
|
1116 | value = _useUncontrolledProp[0],
|
1117 | handler = _useUncontrolledProp[1];
|
1118 |
|
1119 | return extends_extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));
|
1120 | }, props);
|
1121 | }
|
1122 | ;
|
1123 |
|
1124 |
|
1125 |
|
1126 |
|
1127 |
|
1128 |
|
1129 | function componentWillMount() {
|
1130 |
|
1131 | var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
|
1132 |
|
1133 | if (state !== null && state !== undefined) {
|
1134 | this.setState(state);
|
1135 | }
|
1136 | }
|
1137 |
|
1138 | function componentWillReceiveProps(nextProps) {
|
1139 |
|
1140 |
|
1141 | function updater(prevState) {
|
1142 | var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
|
1143 | return state !== null && state !== undefined ? state : null;
|
1144 | }
|
1145 |
|
1146 |
|
1147 | this.setState(updater.bind(this));
|
1148 | }
|
1149 |
|
1150 | function componentWillUpdate(nextProps, nextState) {
|
1151 | try {
|
1152 | var prevProps = this.props;
|
1153 | var prevState = this.state;
|
1154 | this.props = nextProps;
|
1155 | this.state = nextState;
|
1156 | this.__reactInternalSnapshotFlag = true;
|
1157 | this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);
|
1158 | } finally {
|
1159 | this.props = prevProps;
|
1160 | this.state = prevState;
|
1161 | }
|
1162 | }
|
1163 |
|
1164 |
|
1165 |
|
1166 | componentWillMount.__suppressDeprecationWarning = true;
|
1167 | componentWillReceiveProps.__suppressDeprecationWarning = true;
|
1168 | componentWillUpdate.__suppressDeprecationWarning = true;
|
1169 |
|
1170 | function react_lifecycles_compat_es_polyfill(Component) {
|
1171 | var prototype = Component.prototype;
|
1172 |
|
1173 | if (!prototype || !prototype.isReactComponent) {
|
1174 | throw new Error('Can only polyfill class components');
|
1175 | }
|
1176 |
|
1177 | if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {
|
1178 | return Component;
|
1179 | }
|
1180 |
|
1181 |
|
1182 |
|
1183 |
|
1184 | var foundWillMountName = null;
|
1185 | var foundWillReceivePropsName = null;
|
1186 | var foundWillUpdateName = null;
|
1187 |
|
1188 | if (typeof prototype.componentWillMount === 'function') {
|
1189 | foundWillMountName = 'componentWillMount';
|
1190 | } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
|
1191 | foundWillMountName = 'UNSAFE_componentWillMount';
|
1192 | }
|
1193 |
|
1194 | if (typeof prototype.componentWillReceiveProps === 'function') {
|
1195 | foundWillReceivePropsName = 'componentWillReceiveProps';
|
1196 | } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
|
1197 | foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
|
1198 | }
|
1199 |
|
1200 | if (typeof prototype.componentWillUpdate === 'function') {
|
1201 | foundWillUpdateName = 'componentWillUpdate';
|
1202 | } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
|
1203 | foundWillUpdateName = 'UNSAFE_componentWillUpdate';
|
1204 | }
|
1205 |
|
1206 | if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
|
1207 | var componentName = Component.displayName || Component.name;
|
1208 | var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
|
1209 | throw Error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks');
|
1210 | }
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 | if (typeof Component.getDerivedStateFromProps === 'function') {
|
1216 | prototype.componentWillMount = componentWillMount;
|
1217 | prototype.componentWillReceiveProps = componentWillReceiveProps;
|
1218 | }
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 | if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
|
1224 | if (typeof prototype.componentDidUpdate !== 'function') {
|
1225 | throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');
|
1226 | }
|
1227 |
|
1228 | prototype.componentWillUpdate = componentWillUpdate;
|
1229 | var componentDidUpdate = prototype.componentDidUpdate;
|
1230 |
|
1231 | prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 | var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;
|
1241 | componentDidUpdate.call(this, prevProps, prevState, snapshot);
|
1242 | };
|
1243 | }
|
1244 |
|
1245 | return Component;
|
1246 | }
|
1247 |
|
1248 |
|
1249 | ;
|
1250 |
|
1251 |
|
1252 |
|
1253 | var _jsxFileName = "/Users/jquense/src/uncontrollable/src/uncontrollable.js";
|
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 | function uncontrollable(Component, controlledValues, methods) {
|
1259 | if (methods === void 0) {
|
1260 | methods = [];
|
1261 | }
|
1262 |
|
1263 | var displayName = Component.displayName || Component.name || 'Component';
|
1264 | var canAcceptRef = Utils.canAcceptRef(Component);
|
1265 | var controlledProps = Object.keys(controlledValues);
|
1266 | var PROPS_TO_OMIT = controlledProps.map(Utils.defaultKey);
|
1267 | !(canAcceptRef || !methods.length) ? false ? 0 : invariant(false) : void 0;
|
1268 |
|
1269 | var UncontrolledComponent = function (_React$Component) {
|
1270 | _inheritsLoose(UncontrolledComponent, _React$Component);
|
1271 |
|
1272 | function UncontrolledComponent() {
|
1273 | var _this;
|
1274 |
|
1275 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1276 | args[_key] = arguments[_key];
|
1277 | }
|
1278 |
|
1279 | _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
1280 | _this.handlers = Object.create(null);
|
1281 | controlledProps.forEach(function (propName) {
|
1282 | var handlerName = controlledValues[propName];
|
1283 |
|
1284 | var handleChange = function handleChange(value) {
|
1285 | if (_this.props[handlerName]) {
|
1286 | var _this$props;
|
1287 |
|
1288 | _this._notifying = true;
|
1289 |
|
1290 | for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
1291 | args[_key2 - 1] = arguments[_key2];
|
1292 | }
|
1293 |
|
1294 | (_this$props = _this.props)[handlerName].apply(_this$props, [value].concat(args));
|
1295 |
|
1296 | _this._notifying = false;
|
1297 | }
|
1298 |
|
1299 | if (!_this.unmounted) _this.setState(function (_ref) {
|
1300 | var _extends2;
|
1301 |
|
1302 | var values = _ref.values;
|
1303 | return {
|
1304 | values: _extends(Object.create(null), values, (_extends2 = {}, _extends2[propName] = value, _extends2))
|
1305 | };
|
1306 | });
|
1307 | };
|
1308 |
|
1309 | _this.handlers[handlerName] = handleChange;
|
1310 | });
|
1311 | if (methods.length) _this.attachRef = function (ref) {
|
1312 | _this.inner = ref;
|
1313 | };
|
1314 | var values = Object.create(null);
|
1315 | controlledProps.forEach(function (key) {
|
1316 | values[key] = _this.props[Utils.defaultKey(key)];
|
1317 | });
|
1318 | _this.state = {
|
1319 | values: values,
|
1320 | prevProps: {}
|
1321 | };
|
1322 | return _this;
|
1323 | }
|
1324 |
|
1325 | var _proto = UncontrolledComponent.prototype;
|
1326 |
|
1327 | _proto.shouldComponentUpdate = function shouldComponentUpdate() {
|
1328 |
|
1329 | return !this._notifying;
|
1330 | };
|
1331 |
|
1332 | UncontrolledComponent.getDerivedStateFromProps = function getDerivedStateFromProps(props, _ref2) {
|
1333 | var values = _ref2.values,
|
1334 | prevProps = _ref2.prevProps;
|
1335 | var nextState = {
|
1336 | values: _extends(Object.create(null), values),
|
1337 | prevProps: {}
|
1338 | };
|
1339 | controlledProps.forEach(function (key) {
|
1340 | |
1341 |
|
1342 |
|
1343 |
|
1344 | nextState.prevProps[key] = props[key];
|
1345 |
|
1346 | if (!Utils.isProp(props, key) && Utils.isProp(prevProps, key)) {
|
1347 | nextState.values[key] = props[Utils.defaultKey(key)];
|
1348 | }
|
1349 | });
|
1350 | return nextState;
|
1351 | };
|
1352 |
|
1353 | _proto.componentWillUnmount = function componentWillUnmount() {
|
1354 | this.unmounted = true;
|
1355 | };
|
1356 |
|
1357 | _proto.render = function render() {
|
1358 | var _this2 = this;
|
1359 |
|
1360 | var _this$props2 = this.props,
|
1361 | innerRef = _this$props2.innerRef,
|
1362 | props = _objectWithoutPropertiesLoose(_this$props2, ["innerRef"]);
|
1363 |
|
1364 | PROPS_TO_OMIT.forEach(function (prop) {
|
1365 | delete props[prop];
|
1366 | });
|
1367 | var newProps = {};
|
1368 | controlledProps.forEach(function (propName) {
|
1369 | var propValue = _this2.props[propName];
|
1370 | newProps[propName] = propValue !== undefined ? propValue : _this2.state.values[propName];
|
1371 | });
|
1372 | return React.createElement(Component, _extends({}, props, newProps, this.handlers, {
|
1373 | ref: innerRef || this.attachRef
|
1374 | }));
|
1375 | };
|
1376 |
|
1377 | return UncontrolledComponent;
|
1378 | }(React.Component);
|
1379 |
|
1380 | polyfill(UncontrolledComponent);
|
1381 | UncontrolledComponent.displayName = "Uncontrolled(" + displayName + ")";
|
1382 | UncontrolledComponent.propTypes = _extends({
|
1383 | innerRef: function innerRef() {}
|
1384 | }, Utils.uncontrolledPropTypes(controlledValues, displayName));
|
1385 | methods.forEach(function (method) {
|
1386 | UncontrolledComponent.prototype[method] = function $proxiedMethod() {
|
1387 | var _this$inner;
|
1388 |
|
1389 | return (_this$inner = this.inner)[method].apply(_this$inner, arguments);
|
1390 | };
|
1391 | });
|
1392 | var WrappedComponent = UncontrolledComponent;
|
1393 |
|
1394 | if (React.forwardRef) {
|
1395 | WrappedComponent = React.forwardRef(function (props, ref) {
|
1396 | return React.createElement(UncontrolledComponent, _extends({}, props, {
|
1397 | innerRef: ref,
|
1398 | __source: {
|
1399 | fileName: _jsxFileName,
|
1400 | lineNumber: 128
|
1401 | },
|
1402 | __self: this
|
1403 | }));
|
1404 | });
|
1405 | WrappedComponent.propTypes = UncontrolledComponent.propTypes;
|
1406 | }
|
1407 |
|
1408 | WrappedComponent.ControlledComponent = Component;
|
1409 | |
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 | WrappedComponent.deferControlTo = function (newComponent, additions, nextMethods) {
|
1415 | if (additions === void 0) {
|
1416 | additions = {};
|
1417 | }
|
1418 |
|
1419 | return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods);
|
1420 | };
|
1421 |
|
1422 | return WrappedComponent;
|
1423 | }
|
1424 | ;
|
1425 |
|
1426 |
|
1427 | ;
|
1428 |
|
1429 | var ThemeProvider_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ThemeProvider.tsx";
|
1430 |
|
1431 |
|
1432 | var ThemeContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
|
1433 | var Consumer = ThemeContext.Consumer,
|
1434 | Provider = ThemeContext.Provider;
|
1435 |
|
1436 | function ThemeProvider(_ref) {
|
1437 | var prefixes = _ref.prefixes,
|
1438 | children = _ref.children;
|
1439 | var copiedPrefixes = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
1440 | return extends_extends({}, prefixes);
|
1441 | }, [prefixes]);
|
1442 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Provider, {
|
1443 | value: copiedPrefixes,
|
1444 | __self: this,
|
1445 | __source: {
|
1446 | fileName: ThemeProvider_jsxFileName,
|
1447 | lineNumber: 14,
|
1448 | columnNumber: 10
|
1449 | }
|
1450 | }, children);
|
1451 | }
|
1452 |
|
1453 | ThemeProvider.propTypes = {
|
1454 | prefixes: (prop_types_default()).object.isRequired
|
1455 | };
|
1456 | function useBootstrapPrefix(prefix, defaultPrefix) {
|
1457 | var prefixes = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
|
1458 | return prefix || prefixes[defaultPrefix] || defaultPrefix;
|
1459 | }
|
1460 |
|
1461 | function createBootstrapComponent(Component, opts) {
|
1462 | var _this = this;
|
1463 |
|
1464 | if (typeof opts === 'string') opts = {
|
1465 | prefix: opts
|
1466 | };
|
1467 | var isClassy = Component.prototype && Component.prototype.isReactComponent;
|
1468 |
|
1469 | var _opts = opts,
|
1470 | prefix = _opts.prefix,
|
1471 | _opts$forwardRefAs = _opts.forwardRefAs,
|
1472 | forwardRefAs = _opts$forwardRefAs === void 0 ? isClassy ? 'ref' : 'innerRef' : _opts$forwardRefAs;
|
1473 | var Wrapped = React.forwardRef(function (_ref2, ref) {
|
1474 | var props = _extends({}, _ref2);
|
1475 |
|
1476 | props[forwardRefAs] = ref;
|
1477 | var bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);
|
1478 | return React.createElement(Component, _extends({}, props, {
|
1479 | bsPrefix: bsPrefix,
|
1480 | __self: _this,
|
1481 | __source: {
|
1482 | fileName: ThemeProvider_jsxFileName,
|
1483 | lineNumber: 38,
|
1484 | columnNumber: 12
|
1485 | }
|
1486 | }));
|
1487 | });
|
1488 | Wrapped.displayName = "Bootstrap(" + (Component.displayName || Component.name) + ")";
|
1489 | return Wrapped;
|
1490 | }
|
1491 |
|
1492 |
|
1493 | const src_ThemeProvider = (ThemeProvider);
|
1494 | ;
|
1495 |
|
1496 |
|
1497 | var SelectableContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
|
1498 | var makeEventKey = function makeEventKey(eventKey, href) {
|
1499 | if (href === void 0) {
|
1500 | href = null;
|
1501 | }
|
1502 |
|
1503 | if (eventKey != null) return String(eventKey);
|
1504 | return href || null;
|
1505 | };
|
1506 | const src_SelectableContext = (SelectableContext);
|
1507 | ;
|
1508 |
|
1509 | var context = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
|
1510 | context.displayName = 'AccordionContext';
|
1511 | const AccordionContext = (context);
|
1512 | ;
|
1513 |
|
1514 |
|
1515 | var _excluded = ["as", "children", "eventKey", "onClick"];
|
1516 |
|
1517 | var AccordionToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionToggle.tsx",
|
1518 | _this = undefined;
|
1519 |
|
1520 |
|
1521 |
|
1522 |
|
1523 |
|
1524 | var propTypes = {
|
1525 |
|
1526 | as: (prop_types_default()).elementType,
|
1527 |
|
1528 | |
1529 |
|
1530 |
|
1531 |
|
1532 | eventKey: (prop_types_default()).string.isRequired,
|
1533 |
|
1534 |
|
1535 | onClick: (prop_types_default()).func
|
1536 | };
|
1537 | function useAccordionToggle(eventKey, onClick) {
|
1538 | var contextEventKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext);
|
1539 | var onSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
|
1540 | return function (e) {
|
1541 | |
1542 |
|
1543 |
|
1544 |
|
1545 | var eventKeyPassed = eventKey === contextEventKey ? null : eventKey;
|
1546 | if (onSelect) onSelect(eventKeyPassed, e);
|
1547 | if (onClick) onClick(e);
|
1548 | };
|
1549 | }
|
1550 | var AccordionToggle = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
1551 | var _ref$as = _ref.as,
|
1552 | Component = _ref$as === void 0 ? 'button' : _ref$as,
|
1553 | children = _ref.children,
|
1554 | eventKey = _ref.eventKey,
|
1555 | onClick = _ref.onClick,
|
1556 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, _excluded);
|
1557 |
|
1558 | var accordionOnClick = useAccordionToggle(eventKey, onClick);
|
1559 |
|
1560 | if (Component === 'button') {
|
1561 | props.type = 'button';
|
1562 | }
|
1563 |
|
1564 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
1565 | ref: ref,
|
1566 | onClick: accordionOnClick
|
1567 | }, props, {
|
1568 | __self: _this,
|
1569 | __source: {
|
1570 | fileName: AccordionToggle_jsxFileName,
|
1571 | lineNumber: 74,
|
1572 | columnNumber: 7
|
1573 | }
|
1574 | }), children);
|
1575 | });
|
1576 | AccordionToggle.propTypes = propTypes;
|
1577 | const src_AccordionToggle = (AccordionToggle);
|
1578 | ;
|
1579 |
|
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 | function ownerDocument(node) {
|
1585 | return node && node.ownerDocument || document;
|
1586 | }
|
1587 | ;
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 |
|
1593 |
|
1594 |
|
1595 | function ownerWindow(node) {
|
1596 | var doc = ownerDocument(node);
|
1597 | return doc && doc.defaultView || window;
|
1598 | }
|
1599 | ;
|
1600 |
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 |
|
1607 |
|
1608 | function getComputedStyle_getComputedStyle(node, psuedoElement) {
|
1609 | return ownerWindow(node).getComputedStyle(node, psuedoElement);
|
1610 | }
|
1611 | ;
|
1612 | var rUpper = /([A-Z])/g;
|
1613 | function hyphenate(string) {
|
1614 | return string.replace(rUpper, '-$1').toLowerCase();
|
1615 | }
|
1616 | ;
|
1617 |
|
1618 |
|
1619 |
|
1620 |
|
1621 |
|
1622 |
|
1623 | var msPattern = /^ms-/;
|
1624 | function hyphenateStyleName(string) {
|
1625 | return hyphenate(string).replace(msPattern, '-ms-');
|
1626 | }
|
1627 | ;
|
1628 | var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
|
1629 | function isTransform(value) {
|
1630 | return !!(value && supportedTransforms.test(value));
|
1631 | }
|
1632 | ;
|
1633 |
|
1634 |
|
1635 |
|
1636 |
|
1637 | function style(node, property) {
|
1638 | var css = '';
|
1639 | var transforms = '';
|
1640 |
|
1641 | if (typeof property === 'string') {
|
1642 | return node.style.getPropertyValue(hyphenateStyleName(property)) || getComputedStyle_getComputedStyle(node).getPropertyValue(hyphenateStyleName(property));
|
1643 | }
|
1644 |
|
1645 | Object.keys(property).forEach(function (key) {
|
1646 | var value = property[key];
|
1647 |
|
1648 | if (!value && value !== 0) {
|
1649 | node.style.removeProperty(hyphenateStyleName(key));
|
1650 | } else if (isTransform(key)) {
|
1651 | transforms += key + "(" + value + ") ";
|
1652 | } else {
|
1653 | css += hyphenateStyleName(key) + ": " + value + ";";
|
1654 | }
|
1655 | });
|
1656 |
|
1657 | if (transforms) {
|
1658 | css += "transform: " + transforms + ";";
|
1659 | }
|
1660 |
|
1661 | node.style.cssText += ";" + css;
|
1662 | }
|
1663 |
|
1664 | const css = (style);
|
1665 | ;
|
1666 | function _setPrototypeOf(o, p) {
|
1667 | _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
1668 | o.__proto__ = p;
|
1669 | return o;
|
1670 | };
|
1671 |
|
1672 | return _setPrototypeOf(o, p);
|
1673 | }
|
1674 | ;
|
1675 |
|
1676 | function inheritsLoose_inheritsLoose(subClass, superClass) {
|
1677 | subClass.prototype = Object.create(superClass.prototype);
|
1678 | subClass.prototype.constructor = subClass;
|
1679 | _setPrototypeOf(subClass, superClass);
|
1680 | }
|
1681 |
|
1682 | var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__(207);
|
1683 | var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default = __webpack_require__.n(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
|
1684 | ;
|
1685 | const config = ({
|
1686 | disabled: false
|
1687 | });
|
1688 | ;
|
1689 |
|
1690 | const TransitionGroupContext = (external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null));
|
1691 | ;
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 |
|
1699 |
|
1700 | var UNMOUNTED = 'unmounted';
|
1701 | var EXITED = 'exited';
|
1702 | var ENTERING = 'entering';
|
1703 | var ENTERED = 'entered';
|
1704 | var EXITING = 'exiting';
|
1705 |
|
1706 |
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 |
|
1720 |
|
1721 |
|
1722 |
|
1723 |
|
1724 |
|
1725 |
|
1726 |
|
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 |
|
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 |
|
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 |
|
1757 |
|
1758 |
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 |
|
1768 |
|
1769 |
|
1770 |
|
1771 |
|
1772 |
|
1773 |
|
1774 |
|
1775 |
|
1776 |
|
1777 |
|
1778 |
|
1779 |
|
1780 |
|
1781 |
|
1782 |
|
1783 |
|
1784 |
|
1785 |
|
1786 |
|
1787 |
|
1788 |
|
1789 |
|
1790 |
|
1791 |
|
1792 |
|
1793 |
|
1794 |
|
1795 |
|
1796 |
|
1797 | var Transition = function (_React$Component) {
|
1798 | inheritsLoose_inheritsLoose(Transition, _React$Component);
|
1799 |
|
1800 | function Transition(props, context) {
|
1801 | var _this;
|
1802 |
|
1803 | _this = _React$Component.call(this, props, context) || this;
|
1804 | var parentGroup = context;
|
1805 |
|
1806 | var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
1807 | var initialStatus;
|
1808 | _this.appearStatus = null;
|
1809 |
|
1810 | if (props.in) {
|
1811 | if (appear) {
|
1812 | initialStatus = EXITED;
|
1813 | _this.appearStatus = ENTERING;
|
1814 | } else {
|
1815 | initialStatus = ENTERED;
|
1816 | }
|
1817 | } else {
|
1818 | if (props.unmountOnExit || props.mountOnEnter) {
|
1819 | initialStatus = UNMOUNTED;
|
1820 | } else {
|
1821 | initialStatus = EXITED;
|
1822 | }
|
1823 | }
|
1824 |
|
1825 | _this.state = {
|
1826 | status: initialStatus
|
1827 | };
|
1828 | _this.nextCallback = null;
|
1829 | return _this;
|
1830 | }
|
1831 |
|
1832 | Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
|
1833 | var nextIn = _ref.in;
|
1834 |
|
1835 | if (nextIn && prevState.status === UNMOUNTED) {
|
1836 | return {
|
1837 | status: EXITED
|
1838 | };
|
1839 | }
|
1840 |
|
1841 | return null;
|
1842 | }
|
1843 |
|
1844 |
|
1845 |
|
1846 |
|
1847 |
|
1848 |
|
1849 |
|
1850 |
|
1851 |
|
1852 |
|
1853 |
|
1854 |
|
1855 |
|
1856 |
|
1857 |
|
1858 | ;
|
1859 |
|
1860 | var _proto = Transition.prototype;
|
1861 |
|
1862 | _proto.componentDidMount = function componentDidMount() {
|
1863 | this.updateStatus(true, this.appearStatus);
|
1864 | };
|
1865 |
|
1866 | _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
1867 | var nextStatus = null;
|
1868 |
|
1869 | if (prevProps !== this.props) {
|
1870 | var status = this.state.status;
|
1871 |
|
1872 | if (this.props.in) {
|
1873 | if (status !== ENTERING && status !== ENTERED) {
|
1874 | nextStatus = ENTERING;
|
1875 | }
|
1876 | } else {
|
1877 | if (status === ENTERING || status === ENTERED) {
|
1878 | nextStatus = EXITING;
|
1879 | }
|
1880 | }
|
1881 | }
|
1882 |
|
1883 | this.updateStatus(false, nextStatus);
|
1884 | };
|
1885 |
|
1886 | _proto.componentWillUnmount = function componentWillUnmount() {
|
1887 | this.cancelNextCallback();
|
1888 | };
|
1889 |
|
1890 | _proto.getTimeouts = function getTimeouts() {
|
1891 | var timeout = this.props.timeout;
|
1892 | var exit, enter, appear;
|
1893 | exit = enter = appear = timeout;
|
1894 |
|
1895 | if (timeout != null && typeof timeout !== 'number') {
|
1896 | exit = timeout.exit;
|
1897 | enter = timeout.enter;
|
1898 |
|
1899 | appear = timeout.appear !== undefined ? timeout.appear : enter;
|
1900 | }
|
1901 |
|
1902 | return {
|
1903 | exit: exit,
|
1904 | enter: enter,
|
1905 | appear: appear
|
1906 | };
|
1907 | };
|
1908 |
|
1909 | _proto.updateStatus = function updateStatus(mounting, nextStatus) {
|
1910 | if (mounting === void 0) {
|
1911 | mounting = false;
|
1912 | }
|
1913 |
|
1914 | if (nextStatus !== null) {
|
1915 |
|
1916 | this.cancelNextCallback();
|
1917 |
|
1918 | if (nextStatus === ENTERING) {
|
1919 | this.performEnter(mounting);
|
1920 | } else {
|
1921 | this.performExit();
|
1922 | }
|
1923 | } else if (this.props.unmountOnExit && this.state.status === EXITED) {
|
1924 | this.setState({
|
1925 | status: UNMOUNTED
|
1926 | });
|
1927 | }
|
1928 | };
|
1929 |
|
1930 | _proto.performEnter = function performEnter(mounting) {
|
1931 | var _this2 = this;
|
1932 |
|
1933 | var enter = this.props.enter;
|
1934 | var appearing = this.context ? this.context.isMounting : mounting;
|
1935 |
|
1936 | var _ref2 = this.props.nodeRef ? [appearing] : [external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this), appearing],
|
1937 | maybeNode = _ref2[0],
|
1938 | maybeAppearing = _ref2[1];
|
1939 |
|
1940 | var timeouts = this.getTimeouts();
|
1941 | var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
|
1942 |
|
1943 |
|
1944 | if (!mounting && !enter || config.disabled) {
|
1945 | this.safeSetState({
|
1946 | status: ENTERED
|
1947 | }, function () {
|
1948 | _this2.props.onEntered(maybeNode);
|
1949 | });
|
1950 | return;
|
1951 | }
|
1952 |
|
1953 | this.props.onEnter(maybeNode, maybeAppearing);
|
1954 | this.safeSetState({
|
1955 | status: ENTERING
|
1956 | }, function () {
|
1957 | _this2.props.onEntering(maybeNode, maybeAppearing);
|
1958 |
|
1959 | _this2.onTransitionEnd(enterTimeout, function () {
|
1960 | _this2.safeSetState({
|
1961 | status: ENTERED
|
1962 | }, function () {
|
1963 | _this2.props.onEntered(maybeNode, maybeAppearing);
|
1964 | });
|
1965 | });
|
1966 | });
|
1967 | };
|
1968 |
|
1969 | _proto.performExit = function performExit() {
|
1970 | var _this3 = this;
|
1971 |
|
1972 | var exit = this.props.exit;
|
1973 | var timeouts = this.getTimeouts();
|
1974 | var maybeNode = this.props.nodeRef ? undefined : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this);
|
1975 |
|
1976 | if (!exit || config.disabled) {
|
1977 | this.safeSetState({
|
1978 | status: EXITED
|
1979 | }, function () {
|
1980 | _this3.props.onExited(maybeNode);
|
1981 | });
|
1982 | return;
|
1983 | }
|
1984 |
|
1985 | this.props.onExit(maybeNode);
|
1986 | this.safeSetState({
|
1987 | status: EXITING
|
1988 | }, function () {
|
1989 | _this3.props.onExiting(maybeNode);
|
1990 |
|
1991 | _this3.onTransitionEnd(timeouts.exit, function () {
|
1992 | _this3.safeSetState({
|
1993 | status: EXITED
|
1994 | }, function () {
|
1995 | _this3.props.onExited(maybeNode);
|
1996 | });
|
1997 | });
|
1998 | });
|
1999 | };
|
2000 |
|
2001 | _proto.cancelNextCallback = function cancelNextCallback() {
|
2002 | if (this.nextCallback !== null) {
|
2003 | this.nextCallback.cancel();
|
2004 | this.nextCallback = null;
|
2005 | }
|
2006 | };
|
2007 |
|
2008 | _proto.safeSetState = function safeSetState(nextState, callback) {
|
2009 |
|
2010 |
|
2011 |
|
2012 | callback = this.setNextCallback(callback);
|
2013 | this.setState(nextState, callback);
|
2014 | };
|
2015 |
|
2016 | _proto.setNextCallback = function setNextCallback(callback) {
|
2017 | var _this4 = this;
|
2018 |
|
2019 | var active = true;
|
2020 |
|
2021 | this.nextCallback = function (event) {
|
2022 | if (active) {
|
2023 | active = false;
|
2024 | _this4.nextCallback = null;
|
2025 | callback(event);
|
2026 | }
|
2027 | };
|
2028 |
|
2029 | this.nextCallback.cancel = function () {
|
2030 | active = false;
|
2031 | };
|
2032 |
|
2033 | return this.nextCallback;
|
2034 | };
|
2035 |
|
2036 | _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
|
2037 | this.setNextCallback(handler);
|
2038 | var node = this.props.nodeRef ? this.props.nodeRef.current : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this);
|
2039 | var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
|
2040 |
|
2041 | if (!node || doesNotHaveTimeoutOrListener) {
|
2042 | setTimeout(this.nextCallback, 0);
|
2043 | return;
|
2044 | }
|
2045 |
|
2046 | if (this.props.addEndListener) {
|
2047 | var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
|
2048 | maybeNode = _ref3[0],
|
2049 | maybeNextCallback = _ref3[1];
|
2050 |
|
2051 | this.props.addEndListener(maybeNode, maybeNextCallback);
|
2052 | }
|
2053 |
|
2054 | if (timeout != null) {
|
2055 | setTimeout(this.nextCallback, timeout);
|
2056 | }
|
2057 | };
|
2058 |
|
2059 | _proto.render = function render() {
|
2060 | var status = this.state.status;
|
2061 |
|
2062 | if (status === UNMOUNTED) {
|
2063 | return null;
|
2064 | }
|
2065 |
|
2066 | var _this$props = this.props,
|
2067 | children = _this$props.children,
|
2068 | _in = _this$props.in,
|
2069 | _mountOnEnter = _this$props.mountOnEnter,
|
2070 | _unmountOnExit = _this$props.unmountOnExit,
|
2071 | _appear = _this$props.appear,
|
2072 | _enter = _this$props.enter,
|
2073 | _exit = _this$props.exit,
|
2074 | _timeout = _this$props.timeout,
|
2075 | _addEndListener = _this$props.addEndListener,
|
2076 | _onEnter = _this$props.onEnter,
|
2077 | _onEntering = _this$props.onEntering,
|
2078 | _onEntered = _this$props.onEntered,
|
2079 | _onExit = _this$props.onExit,
|
2080 | _onExiting = _this$props.onExiting,
|
2081 | _onExited = _this$props.onExited,
|
2082 | _nodeRef = _this$props.nodeRef,
|
2083 | childProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
2084 |
|
2085 | return (
|
2086 |
|
2087 |
|
2088 | external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TransitionGroupContext.Provider, {
|
2089 | value: null
|
2090 | }, typeof children === 'function' ? children(status, childProps) : external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children), childProps))
|
2091 | );
|
2092 | };
|
2093 |
|
2094 | return Transition;
|
2095 | }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
|
2096 |
|
2097 | Transition.contextType = TransitionGroupContext;
|
2098 | Transition.propTypes = false ? 0 : {};
|
2099 |
|
2100 | function Transition_noop() {}
|
2101 |
|
2102 | Transition.defaultProps = {
|
2103 | in: false,
|
2104 | mountOnEnter: false,
|
2105 | unmountOnExit: false,
|
2106 | appear: false,
|
2107 | enter: true,
|
2108 | exit: true,
|
2109 | onEnter: Transition_noop,
|
2110 | onEntering: Transition_noop,
|
2111 | onEntered: Transition_noop,
|
2112 | onExit: Transition_noop,
|
2113 | onExiting: Transition_noop,
|
2114 | onExited: Transition_noop
|
2115 | };
|
2116 | Transition.UNMOUNTED = UNMOUNTED;
|
2117 | Transition.EXITED = EXITED;
|
2118 | Transition.ENTERING = ENTERING;
|
2119 | Transition.ENTERED = ENTERED;
|
2120 | Transition.EXITING = EXITING;
|
2121 | const esm_Transition = (Transition);
|
2122 | ;
|
2123 | const canUseDOM = (!!(typeof window !== 'undefined' && window.document && window.document.createElement));
|
2124 | ;
|
2125 |
|
2126 |
|
2127 | var optionsSupported = false;
|
2128 | var onceSupported = false;
|
2129 |
|
2130 | try {
|
2131 | var options = {
|
2132 | get passive() {
|
2133 | return optionsSupported = true;
|
2134 | },
|
2135 |
|
2136 | get once() {
|
2137 |
|
2138 | return onceSupported = optionsSupported = true;
|
2139 | }
|
2140 |
|
2141 | };
|
2142 |
|
2143 | if (canUseDOM) {
|
2144 | window.addEventListener('test', options, options);
|
2145 | window.removeEventListener('test', options, true);
|
2146 | }
|
2147 | } catch (e) {
|
2148 |
|
2149 | }
|
2150 |
|
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 |
|
2160 | function addEventListener(node, eventName, handler, options) {
|
2161 | if (options && typeof options !== 'boolean' && !onceSupported) {
|
2162 | var once = options.once,
|
2163 | capture = options.capture;
|
2164 | var wrappedHandler = handler;
|
2165 |
|
2166 | if (!onceSupported && once) {
|
2167 | wrappedHandler = handler.__once || function onceHandler(event) {
|
2168 | this.removeEventListener(eventName, onceHandler, capture);
|
2169 | handler.call(this, event);
|
2170 | };
|
2171 |
|
2172 | handler.__once = wrappedHandler;
|
2173 | }
|
2174 |
|
2175 | node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);
|
2176 | }
|
2177 |
|
2178 | node.addEventListener(eventName, handler, options);
|
2179 | }
|
2180 |
|
2181 | const esm_addEventListener = (addEventListener);
|
2182 | ;
|
2183 |
|
2184 |
|
2185 |
|
2186 |
|
2187 |
|
2188 |
|
2189 |
|
2190 |
|
2191 | function removeEventListener(node, eventName, handler, options) {
|
2192 | var capture = options && typeof options !== 'boolean' ? options.capture : options;
|
2193 | node.removeEventListener(eventName, handler, capture);
|
2194 |
|
2195 | if (handler.__once) {
|
2196 | node.removeEventListener(eventName, handler.__once, capture);
|
2197 | }
|
2198 | }
|
2199 |
|
2200 | const esm_removeEventListener = (removeEventListener);
|
2201 | ;
|
2202 |
|
2203 |
|
2204 |
|
2205 | function listen(node, eventName, handler, options) {
|
2206 | esm_addEventListener(node, eventName, handler, options);
|
2207 | return function () {
|
2208 | esm_removeEventListener(node, eventName, handler, options);
|
2209 | };
|
2210 | }
|
2211 |
|
2212 | const esm_listen = (listen);
|
2213 | ;
|
2214 |
|
2215 |
|
2216 |
|
2217 |
|
2218 |
|
2219 |
|
2220 |
|
2221 |
|
2222 | function triggerEvent(node, eventName, bubbles, cancelable) {
|
2223 | if (bubbles === void 0) {
|
2224 | bubbles = false;
|
2225 | }
|
2226 |
|
2227 | if (cancelable === void 0) {
|
2228 | cancelable = true;
|
2229 | }
|
2230 |
|
2231 | if (node) {
|
2232 | var event = document.createEvent('HTMLEvents');
|
2233 | event.initEvent(eventName, bubbles, cancelable);
|
2234 | node.dispatchEvent(event);
|
2235 | }
|
2236 | }
|
2237 | ;
|
2238 |
|
2239 |
|
2240 |
|
2241 |
|
2242 | function parseDuration(node) {
|
2243 | var str = css(node, 'transitionDuration') || '';
|
2244 | var mult = str.indexOf('ms') === -1 ? 1000 : 1;
|
2245 | return parseFloat(str) * mult;
|
2246 | }
|
2247 |
|
2248 | function emulateTransitionEnd(element, duration, padding) {
|
2249 | if (padding === void 0) {
|
2250 | padding = 5;
|
2251 | }
|
2252 |
|
2253 | var called = false;
|
2254 | var handle = setTimeout(function () {
|
2255 | if (!called) triggerEvent(element, 'transitionend', true);
|
2256 | }, duration + padding);
|
2257 | var remove = esm_listen(element, 'transitionend', function () {
|
2258 | called = true;
|
2259 | }, {
|
2260 | once: true
|
2261 | });
|
2262 | return function () {
|
2263 | clearTimeout(handle);
|
2264 | remove();
|
2265 | };
|
2266 | }
|
2267 |
|
2268 | function transitionEnd(element, handler, duration, padding) {
|
2269 | if (duration == null) duration = parseDuration(element) || 0;
|
2270 | var removeEmulate = emulateTransitionEnd(element, duration, padding);
|
2271 | var remove = esm_listen(element, 'transitionend', handler);
|
2272 | return function () {
|
2273 | removeEmulate();
|
2274 | remove();
|
2275 | };
|
2276 | }
|
2277 | ;
|
2278 |
|
2279 |
|
2280 |
|
2281 | function transitionEndListener_parseDuration(node, property) {
|
2282 | var str = css(node, property) || '';
|
2283 | var mult = str.indexOf('ms') === -1 ? 1000 : 1;
|
2284 | return parseFloat(str) * mult;
|
2285 | }
|
2286 |
|
2287 | function transitionEndListener(element, handler) {
|
2288 | var duration = transitionEndListener_parseDuration(element, 'transitionDuration');
|
2289 | var delay = transitionEndListener_parseDuration(element, 'transitionDelay');
|
2290 | var remove = transitionEnd(element, function (e) {
|
2291 | if (e.target === element) {
|
2292 | remove();
|
2293 | handler(e);
|
2294 | }
|
2295 | }, duration + delay);
|
2296 | }
|
2297 | ;
|
2298 |
|
2299 |
|
2300 |
|
2301 |
|
2302 |
|
2303 |
|
2304 |
|
2305 |
|
2306 |
|
2307 | function createChainedFunction() {
|
2308 | for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
2309 | funcs[_key] = arguments[_key];
|
2310 | }
|
2311 |
|
2312 | return funcs.filter(function (f) {
|
2313 | return f != null;
|
2314 | }).reduce(function (acc, f) {
|
2315 | if (typeof f !== 'function') {
|
2316 | throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
|
2317 | }
|
2318 |
|
2319 | if (acc === null) return f;
|
2320 | return function chainedFunction() {
|
2321 | for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
2322 | args[_key2] = arguments[_key2];
|
2323 | }
|
2324 |
|
2325 |
|
2326 | acc.apply(this, args);
|
2327 |
|
2328 | f.apply(this, args);
|
2329 | };
|
2330 | }, null);
|
2331 | }
|
2332 |
|
2333 | const src_createChainedFunction = (createChainedFunction);
|
2334 | ;
|
2335 |
|
2336 |
|
2337 | function triggerBrowserReflow(node) {
|
2338 |
|
2339 | node.offsetHeight;
|
2340 | }
|
2341 | ;
|
2342 |
|
2343 |
|
2344 | var Collapse_excluded = ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "className", "children", "dimension", "getDimensionValue"];
|
2345 |
|
2346 | var Collapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Collapse.tsx",
|
2347 | _collapseStyles,
|
2348 | Collapse_this = undefined;
|
2349 |
|
2350 |
|
2351 |
|
2352 |
|
2353 |
|
2354 |
|
2355 |
|
2356 |
|
2357 |
|
2358 | var MARGINS = {
|
2359 | height: ['marginTop', 'marginBottom'],
|
2360 | width: ['marginLeft', 'marginRight']
|
2361 | };
|
2362 |
|
2363 | function getDefaultDimensionValue(dimension, elem) {
|
2364 | var offset = "offset" + dimension[0].toUpperCase() + dimension.slice(1);
|
2365 | var value = elem[offset];
|
2366 | var margins = MARGINS[dimension];
|
2367 | return value +
|
2368 | parseInt(css(elem, margins[0]), 10) +
|
2369 | parseInt(css(elem, margins[1]), 10);
|
2370 | }
|
2371 |
|
2372 | var collapseStyles = (_collapseStyles = {}, _collapseStyles[EXITED] = 'collapse', _collapseStyles[EXITING] = 'collapsing', _collapseStyles[ENTERING] = 'collapsing', _collapseStyles[ENTERED] = 'collapse show', _collapseStyles);
|
2373 | var Collapse_propTypes = {
|
2374 | |
2375 |
|
2376 |
|
2377 | in: (prop_types_default()).bool,
|
2378 |
|
2379 | |
2380 |
|
2381 |
|
2382 | mountOnEnter: (prop_types_default()).bool,
|
2383 |
|
2384 | |
2385 |
|
2386 |
|
2387 | unmountOnExit: (prop_types_default()).bool,
|
2388 |
|
2389 | |
2390 |
|
2391 |
|
2392 |
|
2393 | appear: (prop_types_default()).bool,
|
2394 |
|
2395 | |
2396 |
|
2397 |
|
2398 |
|
2399 |
|
2400 | timeout: (prop_types_default()).number,
|
2401 |
|
2402 | |
2403 |
|
2404 |
|
2405 | onEnter: (prop_types_default()).func,
|
2406 |
|
2407 | |
2408 |
|
2409 |
|
2410 | onEntering: (prop_types_default()).func,
|
2411 |
|
2412 | |
2413 |
|
2414 |
|
2415 | onEntered: (prop_types_default()).func,
|
2416 |
|
2417 | |
2418 |
|
2419 |
|
2420 | onExit: (prop_types_default()).func,
|
2421 |
|
2422 | |
2423 |
|
2424 |
|
2425 | onExiting: (prop_types_default()).func,
|
2426 |
|
2427 | |
2428 |
|
2429 |
|
2430 | onExited: (prop_types_default()).func,
|
2431 |
|
2432 | |
2433 |
|
2434 |
|
2435 |
|
2436 |
|
2437 |
|
2438 |
|
2439 | dimension: prop_types_default().oneOfType([prop_types_default().oneOf(['height', 'width']), (prop_types_default()).func]),
|
2440 |
|
2441 | |
2442 |
|
2443 |
|
2444 |
|
2445 |
|
2446 |
|
2447 |
|
2448 |
|
2449 |
|
2450 | getDimensionValue: (prop_types_default()).func,
|
2451 |
|
2452 | |
2453 |
|
2454 |
|
2455 | role: (prop_types_default()).string
|
2456 | };
|
2457 | var defaultProps = {
|
2458 | in: false,
|
2459 | timeout: 300,
|
2460 | mountOnEnter: false,
|
2461 | unmountOnExit: false,
|
2462 | appear: false,
|
2463 | getDimensionValue: getDefaultDimensionValue
|
2464 | };
|
2465 | var Collapse = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
2466 | var onEnter = _ref.onEnter,
|
2467 | onEntering = _ref.onEntering,
|
2468 | onEntered = _ref.onEntered,
|
2469 | onExit = _ref.onExit,
|
2470 | onExiting = _ref.onExiting,
|
2471 | className = _ref.className,
|
2472 | children = _ref.children,
|
2473 | _ref$dimension = _ref.dimension,
|
2474 | dimension = _ref$dimension === void 0 ? 'height' : _ref$dimension,
|
2475 | _ref$getDimensionValu = _ref.getDimensionValue,
|
2476 | getDimensionValue = _ref$getDimensionValu === void 0 ? getDefaultDimensionValue : _ref$getDimensionValu,
|
2477 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Collapse_excluded);
|
2478 |
|
2479 |
|
2480 | var computedDimension = typeof dimension === 'function' ? dimension() : dimension;
|
2481 |
|
2482 |
|
2483 | var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
2484 | return src_createChainedFunction(function (elem) {
|
2485 | elem.style[computedDimension] = '0';
|
2486 | }, onEnter);
|
2487 | }, [computedDimension, onEnter]);
|
2488 | var handleEntering = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
2489 | return src_createChainedFunction(function (elem) {
|
2490 | var scroll = "scroll" + computedDimension[0].toUpperCase() + computedDimension.slice(1);
|
2491 | elem.style[computedDimension] = elem[scroll] + "px";
|
2492 | }, onEntering);
|
2493 | }, [computedDimension, onEntering]);
|
2494 | var handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
2495 | return src_createChainedFunction(function (elem) {
|
2496 | elem.style[computedDimension] = null;
|
2497 | }, onEntered);
|
2498 | }, [computedDimension, onEntered]);
|
2499 |
|
2500 |
|
2501 | var handleExit = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
2502 | return src_createChainedFunction(function (elem) {
|
2503 | elem.style[computedDimension] = getDimensionValue(computedDimension, elem) + "px";
|
2504 | triggerBrowserReflow(elem);
|
2505 | }, onExit);
|
2506 | }, [onExit, getDimensionValue, computedDimension]);
|
2507 | var handleExiting = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
2508 | return src_createChainedFunction(function (elem) {
|
2509 | elem.style[computedDimension] = null;
|
2510 | }, onExiting);
|
2511 | }, [computedDimension, onExiting]);
|
2512 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition
|
2513 | , extends_extends({
|
2514 | ref: ref,
|
2515 | addEndListener: transitionEndListener
|
2516 | }, props, {
|
2517 | "aria-expanded": props.role ? props.in : null,
|
2518 | onEnter: handleEnter,
|
2519 | onEntering: handleEntering,
|
2520 | onEntered: handleEntered,
|
2521 | onExit: handleExit,
|
2522 | onExiting: handleExiting,
|
2523 | __self: Collapse_this,
|
2524 | __source: {
|
2525 | fileName: Collapse_jsxFileName,
|
2526 | lineNumber: 222,
|
2527 | columnNumber: 7
|
2528 | }
|
2529 | }), function (state, innerProps) {
|
2530 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, extends_extends({}, innerProps, {
|
2531 | className: classnames_default()(className, children.props.className, collapseStyles[state], computedDimension === 'width' && 'width')
|
2532 | }));
|
2533 | });
|
2534 | });
|
2535 |
|
2536 | Collapse.propTypes = Collapse_propTypes;
|
2537 |
|
2538 | Collapse.defaultProps = defaultProps;
|
2539 | const src_Collapse = (Collapse);
|
2540 | ;
|
2541 |
|
2542 |
|
2543 | var AccordionCollapse_excluded = ["children", "eventKey"];
|
2544 |
|
2545 | var AccordionCollapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionCollapse.tsx",
|
2546 | AccordionCollapse_this = undefined;
|
2547 |
|
2548 |
|
2549 |
|
2550 |
|
2551 |
|
2552 |
|
2553 | var AccordionCollapse_propTypes = {
|
2554 | |
2555 |
|
2556 |
|
2557 | eventKey: (prop_types_default()).string.isRequired,
|
2558 |
|
2559 |
|
2560 | children: (prop_types_default()).element.isRequired
|
2561 | };
|
2562 | var AccordionCollapse = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
2563 | var children = _ref.children,
|
2564 | eventKey = _ref.eventKey,
|
2565 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, AccordionCollapse_excluded);
|
2566 |
|
2567 | var contextEventKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext);
|
2568 |
|
2569 |
|
2570 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
|
2571 | value: null,
|
2572 | __self: AccordionCollapse_this,
|
2573 | __source: {
|
2574 | fileName: AccordionCollapse_jsxFileName,
|
2575 | lineNumber: 36,
|
2576 | columnNumber: 7
|
2577 | }
|
2578 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Collapse, extends_extends({
|
2579 | ref: ref,
|
2580 | in: contextEventKey === eventKey
|
2581 | }, props, {
|
2582 | __self: AccordionCollapse_this,
|
2583 | __source: {
|
2584 | fileName: AccordionCollapse_jsxFileName,
|
2585 | lineNumber: 37,
|
2586 | columnNumber: 9
|
2587 | }
|
2588 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
2589 | __self: AccordionCollapse_this,
|
2590 | __source: {
|
2591 | fileName: AccordionCollapse_jsxFileName,
|
2592 | lineNumber: 38,
|
2593 | columnNumber: 11
|
2594 | }
|
2595 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children))));
|
2596 | });
|
2597 | AccordionCollapse.propTypes = AccordionCollapse_propTypes;
|
2598 | AccordionCollapse.displayName = 'AccordionCollapse';
|
2599 | const src_AccordionCollapse = (AccordionCollapse);
|
2600 | ;
|
2601 |
|
2602 |
|
2603 | var Accordion_excluded = ["as", "activeKey", "bsPrefix", "children", "className", "onSelect"];
|
2604 |
|
2605 | var Accordion_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Accordion.tsx",
|
2606 | Accordion_this = undefined;
|
2607 |
|
2608 |
|
2609 |
|
2610 |
|
2611 |
|
2612 |
|
2613 |
|
2614 |
|
2615 |
|
2616 |
|
2617 | var Accordion_propTypes = {
|
2618 |
|
2619 | as: (prop_types_default()).elementType,
|
2620 |
|
2621 |
|
2622 | bsPrefix: (prop_types_default()).string,
|
2623 |
|
2624 |
|
2625 | activeKey: (prop_types_default()).string,
|
2626 |
|
2627 |
|
2628 | defaultActiveKey: (prop_types_default()).string
|
2629 | };
|
2630 | var Accordion = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
2631 | var _useUncontrolled = useUncontrolled(props, {
|
2632 | activeKey: 'onSelect'
|
2633 | }),
|
2634 | _useUncontrolled$as = _useUncontrolled.as,
|
2635 | Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
|
2636 | activeKey = _useUncontrolled.activeKey,
|
2637 | bsPrefix = _useUncontrolled.bsPrefix,
|
2638 | children = _useUncontrolled.children,
|
2639 | className = _useUncontrolled.className,
|
2640 | onSelect = _useUncontrolled.onSelect,
|
2641 | controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Accordion_excluded);
|
2642 |
|
2643 | var finalClassName = classnames_default()(className, useBootstrapPrefix(bsPrefix, 'accordion'));
|
2644 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(AccordionContext.Provider, {
|
2645 | value: activeKey || null,
|
2646 | __self: Accordion_this,
|
2647 | __source: {
|
2648 | fileName: Accordion_jsxFileName,
|
2649 | lineNumber: 62,
|
2650 | columnNumber: 5
|
2651 | }
|
2652 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
|
2653 | value: onSelect || null,
|
2654 | __self: Accordion_this,
|
2655 | __source: {
|
2656 | fileName: Accordion_jsxFileName,
|
2657 | lineNumber: 63,
|
2658 | columnNumber: 7
|
2659 | }
|
2660 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
2661 | ref: ref
|
2662 | }, controlledProps, {
|
2663 | className: finalClassName,
|
2664 | __self: Accordion_this,
|
2665 | __source: {
|
2666 | fileName: Accordion_jsxFileName,
|
2667 | lineNumber: 64,
|
2668 | columnNumber: 9
|
2669 | }
|
2670 | }), children)));
|
2671 | });
|
2672 | Accordion.displayName = 'Accordion';
|
2673 | Accordion.propTypes = Accordion_propTypes;
|
2674 | Accordion.Toggle = src_AccordionToggle;
|
2675 | Accordion.Collapse = src_AccordionCollapse;
|
2676 | const src_Accordion = (Accordion);
|
2677 |
|
2678 | var lib = __webpack_require__(517);
|
2679 | ;
|
2680 |
|
2681 |
|
2682 |
|
2683 |
|
2684 |
|
2685 |
|
2686 |
|
2687 |
|
2688 |
|
2689 |
|
2690 |
|
2691 | function useCommittedRef(value) {
|
2692 | var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
|
2693 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
2694 | ref.current = value;
|
2695 | }, [value]);
|
2696 | return ref;
|
2697 | }
|
2698 |
|
2699 | const esm_useCommittedRef = (useCommittedRef);
|
2700 | ;
|
2701 |
|
2702 |
|
2703 | function useEventCallback(fn) {
|
2704 | var ref = esm_useCommittedRef(fn);
|
2705 | return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
2706 | return ref.current && ref.current.apply(ref, arguments);
|
2707 | }, [ref]);
|
2708 | }
|
2709 | ;
|
2710 |
|
2711 |
|
2712 | var Fade_excluded = ["className", "children"];
|
2713 |
|
2714 | var Fade_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Fade.tsx",
|
2715 | _fadeStyles,
|
2716 | Fade_this = undefined;
|
2717 |
|
2718 |
|
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 | var Fade_propTypes = {
|
2725 | |
2726 |
|
2727 |
|
2728 | in: (prop_types_default()).bool,
|
2729 |
|
2730 | |
2731 |
|
2732 |
|
2733 | mountOnEnter: (prop_types_default()).bool,
|
2734 |
|
2735 | |
2736 |
|
2737 |
|
2738 | unmountOnExit: (prop_types_default()).bool,
|
2739 |
|
2740 | |
2741 |
|
2742 |
|
2743 |
|
2744 | appear: (prop_types_default()).bool,
|
2745 |
|
2746 | |
2747 |
|
2748 |
|
2749 |
|
2750 |
|
2751 | timeout: (prop_types_default()).number,
|
2752 |
|
2753 | |
2754 |
|
2755 |
|
2756 | onEnter: (prop_types_default()).func,
|
2757 |
|
2758 | |
2759 |
|
2760 |
|
2761 | onEntering: (prop_types_default()).func,
|
2762 |
|
2763 | |
2764 |
|
2765 |
|
2766 | onEntered: (prop_types_default()).func,
|
2767 |
|
2768 | |
2769 |
|
2770 |
|
2771 | onExit: (prop_types_default()).func,
|
2772 |
|
2773 | |
2774 |
|
2775 |
|
2776 | onExiting: (prop_types_default()).func,
|
2777 |
|
2778 | |
2779 |
|
2780 |
|
2781 | onExited: (prop_types_default()).func
|
2782 | };
|
2783 | var Fade_defaultProps = {
|
2784 | in: false,
|
2785 | timeout: 300,
|
2786 | mountOnEnter: false,
|
2787 | unmountOnExit: false,
|
2788 | appear: false
|
2789 | };
|
2790 | var fadeStyles = (_fadeStyles = {}, _fadeStyles[ENTERING] = 'show', _fadeStyles[ENTERED] = 'show', _fadeStyles);
|
2791 | var Fade = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
2792 | var className = _ref.className,
|
2793 | children = _ref.children,
|
2794 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Fade_excluded);
|
2795 |
|
2796 | var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (node) {
|
2797 | triggerBrowserReflow(node);
|
2798 | if (props.onEnter) props.onEnter(node);
|
2799 | }, [props]);
|
2800 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition, extends_extends({
|
2801 | ref: ref,
|
2802 | addEndListener: transitionEndListener
|
2803 | }, props, {
|
2804 | onEnter: handleEnter,
|
2805 | __self: Fade_this,
|
2806 | __source: {
|
2807 | fileName: Fade_jsxFileName,
|
2808 | lineNumber: 101,
|
2809 | columnNumber: 7
|
2810 | }
|
2811 | }), function (status, innerProps) {
|
2812 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, extends_extends({}, innerProps, {
|
2813 | className: classnames_default()('fade', className, children.props.className, fadeStyles[status])
|
2814 | }));
|
2815 | });
|
2816 | });
|
2817 | Fade.propTypes = Fade_propTypes;
|
2818 | Fade.defaultProps = Fade_defaultProps;
|
2819 | Fade.displayName = 'Fade';
|
2820 | const src_Fade = (Fade);
|
2821 | ;
|
2822 |
|
2823 |
|
2824 | var CloseButton_excluded = ["label", "onClick", "className"];
|
2825 |
|
2826 | var CloseButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CloseButton.tsx",
|
2827 | CloseButton_this = undefined;
|
2828 |
|
2829 |
|
2830 |
|
2831 |
|
2832 | var CloseButton_propTypes = {
|
2833 | label: (prop_types_default()).string.isRequired,
|
2834 | onClick: (prop_types_default()).func
|
2835 | };
|
2836 | var CloseButton_defaultProps = {
|
2837 | label: 'Close'
|
2838 | };
|
2839 | var CloseButton = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
2840 | var label = _ref.label,
|
2841 | onClick = _ref.onClick,
|
2842 | className = _ref.className,
|
2843 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CloseButton_excluded);
|
2844 |
|
2845 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", extends_extends({
|
2846 | ref: ref,
|
2847 | type: "button",
|
2848 | className: classnames_default()('close', className),
|
2849 | onClick: onClick
|
2850 | }, props, {
|
2851 | __self: CloseButton_this,
|
2852 | __source: {
|
2853 | fileName: CloseButton_jsxFileName,
|
2854 | lineNumber: 21,
|
2855 | columnNumber: 5
|
2856 | }
|
2857 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
2858 | "aria-hidden": "true",
|
2859 | __self: CloseButton_this,
|
2860 | __source: {
|
2861 | fileName: CloseButton_jsxFileName,
|
2862 | lineNumber: 28,
|
2863 | columnNumber: 7
|
2864 | }
|
2865 | }, "\xD7"), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
2866 | className: "sr-only",
|
2867 | __self: CloseButton_this,
|
2868 | __source: {
|
2869 | fileName: CloseButton_jsxFileName,
|
2870 | lineNumber: 29,
|
2871 | columnNumber: 7
|
2872 | }
|
2873 | }, label));
|
2874 | });
|
2875 | CloseButton.displayName = 'CloseButton';
|
2876 | CloseButton.propTypes = CloseButton_propTypes;
|
2877 | CloseButton.defaultProps = CloseButton_defaultProps;
|
2878 | const src_CloseButton = (CloseButton);
|
2879 | ;
|
2880 |
|
2881 |
|
2882 | var divWithClassName_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/divWithClassName.tsx",
|
2883 | divWithClassName_this = undefined;
|
2884 |
|
2885 |
|
2886 |
|
2887 | const divWithClassName = (function (className) {
|
2888 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (p, ref) {
|
2889 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, p, {
|
2890 | ref: ref,
|
2891 | className: classnames_default()(p.className, className),
|
2892 | __self: divWithClassName_this,
|
2893 | __source: {
|
2894 | fileName: divWithClassName_jsxFileName,
|
2895 | lineNumber: 6,
|
2896 | columnNumber: 5
|
2897 | }
|
2898 | }));
|
2899 | });
|
2900 | });
|
2901 | ;
|
2902 | var rHyphen = /-(.)/g;
|
2903 | function camelize(string) {
|
2904 | return string.replace(rHyphen, function (_, chr) {
|
2905 | return chr.toUpperCase();
|
2906 | });
|
2907 | }
|
2908 | ;
|
2909 |
|
2910 |
|
2911 | var createWithBsPrefix_excluded = ["className", "bsPrefix", "as"];
|
2912 | var createWithBsPrefix_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/createWithBsPrefix.tsx";
|
2913 |
|
2914 |
|
2915 |
|
2916 |
|
2917 |
|
2918 | var pascalCase = function pascalCase(str) {
|
2919 | return str[0].toUpperCase() + camelize(str).slice(1);
|
2920 | };
|
2921 |
|
2922 |
|
2923 | function createWithBsPrefix(prefix, _temp) {
|
2924 | var _this = this;
|
2925 |
|
2926 | var _ref = _temp === void 0 ? {} : _temp,
|
2927 | _ref$displayName = _ref.displayName,
|
2928 | displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,
|
2929 | Component = _ref.Component,
|
2930 | defaultProps = _ref.defaultProps;
|
2931 |
|
2932 | var BsComponent = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref2, ref) {
|
2933 | var className = _ref2.className,
|
2934 | bsPrefix = _ref2.bsPrefix,
|
2935 | _ref2$as = _ref2.as,
|
2936 | Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,
|
2937 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, createWithBsPrefix_excluded);
|
2938 |
|
2939 | var resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix);
|
2940 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tag, extends_extends({
|
2941 | ref: ref,
|
2942 | className: classnames_default()(className, resolvedPrefix)
|
2943 | }, props, {
|
2944 | __self: _this,
|
2945 | __source: {
|
2946 | fileName: createWithBsPrefix_jsxFileName,
|
2947 | lineNumber: 33,
|
2948 | columnNumber: 9
|
2949 | }
|
2950 | }));
|
2951 | });
|
2952 | BsComponent.defaultProps = defaultProps;
|
2953 | BsComponent.displayName = displayName;
|
2954 | return BsComponent;
|
2955 | }
|
2956 | ;
|
2957 |
|
2958 |
|
2959 | var SafeAnchor_excluded = ["as", "disabled", "onKeyDown"];
|
2960 |
|
2961 | var SafeAnchor_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/SafeAnchor.tsx",
|
2962 | SafeAnchor_this = undefined;
|
2963 |
|
2964 |
|
2965 |
|
2966 |
|
2967 | var SafeAnchor_propTypes = {
|
2968 | href: (prop_types_default()).string,
|
2969 | onClick: (prop_types_default()).func,
|
2970 | onKeyDown: (prop_types_default()).func,
|
2971 | disabled: (prop_types_default()).bool,
|
2972 | role: (prop_types_default()).string,
|
2973 | tabIndex: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]),
|
2974 |
|
2975 | |
2976 |
|
2977 |
|
2978 | as: (prop_types_default()).elementType
|
2979 | };
|
2980 |
|
2981 | function isTrivialHref(href) {
|
2982 | return !href || href.trim() === '#';
|
2983 | }
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 |
|
2989 |
|
2990 |
|
2991 |
|
2992 |
|
2993 | var SafeAnchor = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
2994 | var _ref$as = _ref.as,
|
2995 | Component = _ref$as === void 0 ? 'a' : _ref$as,
|
2996 | disabled = _ref.disabled,
|
2997 | onKeyDown = _ref.onKeyDown,
|
2998 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, SafeAnchor_excluded);
|
2999 |
|
3000 | var handleClick = function handleClick(event) {
|
3001 | var href = props.href,
|
3002 | onClick = props.onClick;
|
3003 |
|
3004 | if (disabled || isTrivialHref(href)) {
|
3005 | event.preventDefault();
|
3006 | }
|
3007 |
|
3008 | if (disabled) {
|
3009 | event.stopPropagation();
|
3010 | return;
|
3011 | }
|
3012 |
|
3013 | if (onClick) {
|
3014 | onClick(event);
|
3015 | }
|
3016 | };
|
3017 |
|
3018 | var handleKeyDown = function handleKeyDown(event) {
|
3019 | if (event.key === ' ') {
|
3020 | event.preventDefault();
|
3021 | handleClick(event);
|
3022 | }
|
3023 | };
|
3024 |
|
3025 | if (isTrivialHref(props.href)) {
|
3026 | props.role = props.role || 'button';
|
3027 |
|
3028 |
|
3029 | props.href = props.href || '#';
|
3030 | }
|
3031 |
|
3032 | if (disabled) {
|
3033 | props.tabIndex = -1;
|
3034 | props['aria-disabled'] = true;
|
3035 | }
|
3036 |
|
3037 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
3038 | ref: ref
|
3039 | }, props, {
|
3040 | onClick: handleClick,
|
3041 | onKeyDown: src_createChainedFunction(handleKeyDown, onKeyDown),
|
3042 | __self: SafeAnchor_this,
|
3043 | __source: {
|
3044 | fileName: SafeAnchor_jsxFileName,
|
3045 | lineNumber: 90,
|
3046 | columnNumber: 7
|
3047 | }
|
3048 | }));
|
3049 | });
|
3050 | SafeAnchor.propTypes = SafeAnchor_propTypes;
|
3051 | SafeAnchor.displayName = 'SafeAnchor';
|
3052 | const src_SafeAnchor = (SafeAnchor);
|
3053 | ;
|
3054 |
|
3055 |
|
3056 | var Alert_excluded = ["bsPrefix", "show", "closeLabel", "className", "children", "variant", "onClose", "dismissible", "transition"];
|
3057 |
|
3058 | var Alert_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Alert.tsx",
|
3059 | Alert_this = undefined;
|
3060 |
|
3061 |
|
3062 |
|
3063 |
|
3064 |
|
3065 |
|
3066 |
|
3067 |
|
3068 |
|
3069 |
|
3070 |
|
3071 |
|
3072 |
|
3073 | var DivStyledAsH4 = divWithClassName('h4');
|
3074 | DivStyledAsH4.displayName = 'DivStyledAsH4';
|
3075 | var AlertHeading = createWithBsPrefix('alert-heading', {
|
3076 | Component: DivStyledAsH4
|
3077 | });
|
3078 | var AlertLink = createWithBsPrefix('alert-link', {
|
3079 | Component: src_SafeAnchor
|
3080 | });
|
3081 | var Alert_propTypes = {
|
3082 | |
3083 |
|
3084 |
|
3085 | bsPrefix: (prop_types_default()).string,
|
3086 |
|
3087 | |
3088 |
|
3089 |
|
3090 |
|
3091 |
|
3092 | variant: (prop_types_default()).string,
|
3093 |
|
3094 | |
3095 |
|
3096 |
|
3097 |
|
3098 | dismissible: (prop_types_default()).bool,
|
3099 |
|
3100 | |
3101 |
|
3102 |
|
3103 |
|
3104 |
|
3105 | show: (prop_types_default()).bool,
|
3106 |
|
3107 | |
3108 |
|
3109 |
|
3110 |
|
3111 |
|
3112 | onClose: (prop_types_default()).func,
|
3113 |
|
3114 | |
3115 |
|
3116 |
|
3117 | closeLabel: (prop_types_default()).string,
|
3118 |
|
3119 | |
3120 |
|
3121 |
|
3122 |
|
3123 |
|
3124 | transition: prop_types_default().oneOfType([(prop_types_default()).bool, lib.nm])
|
3125 | };
|
3126 | var Alert_defaultProps = {
|
3127 | show: true,
|
3128 | transition: src_Fade,
|
3129 | closeLabel: 'Close alert'
|
3130 | };
|
3131 | var Alert = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (uncontrolledProps, ref) {
|
3132 | var _useUncontrolled = useUncontrolled(uncontrolledProps, {
|
3133 | show: 'onClose'
|
3134 | }),
|
3135 | bsPrefix = _useUncontrolled.bsPrefix,
|
3136 | show = _useUncontrolled.show,
|
3137 | closeLabel = _useUncontrolled.closeLabel,
|
3138 | className = _useUncontrolled.className,
|
3139 | children = _useUncontrolled.children,
|
3140 | variant = _useUncontrolled.variant,
|
3141 | onClose = _useUncontrolled.onClose,
|
3142 | dismissible = _useUncontrolled.dismissible,
|
3143 | transition = _useUncontrolled.transition,
|
3144 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Alert_excluded);
|
3145 |
|
3146 | var prefix = useBootstrapPrefix(bsPrefix, 'alert');
|
3147 | var handleClose = useEventCallback(function (e) {
|
3148 | if (onClose) {
|
3149 | onClose(false, e);
|
3150 | }
|
3151 | });
|
3152 | var Transition = transition === true ? src_Fade : transition;
|
3153 | var alert = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
3154 | role: "alert"
|
3155 | }, !Transition ? props : undefined, {
|
3156 | ref: ref,
|
3157 | className: classnames_default()(className, prefix, variant && prefix + "-" + variant, dismissible && prefix + "-dismissible"),
|
3158 | __self: Alert_this,
|
3159 | __source: {
|
3160 | fileName: Alert_jsxFileName,
|
3161 | lineNumber: 119,
|
3162 | columnNumber: 7
|
3163 | }
|
3164 | }), dismissible && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_CloseButton, {
|
3165 | onClick: handleClose,
|
3166 | label: closeLabel,
|
3167 | __self: Alert_this,
|
3168 | __source: {
|
3169 | fileName: Alert_jsxFileName,
|
3170 | lineNumber: 131,
|
3171 | columnNumber: 11
|
3172 | }
|
3173 | }), children);
|
3174 | if (!Transition) return show ? alert : null;
|
3175 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, extends_extends({
|
3176 | unmountOnExit: true
|
3177 | }, props, {
|
3178 | ref: undefined,
|
3179 | in: show,
|
3180 | __self: Alert_this,
|
3181 | __source: {
|
3182 | fileName: Alert_jsxFileName,
|
3183 | lineNumber: 140,
|
3184 | columnNumber: 7
|
3185 | }
|
3186 | }), alert);
|
3187 | });
|
3188 | Alert.displayName = 'Alert';
|
3189 | Alert.defaultProps = Alert_defaultProps;
|
3190 | Alert.propTypes = Alert_propTypes;
|
3191 | Alert.Link = AlertLink;
|
3192 | Alert.Heading = AlertHeading;
|
3193 | const src_Alert = (Alert);
|
3194 | ;
|
3195 |
|
3196 |
|
3197 | var Badge_excluded = ["bsPrefix", "variant", "pill", "className", "as"];
|
3198 |
|
3199 | var Badge_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Badge.tsx",
|
3200 | Badge_this = undefined;
|
3201 |
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 | var Badge_propTypes = {
|
3207 |
|
3208 | bsPrefix: (prop_types_default()).string,
|
3209 |
|
3210 | |
3211 |
|
3212 |
|
3213 |
|
3214 |
|
3215 | variant: (prop_types_default()).string,
|
3216 |
|
3217 | |
3218 |
|
3219 |
|
3220 |
|
3221 | pill: (prop_types_default()).bool.isRequired,
|
3222 |
|
3223 |
|
3224 | as: (prop_types_default()).elementType
|
3225 | };
|
3226 | var Badge_defaultProps = {
|
3227 | pill: false
|
3228 | };
|
3229 | var Badge = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
3230 | var bsPrefix = _ref.bsPrefix,
|
3231 | variant = _ref.variant,
|
3232 | pill = _ref.pill,
|
3233 | className = _ref.className,
|
3234 | _ref$as = _ref.as,
|
3235 | Component = _ref$as === void 0 ? 'span' : _ref$as,
|
3236 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Badge_excluded);
|
3237 |
|
3238 | var prefix = useBootstrapPrefix(bsPrefix, 'badge');
|
3239 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
3240 | ref: ref
|
3241 | }, props, {
|
3242 | className: classnames_default()(className, prefix, pill && prefix + "-pill", variant && prefix + "-" + variant),
|
3243 | __self: Badge_this,
|
3244 | __source: {
|
3245 | fileName: Badge_jsxFileName,
|
3246 | lineNumber: 55,
|
3247 | columnNumber: 7
|
3248 | }
|
3249 | }));
|
3250 | });
|
3251 | Badge.displayName = 'Badge';
|
3252 | Badge.propTypes = Badge_propTypes;
|
3253 | Badge.defaultProps = Badge_defaultProps;
|
3254 | const src_Badge = (Badge);
|
3255 | ;
|
3256 |
|
3257 |
|
3258 | var BreadcrumbItem_excluded = ["bsPrefix", "active", "children", "className", "as", "linkAs", "linkProps", "href", "title", "target"];
|
3259 |
|
3260 | var BreadcrumbItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/BreadcrumbItem.tsx",
|
3261 | BreadcrumbItem_this = undefined;
|
3262 |
|
3263 |
|
3264 |
|
3265 |
|
3266 |
|
3267 |
|
3268 | var BreadcrumbItem_propTypes = {
|
3269 | |
3270 |
|
3271 |
|
3272 | bsPrefix: (prop_types_default()).string,
|
3273 |
|
3274 | |
3275 |
|
3276 |
|
3277 |
|
3278 | active: (prop_types_default()).bool,
|
3279 |
|
3280 | |
3281 |
|
3282 |
|
3283 | href: (prop_types_default()).string,
|
3284 |
|
3285 | |
3286 |
|
3287 |
|
3288 | linkAs: (prop_types_default()).elementType,
|
3289 |
|
3290 | |
3291 |
|
3292 |
|
3293 | title: (prop_types_default()).node,
|
3294 |
|
3295 | |
3296 |
|
3297 |
|
3298 | target: (prop_types_default()).string,
|
3299 |
|
3300 | |
3301 |
|
3302 |
|
3303 | linkProps: (prop_types_default()).object,
|
3304 | as: (prop_types_default()).elementType
|
3305 | };
|
3306 | var BreadcrumbItem_defaultProps = {
|
3307 | active: false,
|
3308 | linkProps: {}
|
3309 | };
|
3310 | var BreadcrumbItem = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
3311 | var bsPrefix = _ref.bsPrefix,
|
3312 | active = _ref.active,
|
3313 | children = _ref.children,
|
3314 | className = _ref.className,
|
3315 | _ref$as = _ref.as,
|
3316 | Component = _ref$as === void 0 ? 'li' : _ref$as,
|
3317 | _ref$linkAs = _ref.linkAs,
|
3318 | LinkComponent = _ref$linkAs === void 0 ? src_SafeAnchor : _ref$linkAs,
|
3319 | linkProps = _ref.linkProps,
|
3320 | href = _ref.href,
|
3321 | title = _ref.title,
|
3322 | target = _ref.target,
|
3323 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, BreadcrumbItem_excluded);
|
3324 |
|
3325 | var prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb-item');
|
3326 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
3327 | ref: ref
|
3328 | }, props, {
|
3329 | className: classnames_default()(prefix, className, {
|
3330 | active: active
|
3331 | }),
|
3332 | "aria-current": active ? 'page' : undefined,
|
3333 | __self: BreadcrumbItem_this,
|
3334 | __source: {
|
3335 | fileName: BreadcrumbItem_jsxFileName,
|
3336 | lineNumber: 83,
|
3337 | columnNumber: 7
|
3338 | }
|
3339 | }), active ? children : external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(LinkComponent, extends_extends({}, linkProps, {
|
3340 | href: href,
|
3341 | title: title,
|
3342 | target: target,
|
3343 | __self: BreadcrumbItem_this,
|
3344 | __source: {
|
3345 | fileName: BreadcrumbItem_jsxFileName,
|
3346 | lineNumber: 92,
|
3347 | columnNumber: 11
|
3348 | }
|
3349 | }), children));
|
3350 | });
|
3351 | BreadcrumbItem.displayName = 'BreadcrumbItem';
|
3352 | BreadcrumbItem.propTypes = BreadcrumbItem_propTypes;
|
3353 | BreadcrumbItem.defaultProps = BreadcrumbItem_defaultProps;
|
3354 | const src_BreadcrumbItem = (BreadcrumbItem);
|
3355 | ;
|
3356 |
|
3357 |
|
3358 | var Breadcrumb_excluded = ["bsPrefix", "className", "listProps", "children", "label", "as"];
|
3359 |
|
3360 | var Breadcrumb_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Breadcrumb.tsx",
|
3361 | Breadcrumb_this = undefined;
|
3362 |
|
3363 |
|
3364 |
|
3365 |
|
3366 |
|
3367 |
|
3368 | var Breadcrumb_propTypes = {
|
3369 | |
3370 |
|
3371 |
|
3372 | bsPrefix: (prop_types_default()).string,
|
3373 |
|
3374 | |
3375 |
|
3376 |
|
3377 |
|
3378 | label: (prop_types_default()).string,
|
3379 |
|
3380 | |
3381 |
|
3382 |
|
3383 | listProps: (prop_types_default()).object,
|
3384 | as: (prop_types_default()).elementType
|
3385 | };
|
3386 | var Breadcrumb_defaultProps = {
|
3387 | label: 'breadcrumb',
|
3388 | listProps: {}
|
3389 | };
|
3390 | var Breadcrumb = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
3391 | var bsPrefix = _ref.bsPrefix,
|
3392 | className = _ref.className,
|
3393 | listProps = _ref.listProps,
|
3394 | children = _ref.children,
|
3395 | label = _ref.label,
|
3396 | _ref$as = _ref.as,
|
3397 | Component = _ref$as === void 0 ? 'nav' : _ref$as,
|
3398 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Breadcrumb_excluded);
|
3399 |
|
3400 | var prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb');
|
3401 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
3402 | "aria-label": label,
|
3403 | className: className,
|
3404 | ref: ref
|
3405 | }, props, {
|
3406 | __self: Breadcrumb_this,
|
3407 | __source: {
|
3408 | fileName: Breadcrumb_jsxFileName,
|
3409 | lineNumber: 62,
|
3410 | columnNumber: 7
|
3411 | }
|
3412 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ol", extends_extends({}, listProps, {
|
3413 | className: classnames_default()(prefix, listProps == null ? void 0 : listProps.className),
|
3414 | __self: Breadcrumb_this,
|
3415 | __source: {
|
3416 | fileName: Breadcrumb_jsxFileName,
|
3417 | lineNumber: 63,
|
3418 | columnNumber: 9
|
3419 | }
|
3420 | }), children));
|
3421 | });
|
3422 | Breadcrumb.displayName = 'Breadcrumb';
|
3423 | Breadcrumb.propTypes = Breadcrumb_propTypes;
|
3424 | Breadcrumb.defaultProps = Breadcrumb_defaultProps;
|
3425 | Breadcrumb.Item = src_BreadcrumbItem;
|
3426 | const src_Breadcrumb = (Breadcrumb);
|
3427 | ;
|
3428 |
|
3429 |
|
3430 | var Button_excluded = ["bsPrefix", "variant", "size", "active", "className", "block", "type", "as"];
|
3431 |
|
3432 | var Button_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Button.tsx",
|
3433 | Button_this = undefined;
|
3434 |
|
3435 |
|
3436 |
|
3437 |
|
3438 |
|
3439 |
|
3440 | var Button_propTypes = {
|
3441 | |
3442 |
|
3443 |
|
3444 | bsPrefix: (prop_types_default()).string,
|
3445 |
|
3446 | |
3447 |
|
3448 |
|
3449 |
|
3450 |
|
3451 |
|
3452 |
|
3453 |
|
3454 |
|
3455 |
|
3456 |
|
3457 | variant: (prop_types_default()).string,
|
3458 |
|
3459 | |
3460 |
|
3461 |
|
3462 |
|
3463 |
|
3464 | size: (prop_types_default()).string,
|
3465 |
|
3466 |
|
3467 | block: (prop_types_default()).bool,
|
3468 |
|
3469 |
|
3470 | active: (prop_types_default()).bool,
|
3471 |
|
3472 | |
3473 |
|
3474 |
|
3475 |
|
3476 | disabled: (prop_types_default()).bool,
|
3477 |
|
3478 |
|
3479 | href: (prop_types_default()).string,
|
3480 |
|
3481 | |
3482 |
|
3483 |
|
3484 |
|
3485 |
|
3486 | type: prop_types_default().oneOf(['button', 'reset', 'submit', null]),
|
3487 | as: (prop_types_default()).elementType
|
3488 | };
|
3489 | var Button_defaultProps = {
|
3490 | variant: 'primary',
|
3491 | active: false,
|
3492 | disabled: false
|
3493 | };
|
3494 | var Button = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
3495 | var bsPrefix = _ref.bsPrefix,
|
3496 | variant = _ref.variant,
|
3497 | size = _ref.size,
|
3498 | active = _ref.active,
|
3499 | className = _ref.className,
|
3500 | block = _ref.block,
|
3501 | type = _ref.type,
|
3502 | as = _ref.as,
|
3503 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Button_excluded);
|
3504 |
|
3505 | var prefix = useBootstrapPrefix(bsPrefix, 'btn');
|
3506 | var classes = classnames_default()(className, prefix, active && 'active', variant && prefix + "-" + variant, block && prefix + "-block", size && prefix + "-" + size);
|
3507 |
|
3508 | if (props.href) {
|
3509 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, extends_extends({}, props, {
|
3510 | as: as,
|
3511 | ref: ref,
|
3512 | className: classnames_default()(classes, props.disabled && 'disabled'),
|
3513 | __self: Button_this,
|
3514 | __source: {
|
3515 | fileName: Button_jsxFileName,
|
3516 | lineNumber: 116,
|
3517 | columnNumber: 9
|
3518 | }
|
3519 | }));
|
3520 | }
|
3521 |
|
3522 | if (ref) {
|
3523 | props.ref = ref;
|
3524 | }
|
3525 |
|
3526 | if (type) {
|
3527 | props.type = type;
|
3528 | } else if (!as) {
|
3529 | props.type = 'button';
|
3530 | }
|
3531 |
|
3532 | var Component = as || 'button';
|
3533 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
3534 | className: classes,
|
3535 | __self: Button_this,
|
3536 | __source: {
|
3537 | fileName: Button_jsxFileName,
|
3538 | lineNumber: 136,
|
3539 | columnNumber: 12
|
3540 | }
|
3541 | }));
|
3542 | });
|
3543 | Button.displayName = 'Button';
|
3544 | Button.propTypes = Button_propTypes;
|
3545 | Button.defaultProps = Button_defaultProps;
|
3546 | const src_Button = (Button);
|
3547 | ;
|
3548 |
|
3549 |
|
3550 | var ButtonGroup_excluded = ["bsPrefix", "size", "toggle", "vertical", "className", "as"];
|
3551 |
|
3552 | var ButtonGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ButtonGroup.tsx",
|
3553 | ButtonGroup_this = undefined;
|
3554 |
|
3555 |
|
3556 |
|
3557 |
|
3558 |
|
3559 | var ButtonGroup_propTypes = {
|
3560 | |
3561 |
|
3562 |
|
3563 | bsPrefix: (prop_types_default()).string,
|
3564 |
|
3565 | |
3566 |
|
3567 |
|
3568 |
|
3569 |
|
3570 | size: (prop_types_default()).string,
|
3571 |
|
3572 |
|
3573 | vertical: (prop_types_default()).bool,
|
3574 |
|
3575 | |
3576 |
|
3577 |
|
3578 |
|
3579 |
|
3580 | toggle: (prop_types_default()).bool,
|
3581 |
|
3582 | |
3583 |
|
3584 |
|
3585 |
|
3586 |
|
3587 | role: (prop_types_default()).string,
|
3588 | as: (prop_types_default()).elementType
|
3589 | };
|
3590 | var ButtonGroup_defaultProps = {
|
3591 | vertical: false,
|
3592 | toggle: false,
|
3593 | role: 'group'
|
3594 | };
|
3595 | var ButtonGroup = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
3596 | var bsPrefix = _ref.bsPrefix,
|
3597 | size = _ref.size,
|
3598 | toggle = _ref.toggle,
|
3599 | vertical = _ref.vertical,
|
3600 | className = _ref.className,
|
3601 | _ref$as = _ref.as,
|
3602 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
3603 | rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ButtonGroup_excluded);
|
3604 |
|
3605 | var prefix = useBootstrapPrefix(bsPrefix, 'btn-group');
|
3606 | var baseClass = prefix;
|
3607 | if (vertical) baseClass = prefix + "-vertical";
|
3608 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, rest, {
|
3609 | ref: ref,
|
3610 | className: classnames_default()(className, baseClass, size && prefix + "-" + size, toggle && prefix + "-toggle"),
|
3611 | __self: ButtonGroup_this,
|
3612 | __source: {
|
3613 | fileName: ButtonGroup_jsxFileName,
|
3614 | lineNumber: 79,
|
3615 | columnNumber: 7
|
3616 | }
|
3617 | }));
|
3618 | });
|
3619 | ButtonGroup.displayName = 'ButtonGroup';
|
3620 | ButtonGroup.propTypes = ButtonGroup_propTypes;
|
3621 | ButtonGroup.defaultProps = ButtonGroup_defaultProps;
|
3622 | const src_ButtonGroup = (ButtonGroup);
|
3623 | ;
|
3624 |
|
3625 |
|
3626 | var ButtonToolbar_excluded = ["bsPrefix", "className"];
|
3627 |
|
3628 | var ButtonToolbar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ButtonToolbar.tsx",
|
3629 | ButtonToolbar_this = undefined;
|
3630 |
|
3631 |
|
3632 |
|
3633 |
|
3634 |
|
3635 | var ButtonToolbar_propTypes = {
|
3636 | |
3637 |
|
3638 |
|
3639 | bsPrefix: (prop_types_default()).string,
|
3640 |
|
3641 | |
3642 |
|
3643 |
|
3644 |
|
3645 |
|
3646 | role: (prop_types_default()).string
|
3647 | };
|
3648 | var ButtonToolbar_defaultProps = {
|
3649 | role: 'toolbar'
|
3650 | };
|
3651 | var ButtonToolbar = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
3652 | var bsPrefix = _ref.bsPrefix,
|
3653 | className = _ref.className,
|
3654 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ButtonToolbar_excluded);
|
3655 |
|
3656 | var prefix = useBootstrapPrefix(bsPrefix, 'btn-toolbar');
|
3657 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, props, {
|
3658 | ref: ref,
|
3659 | className: classnames_default()(className, prefix),
|
3660 | __self: ButtonToolbar_this,
|
3661 | __source: {
|
3662 | fileName: ButtonToolbar_jsxFileName,
|
3663 | lineNumber: 42,
|
3664 | columnNumber: 10
|
3665 | }
|
3666 | }));
|
3667 | });
|
3668 | ButtonToolbar.displayName = 'ButtonToolbar';
|
3669 | ButtonToolbar.propTypes = ButtonToolbar_propTypes;
|
3670 | ButtonToolbar.defaultProps = ButtonToolbar_defaultProps;
|
3671 | const src_ButtonToolbar = (ButtonToolbar);
|
3672 | ;
|
3673 |
|
3674 | var CardContext_context = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
|
3675 | CardContext_context.displayName = 'CardContext';
|
3676 | const CardContext = (CardContext_context);
|
3677 | ;
|
3678 |
|
3679 |
|
3680 | var CardImg_excluded = ["bsPrefix", "className", "variant", "as"];
|
3681 |
|
3682 | var CardImg_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardImg.tsx",
|
3683 | CardImg_this = undefined;
|
3684 |
|
3685 |
|
3686 |
|
3687 |
|
3688 |
|
3689 | var CardImg_propTypes = {
|
3690 | |
3691 |
|
3692 |
|
3693 | bsPrefix: (prop_types_default()).string,
|
3694 |
|
3695 | |
3696 |
|
3697 |
|
3698 |
|
3699 |
|
3700 |
|
3701 | variant: prop_types_default().oneOf(['top', 'bottom', null]),
|
3702 | as: (prop_types_default()).elementType
|
3703 | };
|
3704 | var CardImg_defaultProps = {
|
3705 | variant: null
|
3706 | };
|
3707 | var CardImg = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(
|
3708 | function (_ref, ref) {
|
3709 | var bsPrefix = _ref.bsPrefix,
|
3710 | className = _ref.className,
|
3711 | variant = _ref.variant,
|
3712 | _ref$as = _ref.as,
|
3713 | Component = _ref$as === void 0 ? 'img' : _ref$as,
|
3714 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CardImg_excluded);
|
3715 |
|
3716 | var prefix = useBootstrapPrefix(bsPrefix, 'card-img');
|
3717 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
3718 | ref: ref,
|
3719 | className: classnames_default()(variant ? prefix + "-" + variant : prefix, className)
|
3720 | }, props, {
|
3721 | __self: CardImg_this,
|
3722 | __source: {
|
3723 | fileName: CardImg_jsxFileName,
|
3724 | lineNumber: 50,
|
3725 | columnNumber: 7
|
3726 | }
|
3727 | }));
|
3728 | });
|
3729 | CardImg.displayName = 'CardImg';
|
3730 | CardImg.propTypes = CardImg_propTypes;
|
3731 | CardImg.defaultProps = CardImg_defaultProps;
|
3732 | const src_CardImg = (CardImg);
|
3733 | ;
|
3734 |
|
3735 |
|
3736 | var Card_excluded = ["bsPrefix", "className", "bg", "text", "border", "body", "children", "as"];
|
3737 |
|
3738 | var Card_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Card.tsx",
|
3739 | Card_this = undefined;
|
3740 |
|
3741 |
|
3742 |
|
3743 |
|
3744 |
|
3745 |
|
3746 |
|
3747 |
|
3748 |
|
3749 | var DivStyledAsH5 = divWithClassName('h5');
|
3750 | var DivStyledAsH6 = divWithClassName('h6');
|
3751 | var CardBody = createWithBsPrefix('card-body');
|
3752 | var CardTitle = createWithBsPrefix('card-title', {
|
3753 | Component: DivStyledAsH5
|
3754 | });
|
3755 | var CardSubtitle = createWithBsPrefix('card-subtitle', {
|
3756 | Component: DivStyledAsH6
|
3757 | });
|
3758 | var CardLink = createWithBsPrefix('card-link', {
|
3759 | Component: 'a'
|
3760 | });
|
3761 | var CardText = createWithBsPrefix('card-text', {
|
3762 | Component: 'p'
|
3763 | });
|
3764 | var CardHeader = createWithBsPrefix('card-header');
|
3765 | var CardFooter = createWithBsPrefix('card-footer');
|
3766 | var CardImgOverlay = createWithBsPrefix('card-img-overlay');
|
3767 | var Card_propTypes = {
|
3768 | |
3769 |
|
3770 |
|
3771 | bsPrefix: (prop_types_default()).string,
|
3772 |
|
3773 | |
3774 |
|
3775 |
|
3776 |
|
3777 |
|
3778 | bg: (prop_types_default()).string,
|
3779 |
|
3780 | |
3781 |
|
3782 |
|
3783 |
|
3784 |
|
3785 | text: (prop_types_default()).string,
|
3786 |
|
3787 | |
3788 |
|
3789 |
|
3790 |
|
3791 |
|
3792 | border: (prop_types_default()).string,
|
3793 |
|
3794 | |
3795 |
|
3796 |
|
3797 |
|
3798 | body: (prop_types_default()).bool,
|
3799 | as: (prop_types_default()).elementType
|
3800 | };
|
3801 | var Card_defaultProps = {
|
3802 | body: false
|
3803 | };
|
3804 | var Card = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
3805 | var bsPrefix = _ref.bsPrefix,
|
3806 | className = _ref.className,
|
3807 | bg = _ref.bg,
|
3808 | text = _ref.text,
|
3809 | border = _ref.border,
|
3810 | body = _ref.body,
|
3811 | children = _ref.children,
|
3812 | _ref$as = _ref.as,
|
3813 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
3814 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Card_excluded);
|
3815 |
|
3816 | var prefix = useBootstrapPrefix(bsPrefix, 'card');
|
3817 | var cardContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
3818 | return {
|
3819 | cardHeaderBsPrefix: prefix + "-header"
|
3820 | };
|
3821 | }, [prefix]);
|
3822 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CardContext.Provider, {
|
3823 | value: cardContext,
|
3824 | __self: Card_this,
|
3825 | __source: {
|
3826 | fileName: Card_jsxFileName,
|
3827 | lineNumber: 115,
|
3828 | columnNumber: 7
|
3829 | }
|
3830 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
3831 | ref: ref
|
3832 | }, props, {
|
3833 | className: classnames_default()(className, prefix, bg && "bg-" + bg, text && "text-" + text, border && "border-" + border),
|
3834 | __self: Card_this,
|
3835 | __source: {
|
3836 | fileName: Card_jsxFileName,
|
3837 | lineNumber: 116,
|
3838 | columnNumber: 9
|
3839 | }
|
3840 | }), body ?
|
3841 |
|
3842 |
|
3843 | external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(CardBody, {
|
3844 | __self: Card_this,
|
3845 | __source: {
|
3846 | fileName: Card_jsxFileName,
|
3847 | lineNumber: 129,
|
3848 | columnNumber: 13
|
3849 | }
|
3850 | }, children) : children));
|
3851 | });
|
3852 | Card.displayName = 'Card';
|
3853 | Card.propTypes = Card_propTypes;
|
3854 | Card.defaultProps = Card_defaultProps;
|
3855 | Card.Img = src_CardImg;
|
3856 | Card.Title = CardTitle;
|
3857 | Card.Subtitle = CardSubtitle;
|
3858 | Card.Body = CardBody;
|
3859 | Card.Link = CardLink;
|
3860 | Card.Text = CardText;
|
3861 | Card.Header = CardHeader;
|
3862 | Card.Footer = CardFooter;
|
3863 | Card.ImgOverlay = CardImgOverlay;
|
3864 | const src_Card = (Card);
|
3865 | ;
|
3866 |
|
3867 | const CardColumns = (createWithBsPrefix('card-columns'));
|
3868 | ;
|
3869 |
|
3870 | const CardDeck = (createWithBsPrefix('card-deck'));
|
3871 | ;
|
3872 |
|
3873 | const CardGroup = (createWithBsPrefix('card-group'));
|
3874 | ;
|
3875 |
|
3876 |
|
3877 |
|
3878 |
|
3879 |
|
3880 |
|
3881 |
|
3882 |
|
3883 |
|
3884 |
|
3885 |
|
3886 |
|
3887 |
|
3888 |
|
3889 |
|
3890 |
|
3891 |
|
3892 |
|
3893 |
|
3894 |
|
3895 |
|
3896 |
|
3897 | function useUpdateEffect(fn, deps) {
|
3898 | var isFirst = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
|
3899 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
3900 | if (isFirst.current) {
|
3901 | isFirst.current = false;
|
3902 | return;
|
3903 | }
|
3904 |
|
3905 | return fn();
|
3906 | }, deps);
|
3907 | }
|
3908 |
|
3909 | const esm_useUpdateEffect = (useUpdateEffect);
|
3910 | ;
|
3911 |
|
3912 |
|
3913 |
|
3914 |
|
3915 |
|
3916 |
|
3917 |
|
3918 |
|
3919 |
|
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 |
|
3930 |
|
3931 |
|
3932 |
|
3933 | function useMounted() {
|
3934 | var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
|
3935 | var isMounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(function () {
|
3936 | return mounted.current;
|
3937 | });
|
3938 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
3939 | return function () {
|
3940 | mounted.current = false;
|
3941 | };
|
3942 | }, []);
|
3943 | return isMounted.current;
|
3944 | }
|
3945 | ;
|
3946 |
|
3947 |
|
3948 |
|
3949 |
|
3950 |
|
3951 |
|
3952 |
|
3953 |
|
3954 | function useUpdatedRef(value) {
|
3955 | var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
|
3956 | valueRef.current = value;
|
3957 | return valueRef;
|
3958 | }
|
3959 | ;
|
3960 |
|
3961 |
|
3962 |
|
3963 |
|
3964 |
|
3965 |
|
3966 |
|
3967 |
|
3968 |
|
3969 | function useWillUnmount(fn) {
|
3970 | var onUnmount = useUpdatedRef(fn);
|
3971 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
3972 | return function () {
|
3973 | return onUnmount.current();
|
3974 | };
|
3975 | }, []);
|
3976 | }
|
3977 | ;
|
3978 |
|
3979 |
|
3980 |
|
3981 |
|
3982 |
|
3983 |
|
3984 |
|
3985 |
|
3986 |
|
3987 |
|
3988 |
|
3989 |
|
3990 | var MAX_DELAY_MS = Math.pow(2, 31) - 1;
|
3991 |
|
3992 | function setChainedTimeout(handleRef, fn, timeoutAtMs) {
|
3993 | var delayMs = timeoutAtMs - Date.now();
|
3994 | handleRef.current = delayMs <= MAX_DELAY_MS ? setTimeout(fn, delayMs) : setTimeout(function () {
|
3995 | return setChainedTimeout(handleRef, fn, timeoutAtMs);
|
3996 | }, MAX_DELAY_MS);
|
3997 | }
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 |
|
4006 |
|
4007 |
|
4008 |
|
4009 |
|
4010 |
|
4011 |
|
4012 |
|
4013 |
|
4014 |
|
4015 |
|
4016 |
|
4017 |
|
4018 | function useTimeout() {
|
4019 | var isMounted = useMounted();
|
4020 |
|
4021 | var handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
4022 | useWillUnmount(function () {
|
4023 | return clearTimeout(handleRef.current);
|
4024 | });
|
4025 | return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
4026 | var clear = function clear() {
|
4027 | return clearTimeout(handleRef.current);
|
4028 | };
|
4029 |
|
4030 | function set(fn, delayMs) {
|
4031 | if (delayMs === void 0) {
|
4032 | delayMs = 0;
|
4033 | }
|
4034 |
|
4035 | if (!isMounted()) return;
|
4036 | clear();
|
4037 |
|
4038 | if (delayMs <= MAX_DELAY_MS) {
|
4039 |
|
4040 | handleRef.current = setTimeout(fn, delayMs);
|
4041 | } else {
|
4042 | setChainedTimeout(handleRef, fn, Date.now() + delayMs);
|
4043 | }
|
4044 | }
|
4045 |
|
4046 | return {
|
4047 | set: set,
|
4048 | clear: clear
|
4049 | };
|
4050 | }, []);
|
4051 | }
|
4052 | ;// CONCATENATED MODULE: ./src/CarouselCaption.tsx
|
4053 |
|
4054 | /* harmony default export */ const CarouselCaption = (createWithBsPrefix('carousel-caption'));
|
4055 | ;// CONCATENATED MODULE: ./src/CarouselItem.tsx
|
4056 |
|
4057 |
|
4058 | var CarouselItem_excluded = ["as", "bsPrefix", "children", "className"];
|
4059 |
|
4060 | var CarouselItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CarouselItem.tsx",
|
4061 | CarouselItem_this = undefined;
|
4062 |
|
4063 |
|
4064 |
|
4065 |
|
4066 |
|
4067 | var CarouselItem_propTypes = {
|
4068 |
|
4069 | as: (prop_types_default()).elementType,
|
4070 |
|
4071 |
|
4072 | bsPrefix: (prop_types_default()).string,
|
4073 |
|
4074 |
|
4075 | interval: (prop_types_default()).number
|
4076 | };
|
4077 | var CarouselItem = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
4078 | var _ref$as = _ref.as,
|
4079 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
4080 | bsPrefix = _ref.bsPrefix,
|
4081 | children = _ref.children,
|
4082 | className = _ref.className,
|
4083 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, CarouselItem_excluded);
|
4084 |
|
4085 | var finalClassName = classnames_default()(className, useBootstrapPrefix(bsPrefix, 'carousel-item'));
|
4086 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
4087 | ref: ref
|
4088 | }, props, {
|
4089 | className: finalClassName,
|
4090 | __self: CarouselItem_this,
|
4091 | __source: {
|
4092 | fileName: CarouselItem_jsxFileName,
|
4093 | lineNumber: 44,
|
4094 | columnNumber: 7
|
4095 | }
|
4096 | }), children);
|
4097 | });
|
4098 | CarouselItem.displayName = 'CarouselItem';
|
4099 | CarouselItem.propTypes = CarouselItem_propTypes;
|
4100 | const src_CarouselItem = (CarouselItem);
|
4101 | ;
|
4102 |
|
4103 |
|
4104 |
|
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 |
|
4110 |
|
4111 |
|
4112 | function map(children, func) {
|
4113 | var index = 0;
|
4114 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, function (child) {
|
4115 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child) ? func(child, index++) : child;
|
4116 | });
|
4117 | }
|
4118 |
|
4119 |
|
4120 |
|
4121 |
|
4122 |
|
4123 |
|
4124 |
|
4125 |
|
4126 | function forEach(children, func) {
|
4127 | var index = 0;
|
4128 | external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(children, function (child) {
|
4129 | if ( external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) func(child, index++);
|
4130 | });
|
4131 | }
|
4132 |
|
4133 |
|
4134 | ;
|
4135 |
|
4136 |
|
4137 | var Carousel_excluded = ["as", "bsPrefix", "slide", "fade", "controls", "indicators", "activeIndex", "onSelect", "onSlide", "onSlid", "interval", "keyboard", "onKeyDown", "pause", "onMouseOver", "onMouseOut", "wrap", "touch", "onTouchStart", "onTouchMove", "onTouchEnd", "prevIcon", "prevLabel", "nextIcon", "nextLabel", "className", "children"];
|
4138 | var Carousel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Carousel.tsx";
|
4139 |
|
4140 |
|
4141 |
|
4142 |
|
4143 |
|
4144 |
|
4145 |
|
4146 |
|
4147 |
|
4148 |
|
4149 |
|
4150 |
|
4151 |
|
4152 |
|
4153 |
|
4154 |
|
4155 | var SWIPE_THRESHOLD = 40;
|
4156 | var Carousel_propTypes = {
|
4157 | |
4158 |
|
4159 |
|
4160 | bsPrefix: (prop_types_default()).string,
|
4161 | as: (prop_types_default()).elementType,
|
4162 |
|
4163 | |
4164 |
|
4165 |
|
4166 | slide: (prop_types_default()).bool,
|
4167 |
|
4168 |
|
4169 | fade: (prop_types_default()).bool,
|
4170 |
|
4171 | |
4172 |
|
4173 |
|
4174 | controls: (prop_types_default()).bool,
|
4175 |
|
4176 | |
4177 |
|
4178 |
|
4179 | indicators: (prop_types_default()).bool,
|
4180 |
|
4181 | |
4182 |
|
4183 |
|
4184 |
|
4185 |
|
4186 | activeIndex: (prop_types_default()).number,
|
4187 |
|
4188 | |
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 |
|
4195 |
|
4196 |
|
4197 | onSelect: (prop_types_default()).func,
|
4198 |
|
4199 | |
4200 |
|
4201 |
|
4202 |
|
4203 |
|
4204 |
|
4205 | onSlide: (prop_types_default()).func,
|
4206 |
|
4207 | |
4208 |
|
4209 |
|
4210 |
|
4211 |
|
4212 |
|
4213 | onSlid: (prop_types_default()).func,
|
4214 |
|
4215 | |
4216 |
|
4217 |
|
4218 | interval: (prop_types_default()).number,
|
4219 |
|
4220 |
|
4221 | keyboard: (prop_types_default()).bool,
|
4222 |
|
4223 | |
4224 |
|
4225 |
|
4226 |
|
4227 |
|
4228 | pause: prop_types_default().oneOf(['hover', false]),
|
4229 |
|
4230 |
|
4231 | wrap: (prop_types_default()).bool,
|
4232 |
|
4233 | |
4234 |
|
4235 |
|
4236 | touch: (prop_types_default()).bool,
|
4237 |
|
4238 |
|
4239 | prevIcon: (prop_types_default()).node,
|
4240 |
|
4241 | |
4242 |
|
4243 |
|
4244 |
|
4245 |
|
4246 | prevLabel: (prop_types_default()).string,
|
4247 |
|
4248 |
|
4249 | nextIcon: (prop_types_default()).node,
|
4250 |
|
4251 | |
4252 |
|
4253 |
|
4254 |
|
4255 |
|
4256 | nextLabel: (prop_types_default()).string
|
4257 | };
|
4258 | var Carousel_defaultProps = {
|
4259 | slide: true,
|
4260 | fade: false,
|
4261 | controls: true,
|
4262 | indicators: true,
|
4263 | defaultActiveIndex: 0,
|
4264 | interval: 5000,
|
4265 | keyboard: true,
|
4266 | pause: 'hover',
|
4267 | wrap: true,
|
4268 | touch: true,
|
4269 | prevIcon: external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
4270 | "aria-hidden": "true",
|
4271 | className: "carousel-control-prev-icon",
|
4272 | __self: undefined,
|
4273 | __source: {
|
4274 | fileName: Carousel_jsxFileName,
|
4275 | lineNumber: 190,
|
4276 | columnNumber: 13
|
4277 | }
|
4278 | }),
|
4279 | prevLabel: 'Previous',
|
4280 | nextIcon: external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
4281 | "aria-hidden": "true",
|
4282 | className: "carousel-control-next-icon",
|
4283 | __self: undefined,
|
4284 | __source: {
|
4285 | fileName: Carousel_jsxFileName,
|
4286 | lineNumber: 193,
|
4287 | columnNumber: 13
|
4288 | }
|
4289 | }),
|
4290 | nextLabel: 'Next'
|
4291 | };
|
4292 |
|
4293 | function isVisible(element) {
|
4294 | if (!element || !element.style || !element.parentNode || !element.parentNode.style) {
|
4295 | return false;
|
4296 | }
|
4297 |
|
4298 | var elementStyle = getComputedStyle(element);
|
4299 | return elementStyle.display !== 'none' && elementStyle.visibility !== 'hidden' && getComputedStyle(element.parentNode).display !== 'none';
|
4300 | }
|
4301 |
|
4302 | function CarouselFunc(uncontrolledProps, ref) {
|
4303 | var _this = this;
|
4304 |
|
4305 | var _useUncontrolled = useUncontrolled(uncontrolledProps, {
|
4306 | activeIndex: 'onSelect'
|
4307 | }),
|
4308 | _useUncontrolled$as = _useUncontrolled.as,
|
4309 | Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
|
4310 | bsPrefix = _useUncontrolled.bsPrefix,
|
4311 | slide = _useUncontrolled.slide,
|
4312 | fade = _useUncontrolled.fade,
|
4313 | controls = _useUncontrolled.controls,
|
4314 | indicators = _useUncontrolled.indicators,
|
4315 | activeIndex = _useUncontrolled.activeIndex,
|
4316 | onSelect = _useUncontrolled.onSelect,
|
4317 | onSlide = _useUncontrolled.onSlide,
|
4318 | onSlid = _useUncontrolled.onSlid,
|
4319 | interval = _useUncontrolled.interval,
|
4320 | keyboard = _useUncontrolled.keyboard,
|
4321 | onKeyDown = _useUncontrolled.onKeyDown,
|
4322 | pause = _useUncontrolled.pause,
|
4323 | onMouseOver = _useUncontrolled.onMouseOver,
|
4324 | onMouseOut = _useUncontrolled.onMouseOut,
|
4325 | wrap = _useUncontrolled.wrap,
|
4326 | touch = _useUncontrolled.touch,
|
4327 | onTouchStart = _useUncontrolled.onTouchStart,
|
4328 | onTouchMove = _useUncontrolled.onTouchMove,
|
4329 | onTouchEnd = _useUncontrolled.onTouchEnd,
|
4330 | prevIcon = _useUncontrolled.prevIcon,
|
4331 | prevLabel = _useUncontrolled.prevLabel,
|
4332 | nextIcon = _useUncontrolled.nextIcon,
|
4333 | nextLabel = _useUncontrolled.nextLabel,
|
4334 | className = _useUncontrolled.className,
|
4335 | children = _useUncontrolled.children,
|
4336 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Carousel_excluded);
|
4337 |
|
4338 | var prefix = useBootstrapPrefix(bsPrefix, 'carousel');
|
4339 | var nextDirectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
4340 |
|
4341 | var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('next'),
|
4342 | direction = _useState[0],
|
4343 | setDirection = _useState[1];
|
4344 |
|
4345 | var _useState2 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
4346 | paused = _useState2[0],
|
4347 | setPaused = _useState2[1];
|
4348 |
|
4349 | var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
4350 | isSliding = _useState3[0],
|
4351 | setIsSliding = _useState3[1];
|
4352 |
|
4353 | var _useState4 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(activeIndex || 0),
|
4354 | renderedActiveIndex = _useState4[0],
|
4355 | setRenderedActiveIndex = _useState4[1];
|
4356 |
|
4357 | if (!isSliding && activeIndex !== renderedActiveIndex) {
|
4358 | if (nextDirectionRef.current) {
|
4359 | setDirection(nextDirectionRef.current);
|
4360 | } else {
|
4361 | setDirection((activeIndex || 0) > renderedActiveIndex ? 'next' : 'prev');
|
4362 | }
|
4363 |
|
4364 | if (slide) {
|
4365 | setIsSliding(true);
|
4366 | }
|
4367 |
|
4368 | setRenderedActiveIndex(activeIndex || 0);
|
4369 | }
|
4370 |
|
4371 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
4372 | if (nextDirectionRef.current) {
|
4373 | nextDirectionRef.current = null;
|
4374 | }
|
4375 | });
|
4376 | var numChildren = 0;
|
4377 | var activeChildInterval;
|
4378 |
|
4379 |
|
4380 | forEach(children, function (child, index) {
|
4381 | ++numChildren;
|
4382 |
|
4383 | if (index === activeIndex) {
|
4384 | activeChildInterval = child.props.interval;
|
4385 | }
|
4386 | });
|
4387 | var activeChildIntervalRef = esm_useCommittedRef(activeChildInterval);
|
4388 | var prev = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
|
4389 | if (isSliding) {
|
4390 | return;
|
4391 | }
|
4392 |
|
4393 | var nextActiveIndex = renderedActiveIndex - 1;
|
4394 |
|
4395 | if (nextActiveIndex < 0) {
|
4396 | if (!wrap) {
|
4397 | return;
|
4398 | }
|
4399 |
|
4400 | nextActiveIndex = numChildren - 1;
|
4401 | }
|
4402 |
|
4403 | nextDirectionRef.current = 'prev';
|
4404 |
|
4405 | if (onSelect) {
|
4406 | onSelect(nextActiveIndex, event);
|
4407 | }
|
4408 | }, [isSliding, renderedActiveIndex, onSelect, wrap, numChildren]);
|
4409 |
|
4410 | var next = useEventCallback(function (event) {
|
4411 | if (isSliding) {
|
4412 | return;
|
4413 | }
|
4414 |
|
4415 | var nextActiveIndex = renderedActiveIndex + 1;
|
4416 |
|
4417 | if (nextActiveIndex >= numChildren) {
|
4418 | if (!wrap) {
|
4419 | return;
|
4420 | }
|
4421 |
|
4422 | nextActiveIndex = 0;
|
4423 | }
|
4424 |
|
4425 | nextDirectionRef.current = 'next';
|
4426 |
|
4427 | if (onSelect) {
|
4428 | onSelect(nextActiveIndex, event);
|
4429 | }
|
4430 | });
|
4431 | var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
4432 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
|
4433 | return {
|
4434 | element: elementRef.current,
|
4435 | prev: prev,
|
4436 | next: next
|
4437 | };
|
4438 | });
|
4439 |
|
4440 | var nextWhenVisible = useEventCallback(function () {
|
4441 | if (!document.hidden && isVisible(elementRef.current)) {
|
4442 | next();
|
4443 | }
|
4444 | });
|
4445 | var slideDirection = direction === 'next' ? 'left' : 'right';
|
4446 | esm_useUpdateEffect(function () {
|
4447 | if (slide) {
|
4448 |
|
4449 | return;
|
4450 | }
|
4451 |
|
4452 | if (onSlide) {
|
4453 | onSlide(renderedActiveIndex, slideDirection);
|
4454 | }
|
4455 |
|
4456 | if (onSlid) {
|
4457 | onSlid(renderedActiveIndex, slideDirection);
|
4458 | }
|
4459 | }, [renderedActiveIndex]);
|
4460 | var orderClassName = prefix + "-item-" + direction;
|
4461 | var directionalClassName = prefix + "-item-" + slideDirection;
|
4462 | var handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (node) {
|
4463 | triggerBrowserReflow(node);
|
4464 |
|
4465 | if (onSlide) {
|
4466 | onSlide(renderedActiveIndex, slideDirection);
|
4467 | }
|
4468 | }, [onSlide, renderedActiveIndex, slideDirection]);
|
4469 | var handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
4470 | setIsSliding(false);
|
4471 |
|
4472 | if (onSlid) {
|
4473 | onSlid(renderedActiveIndex, slideDirection);
|
4474 | }
|
4475 | }, [onSlid, renderedActiveIndex, slideDirection]);
|
4476 | var handleKeyDown = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
|
4477 | if (keyboard && !/input|textarea/i.test(event.target.tagName)) {
|
4478 | switch (event.key) {
|
4479 | case 'ArrowLeft':
|
4480 | event.preventDefault();
|
4481 | prev(event);
|
4482 | return;
|
4483 |
|
4484 | case 'ArrowRight':
|
4485 | event.preventDefault();
|
4486 | next(event);
|
4487 | return;
|
4488 |
|
4489 | default:
|
4490 | }
|
4491 | }
|
4492 |
|
4493 | if (onKeyDown) {
|
4494 | onKeyDown(event);
|
4495 | }
|
4496 | }, [keyboard, onKeyDown, prev, next]);
|
4497 | var handleMouseOver = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
|
4498 | if (pause === 'hover') {
|
4499 | setPaused(true);
|
4500 | }
|
4501 |
|
4502 | if (onMouseOver) {
|
4503 | onMouseOver(event);
|
4504 | }
|
4505 | }, [pause, onMouseOver]);
|
4506 | var handleMouseOut = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
|
4507 | setPaused(false);
|
4508 |
|
4509 | if (onMouseOut) {
|
4510 | onMouseOut(event);
|
4511 | }
|
4512 | }, [onMouseOut]);
|
4513 | var touchStartXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
|
4514 | var touchDeltaXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
|
4515 | var touchUnpauseTimeout = useTimeout();
|
4516 | var handleTouchStart = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
|
4517 | touchStartXRef.current = event.touches[0].clientX;
|
4518 | touchDeltaXRef.current = 0;
|
4519 |
|
4520 | if (pause === 'hover') {
|
4521 | setPaused(true);
|
4522 | }
|
4523 |
|
4524 | if (onTouchStart) {
|
4525 | onTouchStart(event);
|
4526 | }
|
4527 | }, [pause, onTouchStart]);
|
4528 | var handleTouchMove = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
|
4529 | if (event.touches && event.touches.length > 1) {
|
4530 | touchDeltaXRef.current = 0;
|
4531 | } else {
|
4532 | touchDeltaXRef.current = event.touches[0].clientX - touchStartXRef.current;
|
4533 | }
|
4534 |
|
4535 | if (onTouchMove) {
|
4536 | onTouchMove(event);
|
4537 | }
|
4538 | }, [onTouchMove]);
|
4539 | var handleTouchEnd = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
|
4540 | if (touch) {
|
4541 | var touchDeltaX = touchDeltaXRef.current;
|
4542 |
|
4543 | if (Math.abs(touchDeltaX) > SWIPE_THRESHOLD) {
|
4544 | if (touchDeltaX > 0) {
|
4545 | prev(event);
|
4546 | } else {
|
4547 | next(event);
|
4548 | }
|
4549 | }
|
4550 | }
|
4551 |
|
4552 | if (pause === 'hover') {
|
4553 | touchUnpauseTimeout.set(function () {
|
4554 | setPaused(false);
|
4555 | }, interval || undefined);
|
4556 | }
|
4557 |
|
4558 | if (onTouchEnd) {
|
4559 | onTouchEnd(event);
|
4560 | }
|
4561 | }, [touch, pause, prev, next, touchUnpauseTimeout, interval, onTouchEnd]);
|
4562 | var shouldPlay = interval != null && !paused && !isSliding;
|
4563 | var intervalHandleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
4564 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
4565 | var _ref, _activeChildIntervalR;
|
4566 |
|
4567 | if (!shouldPlay) {
|
4568 | return undefined;
|
4569 | }
|
4570 |
|
4571 | intervalHandleRef.current = window.setInterval(document.visibilityState ? nextWhenVisible : next, (_ref = (_activeChildIntervalR = activeChildIntervalRef.current) != null ? _activeChildIntervalR : interval) != null ? _ref : undefined);
|
4572 | return function () {
|
4573 | if (intervalHandleRef.current !== null) {
|
4574 | clearInterval(intervalHandleRef.current);
|
4575 | }
|
4576 | };
|
4577 | }, [shouldPlay, next, activeChildIntervalRef, interval, nextWhenVisible]);
|
4578 | var indicatorOnClicks = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
4579 | return indicators && Array.from({
|
4580 | length: numChildren
|
4581 | }, function (_, index) {
|
4582 | return function (event) {
|
4583 | if (onSelect) {
|
4584 | onSelect(index, event);
|
4585 | }
|
4586 | };
|
4587 | });
|
4588 | }, [indicators, numChildren, onSelect]);
|
4589 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
4590 | ref: elementRef
|
4591 | }, props, {
|
4592 | onKeyDown: handleKeyDown,
|
4593 | onMouseOver: handleMouseOver,
|
4594 | onMouseOut: handleMouseOut,
|
4595 | onTouchStart: handleTouchStart,
|
4596 | onTouchMove: handleTouchMove,
|
4597 | onTouchEnd: handleTouchEnd,
|
4598 | className: classnames_default()(className, prefix, slide && 'slide', fade && prefix + "-fade"),
|
4599 | __self: this,
|
4600 | __source: {
|
4601 | fileName: Carousel_jsxFileName,
|
4602 | lineNumber: 533,
|
4603 | columnNumber: 5
|
4604 | }
|
4605 | }), indicators && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ol", {
|
4606 | className: prefix + "-indicators",
|
4607 | __self: this,
|
4608 | __source: {
|
4609 | fileName: Carousel_jsxFileName,
|
4610 | lineNumber: 550,
|
4611 | columnNumber: 9
|
4612 | }
|
4613 | }, map(children, function (_child, index) {
|
4614 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
|
4615 | key: index,
|
4616 | className: index === renderedActiveIndex ? 'active' : undefined,
|
4617 | onClick: indicatorOnClicks ? indicatorOnClicks[index] : undefined,
|
4618 | __self: _this,
|
4619 | __source: {
|
4620 | fileName: Carousel_jsxFileName,
|
4621 | lineNumber: 552,
|
4622 | columnNumber: 13
|
4623 | }
|
4624 | });
|
4625 | })), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
4626 | className: prefix + "-inner",
|
4627 | __self: this,
|
4628 | __source: {
|
4629 | fileName: Carousel_jsxFileName,
|
4630 | lineNumber: 561,
|
4631 | columnNumber: 7
|
4632 | }
|
4633 | }, map(children, function (child, index) {
|
4634 | var isActive = index === renderedActiveIndex;
|
4635 | return slide ? external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Transition, {
|
4636 | in: isActive,
|
4637 | onEnter: isActive ? handleEnter : undefined,
|
4638 | onEntered: isActive ? handleEntered : undefined,
|
4639 | addEndListener: transitionEndListener,
|
4640 | __self: _this,
|
4641 | __source: {
|
4642 | fileName: Carousel_jsxFileName,
|
4643 | lineNumber: 566,
|
4644 | columnNumber: 13
|
4645 | }
|
4646 | }, function (status) {
|
4647 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
|
4648 | className: classnames_default()(child.props.className, isActive && status !== 'entered' && orderClassName, (status === 'entered' || status === 'exiting') && 'active', (status === 'entering' || status === 'exiting') && directionalClassName)
|
4649 | });
|
4650 | }) : external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
|
4651 | className: classnames_default()(child.props.className, isActive && 'active')
|
4652 | });
|
4653 | })), controls && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, (wrap || activeIndex !== 0) && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, {
|
4654 | className: prefix + "-control-prev",
|
4655 | onClick: prev,
|
4656 | __self: this,
|
4657 | __source: {
|
4658 | fileName: Carousel_jsxFileName,
|
4659 | lineNumber: 598,
|
4660 | columnNumber: 13
|
4661 | }
|
4662 | }, prevIcon, prevLabel && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
4663 | className: "sr-only",
|
4664 | __self: this,
|
4665 | __source: {
|
4666 | fileName: Carousel_jsxFileName,
|
4667 | lineNumber: 600,
|
4668 | columnNumber: 29
|
4669 | }
|
4670 | }, prevLabel)), (wrap || activeIndex !== numChildren - 1) && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SafeAnchor, {
|
4671 | className: prefix + "-control-next",
|
4672 | onClick: next,
|
4673 | __self: this,
|
4674 | __source: {
|
4675 | fileName: Carousel_jsxFileName,
|
4676 | lineNumber: 604,
|
4677 | columnNumber: 13
|
4678 | }
|
4679 | }, nextIcon, nextLabel && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
4680 | className: "sr-only",
|
4681 | __self: this,
|
4682 | __source: {
|
4683 | fileName: Carousel_jsxFileName,
|
4684 | lineNumber: 606,
|
4685 | columnNumber: 29
|
4686 | }
|
4687 | }, nextLabel))));
|
4688 | }
|
4689 |
|
4690 | var Carousel = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(CarouselFunc);
|
4691 | Carousel.displayName = 'Carousel';
|
4692 | Carousel.propTypes = Carousel_propTypes;
|
4693 | Carousel.defaultProps = Carousel_defaultProps;
|
4694 | Carousel.Caption = CarouselCaption;
|
4695 | Carousel.Item = src_CarouselItem;
|
4696 | const src_Carousel = (Carousel);
|
4697 | ;
|
4698 |
|
4699 |
|
4700 | var Col_excluded = ["bsPrefix", "className", "as"];
|
4701 |
|
4702 | var Col_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Col.tsx",
|
4703 | Col_this = undefined;
|
4704 |
|
4705 |
|
4706 |
|
4707 |
|
4708 |
|
4709 | var DEVICE_SIZES = ['xl', 'lg', 'md', 'sm', 'xs'];
|
4710 | var colSize = prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).number, (prop_types_default()).string, prop_types_default().oneOf(['auto'])]);
|
4711 | var stringOrNumber = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]);
|
4712 | var column = prop_types_default().oneOfType([colSize, prop_types_default().shape({
|
4713 | size: colSize,
|
4714 | order: stringOrNumber,
|
4715 | offset: stringOrNumber
|
4716 | })]);
|
4717 | var Col_propTypes = {
|
4718 | |
4719 |
|
4720 |
|
4721 | bsPrefix: (prop_types_default()).string,
|
4722 | as: (prop_types_default()).elementType,
|
4723 |
|
4724 | |
4725 |
|
4726 |
|
4727 |
|
4728 |
|
4729 | xs: column,
|
4730 |
|
4731 | |
4732 |
|
4733 |
|
4734 |
|
4735 |
|
4736 | sm: column,
|
4737 |
|
4738 | |
4739 |
|
4740 |
|
4741 |
|
4742 |
|
4743 | md: column,
|
4744 |
|
4745 | |
4746 |
|
4747 |
|
4748 |
|
4749 |
|
4750 | lg: column,
|
4751 |
|
4752 | |
4753 |
|
4754 |
|
4755 |
|
4756 |
|
4757 | xl: column
|
4758 | };
|
4759 | var Col = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(
|
4760 | function (_ref, ref) {
|
4761 | var bsPrefix = _ref.bsPrefix,
|
4762 | className = _ref.className,
|
4763 | _ref$as = _ref.as,
|
4764 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
4765 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Col_excluded);
|
4766 |
|
4767 | var prefix = useBootstrapPrefix(bsPrefix, 'col');
|
4768 | var spans = [];
|
4769 | var classes = [];
|
4770 | DEVICE_SIZES.forEach(function (brkPoint) {
|
4771 | var propValue = props[brkPoint];
|
4772 | delete props[brkPoint];
|
4773 | var span;
|
4774 | var offset;
|
4775 | var order;
|
4776 |
|
4777 | if (typeof propValue === 'object' && propValue != null) {
|
4778 | var _propValue$span = propValue.span;
|
4779 | span = _propValue$span === void 0 ? true : _propValue$span;
|
4780 | offset = propValue.offset;
|
4781 | order = propValue.order;
|
4782 | } else {
|
4783 | span = propValue;
|
4784 | }
|
4785 |
|
4786 | var infix = brkPoint !== 'xs' ? "-" + brkPoint : '';
|
4787 | if (span) spans.push(span === true ? "" + prefix + infix : "" + prefix + infix + "-" + span);
|
4788 | if (order != null) classes.push("order" + infix + "-" + order);
|
4789 | if (offset != null) classes.push("offset" + infix + "-" + offset);
|
4790 | });
|
4791 |
|
4792 | if (!spans.length) {
|
4793 | spans.push(prefix);
|
4794 | }
|
4795 |
|
4796 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
4797 | ref: ref,
|
4798 | className: classnames_default().apply(void 0, [className].concat(spans, classes)),
|
4799 | __self: Col_this,
|
4800 | __source: {
|
4801 | fileName: Col_jsxFileName,
|
4802 | lineNumber: 149,
|
4803 | columnNumber: 7
|
4804 | }
|
4805 | }));
|
4806 | });
|
4807 | Col.displayName = 'Col';
|
4808 | Col.propTypes = Col_propTypes;
|
4809 | const src_Col = (Col);
|
4810 | ;
|
4811 | var matchesImpl;
|
4812 |
|
4813 |
|
4814 |
|
4815 |
|
4816 |
|
4817 |
|
4818 |
|
4819 | function matches(node, selector) {
|
4820 | if (!matchesImpl) {
|
4821 | var body = document.body;
|
4822 | var nativeMatch = body.matches || body.matchesSelector || body.webkitMatchesSelector || body.mozMatchesSelector || body.msMatchesSelector;
|
4823 |
|
4824 | matchesImpl = function matchesImpl(n, s) {
|
4825 | return nativeMatch.call(n, s);
|
4826 | };
|
4827 | }
|
4828 |
|
4829 | return matchesImpl(node, selector);
|
4830 | }
|
4831 | ;
|
4832 | var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
|
4833 |
|
4834 |
|
4835 |
|
4836 |
|
4837 |
|
4838 |
|
4839 |
|
4840 | function qsa(element, selector) {
|
4841 | return toArray(element.querySelectorAll(selector));
|
4842 | }
|
4843 | ;
|
4844 |
|
4845 |
|
4846 |
|
4847 |
|
4848 |
|
4849 |
|
4850 |
|
4851 |
|
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 |
|
4857 |
|
4858 |
|
4859 |
|
4860 |
|
4861 |
|
4862 |
|
4863 | function usePrevious(value) {
|
4864 | var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
4865 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
4866 | ref.current = value;
|
4867 | });
|
4868 | return ref.current;
|
4869 | }
|
4870 | ;
|
4871 |
|
4872 |
|
4873 |
|
4874 |
|
4875 |
|
4876 |
|
4877 |
|
4878 |
|
4879 |
|
4880 |
|
4881 |
|
4882 |
|
4883 |
|
4884 |
|
4885 |
|
4886 |
|
4887 |
|
4888 |
|
4889 | function useForceUpdate() {
|
4890 |
|
4891 |
|
4892 | var _useReducer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(function (state) {
|
4893 | return !state;
|
4894 | }, false),
|
4895 | dispatch = _useReducer[1];
|
4896 |
|
4897 | return dispatch;
|
4898 | }
|
4899 | ;
|
4900 |
|
4901 |
|
4902 |
|
4903 |
|
4904 |
|
4905 |
|
4906 |
|
4907 |
|
4908 |
|
4909 |
|
4910 |
|
4911 |
|
4912 | function useEventListener(eventTarget, event, listener, capture) {
|
4913 | if (capture === void 0) {
|
4914 | capture = false;
|
4915 | }
|
4916 |
|
4917 | var handler = useEventCallback(listener);
|
4918 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
4919 | var target = typeof eventTarget === 'function' ? eventTarget() : eventTarget;
|
4920 | target.addEventListener(event, handler, capture);
|
4921 | return function () {
|
4922 | return target.removeEventListener(event, handler, capture);
|
4923 | };
|
4924 | }, [eventTarget]);
|
4925 | }
|
4926 | ;
|
4927 |
|
4928 |
|
4929 |
|
4930 |
|
4931 |
|
4932 |
|
4933 |
|
4934 |
|
4935 |
|
4936 |
|
4937 |
|
4938 |
|
4939 |
|
4940 |
|
4941 |
|
4942 |
|
4943 |
|
4944 | function useGlobalListener(event, handler, capture) {
|
4945 | if (capture === void 0) {
|
4946 | capture = false;
|
4947 | }
|
4948 |
|
4949 | var documentTarget = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
4950 | return document;
|
4951 | }, []);
|
4952 | return useEventListener(documentTarget, event, handler, capture);
|
4953 | }
|
4954 | ;
|
4955 |
|
4956 | var DropdownContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
|
4957 | const esm_DropdownContext = (DropdownContext);
|
4958 | ;
|
4959 |
|
4960 |
|
4961 |
|
4962 |
|
4963 |
|
4964 |
|
4965 |
|
4966 |
|
4967 |
|
4968 |
|
4969 |
|
4970 |
|
4971 |
|
4972 |
|
4973 |
|
4974 |
|
4975 |
|
4976 |
|
4977 |
|
4978 |
|
4979 |
|
4980 |
|
4981 |
|
4982 |
|
4983 |
|
4984 |
|
4985 | function useCallbackRef() {
|
4986 | return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
|
4987 | }
|
4988 | ;
|
4989 |
|
4990 |
|
4991 |
|
4992 | function useSafeState(state) {
|
4993 | var isMounted = useMounted();
|
4994 | return [state[0], (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (nextState) {
|
4995 | if (!isMounted()) return;
|
4996 | return state[1](nextState);
|
4997 | }, [isMounted, state[1]])];
|
4998 | }
|
4999 |
|
5000 | const esm_useSafeState = (useSafeState);
|
5001 | ;
|
5002 |
|
5003 | function getBasePlacement(placement) {
|
5004 | return placement.split('-')[0];
|
5005 | }
|
5006 | ;
|
5007 | function getBoundingClientRect(element) {
|
5008 | var rect = element.getBoundingClientRect();
|
5009 | return {
|
5010 | width: rect.width,
|
5011 | height: rect.height,
|
5012 | top: rect.top,
|
5013 | right: rect.right,
|
5014 | bottom: rect.bottom,
|
5015 | left: rect.left,
|
5016 | x: rect.left,
|
5017 | y: rect.top
|
5018 | };
|
5019 | }
|
5020 | ;
|
5021 |
|
5022 |
|
5023 |
|
5024 | function getLayoutRect(element) {
|
5025 | var clientRect = getBoundingClientRect(element);
|
5026 |
|
5027 |
|
5028 | var width = element.offsetWidth;
|
5029 | var height = element.offsetHeight;
|
5030 |
|
5031 | if (Math.abs(clientRect.width - width) <= 1) {
|
5032 | width = clientRect.width;
|
5033 | }
|
5034 |
|
5035 | if (Math.abs(clientRect.height - height) <= 1) {
|
5036 | height = clientRect.height;
|
5037 | }
|
5038 |
|
5039 | return {
|
5040 | x: element.offsetLeft,
|
5041 | y: element.offsetTop,
|
5042 | width: width,
|
5043 | height: height
|
5044 | };
|
5045 | }
|
5046 | ;
|
5047 | function getWindow(node) {
|
5048 | if (node == null) {
|
5049 | return window;
|
5050 | }
|
5051 |
|
5052 | if (node.toString() !== '[object Window]') {
|
5053 | var ownerDocument = node.ownerDocument;
|
5054 | return ownerDocument ? ownerDocument.defaultView || window : window;
|
5055 | }
|
5056 |
|
5057 | return node;
|
5058 | }
|
5059 | ;
|
5060 |
|
5061 |
|
5062 | function isElement(node) {
|
5063 | var OwnElement = getWindow(node).Element;
|
5064 | return node instanceof OwnElement || node instanceof Element;
|
5065 | }
|
5066 |
|
5067 | function isHTMLElement(node) {
|
5068 | var OwnElement = getWindow(node).HTMLElement;
|
5069 | return node instanceof OwnElement || node instanceof HTMLElement;
|
5070 | }
|
5071 |
|
5072 | function isShadowRoot(node) {
|
5073 |
|
5074 | if (typeof ShadowRoot === 'undefined') {
|
5075 | return false;
|
5076 | }
|
5077 |
|
5078 | var OwnElement = getWindow(node).ShadowRoot;
|
5079 | return node instanceof OwnElement || node instanceof ShadowRoot;
|
5080 | }
|
5081 |
|
5082 |
|
5083 | ;
|
5084 |
|
5085 | function contains(parent, child) {
|
5086 | var rootNode = child.getRootNode && child.getRootNode();
|
5087 |
|
5088 | if (parent.contains(child)) {
|
5089 | return true;
|
5090 | }
|
5091 | else if (rootNode && isShadowRoot(rootNode)) {
|
5092 | var next = child;
|
5093 |
|
5094 | do {
|
5095 | if (next && parent.isSameNode(next)) {
|
5096 | return true;
|
5097 | }
|
5098 |
|
5099 |
|
5100 | next = next.parentNode || next.host;
|
5101 | } while (next);
|
5102 | }
|
5103 |
|
5104 |
|
5105 | return false;
|
5106 | }
|
5107 | ;
|
5108 | function getNodeName(element) {
|
5109 | return element ? (element.nodeName || '').toLowerCase() : null;
|
5110 | }
|
5111 | ;
|
5112 |
|
5113 | function dom_utils_getComputedStyle_getComputedStyle(element) {
|
5114 | return getWindow(element).getComputedStyle(element);
|
5115 | }
|
5116 | ;
|
5117 |
|
5118 | function isTableElement(element) {
|
5119 | return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
|
5120 | }
|
5121 | ;
|
5122 |
|
5123 | function getDocumentElement(element) {
|
5124 |
|
5125 | return ((isElement(element) ? element.ownerDocument :
|
5126 | element.document) || window.document).documentElement;
|
5127 | }
|
5128 | ;
|
5129 |
|
5130 |
|
5131 |
|
5132 | function getParentNode(element) {
|
5133 | if (getNodeName(element) === 'html') {
|
5134 | return element;
|
5135 | }
|
5136 |
|
5137 | return (
|
5138 |
|
5139 |
|
5140 | element.assignedSlot ||
|
5141 | element.parentNode || (
|
5142 | isShadowRoot(element) ? element.host : null) ||
|
5143 |
|
5144 | getDocumentElement(element)
|
5145 |
|
5146 | );
|
5147 | }
|
5148 | ;
|
5149 |
|
5150 |
|
5151 |
|
5152 |
|
5153 |
|
5154 |
|
5155 |
|
5156 | function getTrueOffsetParent(element) {
|
5157 | if (!isHTMLElement(element) ||
|
5158 | dom_utils_getComputedStyle_getComputedStyle(element).position === 'fixed') {
|
5159 | return null;
|
5160 | }
|
5161 |
|
5162 | return element.offsetParent;
|
5163 | }
|
5164 |
|
5165 |
|
5166 |
|
5167 | function getContainingBlock(element) {
|
5168 | var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
|
5169 | var isIE = navigator.userAgent.indexOf('Trident') !== -1;
|
5170 |
|
5171 | if (isIE && isHTMLElement(element)) {
|
5172 |
|
5173 | var elementCss = dom_utils_getComputedStyle_getComputedStyle(element);
|
5174 |
|
5175 | if (elementCss.position === 'fixed') {
|
5176 | return null;
|
5177 | }
|
5178 | }
|
5179 |
|
5180 | var currentNode = getParentNode(element);
|
5181 |
|
5182 | while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
5183 | var css = dom_utils_getComputedStyle_getComputedStyle(currentNode);
|
5184 |
|
5185 |
|
5186 |
|
5187 | if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
|
5188 | return currentNode;
|
5189 | } else {
|
5190 | currentNode = currentNode.parentNode;
|
5191 | }
|
5192 | }
|
5193 |
|
5194 | return null;
|
5195 | }
|
5196 |
|
5197 |
|
5198 |
|
5199 | function getOffsetParent(element) {
|
5200 | var window = getWindow(element);
|
5201 | var offsetParent = getTrueOffsetParent(element);
|
5202 |
|
5203 | while (offsetParent && isTableElement(offsetParent) && dom_utils_getComputedStyle_getComputedStyle(offsetParent).position === 'static') {
|
5204 | offsetParent = getTrueOffsetParent(offsetParent);
|
5205 | }
|
5206 |
|
5207 | if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && dom_utils_getComputedStyle_getComputedStyle(offsetParent).position === 'static')) {
|
5208 | return window;
|
5209 | }
|
5210 |
|
5211 | return offsetParent || getContainingBlock(element) || window;
|
5212 | }
|
5213 | ;
|
5214 | function getMainAxisFromPlacement(placement) {
|
5215 | return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
5216 | }
|
5217 | ;
|
5218 | var math_max = Math.max;
|
5219 | var math_min = Math.min;
|
5220 | var round = Math.round;
|
5221 | ;
|
5222 |
|
5223 | function within(min, value, max) {
|
5224 | return math_max(min, math_min(value, max));
|
5225 | }
|
5226 | ;
|
5227 | function getFreshSideObject() {
|
5228 | return {
|
5229 | top: 0,
|
5230 | right: 0,
|
5231 | bottom: 0,
|
5232 | left: 0
|
5233 | };
|
5234 | }
|
5235 | ;
|
5236 |
|
5237 | function mergePaddingObject(paddingObject) {
|
5238 | return Object.assign({}, getFreshSideObject(), paddingObject);
|
5239 | }
|
5240 | ;
|
5241 | function expandToHashMap(value, keys) {
|
5242 | return keys.reduce(function (hashMap, key) {
|
5243 | hashMap[key] = value;
|
5244 | return hashMap;
|
5245 | }, {});
|
5246 | }
|
5247 | ;
|
5248 | var enums_top = 'top';
|
5249 | var bottom = 'bottom';
|
5250 | var right = 'right';
|
5251 | var left = 'left';
|
5252 | var auto = 'auto';
|
5253 | var basePlacements = [enums_top, bottom, right, left];
|
5254 | var start = 'start';
|
5255 | var end = 'end';
|
5256 | var clippingParents = 'clippingParents';
|
5257 | var viewport = 'viewport';
|
5258 | var popper = 'popper';
|
5259 | var reference = 'reference';
|
5260 | var variationPlacements = basePlacements.reduce(function (acc, placement) {
|
5261 | return acc.concat([placement + "-" + start, placement + "-" + end]);
|
5262 | }, []);
|
5263 | var enums_placements = [].concat(basePlacements, [auto]).reduce(function (acc, placement) {
|
5264 | return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
|
5265 | }, []);
|
5266 |
|
5267 | var beforeRead = 'beforeRead';
|
5268 | var read = 'read';
|
5269 | var afterRead = 'afterRead';
|
5270 |
|
5271 | var beforeMain = 'beforeMain';
|
5272 | var main = 'main';
|
5273 | var afterMain = 'afterMain';
|
5274 |
|
5275 | var beforeWrite = 'beforeWrite';
|
5276 | var write = 'write';
|
5277 | var afterWrite = 'afterWrite';
|
5278 | var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
5279 | ;
|
5280 |
|
5281 |
|
5282 |
|
5283 |
|
5284 |
|
5285 |
|
5286 |
|
5287 |
|
5288 |
|
5289 |
|
5290 |
|
5291 | var toPaddingObject = function toPaddingObject(padding, state) {
|
5292 | padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
|
5293 | placement: state.placement
|
5294 | })) : padding;
|
5295 | return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
5296 | };
|
5297 |
|
5298 | function arrow(_ref) {
|
5299 | var _state$modifiersData$;
|
5300 |
|
5301 | var state = _ref.state,
|
5302 | name = _ref.name,
|
5303 | options = _ref.options;
|
5304 | var arrowElement = state.elements.arrow;
|
5305 | var popperOffsets = state.modifiersData.popperOffsets;
|
5306 | var basePlacement = getBasePlacement(state.placement);
|
5307 | var axis = getMainAxisFromPlacement(basePlacement);
|
5308 | var isVertical = [left, right].indexOf(basePlacement) >= 0;
|
5309 | var len = isVertical ? 'height' : 'width';
|
5310 |
|
5311 | if (!arrowElement || !popperOffsets) {
|
5312 | return;
|
5313 | }
|
5314 |
|
5315 | var paddingObject = toPaddingObject(options.padding, state);
|
5316 | var arrowRect = getLayoutRect(arrowElement);
|
5317 | var minProp = axis === 'y' ? enums_top : left;
|
5318 | var maxProp = axis === 'y' ? bottom : right;
|
5319 | var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
|
5320 | var startDiff = popperOffsets[axis] - state.rects.reference[axis];
|
5321 | var arrowOffsetParent = getOffsetParent(arrowElement);
|
5322 | var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
|
5323 | var centerToReference = endDiff / 2 - startDiff / 2;
|
5324 |
|
5325 |
|
5326 | var min = paddingObject[minProp];
|
5327 | var max = clientSize - arrowRect[len] - paddingObject[maxProp];
|
5328 | var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
|
5329 | var offset = within(min, center, max);
|
5330 |
|
5331 | var axisProp = axis;
|
5332 | state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
|
5333 | }
|
5334 |
|
5335 | function effect(_ref2) {
|
5336 | var state = _ref2.state,
|
5337 | options = _ref2.options;
|
5338 | var _options$element = options.element,
|
5339 | arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
|
5340 |
|
5341 | if (arrowElement == null) {
|
5342 | return;
|
5343 | }
|
5344 |
|
5345 |
|
5346 | if (typeof arrowElement === 'string') {
|
5347 | arrowElement = state.elements.popper.querySelector(arrowElement);
|
5348 |
|
5349 | if (!arrowElement) {
|
5350 | return;
|
5351 | }
|
5352 | }
|
5353 |
|
5354 | if (false) {}
|
5355 |
|
5356 | if (!contains(state.elements.popper, arrowElement)) {
|
5357 | if (false) {}
|
5358 |
|
5359 | return;
|
5360 | }
|
5361 |
|
5362 | state.elements.arrow = arrowElement;
|
5363 | }
|
5364 |
|
5365 |
|
5366 | const modifiers_arrow = ({
|
5367 | name: 'arrow',
|
5368 | enabled: true,
|
5369 | phase: 'main',
|
5370 | fn: arrow,
|
5371 | effect: effect,
|
5372 | requires: ['popperOffsets'],
|
5373 | requiresIfExists: ['preventOverflow']
|
5374 | });
|
5375 | ;
|
5376 |
|
5377 |
|
5378 |
|
5379 |
|
5380 |
|
5381 |
|
5382 |
|
5383 |
|
5384 | var unsetSides = {
|
5385 | top: 'auto',
|
5386 | right: 'auto',
|
5387 | bottom: 'auto',
|
5388 | left: 'auto'
|
5389 | };
|
5390 |
|
5391 |
|
5392 |
|
5393 | function roundOffsetsByDPR(_ref) {
|
5394 | var x = _ref.x,
|
5395 | y = _ref.y;
|
5396 | var win = window;
|
5397 | var dpr = win.devicePixelRatio || 1;
|
5398 | return {
|
5399 | x: round(round(x * dpr) / dpr) || 0,
|
5400 | y: round(round(y * dpr) / dpr) || 0
|
5401 | };
|
5402 | }
|
5403 |
|
5404 | function mapToStyles(_ref2) {
|
5405 | var _Object$assign2;
|
5406 |
|
5407 | var popper = _ref2.popper,
|
5408 | popperRect = _ref2.popperRect,
|
5409 | placement = _ref2.placement,
|
5410 | offsets = _ref2.offsets,
|
5411 | position = _ref2.position,
|
5412 | gpuAcceleration = _ref2.gpuAcceleration,
|
5413 | adaptive = _ref2.adaptive,
|
5414 | roundOffsets = _ref2.roundOffsets;
|
5415 |
|
5416 | var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
|
5417 | _ref3$x = _ref3.x,
|
5418 | x = _ref3$x === void 0 ? 0 : _ref3$x,
|
5419 | _ref3$y = _ref3.y,
|
5420 | y = _ref3$y === void 0 ? 0 : _ref3$y;
|
5421 |
|
5422 | var hasX = offsets.hasOwnProperty('x');
|
5423 | var hasY = offsets.hasOwnProperty('y');
|
5424 | var sideX = left;
|
5425 | var sideY = enums_top;
|
5426 | var win = window;
|
5427 |
|
5428 | if (adaptive) {
|
5429 | var offsetParent = getOffsetParent(popper);
|
5430 | var heightProp = 'clientHeight';
|
5431 | var widthProp = 'clientWidth';
|
5432 |
|
5433 | if (offsetParent === getWindow(popper)) {
|
5434 | offsetParent = getDocumentElement(popper);
|
5435 |
|
5436 | if (dom_utils_getComputedStyle_getComputedStyle(offsetParent).position !== 'static') {
|
5437 | heightProp = 'scrollHeight';
|
5438 | widthProp = 'scrollWidth';
|
5439 | }
|
5440 | }
|
5441 |
|
5442 |
|
5443 | offsetParent = offsetParent;
|
5444 |
|
5445 | if (placement === enums_top) {
|
5446 | sideY = bottom;
|
5447 |
|
5448 | y -= offsetParent[heightProp] - popperRect.height;
|
5449 | y *= gpuAcceleration ? 1 : -1;
|
5450 | }
|
5451 |
|
5452 | if (placement === left) {
|
5453 | sideX = right;
|
5454 |
|
5455 | x -= offsetParent[widthProp] - popperRect.width;
|
5456 | x *= gpuAcceleration ? 1 : -1;
|
5457 | }
|
5458 | }
|
5459 |
|
5460 | var commonStyles = Object.assign({
|
5461 | position: position
|
5462 | }, adaptive && unsetSides);
|
5463 |
|
5464 | if (gpuAcceleration) {
|
5465 | var _Object$assign;
|
5466 |
|
5467 | return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
|
5468 | }
|
5469 |
|
5470 | return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
5471 | }
|
5472 |
|
5473 | function computeStyles(_ref4) {
|
5474 | var state = _ref4.state,
|
5475 | options = _ref4.options;
|
5476 | var _options$gpuAccelerat = options.gpuAcceleration,
|
5477 | gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
5478 | _options$adaptive = options.adaptive,
|
5479 | adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
|
5480 | _options$roundOffsets = options.roundOffsets,
|
5481 | roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
|
5482 |
|
5483 | if (false) { var transitionProperty; }
|
5484 |
|
5485 | var commonStyles = {
|
5486 | placement: getBasePlacement(state.placement),
|
5487 | popper: state.elements.popper,
|
5488 | popperRect: state.rects.popper,
|
5489 | gpuAcceleration: gpuAcceleration
|
5490 | };
|
5491 |
|
5492 | if (state.modifiersData.popperOffsets != null) {
|
5493 | state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
|
5494 | offsets: state.modifiersData.popperOffsets,
|
5495 | position: state.options.strategy,
|
5496 | adaptive: adaptive,
|
5497 | roundOffsets: roundOffsets
|
5498 | })));
|
5499 | }
|
5500 |
|
5501 | if (state.modifiersData.arrow != null) {
|
5502 | state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
|
5503 | offsets: state.modifiersData.arrow,
|
5504 | position: 'absolute',
|
5505 | adaptive: false,
|
5506 | roundOffsets: roundOffsets
|
5507 | })));
|
5508 | }
|
5509 |
|
5510 | state.attributes.popper = Object.assign({}, state.attributes.popper, {
|
5511 | 'data-popper-placement': state.placement
|
5512 | });
|
5513 | }
|
5514 |
|
5515 |
|
5516 | const modifiers_computeStyles = ({
|
5517 | name: 'computeStyles',
|
5518 | enabled: true,
|
5519 | phase: 'beforeWrite',
|
5520 | fn: computeStyles,
|
5521 | data: {}
|
5522 | });
|
5523 | ;
|
5524 |
|
5525 |
|
5526 | var passive = {
|
5527 | passive: true
|
5528 | };
|
5529 |
|
5530 | function eventListeners_effect(_ref) {
|
5531 | var state = _ref.state,
|
5532 | instance = _ref.instance,
|
5533 | options = _ref.options;
|
5534 | var _options$scroll = options.scroll,
|
5535 | scroll = _options$scroll === void 0 ? true : _options$scroll,
|
5536 | _options$resize = options.resize,
|
5537 | resize = _options$resize === void 0 ? true : _options$resize;
|
5538 | var window = getWindow(state.elements.popper);
|
5539 | var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
|
5540 |
|
5541 | if (scroll) {
|
5542 | scrollParents.forEach(function (scrollParent) {
|
5543 | scrollParent.addEventListener('scroll', instance.update, passive);
|
5544 | });
|
5545 | }
|
5546 |
|
5547 | if (resize) {
|
5548 | window.addEventListener('resize', instance.update, passive);
|
5549 | }
|
5550 |
|
5551 | return function () {
|
5552 | if (scroll) {
|
5553 | scrollParents.forEach(function (scrollParent) {
|
5554 | scrollParent.removeEventListener('scroll', instance.update, passive);
|
5555 | });
|
5556 | }
|
5557 |
|
5558 | if (resize) {
|
5559 | window.removeEventListener('resize', instance.update, passive);
|
5560 | }
|
5561 | };
|
5562 | }
|
5563 |
|
5564 |
|
5565 | const eventListeners = ({
|
5566 | name: 'eventListeners',
|
5567 | enabled: true,
|
5568 | phase: 'write',
|
5569 | fn: function fn() {},
|
5570 | effect: eventListeners_effect,
|
5571 | data: {}
|
5572 | });
|
5573 | ;
|
5574 | var hash = {
|
5575 | left: 'right',
|
5576 | right: 'left',
|
5577 | bottom: 'top',
|
5578 | top: 'bottom'
|
5579 | };
|
5580 | function getOppositePlacement(placement) {
|
5581 | return placement.replace(/left|right|bottom|top/g, function (matched) {
|
5582 | return hash[matched];
|
5583 | });
|
5584 | }
|
5585 | ;
|
5586 | var getOppositeVariationPlacement_hash = {
|
5587 | start: 'end',
|
5588 | end: 'start'
|
5589 | };
|
5590 | function getOppositeVariationPlacement(placement) {
|
5591 | return placement.replace(/start|end/g, function (matched) {
|
5592 | return getOppositeVariationPlacement_hash[matched];
|
5593 | });
|
5594 | }
|
5595 | ;
|
5596 |
|
5597 | function getWindowScroll(node) {
|
5598 | var win = getWindow(node);
|
5599 | var scrollLeft = win.pageXOffset;
|
5600 | var scrollTop = win.pageYOffset;
|
5601 | return {
|
5602 | scrollLeft: scrollLeft,
|
5603 | scrollTop: scrollTop
|
5604 | };
|
5605 | }
|
5606 | ;
|
5607 |
|
5608 |
|
5609 |
|
5610 | function getWindowScrollBarX(element) {
|
5611 |
|
5612 |
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 | return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
|
5619 | }
|
5620 | ;
|
5621 |
|
5622 |
|
5623 |
|
5624 | function getViewportRect(element) {
|
5625 | var win = getWindow(element);
|
5626 | var html = getDocumentElement(element);
|
5627 | var visualViewport = win.visualViewport;
|
5628 | var width = html.clientWidth;
|
5629 | var height = html.clientHeight;
|
5630 | var x = 0;
|
5631 | var y = 0;
|
5632 |
|
5633 |
|
5634 |
|
5635 |
|
5636 |
|
5637 | if (visualViewport) {
|
5638 | width = visualViewport.width;
|
5639 | height = visualViewport.height;
|
5640 |
|
5641 |
|
5642 |
|
5643 |
|
5644 |
|
5645 |
|
5646 |
|
5647 |
|
5648 | if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
|
5649 | x = visualViewport.offsetLeft;
|
5650 | y = visualViewport.offsetTop;
|
5651 | }
|
5652 | }
|
5653 |
|
5654 | return {
|
5655 | width: width,
|
5656 | height: height,
|
5657 | x: x + getWindowScrollBarX(element),
|
5658 | y: y
|
5659 | };
|
5660 | }
|
5661 | ;
|
5662 |
|
5663 |
|
5664 |
|
5665 |
|
5666 |
|
5667 |
|
5668 |
|
5669 | function getDocumentRect(element) {
|
5670 | var _element$ownerDocumen;
|
5671 |
|
5672 | var html = getDocumentElement(element);
|
5673 | var winScroll = getWindowScroll(element);
|
5674 | var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
5675 | var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
5676 | var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
5677 | var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
|
5678 | var y = -winScroll.scrollTop;
|
5679 |
|
5680 | if (dom_utils_getComputedStyle_getComputedStyle(body || html).direction === 'rtl') {
|
5681 | x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
5682 | }
|
5683 |
|
5684 | return {
|
5685 | width: width,
|
5686 | height: height,
|
5687 | x: x,
|
5688 | y: y
|
5689 | };
|
5690 | }
|
5691 | ;
|
5692 |
|
5693 | function isScrollParent(element) {
|
5694 |
|
5695 | var _getComputedStyle = dom_utils_getComputedStyle_getComputedStyle(element),
|
5696 | overflow = _getComputedStyle.overflow,
|
5697 | overflowX = _getComputedStyle.overflowX,
|
5698 | overflowY = _getComputedStyle.overflowY;
|
5699 |
|
5700 | return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
5701 | }
|
5702 | ;
|
5703 |
|
5704 |
|
5705 |
|
5706 |
|
5707 | function getScrollParent(node) {
|
5708 | if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
|
5709 |
|
5710 | return node.ownerDocument.body;
|
5711 | }
|
5712 |
|
5713 | if (isHTMLElement(node) && isScrollParent(node)) {
|
5714 | return node;
|
5715 | }
|
5716 |
|
5717 | return getScrollParent(getParentNode(node));
|
5718 | }
|
5719 | ;
|
5720 |
|
5721 |
|
5722 |
|
5723 |
|
5724 |
|
5725 |
|
5726 |
|
5727 |
|
5728 |
|
5729 |
|
5730 |
|
5731 | function listScrollParents(element, list) {
|
5732 | var _element$ownerDocumen;
|
5733 |
|
5734 | if (list === void 0) {
|
5735 | list = [];
|
5736 | }
|
5737 |
|
5738 | var scrollParent = getScrollParent(element);
|
5739 | var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
|
5740 | var win = getWindow(scrollParent);
|
5741 | var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
|
5742 | var updatedList = list.concat(target);
|
5743 | return isBody ? updatedList :
|
5744 | updatedList.concat(listScrollParents(getParentNode(target)));
|
5745 | }
|
5746 | ;
|
5747 | function rectToClientRect(rect) {
|
5748 | return Object.assign({}, rect, {
|
5749 | left: rect.x,
|
5750 | top: rect.y,
|
5751 | right: rect.x + rect.width,
|
5752 | bottom: rect.y + rect.height
|
5753 | });
|
5754 | }
|
5755 | ;
|
5756 |
|
5757 |
|
5758 |
|
5759 |
|
5760 |
|
5761 |
|
5762 |
|
5763 |
|
5764 |
|
5765 |
|
5766 |
|
5767 |
|
5768 |
|
5769 |
|
5770 |
|
5771 | function getInnerBoundingClientRect(element) {
|
5772 | var rect = getBoundingClientRect(element);
|
5773 | rect.top = rect.top + element.clientTop;
|
5774 | rect.left = rect.left + element.clientLeft;
|
5775 | rect.bottom = rect.top + element.clientHeight;
|
5776 | rect.right = rect.left + element.clientWidth;
|
5777 | rect.width = element.clientWidth;
|
5778 | rect.height = element.clientHeight;
|
5779 | rect.x = rect.left;
|
5780 | rect.y = rect.top;
|
5781 | return rect;
|
5782 | }
|
5783 |
|
5784 | function getClientRectFromMixedType(element, clippingParent) {
|
5785 | return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
5786 | }
|
5787 |
|
5788 |
|
5789 |
|
5790 |
|
5791 | function getClippingParents(element) {
|
5792 | var clippingParents = listScrollParents(getParentNode(element));
|
5793 | var canEscapeClipping = ['absolute', 'fixed'].indexOf(dom_utils_getComputedStyle_getComputedStyle(element).position) >= 0;
|
5794 | var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
5795 |
|
5796 | if (!isElement(clipperElement)) {
|
5797 | return [];
|
5798 | }
|
5799 |
|
5800 |
|
5801 | return clippingParents.filter(function (clippingParent) {
|
5802 | return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
5803 | });
|
5804 | }
|
5805 |
|
5806 |
|
5807 |
|
5808 | function getClippingRect(element, boundary, rootBoundary) {
|
5809 | var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
|
5810 | var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
|
5811 | var firstClippingParent = clippingParents[0];
|
5812 | var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
|
5813 | var rect = getClientRectFromMixedType(element, clippingParent);
|
5814 | accRect.top = math_max(rect.top, accRect.top);
|
5815 | accRect.right = math_min(rect.right, accRect.right);
|
5816 | accRect.bottom = math_min(rect.bottom, accRect.bottom);
|
5817 | accRect.left = math_max(rect.left, accRect.left);
|
5818 | return accRect;
|
5819 | }, getClientRectFromMixedType(element, firstClippingParent));
|
5820 | clippingRect.width = clippingRect.right - clippingRect.left;
|
5821 | clippingRect.height = clippingRect.bottom - clippingRect.top;
|
5822 | clippingRect.x = clippingRect.left;
|
5823 | clippingRect.y = clippingRect.top;
|
5824 | return clippingRect;
|
5825 | }
|
5826 | ;
|
5827 | function getVariation(placement) {
|
5828 | return placement.split('-')[1];
|
5829 | }
|
5830 | ;
|
5831 |
|
5832 |
|
5833 |
|
5834 |
|
5835 | function computeOffsets(_ref) {
|
5836 | var reference = _ref.reference,
|
5837 | element = _ref.element,
|
5838 | placement = _ref.placement;
|
5839 | var basePlacement = placement ? getBasePlacement(placement) : null;
|
5840 | var variation = placement ? getVariation(placement) : null;
|
5841 | var commonX = reference.x + reference.width / 2 - element.width / 2;
|
5842 | var commonY = reference.y + reference.height / 2 - element.height / 2;
|
5843 | var offsets;
|
5844 |
|
5845 | switch (basePlacement) {
|
5846 | case enums_top:
|
5847 | offsets = {
|
5848 | x: commonX,
|
5849 | y: reference.y - element.height
|
5850 | };
|
5851 | break;
|
5852 |
|
5853 | case bottom:
|
5854 | offsets = {
|
5855 | x: commonX,
|
5856 | y: reference.y + reference.height
|
5857 | };
|
5858 | break;
|
5859 |
|
5860 | case right:
|
5861 | offsets = {
|
5862 | x: reference.x + reference.width,
|
5863 | y: commonY
|
5864 | };
|
5865 | break;
|
5866 |
|
5867 | case left:
|
5868 | offsets = {
|
5869 | x: reference.x - element.width,
|
5870 | y: commonY
|
5871 | };
|
5872 | break;
|
5873 |
|
5874 | default:
|
5875 | offsets = {
|
5876 | x: reference.x,
|
5877 | y: reference.y
|
5878 | };
|
5879 | }
|
5880 |
|
5881 | var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
|
5882 |
|
5883 | if (mainAxis != null) {
|
5884 | var len = mainAxis === 'y' ? 'height' : 'width';
|
5885 |
|
5886 | switch (variation) {
|
5887 | case start:
|
5888 | offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
|
5889 | break;
|
5890 |
|
5891 | case end:
|
5892 | offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
|
5893 | break;
|
5894 |
|
5895 | default:
|
5896 | }
|
5897 | }
|
5898 |
|
5899 | return offsets;
|
5900 | }
|
5901 | ;
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 |
|
5908 |
|
5909 |
|
5910 |
|
5911 |
|
5912 | function detectOverflow(state, options) {
|
5913 | if (options === void 0) {
|
5914 | options = {};
|
5915 | }
|
5916 |
|
5917 | var _options = options,
|
5918 | _options$placement = _options.placement,
|
5919 | placement = _options$placement === void 0 ? state.placement : _options$placement,
|
5920 | _options$boundary = _options.boundary,
|
5921 | boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
|
5922 | _options$rootBoundary = _options.rootBoundary,
|
5923 | rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
|
5924 | _options$elementConte = _options.elementContext,
|
5925 | elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
|
5926 | _options$altBoundary = _options.altBoundary,
|
5927 | altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
|
5928 | _options$padding = _options.padding,
|
5929 | padding = _options$padding === void 0 ? 0 : _options$padding;
|
5930 | var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
5931 | var altContext = elementContext === popper ? reference : popper;
|
5932 | var referenceElement = state.elements.reference;
|
5933 | var popperRect = state.rects.popper;
|
5934 | var element = state.elements[altBoundary ? altContext : elementContext];
|
5935 | var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
5936 | var referenceClientRect = getBoundingClientRect(referenceElement);
|
5937 | var popperOffsets = computeOffsets({
|
5938 | reference: referenceClientRect,
|
5939 | element: popperRect,
|
5940 | strategy: 'absolute',
|
5941 | placement: placement
|
5942 | });
|
5943 | var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
|
5944 | var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect;
|
5945 |
|
5946 |
|
5947 | var overflowOffsets = {
|
5948 | top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
5949 | bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
5950 | left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
5951 | right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
5952 | };
|
5953 | var offsetData = state.modifiersData.offset;
|
5954 |
|
5955 | if (elementContext === popper && offsetData) {
|
5956 | var offset = offsetData[placement];
|
5957 | Object.keys(overflowOffsets).forEach(function (key) {
|
5958 | var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
|
5959 | var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
|
5960 | overflowOffsets[key] += offset[axis] * multiply;
|
5961 | });
|
5962 | }
|
5963 |
|
5964 | return overflowOffsets;
|
5965 | }
|
5966 | ;
|
5967 |
|
5968 |
|
5969 |
|
5970 |
|
5971 | function computeAutoPlacement(state, options) {
|
5972 | if (options === void 0) {
|
5973 | options = {};
|
5974 | }
|
5975 |
|
5976 | var _options = options,
|
5977 | placement = _options.placement,
|
5978 | boundary = _options.boundary,
|
5979 | rootBoundary = _options.rootBoundary,
|
5980 | padding = _options.padding,
|
5981 | flipVariations = _options.flipVariations,
|
5982 | _options$allowedAutoP = _options.allowedAutoPlacements,
|
5983 | allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP;
|
5984 | var variation = getVariation(placement);
|
5985 | var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
|
5986 | return getVariation(placement) === variation;
|
5987 | }) : basePlacements;
|
5988 | var allowedPlacements = placements.filter(function (placement) {
|
5989 | return allowedAutoPlacements.indexOf(placement) >= 0;
|
5990 | });
|
5991 |
|
5992 | if (allowedPlacements.length === 0) {
|
5993 | allowedPlacements = placements;
|
5994 |
|
5995 | if (false) {}
|
5996 | }
|
5997 |
|
5998 |
|
5999 | var overflows = allowedPlacements.reduce(function (acc, placement) {
|
6000 | acc[placement] = detectOverflow(state, {
|
6001 | placement: placement,
|
6002 | boundary: boundary,
|
6003 | rootBoundary: rootBoundary,
|
6004 | padding: padding
|
6005 | })[getBasePlacement(placement)];
|
6006 | return acc;
|
6007 | }, {});
|
6008 | return Object.keys(overflows).sort(function (a, b) {
|
6009 | return overflows[a] - overflows[b];
|
6010 | });
|
6011 | }
|
6012 | ;
|
6013 |
|
6014 |
|
6015 |
|
6016 |
|
6017 |
|
6018 |
|
6019 |
|
6020 |
|
6021 | function getExpandedFallbackPlacements(placement) {
|
6022 | if (getBasePlacement(placement) === auto) {
|
6023 | return [];
|
6024 | }
|
6025 |
|
6026 | var oppositePlacement = getOppositePlacement(placement);
|
6027 | return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
|
6028 | }
|
6029 |
|
6030 | function flip(_ref) {
|
6031 | var state = _ref.state,
|
6032 | options = _ref.options,
|
6033 | name = _ref.name;
|
6034 |
|
6035 | if (state.modifiersData[name]._skip) {
|
6036 | return;
|
6037 | }
|
6038 |
|
6039 | var _options$mainAxis = options.mainAxis,
|
6040 | checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
|
6041 | _options$altAxis = options.altAxis,
|
6042 | checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
|
6043 | specifiedFallbackPlacements = options.fallbackPlacements,
|
6044 | padding = options.padding,
|
6045 | boundary = options.boundary,
|
6046 | rootBoundary = options.rootBoundary,
|
6047 | altBoundary = options.altBoundary,
|
6048 | _options$flipVariatio = options.flipVariations,
|
6049 | flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
|
6050 | allowedAutoPlacements = options.allowedAutoPlacements;
|
6051 | var preferredPlacement = state.options.placement;
|
6052 | var basePlacement = getBasePlacement(preferredPlacement);
|
6053 | var isBasePlacement = basePlacement === preferredPlacement;
|
6054 | var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
|
6055 | var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
|
6056 | return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
|
6057 | placement: placement,
|
6058 | boundary: boundary,
|
6059 | rootBoundary: rootBoundary,
|
6060 | padding: padding,
|
6061 | flipVariations: flipVariations,
|
6062 | allowedAutoPlacements: allowedAutoPlacements
|
6063 | }) : placement);
|
6064 | }, []);
|
6065 | var referenceRect = state.rects.reference;
|
6066 | var popperRect = state.rects.popper;
|
6067 | var checksMap = new Map();
|
6068 | var makeFallbackChecks = true;
|
6069 | var firstFittingPlacement = placements[0];
|
6070 |
|
6071 | for (var i = 0; i < placements.length; i++) {
|
6072 | var placement = placements[i];
|
6073 |
|
6074 | var _basePlacement = getBasePlacement(placement);
|
6075 |
|
6076 | var isStartVariation = getVariation(placement) === start;
|
6077 | var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0;
|
6078 | var len = isVertical ? 'width' : 'height';
|
6079 | var overflow = detectOverflow(state, {
|
6080 | placement: placement,
|
6081 | boundary: boundary,
|
6082 | rootBoundary: rootBoundary,
|
6083 | altBoundary: altBoundary,
|
6084 | padding: padding
|
6085 | });
|
6086 | var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top;
|
6087 |
|
6088 | if (referenceRect[len] > popperRect[len]) {
|
6089 | mainVariationSide = getOppositePlacement(mainVariationSide);
|
6090 | }
|
6091 |
|
6092 | var altVariationSide = getOppositePlacement(mainVariationSide);
|
6093 | var checks = [];
|
6094 |
|
6095 | if (checkMainAxis) {
|
6096 | checks.push(overflow[_basePlacement] <= 0);
|
6097 | }
|
6098 |
|
6099 | if (checkAltAxis) {
|
6100 | checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
|
6101 | }
|
6102 |
|
6103 | if (checks.every(function (check) {
|
6104 | return check;
|
6105 | })) {
|
6106 | firstFittingPlacement = placement;
|
6107 | makeFallbackChecks = false;
|
6108 | break;
|
6109 | }
|
6110 |
|
6111 | checksMap.set(placement, checks);
|
6112 | }
|
6113 |
|
6114 | if (makeFallbackChecks) {
|
6115 |
|
6116 | var numberOfChecks = flipVariations ? 3 : 1;
|
6117 |
|
6118 | var _loop = function _loop(_i) {
|
6119 | var fittingPlacement = placements.find(function (placement) {
|
6120 | var checks = checksMap.get(placement);
|
6121 |
|
6122 | if (checks) {
|
6123 | return checks.slice(0, _i).every(function (check) {
|
6124 | return check;
|
6125 | });
|
6126 | }
|
6127 | });
|
6128 |
|
6129 | if (fittingPlacement) {
|
6130 | firstFittingPlacement = fittingPlacement;
|
6131 | return "break";
|
6132 | }
|
6133 | };
|
6134 |
|
6135 | for (var _i = numberOfChecks; _i > 0; _i--) {
|
6136 | var _ret = _loop(_i);
|
6137 |
|
6138 | if (_ret === "break") break;
|
6139 | }
|
6140 | }
|
6141 |
|
6142 | if (state.placement !== firstFittingPlacement) {
|
6143 | state.modifiersData[name]._skip = true;
|
6144 | state.placement = firstFittingPlacement;
|
6145 | state.reset = true;
|
6146 | }
|
6147 | }
|
6148 |
|
6149 |
|
6150 | const modifiers_flip = ({
|
6151 | name: 'flip',
|
6152 | enabled: true,
|
6153 | phase: 'main',
|
6154 | fn: flip,
|
6155 | requiresIfExists: ['offset'],
|
6156 | data: {
|
6157 | _skip: false
|
6158 | }
|
6159 | });
|
6160 | ;
|
6161 |
|
6162 |
|
6163 |
|
6164 | function getSideOffsets(overflow, rect, preventedOffsets) {
|
6165 | if (preventedOffsets === void 0) {
|
6166 | preventedOffsets = {
|
6167 | x: 0,
|
6168 | y: 0
|
6169 | };
|
6170 | }
|
6171 |
|
6172 | return {
|
6173 | top: overflow.top - rect.height - preventedOffsets.y,
|
6174 | right: overflow.right - rect.width + preventedOffsets.x,
|
6175 | bottom: overflow.bottom - rect.height + preventedOffsets.y,
|
6176 | left: overflow.left - rect.width - preventedOffsets.x
|
6177 | };
|
6178 | }
|
6179 |
|
6180 | function isAnySideFullyClipped(overflow) {
|
6181 | return [enums_top, right, bottom, left].some(function (side) {
|
6182 | return overflow[side] >= 0;
|
6183 | });
|
6184 | }
|
6185 |
|
6186 | function hide(_ref) {
|
6187 | var state = _ref.state,
|
6188 | name = _ref.name;
|
6189 | var referenceRect = state.rects.reference;
|
6190 | var popperRect = state.rects.popper;
|
6191 | var preventedOffsets = state.modifiersData.preventOverflow;
|
6192 | var referenceOverflow = detectOverflow(state, {
|
6193 | elementContext: 'reference'
|
6194 | });
|
6195 | var popperAltOverflow = detectOverflow(state, {
|
6196 | altBoundary: true
|
6197 | });
|
6198 | var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
|
6199 | var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
|
6200 | var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
|
6201 | var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
|
6202 | state.modifiersData[name] = {
|
6203 | referenceClippingOffsets: referenceClippingOffsets,
|
6204 | popperEscapeOffsets: popperEscapeOffsets,
|
6205 | isReferenceHidden: isReferenceHidden,
|
6206 | hasPopperEscaped: hasPopperEscaped
|
6207 | };
|
6208 | state.attributes.popper = Object.assign({}, state.attributes.popper, {
|
6209 | 'data-popper-reference-hidden': isReferenceHidden,
|
6210 | 'data-popper-escaped': hasPopperEscaped
|
6211 | });
|
6212 | }
|
6213 |
|
6214 |
|
6215 | const modifiers_hide = ({
|
6216 | name: 'hide',
|
6217 | enabled: true,
|
6218 | phase: 'main',
|
6219 | requiresIfExists: ['preventOverflow'],
|
6220 | fn: hide
|
6221 | });
|
6222 | ;
|
6223 |
|
6224 |
|
6225 | function distanceAndSkiddingToXY(placement, rects, offset) {
|
6226 | var basePlacement = getBasePlacement(placement);
|
6227 | var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1;
|
6228 |
|
6229 | var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
|
6230 | placement: placement
|
6231 | })) : offset,
|
6232 | skidding = _ref[0],
|
6233 | distance = _ref[1];
|
6234 |
|
6235 | skidding = skidding || 0;
|
6236 | distance = (distance || 0) * invertDistance;
|
6237 | return [left, right].indexOf(basePlacement) >= 0 ? {
|
6238 | x: distance,
|
6239 | y: skidding
|
6240 | } : {
|
6241 | x: skidding,
|
6242 | y: distance
|
6243 | };
|
6244 | }
|
6245 |
|
6246 | function offset(_ref2) {
|
6247 | var state = _ref2.state,
|
6248 | options = _ref2.options,
|
6249 | name = _ref2.name;
|
6250 | var _options$offset = options.offset,
|
6251 | offset = _options$offset === void 0 ? [0, 0] : _options$offset;
|
6252 | var data = enums_placements.reduce(function (acc, placement) {
|
6253 | acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
|
6254 | return acc;
|
6255 | }, {});
|
6256 | var _data$state$placement = data[state.placement],
|
6257 | x = _data$state$placement.x,
|
6258 | y = _data$state$placement.y;
|
6259 |
|
6260 | if (state.modifiersData.popperOffsets != null) {
|
6261 | state.modifiersData.popperOffsets.x += x;
|
6262 | state.modifiersData.popperOffsets.y += y;
|
6263 | }
|
6264 |
|
6265 | state.modifiersData[name] = data;
|
6266 | }
|
6267 |
|
6268 |
|
6269 | const modifiers_offset = ({
|
6270 | name: 'offset',
|
6271 | enabled: true,
|
6272 | phase: 'main',
|
6273 | requires: ['popperOffsets'],
|
6274 | fn: offset
|
6275 | });
|
6276 | ;
|
6277 |
|
6278 |
|
6279 | function popperOffsets(_ref) {
|
6280 | var state = _ref.state,
|
6281 | name = _ref.name;
|
6282 |
|
6283 |
|
6284 |
|
6285 |
|
6286 | state.modifiersData[name] = computeOffsets({
|
6287 | reference: state.rects.reference,
|
6288 | element: state.rects.popper,
|
6289 | strategy: 'absolute',
|
6290 | placement: state.placement
|
6291 | });
|
6292 | }
|
6293 |
|
6294 |
|
6295 | const modifiers_popperOffsets = ({
|
6296 | name: 'popperOffsets',
|
6297 | enabled: true,
|
6298 | phase: 'read',
|
6299 | fn: popperOffsets,
|
6300 | data: {}
|
6301 | });
|
6302 | ;
|
6303 | function getAltAxis(axis) {
|
6304 | return axis === 'x' ? 'y' : 'x';
|
6305 | }
|
6306 | ;
|
6307 |
|
6308 |
|
6309 |
|
6310 |
|
6311 |
|
6312 |
|
6313 |
|
6314 |
|
6315 |
|
6316 |
|
6317 |
|
6318 |
|
6319 | function preventOverflow(_ref) {
|
6320 | var state = _ref.state,
|
6321 | options = _ref.options,
|
6322 | name = _ref.name;
|
6323 | var _options$mainAxis = options.mainAxis,
|
6324 | checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
|
6325 | _options$altAxis = options.altAxis,
|
6326 | checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
|
6327 | boundary = options.boundary,
|
6328 | rootBoundary = options.rootBoundary,
|
6329 | altBoundary = options.altBoundary,
|
6330 | padding = options.padding,
|
6331 | _options$tether = options.tether,
|
6332 | tether = _options$tether === void 0 ? true : _options$tether,
|
6333 | _options$tetherOffset = options.tetherOffset,
|
6334 | tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
|
6335 | var overflow = detectOverflow(state, {
|
6336 | boundary: boundary,
|
6337 | rootBoundary: rootBoundary,
|
6338 | padding: padding,
|
6339 | altBoundary: altBoundary
|
6340 | });
|
6341 | var basePlacement = getBasePlacement(state.placement);
|
6342 | var variation = getVariation(state.placement);
|
6343 | var isBasePlacement = !variation;
|
6344 | var mainAxis = getMainAxisFromPlacement(basePlacement);
|
6345 | var altAxis = getAltAxis(mainAxis);
|
6346 | var popperOffsets = state.modifiersData.popperOffsets;
|
6347 | var referenceRect = state.rects.reference;
|
6348 | var popperRect = state.rects.popper;
|
6349 | var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
6350 | placement: state.placement
|
6351 | })) : tetherOffset;
|
6352 | var data = {
|
6353 | x: 0,
|
6354 | y: 0
|
6355 | };
|
6356 |
|
6357 | if (!popperOffsets) {
|
6358 | return;
|
6359 | }
|
6360 |
|
6361 | if (checkMainAxis || checkAltAxis) {
|
6362 | var mainSide = mainAxis === 'y' ? enums_top : left;
|
6363 | var altSide = mainAxis === 'y' ? bottom : right;
|
6364 | var len = mainAxis === 'y' ? 'height' : 'width';
|
6365 | var offset = popperOffsets[mainAxis];
|
6366 | var min = popperOffsets[mainAxis] + overflow[mainSide];
|
6367 | var max = popperOffsets[mainAxis] - overflow[altSide];
|
6368 | var additive = tether ? -popperRect[len] / 2 : 0;
|
6369 | var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
6370 | var maxLen = variation === start ? -popperRect[len] : -referenceRect[len];
|
6371 |
|
6372 |
|
6373 | var arrowElement = state.elements.arrow;
|
6374 | var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
|
6375 | width: 0,
|
6376 | height: 0
|
6377 | };
|
6378 | var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
|
6379 | var arrowPaddingMin = arrowPaddingObject[mainSide];
|
6380 | var arrowPaddingMax = arrowPaddingObject[altSide];
|
6381 |
|
6382 |
|
6383 |
|
6384 |
|
6385 |
|
6386 | var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
6387 | var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
|
6388 | var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
|
6389 | var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
6390 | var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
6391 | var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
|
6392 | var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
|
6393 | var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
|
6394 |
|
6395 | if (checkMainAxis) {
|
6396 | var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max);
|
6397 | popperOffsets[mainAxis] = preventedOffset;
|
6398 | data[mainAxis] = preventedOffset - offset;
|
6399 | }
|
6400 |
|
6401 | if (checkAltAxis) {
|
6402 | var _mainSide = mainAxis === 'x' ? enums_top : left;
|
6403 |
|
6404 | var _altSide = mainAxis === 'x' ? bottom : right;
|
6405 |
|
6406 | var _offset = popperOffsets[altAxis];
|
6407 |
|
6408 | var _min = _offset + overflow[_mainSide];
|
6409 |
|
6410 | var _max = _offset - overflow[_altSide];
|
6411 |
|
6412 | var _preventedOffset = within(tether ? math_min(_min, tetherMin) : _min, _offset, tether ? math_max(_max, tetherMax) : _max);
|
6413 |
|
6414 | popperOffsets[altAxis] = _preventedOffset;
|
6415 | data[altAxis] = _preventedOffset - _offset;
|
6416 | }
|
6417 | }
|
6418 |
|
6419 | state.modifiersData[name] = data;
|
6420 | }
|
6421 |
|
6422 |
|
6423 | const modifiers_preventOverflow = ({
|
6424 | name: 'preventOverflow',
|
6425 | enabled: true,
|
6426 | phase: 'main',
|
6427 | fn: preventOverflow,
|
6428 | requiresIfExists: ['offset']
|
6429 | });
|
6430 | ;
|
6431 | function getHTMLElementScroll(element) {
|
6432 | return {
|
6433 | scrollLeft: element.scrollLeft,
|
6434 | scrollTop: element.scrollTop
|
6435 | };
|
6436 | }
|
6437 | ;
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 | function getNodeScroll(node) {
|
6443 | if (node === getWindow(node) || !isHTMLElement(node)) {
|
6444 | return getWindowScroll(node);
|
6445 | } else {
|
6446 | return getHTMLElementScroll(node);
|
6447 | }
|
6448 | }
|
6449 | ;
|
6450 |
|
6451 |
|
6452 |
|
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 | function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
6460 | if (isFixed === void 0) {
|
6461 | isFixed = false;
|
6462 | }
|
6463 |
|
6464 | var documentElement = getDocumentElement(offsetParent);
|
6465 | var rect = getBoundingClientRect(elementOrVirtualElement);
|
6466 | var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
6467 | var scroll = {
|
6468 | scrollLeft: 0,
|
6469 | scrollTop: 0
|
6470 | };
|
6471 | var offsets = {
|
6472 | x: 0,
|
6473 | y: 0
|
6474 | };
|
6475 |
|
6476 | if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
6477 | if (getNodeName(offsetParent) !== 'body' ||
|
6478 | isScrollParent(documentElement)) {
|
6479 | scroll = getNodeScroll(offsetParent);
|
6480 | }
|
6481 |
|
6482 | if (isHTMLElement(offsetParent)) {
|
6483 | offsets = getBoundingClientRect(offsetParent);
|
6484 | offsets.x += offsetParent.clientLeft;
|
6485 | offsets.y += offsetParent.clientTop;
|
6486 | } else if (documentElement) {
|
6487 | offsets.x = getWindowScrollBarX(documentElement);
|
6488 | }
|
6489 | }
|
6490 |
|
6491 | return {
|
6492 | x: rect.left + scroll.scrollLeft - offsets.x,
|
6493 | y: rect.top + scroll.scrollTop - offsets.y,
|
6494 | width: rect.width,
|
6495 | height: rect.height
|
6496 | };
|
6497 | }
|
6498 | ;
|
6499 |
|
6500 |
|
6501 | function order(modifiers) {
|
6502 | var map = new Map();
|
6503 | var visited = new Set();
|
6504 | var result = [];
|
6505 | modifiers.forEach(function (modifier) {
|
6506 | map.set(modifier.name, modifier);
|
6507 | });
|
6508 |
|
6509 | function sort(modifier) {
|
6510 | visited.add(modifier.name);
|
6511 | var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
|
6512 | requires.forEach(function (dep) {
|
6513 | if (!visited.has(dep)) {
|
6514 | var depModifier = map.get(dep);
|
6515 |
|
6516 | if (depModifier) {
|
6517 | sort(depModifier);
|
6518 | }
|
6519 | }
|
6520 | });
|
6521 | result.push(modifier);
|
6522 | }
|
6523 |
|
6524 | modifiers.forEach(function (modifier) {
|
6525 | if (!visited.has(modifier.name)) {
|
6526 |
|
6527 | sort(modifier);
|
6528 | }
|
6529 | });
|
6530 | return result;
|
6531 | }
|
6532 |
|
6533 | function orderModifiers(modifiers) {
|
6534 |
|
6535 | var orderedModifiers = order(modifiers);
|
6536 |
|
6537 | return modifierPhases.reduce(function (acc, phase) {
|
6538 | return acc.concat(orderedModifiers.filter(function (modifier) {
|
6539 | return modifier.phase === phase;
|
6540 | }));
|
6541 | }, []);
|
6542 | }
|
6543 | ;
|
6544 | function debounce(fn) {
|
6545 | var pending;
|
6546 | return function () {
|
6547 | if (!pending) {
|
6548 | pending = new Promise(function (resolve) {
|
6549 | Promise.resolve().then(function () {
|
6550 | pending = undefined;
|
6551 | resolve(fn());
|
6552 | });
|
6553 | });
|
6554 | }
|
6555 |
|
6556 | return pending;
|
6557 | };
|
6558 | }
|
6559 | ;
|
6560 | function mergeByName(modifiers) {
|
6561 | var merged = modifiers.reduce(function (merged, current) {
|
6562 | var existing = merged[current.name];
|
6563 | merged[current.name] = existing ? Object.assign({}, existing, current, {
|
6564 | options: Object.assign({}, existing.options, current.options),
|
6565 | data: Object.assign({}, existing.data, current.data)
|
6566 | }) : current;
|
6567 | return merged;
|
6568 | }, {});
|
6569 |
|
6570 | return Object.keys(merged).map(function (key) {
|
6571 | return merged[key];
|
6572 | });
|
6573 | }
|
6574 | ;
|
6575 |
|
6576 |
|
6577 |
|
6578 |
|
6579 |
|
6580 |
|
6581 |
|
6582 |
|
6583 |
|
6584 |
|
6585 |
|
6586 |
|
6587 |
|
6588 |
|
6589 | var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
|
6590 | var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
|
6591 | var DEFAULT_OPTIONS = {
|
6592 | placement: 'bottom',
|
6593 | modifiers: [],
|
6594 | strategy: 'absolute'
|
6595 | };
|
6596 |
|
6597 | function areValidElements() {
|
6598 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
6599 | args[_key] = arguments[_key];
|
6600 | }
|
6601 |
|
6602 | return !args.some(function (element) {
|
6603 | return !(element && typeof element.getBoundingClientRect === 'function');
|
6604 | });
|
6605 | }
|
6606 |
|
6607 | function popperGenerator(generatorOptions) {
|
6608 | if (generatorOptions === void 0) {
|
6609 | generatorOptions = {};
|
6610 | }
|
6611 |
|
6612 | var _generatorOptions = generatorOptions,
|
6613 | _generatorOptions$def = _generatorOptions.defaultModifiers,
|
6614 | defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
|
6615 | _generatorOptions$def2 = _generatorOptions.defaultOptions,
|
6616 | defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
|
6617 | return function createPopper(reference, popper, options) {
|
6618 | if (options === void 0) {
|
6619 | options = defaultOptions;
|
6620 | }
|
6621 |
|
6622 | var state = {
|
6623 | placement: 'bottom',
|
6624 | orderedModifiers: [],
|
6625 | options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
|
6626 | modifiersData: {},
|
6627 | elements: {
|
6628 | reference: reference,
|
6629 | popper: popper
|
6630 | },
|
6631 | attributes: {},
|
6632 | styles: {}
|
6633 | };
|
6634 | var effectCleanupFns = [];
|
6635 | var isDestroyed = false;
|
6636 | var instance = {
|
6637 | state: state,
|
6638 | setOptions: function setOptions(options) {
|
6639 | cleanupModifierEffects();
|
6640 | state.options = Object.assign({}, defaultOptions, state.options, options);
|
6641 | state.scrollParents = {
|
6642 | reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
6643 | popper: listScrollParents(popper)
|
6644 | };
|
6645 |
|
6646 |
|
6647 | var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers)));
|
6648 |
|
6649 | state.orderedModifiers = orderedModifiers.filter(function (m) {
|
6650 | return m.enabled;
|
6651 | });
|
6652 |
|
6653 |
|
6654 | if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; }
|
6655 |
|
6656 | runModifierEffects();
|
6657 | return instance.update();
|
6658 | },
|
6659 |
|
6660 |
|
6661 |
|
6662 |
|
6663 |
|
6664 | forceUpdate: function forceUpdate() {
|
6665 | if (isDestroyed) {
|
6666 | return;
|
6667 | }
|
6668 |
|
6669 | var _state$elements = state.elements,
|
6670 | reference = _state$elements.reference,
|
6671 | popper = _state$elements.popper;
|
6672 |
|
6673 |
|
6674 | if (!areValidElements(reference, popper)) {
|
6675 | if (false) {}
|
6676 |
|
6677 | return;
|
6678 | }
|
6679 |
|
6680 |
|
6681 | state.rects = {
|
6682 | reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
|
6683 | popper: getLayoutRect(popper)
|
6684 | };
|
6685 |
|
6686 |
|
6687 |
|
6688 |
|
6689 |
|
6690 | state.reset = false;
|
6691 | state.placement = state.options.placement;
|
6692 |
|
6693 |
|
6694 |
|
6695 |
|
6696 | state.orderedModifiers.forEach(function (modifier) {
|
6697 | return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
6698 | });
|
6699 | var __debug_loops__ = 0;
|
6700 |
|
6701 | for (var index = 0; index < state.orderedModifiers.length; index++) {
|
6702 | if (false) {}
|
6703 |
|
6704 | if (state.reset === true) {
|
6705 | state.reset = false;
|
6706 | index = -1;
|
6707 | continue;
|
6708 | }
|
6709 |
|
6710 | var _state$orderedModifie = state.orderedModifiers[index],
|
6711 | fn = _state$orderedModifie.fn,
|
6712 | _state$orderedModifie2 = _state$orderedModifie.options,
|
6713 | _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
|
6714 | name = _state$orderedModifie.name;
|
6715 |
|
6716 | if (typeof fn === 'function') {
|
6717 | state = fn({
|
6718 | state: state,
|
6719 | options: _options,
|
6720 | name: name,
|
6721 | instance: instance
|
6722 | }) || state;
|
6723 | }
|
6724 | }
|
6725 | },
|
6726 |
|
6727 |
|
6728 | update: debounce(function () {
|
6729 | return new Promise(function (resolve) {
|
6730 | instance.forceUpdate();
|
6731 | resolve(state);
|
6732 | });
|
6733 | }),
|
6734 | destroy: function destroy() {
|
6735 | cleanupModifierEffects();
|
6736 | isDestroyed = true;
|
6737 | }
|
6738 | };
|
6739 |
|
6740 | if (!areValidElements(reference, popper)) {
|
6741 | if (false) {}
|
6742 |
|
6743 | return instance;
|
6744 | }
|
6745 |
|
6746 | instance.setOptions(options).then(function (state) {
|
6747 | if (!isDestroyed && options.onFirstUpdate) {
|
6748 | options.onFirstUpdate(state);
|
6749 | }
|
6750 | });
|
6751 |
|
6752 |
|
6753 |
|
6754 |
|
6755 |
|
6756 | function runModifierEffects() {
|
6757 | state.orderedModifiers.forEach(function (_ref3) {
|
6758 | var name = _ref3.name,
|
6759 | _ref3$options = _ref3.options,
|
6760 | options = _ref3$options === void 0 ? {} : _ref3$options,
|
6761 | effect = _ref3.effect;
|
6762 |
|
6763 | if (typeof effect === 'function') {
|
6764 | var cleanupFn = effect({
|
6765 | state: state,
|
6766 | name: name,
|
6767 | instance: instance,
|
6768 | options: options
|
6769 | });
|
6770 |
|
6771 | var noopFn = function noopFn() {};
|
6772 |
|
6773 | effectCleanupFns.push(cleanupFn || noopFn);
|
6774 | }
|
6775 | });
|
6776 | }
|
6777 |
|
6778 | function cleanupModifierEffects() {
|
6779 | effectCleanupFns.forEach(function (fn) {
|
6780 | return fn();
|
6781 | });
|
6782 | effectCleanupFns = [];
|
6783 | }
|
6784 |
|
6785 | return instance;
|
6786 | };
|
6787 | }
|
6788 | var createPopper = ( null && (popperGenerator()));
|
6789 |
|
6790 |
|
6791 | ;
|
6792 |
|
6793 |
|
6794 |
|
6795 |
|
6796 |
|
6797 |
|
6798 |
|
6799 |
|
6800 |
|
6801 |
|
6802 |
|
6803 |
|
6804 | var popper_createPopper = popperGenerator({
|
6805 | defaultModifiers: [modifiers_hide, modifiers_popperOffsets, modifiers_computeStyles, eventListeners, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow]
|
6806 | });
|
6807 |
|
6808 | ;
|
6809 |
|
6810 |
|
6811 |
|
6812 |
|
6813 |
|
6814 |
|
6815 | var initialPopperStyles = function initialPopperStyles(position) {
|
6816 | return {
|
6817 | position: position,
|
6818 | top: '0',
|
6819 | left: '0',
|
6820 | opacity: '0',
|
6821 | pointerEvents: 'none'
|
6822 | };
|
6823 | };
|
6824 |
|
6825 | var disabledApplyStylesModifier = {
|
6826 | name: 'applyStyles',
|
6827 | enabled: false
|
6828 | };
|
6829 |
|
6830 | var ariaDescribedByModifier = {
|
6831 | name: 'ariaDescribedBy',
|
6832 | enabled: true,
|
6833 | phase: 'afterWrite',
|
6834 | effect: function effect(_ref) {
|
6835 | var state = _ref.state;
|
6836 | return function () {
|
6837 | var _state$elements = state.elements,
|
6838 | reference = _state$elements.reference,
|
6839 | popper = _state$elements.popper;
|
6840 |
|
6841 | if ('removeAttribute' in reference) {
|
6842 | var ids = (reference.getAttribute('aria-describedby') || '').split(',').filter(function (id) {
|
6843 | return id.trim() !== popper.id;
|
6844 | });
|
6845 | if (!ids.length) reference.removeAttribute('aria-describedby');else reference.setAttribute('aria-describedby', ids.join(','));
|
6846 | }
|
6847 | };
|
6848 | },
|
6849 | fn: function fn(_ref2) {
|
6850 | var _popper$getAttribute;
|
6851 |
|
6852 | var state = _ref2.state;
|
6853 | var _state$elements2 = state.elements,
|
6854 | popper = _state$elements2.popper,
|
6855 | reference = _state$elements2.reference;
|
6856 | var role = (_popper$getAttribute = popper.getAttribute('role')) == null ? void 0 : _popper$getAttribute.toLowerCase();
|
6857 |
|
6858 | if (popper.id && role === 'tooltip' && 'setAttribute' in reference) {
|
6859 | var ids = reference.getAttribute('aria-describedby');
|
6860 |
|
6861 | if (ids && ids.split(',').indexOf(popper.id) !== -1) {
|
6862 | return;
|
6863 | }
|
6864 |
|
6865 | reference.setAttribute('aria-describedby', ids ? ids + "," + popper.id : popper.id);
|
6866 | }
|
6867 | }
|
6868 | };
|
6869 | var EMPTY_MODIFIERS = [];
|
6870 |
|
6871 |
|
6872 |
|
6873 |
|
6874 |
|
6875 |
|
6876 |
|
6877 |
|
6878 |
|
6879 |
|
6880 |
|
6881 |
|
6882 |
|
6883 |
|
6884 |
|
6885 |
|
6886 |
|
6887 | function usePopper(referenceElement, popperElement, _temp) {
|
6888 | var _ref3 = _temp === void 0 ? {} : _temp,
|
6889 | _ref3$enabled = _ref3.enabled,
|
6890 | enabled = _ref3$enabled === void 0 ? true : _ref3$enabled,
|
6891 | _ref3$placement = _ref3.placement,
|
6892 | placement = _ref3$placement === void 0 ? 'bottom' : _ref3$placement,
|
6893 | _ref3$strategy = _ref3.strategy,
|
6894 | strategy = _ref3$strategy === void 0 ? 'absolute' : _ref3$strategy,
|
6895 | _ref3$modifiers = _ref3.modifiers,
|
6896 | modifiers = _ref3$modifiers === void 0 ? EMPTY_MODIFIERS : _ref3$modifiers,
|
6897 | config = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref3, ["enabled", "placement", "strategy", "modifiers"]);
|
6898 |
|
6899 | var popperInstanceRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
6900 | var update = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
6901 | var _popperInstanceRef$cu;
|
6902 |
|
6903 | (_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update();
|
6904 | }, []);
|
6905 | var forceUpdate = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
6906 | var _popperInstanceRef$cu2;
|
6907 |
|
6908 | (_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate();
|
6909 | }, []);
|
6910 |
|
6911 | var _useSafeState = esm_useSafeState((0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
6912 | placement: placement,
|
6913 | update: update,
|
6914 | forceUpdate: forceUpdate,
|
6915 | attributes: {},
|
6916 | styles: {
|
6917 | popper: initialPopperStyles(strategy),
|
6918 | arrow: {}
|
6919 | }
|
6920 | })),
|
6921 | popperState = _useSafeState[0],
|
6922 | setState = _useSafeState[1];
|
6923 |
|
6924 | var updateModifier = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
6925 | return {
|
6926 | name: 'updateStateModifier',
|
6927 | enabled: true,
|
6928 | phase: 'write',
|
6929 | requires: ['computeStyles'],
|
6930 | fn: function fn(_ref4) {
|
6931 | var state = _ref4.state;
|
6932 | var styles = {};
|
6933 | var attributes = {};
|
6934 | Object.keys(state.elements).forEach(function (element) {
|
6935 | styles[element] = state.styles[element];
|
6936 | attributes[element] = state.attributes[element];
|
6937 | });
|
6938 | setState({
|
6939 | state: state,
|
6940 | styles: styles,
|
6941 | attributes: attributes,
|
6942 | update: update,
|
6943 | forceUpdate: forceUpdate,
|
6944 | placement: state.placement
|
6945 | });
|
6946 | }
|
6947 | };
|
6948 | }, [update, forceUpdate, setState]);
|
6949 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
6950 | if (!popperInstanceRef.current || !enabled) return;
|
6951 | popperInstanceRef.current.setOptions({
|
6952 | placement: placement,
|
6953 | strategy: strategy,
|
6954 | modifiers: [].concat(modifiers, [updateModifier, disabledApplyStylesModifier])
|
6955 | });
|
6956 |
|
6957 | }, [strategy, placement, updateModifier, enabled]);
|
6958 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
6959 | if (!enabled || referenceElement == null || popperElement == null) {
|
6960 | return undefined;
|
6961 | }
|
6962 |
|
6963 | popperInstanceRef.current = popper_createPopper(referenceElement, popperElement, extends_extends({}, config, {
|
6964 | placement: placement,
|
6965 | strategy: strategy,
|
6966 | modifiers: [].concat(modifiers, [ariaDescribedByModifier, updateModifier])
|
6967 | }));
|
6968 | return function () {
|
6969 | if (popperInstanceRef.current != null) {
|
6970 | popperInstanceRef.current.destroy();
|
6971 | popperInstanceRef.current = undefined;
|
6972 | setState(function (s) {
|
6973 | return extends_extends({}, s, {
|
6974 | attributes: {},
|
6975 | styles: {
|
6976 | popper: initialPopperStyles(strategy)
|
6977 | }
|
6978 | });
|
6979 | });
|
6980 | }
|
6981 | };
|
6982 |
|
6983 | }, [enabled, referenceElement, popperElement]);
|
6984 | return popperState;
|
6985 | }
|
6986 |
|
6987 | const esm_usePopper = (usePopper);
|
6988 | ;
|
6989 |
|
6990 |
|
6991 |
|
6992 |
|
6993 |
|
6994 |
|
6995 |
|
6996 |
|
6997 | function contains_contains(context, node) {
|
6998 |
|
6999 |
|
7000 | if (context.contains) return context.contains(node);
|
7001 | if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);
|
7002 | }
|
7003 |
|
7004 | var warning = __webpack_require__(459);
|
7005 | var warning_default = __webpack_require__.n(warning);
|
7006 | ;
|
7007 |
|
7008 | function safeFindDOMNode(componentOrElement) {
|
7009 | if (componentOrElement && 'setState' in componentOrElement) {
|
7010 | return external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(componentOrElement);
|
7011 | }
|
7012 |
|
7013 | return componentOrElement != null ? componentOrElement : null;
|
7014 | }
|
7015 | ;
|
7016 |
|
7017 |
|
7018 | const esm_ownerDocument = (function (componentOrElement) {
|
7019 | return ownerDocument(safeFindDOMNode(componentOrElement));
|
7020 | });
|
7021 | ;
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 |
|
7028 | var escapeKeyCode = 27;
|
7029 |
|
7030 | var useRootClose_noop = function noop() {};
|
7031 |
|
7032 | function isLeftClickEvent(event) {
|
7033 | return event.button === 0;
|
7034 | }
|
7035 |
|
7036 | function isModifiedEvent(event) {
|
7037 | return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
7038 | }
|
7039 |
|
7040 | var getRefTarget = function getRefTarget(ref) {
|
7041 | return ref && ('current' in ref ? ref.current : ref);
|
7042 | };
|
7043 |
|
7044 |
|
7045 |
|
7046 |
|
7047 |
|
7048 |
|
7049 |
|
7050 |
|
7051 |
|
7052 |
|
7053 |
|
7054 |
|
7055 |
|
7056 |
|
7057 | function useRootClose(ref, onRootClose, _temp) {
|
7058 | var _ref = _temp === void 0 ? {} : _temp,
|
7059 | disabled = _ref.disabled,
|
7060 | _ref$clickTrigger = _ref.clickTrigger,
|
7061 | clickTrigger = _ref$clickTrigger === void 0 ? 'click' : _ref$clickTrigger;
|
7062 |
|
7063 | var preventMouseRootCloseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
7064 | var onClose = onRootClose || useRootClose_noop;
|
7065 | var handleMouseCapture = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
|
7066 | var currentTarget = getRefTarget(ref);
|
7067 | warning_default()(!!currentTarget, 'RootClose captured a close event but does not have a ref to compare it to. ' + 'useRootClose(), should be passed a ref that resolves to a DOM node');
|
7068 | preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target);
|
7069 | }, [ref]);
|
7070 | var handleMouse = useEventCallback(function (e) {
|
7071 | if (!preventMouseRootCloseRef.current) {
|
7072 | onClose(e);
|
7073 | }
|
7074 | });
|
7075 | var handleKeyUp = useEventCallback(function (e) {
|
7076 | if (e.keyCode === escapeKeyCode) {
|
7077 | onClose(e);
|
7078 | }
|
7079 | });
|
7080 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
7081 | if (disabled || ref == null) return undefined;
|
7082 |
|
7083 |
|
7084 | var currentEvent = window.event;
|
7085 | var doc = esm_ownerDocument(getRefTarget(ref));
|
7086 |
|
7087 |
|
7088 |
|
7089 | var removeMouseCaptureListener = esm_listen(doc, clickTrigger, handleMouseCapture, true);
|
7090 | var removeMouseListener = esm_listen(doc, clickTrigger, function (e) {
|
7091 |
|
7092 | if (e === currentEvent) {
|
7093 | currentEvent = undefined;
|
7094 | return;
|
7095 | }
|
7096 |
|
7097 | handleMouse(e);
|
7098 | });
|
7099 | var removeKeyupListener = esm_listen(doc, 'keyup', function (e) {
|
7100 |
|
7101 | if (e === currentEvent) {
|
7102 | currentEvent = undefined;
|
7103 | return;
|
7104 | }
|
7105 |
|
7106 | handleKeyUp(e);
|
7107 | });
|
7108 | var mobileSafariHackListeners = [];
|
7109 |
|
7110 | if ('ontouchstart' in doc.documentElement) {
|
7111 | mobileSafariHackListeners = [].slice.call(doc.body.children).map(function (el) {
|
7112 | return esm_listen(el, 'mousemove', useRootClose_noop);
|
7113 | });
|
7114 | }
|
7115 |
|
7116 | return function () {
|
7117 | removeMouseCaptureListener();
|
7118 | removeMouseListener();
|
7119 | removeKeyupListener();
|
7120 | mobileSafariHackListeners.forEach(function (remove) {
|
7121 | return remove();
|
7122 | });
|
7123 | };
|
7124 | }, [ref, disabled, clickTrigger, handleMouseCapture, handleMouse, handleKeyUp]);
|
7125 | }
|
7126 |
|
7127 | const esm_useRootClose = (useRootClose);
|
7128 | ;
|
7129 |
|
7130 | function toModifierMap(modifiers) {
|
7131 | var result = {};
|
7132 |
|
7133 | if (!Array.isArray(modifiers)) {
|
7134 | return modifiers || result;
|
7135 | }
|
7136 |
|
7137 |
|
7138 | modifiers == null ? void 0 : modifiers.forEach(function (m) {
|
7139 | result[m.name] = m;
|
7140 | });
|
7141 | return result;
|
7142 | }
|
7143 | function toModifierArray(map) {
|
7144 | if (map === void 0) {
|
7145 | map = {};
|
7146 | }
|
7147 |
|
7148 | if (Array.isArray(map)) return map;
|
7149 | return Object.keys(map).map(function (k) {
|
7150 | map[k].name = k;
|
7151 | return map[k];
|
7152 | });
|
7153 | }
|
7154 | function mergeOptionsWithPopperConfig(_ref) {
|
7155 | var _modifiers$preventOve, _modifiers$preventOve2, _modifiers$offset, _modifiers$arrow;
|
7156 |
|
7157 | var enabled = _ref.enabled,
|
7158 | enableEvents = _ref.enableEvents,
|
7159 | placement = _ref.placement,
|
7160 | flip = _ref.flip,
|
7161 | offset = _ref.offset,
|
7162 | fixed = _ref.fixed,
|
7163 | containerPadding = _ref.containerPadding,
|
7164 | arrowElement = _ref.arrowElement,
|
7165 | _ref$popperConfig = _ref.popperConfig,
|
7166 | popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig;
|
7167 | var modifiers = toModifierMap(popperConfig.modifiers);
|
7168 | return extends_extends({}, popperConfig, {
|
7169 | placement: placement,
|
7170 | enabled: enabled,
|
7171 | strategy: fixed ? 'fixed' : popperConfig.strategy,
|
7172 | modifiers: toModifierArray(extends_extends({}, modifiers, {
|
7173 | eventListeners: {
|
7174 | enabled: enableEvents
|
7175 | },
|
7176 | preventOverflow: extends_extends({}, modifiers.preventOverflow, {
|
7177 | options: containerPadding ? extends_extends({
|
7178 | padding: containerPadding
|
7179 | }, (_modifiers$preventOve = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve.options) : (_modifiers$preventOve2 = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve2.options
|
7180 | }),
|
7181 | offset: {
|
7182 | options: extends_extends({
|
7183 | offset: offset
|
7184 | }, (_modifiers$offset = modifiers.offset) == null ? void 0 : _modifiers$offset.options)
|
7185 | },
|
7186 | arrow: extends_extends({}, modifiers.arrow, {
|
7187 | enabled: !!arrowElement,
|
7188 | options: extends_extends({}, (_modifiers$arrow = modifiers.arrow) == null ? void 0 : _modifiers$arrow.options, {
|
7189 | element: arrowElement
|
7190 | })
|
7191 | }),
|
7192 | flip: extends_extends({
|
7193 | enabled: !!flip
|
7194 | }, modifiers.flip)
|
7195 | }))
|
7196 | });
|
7197 | }
|
7198 | ;
|
7199 |
|
7200 |
|
7201 |
|
7202 |
|
7203 |
|
7204 |
|
7205 |
|
7206 |
|
7207 |
|
7208 |
|
7209 | var DropdownMenu_noop = function noop() {};
|
7210 |
|
7211 |
|
7212 |
|
7213 |
|
7214 |
|
7215 |
|
7216 |
|
7217 |
|
7218 |
|
7219 |
|
7220 |
|
7221 |
|
7222 | function useDropdownMenu(options) {
|
7223 | if (options === void 0) {
|
7224 | options = {};
|
7225 | }
|
7226 |
|
7227 | var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext);
|
7228 |
|
7229 | var _useCallbackRef = useCallbackRef(),
|
7230 | arrowElement = _useCallbackRef[0],
|
7231 | attachArrowRef = _useCallbackRef[1];
|
7232 |
|
7233 | var hasShownRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
7234 | var _options = options,
|
7235 | flip = _options.flip,
|
7236 | offset = _options.offset,
|
7237 | rootCloseEvent = _options.rootCloseEvent,
|
7238 | _options$fixed = _options.fixed,
|
7239 | fixed = _options$fixed === void 0 ? false : _options$fixed,
|
7240 | _options$popperConfig = _options.popperConfig,
|
7241 | popperConfig = _options$popperConfig === void 0 ? {} : _options$popperConfig,
|
7242 | _options$usePopper = _options.usePopper,
|
7243 | shouldUsePopper = _options$usePopper === void 0 ? !!context : _options$usePopper;
|
7244 | var show = (context == null ? void 0 : context.show) == null ? !!options.show : context.show;
|
7245 | var alignEnd = (context == null ? void 0 : context.alignEnd) == null ? options.alignEnd : context.alignEnd;
|
7246 |
|
7247 | if (show && !hasShownRef.current) {
|
7248 | hasShownRef.current = true;
|
7249 | }
|
7250 |
|
7251 | var handleClose = function handleClose(e) {
|
7252 | context == null ? void 0 : context.toggle(false, e);
|
7253 | };
|
7254 |
|
7255 | var _ref = context || {},
|
7256 | drop = _ref.drop,
|
7257 | setMenu = _ref.setMenu,
|
7258 | menuElement = _ref.menuElement,
|
7259 | toggleElement = _ref.toggleElement;
|
7260 |
|
7261 | var placement = alignEnd ? 'bottom-end' : 'bottom-start';
|
7262 | if (drop === 'up') placement = alignEnd ? 'top-end' : 'top-start';else if (drop === 'right') placement = alignEnd ? 'right-end' : 'right-start';else if (drop === 'left') placement = alignEnd ? 'left-end' : 'left-start';
|
7263 | var popper = esm_usePopper(toggleElement, menuElement, mergeOptionsWithPopperConfig({
|
7264 | placement: placement,
|
7265 | enabled: !!(shouldUsePopper && show),
|
7266 | enableEvents: show,
|
7267 | offset: offset,
|
7268 | flip: flip,
|
7269 | fixed: fixed,
|
7270 | arrowElement: arrowElement,
|
7271 | popperConfig: popperConfig
|
7272 | }));
|
7273 |
|
7274 | var menuProps = extends_extends({
|
7275 | ref: setMenu || DropdownMenu_noop,
|
7276 | 'aria-labelledby': toggleElement == null ? void 0 : toggleElement.id
|
7277 | }, popper.attributes.popper, {
|
7278 | style: popper.styles.popper
|
7279 | });
|
7280 |
|
7281 | var metadata = {
|
7282 | show: show,
|
7283 | alignEnd: alignEnd,
|
7284 | hasShown: hasShownRef.current,
|
7285 | toggle: context == null ? void 0 : context.toggle,
|
7286 | popper: shouldUsePopper ? popper : null,
|
7287 | arrowProps: shouldUsePopper ? extends_extends({
|
7288 | ref: attachArrowRef
|
7289 | }, popper.attributes.arrow, {
|
7290 | style: popper.styles.arrow
|
7291 | }) : {}
|
7292 | };
|
7293 | esm_useRootClose(menuElement, handleClose, {
|
7294 | clickTrigger: rootCloseEvent,
|
7295 | disabled: !show
|
7296 | });
|
7297 | return [menuProps, metadata];
|
7298 | }
|
7299 | var DropdownMenu_propTypes = {
|
7300 | |
7301 |
|
7302 |
|
7303 |
|
7304 |
|
7305 |
|
7306 |
|
7307 |
|
7308 |
|
7309 |
|
7310 |
|
7311 |
|
7312 |
|
7313 |
|
7314 |
|
7315 |
|
7316 |
|
7317 |
|
7318 |
|
7319 |
|
7320 |
|
7321 |
|
7322 | children: (prop_types_default()).func.isRequired,
|
7323 |
|
7324 | |
7325 |
|
7326 |
|
7327 |
|
7328 |
|
7329 | show: (prop_types_default()).bool,
|
7330 |
|
7331 | |
7332 |
|
7333 |
|
7334 |
|
7335 |
|
7336 | alignEnd: (prop_types_default()).bool,
|
7337 |
|
7338 | |
7339 |
|
7340 |
|
7341 |
|
7342 |
|
7343 | flip: (prop_types_default()).bool,
|
7344 | usePopper: prop_types_default().oneOf([true, false]),
|
7345 |
|
7346 | |
7347 |
|
7348 |
|
7349 | popperConfig: (prop_types_default()).object,
|
7350 |
|
7351 | |
7352 |
|
7353 |
|
7354 | rootCloseEvent: (prop_types_default()).string
|
7355 | };
|
7356 | var DropdownMenu_defaultProps = {
|
7357 | usePopper: true
|
7358 | };
|
7359 |
|
7360 |
|
7361 |
|
7362 |
|
7363 |
|
7364 |
|
7365 |
|
7366 | function DropdownMenu(_ref2) {
|
7367 | var children = _ref2.children,
|
7368 | options = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, ["children"]);
|
7369 |
|
7370 | var _useDropdownMenu = useDropdownMenu(options),
|
7371 | props = _useDropdownMenu[0],
|
7372 | meta = _useDropdownMenu[1];
|
7373 |
|
7374 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, meta.hasShown ? children(props, meta) : null);
|
7375 | }
|
7376 |
|
7377 | DropdownMenu.displayName = 'ReactOverlaysDropdownMenu';
|
7378 | DropdownMenu.propTypes = DropdownMenu_propTypes;
|
7379 | DropdownMenu.defaultProps = DropdownMenu_defaultProps;
|
7380 |
|
7381 |
|
7382 | const esm_DropdownMenu = (DropdownMenu);
|
7383 | ;
|
7384 |
|
7385 |
|
7386 |
|
7387 |
|
7388 | var DropdownToggle_noop = function noop() {};
|
7389 |
|
7390 |
|
7391 |
|
7392 |
|
7393 |
|
7394 |
|
7395 |
|
7396 |
|
7397 | function useDropdownToggle() {
|
7398 | var _ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext) || {},
|
7399 | _ref$show = _ref.show,
|
7400 | show = _ref$show === void 0 ? false : _ref$show,
|
7401 | _ref$toggle = _ref.toggle,
|
7402 | toggle = _ref$toggle === void 0 ? DropdownToggle_noop : _ref$toggle,
|
7403 | setToggle = _ref.setToggle;
|
7404 |
|
7405 | var handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
|
7406 | toggle(!show, e);
|
7407 | }, [show, toggle]);
|
7408 | return [{
|
7409 | ref: setToggle || DropdownToggle_noop,
|
7410 | onClick: handleClick,
|
7411 | 'aria-haspopup': true,
|
7412 | 'aria-expanded': !!show
|
7413 | }, {
|
7414 | show: show,
|
7415 | toggle: toggle
|
7416 | }];
|
7417 | }
|
7418 | var DropdownToggle_propTypes = {
|
7419 | |
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 |
|
7425 |
|
7426 |
|
7427 |
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 | children: (prop_types_default()).func.isRequired
|
7435 | };
|
7436 |
|
7437 |
|
7438 |
|
7439 |
|
7440 |
|
7441 |
|
7442 |
|
7443 | function DropdownToggle(_ref2) {
|
7444 | var children = _ref2.children;
|
7445 |
|
7446 | var _useDropdownToggle = useDropdownToggle(),
|
7447 | props = _useDropdownToggle[0],
|
7448 | meta = _useDropdownToggle[1];
|
7449 |
|
7450 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, children(props, meta));
|
7451 | }
|
7452 |
|
7453 | DropdownToggle.displayName = 'ReactOverlaysDropdownToggle';
|
7454 | DropdownToggle.propTypes = DropdownToggle_propTypes;
|
7455 |
|
7456 |
|
7457 | const esm_DropdownToggle = (DropdownToggle);
|
7458 | ;
|
7459 |
|
7460 |
|
7461 |
|
7462 |
|
7463 |
|
7464 |
|
7465 |
|
7466 |
|
7467 |
|
7468 |
|
7469 |
|
7470 |
|
7471 |
|
7472 | var Dropdown_propTypes = {
|
7473 | |
7474 |
|
7475 |
|
7476 |
|
7477 |
|
7478 |
|
7479 |
|
7480 |
|
7481 |
|
7482 |
|
7483 |
|
7484 | children: (prop_types_default()).node,
|
7485 |
|
7486 | |
7487 |
|
7488 |
|
7489 | drop: prop_types_default().oneOf(['up', 'left', 'right', 'down']),
|
7490 |
|
7491 | |
7492 |
|
7493 |
|
7494 |
|
7495 |
|
7496 |
|
7497 |
|
7498 |
|
7499 | focusFirstItemOnShow: prop_types_default().oneOf([false, true, 'keyboard']),
|
7500 |
|
7501 | |
7502 |
|
7503 |
|
7504 |
|
7505 |
|
7506 | itemSelector: (prop_types_default()).string,
|
7507 |
|
7508 | |
7509 |
|
7510 |
|
7511 | alignEnd: (prop_types_default()).bool,
|
7512 |
|
7513 | |
7514 |
|
7515 |
|
7516 |
|
7517 |
|
7518 | show: (prop_types_default()).bool,
|
7519 |
|
7520 | |
7521 |
|
7522 |
|
7523 | defaultShow: (prop_types_default()).bool,
|
7524 |
|
7525 | |
7526 |
|
7527 |
|
7528 |
|
7529 |
|
7530 |
|
7531 |
|
7532 |
|
7533 |
|
7534 |
|
7535 |
|
7536 |
|
7537 |
|
7538 | onToggle: (prop_types_default()).func
|
7539 | };
|
7540 |
|
7541 | function useRefWithUpdate() {
|
7542 | var forceUpdate = useForceUpdate();
|
7543 | var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
7544 | var attachRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (element) {
|
7545 | ref.current = element;
|
7546 |
|
7547 | forceUpdate();
|
7548 | }, [forceUpdate]);
|
7549 | return [ref, attachRef];
|
7550 | }
|
7551 |
|
7552 |
|
7553 |
|
7554 |
|
7555 |
|
7556 |
|
7557 | function Dropdown(_ref) {
|
7558 | var drop = _ref.drop,
|
7559 | alignEnd = _ref.alignEnd,
|
7560 | defaultShow = _ref.defaultShow,
|
7561 | rawShow = _ref.show,
|
7562 | rawOnToggle = _ref.onToggle,
|
7563 | _ref$itemSelector = _ref.itemSelector,
|
7564 | itemSelector = _ref$itemSelector === void 0 ? '* > *' : _ref$itemSelector,
|
7565 | focusFirstItemOnShow = _ref.focusFirstItemOnShow,
|
7566 | children = _ref.children;
|
7567 |
|
7568 | var _useUncontrolledProp = useUncontrolledProp(rawShow, defaultShow, rawOnToggle),
|
7569 | show = _useUncontrolledProp[0],
|
7570 | onToggle = _useUncontrolledProp[1];
|
7571 |
|
7572 |
|
7573 |
|
7574 |
|
7575 | var _useRefWithUpdate = useRefWithUpdate(),
|
7576 | menuRef = _useRefWithUpdate[0],
|
7577 | setMenu = _useRefWithUpdate[1];
|
7578 |
|
7579 | var menuElement = menuRef.current;
|
7580 |
|
7581 | var _useRefWithUpdate2 = useRefWithUpdate(),
|
7582 | toggleRef = _useRefWithUpdate2[0],
|
7583 | setToggle = _useRefWithUpdate2[1];
|
7584 |
|
7585 | var toggleElement = toggleRef.current;
|
7586 | var lastShow = usePrevious(show);
|
7587 | var lastSourceEvent = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
7588 | var focusInDropdown = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
7589 | var toggle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (nextShow, event) {
|
7590 | onToggle(nextShow, event);
|
7591 | }, [onToggle]);
|
7592 | var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
7593 | return {
|
7594 | toggle: toggle,
|
7595 | drop: drop,
|
7596 | show: show,
|
7597 | alignEnd: alignEnd,
|
7598 | menuElement: menuElement,
|
7599 | toggleElement: toggleElement,
|
7600 | setMenu: setMenu,
|
7601 | setToggle: setToggle
|
7602 | };
|
7603 | }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);
|
7604 |
|
7605 | if (menuElement && lastShow && !show) {
|
7606 | focusInDropdown.current = menuElement.contains(document.activeElement);
|
7607 | }
|
7608 |
|
7609 | var focusToggle = useEventCallback(function () {
|
7610 | if (toggleElement && toggleElement.focus) {
|
7611 | toggleElement.focus();
|
7612 | }
|
7613 | });
|
7614 | var maybeFocusFirst = useEventCallback(function () {
|
7615 | var type = lastSourceEvent.current;
|
7616 | var focusType = focusFirstItemOnShow;
|
7617 |
|
7618 | if (focusType == null) {
|
7619 | focusType = menuRef.current && matches(menuRef.current, '[role=menu]') ? 'keyboard' : false;
|
7620 | }
|
7621 |
|
7622 | if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {
|
7623 | return;
|
7624 | }
|
7625 |
|
7626 | var first = qsa(menuRef.current, itemSelector)[0];
|
7627 | if (first && first.focus) first.focus();
|
7628 | });
|
7629 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
7630 | if (show) maybeFocusFirst();else if (focusInDropdown.current) {
|
7631 | focusInDropdown.current = false;
|
7632 | focusToggle();
|
7633 | }
|
7634 | }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);
|
7635 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
7636 | lastSourceEvent.current = null;
|
7637 | });
|
7638 |
|
7639 | var getNextFocusedChild = function getNextFocusedChild(current, offset) {
|
7640 | if (!menuRef.current) return null;
|
7641 | var items = qsa(menuRef.current, itemSelector);
|
7642 | var index = items.indexOf(current) + offset;
|
7643 | index = Math.max(0, Math.min(index, items.length));
|
7644 | return items[index];
|
7645 | };
|
7646 |
|
7647 | useGlobalListener('keydown', function (event) {
|
7648 | var _menuRef$current, _toggleRef$current;
|
7649 |
|
7650 | var key = event.key;
|
7651 | var target = event.target;
|
7652 | var fromMenu = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(target);
|
7653 | var fromToggle = (_toggleRef$current = toggleRef.current) == null ? void 0 : _toggleRef$current.contains(target);
|
7654 |
|
7655 |
|
7656 | var isInput = /input|textarea/i.test(target.tagName);
|
7657 |
|
7658 | if (isInput && (key === ' ' || key !== 'Escape' && fromMenu)) {
|
7659 | return;
|
7660 | }
|
7661 |
|
7662 | if (!fromMenu && !fromToggle) {
|
7663 | return;
|
7664 | }
|
7665 |
|
7666 | if (!menuRef.current && key === 'Tab') {
|
7667 | return;
|
7668 | }
|
7669 |
|
7670 | lastSourceEvent.current = event.type;
|
7671 |
|
7672 | switch (key) {
|
7673 | case 'ArrowUp':
|
7674 | {
|
7675 | var next = getNextFocusedChild(target, -1);
|
7676 | if (next && next.focus) next.focus();
|
7677 | event.preventDefault();
|
7678 | return;
|
7679 | }
|
7680 |
|
7681 | case 'ArrowDown':
|
7682 | event.preventDefault();
|
7683 |
|
7684 | if (!show) {
|
7685 | onToggle(true, event);
|
7686 | } else {
|
7687 | var _next = getNextFocusedChild(target, 1);
|
7688 |
|
7689 | if (_next && _next.focus) _next.focus();
|
7690 | }
|
7691 |
|
7692 | return;
|
7693 |
|
7694 | case 'Tab':
|
7695 |
|
7696 |
|
7697 |
|
7698 |
|
7699 | esm_addEventListener(document, 'keyup', function (e) {
|
7700 | var _menuRef$current2;
|
7701 |
|
7702 | if (e.key === 'Tab' && !e.target || !((_menuRef$current2 = menuRef.current) != null && _menuRef$current2.contains(e.target))) {
|
7703 | onToggle(false, event);
|
7704 | }
|
7705 | }, {
|
7706 | once: true
|
7707 | });
|
7708 | break;
|
7709 |
|
7710 | case 'Escape':
|
7711 | event.preventDefault();
|
7712 | event.stopPropagation();
|
7713 | onToggle(false, event);
|
7714 | break;
|
7715 |
|
7716 | default:
|
7717 | }
|
7718 | });
|
7719 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_DropdownContext.Provider, {
|
7720 | value: context
|
7721 | }, children);
|
7722 | }
|
7723 |
|
7724 | Dropdown.displayName = 'ReactOverlaysDropdown';
|
7725 | Dropdown.propTypes = Dropdown_propTypes;
|
7726 | Dropdown.Menu = esm_DropdownMenu;
|
7727 | Dropdown.Toggle = esm_DropdownToggle;
|
7728 | const esm_Dropdown = (Dropdown);
|
7729 | ;
|
7730 |
|
7731 |
|
7732 | var NavContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
|
7733 | NavContext.displayName = 'NavContext';
|
7734 | const src_NavContext = (NavContext);
|
7735 | ;
|
7736 |
|
7737 |
|
7738 | var DropdownItem_excluded = ["bsPrefix", "className", "children", "eventKey", "disabled", "href", "onClick", "onSelect", "active", "as"];
|
7739 |
|
7740 | var DropdownItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownItem.tsx",
|
7741 | DropdownItem_this = undefined;
|
7742 |
|
7743 |
|
7744 |
|
7745 |
|
7746 |
|
7747 |
|
7748 |
|
7749 |
|
7750 |
|
7751 | var DropdownItem_propTypes = {
|
7752 |
|
7753 | bsPrefix: (prop_types_default()).string,
|
7754 |
|
7755 | |
7756 |
|
7757 |
|
7758 | active: (prop_types_default()).bool,
|
7759 |
|
7760 | |
7761 |
|
7762 |
|
7763 | disabled: (prop_types_default()).bool,
|
7764 |
|
7765 | |
7766 |
|
7767 |
|
7768 | eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
|
7769 |
|
7770 | |
7771 |
|
7772 |
|
7773 | href: (prop_types_default()).string,
|
7774 |
|
7775 | |
7776 |
|
7777 |
|
7778 | onClick: (prop_types_default()).func,
|
7779 |
|
7780 | |
7781 |
|
7782 |
|
7783 |
|
7784 |
|
7785 |
|
7786 |
|
7787 | onSelect: (prop_types_default()).func,
|
7788 | as: (prop_types_default()).elementType
|
7789 | };
|
7790 | var DropdownItem_defaultProps = {
|
7791 | as: src_SafeAnchor,
|
7792 | disabled: false
|
7793 | };
|
7794 | var DropdownItem = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
7795 | var bsPrefix = _ref.bsPrefix,
|
7796 | className = _ref.className,
|
7797 | children = _ref.children,
|
7798 | eventKey = _ref.eventKey,
|
7799 | disabled = _ref.disabled,
|
7800 | href = _ref.href,
|
7801 | onClick = _ref.onClick,
|
7802 | onSelect = _ref.onSelect,
|
7803 | propActive = _ref.active,
|
7804 | Component = _ref.as,
|
7805 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownItem_excluded);
|
7806 |
|
7807 | var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-item');
|
7808 | var onSelectCtx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
|
7809 | var navContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_NavContext);
|
7810 |
|
7811 | var _ref2 = navContext || {},
|
7812 | activeKey = _ref2.activeKey;
|
7813 |
|
7814 | var key = makeEventKey(eventKey, href);
|
7815 | var active = propActive == null && key != null ? makeEventKey(activeKey) === key : propActive;
|
7816 | var handleClick = useEventCallback(function (event) {
|
7817 |
|
7818 |
|
7819 | if (disabled) return;
|
7820 | if (onClick) onClick(event);
|
7821 | if (onSelectCtx) onSelectCtx(key, event);
|
7822 | if (onSelect) onSelect(key, event);
|
7823 | });
|
7824 | return (
|
7825 |
|
7826 |
|
7827 |
|
7828 | external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
7829 | ref: ref,
|
7830 | href: href,
|
7831 | disabled: disabled,
|
7832 | className: classnames_default()(className, prefix, active && 'active', disabled && 'disabled'),
|
7833 | onClick: handleClick,
|
7834 | __self: DropdownItem_this,
|
7835 | __source: {
|
7836 | fileName: DropdownItem_jsxFileName,
|
7837 | lineNumber: 119,
|
7838 | columnNumber: 7
|
7839 | }
|
7840 | }), children)
|
7841 | );
|
7842 | });
|
7843 | DropdownItem.displayName = 'DropdownItem';
|
7844 | DropdownItem.propTypes = DropdownItem_propTypes;
|
7845 | DropdownItem.defaultProps = DropdownItem_defaultProps;
|
7846 | const src_DropdownItem = (DropdownItem);
|
7847 | ;
|
7848 |
|
7849 |
|
7850 | var toFnRef = function toFnRef(ref) {
|
7851 | return !ref || typeof ref === 'function' ? ref : function (value) {
|
7852 | ref.current = value;
|
7853 | };
|
7854 | };
|
7855 |
|
7856 | function mergeRefs(refA, refB) {
|
7857 | var a = toFnRef(refA);
|
7858 | var b = toFnRef(refB);
|
7859 | return function (value) {
|
7860 | if (a) a(value);
|
7861 | if (b) b(value);
|
7862 | };
|
7863 | }
|
7864 |
|
7865 |
|
7866 |
|
7867 |
|
7868 |
|
7869 |
|
7870 |
|
7871 |
|
7872 |
|
7873 |
|
7874 |
|
7875 |
|
7876 |
|
7877 |
|
7878 |
|
7879 |
|
7880 |
|
7881 | function useMergedRefs(refA, refB) {
|
7882 | return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
7883 | return mergeRefs(refA, refB);
|
7884 | }, [refA, refB]);
|
7885 | }
|
7886 |
|
7887 | const esm_useMergedRefs = (useMergedRefs);
|
7888 | ;
|
7889 |
|
7890 |
|
7891 | var NavbarContext_context = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
|
7892 | NavbarContext_context.displayName = 'NavbarContext';
|
7893 | const NavbarContext = (NavbarContext_context);
|
7894 | ;
|
7895 |
|
7896 |
|
7897 |
|
7898 | function useWrappedRefWithWarning(ref, componentName) {
|
7899 |
|
7900 | if (true) return ref;
|
7901 |
|
7902 | var warningRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (refValue) {
|
7903 | !(refValue == null || !refValue.isReactComponent) ? false ? 0 : browser_default()(false) : void 0;
|
7904 | }, [componentName]);
|
7905 |
|
7906 | return esm_useMergedRefs(warningRef, ref);
|
7907 | }
|
7908 | ;
|
7909 |
|
7910 |
|
7911 |
|
7912 |
|
7913 |
|
7914 |
|
7915 | function hasClass(element, className) {
|
7916 | if (element.classList) return !!className && element.classList.contains(className);
|
7917 | return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
|
7918 | }
|
7919 | ;
|
7920 |
|
7921 |
|
7922 |
|
7923 |
|
7924 | function getMargins(element) {
|
7925 | var styles = window.getComputedStyle(element);
|
7926 | var top = parseFloat(styles.marginTop) || 0;
|
7927 | var right = parseFloat(styles.marginRight) || 0;
|
7928 | var bottom = parseFloat(styles.marginBottom) || 0;
|
7929 | var left = parseFloat(styles.marginLeft) || 0;
|
7930 | return {
|
7931 | top: top,
|
7932 | right: right,
|
7933 | bottom: bottom,
|
7934 | left: left
|
7935 | };
|
7936 | }
|
7937 |
|
7938 | function usePopperMarginModifiers() {
|
7939 | var overlayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
7940 | var margins = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
7941 | var arrowMargins = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
7942 | var popoverClass = useBootstrapPrefix(undefined, 'popover');
|
7943 | var dropdownMenuClass = useBootstrapPrefix(undefined, 'dropdown-menu');
|
7944 | var callback = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (overlay) {
|
7945 | if (!overlay || !(hasClass(overlay, popoverClass) || hasClass(overlay, dropdownMenuClass))) return;
|
7946 | margins.current = getMargins(overlay);
|
7947 | overlay.style.margin = '0';
|
7948 | overlayRef.current = overlay;
|
7949 | }, [popoverClass, dropdownMenuClass]);
|
7950 | var offset = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
7951 | return {
|
7952 | name: 'offset',
|
7953 | options: {
|
7954 | offset: function offset(_ref) {
|
7955 | var placement = _ref.placement;
|
7956 | if (!margins.current) return [0, 0];
|
7957 | var _margins$current = margins.current,
|
7958 | top = _margins$current.top,
|
7959 | left = _margins$current.left,
|
7960 | bottom = _margins$current.bottom,
|
7961 | right = _margins$current.right;
|
7962 |
|
7963 | switch (placement.split('-')[0]) {
|
7964 | case 'top':
|
7965 | return [0, bottom];
|
7966 |
|
7967 | case 'left':
|
7968 | return [0, right];
|
7969 |
|
7970 | case 'bottom':
|
7971 | return [0, top];
|
7972 |
|
7973 | case 'right':
|
7974 | return [0, left];
|
7975 |
|
7976 | default:
|
7977 | return [0, 0];
|
7978 | }
|
7979 | }
|
7980 | }
|
7981 | };
|
7982 | }, [margins]);
|
7983 | var arrow = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
7984 | return {
|
7985 | name: 'arrow',
|
7986 | options: {
|
7987 | padding: function padding() {
|
7988 |
|
7989 |
|
7990 | if (!arrowMargins.current) {
|
7991 | return 0;
|
7992 | }
|
7993 |
|
7994 | var _arrowMargins$current = arrowMargins.current,
|
7995 | top = _arrowMargins$current.top,
|
7996 | right = _arrowMargins$current.right;
|
7997 | var padding = top || right;
|
7998 | return {
|
7999 | top: padding,
|
8000 | left: padding,
|
8001 | right: padding,
|
8002 | bottom: padding
|
8003 | };
|
8004 | }
|
8005 | }
|
8006 | };
|
8007 | }, [arrowMargins]);
|
8008 |
|
8009 | var popoverArrowMargins = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
8010 | return {
|
8011 | name: 'popoverArrowMargins',
|
8012 | enabled: true,
|
8013 | phase: 'main',
|
8014 | fn: function fn() {
|
8015 | return undefined;
|
8016 | },
|
8017 | requiresIfExists: ['arrow'],
|
8018 | effect: function effect(_ref2) {
|
8019 | var state = _ref2.state;
|
8020 |
|
8021 | if (!overlayRef.current || !state.elements.arrow || !hasClass(overlayRef.current, popoverClass)) {
|
8022 | return undefined;
|
8023 | }
|
8024 |
|
8025 | if (state.modifiersData['arrow#persistent']) {
|
8026 |
|
8027 | var _getMargins = getMargins(state.elements.arrow),
|
8028 | top = _getMargins.top,
|
8029 | right = _getMargins.right;
|
8030 |
|
8031 | var padding = top || right;
|
8032 | state.modifiersData['arrow#persistent'].padding = {
|
8033 | top: padding,
|
8034 | left: padding,
|
8035 | right: padding,
|
8036 | bottom: padding
|
8037 | };
|
8038 | } else {
|
8039 |
|
8040 |
|
8041 |
|
8042 | arrowMargins.current = getMargins(state.elements.arrow);
|
8043 | }
|
8044 |
|
8045 | state.elements.arrow.style.margin = '0';
|
8046 | return function () {
|
8047 | if (state.elements.arrow) state.elements.arrow.style.margin = '';
|
8048 | };
|
8049 | }
|
8050 | };
|
8051 | }, [popoverClass]);
|
8052 | return [callback, [offset, arrow, popoverArrowMargins]];
|
8053 | }
|
8054 | ;
|
8055 |
|
8056 |
|
8057 | var DropdownMenu_excluded = ["bsPrefix", "className", "align", "alignRight", "rootCloseEvent", "flip", "show", "renderOnMount", "as", "popperConfig"];
|
8058 |
|
8059 | var DropdownMenu_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownMenu.tsx",
|
8060 | DropdownMenu_this = undefined;
|
8061 |
|
8062 |
|
8063 |
|
8064 |
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 |
|
8070 |
|
8071 |
|
8072 | var alignDirection = prop_types_default().oneOf(['left', 'right']);
|
8073 | var alignPropType = prop_types_default().oneOfType([alignDirection, prop_types_default().shape({
|
8074 | sm: alignDirection
|
8075 | }), prop_types_default().shape({
|
8076 | md: alignDirection
|
8077 | }), prop_types_default().shape({
|
8078 | lg: alignDirection
|
8079 | }), prop_types_default().shape({
|
8080 | xl: alignDirection
|
8081 | })]);
|
8082 | var src_DropdownMenu_propTypes = {
|
8083 | |
8084 |
|
8085 |
|
8086 | bsPrefix: (prop_types_default()).string,
|
8087 |
|
8088 |
|
8089 | show: (prop_types_default()).bool,
|
8090 |
|
8091 |
|
8092 | renderOnMount: (prop_types_default()).bool,
|
8093 |
|
8094 |
|
8095 | flip: (prop_types_default()).bool,
|
8096 |
|
8097 | |
8098 |
|
8099 |
|
8100 |
|
8101 |
|
8102 |
|
8103 |
|
8104 |
|
8105 |
|
8106 | align: alignPropType,
|
8107 |
|
8108 | |
8109 |
|
8110 |
|
8111 |
|
8112 |
|
8113 | alignRight: (prop_types_default()).bool,
|
8114 | onSelect: (prop_types_default()).func,
|
8115 |
|
8116 | |
8117 |
|
8118 |
|
8119 |
|
8120 |
|
8121 |
|
8122 |
|
8123 | rootCloseEvent: prop_types_default().oneOf(['click', 'mousedown']),
|
8124 |
|
8125 | |
8126 |
|
8127 |
|
8128 |
|
8129 |
|
8130 |
|
8131 |
|
8132 | as: (prop_types_default()).elementType,
|
8133 |
|
8134 | |
8135 |
|
8136 |
|
8137 | popperConfig: (prop_types_default()).object
|
8138 | };
|
8139 | var src_DropdownMenu_defaultProps = {
|
8140 | align: 'left',
|
8141 | alignRight: false,
|
8142 | flip: true
|
8143 | };
|
8144 | var DropdownMenu_DropdownMenu = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
8145 | var bsPrefix = _ref.bsPrefix,
|
8146 | className = _ref.className,
|
8147 | align = _ref.align,
|
8148 | alignRight = _ref.alignRight,
|
8149 | rootCloseEvent = _ref.rootCloseEvent,
|
8150 | flip = _ref.flip,
|
8151 | showProps = _ref.show,
|
8152 | renderOnMount = _ref.renderOnMount,
|
8153 | _ref$as = _ref.as,
|
8154 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
8155 | popperConfig = _ref.popperConfig,
|
8156 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownMenu_excluded);
|
8157 |
|
8158 | var isNavbar = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
|
8159 | var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-menu');
|
8160 |
|
8161 | var _usePopperMarginModif = usePopperMarginModifiers(),
|
8162 | popperRef = _usePopperMarginModif[0],
|
8163 | marginModifiers = _usePopperMarginModif[1];
|
8164 |
|
8165 | var alignClasses = [];
|
8166 |
|
8167 | if (align) {
|
8168 | if (typeof align === 'object') {
|
8169 | var keys = Object.keys(align);
|
8170 | false ? 0 : void 0;
|
8171 |
|
8172 | if (keys.length) {
|
8173 | var brkPoint = keys[0];
|
8174 | var direction = align[brkPoint];
|
8175 |
|
8176 |
|
8177 |
|
8178 | alignRight = direction === 'left';
|
8179 | alignClasses.push(prefix + "-" + brkPoint + "-" + direction);
|
8180 | }
|
8181 | } else if (align === 'right') {
|
8182 | alignRight = true;
|
8183 | }
|
8184 | }
|
8185 |
|
8186 | var _useDropdownMenu = useDropdownMenu({
|
8187 | flip: flip,
|
8188 | rootCloseEvent: rootCloseEvent,
|
8189 | show: showProps,
|
8190 | alignEnd: alignRight,
|
8191 | usePopper: !isNavbar && alignClasses.length === 0,
|
8192 | popperConfig: extends_extends({}, popperConfig, {
|
8193 | modifiers: marginModifiers.concat((popperConfig == null ? void 0 : popperConfig.modifiers) || [])
|
8194 | })
|
8195 | }),
|
8196 | menuProps = _useDropdownMenu[0],
|
8197 | _useDropdownMenu$ = _useDropdownMenu[1],
|
8198 | hasShown = _useDropdownMenu$.hasShown,
|
8199 | popper = _useDropdownMenu$.popper,
|
8200 | show = _useDropdownMenu$.show,
|
8201 | alignEnd = _useDropdownMenu$.alignEnd,
|
8202 | toggle = _useDropdownMenu$.toggle;
|
8203 |
|
8204 | menuProps.ref = esm_useMergedRefs(popperRef, esm_useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref));
|
8205 | if (!hasShown && !renderOnMount) return null;
|
8206 |
|
8207 | if (typeof Component !== 'string') {
|
8208 | menuProps.show = show;
|
8209 |
|
8210 | menuProps.close = function () {
|
8211 | return toggle == null ? void 0 : toggle(false);
|
8212 | };
|
8213 |
|
8214 | menuProps.alignRight = alignEnd;
|
8215 | }
|
8216 |
|
8217 | var style = props.style;
|
8218 |
|
8219 | if (popper != null && popper.placement) {
|
8220 |
|
8221 |
|
8222 | style = extends_extends({}, props.style, menuProps.style);
|
8223 | props['x-placement'] = popper.placement;
|
8224 | }
|
8225 |
|
8226 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, menuProps, {
|
8227 | style: style,
|
8228 | className: classnames_default().apply(void 0, [className, prefix, show && 'show', alignEnd && prefix + "-right"].concat(alignClasses)),
|
8229 | __self: DropdownMenu_this,
|
8230 | __source: {
|
8231 | fileName: DropdownMenu_jsxFileName,
|
8232 | lineNumber: 208,
|
8233 | columnNumber: 7
|
8234 | }
|
8235 | }));
|
8236 | });
|
8237 | DropdownMenu_DropdownMenu.displayName = 'DropdownMenu';
|
8238 | DropdownMenu_DropdownMenu.propTypes = src_DropdownMenu_propTypes;
|
8239 | DropdownMenu_DropdownMenu.defaultProps = src_DropdownMenu_defaultProps;
|
8240 | const src_DropdownMenu = (DropdownMenu_DropdownMenu);
|
8241 |
|
8242 | var isRequiredForA11y = __webpack_require__(422);
|
8243 | var isRequiredForA11y_default = __webpack_require__.n(isRequiredForA11y);
|
8244 | ;
|
8245 |
|
8246 |
|
8247 | var DropdownToggle_excluded = ["bsPrefix", "split", "className", "childBsPrefix", "as"];
|
8248 |
|
8249 | var DropdownToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownToggle.tsx",
|
8250 | DropdownToggle_this = undefined;
|
8251 |
|
8252 |
|
8253 |
|
8254 |
|
8255 |
|
8256 |
|
8257 |
|
8258 |
|
8259 |
|
8260 |
|
8261 | var src_DropdownToggle_propTypes = {
|
8262 | |
8263 |
|
8264 |
|
8265 | bsPrefix: (prop_types_default()).string,
|
8266 |
|
8267 | |
8268 |
|
8269 |
|
8270 |
|
8271 |
|
8272 | id: isRequiredForA11y_default()((prop_types_default()).any),
|
8273 | split: (prop_types_default()).bool,
|
8274 | as: (prop_types_default()).elementType,
|
8275 |
|
8276 | |
8277 |
|
8278 |
|
8279 |
|
8280 | childBsPrefix: (prop_types_default()).string
|
8281 | };
|
8282 | var DropdownToggle_DropdownToggle = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
8283 | var bsPrefix = _ref.bsPrefix,
|
8284 | split = _ref.split,
|
8285 | className = _ref.className,
|
8286 | childBsPrefix = _ref.childBsPrefix,
|
8287 | _ref$as = _ref.as,
|
8288 | Component = _ref$as === void 0 ? src_Button : _ref$as,
|
8289 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownToggle_excluded);
|
8290 |
|
8291 | var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');
|
8292 |
|
8293 | if (childBsPrefix !== undefined) {
|
8294 | props.bsPrefix = childBsPrefix;
|
8295 | }
|
8296 |
|
8297 | var _useDropdownToggle = useDropdownToggle(),
|
8298 | toggleProps = _useDropdownToggle[0];
|
8299 |
|
8300 | toggleProps.ref = esm_useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle'));
|
8301 |
|
8302 |
|
8303 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
8304 | className: classnames_default()(className, prefix, split && prefix + "-split")
|
8305 | }, toggleProps, props, {
|
8306 | __self: DropdownToggle_this,
|
8307 | __source: {
|
8308 | fileName: DropdownToggle_jsxFileName,
|
8309 | lineNumber: 84,
|
8310 | columnNumber: 7
|
8311 | }
|
8312 | }));
|
8313 | });
|
8314 | DropdownToggle_DropdownToggle.displayName = 'DropdownToggle';
|
8315 | DropdownToggle_DropdownToggle.propTypes = src_DropdownToggle_propTypes;
|
8316 | const src_DropdownToggle = (DropdownToggle_DropdownToggle);
|
8317 | ;
|
8318 |
|
8319 |
|
8320 | var Dropdown_excluded = ["bsPrefix", "drop", "show", "className", "alignRight", "onSelect", "onToggle", "focusFirstItemOnShow", "as", "navbar"];
|
8321 |
|
8322 | var Dropdown_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Dropdown.tsx",
|
8323 | Dropdown_this = undefined;
|
8324 |
|
8325 |
|
8326 |
|
8327 |
|
8328 |
|
8329 |
|
8330 |
|
8331 |
|
8332 |
|
8333 |
|
8334 |
|
8335 |
|
8336 |
|
8337 | var DropdownHeader = createWithBsPrefix('dropdown-header', {
|
8338 | defaultProps: {
|
8339 | role: 'heading'
|
8340 | }
|
8341 | });
|
8342 | var DropdownDivider = createWithBsPrefix('dropdown-divider', {
|
8343 | defaultProps: {
|
8344 | role: 'separator'
|
8345 | }
|
8346 | });
|
8347 | var DropdownItemText = createWithBsPrefix('dropdown-item-text', {
|
8348 | Component: 'span'
|
8349 | });
|
8350 | var src_Dropdown_propTypes = {
|
8351 |
|
8352 | bsPrefix: (prop_types_default()).string,
|
8353 |
|
8354 | |
8355 |
|
8356 |
|
8357 | drop: prop_types_default().oneOf(['up', 'left', 'right', 'down']),
|
8358 | as: (prop_types_default()).elementType,
|
8359 |
|
8360 | |
8361 |
|
8362 |
|
8363 | alignRight: (prop_types_default()).bool,
|
8364 |
|
8365 | |
8366 |
|
8367 |
|
8368 |
|
8369 |
|
8370 | show: (prop_types_default()).bool,
|
8371 |
|
8372 | |
8373 |
|
8374 |
|
8375 |
|
8376 |
|
8377 | flip: (prop_types_default()).bool,
|
8378 |
|
8379 | |
8380 |
|
8381 |
|
8382 |
|
8383 |
|
8384 |
|
8385 |
|
8386 |
|
8387 |
|
8388 |
|
8389 |
|
8390 |
|
8391 |
|
8392 |
|
8393 |
|
8394 |
|
8395 | onToggle: (prop_types_default()).func,
|
8396 |
|
8397 | |
8398 |
|
8399 |
|
8400 |
|
8401 |
|
8402 |
|
8403 |
|
8404 | onSelect: (prop_types_default()).func,
|
8405 |
|
8406 | |
8407 |
|
8408 |
|
8409 |
|
8410 |
|
8411 |
|
8412 |
|
8413 |
|
8414 | focusFirstItemOnShow: prop_types_default().oneOf([false, true, 'keyboard']),
|
8415 |
|
8416 |
|
8417 | navbar: (prop_types_default()).bool
|
8418 | };
|
8419 | var Dropdown_defaultProps = {
|
8420 | navbar: false
|
8421 | };
|
8422 | var Dropdown_Dropdown = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (pProps, ref) {
|
8423 | var _useUncontrolled = useUncontrolled(pProps, {
|
8424 | show: 'onToggle'
|
8425 | }),
|
8426 | bsPrefix = _useUncontrolled.bsPrefix,
|
8427 | drop = _useUncontrolled.drop,
|
8428 | show = _useUncontrolled.show,
|
8429 | className = _useUncontrolled.className,
|
8430 | alignRight = _useUncontrolled.alignRight,
|
8431 | onSelect = _useUncontrolled.onSelect,
|
8432 | onToggle = _useUncontrolled.onToggle,
|
8433 | focusFirstItemOnShow = _useUncontrolled.focusFirstItemOnShow,
|
8434 | _useUncontrolled$as = _useUncontrolled.as,
|
8435 | Component = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
|
8436 | _4 = _useUncontrolled.navbar,
|
8437 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Dropdown_excluded);
|
8438 |
|
8439 | var onSelectCtx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
|
8440 | var prefix = useBootstrapPrefix(bsPrefix, 'dropdown');
|
8441 | var handleToggle = useEventCallback(function (nextShow, event, source) {
|
8442 | if (source === void 0) {
|
8443 | source = event.type;
|
8444 | }
|
8445 |
|
8446 | if (event.currentTarget === document && (source !== 'keydown' || event.key === 'Escape')) source = 'rootClose';
|
8447 |
|
8448 | if (onToggle) {
|
8449 | onToggle(nextShow, event, {
|
8450 | source: source
|
8451 | });
|
8452 | }
|
8453 | });
|
8454 | var handleSelect = useEventCallback(function (key, event) {
|
8455 | if (onSelectCtx) onSelectCtx(key, event);
|
8456 | if (onSelect) onSelect(key, event);
|
8457 | handleToggle(false, event, 'select');
|
8458 | });
|
8459 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
|
8460 | value: handleSelect,
|
8461 | __self: Dropdown_this,
|
8462 | __source: {
|
8463 | fileName: Dropdown_jsxFileName,
|
8464 | lineNumber: 166,
|
8465 | columnNumber: 5
|
8466 | }
|
8467 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Dropdown, {
|
8468 | drop: drop,
|
8469 | show: show,
|
8470 | alignEnd: alignRight,
|
8471 | onToggle: handleToggle,
|
8472 | focusFirstItemOnShow: focusFirstItemOnShow,
|
8473 | itemSelector: "." + prefix + "-item:not(.disabled):not(:disabled)",
|
8474 | __self: Dropdown_this,
|
8475 | __source: {
|
8476 | fileName: Dropdown_jsxFileName,
|
8477 | lineNumber: 167,
|
8478 | columnNumber: 7
|
8479 | }
|
8480 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
8481 | ref: ref,
|
8482 | className: classnames_default()(className, show && 'show', (!drop || drop === 'down') && prefix, drop === 'up' && 'dropup', drop === 'right' && 'dropright', drop === 'left' && 'dropleft'),
|
8483 | __self: Dropdown_this,
|
8484 | __source: {
|
8485 | fileName: Dropdown_jsxFileName,
|
8486 | lineNumber: 175,
|
8487 | columnNumber: 9
|
8488 | }
|
8489 | }))));
|
8490 | });
|
8491 | Dropdown_Dropdown.displayName = 'Dropdown';
|
8492 | Dropdown_Dropdown.propTypes = src_Dropdown_propTypes;
|
8493 | Dropdown_Dropdown.defaultProps = Dropdown_defaultProps;
|
8494 | Dropdown_Dropdown.Divider = DropdownDivider;
|
8495 | Dropdown_Dropdown.Header = DropdownHeader;
|
8496 | Dropdown_Dropdown.Item = src_DropdownItem;
|
8497 | Dropdown_Dropdown.ItemText = DropdownItemText;
|
8498 | Dropdown_Dropdown.Menu = src_DropdownMenu;
|
8499 | Dropdown_Dropdown.Toggle = src_DropdownToggle;
|
8500 | const src_Dropdown = (Dropdown_Dropdown);
|
8501 | ;
|
8502 |
|
8503 |
|
8504 | var DropdownButton_excluded = ["title", "children", "bsPrefix", "rootCloseEvent", "variant", "size", "menuAlign", "menuRole", "renderMenuOnMount", "disabled", "href", "id"];
|
8505 |
|
8506 | var DropdownButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownButton.tsx",
|
8507 | DropdownButton_this = undefined;
|
8508 |
|
8509 |
|
8510 |
|
8511 |
|
8512 |
|
8513 |
|
8514 | var DropdownButton_propTypes = {
|
8515 | |
8516 |
|
8517 |
|
8518 |
|
8519 |
|
8520 | id: (prop_types_default()).any,
|
8521 |
|
8522 |
|
8523 | href: (prop_types_default()).string,
|
8524 |
|
8525 |
|
8526 | onClick: (prop_types_default()).func,
|
8527 |
|
8528 |
|
8529 | title: (prop_types_default()).node.isRequired,
|
8530 |
|
8531 |
|
8532 | disabled: (prop_types_default()).bool,
|
8533 |
|
8534 | |
8535 |
|
8536 |
|
8537 |
|
8538 |
|
8539 |
|
8540 |
|
8541 | menuAlign: alignPropType,
|
8542 |
|
8543 |
|
8544 | menuRole: (prop_types_default()).string,
|
8545 |
|
8546 |
|
8547 | renderMenuOnMount: (prop_types_default()).bool,
|
8548 |
|
8549 | |
8550 |
|
8551 |
|
8552 |
|
8553 |
|
8554 | rootCloseEvent: (prop_types_default()).string,
|
8555 |
|
8556 |
|
8557 | bsPrefix: (prop_types_default()).string,
|
8558 |
|
8559 |
|
8560 | variant: (prop_types_default()).string,
|
8561 |
|
8562 |
|
8563 | size: (prop_types_default()).string
|
8564 | };
|
8565 |
|
8566 |
|
8567 |
|
8568 |
|
8569 |
|
8570 |
|
8571 |
|
8572 |
|
8573 |
|
8574 |
|
8575 | var DropdownButton = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
8576 | var title = _ref.title,
|
8577 | children = _ref.children,
|
8578 | bsPrefix = _ref.bsPrefix,
|
8579 | rootCloseEvent = _ref.rootCloseEvent,
|
8580 | variant = _ref.variant,
|
8581 | size = _ref.size,
|
8582 | menuAlign = _ref.menuAlign,
|
8583 | menuRole = _ref.menuRole,
|
8584 | renderMenuOnMount = _ref.renderMenuOnMount,
|
8585 | disabled = _ref.disabled,
|
8586 | href = _ref.href,
|
8587 | id = _ref.id,
|
8588 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, DropdownButton_excluded);
|
8589 |
|
8590 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown, extends_extends({
|
8591 | ref: ref
|
8592 | }, props, {
|
8593 | __self: DropdownButton_this,
|
8594 | __source: {
|
8595 | fileName: DropdownButton_jsxFileName,
|
8596 | lineNumber: 110,
|
8597 | columnNumber: 5
|
8598 | }
|
8599 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_DropdownToggle, {
|
8600 | id: id,
|
8601 | href: href,
|
8602 | size: size,
|
8603 | variant: variant,
|
8604 | disabled: disabled,
|
8605 | childBsPrefix: bsPrefix,
|
8606 | __self: DropdownButton_this,
|
8607 | __source: {
|
8608 | fileName: DropdownButton_jsxFileName,
|
8609 | lineNumber: 111,
|
8610 | columnNumber: 7
|
8611 | }
|
8612 | }, title), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_DropdownMenu, {
|
8613 | align: menuAlign,
|
8614 | role: menuRole,
|
8615 | renderOnMount: renderMenuOnMount,
|
8616 | rootCloseEvent: rootCloseEvent,
|
8617 | __self: DropdownButton_this,
|
8618 | __source: {
|
8619 | fileName: DropdownButton_jsxFileName,
|
8620 | lineNumber: 121,
|
8621 | columnNumber: 7
|
8622 | }
|
8623 | }, children));
|
8624 | });
|
8625 | DropdownButton.displayName = 'DropdownButton';
|
8626 | DropdownButton.propTypes = DropdownButton_propTypes;
|
8627 | const src_DropdownButton = (DropdownButton);
|
8628 |
|
8629 | var lib_all = __webpack_require__(946);
|
8630 | var all_default = __webpack_require__.n(lib_all);
|
8631 | ;
|
8632 |
|
8633 |
|
8634 | var Feedback_excluded = ["as", "className", "type", "tooltip"];
|
8635 |
|
8636 | var Feedback_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Feedback.tsx",
|
8637 | Feedback_this = undefined;
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 | var Feedback_propTypes = {
|
8643 | |
8644 |
|
8645 |
|
8646 |
|
8647 |
|
8648 | type: (prop_types_default()).string,
|
8649 |
|
8650 |
|
8651 | tooltip: (prop_types_default()).bool,
|
8652 | as: (prop_types_default()).elementType
|
8653 | };
|
8654 | var Feedback = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(
|
8655 | function (_ref, ref) {
|
8656 | var _ref$as = _ref.as,
|
8657 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
8658 | className = _ref.className,
|
8659 | _ref$type = _ref.type,
|
8660 | type = _ref$type === void 0 ? 'valid' : _ref$type,
|
8661 | _ref$tooltip = _ref.tooltip,
|
8662 | tooltip = _ref$tooltip === void 0 ? false : _ref$tooltip,
|
8663 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Feedback_excluded);
|
8664 |
|
8665 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
8666 | ref: ref,
|
8667 | className: classnames_default()(className, type + "-" + (tooltip ? 'tooltip' : 'feedback')),
|
8668 | __self: Feedback_this,
|
8669 | __source: {
|
8670 | fileName: Feedback_jsxFileName,
|
8671 | lineNumber: 41,
|
8672 | columnNumber: 5
|
8673 | }
|
8674 | }));
|
8675 | });
|
8676 | Feedback.displayName = 'Feedback';
|
8677 | Feedback.propTypes = Feedback_propTypes;
|
8678 | const src_Feedback = (Feedback);
|
8679 | ;
|
8680 |
|
8681 |
|
8682 | var FormContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
|
8683 | controlId: undefined
|
8684 | });
|
8685 | const src_FormContext = (FormContext);
|
8686 | ;
|
8687 |
|
8688 |
|
8689 | var FormCheckInput_excluded = ["id", "bsPrefix", "bsCustomPrefix", "className", "type", "isValid", "isInvalid", "isStatic", "as"];
|
8690 |
|
8691 | var FormCheckInput_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheckInput.tsx",
|
8692 | FormCheckInput_this = undefined;
|
8693 |
|
8694 |
|
8695 |
|
8696 |
|
8697 |
|
8698 |
|
8699 | var FormCheckInput_propTypes = {
|
8700 | |
8701 |
|
8702 |
|
8703 | bsPrefix: (prop_types_default()).string,
|
8704 |
|
8705 | |
8706 |
|
8707 |
|
8708 |
|
8709 |
|
8710 | bsCustomPrefix: (prop_types_default()).string,
|
8711 |
|
8712 | |
8713 |
|
8714 |
|
8715 |
|
8716 |
|
8717 | as: (prop_types_default()).elementType,
|
8718 |
|
8719 |
|
8720 | id: (prop_types_default()).string,
|
8721 |
|
8722 |
|
8723 | type: prop_types_default().oneOf(['radio', 'checkbox']).isRequired,
|
8724 |
|
8725 | |
8726 |
|
8727 |
|
8728 |
|
8729 | isStatic: (prop_types_default()).bool,
|
8730 |
|
8731 |
|
8732 | isValid: (prop_types_default()).bool,
|
8733 |
|
8734 |
|
8735 | isInvalid: (prop_types_default()).bool
|
8736 | };
|
8737 | var FormCheckInput = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
8738 | var id = _ref.id,
|
8739 | bsPrefix = _ref.bsPrefix,
|
8740 | bsCustomPrefix = _ref.bsCustomPrefix,
|
8741 | className = _ref.className,
|
8742 | _ref$type = _ref.type,
|
8743 | type = _ref$type === void 0 ? 'checkbox' : _ref$type,
|
8744 | _ref$isValid = _ref.isValid,
|
8745 | isValid = _ref$isValid === void 0 ? false : _ref$isValid,
|
8746 | _ref$isInvalid = _ref.isInvalid,
|
8747 | isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
|
8748 | isStatic = _ref.isStatic,
|
8749 | _ref$as = _ref.as,
|
8750 | Component = _ref$as === void 0 ? 'input' : _ref$as,
|
8751 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormCheckInput_excluded);
|
8752 |
|
8753 | var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
|
8754 | controlId = _useContext.controlId,
|
8755 | custom = _useContext.custom;
|
8756 |
|
8757 | var _ref2 = custom ? [bsCustomPrefix, 'custom-control-input'] : [bsPrefix, 'form-check-input'],
|
8758 | prefix = _ref2[0],
|
8759 | defaultPrefix = _ref2[1];
|
8760 |
|
8761 | bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
|
8762 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
8763 | ref: ref,
|
8764 | type: type,
|
8765 | id: id || controlId,
|
8766 | className: classnames_default()(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid', isStatic && 'position-static'),
|
8767 | __self: FormCheckInput_this,
|
8768 | __source: {
|
8769 | fileName: FormCheckInput_jsxFileName,
|
8770 | lineNumber: 88,
|
8771 | columnNumber: 7
|
8772 | }
|
8773 | }));
|
8774 | });
|
8775 | FormCheckInput.displayName = 'FormCheckInput';
|
8776 | FormCheckInput.propTypes = FormCheckInput_propTypes;
|
8777 | const src_FormCheckInput = (FormCheckInput);
|
8778 | ;
|
8779 |
|
8780 |
|
8781 | var FormCheckLabel_excluded = ["bsPrefix", "bsCustomPrefix", "className", "htmlFor"];
|
8782 |
|
8783 | var FormCheckLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheckLabel.tsx",
|
8784 | FormCheckLabel_this = undefined;
|
8785 |
|
8786 |
|
8787 |
|
8788 |
|
8789 |
|
8790 |
|
8791 | var FormCheckLabel_propTypes = {
|
8792 | |
8793 |
|
8794 |
|
8795 | bsPrefix: (prop_types_default()).string,
|
8796 |
|
8797 | |
8798 |
|
8799 |
|
8800 |
|
8801 |
|
8802 | bsCustomPrefix: (prop_types_default()).string,
|
8803 |
|
8804 |
|
8805 | htmlFor: (prop_types_default()).string
|
8806 | };
|
8807 | var FormCheckLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
8808 | var bsPrefix = _ref.bsPrefix,
|
8809 | bsCustomPrefix = _ref.bsCustomPrefix,
|
8810 | className = _ref.className,
|
8811 | htmlFor = _ref.htmlFor,
|
8812 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormCheckLabel_excluded);
|
8813 |
|
8814 | var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
|
8815 | controlId = _useContext.controlId,
|
8816 | custom = _useContext.custom;
|
8817 |
|
8818 | var _ref2 = custom ? [bsCustomPrefix, 'custom-control-label'] : [bsPrefix, 'form-check-label'],
|
8819 | prefix = _ref2[0],
|
8820 | defaultPrefix = _ref2[1];
|
8821 |
|
8822 | bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
|
8823 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", extends_extends({}, props, {
|
8824 | ref: ref,
|
8825 | htmlFor: htmlFor || controlId,
|
8826 | className: classnames_default()(className, bsPrefix),
|
8827 | __self: FormCheckLabel_this,
|
8828 | __source: {
|
8829 | fileName: FormCheckLabel_jsxFileName,
|
8830 | lineNumber: 42,
|
8831 | columnNumber: 7
|
8832 | }
|
8833 | }));
|
8834 | });
|
8835 | FormCheckLabel.displayName = 'FormCheckLabel';
|
8836 | FormCheckLabel.propTypes = FormCheckLabel_propTypes;
|
8837 | const src_FormCheckLabel = (FormCheckLabel);
|
8838 | ;
|
8839 |
|
8840 |
|
8841 | var FormCheck_excluded = ["id", "bsPrefix", "bsCustomPrefix", "inline", "disabled", "isValid", "isInvalid", "feedbackTooltip", "feedback", "className", "style", "title", "type", "label", "children", "custom", "as"];
|
8842 |
|
8843 | var FormCheck_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheck.tsx",
|
8844 | FormCheck_this = undefined;
|
8845 |
|
8846 |
|
8847 |
|
8848 |
|
8849 |
|
8850 |
|
8851 |
|
8852 |
|
8853 |
|
8854 |
|
8855 | var FormCheck_propTypes = {
|
8856 | |
8857 |
|
8858 |
|
8859 | bsPrefix: (prop_types_default()).string,
|
8860 |
|
8861 | |
8862 |
|
8863 |
|
8864 |
|
8865 |
|
8866 | bsCustomPrefix: (prop_types_default()).string,
|
8867 |
|
8868 | |
8869 |
|
8870 |
|
8871 |
|
8872 |
|
8873 |
|
8874 |
|
8875 | _ref: (prop_types_default()).any,
|
8876 |
|
8877 | |
8878 |
|
8879 |
|
8880 |
|
8881 |
|
8882 | as: (prop_types_default()).elementType,
|
8883 |
|
8884 | |
8885 |
|
8886 |
|
8887 |
|
8888 |
|
8889 |
|
8890 |
|
8891 | id: (prop_types_default()).string,
|
8892 |
|
8893 | |
8894 |
|
8895 |
|
8896 |
|
8897 |
|
8898 |
|
8899 |
|
8900 |
|
8901 |
|
8902 |
|
8903 |
|
8904 | children: (prop_types_default()).node,
|
8905 |
|
8906 | |
8907 |
|
8908 |
|
8909 | inline: (prop_types_default()).bool,
|
8910 |
|
8911 | |
8912 |
|
8913 |
|
8914 | disabled: (prop_types_default()).bool,
|
8915 |
|
8916 | |
8917 |
|
8918 |
|
8919 | title: (prop_types_default()).string,
|
8920 |
|
8921 | |
8922 |
|
8923 |
|
8924 | label: (prop_types_default()).node,
|
8925 |
|
8926 |
|
8927 | custom: all_default()((prop_types_default()).bool, function (_ref) {
|
8928 | var custom = _ref.custom,
|
8929 | id = _ref.id;
|
8930 | return custom && !id ? Error('Custom check controls require an id to work') : null;
|
8931 | }),
|
8932 |
|
8933 | |
8934 |
|
8935 |
|
8936 |
|
8937 | type: all_default()(prop_types_default().oneOf(['radio', 'checkbox', 'switch']).isRequired, function (_ref2) {
|
8938 | var type = _ref2.type,
|
8939 | custom = _ref2.custom;
|
8940 | return type === 'switch' && custom === false ? Error('`custom` cannot be set to `false` when the type is `switch`') : null;
|
8941 | }, function (_ref3) {
|
8942 | var type = _ref3.type,
|
8943 | id = _ref3.id;
|
8944 | return type === 'switch' && !id ? Error('`id` must be defined when the type is `switch`') : null;
|
8945 | }),
|
8946 |
|
8947 |
|
8948 | isValid: (prop_types_default()).bool,
|
8949 |
|
8950 |
|
8951 | isInvalid: (prop_types_default()).bool,
|
8952 |
|
8953 |
|
8954 | feedbackTooltip: (prop_types_default()).bool,
|
8955 |
|
8956 |
|
8957 | feedback: (prop_types_default()).node
|
8958 | };
|
8959 | var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref4, ref) {
|
8960 | var id = _ref4.id,
|
8961 | bsPrefix = _ref4.bsPrefix,
|
8962 | bsCustomPrefix = _ref4.bsCustomPrefix,
|
8963 | _ref4$inline = _ref4.inline,
|
8964 | inline = _ref4$inline === void 0 ? false : _ref4$inline,
|
8965 | _ref4$disabled = _ref4.disabled,
|
8966 | disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
8967 | _ref4$isValid = _ref4.isValid,
|
8968 | isValid = _ref4$isValid === void 0 ? false : _ref4$isValid,
|
8969 | _ref4$isInvalid = _ref4.isInvalid,
|
8970 | isInvalid = _ref4$isInvalid === void 0 ? false : _ref4$isInvalid,
|
8971 | _ref4$feedbackTooltip = _ref4.feedbackTooltip,
|
8972 | feedbackTooltip = _ref4$feedbackTooltip === void 0 ? false : _ref4$feedbackTooltip,
|
8973 | feedback = _ref4.feedback,
|
8974 | className = _ref4.className,
|
8975 | style = _ref4.style,
|
8976 | _ref4$title = _ref4.title,
|
8977 | title = _ref4$title === void 0 ? '' : _ref4$title,
|
8978 | _ref4$type = _ref4.type,
|
8979 | type = _ref4$type === void 0 ? 'checkbox' : _ref4$type,
|
8980 | label = _ref4.label,
|
8981 | children = _ref4.children,
|
8982 | propCustom = _ref4.custom,
|
8983 | _ref4$as = _ref4.as,
|
8984 | as = _ref4$as === void 0 ? 'input' : _ref4$as,
|
8985 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref4, FormCheck_excluded);
|
8986 |
|
8987 | var custom = type === 'switch' ? true : propCustom;
|
8988 |
|
8989 | var _ref5 = custom ? [bsCustomPrefix, 'custom-control'] : [bsPrefix, 'form-check'],
|
8990 | prefix = _ref5[0],
|
8991 | defaultPrefix = _ref5[1];
|
8992 |
|
8993 | bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
|
8994 |
|
8995 | var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
|
8996 | controlId = _useContext.controlId;
|
8997 |
|
8998 | var innerFormContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
8999 | return {
|
9000 | controlId: id || controlId,
|
9001 | custom: custom
|
9002 | };
|
9003 | }, [controlId, custom, id]);
|
9004 | var hasLabel = custom || label != null && label !== false && !children;
|
9005 | var input = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormCheckInput, extends_extends({}, props, {
|
9006 | type: type === 'switch' ? 'checkbox' : type,
|
9007 | ref: ref,
|
9008 | isValid: isValid,
|
9009 | isInvalid: isInvalid,
|
9010 | isStatic: !hasLabel,
|
9011 | disabled: disabled,
|
9012 | as: as,
|
9013 | __self: FormCheck_this,
|
9014 | __source: {
|
9015 | fileName: FormCheck_jsxFileName,
|
9016 | lineNumber: 186,
|
9017 | columnNumber: 7
|
9018 | }
|
9019 | }));
|
9020 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormContext.Provider, {
|
9021 | value: innerFormContext,
|
9022 | __self: FormCheck_this,
|
9023 | __source: {
|
9024 | fileName: FormCheck_jsxFileName,
|
9025 | lineNumber: 199,
|
9026 | columnNumber: 7
|
9027 | }
|
9028 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
9029 | style: style,
|
9030 | className: classnames_default()(className, bsPrefix, custom && "custom-" + type, inline && bsPrefix + "-inline"),
|
9031 | __self: FormCheck_this,
|
9032 | __source: {
|
9033 | fileName: FormCheck_jsxFileName,
|
9034 | lineNumber: 200,
|
9035 | columnNumber: 9
|
9036 | }
|
9037 | }, children || external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, input, hasLabel && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormCheckLabel, {
|
9038 | title: title,
|
9039 | __self: FormCheck_this,
|
9040 | __source: {
|
9041 | fileName: FormCheck_jsxFileName,
|
9042 | lineNumber: 213,
|
9043 | columnNumber: 17
|
9044 | }
|
9045 | }, label), (isValid || isInvalid) && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Feedback, {
|
9046 | type: isValid ? 'valid' : 'invalid',
|
9047 | tooltip: feedbackTooltip,
|
9048 | __self: FormCheck_this,
|
9049 | __source: {
|
9050 | fileName: FormCheck_jsxFileName,
|
9051 | lineNumber: 216,
|
9052 | columnNumber: 17
|
9053 | }
|
9054 | }, feedback))));
|
9055 | });
|
9056 | FormCheck.displayName = 'FormCheck';
|
9057 | FormCheck.propTypes = FormCheck_propTypes;
|
9058 | FormCheck.Input = src_FormCheckInput;
|
9059 | FormCheck.Label = src_FormCheckLabel;
|
9060 | const src_FormCheck = (FormCheck);
|
9061 | ;
|
9062 |
|
9063 |
|
9064 | var FormFileInput_excluded = ["id", "bsPrefix", "bsCustomPrefix", "className", "isValid", "isInvalid", "lang", "as"];
|
9065 |
|
9066 | var FormFileInput_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormFileInput.tsx",
|
9067 | FormFileInput_this = undefined;
|
9068 |
|
9069 |
|
9070 |
|
9071 |
|
9072 |
|
9073 |
|
9074 | var FormFileInput_propTypes = {
|
9075 | |
9076 |
|
9077 |
|
9078 | bsPrefix: (prop_types_default()).string,
|
9079 |
|
9080 | |
9081 |
|
9082 |
|
9083 |
|
9084 |
|
9085 | bsCustomPrefix: (prop_types_default()).string,
|
9086 |
|
9087 | |
9088 |
|
9089 |
|
9090 |
|
9091 |
|
9092 | as: (prop_types_default()).elementType,
|
9093 |
|
9094 |
|
9095 | id: (prop_types_default()).string,
|
9096 |
|
9097 |
|
9098 | isValid: (prop_types_default()).bool,
|
9099 |
|
9100 |
|
9101 | isInvalid: (prop_types_default()).bool,
|
9102 |
|
9103 |
|
9104 | lang: (prop_types_default()).string
|
9105 | };
|
9106 | var FormFileInput = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
9107 | var id = _ref.id,
|
9108 | bsPrefix = _ref.bsPrefix,
|
9109 | bsCustomPrefix = _ref.bsCustomPrefix,
|
9110 | className = _ref.className,
|
9111 | isValid = _ref.isValid,
|
9112 | isInvalid = _ref.isInvalid,
|
9113 | lang = _ref.lang,
|
9114 | _ref$as = _ref.as,
|
9115 | Component = _ref$as === void 0 ? 'input' : _ref$as,
|
9116 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormFileInput_excluded);
|
9117 |
|
9118 | var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
|
9119 | controlId = _useContext.controlId,
|
9120 | custom = _useContext.custom;
|
9121 |
|
9122 | var type = 'file';
|
9123 |
|
9124 | var _ref2 = custom ? [bsCustomPrefix, 'custom-file-input'] : [bsPrefix, 'form-control-file'],
|
9125 | prefix = _ref2[0],
|
9126 | defaultPrefix = _ref2[1];
|
9127 |
|
9128 | bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
|
9129 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
9130 | ref: ref,
|
9131 | id: id || controlId,
|
9132 | type: type,
|
9133 | lang: lang,
|
9134 | className: classnames_default()(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid'),
|
9135 | __self: FormFileInput_this,
|
9136 | __source: {
|
9137 | fileName: FormFileInput_jsxFileName,
|
9138 | lineNumber: 83,
|
9139 | columnNumber: 7
|
9140 | }
|
9141 | }));
|
9142 | });
|
9143 | FormFileInput.displayName = 'FormFileInput';
|
9144 | FormFileInput.propTypes = FormFileInput_propTypes;
|
9145 | const src_FormFileInput = (FormFileInput);
|
9146 | ;
|
9147 |
|
9148 |
|
9149 | var FormFileLabel_excluded = ["bsPrefix", "bsCustomPrefix", "className", "htmlFor"];
|
9150 |
|
9151 | var FormFileLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormFileLabel.tsx",
|
9152 | FormFileLabel_this = undefined;
|
9153 |
|
9154 |
|
9155 |
|
9156 |
|
9157 |
|
9158 |
|
9159 | var FormFileLabel_propTypes = {
|
9160 | |
9161 |
|
9162 |
|
9163 | bsPrefix: (prop_types_default()).string,
|
9164 |
|
9165 | |
9166 |
|
9167 |
|
9168 |
|
9169 |
|
9170 | bsCustomPrefix: (prop_types_default()).string,
|
9171 |
|
9172 |
|
9173 | htmlFor: (prop_types_default()).string,
|
9174 |
|
9175 |
|
9176 | 'data-browse': (prop_types_default()).string
|
9177 | };
|
9178 | var FormFileLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
9179 | var bsPrefix = _ref.bsPrefix,
|
9180 | bsCustomPrefix = _ref.bsCustomPrefix,
|
9181 | className = _ref.className,
|
9182 | htmlFor = _ref.htmlFor,
|
9183 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormFileLabel_excluded);
|
9184 |
|
9185 | var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
|
9186 | controlId = _useContext.controlId,
|
9187 | custom = _useContext.custom;
|
9188 |
|
9189 | var _ref2 = custom ? [bsCustomPrefix, 'custom-file-label'] : [bsPrefix, 'form-file-label'],
|
9190 | prefix = _ref2[0],
|
9191 | defaultPrefix = _ref2[1];
|
9192 |
|
9193 | bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
|
9194 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", extends_extends({}, props, {
|
9195 | ref: ref,
|
9196 | htmlFor: htmlFor || controlId,
|
9197 | className: classnames_default()(className, bsPrefix),
|
9198 | "data-browse": props['data-browse'],
|
9199 | __self: FormFileLabel_this,
|
9200 | __source: {
|
9201 | fileName: FormFileLabel_jsxFileName,
|
9202 | lineNumber: 53,
|
9203 | columnNumber: 5
|
9204 | }
|
9205 | }));
|
9206 | });
|
9207 | FormFileLabel.displayName = 'FormFileLabel';
|
9208 | FormFileLabel.propTypes = FormFileLabel_propTypes;
|
9209 | const src_FormFileLabel = (FormFileLabel);
|
9210 | ;
|
9211 |
|
9212 |
|
9213 | var FormFile_excluded = ["id", "bsPrefix", "bsCustomPrefix", "disabled", "isValid", "isInvalid", "feedbackTooltip", "feedback", "className", "style", "label", "children", "custom", "lang", "data-browse", "as", "inputAs"];
|
9214 |
|
9215 | var FormFile_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormFile.tsx",
|
9216 | FormFile_this = undefined;
|
9217 |
|
9218 |
|
9219 |
|
9220 |
|
9221 |
|
9222 |
|
9223 |
|
9224 |
|
9225 |
|
9226 |
|
9227 | var FormFile_propTypes = {
|
9228 | |
9229 |
|
9230 |
|
9231 | bsPrefix: (prop_types_default()).string,
|
9232 |
|
9233 | |
9234 |
|
9235 |
|
9236 |
|
9237 |
|
9238 | bsCustomPrefix: (prop_types_default()).string,
|
9239 |
|
9240 | |
9241 |
|
9242 |
|
9243 |
|
9244 |
|
9245 | as: (prop_types_default()).elementType,
|
9246 |
|
9247 | |
9248 |
|
9249 |
|
9250 |
|
9251 |
|
9252 | inputAs: (prop_types_default()).elementType,
|
9253 |
|
9254 |
|
9255 | id: (prop_types_default()).string,
|
9256 |
|
9257 | |
9258 |
|
9259 |
|
9260 |
|
9261 |
|
9262 |
|
9263 |
|
9264 |
|
9265 |
|
9266 |
|
9267 |
|
9268 |
|
9269 |
|
9270 |
|
9271 |
|
9272 |
|
9273 |
|
9274 |
|
9275 |
|
9276 |
|
9277 |
|
9278 | children: (prop_types_default()).node,
|
9279 | disabled: (prop_types_default()).bool,
|
9280 | label: (prop_types_default()).node,
|
9281 |
|
9282 |
|
9283 | custom: (prop_types_default()).bool,
|
9284 |
|
9285 |
|
9286 | isValid: (prop_types_default()).bool,
|
9287 |
|
9288 |
|
9289 | isInvalid: (prop_types_default()).bool,
|
9290 |
|
9291 |
|
9292 | feedbackTooltip: (prop_types_default()).bool,
|
9293 |
|
9294 |
|
9295 | feedback: (prop_types_default()).node,
|
9296 |
|
9297 | |
9298 |
|
9299 |
|
9300 |
|
9301 |
|
9302 | 'data-browse': all_default()((prop_types_default()).string, function (_ref) {
|
9303 | var custom = _ref.custom,
|
9304 | dataBrowse = _ref['data-browse'];
|
9305 | return dataBrowse && !custom ? Error('`data-browse` attribute value will only be used when custom is `true`') : null;
|
9306 | }),
|
9307 |
|
9308 |
|
9309 | lang: all_default()((prop_types_default()).string, function (_ref2) {
|
9310 | var custom = _ref2.custom,
|
9311 | lang = _ref2.lang;
|
9312 | return lang && !custom ? Error('`lang` can only be set when custom is `true`') : null;
|
9313 | })
|
9314 | };
|
9315 | var FormFile = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref3, ref) {
|
9316 | var id = _ref3.id,
|
9317 | bsPrefix = _ref3.bsPrefix,
|
9318 | bsCustomPrefix = _ref3.bsCustomPrefix,
|
9319 | _ref3$disabled = _ref3.disabled,
|
9320 | disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
|
9321 | _ref3$isValid = _ref3.isValid,
|
9322 | isValid = _ref3$isValid === void 0 ? false : _ref3$isValid,
|
9323 | _ref3$isInvalid = _ref3.isInvalid,
|
9324 | isInvalid = _ref3$isInvalid === void 0 ? false : _ref3$isInvalid,
|
9325 | _ref3$feedbackTooltip = _ref3.feedbackTooltip,
|
9326 | feedbackTooltip = _ref3$feedbackTooltip === void 0 ? false : _ref3$feedbackTooltip,
|
9327 | feedback = _ref3.feedback,
|
9328 | className = _ref3.className,
|
9329 | style = _ref3.style,
|
9330 | label = _ref3.label,
|
9331 | children = _ref3.children,
|
9332 | custom = _ref3.custom,
|
9333 | lang = _ref3.lang,
|
9334 | dataBrowse = _ref3['data-browse'],
|
9335 | _ref3$as = _ref3.as,
|
9336 | Component = _ref3$as === void 0 ? 'div' : _ref3$as,
|
9337 | _ref3$inputAs = _ref3.inputAs,
|
9338 | inputAs = _ref3$inputAs === void 0 ? 'input' : _ref3$inputAs,
|
9339 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref3, FormFile_excluded);
|
9340 |
|
9341 | var _ref4 = custom ? [bsCustomPrefix, 'custom'] : [bsPrefix, 'form-file'],
|
9342 | prefix = _ref4[0],
|
9343 | defaultPrefix = _ref4[1];
|
9344 |
|
9345 | bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
|
9346 | var type = 'file';
|
9347 |
|
9348 | var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
|
9349 | controlId = _useContext.controlId;
|
9350 |
|
9351 | var innerFormContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
9352 | return {
|
9353 | controlId: id || controlId,
|
9354 | custom: custom
|
9355 | };
|
9356 | }, [controlId, custom, id]);
|
9357 | var hasLabel = label != null && label !== false && !children;
|
9358 | var input = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormFileInput, extends_extends({}, props, {
|
9359 | ref: ref,
|
9360 | isValid: isValid,
|
9361 | isInvalid: isInvalid,
|
9362 | disabled: disabled,
|
9363 | as: inputAs,
|
9364 | lang: lang,
|
9365 | __self: FormFile_this,
|
9366 | __source: {
|
9367 | fileName: FormFile_jsxFileName,
|
9368 | lineNumber: 176,
|
9369 | columnNumber: 7
|
9370 | }
|
9371 | }));
|
9372 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormContext.Provider, {
|
9373 | value: innerFormContext,
|
9374 | __self: FormFile_this,
|
9375 | __source: {
|
9376 | fileName: FormFile_jsxFileName,
|
9377 | lineNumber: 188,
|
9378 | columnNumber: 7
|
9379 | }
|
9380 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, {
|
9381 | style: style,
|
9382 | className: classnames_default()(className, bsPrefix, custom && "custom-" + type),
|
9383 | __self: FormFile_this,
|
9384 | __source: {
|
9385 | fileName: FormFile_jsxFileName,
|
9386 | lineNumber: 189,
|
9387 | columnNumber: 9
|
9388 | }
|
9389 | }, children || external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, custom ? external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, input, hasLabel && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormFileLabel, {
|
9390 | "data-browse": dataBrowse,
|
9391 | __self: FormFile_this,
|
9392 | __source: {
|
9393 | fileName: FormFile_jsxFileName,
|
9394 | lineNumber: 203,
|
9395 | columnNumber: 21
|
9396 | }
|
9397 | }, label)) : external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, hasLabel && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormFileLabel, {
|
9398 | __self: FormFile_this,
|
9399 | __source: {
|
9400 | fileName: FormFile_jsxFileName,
|
9401 | lineNumber: 210,
|
9402 | columnNumber: 32
|
9403 | }
|
9404 | }, label), input), (isValid || isInvalid) && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Feedback, {
|
9405 | type: isValid ? 'valid' : 'invalid',
|
9406 | tooltip: feedbackTooltip,
|
9407 | __self: FormFile_this,
|
9408 | __source: {
|
9409 | fileName: FormFile_jsxFileName,
|
9410 | lineNumber: 215,
|
9411 | columnNumber: 17
|
9412 | }
|
9413 | }, feedback))));
|
9414 | });
|
9415 | FormFile.displayName = 'FormFile';
|
9416 | FormFile.propTypes = FormFile_propTypes;
|
9417 | FormFile.Input = src_FormFileInput;
|
9418 | FormFile.Label = src_FormFileLabel;
|
9419 | const src_FormFile = (FormFile);
|
9420 | ;
|
9421 |
|
9422 |
|
9423 | var FormControl_excluded = ["bsPrefix", "bsCustomPrefix", "type", "size", "htmlSize", "id", "className", "isValid", "isInvalid", "plaintext", "readOnly", "custom", "as"];
|
9424 |
|
9425 | var FormControl_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormControl.tsx",
|
9426 | FormControl_this = undefined;
|
9427 |
|
9428 |
|
9429 |
|
9430 |
|
9431 |
|
9432 |
|
9433 |
|
9434 |
|
9435 |
|
9436 | var FormControl_propTypes = {
|
9437 | |
9438 |
|
9439 |
|
9440 | bsPrefix: (prop_types_default()).string,
|
9441 |
|
9442 | |
9443 |
|
9444 |
|
9445 |
|
9446 |
|
9447 | bsCustomPrefix: (prop_types_default()).string,
|
9448 |
|
9449 | |
9450 |
|
9451 |
|
9452 |
|
9453 |
|
9454 |
|
9455 |
|
9456 |
|
9457 | _ref: (prop_types_default()).any,
|
9458 |
|
9459 | |
9460 |
|
9461 |
|
9462 |
|
9463 |
|
9464 | size: (prop_types_default()).string,
|
9465 |
|
9466 | |
9467 |
|
9468 |
|
9469 |
|
9470 |
|
9471 | htmlSize: (prop_types_default()).number,
|
9472 |
|
9473 | |
9474 |
|
9475 |
|
9476 |
|
9477 |
|
9478 | as: (prop_types_default()).elementType,
|
9479 |
|
9480 | |
9481 |
|
9482 |
|
9483 | plaintext: (prop_types_default()).bool,
|
9484 |
|
9485 |
|
9486 | readOnly: (prop_types_default()).bool,
|
9487 |
|
9488 |
|
9489 | disabled: (prop_types_default()).bool,
|
9490 |
|
9491 | |
9492 |
|
9493 |
|
9494 |
|
9495 |
|
9496 | value: prop_types_default().oneOfType([(prop_types_default()).string, prop_types_default().arrayOf((prop_types_default()).string), (prop_types_default()).number]),
|
9497 |
|
9498 |
|
9499 | onChange: (prop_types_default()).func,
|
9500 |
|
9501 | |
9502 |
|
9503 |
|
9504 |
|
9505 | custom: all_default()((prop_types_default()).bool, function (_ref) {
|
9506 | var as = _ref.as,
|
9507 | type = _ref.type,
|
9508 | custom = _ref.custom;
|
9509 | return custom === true && type !== 'range' && as !== 'select' ? Error('`custom` can only be set to `true` when the input type is `range`, or `select`') : null;
|
9510 | }),
|
9511 |
|
9512 | |
9513 |
|
9514 |
|
9515 | type: (prop_types_default()).string,
|
9516 |
|
9517 | |
9518 |
|
9519 |
|
9520 | id: (prop_types_default()).string,
|
9521 |
|
9522 |
|
9523 | isValid: (prop_types_default()).bool,
|
9524 |
|
9525 |
|
9526 | isInvalid: (prop_types_default()).bool
|
9527 | };
|
9528 | var FormControl = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref2, ref) {
|
9529 | var bsPrefix = _ref2.bsPrefix,
|
9530 | bsCustomPrefix = _ref2.bsCustomPrefix,
|
9531 | type = _ref2.type,
|
9532 | size = _ref2.size,
|
9533 | htmlSize = _ref2.htmlSize,
|
9534 | id = _ref2.id,
|
9535 | className = _ref2.className,
|
9536 | _ref2$isValid = _ref2.isValid,
|
9537 | isValid = _ref2$isValid === void 0 ? false : _ref2$isValid,
|
9538 | _ref2$isInvalid = _ref2.isInvalid,
|
9539 | isInvalid = _ref2$isInvalid === void 0 ? false : _ref2$isInvalid,
|
9540 | plaintext = _ref2.plaintext,
|
9541 | readOnly = _ref2.readOnly,
|
9542 | custom = _ref2.custom,
|
9543 | _ref2$as = _ref2.as,
|
9544 | Component = _ref2$as === void 0 ? 'input' : _ref2$as,
|
9545 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, FormControl_excluded);
|
9546 |
|
9547 | var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
|
9548 | controlId = _useContext.controlId;
|
9549 |
|
9550 | var _ref3 = custom ? [bsCustomPrefix, 'custom'] : [bsPrefix, 'form-control'],
|
9551 | prefix = _ref3[0],
|
9552 | defaultPrefix = _ref3[1];
|
9553 |
|
9554 | bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
|
9555 | var classes;
|
9556 |
|
9557 | if (plaintext) {
|
9558 | var _classes;
|
9559 |
|
9560 | classes = (_classes = {}, _classes[bsPrefix + "-plaintext"] = true, _classes);
|
9561 | } else if (type === 'file') {
|
9562 | var _classes2;
|
9563 |
|
9564 | classes = (_classes2 = {}, _classes2[bsPrefix + "-file"] = true, _classes2);
|
9565 | } else if (type === 'range') {
|
9566 | var _classes3;
|
9567 |
|
9568 | classes = (_classes3 = {}, _classes3[bsPrefix + "-range"] = true, _classes3);
|
9569 | } else if (Component === 'select' && custom) {
|
9570 | var _classes4;
|
9571 |
|
9572 | classes = (_classes4 = {}, _classes4[bsPrefix + "-select"] = true, _classes4[bsPrefix + "-select-" + size] = size, _classes4);
|
9573 | } else {
|
9574 | var _classes5;
|
9575 |
|
9576 | classes = (_classes5 = {}, _classes5[bsPrefix] = true, _classes5[bsPrefix + "-" + size] = size, _classes5);
|
9577 | }
|
9578 |
|
9579 | false ? 0 : void 0;
|
9580 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
9581 | type: type,
|
9582 | size: htmlSize,
|
9583 | ref: ref,
|
9584 | readOnly: readOnly,
|
9585 | id: id || controlId,
|
9586 | className: classnames_default()(className, classes, isValid && "is-valid", isInvalid && "is-invalid"),
|
9587 | __self: FormControl_this,
|
9588 | __source: {
|
9589 | fileName: FormControl_jsxFileName,
|
9590 | lineNumber: 185,
|
9591 | columnNumber: 7
|
9592 | }
|
9593 | }));
|
9594 | });
|
9595 | FormControl.displayName = 'FormControl';
|
9596 | FormControl.propTypes = FormControl_propTypes;
|
9597 | const src_FormControl = (Object.assign(FormControl, {
|
9598 | Feedback: src_Feedback
|
9599 | }));
|
9600 | ;
|
9601 |
|
9602 |
|
9603 | var FormGroup_excluded = ["bsPrefix", "className", "children", "controlId", "as"];
|
9604 |
|
9605 | var FormGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormGroup.tsx",
|
9606 | FormGroup_this = undefined;
|
9607 |
|
9608 |
|
9609 |
|
9610 |
|
9611 |
|
9612 |
|
9613 | var FormGroup_propTypes = {
|
9614 | |
9615 |
|
9616 |
|
9617 | bsPrefix: (prop_types_default()).string,
|
9618 | as: (prop_types_default()).elementType,
|
9619 |
|
9620 | |
9621 |
|
9622 |
|
9623 | controlId: (prop_types_default()).string,
|
9624 |
|
9625 | |
9626 |
|
9627 |
|
9628 |
|
9629 |
|
9630 |
|
9631 |
|
9632 |
|
9633 | _ref: (prop_types_default()).any
|
9634 | };
|
9635 | var FormGroup = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
9636 | var bsPrefix = _ref.bsPrefix,
|
9637 | className = _ref.className,
|
9638 | children = _ref.children,
|
9639 | controlId = _ref.controlId,
|
9640 | _ref$as = _ref.as,
|
9641 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
9642 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormGroup_excluded);
|
9643 |
|
9644 | bsPrefix = useBootstrapPrefix(bsPrefix, 'form-group');
|
9645 | var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
9646 | return {
|
9647 | controlId: controlId
|
9648 | };
|
9649 | }, [controlId]);
|
9650 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormContext.Provider, {
|
9651 | value: context,
|
9652 | __self: FormGroup_this,
|
9653 | __source: {
|
9654 | fileName: FormGroup_jsxFileName,
|
9655 | lineNumber: 59,
|
9656 | columnNumber: 7
|
9657 | }
|
9658 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
9659 | ref: ref,
|
9660 | className: classnames_default()(className, bsPrefix),
|
9661 | __self: FormGroup_this,
|
9662 | __source: {
|
9663 | fileName: FormGroup_jsxFileName,
|
9664 | lineNumber: 60,
|
9665 | columnNumber: 9
|
9666 | }
|
9667 | }), children));
|
9668 | });
|
9669 | FormGroup.displayName = 'FormGroup';
|
9670 | FormGroup.propTypes = FormGroup_propTypes;
|
9671 | const src_FormGroup = (FormGroup);
|
9672 | ;
|
9673 |
|
9674 |
|
9675 | var FormLabel_excluded = ["as", "bsPrefix", "column", "srOnly", "className", "htmlFor"];
|
9676 |
|
9677 | var FormLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormLabel.tsx",
|
9678 | FormLabel_this = undefined;
|
9679 |
|
9680 |
|
9681 |
|
9682 |
|
9683 |
|
9684 |
|
9685 |
|
9686 |
|
9687 | var FormLabel_propTypes = {
|
9688 | |
9689 |
|
9690 |
|
9691 | bsPrefix: (prop_types_default()).string,
|
9692 |
|
9693 | |
9694 |
|
9695 |
|
9696 | htmlFor: (prop_types_default()).string,
|
9697 |
|
9698 | |
9699 |
|
9700 |
|
9701 |
|
9702 | column: prop_types_default().oneOfType([(prop_types_default()).bool, prop_types_default().oneOf(['sm', 'lg'])]),
|
9703 |
|
9704 | |
9705 |
|
9706 |
|
9707 |
|
9708 |
|
9709 |
|
9710 |
|
9711 |
|
9712 | _ref: (prop_types_default()).any,
|
9713 |
|
9714 | |
9715 |
|
9716 |
|
9717 |
|
9718 | srOnly: (prop_types_default()).bool,
|
9719 |
|
9720 |
|
9721 | as: (prop_types_default()).elementType
|
9722 | };
|
9723 | var FormLabel_defaultProps = {
|
9724 | column: false,
|
9725 | srOnly: false
|
9726 | };
|
9727 | var FormLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
9728 | var _ref$as = _ref.as,
|
9729 | Component = _ref$as === void 0 ? 'label' : _ref$as,
|
9730 | bsPrefix = _ref.bsPrefix,
|
9731 | column = _ref.column,
|
9732 | srOnly = _ref.srOnly,
|
9733 | className = _ref.className,
|
9734 | htmlFor = _ref.htmlFor,
|
9735 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormLabel_excluded);
|
9736 |
|
9737 | var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext),
|
9738 | controlId = _useContext.controlId;
|
9739 |
|
9740 | bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');
|
9741 | var columnClass = 'col-form-label';
|
9742 | if (typeof column === 'string') columnClass = columnClass + " " + columnClass + "-" + column;
|
9743 | var classes = classnames_default()(className, bsPrefix, srOnly && 'sr-only', column && columnClass);
|
9744 | false ? 0 : void 0;
|
9745 | htmlFor = htmlFor || controlId;
|
9746 | if (column) return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Col, extends_extends({
|
9747 | ref: ref,
|
9748 | as: "label",
|
9749 | className: classes,
|
9750 | htmlFor: htmlFor
|
9751 | }, props, {
|
9752 | __self: FormLabel_this,
|
9753 | __source: {
|
9754 | fileName: FormLabel_jsxFileName,
|
9755 | lineNumber: 110,
|
9756 | columnNumber: 9
|
9757 | }
|
9758 | }));
|
9759 | return (
|
9760 |
|
9761 |
|
9762 | external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
9763 | ref: ref,
|
9764 | className: classes,
|
9765 | htmlFor: htmlFor
|
9766 | }, props, {
|
9767 | __self: FormLabel_this,
|
9768 | __source: {
|
9769 | fileName: FormLabel_jsxFileName,
|
9770 | lineNumber: 121,
|
9771 | columnNumber: 7
|
9772 | }
|
9773 | }))
|
9774 | );
|
9775 | });
|
9776 | FormLabel.displayName = 'FormLabel';
|
9777 | FormLabel.propTypes = FormLabel_propTypes;
|
9778 | FormLabel.defaultProps = FormLabel_defaultProps;
|
9779 | const src_FormLabel = (FormLabel);
|
9780 | ;
|
9781 |
|
9782 |
|
9783 | var FormText_excluded = ["bsPrefix", "className", "as", "muted"];
|
9784 |
|
9785 | var FormText_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormText.tsx",
|
9786 | FormText_this = undefined;
|
9787 |
|
9788 |
|
9789 |
|
9790 |
|
9791 |
|
9792 | var FormText_propTypes = {
|
9793 |
|
9794 | bsPrefix: (prop_types_default()).string,
|
9795 |
|
9796 | |
9797 |
|
9798 |
|
9799 |
|
9800 |
|
9801 |
|
9802 |
|
9803 |
|
9804 | _ref: (prop_types_default()).any,
|
9805 |
|
9806 | |
9807 |
|
9808 |
|
9809 |
|
9810 | muted: (prop_types_default()).bool,
|
9811 | as: (prop_types_default()).elementType
|
9812 | };
|
9813 | var FormText = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(
|
9814 | function (_ref, ref) {
|
9815 | var bsPrefix = _ref.bsPrefix,
|
9816 | className = _ref.className,
|
9817 | _ref$as = _ref.as,
|
9818 | Component = _ref$as === void 0 ? 'small' : _ref$as,
|
9819 | muted = _ref.muted,
|
9820 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FormText_excluded);
|
9821 |
|
9822 | bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');
|
9823 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
9824 | ref: ref,
|
9825 | className: classnames_default()(className, bsPrefix, muted && 'text-muted'),
|
9826 | __self: FormText_this,
|
9827 | __source: {
|
9828 | fileName: FormText_jsxFileName,
|
9829 | lineNumber: 44,
|
9830 | columnNumber: 7
|
9831 | }
|
9832 | }));
|
9833 | });
|
9834 | FormText.displayName = 'FormText';
|
9835 | FormText.propTypes = FormText_propTypes;
|
9836 | const src_FormText = (FormText);
|
9837 | ;
|
9838 |
|
9839 |
|
9840 | var Switch_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Switch.tsx",
|
9841 | Switch_this = undefined;
|
9842 |
|
9843 |
|
9844 |
|
9845 | var Switch = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
9846 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_FormCheck, extends_extends({}, props, {
|
9847 | ref: ref,
|
9848 | type: "switch",
|
9849 | __self: Switch_this,
|
9850 | __source: {
|
9851 | fileName: Switch_jsxFileName,
|
9852 | lineNumber: 13,
|
9853 | columnNumber: 19
|
9854 | }
|
9855 | }));
|
9856 | });
|
9857 | Switch.displayName = 'Switch';
|
9858 | Switch.Input = src_FormCheck.Input;
|
9859 | Switch.Label = src_FormCheck.Label;
|
9860 | const src_Switch = (Switch);
|
9861 | ;
|
9862 |
|
9863 |
|
9864 | var Form_excluded = ["bsPrefix", "inline", "className", "validated", "as"];
|
9865 |
|
9866 | var Form_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Form.tsx",
|
9867 | Form_this = undefined;
|
9868 |
|
9869 |
|
9870 |
|
9871 |
|
9872 |
|
9873 |
|
9874 |
|
9875 |
|
9876 |
|
9877 |
|
9878 |
|
9879 |
|
9880 |
|
9881 | var FormRow = createWithBsPrefix('form-row');
|
9882 | var Form_propTypes = {
|
9883 | |
9884 |
|
9885 |
|
9886 | bsPrefix: (prop_types_default()).string,
|
9887 |
|
9888 | |
9889 |
|
9890 |
|
9891 |
|
9892 |
|
9893 |
|
9894 |
|
9895 |
|
9896 | _ref: (prop_types_default()).any,
|
9897 |
|
9898 | |
9899 |
|
9900 |
|
9901 |
|
9902 | inline: (prop_types_default()).bool,
|
9903 |
|
9904 | |
9905 |
|
9906 |
|
9907 |
|
9908 | validated: (prop_types_default()).bool,
|
9909 | as: (prop_types_default()).elementType
|
9910 | };
|
9911 | var Form_defaultProps = {
|
9912 | inline: false
|
9913 | };
|
9914 | var FormImpl = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
9915 | var bsPrefix = _ref.bsPrefix,
|
9916 | inline = _ref.inline,
|
9917 | className = _ref.className,
|
9918 | validated = _ref.validated,
|
9919 | _ref$as = _ref.as,
|
9920 | Component = _ref$as === void 0 ? 'form' : _ref$as,
|
9921 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Form_excluded);
|
9922 |
|
9923 | bsPrefix = useBootstrapPrefix(bsPrefix, 'form');
|
9924 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
9925 | ref: ref,
|
9926 | className: classnames_default()(className, validated && 'was-validated', inline && bsPrefix + "-inline"),
|
9927 | __self: Form_this,
|
9928 | __source: {
|
9929 | fileName: Form_jsxFileName,
|
9930 | lineNumber: 84,
|
9931 | columnNumber: 7
|
9932 | }
|
9933 | }));
|
9934 | });
|
9935 | FormImpl.displayName = 'Form';
|
9936 | FormImpl.propTypes = Form_propTypes;
|
9937 | FormImpl.defaultProps = Form_defaultProps;
|
9938 | FormImpl.Row = FormRow;
|
9939 | FormImpl.Group = src_FormGroup;
|
9940 | FormImpl.Control = src_FormControl;
|
9941 | FormImpl.Check = src_FormCheck;
|
9942 | FormImpl.File = src_FormFile;
|
9943 | FormImpl.Switch = src_Switch;
|
9944 | FormImpl.Label = src_FormLabel;
|
9945 | FormImpl.Text = src_FormText;
|
9946 | const Form = (FormImpl);
|
9947 | ;
|
9948 |
|
9949 |
|
9950 | var Container_excluded = ["bsPrefix", "fluid", "as", "className"];
|
9951 |
|
9952 | var Container_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Container.tsx",
|
9953 | Container_this = undefined;
|
9954 |
|
9955 |
|
9956 |
|
9957 |
|
9958 |
|
9959 | var containerSizes = prop_types_default().oneOfType([(prop_types_default()).bool, prop_types_default().oneOf(['sm', 'md', 'lg', 'xl'])]);
|
9960 | var Container_propTypes = {
|
9961 | |
9962 |
|
9963 |
|
9964 | bsPrefix: (prop_types_default()).string,
|
9965 |
|
9966 | |
9967 |
|
9968 |
|
9969 |
|
9970 | fluid: containerSizes,
|
9971 |
|
9972 | |
9973 |
|
9974 |
|
9975 | as: (prop_types_default()).elementType
|
9976 | };
|
9977 | var Container_defaultProps = {
|
9978 | fluid: false
|
9979 | };
|
9980 | var Container = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
9981 | var bsPrefix = _ref.bsPrefix,
|
9982 | fluid = _ref.fluid,
|
9983 | _ref$as = _ref.as,
|
9984 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
9985 | className = _ref.className,
|
9986 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Container_excluded);
|
9987 |
|
9988 | var prefix = useBootstrapPrefix(bsPrefix, 'container');
|
9989 | var suffix = typeof fluid === 'string' ? "-" + fluid : '-fluid';
|
9990 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
9991 | ref: ref
|
9992 | }, props, {
|
9993 | className: classnames_default()(className, fluid ? "" + prefix + suffix : prefix),
|
9994 | __self: Container_this,
|
9995 | __source: {
|
9996 | fileName: Container_jsxFileName,
|
9997 | lineNumber: 58,
|
9998 | columnNumber: 7
|
9999 | }
|
10000 | }));
|
10001 | });
|
10002 | Container.displayName = 'Container';
|
10003 | Container.propTypes = Container_propTypes;
|
10004 | Container.defaultProps = Container_defaultProps;
|
10005 | const src_Container = (Container);
|
10006 | ;
|
10007 |
|
10008 |
|
10009 | var Image_excluded = ["bsPrefix", "className", "fluid", "rounded", "roundedCircle", "thumbnail"];
|
10010 |
|
10011 | var Image_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Image.tsx",
|
10012 | Image_this = undefined;
|
10013 |
|
10014 |
|
10015 |
|
10016 |
|
10017 |
|
10018 | var Image_propTypes = {
|
10019 | |
10020 |
|
10021 |
|
10022 | bsPrefix: (prop_types_default()).string,
|
10023 |
|
10024 | |
10025 |
|
10026 |
|
10027 | fluid: (prop_types_default()).bool,
|
10028 |
|
10029 | |
10030 |
|
10031 |
|
10032 | rounded: (prop_types_default()).bool,
|
10033 |
|
10034 | |
10035 |
|
10036 |
|
10037 | roundedCircle: (prop_types_default()).bool,
|
10038 |
|
10039 | |
10040 |
|
10041 |
|
10042 | thumbnail: (prop_types_default()).bool
|
10043 | };
|
10044 | var Image_defaultProps = {
|
10045 | fluid: false,
|
10046 | rounded: false,
|
10047 | roundedCircle: false,
|
10048 | thumbnail: false
|
10049 | };
|
10050 | var Image = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
10051 | var bsPrefix = _ref.bsPrefix,
|
10052 | className = _ref.className,
|
10053 | fluid = _ref.fluid,
|
10054 | rounded = _ref.rounded,
|
10055 | roundedCircle = _ref.roundedCircle,
|
10056 | thumbnail = _ref.thumbnail,
|
10057 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Image_excluded);
|
10058 |
|
10059 | bsPrefix = useBootstrapPrefix(bsPrefix, 'img');
|
10060 | var classes = classnames_default()(fluid && bsPrefix + "-fluid", rounded && "rounded", roundedCircle && "rounded-circle", thumbnail && bsPrefix + "-thumbnail");
|
10061 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("img", extends_extends({
|
10062 |
|
10063 | ref: ref
|
10064 | }, props, {
|
10065 | className: classnames_default()(className, classes),
|
10066 | __self: Image_this,
|
10067 | __source: {
|
10068 | fileName: Image_jsxFileName,
|
10069 | lineNumber: 66,
|
10070 | columnNumber: 7
|
10071 | }
|
10072 | }));
|
10073 | });
|
10074 | Image.displayName = 'Image';
|
10075 | Image.propTypes = Image_propTypes;
|
10076 | Image.defaultProps = Image_defaultProps;
|
10077 | const src_Image = (Image);
|
10078 | ;
|
10079 |
|
10080 |
|
10081 | var FigureImage_excluded = ["className"];
|
10082 |
|
10083 | var FigureImage_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FigureImage.tsx",
|
10084 | FigureImage_this = undefined;
|
10085 |
|
10086 |
|
10087 |
|
10088 |
|
10089 | var FigureImage_defaultProps = {
|
10090 | fluid: true
|
10091 | };
|
10092 | var FigureImage = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
10093 | var className = _ref.className,
|
10094 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, FigureImage_excluded);
|
10095 |
|
10096 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Image, extends_extends({
|
10097 | ref: ref
|
10098 | }, props, {
|
10099 | className: classnames_default()(className, 'figure-img'),
|
10100 | __self: FigureImage_this,
|
10101 | __source: {
|
10102 | fileName: FigureImage_jsxFileName,
|
10103 | lineNumber: 10,
|
10104 | columnNumber: 5
|
10105 | }
|
10106 | }));
|
10107 | });
|
10108 | FigureImage.displayName = 'FigureImage';
|
10109 | FigureImage.propTypes = Image_propTypes;
|
10110 | FigureImage.defaultProps = FigureImage_defaultProps;
|
10111 | const src_FigureImage = (FigureImage);
|
10112 | ;
|
10113 |
|
10114 | var FigureCaption = createWithBsPrefix('figure-caption', {
|
10115 | Component: 'figcaption'
|
10116 | });
|
10117 | const src_FigureCaption = (FigureCaption);
|
10118 | ;
|
10119 |
|
10120 |
|
10121 |
|
10122 | var Figure = createWithBsPrefix('figure', {
|
10123 | Component: 'figure'
|
10124 | });
|
10125 | Figure.Image = src_FigureImage;
|
10126 | Figure.Caption = src_FigureCaption;
|
10127 | const src_Figure = (Figure);
|
10128 | ;
|
10129 |
|
10130 |
|
10131 | var InputGroup_excluded = ["bsPrefix", "size", "hasValidation", "className", "as"];
|
10132 |
|
10133 | var InputGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/InputGroup.tsx",
|
10134 | InputGroup_this = undefined;
|
10135 |
|
10136 |
|
10137 |
|
10138 |
|
10139 |
|
10140 |
|
10141 | var InputGroupAppend = createWithBsPrefix('input-group-append');
|
10142 | var InputGroupPrepend = createWithBsPrefix('input-group-prepend');
|
10143 | var InputGroupText = createWithBsPrefix('input-group-text', {
|
10144 | Component: 'span'
|
10145 | });
|
10146 |
|
10147 | var InputGroupCheckbox = function InputGroupCheckbox(props) {
|
10148 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InputGroupText, {
|
10149 | __self: InputGroup_this,
|
10150 | __source: {
|
10151 | fileName: InputGroup_jsxFileName,
|
10152 | lineNumber: 19,
|
10153 | columnNumber: 3
|
10154 | }
|
10155 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", extends_extends({
|
10156 | type: "checkbox"
|
10157 | }, props, {
|
10158 | __self: InputGroup_this,
|
10159 | __source: {
|
10160 | fileName: InputGroup_jsxFileName,
|
10161 | lineNumber: 20,
|
10162 | columnNumber: 5
|
10163 | }
|
10164 | })));
|
10165 | };
|
10166 |
|
10167 | var InputGroupRadio = function InputGroupRadio(props) {
|
10168 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(InputGroupText, {
|
10169 | __self: InputGroup_this,
|
10170 | __source: {
|
10171 | fileName: InputGroup_jsxFileName,
|
10172 | lineNumber: 25,
|
10173 | columnNumber: 3
|
10174 | }
|
10175 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", extends_extends({
|
10176 | type: "radio"
|
10177 | }, props, {
|
10178 | __self: InputGroup_this,
|
10179 | __source: {
|
10180 | fileName: InputGroup_jsxFileName,
|
10181 | lineNumber: 26,
|
10182 | columnNumber: 5
|
10183 | }
|
10184 | })));
|
10185 | };
|
10186 |
|
10187 | var InputGroup_propTypes = {
|
10188 |
|
10189 | bsPrefix: (prop_types_default()).string,
|
10190 |
|
10191 | |
10192 |
|
10193 |
|
10194 |
|
10195 |
|
10196 | size: (prop_types_default()).string,
|
10197 |
|
10198 | |
10199 |
|
10200 |
|
10201 |
|
10202 |
|
10203 | hasValidation: (prop_types_default()).bool,
|
10204 | as: (prop_types_default()).elementType
|
10205 | };
|
10206 |
|
10207 |
|
10208 |
|
10209 |
|
10210 |
|
10211 |
|
10212 |
|
10213 |
|
10214 |
|
10215 | var InputGroup = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
10216 | var bsPrefix = _ref.bsPrefix,
|
10217 | size = _ref.size,
|
10218 | hasValidation = _ref.hasValidation,
|
10219 | className = _ref.className,
|
10220 | _ref$as = _ref.as,
|
10221 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
10222 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, InputGroup_excluded);
|
10223 |
|
10224 | bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group');
|
10225 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
10226 | ref: ref
|
10227 | }, props, {
|
10228 | className: classnames_default()(className, bsPrefix, size && bsPrefix + "-" + size, hasValidation && 'has-validation'),
|
10229 | __self: InputGroup_this,
|
10230 | __source: {
|
10231 | fileName: InputGroup_jsxFileName,
|
10232 | lineNumber: 90,
|
10233 | columnNumber: 7
|
10234 | }
|
10235 | }));
|
10236 | });
|
10237 | InputGroup.propTypes = InputGroup_propTypes;
|
10238 | InputGroup.displayName = 'InputGroup';
|
10239 | InputGroup.Text = InputGroupText;
|
10240 | InputGroup.Radio = InputGroupRadio;
|
10241 | InputGroup.Checkbox = InputGroupCheckbox;
|
10242 | InputGroup.Append = InputGroupAppend;
|
10243 | InputGroup.Prepend = InputGroupPrepend;
|
10244 | const src_InputGroup = (InputGroup);
|
10245 | ;
|
10246 |
|
10247 |
|
10248 | var Jumbotron_excluded = ["as", "className", "fluid", "bsPrefix"];
|
10249 |
|
10250 | var Jumbotron_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Jumbotron.tsx",
|
10251 | Jumbotron_this = undefined;
|
10252 |
|
10253 |
|
10254 |
|
10255 |
|
10256 |
|
10257 | var Jumbotron_propTypes = {
|
10258 | as: (prop_types_default()).elementType,
|
10259 |
|
10260 |
|
10261 | fluid: (prop_types_default()).bool,
|
10262 |
|
10263 |
|
10264 | bsPrefix: (prop_types_default()).string
|
10265 | };
|
10266 | var Jumbotron_defaultProps = {
|
10267 | fluid: false
|
10268 | };
|
10269 | var Jumbotron = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
10270 | var _classes;
|
10271 |
|
10272 | var _ref$as = _ref.as,
|
10273 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
10274 | className = _ref.className,
|
10275 | fluid = _ref.fluid,
|
10276 | bsPrefix = _ref.bsPrefix,
|
10277 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Jumbotron_excluded);
|
10278 |
|
10279 | bsPrefix = useBootstrapPrefix(bsPrefix, 'jumbotron');
|
10280 | var classes = (_classes = {}, _classes[bsPrefix] = true, _classes[bsPrefix + "-fluid"] = fluid, _classes);
|
10281 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
10282 | ref: ref
|
10283 | }, props, {
|
10284 | className: classnames_default()(className, classes),
|
10285 | __self: Jumbotron_this,
|
10286 | __source: {
|
10287 | fileName: Jumbotron_jsxFileName,
|
10288 | lineNumber: 44,
|
10289 | columnNumber: 7
|
10290 | }
|
10291 | }));
|
10292 | });
|
10293 | Jumbotron.propTypes = Jumbotron_propTypes;
|
10294 | Jumbotron.defaultProps = Jumbotron_defaultProps;
|
10295 | Jumbotron.displayName = 'Jumbotron';
|
10296 | const src_Jumbotron = (Jumbotron);
|
10297 | ;
|
10298 |
|
10299 | var TabContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null);
|
10300 | const src_TabContext = (TabContext);
|
10301 | ;
|
10302 |
|
10303 |
|
10304 | var AbstractNav_excluded = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
|
10305 |
|
10306 | var AbstractNav_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AbstractNav.tsx",
|
10307 | AbstractNav_this = undefined;
|
10308 |
|
10309 |
|
10310 |
|
10311 |
|
10312 |
|
10313 |
|
10314 |
|
10315 |
|
10316 |
|
10317 |
|
10318 |
|
10319 | var AbstractNav_noop = function noop() {};
|
10320 |
|
10321 | var AbstractNav_propTypes = {
|
10322 | onSelect: (prop_types_default()).func.isRequired,
|
10323 | as: (prop_types_default()).elementType,
|
10324 | role: (prop_types_default()).string,
|
10325 |
|
10326 |
|
10327 | onKeyDown: (prop_types_default()).func,
|
10328 |
|
10329 |
|
10330 | parentOnSelect: (prop_types_default()).func,
|
10331 |
|
10332 |
|
10333 | getControlledId: (prop_types_default()).func,
|
10334 |
|
10335 |
|
10336 | getControllerId: (prop_types_default()).func,
|
10337 |
|
10338 |
|
10339 | activeKey: (prop_types_default()).any
|
10340 | };
|
10341 |
|
10342 | var AbstractNav = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
10343 | var _ref$as = _ref.as,
|
10344 | Component = _ref$as === void 0 ? 'ul' : _ref$as,
|
10345 | onSelect = _ref.onSelect,
|
10346 | activeKey = _ref.activeKey,
|
10347 | role = _ref.role,
|
10348 | onKeyDown = _ref.onKeyDown,
|
10349 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, AbstractNav_excluded);
|
10350 |
|
10351 |
|
10352 |
|
10353 | var forceUpdate = useForceUpdate();
|
10354 | var needsRefocusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
10355 | var parentOnSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
|
10356 | var tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_TabContext);
|
10357 | var getControlledId, getControllerId;
|
10358 |
|
10359 | if (tabContext) {
|
10360 | role = role || 'tablist';
|
10361 | activeKey = tabContext.activeKey;
|
10362 | getControlledId = tabContext.getControlledId;
|
10363 | getControllerId = tabContext.getControllerId;
|
10364 | }
|
10365 |
|
10366 | var listNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
10367 |
|
10368 | var getNextActiveChild = function getNextActiveChild(offset) {
|
10369 | var currentListNode = listNode.current;
|
10370 | if (!currentListNode) return null;
|
10371 | var items = qsa(currentListNode, '[data-rb-event-key]:not(.disabled)');
|
10372 | var activeChild = currentListNode.querySelector('.active');
|
10373 | if (!activeChild) return null;
|
10374 | var index = items.indexOf(activeChild);
|
10375 | if (index === -1) return null;
|
10376 | var nextIndex = index + offset;
|
10377 | if (nextIndex >= items.length) nextIndex = 0;
|
10378 | if (nextIndex < 0) nextIndex = items.length - 1;
|
10379 | return items[nextIndex];
|
10380 | };
|
10381 |
|
10382 | var handleSelect = function handleSelect(key, event) {
|
10383 | if (key == null) return;
|
10384 | if (onSelect) onSelect(key, event);
|
10385 | if (parentOnSelect) parentOnSelect(key, event);
|
10386 | };
|
10387 |
|
10388 | var handleKeyDown = function handleKeyDown(event) {
|
10389 | if (onKeyDown) onKeyDown(event);
|
10390 | var nextActiveChild;
|
10391 |
|
10392 | switch (event.key) {
|
10393 | case 'ArrowLeft':
|
10394 | case 'ArrowUp':
|
10395 | nextActiveChild = getNextActiveChild(-1);
|
10396 | break;
|
10397 |
|
10398 | case 'ArrowRight':
|
10399 | case 'ArrowDown':
|
10400 | nextActiveChild = getNextActiveChild(1);
|
10401 | break;
|
10402 |
|
10403 | default:
|
10404 | return;
|
10405 | }
|
10406 |
|
10407 | if (!nextActiveChild) return;
|
10408 | event.preventDefault();
|
10409 | handleSelect(nextActiveChild.dataset.rbEventKey, event);
|
10410 | needsRefocusRef.current = true;
|
10411 | forceUpdate();
|
10412 | };
|
10413 |
|
10414 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
10415 | if (listNode.current && needsRefocusRef.current) {
|
10416 | var activeChild = listNode.current.querySelector('[data-rb-event-key].active');
|
10417 | if (activeChild) activeChild.focus();
|
10418 | }
|
10419 |
|
10420 | needsRefocusRef.current = false;
|
10421 | });
|
10422 | var mergedRef = esm_useMergedRefs(ref, listNode);
|
10423 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
|
10424 | value: handleSelect,
|
10425 | __self: AbstractNav_this,
|
10426 | __source: {
|
10427 | fileName: AbstractNav_jsxFileName,
|
10428 | lineNumber: 141,
|
10429 | columnNumber: 7
|
10430 | }
|
10431 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_NavContext.Provider, {
|
10432 | value: {
|
10433 | role: role,
|
10434 |
|
10435 | activeKey: makeEventKey(activeKey),
|
10436 | getControlledId: getControlledId || AbstractNav_noop,
|
10437 | getControllerId: getControllerId || AbstractNav_noop
|
10438 | },
|
10439 | __self: AbstractNav_this,
|
10440 | __source: {
|
10441 | fileName: AbstractNav_jsxFileName,
|
10442 | lineNumber: 142,
|
10443 | columnNumber: 9
|
10444 | }
|
10445 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
10446 | onKeyDown: handleKeyDown,
|
10447 | ref: mergedRef,
|
10448 | role: role,
|
10449 | __self: AbstractNav_this,
|
10450 | __source: {
|
10451 | fileName: AbstractNav_jsxFileName,
|
10452 | lineNumber: 150,
|
10453 | columnNumber: 11
|
10454 | }
|
10455 | }))));
|
10456 | });
|
10457 | AbstractNav.propTypes = AbstractNav_propTypes;
|
10458 | const src_AbstractNav = (AbstractNav);
|
10459 | ;
|
10460 |
|
10461 |
|
10462 | var AbstractNavItem_excluded = ["active", "className", "eventKey", "onSelect", "onClick", "as"];
|
10463 |
|
10464 | var AbstractNavItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AbstractNavItem.tsx",
|
10465 | AbstractNavItem_this = undefined;
|
10466 |
|
10467 |
|
10468 |
|
10469 |
|
10470 |
|
10471 |
|
10472 |
|
10473 |
|
10474 | var AbstractNavItem_propTypes = {
|
10475 | id: (prop_types_default()).string,
|
10476 | active: (prop_types_default()).bool,
|
10477 | role: (prop_types_default()).string,
|
10478 | href: (prop_types_default()).string,
|
10479 | tabIndex: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]),
|
10480 | eventKey: (prop_types_default()).any,
|
10481 | onclick: (prop_types_default()).func,
|
10482 | as: (prop_types_default()).any,
|
10483 | onClick: (prop_types_default()).func,
|
10484 | onSelect: (prop_types_default()).func,
|
10485 | 'aria-controls': (prop_types_default()).string
|
10486 | };
|
10487 | var AbstractNavItem_defaultProps = {
|
10488 | disabled: false
|
10489 | };
|
10490 | var AbstractNavItem = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
10491 | var active = _ref.active,
|
10492 | className = _ref.className,
|
10493 | eventKey = _ref.eventKey,
|
10494 | onSelect = _ref.onSelect,
|
10495 | onClick = _ref.onClick,
|
10496 | Component = _ref.as,
|
10497 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, AbstractNavItem_excluded);
|
10498 |
|
10499 | var navKey = makeEventKey(eventKey, props.href);
|
10500 | var parentOnSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_SelectableContext);
|
10501 | var navContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_NavContext);
|
10502 | var isActive = active;
|
10503 |
|
10504 | if (navContext) {
|
10505 | if (!props.role && navContext.role === 'tablist') props.role = 'tab';
|
10506 | var contextControllerId = navContext.getControllerId(navKey);
|
10507 | var contextControlledId = navContext.getControlledId(navKey);
|
10508 | false ? 0 : void 0;
|
10509 | false ? 0 : void 0;
|
10510 | props['data-rb-event-key'] = navKey;
|
10511 | props.id = contextControllerId || props.id;
|
10512 | props['aria-controls'] = contextControlledId || props['aria-controls'];
|
10513 | isActive = active == null && navKey != null ? navContext.activeKey === navKey : active;
|
10514 | }
|
10515 |
|
10516 | if (props.role === 'tab') {
|
10517 | if (props.disabled) {
|
10518 | props.tabIndex = -1;
|
10519 | props['aria-disabled'] = true;
|
10520 | }
|
10521 |
|
10522 | props['aria-selected'] = isActive;
|
10523 | }
|
10524 |
|
10525 | var handleOnclick = useEventCallback(function (e) {
|
10526 | if (onClick) onClick(e);
|
10527 | if (navKey == null) return;
|
10528 | if (onSelect) onSelect(navKey, e);
|
10529 | if (parentOnSelect) parentOnSelect(navKey, e);
|
10530 | });
|
10531 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
10532 | ref: ref,
|
10533 | onClick: handleOnclick,
|
10534 | className: classnames_default()(className, isActive && 'active'),
|
10535 | __self: AbstractNavItem_this,
|
10536 | __source: {
|
10537 | fileName: AbstractNavItem_jsxFileName,
|
10538 | lineNumber: 112,
|
10539 | columnNumber: 7
|
10540 | }
|
10541 | }));
|
10542 | });
|
10543 | AbstractNavItem.propTypes = AbstractNavItem_propTypes;
|
10544 | AbstractNavItem.defaultProps = AbstractNavItem_defaultProps;
|
10545 | const src_AbstractNavItem = (AbstractNavItem);
|
10546 | ;
|
10547 |
|
10548 |
|
10549 | var ListGroupItem_excluded = ["bsPrefix", "active", "disabled", "className", "variant", "action", "as", "onClick"];
|
10550 |
|
10551 | var ListGroupItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ListGroupItem.tsx",
|
10552 | ListGroupItem_this = undefined;
|
10553 |
|
10554 |
|
10555 |
|
10556 |
|
10557 |
|
10558 |
|
10559 | var ListGroupItem_propTypes = {
|
10560 | |
10561 |
|
10562 |
|
10563 | bsPrefix: (prop_types_default()).string,
|
10564 |
|
10565 | |
10566 |
|
10567 |
|
10568 |
|
10569 | variant: (prop_types_default()).string,
|
10570 |
|
10571 | |
10572 |
|
10573 |
|
10574 |
|
10575 | action: (prop_types_default()).bool,
|
10576 |
|
10577 | |
10578 |
|
10579 |
|
10580 | active: (prop_types_default()).bool,
|
10581 |
|
10582 | |
10583 |
|
10584 |
|
10585 | disabled: (prop_types_default()).bool,
|
10586 | eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
|
10587 | onClick: (prop_types_default()).func,
|
10588 | href: (prop_types_default()).string,
|
10589 |
|
10590 | |
10591 |
|
10592 |
|
10593 |
|
10594 |
|
10595 |
|
10596 | as: (prop_types_default()).elementType
|
10597 | };
|
10598 | var ListGroupItem_defaultProps = {
|
10599 | variant: undefined,
|
10600 | active: false,
|
10601 | disabled: false
|
10602 | };
|
10603 | var ListGroupItem = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
10604 | var bsPrefix = _ref.bsPrefix,
|
10605 | active = _ref.active,
|
10606 | disabled = _ref.disabled,
|
10607 | className = _ref.className,
|
10608 | variant = _ref.variant,
|
10609 | action = _ref.action,
|
10610 | as = _ref.as,
|
10611 | onClick = _ref.onClick,
|
10612 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ListGroupItem_excluded);
|
10613 |
|
10614 | bsPrefix = useBootstrapPrefix(bsPrefix, 'list-group-item');
|
10615 | var handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (event) {
|
10616 | if (disabled) {
|
10617 | event.preventDefault();
|
10618 | event.stopPropagation();
|
10619 | return;
|
10620 | }
|
10621 |
|
10622 | if (onClick) onClick(event);
|
10623 | }, [disabled, onClick]);
|
10624 |
|
10625 | if (disabled && props.tabIndex === undefined) {
|
10626 | props.tabIndex = -1;
|
10627 | props['aria-disabled'] = true;
|
10628 | }
|
10629 |
|
10630 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AbstractNavItem, extends_extends({
|
10631 | ref: ref
|
10632 | }, props, {
|
10633 |
|
10634 | as: as || (action ? props.href ? 'a' : 'button' : 'div'),
|
10635 | onClick: handleClick,
|
10636 | className: classnames_default()(className, bsPrefix, active && 'active', disabled && 'disabled', variant && bsPrefix + "-" + variant, action && bsPrefix + "-action"),
|
10637 | __self: ListGroupItem_this,
|
10638 | __source: {
|
10639 | fileName: ListGroupItem_jsxFileName,
|
10640 | lineNumber: 107,
|
10641 | columnNumber: 7
|
10642 | }
|
10643 | }));
|
10644 | });
|
10645 | ListGroupItem.propTypes = ListGroupItem_propTypes;
|
10646 | ListGroupItem.defaultProps = ListGroupItem_defaultProps;
|
10647 | ListGroupItem.displayName = 'ListGroupItem';
|
10648 | const src_ListGroupItem = (ListGroupItem);
|
10649 | ;
|
10650 |
|
10651 |
|
10652 | var ListGroup_excluded = ["className", "bsPrefix", "variant", "horizontal", "as"];
|
10653 |
|
10654 | var ListGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ListGroup.tsx",
|
10655 | ListGroup_this = undefined;
|
10656 |
|
10657 |
|
10658 |
|
10659 |
|
10660 |
|
10661 |
|
10662 |
|
10663 |
|
10664 |
|
10665 | var ListGroup_propTypes = {
|
10666 | |
10667 |
|
10668 |
|
10669 | bsPrefix: (prop_types_default()).string,
|
10670 |
|
10671 | |
10672 |
|
10673 |
|
10674 |
|
10675 |
|
10676 | variant: prop_types_default().oneOf(['flush', undefined]),
|
10677 |
|
10678 | |
10679 |
|
10680 |
|
10681 |
|
10682 |
|
10683 |
|
10684 |
|
10685 | horizontal: prop_types_default().oneOf([true, 'sm', 'md', 'lg', 'xl', undefined]),
|
10686 |
|
10687 | |
10688 |
|
10689 |
|
10690 | as: (prop_types_default()).elementType
|
10691 | };
|
10692 | var ListGroup_defaultProps = {
|
10693 | variant: undefined,
|
10694 | horizontal: undefined
|
10695 | };
|
10696 | var ListGroup = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
10697 | var _useUncontrolled = useUncontrolled(props, {
|
10698 | activeKey: 'onSelect'
|
10699 | }),
|
10700 | className = _useUncontrolled.className,
|
10701 | initialBsPrefix = _useUncontrolled.bsPrefix,
|
10702 | variant = _useUncontrolled.variant,
|
10703 | horizontal = _useUncontrolled.horizontal,
|
10704 | _useUncontrolled$as = _useUncontrolled.as,
|
10705 | as = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
|
10706 | controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, ListGroup_excluded);
|
10707 |
|
10708 | var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'list-group');
|
10709 | var horizontalVariant;
|
10710 |
|
10711 | if (horizontal) {
|
10712 | horizontalVariant = horizontal === true ? 'horizontal' : "horizontal-" + horizontal;
|
10713 | } else {
|
10714 | horizontalVariant = null;
|
10715 | }
|
10716 |
|
10717 | false ? 0 : void 0;
|
10718 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AbstractNav, extends_extends({
|
10719 | ref: ref
|
10720 | }, controlledProps, {
|
10721 | as: as,
|
10722 | className: classnames_default()(className, bsPrefix, variant && bsPrefix + "-" + variant, horizontalVariant && bsPrefix + "-" + horizontalVariant),
|
10723 | __self: ListGroup_this,
|
10724 | __source: {
|
10725 | fileName: ListGroup_jsxFileName,
|
10726 | lineNumber: 92,
|
10727 | columnNumber: 5
|
10728 | }
|
10729 | }));
|
10730 | });
|
10731 | ListGroup.propTypes = ListGroup_propTypes;
|
10732 | ListGroup.defaultProps = ListGroup_defaultProps;
|
10733 | ListGroup.displayName = 'ListGroup';
|
10734 | ListGroup.Item = src_ListGroupItem;
|
10735 | const src_ListGroup = (ListGroup);
|
10736 | ;
|
10737 |
|
10738 |
|
10739 | var Media_excluded = ["bsPrefix", "className", "as"];
|
10740 |
|
10741 | var Media_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Media.tsx",
|
10742 | Media_this = undefined;
|
10743 |
|
10744 |
|
10745 |
|
10746 |
|
10747 |
|
10748 |
|
10749 | var MediaBody = createWithBsPrefix('media-body');
|
10750 | var Media_propTypes = {
|
10751 | |
10752 |
|
10753 |
|
10754 | bsPrefix: (prop_types_default()).string,
|
10755 | as: (prop_types_default()).elementType
|
10756 | };
|
10757 | var Media = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(
|
10758 | function (_ref, ref) {
|
10759 | var bsPrefix = _ref.bsPrefix,
|
10760 | className = _ref.className,
|
10761 | _ref$as = _ref.as,
|
10762 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
10763 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Media_excluded);
|
10764 |
|
10765 | var prefix = useBootstrapPrefix(bsPrefix, 'media');
|
10766 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
10767 | ref: ref,
|
10768 | className: classnames_default()(className, prefix),
|
10769 | __self: Media_this,
|
10770 | __source: {
|
10771 | fileName: Media_jsxFileName,
|
10772 | lineNumber: 33,
|
10773 | columnNumber: 7
|
10774 | }
|
10775 | }));
|
10776 | });
|
10777 | Media.displayName = 'Media';
|
10778 | Media.propTypes = Media_propTypes;
|
10779 | Media.Body = MediaBody;
|
10780 | const src_Media = (Media);
|
10781 | ;
|
10782 |
|
10783 | var size;
|
10784 | function scrollbarSize(recalc) {
|
10785 | if (!size && size !== 0 || recalc) {
|
10786 | if (canUseDOM) {
|
10787 | var scrollDiv = document.createElement('div');
|
10788 | scrollDiv.style.position = 'absolute';
|
10789 | scrollDiv.style.top = '-9999px';
|
10790 | scrollDiv.style.width = '50px';
|
10791 | scrollDiv.style.height = '50px';
|
10792 | scrollDiv.style.overflow = 'scroll';
|
10793 | document.body.appendChild(scrollDiv);
|
10794 | size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
10795 | document.body.removeChild(scrollDiv);
|
10796 | }
|
10797 | }
|
10798 |
|
10799 | return size;
|
10800 | }
|
10801 | ;
|
10802 |
|
10803 |
|
10804 |
|
10805 |
|
10806 |
|
10807 |
|
10808 |
|
10809 | function activeElement(doc) {
|
10810 | if (doc === void 0) {
|
10811 | doc = ownerDocument();
|
10812 | }
|
10813 |
|
10814 |
|
10815 |
|
10816 | try {
|
10817 | var active = doc.activeElement;
|
10818 |
|
10819 |
|
10820 | if (!active || !active.nodeName) return null;
|
10821 | return active;
|
10822 | } catch (e) {
|
10823 |
|
10824 | return doc.body;
|
10825 | }
|
10826 | }
|
10827 | ;
|
10828 |
|
10829 |
|
10830 |
|
10831 |
|
10832 |
|
10833 |
|
10834 |
|
10835 |
|
10836 | function addClass(element, className) {
|
10837 | if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + " " + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + " " + className);
|
10838 | }
|
10839 | ;
|
10840 | function replaceClassName(origClass, classToRemove) {
|
10841 | return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
|
10842 | }
|
10843 |
|
10844 |
|
10845 |
|
10846 |
|
10847 |
|
10848 |
|
10849 |
|
10850 |
|
10851 | function removeClass(element, className) {
|
10852 | if (element.classList) {
|
10853 | element.classList.remove(className);
|
10854 | } else if (typeof element.className === 'string') {
|
10855 | element.className = replaceClassName(element.className, className);
|
10856 | } else {
|
10857 | element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
|
10858 | }
|
10859 | }
|
10860 | ;
|
10861 | function isDocument(element) {
|
10862 | return 'nodeType' in element && element.nodeType === document.DOCUMENT_NODE;
|
10863 | }
|
10864 | ;
|
10865 |
|
10866 | function isWindow(node) {
|
10867 | if ('window' in node && node.window === node) return node;
|
10868 | if (isDocument(node)) return node.defaultView || false;
|
10869 | return false;
|
10870 | }
|
10871 | ;
|
10872 |
|
10873 |
|
10874 |
|
10875 | function isBody(node) {
|
10876 | return node && node.tagName.toLowerCase() === 'body';
|
10877 | }
|
10878 |
|
10879 | function bodyIsOverflowing(node) {
|
10880 | var doc = isWindow(node) ? ownerDocument() : ownerDocument(node);
|
10881 | var win = isWindow(node) || doc.defaultView;
|
10882 | return doc.body.clientWidth < win.innerWidth;
|
10883 | }
|
10884 |
|
10885 | function isOverflowing(container) {
|
10886 | var win = isWindow(container);
|
10887 | return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;
|
10888 | }
|
10889 | ;
|
10890 | var BLACKLIST = ['template', 'script', 'style'];
|
10891 |
|
10892 | var isHidable = function isHidable(_ref) {
|
10893 | var nodeType = _ref.nodeType,
|
10894 | tagName = _ref.tagName;
|
10895 | return nodeType === 1 && BLACKLIST.indexOf(tagName.toLowerCase()) === -1;
|
10896 | };
|
10897 |
|
10898 | var siblings = function siblings(container, exclude, cb) {
|
10899 | [].forEach.call(container.children, function (node) {
|
10900 | if (exclude.indexOf(node) === -1 && isHidable(node)) {
|
10901 | cb(node);
|
10902 | }
|
10903 | });
|
10904 | };
|
10905 |
|
10906 | function ariaHidden(hide, node) {
|
10907 | if (!node) return;
|
10908 |
|
10909 | if (hide) {
|
10910 | node.setAttribute('aria-hidden', 'true');
|
10911 | } else {
|
10912 | node.removeAttribute('aria-hidden');
|
10913 | }
|
10914 | }
|
10915 | function hideSiblings(container, _ref2) {
|
10916 | var dialog = _ref2.dialog,
|
10917 | backdrop = _ref2.backdrop;
|
10918 | siblings(container, [dialog, backdrop], function (node) {
|
10919 | return ariaHidden(true, node);
|
10920 | });
|
10921 | }
|
10922 | function showSiblings(container, _ref3) {
|
10923 | var dialog = _ref3.dialog,
|
10924 | backdrop = _ref3.backdrop;
|
10925 | siblings(container, [dialog, backdrop], function (node) {
|
10926 | return ariaHidden(false, node);
|
10927 | });
|
10928 | }
|
10929 | ;
|
10930 |
|
10931 |
|
10932 |
|
10933 |
|
10934 |
|
10935 |
|
10936 |
|
10937 | function findIndexOf(arr, cb) {
|
10938 | var idx = -1;
|
10939 | arr.some(function (d, i) {
|
10940 | if (cb(d, i)) {
|
10941 | idx = i;
|
10942 | return true;
|
10943 | }
|
10944 |
|
10945 | return false;
|
10946 | });
|
10947 | return idx;
|
10948 | }
|
10949 |
|
10950 |
|
10951 |
|
10952 |
|
10953 |
|
10954 |
|
10955 |
|
10956 | var ModalManager = function () {
|
10957 | function ModalManager(_temp) {
|
10958 | var _ref = _temp === void 0 ? {} : _temp,
|
10959 | _ref$hideSiblingNodes = _ref.hideSiblingNodes,
|
10960 | hideSiblingNodes = _ref$hideSiblingNodes === void 0 ? true : _ref$hideSiblingNodes,
|
10961 | _ref$handleContainerO = _ref.handleContainerOverflow,
|
10962 | handleContainerOverflow = _ref$handleContainerO === void 0 ? true : _ref$handleContainerO;
|
10963 |
|
10964 | this.hideSiblingNodes = void 0;
|
10965 | this.handleContainerOverflow = void 0;
|
10966 | this.modals = void 0;
|
10967 | this.containers = void 0;
|
10968 | this.data = void 0;
|
10969 | this.scrollbarSize = void 0;
|
10970 | this.hideSiblingNodes = hideSiblingNodes;
|
10971 | this.handleContainerOverflow = handleContainerOverflow;
|
10972 | this.modals = [];
|
10973 | this.containers = [];
|
10974 | this.data = [];
|
10975 | this.scrollbarSize = scrollbarSize();
|
10976 | }
|
10977 |
|
10978 | var _proto = ModalManager.prototype;
|
10979 |
|
10980 | _proto.isContainerOverflowing = function isContainerOverflowing(modal) {
|
10981 | var data = this.data[this.containerIndexFromModal(modal)];
|
10982 | return data && data.overflowing;
|
10983 | };
|
10984 |
|
10985 | _proto.containerIndexFromModal = function containerIndexFromModal(modal) {
|
10986 | return findIndexOf(this.data, function (d) {
|
10987 | return d.modals.indexOf(modal) !== -1;
|
10988 | });
|
10989 | };
|
10990 |
|
10991 | _proto.setContainerStyle = function setContainerStyle(containerState, container) {
|
10992 | var style = {
|
10993 | overflow: 'hidden'
|
10994 | };
|
10995 |
|
10996 |
|
10997 | containerState.style = {
|
10998 | overflow: container.style.overflow,
|
10999 | paddingRight: container.style.paddingRight
|
11000 | };
|
11001 |
|
11002 | if (containerState.overflowing) {
|
11003 |
|
11004 |
|
11005 | style.paddingRight = parseInt(css(container, 'paddingRight') || '0', 10) + this.scrollbarSize + "px";
|
11006 | }
|
11007 |
|
11008 | css(container, style);
|
11009 | };
|
11010 |
|
11011 | _proto.removeContainerStyle = function removeContainerStyle(containerState, container) {
|
11012 | Object.assign(container.style, containerState.style);
|
11013 | };
|
11014 |
|
11015 | _proto.add = function add(modal, container, className) {
|
11016 | var modalIdx = this.modals.indexOf(modal);
|
11017 | var containerIdx = this.containers.indexOf(container);
|
11018 |
|
11019 | if (modalIdx !== -1) {
|
11020 | return modalIdx;
|
11021 | }
|
11022 |
|
11023 | modalIdx = this.modals.length;
|
11024 | this.modals.push(modal);
|
11025 |
|
11026 | if (this.hideSiblingNodes) {
|
11027 | hideSiblings(container, modal);
|
11028 | }
|
11029 |
|
11030 | if (containerIdx !== -1) {
|
11031 | this.data[containerIdx].modals.push(modal);
|
11032 | return modalIdx;
|
11033 | }
|
11034 |
|
11035 | var data = {
|
11036 | modals: [modal],
|
11037 |
|
11038 | classes: className ? className.split(/\s+/) : [],
|
11039 | overflowing: isOverflowing(container)
|
11040 | };
|
11041 |
|
11042 | if (this.handleContainerOverflow) {
|
11043 | this.setContainerStyle(data, container);
|
11044 | }
|
11045 |
|
11046 | data.classes.forEach(addClass.bind(null, container));
|
11047 | this.containers.push(container);
|
11048 | this.data.push(data);
|
11049 | return modalIdx;
|
11050 | };
|
11051 |
|
11052 | _proto.remove = function remove(modal) {
|
11053 | var modalIdx = this.modals.indexOf(modal);
|
11054 |
|
11055 | if (modalIdx === -1) {
|
11056 | return;
|
11057 | }
|
11058 |
|
11059 | var containerIdx = this.containerIndexFromModal(modal);
|
11060 | var data = this.data[containerIdx];
|
11061 | var container = this.containers[containerIdx];
|
11062 | data.modals.splice(data.modals.indexOf(modal), 1);
|
11063 | this.modals.splice(modalIdx, 1);
|
11064 |
|
11065 |
|
11066 | if (data.modals.length === 0) {
|
11067 | data.classes.forEach(removeClass.bind(null, container));
|
11068 |
|
11069 | if (this.handleContainerOverflow) {
|
11070 | this.removeContainerStyle(data, container);
|
11071 | }
|
11072 |
|
11073 | if (this.hideSiblingNodes) {
|
11074 | showSiblings(container, modal);
|
11075 | }
|
11076 |
|
11077 | this.containers.splice(containerIdx, 1);
|
11078 | this.data.splice(containerIdx, 1);
|
11079 | } else if (this.hideSiblingNodes) {
|
11080 |
|
11081 | var _data$modals = data.modals[data.modals.length - 1],
|
11082 | backdrop = _data$modals.backdrop,
|
11083 | dialog = _data$modals.dialog;
|
11084 | ariaHidden(false, dialog);
|
11085 | ariaHidden(false, backdrop);
|
11086 | }
|
11087 | };
|
11088 |
|
11089 | _proto.isTopModal = function isTopModal(modal) {
|
11090 | return !!this.modals.length && this.modals[this.modals.length - 1] === modal;
|
11091 | };
|
11092 |
|
11093 | return ModalManager;
|
11094 | }();
|
11095 |
|
11096 | const esm_ModalManager = (ModalManager);
|
11097 | ;
|
11098 |
|
11099 |
|
11100 | var resolveContainerRef = function resolveContainerRef(ref) {
|
11101 | var _ref;
|
11102 |
|
11103 | if (typeof document === 'undefined') return null;
|
11104 | if (ref == null) return ownerDocument().body;
|
11105 | if (typeof ref === 'function') ref = ref();
|
11106 | if (ref && 'current' in ref) ref = ref.current;
|
11107 | if ((_ref = ref) != null && _ref.nodeType) return ref || null;
|
11108 | return null;
|
11109 | };
|
11110 | function useWaitForDOMRef(ref, onResolved) {
|
11111 | var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(function () {
|
11112 | return resolveContainerRef(ref);
|
11113 | }),
|
11114 | resolvedRef = _useState[0],
|
11115 | setRef = _useState[1];
|
11116 |
|
11117 | if (!resolvedRef) {
|
11118 | var earlyRef = resolveContainerRef(ref);
|
11119 | if (earlyRef) setRef(earlyRef);
|
11120 | }
|
11121 |
|
11122 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
11123 | if (onResolved && resolvedRef) {
|
11124 | onResolved(resolvedRef);
|
11125 | }
|
11126 | }, [onResolved, resolvedRef]);
|
11127 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
11128 | var nextRef = resolveContainerRef(ref);
|
11129 |
|
11130 | if (nextRef !== resolvedRef) {
|
11131 | setRef(nextRef);
|
11132 | }
|
11133 | }, [ref, resolvedRef]);
|
11134 | return resolvedRef;
|
11135 | }
|
11136 | ;
|
11137 |
|
11138 |
|
11139 |
|
11140 |
|
11141 |
|
11142 |
|
11143 |
|
11144 |
|
11145 |
|
11146 |
|
11147 |
|
11148 |
|
11149 |
|
11150 |
|
11151 |
|
11152 |
|
11153 |
|
11154 | var manager;
|
11155 |
|
11156 | function getManager() {
|
11157 | if (!manager) manager = new esm_ModalManager();
|
11158 | return manager;
|
11159 | }
|
11160 |
|
11161 | function useModalManager(provided) {
|
11162 | var modalManager = provided || getManager();
|
11163 | var modal = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
11164 | dialog: null,
|
11165 | backdrop: null
|
11166 | });
|
11167 | return Object.assign(modal.current, {
|
11168 | add: function add(container, className) {
|
11169 | return modalManager.add(modal.current, container, className);
|
11170 | },
|
11171 | remove: function remove() {
|
11172 | return modalManager.remove(modal.current);
|
11173 | },
|
11174 | isTopModal: function isTopModal() {
|
11175 | return modalManager.isTopModal(modal.current);
|
11176 | },
|
11177 | setDialogRef: (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (ref) {
|
11178 | modal.current.dialog = ref;
|
11179 | }, []),
|
11180 | setBackdropRef: (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (ref) {
|
11181 | modal.current.backdrop = ref;
|
11182 | }, [])
|
11183 | });
|
11184 | }
|
11185 |
|
11186 | var Modal = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (_ref, ref) {
|
11187 | var _ref$show = _ref.show,
|
11188 | show = _ref$show === void 0 ? false : _ref$show,
|
11189 | _ref$role = _ref.role,
|
11190 | role = _ref$role === void 0 ? 'dialog' : _ref$role,
|
11191 | className = _ref.className,
|
11192 | style = _ref.style,
|
11193 | children = _ref.children,
|
11194 | _ref$backdrop = _ref.backdrop,
|
11195 | backdrop = _ref$backdrop === void 0 ? true : _ref$backdrop,
|
11196 | _ref$keyboard = _ref.keyboard,
|
11197 | keyboard = _ref$keyboard === void 0 ? true : _ref$keyboard,
|
11198 | onBackdropClick = _ref.onBackdropClick,
|
11199 | onEscapeKeyDown = _ref.onEscapeKeyDown,
|
11200 | transition = _ref.transition,
|
11201 | backdropTransition = _ref.backdropTransition,
|
11202 | _ref$autoFocus = _ref.autoFocus,
|
11203 | autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
|
11204 | _ref$enforceFocus = _ref.enforceFocus,
|
11205 | enforceFocus = _ref$enforceFocus === void 0 ? true : _ref$enforceFocus,
|
11206 | _ref$restoreFocus = _ref.restoreFocus,
|
11207 | restoreFocus = _ref$restoreFocus === void 0 ? true : _ref$restoreFocus,
|
11208 | restoreFocusOptions = _ref.restoreFocusOptions,
|
11209 | renderDialog = _ref.renderDialog,
|
11210 | _ref$renderBackdrop = _ref.renderBackdrop,
|
11211 | renderBackdrop = _ref$renderBackdrop === void 0 ? function (props) {
|
11212 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", props);
|
11213 | } : _ref$renderBackdrop,
|
11214 | providedManager = _ref.manager,
|
11215 | containerRef = _ref.container,
|
11216 | containerClassName = _ref.containerClassName,
|
11217 | onShow = _ref.onShow,
|
11218 | _ref$onHide = _ref.onHide,
|
11219 | onHide = _ref$onHide === void 0 ? function () {} : _ref$onHide,
|
11220 | onExit = _ref.onExit,
|
11221 | onExited = _ref.onExited,
|
11222 | onExiting = _ref.onExiting,
|
11223 | onEnter = _ref.onEnter,
|
11224 | onEntering = _ref.onEntering,
|
11225 | onEntered = _ref.onEntered,
|
11226 | rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ["show", "role", "className", "style", "children", "backdrop", "keyboard", "onBackdropClick", "onEscapeKeyDown", "transition", "backdropTransition", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "renderDialog", "renderBackdrop", "manager", "container", "containerClassName", "onShow", "onHide", "onExit", "onExited", "onExiting", "onEnter", "onEntering", "onEntered"]);
|
11227 |
|
11228 | var container = useWaitForDOMRef(containerRef);
|
11229 | var modal = useModalManager(providedManager);
|
11230 | var isMounted = useMounted();
|
11231 | var prevShow = usePrevious(show);
|
11232 |
|
11233 | var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!show),
|
11234 | exited = _useState[0],
|
11235 | setExited = _useState[1];
|
11236 |
|
11237 | var lastFocusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
11238 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
|
11239 | return modal;
|
11240 | }, [modal]);
|
11241 |
|
11242 | if (canUseDOM && !prevShow && show) {
|
11243 | lastFocusRef.current = activeElement();
|
11244 | }
|
11245 |
|
11246 | if (!transition && !show && !exited) {
|
11247 | setExited(true);
|
11248 | } else if (show && exited) {
|
11249 | setExited(false);
|
11250 | }
|
11251 |
|
11252 | var handleShow = useEventCallback(function () {
|
11253 | modal.add(container, containerClassName);
|
11254 | removeKeydownListenerRef.current = esm_listen(document, 'keydown', handleDocumentKeyDown);
|
11255 | removeFocusListenerRef.current = esm_listen(document, 'focus',
|
11256 |
|
11257 | function () {
|
11258 | return setTimeout(handleEnforceFocus);
|
11259 | }, true);
|
11260 |
|
11261 | if (onShow) {
|
11262 | onShow();
|
11263 | }
|
11264 |
|
11265 |
|
11266 |
|
11267 | if (autoFocus) {
|
11268 | var currentActiveElement = activeElement(document);
|
11269 |
|
11270 | if (modal.dialog && currentActiveElement && !contains_contains(modal.dialog, currentActiveElement)) {
|
11271 | lastFocusRef.current = currentActiveElement;
|
11272 | modal.dialog.focus();
|
11273 | }
|
11274 | }
|
11275 | });
|
11276 | var handleHide = useEventCallback(function () {
|
11277 | modal.remove();
|
11278 | removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();
|
11279 | removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
|
11280 |
|
11281 | if (restoreFocus) {
|
11282 | var _lastFocusRef$current;
|
11283 |
|
11284 |
|
11285 | (_lastFocusRef$current = lastFocusRef.current) == null ? void 0 : _lastFocusRef$current.focus == null ? void 0 : _lastFocusRef$current.focus(restoreFocusOptions);
|
11286 | lastFocusRef.current = null;
|
11287 | }
|
11288 | });
|
11289 |
|
11290 |
|
11291 |
|
11292 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
11293 | if (!show || !container) return;
|
11294 | handleShow();
|
11295 | }, [show, container,
|
11296 |
|
11297 | handleShow]);
|
11298 |
|
11299 |
|
11300 |
|
11301 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
11302 | if (!exited) return;
|
11303 | handleHide();
|
11304 | }, [exited, handleHide]);
|
11305 | useWillUnmount(function () {
|
11306 | handleHide();
|
11307 | });
|
11308 |
|
11309 | var handleEnforceFocus = useEventCallback(function () {
|
11310 | if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
|
11311 | return;
|
11312 | }
|
11313 |
|
11314 | var currentActiveElement = activeElement();
|
11315 |
|
11316 | if (modal.dialog && currentActiveElement && !contains_contains(modal.dialog, currentActiveElement)) {
|
11317 | modal.dialog.focus();
|
11318 | }
|
11319 | });
|
11320 | var handleBackdropClick = useEventCallback(function (e) {
|
11321 | if (e.target !== e.currentTarget) {
|
11322 | return;
|
11323 | }
|
11324 |
|
11325 | onBackdropClick == null ? void 0 : onBackdropClick(e);
|
11326 |
|
11327 | if (backdrop === true) {
|
11328 | onHide();
|
11329 | }
|
11330 | });
|
11331 | var handleDocumentKeyDown = useEventCallback(function (e) {
|
11332 | if (keyboard && e.keyCode === 27 && modal.isTopModal()) {
|
11333 | onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
|
11334 |
|
11335 | if (!e.defaultPrevented) {
|
11336 | onHide();
|
11337 | }
|
11338 | }
|
11339 | });
|
11340 | var removeFocusListenerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
11341 | var removeKeydownListenerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
11342 |
|
11343 | var handleHidden = function handleHidden() {
|
11344 | setExited(true);
|
11345 |
|
11346 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
11347 | args[_key] = arguments[_key];
|
11348 | }
|
11349 |
|
11350 | onExited == null ? void 0 : onExited.apply(void 0, args);
|
11351 | };
|
11352 |
|
11353 | var Transition = transition;
|
11354 |
|
11355 | if (!container || !(show || Transition && !exited)) {
|
11356 | return null;
|
11357 | }
|
11358 |
|
11359 | var dialogProps = extends_extends({
|
11360 | role: role,
|
11361 | ref: modal.setDialogRef,
|
11362 |
|
11363 | 'aria-modal': role === 'dialog' ? true : undefined
|
11364 | }, rest, {
|
11365 | style: style,
|
11366 | className: className,
|
11367 | tabIndex: -1
|
11368 | });
|
11369 |
|
11370 | var dialog = renderDialog ? renderDialog(dialogProps) : external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", dialogProps, external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
|
11371 | role: 'document'
|
11372 | }));
|
11373 |
|
11374 | if (Transition) {
|
11375 | dialog = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, {
|
11376 | appear: true,
|
11377 | unmountOnExit: true,
|
11378 | "in": !!show,
|
11379 | onExit: onExit,
|
11380 | onExiting: onExiting,
|
11381 | onExited: handleHidden,
|
11382 | onEnter: onEnter,
|
11383 | onEntering: onEntering,
|
11384 | onEntered: onEntered
|
11385 | }, dialog);
|
11386 | }
|
11387 |
|
11388 | var backdropElement = null;
|
11389 |
|
11390 | if (backdrop) {
|
11391 | var BackdropTransition = backdropTransition;
|
11392 | backdropElement = renderBackdrop({
|
11393 | ref: modal.setBackdropRef,
|
11394 | onClick: handleBackdropClick
|
11395 | });
|
11396 |
|
11397 | if (BackdropTransition) {
|
11398 | backdropElement = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(BackdropTransition, {
|
11399 | appear: true,
|
11400 | "in": !!show
|
11401 | }, backdropElement);
|
11402 | }
|
11403 | }
|
11404 |
|
11405 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().createPortal( external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, backdropElement, dialog), container));
|
11406 | });
|
11407 | var Modal_propTypes = {
|
11408 | |
11409 |
|
11410 |
|
11411 | show: (prop_types_default()).bool,
|
11412 |
|
11413 | |
11414 |
|
11415 |
|
11416 |
|
11417 |
|
11418 |
|
11419 | container: (prop_types_default()).any,
|
11420 |
|
11421 | |
11422 |
|
11423 |
|
11424 | onShow: (prop_types_default()).func,
|
11425 |
|
11426 | |
11427 |
|
11428 |
|
11429 |
|
11430 |
|
11431 |
|
11432 | onHide: (prop_types_default()).func,
|
11433 |
|
11434 | |
11435 |
|
11436 |
|
11437 | backdrop: prop_types_default().oneOfType([(prop_types_default()).bool, prop_types_default().oneOf(['static'])]),
|
11438 |
|
11439 | |
11440 |
|
11441 |
|
11442 |
|
11443 |
|
11444 |
|
11445 |
|
11446 |
|
11447 | renderDialog: (prop_types_default()).func,
|
11448 |
|
11449 | |
11450 |
|
11451 |
|
11452 |
|
11453 |
|
11454 |
|
11455 |
|
11456 |
|
11457 | renderBackdrop: (prop_types_default()).func,
|
11458 |
|
11459 | |
11460 |
|
11461 |
|
11462 |
|
11463 |
|
11464 | onEscapeKeyDown: (prop_types_default()).func,
|
11465 |
|
11466 | |
11467 |
|
11468 |
|
11469 | onBackdropClick: (prop_types_default()).func,
|
11470 |
|
11471 | |
11472 |
|
11473 |
|
11474 |
|
11475 | containerClassName: (prop_types_default()).string,
|
11476 |
|
11477 | |
11478 |
|
11479 |
|
11480 | keyboard: (prop_types_default()).bool,
|
11481 |
|
11482 | |
11483 |
|
11484 |
|
11485 |
|
11486 | transition: (prop_types_default()).elementType,
|
11487 |
|
11488 | |
11489 |
|
11490 |
|
11491 |
|
11492 | backdropTransition: (prop_types_default()).elementType,
|
11493 |
|
11494 | |
11495 |
|
11496 |
|
11497 |
|
11498 |
|
11499 |
|
11500 |
|
11501 |
|
11502 | autoFocus: (prop_types_default()).bool,
|
11503 |
|
11504 | |
11505 |
|
11506 |
|
11507 |
|
11508 |
|
11509 |
|
11510 | enforceFocus: (prop_types_default()).bool,
|
11511 |
|
11512 | |
11513 |
|
11514 |
|
11515 |
|
11516 | restoreFocus: (prop_types_default()).bool,
|
11517 |
|
11518 | |
11519 |
|
11520 |
|
11521 |
|
11522 |
|
11523 | restoreFocusOptions: prop_types_default().shape({
|
11524 | preventScroll: (prop_types_default()).bool
|
11525 | }),
|
11526 |
|
11527 | |
11528 |
|
11529 |
|
11530 | onEnter: (prop_types_default()).func,
|
11531 |
|
11532 | |
11533 |
|
11534 |
|
11535 | onEntering: (prop_types_default()).func,
|
11536 |
|
11537 | |
11538 |
|
11539 |
|
11540 | onEntered: (prop_types_default()).func,
|
11541 |
|
11542 | |
11543 |
|
11544 |
|
11545 | onExit: (prop_types_default()).func,
|
11546 |
|
11547 | |
11548 |
|
11549 |
|
11550 | onExiting: (prop_types_default()).func,
|
11551 |
|
11552 | |
11553 |
|
11554 |
|
11555 | onExited: (prop_types_default()).func,
|
11556 |
|
11557 | |
11558 |
|
11559 |
|
11560 |
|
11561 | manager: prop_types_default().instanceOf(esm_ModalManager)
|
11562 | };
|
11563 | Modal.displayName = 'Modal';
|
11564 | Modal.propTypes = Modal_propTypes;
|
11565 | const esm_Modal = (Object.assign(Modal, {
|
11566 | Manager: esm_ModalManager
|
11567 | }));
|
11568 | ;
|
11569 |
|
11570 |
|
11571 |
|
11572 |
|
11573 |
|
11574 | var Selector = {
|
11575 | FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
|
11576 | STICKY_CONTENT: '.sticky-top',
|
11577 | NAVBAR_TOGGLER: '.navbar-toggler'
|
11578 | };
|
11579 |
|
11580 | var BootstrapModalManager = function (_ModalManager) {
|
11581 | inheritsLoose_inheritsLoose(BootstrapModalManager, _ModalManager);
|
11582 |
|
11583 | function BootstrapModalManager() {
|
11584 | return _ModalManager.apply(this, arguments) || this;
|
11585 | }
|
11586 |
|
11587 | var _proto = BootstrapModalManager.prototype;
|
11588 |
|
11589 | _proto.adjustAndStore = function adjustAndStore(prop, element, adjust) {
|
11590 | var _css;
|
11591 |
|
11592 | var actual = element.style[prop];
|
11593 |
|
11594 |
|
11595 | element.dataset[prop] = actual;
|
11596 | css(element, (_css = {}, _css[prop] = parseFloat(css(element, prop)) + adjust + "px", _css));
|
11597 | };
|
11598 |
|
11599 | _proto.restore = function restore(prop, element) {
|
11600 | var value = element.dataset[prop];
|
11601 |
|
11602 | if (value !== undefined) {
|
11603 | var _css2;
|
11604 |
|
11605 | delete element.dataset[prop];
|
11606 | css(element, (_css2 = {}, _css2[prop] = value, _css2));
|
11607 | }
|
11608 | };
|
11609 |
|
11610 | _proto.setContainerStyle = function setContainerStyle(containerState, container) {
|
11611 | var _this = this;
|
11612 |
|
11613 | _ModalManager.prototype.setContainerStyle.call(this, containerState, container);
|
11614 |
|
11615 | if (!containerState.overflowing) return;
|
11616 | var size = scrollbarSize();
|
11617 | qsa(container, Selector.FIXED_CONTENT).forEach(function (el) {
|
11618 | return _this.adjustAndStore('paddingRight', el, size);
|
11619 | });
|
11620 | qsa(container, Selector.STICKY_CONTENT).forEach(function (el) {
|
11621 | return _this.adjustAndStore('marginRight', el, -size);
|
11622 | });
|
11623 | qsa(container, Selector.NAVBAR_TOGGLER).forEach(function (el) {
|
11624 | return _this.adjustAndStore('marginRight', el, size);
|
11625 | });
|
11626 | };
|
11627 |
|
11628 | _proto.removeContainerStyle = function removeContainerStyle(containerState, container) {
|
11629 | var _this2 = this;
|
11630 |
|
11631 | _ModalManager.prototype.removeContainerStyle.call(this, containerState, container);
|
11632 |
|
11633 | qsa(container, Selector.FIXED_CONTENT).forEach(function (el) {
|
11634 | return _this2.restore('paddingRight', el);
|
11635 | });
|
11636 | qsa(container, Selector.STICKY_CONTENT).forEach(function (el) {
|
11637 | return _this2.restore('marginRight', el);
|
11638 | });
|
11639 | qsa(container, Selector.NAVBAR_TOGGLER).forEach(function (el) {
|
11640 | return _this2.restore('marginRight', el);
|
11641 | });
|
11642 | };
|
11643 |
|
11644 | return BootstrapModalManager;
|
11645 | }(esm_ModalManager);
|
11646 |
|
11647 |
|
11648 | ;
|
11649 |
|
11650 | const ModalBody = (createWithBsPrefix('modal-body'));
|
11651 | ;
|
11652 |
|
11653 | var ModalContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
|
11654 |
|
11655 | onHide: function onHide() {}
|
11656 | });
|
11657 | const src_ModalContext = (ModalContext);
|
11658 | ;
|
11659 |
|
11660 |
|
11661 | var ModalDialog_excluded = ["bsPrefix", "className", "contentClassName", "centered", "size", "children", "scrollable"];
|
11662 |
|
11663 | var ModalDialog_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalDialog.tsx",
|
11664 | ModalDialog_this = undefined;
|
11665 |
|
11666 |
|
11667 |
|
11668 |
|
11669 |
|
11670 | var ModalDialog_propTypes = {
|
11671 |
|
11672 | bsPrefix: (prop_types_default()).string,
|
11673 | contentClassName: (prop_types_default()).string,
|
11674 |
|
11675 | |
11676 |
|
11677 |
|
11678 |
|
11679 |
|
11680 | size: (prop_types_default()).string,
|
11681 |
|
11682 | |
11683 |
|
11684 |
|
11685 | centered: (prop_types_default()).bool,
|
11686 |
|
11687 | |
11688 |
|
11689 |
|
11690 | scrollable: (prop_types_default()).bool
|
11691 | };
|
11692 | var ModalDialog = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
11693 | var bsPrefix = _ref.bsPrefix,
|
11694 | className = _ref.className,
|
11695 | contentClassName = _ref.contentClassName,
|
11696 | centered = _ref.centered,
|
11697 | size = _ref.size,
|
11698 | children = _ref.children,
|
11699 | scrollable = _ref.scrollable,
|
11700 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ModalDialog_excluded);
|
11701 |
|
11702 | bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
|
11703 | var dialogClass = bsPrefix + "-dialog";
|
11704 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, props, {
|
11705 | ref: ref,
|
11706 | className: classnames_default()(dialogClass, className, size && bsPrefix + "-" + size, centered && dialogClass + "-centered", scrollable && dialogClass + "-scrollable"),
|
11707 | __self: ModalDialog_this,
|
11708 | __source: {
|
11709 | fileName: ModalDialog_jsxFileName,
|
11710 | lineNumber: 59,
|
11711 | columnNumber: 7
|
11712 | }
|
11713 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
11714 | className: classnames_default()(bsPrefix + "-content", contentClassName),
|
11715 | __self: ModalDialog_this,
|
11716 | __source: {
|
11717 | fileName: ModalDialog_jsxFileName,
|
11718 | lineNumber: 70,
|
11719 | columnNumber: 9
|
11720 | }
|
11721 | }, children));
|
11722 | });
|
11723 | ModalDialog.displayName = 'ModalDialog';
|
11724 | ModalDialog.propTypes = ModalDialog_propTypes;
|
11725 | const src_ModalDialog = (ModalDialog);
|
11726 | ;
|
11727 |
|
11728 | const ModalFooter = (createWithBsPrefix('modal-footer'));
|
11729 | ;
|
11730 |
|
11731 |
|
11732 | var ModalHeader_excluded = ["bsPrefix", "closeLabel", "closeButton", "onHide", "className", "children"];
|
11733 |
|
11734 | var ModalHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalHeader.tsx",
|
11735 | ModalHeader_this = undefined;
|
11736 |
|
11737 |
|
11738 |
|
11739 |
|
11740 |
|
11741 |
|
11742 |
|
11743 |
|
11744 | var ModalHeader_propTypes = {
|
11745 | bsPrefix: (prop_types_default()).string,
|
11746 |
|
11747 | |
11748 |
|
11749 |
|
11750 |
|
11751 |
|
11752 | closeLabel: (prop_types_default()).string,
|
11753 |
|
11754 | |
11755 |
|
11756 |
|
11757 | closeButton: (prop_types_default()).bool,
|
11758 |
|
11759 | |
11760 |
|
11761 |
|
11762 |
|
11763 |
|
11764 | onHide: (prop_types_default()).func
|
11765 | };
|
11766 | var ModalHeader_defaultProps = {
|
11767 | closeLabel: 'Close',
|
11768 | closeButton: false
|
11769 | };
|
11770 | var ModalHeader = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
11771 | var bsPrefix = _ref.bsPrefix,
|
11772 | closeLabel = _ref.closeLabel,
|
11773 | closeButton = _ref.closeButton,
|
11774 | onHide = _ref.onHide,
|
11775 | className = _ref.className,
|
11776 | children = _ref.children,
|
11777 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ModalHeader_excluded);
|
11778 |
|
11779 | bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-header');
|
11780 | var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_ModalContext);
|
11781 | var handleClick = useEventCallback(function () {
|
11782 | if (context) context.onHide();
|
11783 | if (onHide) onHide();
|
11784 | });
|
11785 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
11786 | ref: ref
|
11787 | }, props, {
|
11788 | className: classnames_default()(className, bsPrefix),
|
11789 | __self: ModalHeader_this,
|
11790 | __source: {
|
11791 | fileName: ModalHeader_jsxFileName,
|
11792 | lineNumber: 70,
|
11793 | columnNumber: 7
|
11794 | }
|
11795 | }), children, closeButton && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_CloseButton, {
|
11796 | label: closeLabel,
|
11797 | onClick: handleClick,
|
11798 | __self: ModalHeader_this,
|
11799 | __source: {
|
11800 | fileName: ModalHeader_jsxFileName,
|
11801 | lineNumber: 74,
|
11802 | columnNumber: 11
|
11803 | }
|
11804 | }));
|
11805 | });
|
11806 | ModalHeader.displayName = 'ModalHeader';
|
11807 | ModalHeader.propTypes = ModalHeader_propTypes;
|
11808 | ModalHeader.defaultProps = ModalHeader_defaultProps;
|
11809 | const src_ModalHeader = (ModalHeader);
|
11810 | ;
|
11811 |
|
11812 |
|
11813 | var ModalTitle_DivStyledAsH4 = divWithClassName('h4');
|
11814 | const ModalTitle = (createWithBsPrefix('modal-title', {
|
11815 | Component: ModalTitle_DivStyledAsH4
|
11816 | }));
|
11817 | ;
|
11818 |
|
11819 |
|
11820 | var Modal_excluded = ["bsPrefix", "className", "style", "dialogClassName", "contentClassName", "children", "dialogAs", "aria-labelledby", "show", "animation", "backdrop", "keyboard", "onEscapeKeyDown", "onShow", "onHide", "container", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "onEntered", "onExit", "onExiting", "onEnter", "onEntering", "onExited", "backdropClassName", "manager"];
|
11821 |
|
11822 | var Modal_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Modal.tsx",
|
11823 | Modal_this = undefined;
|
11824 |
|
11825 |
|
11826 |
|
11827 |
|
11828 |
|
11829 |
|
11830 |
|
11831 |
|
11832 |
|
11833 |
|
11834 |
|
11835 |
|
11836 |
|
11837 |
|
11838 |
|
11839 |
|
11840 |
|
11841 |
|
11842 |
|
11843 |
|
11844 |
|
11845 |
|
11846 |
|
11847 |
|
11848 | var Modal_manager;
|
11849 | var src_Modal_propTypes = {
|
11850 | |
11851 |
|
11852 |
|
11853 | bsPrefix: (prop_types_default()).string,
|
11854 |
|
11855 | |
11856 |
|
11857 |
|
11858 |
|
11859 |
|
11860 | size: (prop_types_default()).string,
|
11861 |
|
11862 | |
11863 |
|
11864 |
|
11865 | centered: (prop_types_default()).bool,
|
11866 |
|
11867 | |
11868 |
|
11869 |
|
11870 |
|
11871 | backdrop: prop_types_default().oneOf(['static', true, false]),
|
11872 |
|
11873 | |
11874 |
|
11875 |
|
11876 |
|
11877 | backdropClassName: (prop_types_default()).string,
|
11878 |
|
11879 | |
11880 |
|
11881 |
|
11882 | keyboard: (prop_types_default()).bool,
|
11883 |
|
11884 | |
11885 |
|
11886 |
|
11887 | scrollable: (prop_types_default()).bool,
|
11888 |
|
11889 | |
11890 |
|
11891 |
|
11892 | animation: (prop_types_default()).bool,
|
11893 |
|
11894 | |
11895 |
|
11896 |
|
11897 | dialogClassName: (prop_types_default()).string,
|
11898 |
|
11899 | |
11900 |
|
11901 |
|
11902 | contentClassName: (prop_types_default()).string,
|
11903 |
|
11904 | |
11905 |
|
11906 |
|
11907 |
|
11908 |
|
11909 | dialogAs: (prop_types_default()).elementType,
|
11910 |
|
11911 | |
11912 |
|
11913 |
|
11914 |
|
11915 |
|
11916 |
|
11917 | autoFocus: (prop_types_default()).bool,
|
11918 |
|
11919 | |
11920 |
|
11921 |
|
11922 |
|
11923 |
|
11924 | enforceFocus: (prop_types_default()).bool,
|
11925 |
|
11926 | |
11927 |
|
11928 |
|
11929 |
|
11930 | restoreFocus: (prop_types_default()).bool,
|
11931 |
|
11932 | |
11933 |
|
11934 |
|
11935 |
|
11936 |
|
11937 | restoreFocusOptions: prop_types_default().shape({
|
11938 | preventScroll: (prop_types_default()).bool
|
11939 | }),
|
11940 |
|
11941 | |
11942 |
|
11943 |
|
11944 | show: (prop_types_default()).bool,
|
11945 |
|
11946 | |
11947 |
|
11948 |
|
11949 | onShow: (prop_types_default()).func,
|
11950 |
|
11951 | |
11952 |
|
11953 |
|
11954 |
|
11955 | onHide: (prop_types_default()).func,
|
11956 |
|
11957 | |
11958 |
|
11959 |
|
11960 | onEscapeKeyDown: (prop_types_default()).func,
|
11961 |
|
11962 | |
11963 |
|
11964 |
|
11965 | onEnter: (prop_types_default()).func,
|
11966 |
|
11967 | |
11968 |
|
11969 |
|
11970 | onEntering: (prop_types_default()).func,
|
11971 |
|
11972 | |
11973 |
|
11974 |
|
11975 | onEntered: (prop_types_default()).func,
|
11976 |
|
11977 | |
11978 |
|
11979 |
|
11980 | onExit: (prop_types_default()).func,
|
11981 |
|
11982 | |
11983 |
|
11984 |
|
11985 | onExiting: (prop_types_default()).func,
|
11986 |
|
11987 | |
11988 |
|
11989 |
|
11990 | onExited: (prop_types_default()).func,
|
11991 |
|
11992 | |
11993 |
|
11994 |
|
11995 |
|
11996 | manager: (prop_types_default()).object,
|
11997 |
|
11998 | |
11999 |
|
12000 |
|
12001 | container: (prop_types_default()).any,
|
12002 | 'aria-labelledby': (prop_types_default()).any
|
12003 | };
|
12004 | var Modal_defaultProps = {
|
12005 | show: false,
|
12006 | backdrop: true,
|
12007 | keyboard: true,
|
12008 | autoFocus: true,
|
12009 | enforceFocus: true,
|
12010 | restoreFocus: true,
|
12011 | animation: true,
|
12012 | dialogAs: src_ModalDialog
|
12013 | };
|
12014 |
|
12015 |
|
12016 | function DialogTransition(props) {
|
12017 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Fade, extends_extends({}, props, {
|
12018 | timeout: null,
|
12019 | __self: this,
|
12020 | __source: {
|
12021 | fileName: Modal_jsxFileName,
|
12022 | lineNumber: 236,
|
12023 | columnNumber: 10
|
12024 | }
|
12025 | }));
|
12026 | }
|
12027 |
|
12028 | function BackdropTransition(props) {
|
12029 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Fade, extends_extends({}, props, {
|
12030 | timeout: null,
|
12031 | __self: this,
|
12032 | __source: {
|
12033 | fileName: Modal_jsxFileName,
|
12034 | lineNumber: 240,
|
12035 | columnNumber: 10
|
12036 | }
|
12037 | }));
|
12038 | }
|
12039 |
|
12040 |
|
12041 |
|
12042 | var Modal_Modal = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
12043 | var bsPrefix = _ref.bsPrefix,
|
12044 | className = _ref.className,
|
12045 | style = _ref.style,
|
12046 | dialogClassName = _ref.dialogClassName,
|
12047 | contentClassName = _ref.contentClassName,
|
12048 | children = _ref.children,
|
12049 | Dialog = _ref.dialogAs,
|
12050 | ariaLabelledby = _ref['aria-labelledby'],
|
12051 | show = _ref.show,
|
12052 | animation = _ref.animation,
|
12053 | backdrop = _ref.backdrop,
|
12054 | keyboard = _ref.keyboard,
|
12055 | onEscapeKeyDown = _ref.onEscapeKeyDown,
|
12056 | onShow = _ref.onShow,
|
12057 | onHide = _ref.onHide,
|
12058 | container = _ref.container,
|
12059 | autoFocus = _ref.autoFocus,
|
12060 | enforceFocus = _ref.enforceFocus,
|
12061 | restoreFocus = _ref.restoreFocus,
|
12062 | restoreFocusOptions = _ref.restoreFocusOptions,
|
12063 | onEntered = _ref.onEntered,
|
12064 | onExit = _ref.onExit,
|
12065 | onExiting = _ref.onExiting,
|
12066 | onEnter = _ref.onEnter,
|
12067 | onEntering = _ref.onEntering,
|
12068 | onExited = _ref.onExited,
|
12069 | backdropClassName = _ref.backdropClassName,
|
12070 | propsManager = _ref.manager,
|
12071 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Modal_excluded);
|
12072 |
|
12073 | var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
|
12074 | modalStyle = _useState[0],
|
12075 | setStyle = _useState[1];
|
12076 |
|
12077 | var _useState2 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
12078 | animateStaticModal = _useState2[0],
|
12079 | setAnimateStaticModal = _useState2[1];
|
12080 |
|
12081 | var waitingForMouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
12082 | var ignoreBackdropClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
12083 | var removeStaticModalAnimationRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
12084 |
|
12085 | var _useCallbackRef = useCallbackRef(),
|
12086 | modal = _useCallbackRef[0],
|
12087 | setModalRef = _useCallbackRef[1];
|
12088 |
|
12089 | var handleHide = useEventCallback(onHide);
|
12090 | bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
|
12091 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
|
12092 | return {
|
12093 | get _modal() {
|
12094 | false ? 0 : void 0;
|
12095 | return modal;
|
12096 | }
|
12097 |
|
12098 | };
|
12099 | }, [modal]);
|
12100 | var modalContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
12101 | return {
|
12102 | onHide: handleHide
|
12103 | };
|
12104 | }, [handleHide]);
|
12105 |
|
12106 | function getModalManager() {
|
12107 | if (propsManager) return propsManager;
|
12108 | if (!Modal_manager) Modal_manager = new BootstrapModalManager();
|
12109 | return Modal_manager;
|
12110 | }
|
12111 |
|
12112 | function updateDialogStyle(node) {
|
12113 | if (!canUseDOM) return;
|
12114 | var containerIsOverflowing = getModalManager().isContainerOverflowing(modal);
|
12115 | var modalIsOverflowing = node.scrollHeight > ownerDocument(node).documentElement.clientHeight;
|
12116 | setStyle({
|
12117 | paddingRight: containerIsOverflowing && !modalIsOverflowing ? scrollbarSize() : undefined,
|
12118 | paddingLeft: !containerIsOverflowing && modalIsOverflowing ? scrollbarSize() : undefined
|
12119 | });
|
12120 | }
|
12121 |
|
12122 | var handleWindowResize = useEventCallback(function () {
|
12123 | if (modal) {
|
12124 | updateDialogStyle(modal.dialog);
|
12125 | }
|
12126 | });
|
12127 | useWillUnmount(function () {
|
12128 | esm_removeEventListener(window, 'resize', handleWindowResize);
|
12129 |
|
12130 | if (removeStaticModalAnimationRef.current) {
|
12131 | removeStaticModalAnimationRef.current();
|
12132 | }
|
12133 | });
|
12134 |
|
12135 |
|
12136 |
|
12137 | var handleDialogMouseDown = function handleDialogMouseDown() {
|
12138 | waitingForMouseUpRef.current = true;
|
12139 | };
|
12140 |
|
12141 | var handleMouseUp = function handleMouseUp(e) {
|
12142 | if (waitingForMouseUpRef.current && modal && e.target === modal.dialog) {
|
12143 | ignoreBackdropClickRef.current = true;
|
12144 | }
|
12145 |
|
12146 | waitingForMouseUpRef.current = false;
|
12147 | };
|
12148 |
|
12149 | var handleStaticModalAnimation = function handleStaticModalAnimation() {
|
12150 | setAnimateStaticModal(true);
|
12151 | removeStaticModalAnimationRef.current = transitionEnd(modal.dialog, function () {
|
12152 | setAnimateStaticModal(false);
|
12153 | });
|
12154 | };
|
12155 |
|
12156 | var handleStaticBackdropClick = function handleStaticBackdropClick(e) {
|
12157 | if (e.target !== e.currentTarget) {
|
12158 | return;
|
12159 | }
|
12160 |
|
12161 | handleStaticModalAnimation();
|
12162 | };
|
12163 |
|
12164 | var handleClick = function handleClick(e) {
|
12165 | if (backdrop === 'static') {
|
12166 | handleStaticBackdropClick(e);
|
12167 | return;
|
12168 | }
|
12169 |
|
12170 | if (ignoreBackdropClickRef.current || e.target !== e.currentTarget) {
|
12171 | ignoreBackdropClickRef.current = false;
|
12172 | return;
|
12173 | }
|
12174 |
|
12175 | onHide == null ? void 0 : onHide();
|
12176 | };
|
12177 |
|
12178 | var handleEscapeKeyDown = function handleEscapeKeyDown(e) {
|
12179 | if (!keyboard && backdrop === 'static') {
|
12180 |
|
12181 |
|
12182 | e.preventDefault();
|
12183 | handleStaticModalAnimation();
|
12184 | } else if (keyboard && onEscapeKeyDown) {
|
12185 | onEscapeKeyDown(e);
|
12186 | }
|
12187 | };
|
12188 |
|
12189 | var handleEnter = function handleEnter(node, isAppearing) {
|
12190 | if (node) {
|
12191 | node.style.display = 'block';
|
12192 | updateDialogStyle(node);
|
12193 | }
|
12194 |
|
12195 | onEnter == null ? void 0 : onEnter(node, isAppearing);
|
12196 | };
|
12197 |
|
12198 | var handleExit = function handleExit(node) {
|
12199 | removeStaticModalAnimationRef.current == null ? void 0 : removeStaticModalAnimationRef.current();
|
12200 | onExit == null ? void 0 : onExit(node);
|
12201 | };
|
12202 |
|
12203 | var handleEntering = function handleEntering(node, isAppearing) {
|
12204 | onEntering == null ? void 0 : onEntering(node, isAppearing);
|
12205 |
|
12206 | esm_addEventListener(window, 'resize', handleWindowResize);
|
12207 | };
|
12208 |
|
12209 | var handleExited = function handleExited(node) {
|
12210 | if (node) node.style.display = '';
|
12211 |
|
12212 | onExited == null ? void 0 : onExited(node);
|
12213 |
|
12214 | esm_removeEventListener(window, 'resize', handleWindowResize);
|
12215 | };
|
12216 |
|
12217 | var renderBackdrop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (backdropProps) {
|
12218 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, backdropProps, {
|
12219 | className: classnames_default()(bsPrefix + "-backdrop", backdropClassName, !animation && 'show'),
|
12220 | __self: Modal_this,
|
12221 | __source: {
|
12222 | fileName: Modal_jsxFileName,
|
12223 | lineNumber: 445,
|
12224 | columnNumber: 9
|
12225 | }
|
12226 | }));
|
12227 | }, [animation, backdropClassName, bsPrefix]);
|
12228 |
|
12229 | var baseModalStyle = extends_extends({}, style, modalStyle);
|
12230 |
|
12231 |
|
12232 | if (!animation) {
|
12233 | baseModalStyle.display = 'block';
|
12234 | }
|
12235 |
|
12236 | var renderDialog = function renderDialog(dialogProps) {
|
12237 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
12238 | role: "dialog"
|
12239 | }, dialogProps, {
|
12240 | style: baseModalStyle,
|
12241 | className: classnames_default()(className, bsPrefix, animateStaticModal && bsPrefix + "-static"),
|
12242 | onClick: backdrop ? handleClick : undefined,
|
12243 | onMouseUp: handleMouseUp,
|
12244 | "aria-labelledby": ariaLabelledby,
|
12245 | __self: Modal_this,
|
12246 | __source: {
|
12247 | fileName: Modal_jsxFileName,
|
12248 | lineNumber: 465,
|
12249 | columnNumber: 7
|
12250 | }
|
12251 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Dialog, extends_extends({}, props, {
|
12252 | onMouseDown: handleDialogMouseDown,
|
12253 | className: dialogClassName,
|
12254 | contentClassName: contentClassName,
|
12255 | __self: Modal_this,
|
12256 | __source: {
|
12257 | fileName: Modal_jsxFileName,
|
12258 | lineNumber: 480,
|
12259 | columnNumber: 9
|
12260 | }
|
12261 | }), children));
|
12262 | };
|
12263 |
|
12264 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_ModalContext.Provider, {
|
12265 | value: modalContext,
|
12266 | __self: Modal_this,
|
12267 | __source: {
|
12268 | fileName: Modal_jsxFileName,
|
12269 | lineNumber: 492,
|
12270 | columnNumber: 7
|
12271 | }
|
12272 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Modal, {
|
12273 | show: show,
|
12274 | ref: setModalRef,
|
12275 | backdrop: backdrop,
|
12276 | container: container,
|
12277 | keyboard: true
|
12278 | ,
|
12279 | autoFocus: autoFocus,
|
12280 | enforceFocus: enforceFocus,
|
12281 | restoreFocus: restoreFocus,
|
12282 | restoreFocusOptions: restoreFocusOptions,
|
12283 | onEscapeKeyDown: handleEscapeKeyDown,
|
12284 | onShow: onShow,
|
12285 | onHide: onHide,
|
12286 | onEnter: handleEnter,
|
12287 | onEntering: handleEntering,
|
12288 | onEntered: onEntered,
|
12289 | onExit: handleExit,
|
12290 | onExiting: onExiting,
|
12291 | onExited: handleExited,
|
12292 | manager: getModalManager(),
|
12293 | containerClassName: bsPrefix + "-open",
|
12294 | transition: animation ? DialogTransition : undefined,
|
12295 | backdropTransition: animation ? BackdropTransition : undefined,
|
12296 | renderBackdrop: renderBackdrop,
|
12297 | renderDialog: renderDialog,
|
12298 | __self: Modal_this,
|
12299 | __source: {
|
12300 | fileName: Modal_jsxFileName,
|
12301 | lineNumber: 493,
|
12302 | columnNumber: 9
|
12303 | }
|
12304 | }));
|
12305 | });
|
12306 | Modal_Modal.displayName = 'Modal';
|
12307 | Modal_Modal.propTypes = src_Modal_propTypes;
|
12308 | Modal_Modal.defaultProps = Modal_defaultProps;
|
12309 | Modal_Modal.Body = ModalBody;
|
12310 | Modal_Modal.Header = src_ModalHeader;
|
12311 | Modal_Modal.Title = ModalTitle;
|
12312 | Modal_Modal.Footer = ModalFooter;
|
12313 | Modal_Modal.Dialog = src_ModalDialog;
|
12314 | Modal_Modal.TRANSITION_DURATION = 300;
|
12315 | Modal_Modal.BACKDROP_TRANSITION_DURATION = 150;
|
12316 | const src_Modal = (Modal_Modal);
|
12317 | ;
|
12318 |
|
12319 |
|
12320 | var NavItem_excluded = ["bsPrefix", "className", "children", "as"];
|
12321 |
|
12322 | var NavItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavItem.tsx",
|
12323 | NavItem_this = undefined;
|
12324 |
|
12325 |
|
12326 |
|
12327 |
|
12328 |
|
12329 | var NavItem_propTypes = {
|
12330 | |
12331 |
|
12332 |
|
12333 | bsPrefix: (prop_types_default()).string,
|
12334 |
|
12335 |
|
12336 | role: (prop_types_default()).string,
|
12337 | as: (prop_types_default()).elementType
|
12338 | };
|
12339 | var NavItem = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(
|
12340 | function (_ref, ref) {
|
12341 | var bsPrefix = _ref.bsPrefix,
|
12342 | className = _ref.className,
|
12343 | children = _ref.children,
|
12344 | _ref$as = _ref.as,
|
12345 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
12346 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavItem_excluded);
|
12347 |
|
12348 | bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');
|
12349 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
12350 | ref: ref,
|
12351 | className: classnames_default()(className, bsPrefix),
|
12352 | __self: NavItem_this,
|
12353 | __source: {
|
12354 | fileName: NavItem_jsxFileName,
|
12355 | lineNumber: 44,
|
12356 | columnNumber: 7
|
12357 | }
|
12358 | }), children);
|
12359 | });
|
12360 | NavItem.displayName = 'NavItem';
|
12361 | NavItem.propTypes = NavItem_propTypes;
|
12362 | const src_NavItem = (NavItem);
|
12363 | ;
|
12364 |
|
12365 |
|
12366 | var NavLink_excluded = ["bsPrefix", "disabled", "className", "href", "eventKey", "onSelect", "as"];
|
12367 |
|
12368 | var NavLink_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavLink.tsx",
|
12369 | NavLink_this = undefined;
|
12370 |
|
12371 |
|
12372 |
|
12373 |
|
12374 |
|
12375 |
|
12376 |
|
12377 | var NavLink_propTypes = {
|
12378 | |
12379 |
|
12380 |
|
12381 | bsPrefix: (prop_types_default()).string,
|
12382 |
|
12383 | |
12384 |
|
12385 |
|
12386 | active: (prop_types_default()).bool,
|
12387 |
|
12388 | |
12389 |
|
12390 |
|
12391 | disabled: (prop_types_default()).bool,
|
12392 |
|
12393 | |
12394 |
|
12395 |
|
12396 |
|
12397 | role: (prop_types_default()).string,
|
12398 |
|
12399 |
|
12400 | href: (prop_types_default()).string,
|
12401 |
|
12402 | |
12403 |
|
12404 |
|
12405 |
|
12406 |
|
12407 |
|
12408 | onSelect: (prop_types_default()).func,
|
12409 |
|
12410 | |
12411 |
|
12412 |
|
12413 |
|
12414 | eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
|
12415 |
|
12416 |
|
12417 | as: (prop_types_default()).elementType
|
12418 | };
|
12419 | var NavLink_defaultProps = {
|
12420 | disabled: false,
|
12421 | as: src_SafeAnchor
|
12422 | };
|
12423 | var NavLink = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
12424 | var bsPrefix = _ref.bsPrefix,
|
12425 | disabled = _ref.disabled,
|
12426 | className = _ref.className,
|
12427 | href = _ref.href,
|
12428 | eventKey = _ref.eventKey,
|
12429 | onSelect = _ref.onSelect,
|
12430 | as = _ref.as,
|
12431 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavLink_excluded);
|
12432 |
|
12433 | bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-link');
|
12434 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AbstractNavItem, extends_extends({}, props, {
|
12435 | href: href,
|
12436 | ref: ref,
|
12437 | eventKey: eventKey,
|
12438 | as: as,
|
12439 | disabled: disabled,
|
12440 | onSelect: onSelect,
|
12441 | className: classnames_default()(className, bsPrefix, disabled && 'disabled'),
|
12442 | __self: NavLink_this,
|
12443 | __source: {
|
12444 | fileName: NavLink_jsxFileName,
|
12445 | lineNumber: 91,
|
12446 | columnNumber: 7
|
12447 | }
|
12448 | }));
|
12449 | });
|
12450 | NavLink.displayName = 'NavLink';
|
12451 | NavLink.propTypes = NavLink_propTypes;
|
12452 | NavLink.defaultProps = NavLink_defaultProps;
|
12453 | const src_NavLink = (NavLink);
|
12454 | ;
|
12455 |
|
12456 |
|
12457 | var Nav_excluded = ["as", "bsPrefix", "variant", "fill", "justify", "navbar", "navbarScroll", "className", "children", "activeKey"];
|
12458 |
|
12459 | var Nav_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Nav.tsx",
|
12460 | Nav_this = undefined;
|
12461 |
|
12462 |
|
12463 |
|
12464 |
|
12465 |
|
12466 |
|
12467 |
|
12468 |
|
12469 |
|
12470 |
|
12471 |
|
12472 |
|
12473 | var Nav_propTypes = {
|
12474 | |
12475 |
|
12476 |
|
12477 | bsPrefix: (prop_types_default()).string,
|
12478 |
|
12479 |
|
12480 | navbarBsPrefix: (prop_types_default()).string,
|
12481 |
|
12482 |
|
12483 | cardHeaderBsPrefix: (prop_types_default()).string,
|
12484 |
|
12485 | |
12486 |
|
12487 |
|
12488 |
|
12489 |
|
12490 | variant: (prop_types_default()).string,
|
12491 |
|
12492 | |
12493 |
|
12494 |
|
12495 |
|
12496 |
|
12497 | activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
|
12498 |
|
12499 | |
12500 |
|
12501 |
|
12502 | fill: (prop_types_default()).bool,
|
12503 |
|
12504 | |
12505 |
|
12506 |
|
12507 |
|
12508 |
|
12509 | justify: all_default()((prop_types_default()).bool, function (_ref) {
|
12510 | var justify = _ref.justify,
|
12511 | navbar = _ref.navbar;
|
12512 | return justify && navbar ? Error('justify navbar `Nav`s are not supported') : null;
|
12513 | }),
|
12514 |
|
12515 | |
12516 |
|
12517 |
|
12518 |
|
12519 |
|
12520 |
|
12521 |
|
12522 |
|
12523 |
|
12524 |
|
12525 | onSelect: (prop_types_default()).func,
|
12526 |
|
12527 | |
12528 |
|
12529 |
|
12530 |
|
12531 |
|
12532 |
|
12533 |
|
12534 |
|
12535 | role: (prop_types_default()).string,
|
12536 |
|
12537 | |
12538 |
|
12539 |
|
12540 |
|
12541 | navbar: (prop_types_default()).bool,
|
12542 |
|
12543 | |
12544 |
|
12545 |
|
12546 | navbarScroll: (prop_types_default()).bool,
|
12547 | as: (prop_types_default()).elementType,
|
12548 |
|
12549 |
|
12550 | onKeyDown: (prop_types_default()).func
|
12551 | };
|
12552 | var Nav_defaultProps = {
|
12553 | justify: false,
|
12554 | fill: false
|
12555 | };
|
12556 | var Nav = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (uncontrolledProps, ref) {
|
12557 | var _classNames;
|
12558 |
|
12559 | var _useUncontrolled = useUncontrolled(uncontrolledProps, {
|
12560 | activeKey: 'onSelect'
|
12561 | }),
|
12562 | _useUncontrolled$as = _useUncontrolled.as,
|
12563 | as = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
|
12564 | initialBsPrefix = _useUncontrolled.bsPrefix,
|
12565 | variant = _useUncontrolled.variant,
|
12566 | fill = _useUncontrolled.fill,
|
12567 | justify = _useUncontrolled.justify,
|
12568 | navbar = _useUncontrolled.navbar,
|
12569 | navbarScroll = _useUncontrolled.navbarScroll,
|
12570 | className = _useUncontrolled.className,
|
12571 | children = _useUncontrolled.children,
|
12572 | activeKey = _useUncontrolled.activeKey,
|
12573 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Nav_excluded);
|
12574 |
|
12575 | var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'nav');
|
12576 | var navbarBsPrefix;
|
12577 | var cardHeaderBsPrefix;
|
12578 | var isNavbar = false;
|
12579 | var navbarContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
|
12580 | var cardContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(CardContext);
|
12581 |
|
12582 | if (navbarContext) {
|
12583 | navbarBsPrefix = navbarContext.bsPrefix;
|
12584 | isNavbar = navbar == null ? true : navbar;
|
12585 | } else if (cardContext) {
|
12586 | cardHeaderBsPrefix = cardContext.cardHeaderBsPrefix;
|
12587 | }
|
12588 |
|
12589 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_AbstractNav, extends_extends({
|
12590 | as: as,
|
12591 | ref: ref,
|
12592 | activeKey: activeKey,
|
12593 | className: classnames_default()(className, (_classNames = {}, _classNames[bsPrefix] = !isNavbar, _classNames[navbarBsPrefix + "-nav"] = isNavbar, _classNames[navbarBsPrefix + "-nav-scroll"] = isNavbar && navbarScroll, _classNames[cardHeaderBsPrefix + "-" + variant] = !!cardHeaderBsPrefix, _classNames[bsPrefix + "-" + variant] = !!variant, _classNames[bsPrefix + "-fill"] = fill, _classNames[bsPrefix + "-justified"] = justify, _classNames))
|
12594 | }, props, {
|
12595 | __self: Nav_this,
|
12596 | __source: {
|
12597 | fileName: Nav_jsxFileName,
|
12598 | lineNumber: 156,
|
12599 | columnNumber: 5
|
12600 | }
|
12601 | }), children);
|
12602 | });
|
12603 | Nav.displayName = 'Nav';
|
12604 | Nav.propTypes = Nav_propTypes;
|
12605 | Nav.defaultProps = Nav_defaultProps;
|
12606 | Nav.Item = src_NavItem;
|
12607 | Nav.Link = src_NavLink;
|
12608 | const src_Nav = (Nav);
|
12609 | ;
|
12610 |
|
12611 |
|
12612 | var NavbarBrand_excluded = ["bsPrefix", "className", "as"];
|
12613 |
|
12614 | var NavbarBrand_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarBrand.tsx",
|
12615 | NavbarBrand_this = undefined;
|
12616 |
|
12617 |
|
12618 |
|
12619 |
|
12620 |
|
12621 | var NavbarBrand_propTypes = {
|
12622 |
|
12623 | bsPrefix: (prop_types_default()).string,
|
12624 |
|
12625 | |
12626 |
|
12627 |
|
12628 | href: (prop_types_default()).string,
|
12629 |
|
12630 | |
12631 |
|
12632 |
|
12633 | as: (prop_types_default()).elementType
|
12634 | };
|
12635 | var NavbarBrand = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
12636 | var bsPrefix = _ref.bsPrefix,
|
12637 | className = _ref.className,
|
12638 | as = _ref.as,
|
12639 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavbarBrand_excluded);
|
12640 |
|
12641 | bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-brand');
|
12642 | var Component = as || (props.href ? 'a' : 'span');
|
12643 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
12644 | ref: ref,
|
12645 | className: classnames_default()(className, bsPrefix),
|
12646 | __self: NavbarBrand_this,
|
12647 | __source: {
|
12648 | fileName: NavbarBrand_jsxFileName,
|
12649 | lineNumber: 36,
|
12650 | columnNumber: 7
|
12651 | }
|
12652 | }));
|
12653 | });
|
12654 | NavbarBrand.displayName = 'NavbarBrand';
|
12655 | NavbarBrand.propTypes = NavbarBrand_propTypes;
|
12656 | const src_NavbarBrand = (NavbarBrand);
|
12657 | ;
|
12658 |
|
12659 |
|
12660 | var NavbarCollapse_excluded = ["children", "bsPrefix"];
|
12661 |
|
12662 | var NavbarCollapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarCollapse.tsx",
|
12663 | NavbarCollapse_this = undefined;
|
12664 |
|
12665 |
|
12666 |
|
12667 |
|
12668 |
|
12669 |
|
12670 | var NavbarCollapse_propTypes = {
|
12671 |
|
12672 | bsPrefix: (prop_types_default()).string
|
12673 | };
|
12674 | var NavbarCollapse = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
12675 | var children = _ref.children,
|
12676 | bsPrefix = _ref.bsPrefix,
|
12677 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavbarCollapse_excluded);
|
12678 |
|
12679 | bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-collapse');
|
12680 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NavbarContext.Consumer, {
|
12681 | __self: NavbarCollapse_this,
|
12682 | __source: {
|
12683 | fileName: NavbarCollapse_jsxFileName,
|
12684 | lineNumber: 23,
|
12685 | columnNumber: 7
|
12686 | }
|
12687 | }, function (context) {
|
12688 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Collapse, extends_extends({
|
12689 | in: !!(context && context.expanded)
|
12690 | }, props, {
|
12691 | __self: NavbarCollapse_this,
|
12692 | __source: {
|
12693 | fileName: NavbarCollapse_jsxFileName,
|
12694 | lineNumber: 25,
|
12695 | columnNumber: 11
|
12696 | }
|
12697 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
12698 | ref: ref,
|
12699 | className: bsPrefix,
|
12700 | __self: NavbarCollapse_this,
|
12701 | __source: {
|
12702 | fileName: NavbarCollapse_jsxFileName,
|
12703 | lineNumber: 26,
|
12704 | columnNumber: 13
|
12705 | }
|
12706 | }, children));
|
12707 | });
|
12708 | });
|
12709 | NavbarCollapse.displayName = 'NavbarCollapse';
|
12710 | NavbarCollapse.propTypes = NavbarCollapse_propTypes;
|
12711 | const src_NavbarCollapse = (NavbarCollapse);
|
12712 | ;
|
12713 |
|
12714 |
|
12715 | var NavbarToggle_excluded = ["bsPrefix", "className", "children", "label", "as", "onClick"];
|
12716 |
|
12717 | var NavbarToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarToggle.tsx",
|
12718 | NavbarToggle_this = undefined;
|
12719 |
|
12720 |
|
12721 |
|
12722 |
|
12723 |
|
12724 |
|
12725 |
|
12726 | var NavbarToggle_propTypes = {
|
12727 |
|
12728 | bsPrefix: (prop_types_default()).string,
|
12729 |
|
12730 |
|
12731 | label: (prop_types_default()).string,
|
12732 |
|
12733 |
|
12734 | onClick: (prop_types_default()).func,
|
12735 |
|
12736 | |
12737 |
|
12738 |
|
12739 | children: (prop_types_default()).node,
|
12740 | as: (prop_types_default()).elementType
|
12741 | };
|
12742 | var NavbarToggle_defaultProps = {
|
12743 | label: 'Toggle navigation'
|
12744 | };
|
12745 | var NavbarToggle = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
12746 | var bsPrefix = _ref.bsPrefix,
|
12747 | className = _ref.className,
|
12748 | children = _ref.children,
|
12749 | label = _ref.label,
|
12750 | _ref$as = _ref.as,
|
12751 | Component = _ref$as === void 0 ? 'button' : _ref$as,
|
12752 | onClick = _ref.onClick,
|
12753 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavbarToggle_excluded);
|
12754 |
|
12755 | bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-toggler');
|
12756 |
|
12757 | var _ref2 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext) || {},
|
12758 | onToggle = _ref2.onToggle,
|
12759 | expanded = _ref2.expanded;
|
12760 |
|
12761 | var handleClick = useEventCallback(function (e) {
|
12762 | if (onClick) onClick(e);
|
12763 | if (onToggle) onToggle();
|
12764 | });
|
12765 |
|
12766 | if (Component === 'button') {
|
12767 | props.type = 'button';
|
12768 | }
|
12769 |
|
12770 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, props, {
|
12771 | ref: ref,
|
12772 | onClick: handleClick,
|
12773 | "aria-label": label,
|
12774 | className: classnames_default()(className, bsPrefix, !expanded && 'collapsed'),
|
12775 | __self: NavbarToggle_this,
|
12776 | __source: {
|
12777 | fileName: NavbarToggle_jsxFileName,
|
12778 | lineNumber: 70,
|
12779 | columnNumber: 7
|
12780 | }
|
12781 | }), children || external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
12782 | className: bsPrefix + "-icon",
|
12783 | __self: NavbarToggle_this,
|
12784 | __source: {
|
12785 | fileName: NavbarToggle_jsxFileName,
|
12786 | lineNumber: 77,
|
12787 | columnNumber: 22
|
12788 | }
|
12789 | }));
|
12790 | });
|
12791 | NavbarToggle.displayName = 'NavbarToggle';
|
12792 | NavbarToggle.propTypes = NavbarToggle_propTypes;
|
12793 | NavbarToggle.defaultProps = NavbarToggle_defaultProps;
|
12794 | const src_NavbarToggle = (NavbarToggle);
|
12795 | ;
|
12796 |
|
12797 |
|
12798 | var Navbar_excluded = ["bsPrefix", "expand", "variant", "bg", "fixed", "sticky", "className", "children", "as", "expanded", "onToggle", "onSelect", "collapseOnSelect"];
|
12799 |
|
12800 | var Navbar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Navbar.tsx",
|
12801 | Navbar_this = undefined;
|
12802 |
|
12803 |
|
12804 |
|
12805 |
|
12806 |
|
12807 |
|
12808 |
|
12809 |
|
12810 |
|
12811 |
|
12812 |
|
12813 |
|
12814 | var NavbarText = createWithBsPrefix('navbar-text', {
|
12815 | Component: 'span'
|
12816 | });
|
12817 | var Navbar_propTypes = {
|
12818 |
|
12819 | bsPrefix: (prop_types_default()).string,
|
12820 |
|
12821 | |
12822 |
|
12823 |
|
12824 |
|
12825 |
|
12826 |
|
12827 |
|
12828 | variant: (prop_types_default()).string,
|
12829 |
|
12830 | |
12831 |
|
12832 |
|
12833 |
|
12834 | expand: prop_types_default().oneOf([true, 'sm', 'md', 'lg', 'xl']).isRequired,
|
12835 |
|
12836 | |
12837 |
|
12838 |
|
12839 |
|
12840 |
|
12841 |
|
12842 | bg: (prop_types_default()).string,
|
12843 |
|
12844 | |
12845 |
|
12846 |
|
12847 |
|
12848 | fixed: prop_types_default().oneOf(['top', 'bottom']),
|
12849 |
|
12850 | |
12851 |
|
12852 |
|
12853 |
|
12854 |
|
12855 |
|
12856 | sticky: prop_types_default().oneOf(['top']),
|
12857 |
|
12858 | |
12859 |
|
12860 |
|
12861 | as: (prop_types_default()).elementType,
|
12862 |
|
12863 | |
12864 |
|
12865 |
|
12866 |
|
12867 |
|
12868 |
|
12869 |
|
12870 | onToggle: (prop_types_default()).func,
|
12871 |
|
12872 | |
12873 |
|
12874 |
|
12875 |
|
12876 |
|
12877 |
|
12878 |
|
12879 |
|
12880 |
|
12881 |
|
12882 |
|
12883 |
|
12884 |
|
12885 |
|
12886 |
|
12887 |
|
12888 |
|
12889 |
|
12890 |
|
12891 |
|
12892 |
|
12893 | onSelect: (prop_types_default()).func,
|
12894 |
|
12895 | |
12896 |
|
12897 |
|
12898 |
|
12899 |
|
12900 |
|
12901 |
|
12902 |
|
12903 | collapseOnSelect: (prop_types_default()).bool,
|
12904 |
|
12905 | |
12906 |
|
12907 |
|
12908 |
|
12909 |
|
12910 | expanded: (prop_types_default()).bool,
|
12911 |
|
12912 | |
12913 |
|
12914 |
|
12915 |
|
12916 |
|
12917 |
|
12918 | role: (prop_types_default()).string
|
12919 | };
|
12920 | var Navbar_defaultProps = {
|
12921 | expand: true,
|
12922 | variant: 'light',
|
12923 | collapseOnSelect: false
|
12924 | };
|
12925 | var Navbar = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
12926 | var _useUncontrolled = useUncontrolled(props, {
|
12927 | expanded: 'onToggle'
|
12928 | }),
|
12929 | initialBsPrefix = _useUncontrolled.bsPrefix,
|
12930 | expand = _useUncontrolled.expand,
|
12931 | variant = _useUncontrolled.variant,
|
12932 | bg = _useUncontrolled.bg,
|
12933 | fixed = _useUncontrolled.fixed,
|
12934 | sticky = _useUncontrolled.sticky,
|
12935 | className = _useUncontrolled.className,
|
12936 | children = _useUncontrolled.children,
|
12937 | _useUncontrolled$as = _useUncontrolled.as,
|
12938 | Component = _useUncontrolled$as === void 0 ? 'nav' : _useUncontrolled$as,
|
12939 | expanded = _useUncontrolled.expanded,
|
12940 | _onToggle = _useUncontrolled.onToggle,
|
12941 | onSelect = _useUncontrolled.onSelect,
|
12942 | collapseOnSelect = _useUncontrolled.collapseOnSelect,
|
12943 | controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Navbar_excluded);
|
12944 |
|
12945 | var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'navbar');
|
12946 | var handleCollapse = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
12947 | if (onSelect) onSelect.apply(void 0, arguments);
|
12948 |
|
12949 | if (collapseOnSelect && expanded) {
|
12950 | if (_onToggle) {
|
12951 | _onToggle(false);
|
12952 | }
|
12953 | }
|
12954 | }, [onSelect, collapseOnSelect, expanded, _onToggle]);
|
12955 |
|
12956 |
|
12957 |
|
12958 | if (controlledProps.role === undefined && Component !== 'nav') {
|
12959 | controlledProps.role = 'navigation';
|
12960 | }
|
12961 |
|
12962 | var expandClass = bsPrefix + "-expand";
|
12963 | if (typeof expand === 'string') expandClass = expandClass + "-" + expand;
|
12964 | var navbarContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
12965 | return {
|
12966 | onToggle: function onToggle() {
|
12967 | return _onToggle && _onToggle(!expanded);
|
12968 | },
|
12969 | bsPrefix: bsPrefix,
|
12970 | expanded: !!expanded
|
12971 | };
|
12972 | }, [bsPrefix, expanded, _onToggle]);
|
12973 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(NavbarContext.Provider, {
|
12974 | value: navbarContext,
|
12975 | __self: Navbar_this,
|
12976 | __source: {
|
12977 | fileName: Navbar_jsxFileName,
|
12978 | lineNumber: 208,
|
12979 | columnNumber: 5
|
12980 | }
|
12981 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
|
12982 | value: handleCollapse,
|
12983 | __self: Navbar_this,
|
12984 | __source: {
|
12985 | fileName: Navbar_jsxFileName,
|
12986 | lineNumber: 209,
|
12987 | columnNumber: 7
|
12988 | }
|
12989 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
12990 | ref: ref
|
12991 | }, controlledProps, {
|
12992 | className: classnames_default()(className, bsPrefix, expand && expandClass, variant && bsPrefix + "-" + variant, bg && "bg-" + bg, sticky && "sticky-" + sticky, fixed && "fixed-" + fixed),
|
12993 | __self: Navbar_this,
|
12994 | __source: {
|
12995 | fileName: Navbar_jsxFileName,
|
12996 | lineNumber: 210,
|
12997 | columnNumber: 9
|
12998 | }
|
12999 | }), children)));
|
13000 | });
|
13001 | Navbar.propTypes = Navbar_propTypes;
|
13002 | Navbar.defaultProps = Navbar_defaultProps;
|
13003 | Navbar.displayName = 'Navbar';
|
13004 | Navbar.Brand = src_NavbarBrand;
|
13005 | Navbar.Toggle = src_NavbarToggle;
|
13006 | Navbar.Collapse = src_NavbarCollapse;
|
13007 | Navbar.Text = NavbarText;
|
13008 | const src_Navbar = (Navbar);
|
13009 | ;
|
13010 |
|
13011 |
|
13012 | var NavDropdown_excluded = ["id", "title", "children", "bsPrefix", "className", "rootCloseEvent", "menuRole", "disabled", "active", "renderMenuOnMount"];
|
13013 |
|
13014 | var NavDropdown_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavDropdown.tsx",
|
13015 | NavDropdown_this = undefined;
|
13016 |
|
13017 |
|
13018 |
|
13019 |
|
13020 |
|
13021 |
|
13022 |
|
13023 | var NavDropdown_propTypes = {
|
13024 | |
13025 |
|
13026 |
|
13027 |
|
13028 |
|
13029 | id: (prop_types_default()).any,
|
13030 |
|
13031 |
|
13032 | onClick: (prop_types_default()).func,
|
13033 |
|
13034 |
|
13035 | title: (prop_types_default()).node.isRequired,
|
13036 |
|
13037 |
|
13038 | disabled: (prop_types_default()).bool,
|
13039 |
|
13040 |
|
13041 | active: (prop_types_default()).bool,
|
13042 |
|
13043 |
|
13044 | menuRole: (prop_types_default()).string,
|
13045 |
|
13046 |
|
13047 | renderMenuOnMount: (prop_types_default()).bool,
|
13048 |
|
13049 | |
13050 |
|
13051 |
|
13052 |
|
13053 |
|
13054 | rootCloseEvent: (prop_types_default()).string,
|
13055 |
|
13056 |
|
13057 | bsPrefix: (prop_types_default()).string
|
13058 | };
|
13059 | var NavDropdown = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
13060 | var id = _ref.id,
|
13061 | title = _ref.title,
|
13062 | children = _ref.children,
|
13063 | bsPrefix = _ref.bsPrefix,
|
13064 | className = _ref.className,
|
13065 | rootCloseEvent = _ref.rootCloseEvent,
|
13066 | menuRole = _ref.menuRole,
|
13067 | disabled = _ref.disabled,
|
13068 | active = _ref.active,
|
13069 | renderMenuOnMount = _ref.renderMenuOnMount,
|
13070 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, NavDropdown_excluded);
|
13071 |
|
13072 |
|
13073 | var navItemPrefix = useBootstrapPrefix(undefined, 'nav-item');
|
13074 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown, extends_extends({
|
13075 | ref: ref
|
13076 | }, props, {
|
13077 | className: classnames_default()(className, navItemPrefix),
|
13078 | __self: NavDropdown_this,
|
13079 | __source: {
|
13080 | fileName: NavDropdown_jsxFileName,
|
13081 | lineNumber: 87,
|
13082 | columnNumber: 7
|
13083 | }
|
13084 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown.Toggle, {
|
13085 | id: id,
|
13086 | eventKey: null,
|
13087 | active: active,
|
13088 | disabled: disabled,
|
13089 | childBsPrefix: bsPrefix,
|
13090 | as: src_NavLink,
|
13091 | __self: NavDropdown_this,
|
13092 | __source: {
|
13093 | fileName: NavDropdown_jsxFileName,
|
13094 | lineNumber: 92,
|
13095 | columnNumber: 9
|
13096 | }
|
13097 | }, title), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown.Menu, {
|
13098 | role: menuRole,
|
13099 | renderOnMount: renderMenuOnMount,
|
13100 | rootCloseEvent: rootCloseEvent,
|
13101 | __self: NavDropdown_this,
|
13102 | __source: {
|
13103 | fileName: NavDropdown_jsxFileName,
|
13104 | lineNumber: 103,
|
13105 | columnNumber: 9
|
13106 | }
|
13107 | }, children));
|
13108 | });
|
13109 | NavDropdown.displayName = 'NavDropdown';
|
13110 | NavDropdown.propTypes = NavDropdown_propTypes;
|
13111 | NavDropdown.Item = src_Dropdown.Item;
|
13112 | NavDropdown.ItemText = src_Dropdown.ItemText;
|
13113 | NavDropdown.Divider = src_Dropdown.Divider;
|
13114 | NavDropdown.Header = src_Dropdown.Header;
|
13115 | const src_NavDropdown = (NavDropdown);
|
13116 | ;
|
13117 |
|
13118 |
|
13119 |
|
13120 |
|
13121 |
|
13122 |
|
13123 |
|
13124 |
|
13125 |
|
13126 |
|
13127 |
|
13128 |
|
13129 |
|
13130 |
|
13131 |
|
13132 |
|
13133 |
|
13134 | var Overlay = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, outerRef) {
|
13135 | var flip = props.flip,
|
13136 | offset = props.offset,
|
13137 | placement = props.placement,
|
13138 | _props$containerPaddi = props.containerPadding,
|
13139 | containerPadding = _props$containerPaddi === void 0 ? 5 : _props$containerPaddi,
|
13140 | _props$popperConfig = props.popperConfig,
|
13141 | popperConfig = _props$popperConfig === void 0 ? {} : _props$popperConfig,
|
13142 | Transition = props.transition;
|
13143 |
|
13144 | var _useCallbackRef = useCallbackRef(),
|
13145 | rootElement = _useCallbackRef[0],
|
13146 | attachRef = _useCallbackRef[1];
|
13147 |
|
13148 | var _useCallbackRef2 = useCallbackRef(),
|
13149 | arrowElement = _useCallbackRef2[0],
|
13150 | attachArrowRef = _useCallbackRef2[1];
|
13151 |
|
13152 | var mergedRef = esm_useMergedRefs(attachRef, outerRef);
|
13153 | var container = useWaitForDOMRef(props.container);
|
13154 | var target = useWaitForDOMRef(props.target);
|
13155 |
|
13156 | var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!props.show),
|
13157 | exited = _useState[0],
|
13158 | setExited = _useState[1];
|
13159 |
|
13160 | var _usePopper = esm_usePopper(target, rootElement, mergeOptionsWithPopperConfig({
|
13161 | placement: placement,
|
13162 | enableEvents: !!props.show,
|
13163 | containerPadding: containerPadding || 5,
|
13164 | flip: flip,
|
13165 | offset: offset,
|
13166 | arrowElement: arrowElement,
|
13167 | popperConfig: popperConfig
|
13168 | })),
|
13169 | styles = _usePopper.styles,
|
13170 | attributes = _usePopper.attributes,
|
13171 | popper = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_usePopper, ["styles", "attributes"]);
|
13172 |
|
13173 | if (props.show) {
|
13174 | if (exited) setExited(false);
|
13175 | } else if (!props.transition && !exited) {
|
13176 | setExited(true);
|
13177 | }
|
13178 |
|
13179 | var handleHidden = function handleHidden() {
|
13180 | setExited(true);
|
13181 |
|
13182 | if (props.onExited) {
|
13183 | props.onExited.apply(props, arguments);
|
13184 | }
|
13185 | };
|
13186 |
|
13187 |
|
13188 | var mountOverlay = props.show || Transition && !exited;
|
13189 | esm_useRootClose(rootElement, props.onHide, {
|
13190 | disabled: !props.rootClose || props.rootCloseDisabled,
|
13191 | clickTrigger: props.rootCloseEvent
|
13192 | });
|
13193 |
|
13194 | if (!mountOverlay) {
|
13195 |
|
13196 | return null;
|
13197 | }
|
13198 |
|
13199 | var child = props.children(extends_extends({}, popper, {
|
13200 | show: !!props.show,
|
13201 | props: extends_extends({}, attributes.popper, {
|
13202 | style: styles.popper,
|
13203 | ref: mergedRef
|
13204 | }),
|
13205 | arrowProps: extends_extends({}, attributes.arrow, {
|
13206 | style: styles.arrow,
|
13207 | ref: attachArrowRef
|
13208 | })
|
13209 | }));
|
13210 |
|
13211 | if (Transition) {
|
13212 | var onExit = props.onExit,
|
13213 | onExiting = props.onExiting,
|
13214 | onEnter = props.onEnter,
|
13215 | onEntering = props.onEntering,
|
13216 | onEntered = props.onEntered;
|
13217 | child = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, {
|
13218 | "in": props.show,
|
13219 | appear: true,
|
13220 | onExit: onExit,
|
13221 | onExiting: onExiting,
|
13222 | onExited: handleHidden,
|
13223 | onEnter: onEnter,
|
13224 | onEntering: onEntering,
|
13225 | onEntered: onEntered
|
13226 | }, child);
|
13227 | }
|
13228 |
|
13229 | return container ? external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().createPortal(child, container) : null;
|
13230 | });
|
13231 | Overlay.displayName = 'Overlay';
|
13232 | Overlay.propTypes = {
|
13233 | |
13234 |
|
13235 |
|
13236 | show: (prop_types_default()).bool,
|
13237 |
|
13238 |
|
13239 | placement: prop_types_default().oneOf(enums_placements),
|
13240 |
|
13241 | |
13242 |
|
13243 |
|
13244 |
|
13245 | target: (prop_types_default()).any,
|
13246 |
|
13247 | |
13248 |
|
13249 |
|
13250 |
|
13251 | container: (prop_types_default()).any,
|
13252 |
|
13253 | |
13254 |
|
13255 |
|
13256 |
|
13257 |
|
13258 | flip: (prop_types_default()).bool,
|
13259 |
|
13260 | |
13261 |
|
13262 |
|
13263 |
|
13264 |
|
13265 |
|
13266 |
|
13267 |
|
13268 |
|
13269 |
|
13270 |
|
13271 |
|
13272 |
|
13273 |
|
13274 |
|
13275 |
|
13276 |
|
13277 |
|
13278 |
|
13279 |
|
13280 |
|
13281 |
|
13282 | children: (prop_types_default()).func.isRequired,
|
13283 |
|
13284 | |
13285 |
|
13286 |
|
13287 |
|
13288 | containerPadding: (prop_types_default()).number,
|
13289 |
|
13290 | |
13291 |
|
13292 |
|
13293 | popperConfig: (prop_types_default()).object,
|
13294 |
|
13295 | |
13296 |
|
13297 |
|
13298 | rootClose: (prop_types_default()).bool,
|
13299 |
|
13300 | |
13301 |
|
13302 |
|
13303 | rootCloseEvent: prop_types_default().oneOf(['click', 'mousedown']),
|
13304 |
|
13305 | |
13306 |
|
13307 |
|
13308 | rootCloseDisabled: (prop_types_default()).bool,
|
13309 |
|
13310 | |
13311 |
|
13312 |
|
13313 |
|
13314 |
|
13315 |
|
13316 |
|
13317 | onHide: function onHide(props) {
|
13318 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
13319 | args[_key - 1] = arguments[_key];
|
13320 | }
|
13321 |
|
13322 | if (props.rootClose) {
|
13323 | var _PropTypes$func;
|
13324 |
|
13325 | return (_PropTypes$func = (prop_types_default()).func).isRequired.apply(_PropTypes$func, [props].concat(args));
|
13326 | }
|
13327 |
|
13328 | return prop_types_default().func.apply((prop_types_default()), [props].concat(args));
|
13329 | },
|
13330 |
|
13331 | |
13332 |
|
13333 |
|
13334 |
|
13335 |
|
13336 | transition: (prop_types_default()).elementType,
|
13337 |
|
13338 | |
13339 |
|
13340 |
|
13341 | onEnter: (prop_types_default()).func,
|
13342 |
|
13343 | |
13344 |
|
13345 |
|
13346 | onEntering: (prop_types_default()).func,
|
13347 |
|
13348 | |
13349 |
|
13350 |
|
13351 | onEntered: (prop_types_default()).func,
|
13352 |
|
13353 | |
13354 |
|
13355 |
|
13356 | onExit: (prop_types_default()).func,
|
13357 |
|
13358 | |
13359 |
|
13360 |
|
13361 | onExiting: (prop_types_default()).func,
|
13362 |
|
13363 | |
13364 |
|
13365 |
|
13366 | onExited: (prop_types_default()).func
|
13367 | };
|
13368 | const esm_Overlay = (Overlay);
|
13369 | ;
|
13370 |
|
13371 |
|
13372 | var Overlay_excluded = ["children", "transition", "popperConfig"],
|
13373 | _excluded2 = ["props", "arrowProps", "show", "update", "forceUpdate", "placement", "state"];
|
13374 | var Overlay_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Overlay.tsx";
|
13375 |
|
13376 |
|
13377 |
|
13378 |
|
13379 |
|
13380 |
|
13381 |
|
13382 |
|
13383 | var Overlay_propTypes = {
|
13384 | |
13385 |
|
13386 |
|
13387 |
|
13388 | container: prop_types_default().oneOfType([lib.ax, (prop_types_default()).func]),
|
13389 |
|
13390 | |
13391 |
|
13392 |
|
13393 |
|
13394 | target: prop_types_default().oneOfType([lib.ax, (prop_types_default()).func]),
|
13395 |
|
13396 | |
13397 |
|
13398 |
|
13399 | show: (prop_types_default()).bool,
|
13400 |
|
13401 | |
13402 |
|
13403 |
|
13404 | popperConfig: (prop_types_default()).object,
|
13405 |
|
13406 | |
13407 |
|
13408 |
|
13409 | rootClose: (prop_types_default()).bool,
|
13410 |
|
13411 | |
13412 |
|
13413 |
|
13414 | rootCloseEvent: prop_types_default().oneOf(['click', 'mousedown']),
|
13415 |
|
13416 | |
13417 |
|
13418 |
|
13419 |
|
13420 | onHide: (prop_types_default()).func,
|
13421 |
|
13422 | |
13423 |
|
13424 |
|
13425 |
|
13426 | transition: prop_types_default().oneOfType([(prop_types_default()).bool, lib.nm]),
|
13427 |
|
13428 | |
13429 |
|
13430 |
|
13431 | onEnter: (prop_types_default()).func,
|
13432 |
|
13433 | |
13434 |
|
13435 |
|
13436 | onEntering: (prop_types_default()).func,
|
13437 |
|
13438 | |
13439 |
|
13440 |
|
13441 | onEntered: (prop_types_default()).func,
|
13442 |
|
13443 | |
13444 |
|
13445 |
|
13446 | onExit: (prop_types_default()).func,
|
13447 |
|
13448 | |
13449 |
|
13450 |
|
13451 | onExiting: (prop_types_default()).func,
|
13452 |
|
13453 | |
13454 |
|
13455 |
|
13456 | onExited: (prop_types_default()).func,
|
13457 |
|
13458 | |
13459 |
|
13460 |
|
13461 | placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'])
|
13462 | };
|
13463 | var Overlay_defaultProps = {
|
13464 | transition: src_Fade,
|
13465 | rootClose: false,
|
13466 | show: false,
|
13467 | placement: 'top'
|
13468 | };
|
13469 |
|
13470 | function wrapRefs(props, arrowProps) {
|
13471 | var ref = props.ref;
|
13472 | var aRef = arrowProps.ref;
|
13473 |
|
13474 | props.ref = ref.__wrapped || (ref.__wrapped = function (r) {
|
13475 | return ref(safeFindDOMNode(r));
|
13476 | });
|
13477 |
|
13478 | arrowProps.ref = aRef.__wrapped || (aRef.__wrapped = function (r) {
|
13479 | return aRef(safeFindDOMNode(r));
|
13480 | });
|
13481 | }
|
13482 |
|
13483 | function Overlay_Overlay(_ref) {
|
13484 | var overlay = _ref.children,
|
13485 | transition = _ref.transition,
|
13486 | _ref$popperConfig = _ref.popperConfig,
|
13487 | popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig,
|
13488 | outerProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Overlay_excluded);
|
13489 |
|
13490 | var popperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
|
13491 |
|
13492 | var _usePopperMarginModif = usePopperMarginModifiers(),
|
13493 | ref = _usePopperMarginModif[0],
|
13494 | marginModifiers = _usePopperMarginModif[1];
|
13495 |
|
13496 | var actualTransition = transition === true ? src_Fade : transition || null;
|
13497 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(esm_Overlay, extends_extends({}, outerProps, {
|
13498 | ref: ref,
|
13499 | popperConfig: extends_extends({}, popperConfig, {
|
13500 | modifiers: marginModifiers.concat(popperConfig.modifiers || [])
|
13501 | }),
|
13502 | transition: actualTransition,
|
13503 | __self: this,
|
13504 | __source: {
|
13505 | fileName: Overlay_jsxFileName,
|
13506 | lineNumber: 174,
|
13507 | columnNumber: 5
|
13508 | }
|
13509 | }), function (_ref2) {
|
13510 | var _state$modifiersData$;
|
13511 |
|
13512 | var overlayProps = _ref2.props,
|
13513 | arrowProps = _ref2.arrowProps,
|
13514 | show = _ref2.show,
|
13515 | update = _ref2.update,
|
13516 | _ = _ref2.forceUpdate,
|
13517 | placement = _ref2.placement,
|
13518 | state = _ref2.state,
|
13519 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, _excluded2);
|
13520 |
|
13521 | wrapRefs(overlayProps, arrowProps);
|
13522 | var popper = Object.assign(popperRef.current, {
|
13523 | state: state,
|
13524 | scheduleUpdate: update,
|
13525 | placement: placement,
|
13526 | outOfBoundaries: (state == null ? void 0 : (_state$modifiersData$ = state.modifiersData.hide) == null ? void 0 : _state$modifiersData$.isReferenceHidden) || false
|
13527 | });
|
13528 | if (typeof overlay === 'function') return overlay(extends_extends({}, props, overlayProps, {
|
13529 | placement: placement,
|
13530 | show: show
|
13531 | }, !transition && show && {
|
13532 | className: 'show'
|
13533 | }, {
|
13534 | popper: popper,
|
13535 | arrowProps: arrowProps
|
13536 | }));
|
13537 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(overlay, extends_extends({}, props, overlayProps, {
|
13538 | placement: placement,
|
13539 | arrowProps: arrowProps,
|
13540 | popper: popper,
|
13541 | className: classnames_default()(overlay.props.className, !transition && show && 'show'),
|
13542 | style: extends_extends({}, overlay.props.style, overlayProps.style)
|
13543 | }));
|
13544 | });
|
13545 | }
|
13546 |
|
13547 | Overlay_Overlay.propTypes = Overlay_propTypes;
|
13548 | Overlay_Overlay.defaultProps = Overlay_defaultProps;
|
13549 | const src_Overlay = (Overlay_Overlay);
|
13550 | ;
|
13551 |
|
13552 |
|
13553 |
|
13554 | var OverlayTrigger_excluded = ["trigger", "overlay", "children", "popperConfig", "show", "defaultShow", "onToggle", "delay", "placement", "flip"];
|
13555 | var OverlayTrigger_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/OverlayTrigger.tsx";
|
13556 |
|
13557 |
|
13558 |
|
13559 |
|
13560 |
|
13561 |
|
13562 |
|
13563 |
|
13564 |
|
13565 | var RefHolder = function (_React$Component) {
|
13566 | inheritsLoose_inheritsLoose(RefHolder, _React$Component);
|
13567 |
|
13568 | function RefHolder() {
|
13569 | return _React$Component.apply(this, arguments) || this;
|
13570 | }
|
13571 |
|
13572 | var _proto = RefHolder.prototype;
|
13573 |
|
13574 | _proto.render = function render() {
|
13575 | return this.props.children;
|
13576 | };
|
13577 |
|
13578 | return RefHolder;
|
13579 | }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
|
13580 |
|
13581 | function normalizeDelay(delay) {
|
13582 | return delay && typeof delay === 'object' ? delay : {
|
13583 | show: delay,
|
13584 | hide: delay
|
13585 | };
|
13586 | }
|
13587 |
|
13588 |
|
13589 |
|
13590 |
|
13591 |
|
13592 | function handleMouseOverOut( // eslint-disable-next-line @typescript-eslint/no-shadow
|
13593 | handler, args, relatedNative) {
|
13594 | var e = args[0];
|
13595 | var target = e.currentTarget;
|
13596 | var related = e.relatedTarget || e.nativeEvent[relatedNative];
|
13597 |
|
13598 | if ((!related || related !== target) && !contains_contains(target, related)) {
|
13599 | handler.apply(void 0, args);
|
13600 | }
|
13601 | }
|
13602 |
|
13603 | var triggerType = prop_types_default().oneOf(['click', 'hover', 'focus']);
|
13604 | var OverlayTrigger_propTypes = {
|
13605 | children: prop_types_default().oneOfType([(prop_types_default()).element, (prop_types_default()).func]).isRequired,
|
13606 |
|
13607 | |
13608 |
|
13609 |
|
13610 |
|
13611 |
|
13612 | trigger: prop_types_default().oneOfType([triggerType, prop_types_default().arrayOf(triggerType)]),
|
13613 |
|
13614 | |
13615 |
|
13616 |
|
13617 | delay: prop_types_default().oneOfType([(prop_types_default()).number, prop_types_default().shape({
|
13618 | show: (prop_types_default()).number,
|
13619 | hide: (prop_types_default()).number
|
13620 | })]),
|
13621 |
|
13622 | |
13623 |
|
13624 |
|
13625 |
|
13626 |
|
13627 |
|
13628 |
|
13629 |
|
13630 | show: (prop_types_default()).bool,
|
13631 |
|
13632 | |
13633 |
|
13634 |
|
13635 | defaultShow: (prop_types_default()).bool,
|
13636 |
|
13637 | |
13638 |
|
13639 |
|
13640 |
|
13641 |
|
13642 |
|
13643 |
|
13644 |
|
13645 | onToggle: (prop_types_default()).func,
|
13646 |
|
13647 | |
13648 |
|
13649 |
|
13650 | flip: (prop_types_default()).bool,
|
13651 |
|
13652 | |
13653 |
|
13654 |
|
13655 | overlay: prop_types_default().oneOfType([(prop_types_default()).func, (prop_types_default()).element.isRequired]),
|
13656 |
|
13657 | |
13658 |
|
13659 |
|
13660 | popperConfig: (prop_types_default()).object,
|
13661 |
|
13662 |
|
13663 | |
13664 |
|
13665 |
|
13666 | target: prop_types_default().oneOf([null]),
|
13667 |
|
13668 | |
13669 |
|
13670 |
|
13671 | onHide: prop_types_default().oneOf([null]),
|
13672 |
|
13673 | |
13674 |
|
13675 |
|
13676 | placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'])
|
13677 | };
|
13678 | var OverlayTrigger_defaultProps = {
|
13679 | defaultShow: false,
|
13680 | trigger: ['hover', 'focus']
|
13681 | };
|
13682 |
|
13683 | function OverlayTrigger(_ref) {
|
13684 | var trigger = _ref.trigger,
|
13685 | overlay = _ref.overlay,
|
13686 | children = _ref.children,
|
13687 | _ref$popperConfig = _ref.popperConfig,
|
13688 | popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig,
|
13689 | propsShow = _ref.show,
|
13690 | _ref$defaultShow = _ref.defaultShow,
|
13691 | defaultShow = _ref$defaultShow === void 0 ? false : _ref$defaultShow,
|
13692 | onToggle = _ref.onToggle,
|
13693 | propsDelay = _ref.delay,
|
13694 | placement = _ref.placement,
|
13695 | _ref$flip = _ref.flip,
|
13696 | flip = _ref$flip === void 0 ? placement && placement.indexOf('auto') !== -1 : _ref$flip,
|
13697 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, OverlayTrigger_excluded);
|
13698 |
|
13699 | var triggerNodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
13700 | var timeout = useTimeout();
|
13701 | var hoverStateRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('');
|
13702 |
|
13703 | var _useUncontrolledProp = useUncontrolledProp(propsShow, defaultShow, onToggle),
|
13704 | show = _useUncontrolledProp[0],
|
13705 | setShow = _useUncontrolledProp[1];
|
13706 |
|
13707 | var delay = normalizeDelay(propsDelay);
|
13708 |
|
13709 | var _ref2 = typeof children !== 'function' ? external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children).props : {},
|
13710 | onFocus = _ref2.onFocus,
|
13711 | onBlur = _ref2.onBlur,
|
13712 | onClick = _ref2.onClick;
|
13713 |
|
13714 | var getTarget = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
13715 | return safeFindDOMNode(triggerNodeRef.current);
|
13716 | }, []);
|
13717 | var handleShow = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
13718 | timeout.clear();
|
13719 | hoverStateRef.current = 'show';
|
13720 |
|
13721 | if (!delay.show) {
|
13722 | setShow(true);
|
13723 | return;
|
13724 | }
|
13725 |
|
13726 | timeout.set(function () {
|
13727 | if (hoverStateRef.current === 'show') setShow(true);
|
13728 | }, delay.show);
|
13729 | }, [delay.show, setShow, timeout]);
|
13730 | var handleHide = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
13731 | timeout.clear();
|
13732 | hoverStateRef.current = 'hide';
|
13733 |
|
13734 | if (!delay.hide) {
|
13735 | setShow(false);
|
13736 | return;
|
13737 | }
|
13738 |
|
13739 | timeout.set(function () {
|
13740 | if (hoverStateRef.current === 'hide') setShow(false);
|
13741 | }, delay.hide);
|
13742 | }, [delay.hide, setShow, timeout]);
|
13743 | var handleFocus = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
13744 | handleShow();
|
13745 |
|
13746 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
13747 | args[_key] = arguments[_key];
|
13748 | }
|
13749 |
|
13750 | onFocus == null ? void 0 : onFocus.apply(void 0, args);
|
13751 | }, [handleShow, onFocus]);
|
13752 | var handleBlur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
13753 | handleHide();
|
13754 |
|
13755 | for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
13756 | args[_key2] = arguments[_key2];
|
13757 | }
|
13758 |
|
13759 | onBlur == null ? void 0 : onBlur.apply(void 0, args);
|
13760 | }, [handleHide, onBlur]);
|
13761 | var handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
13762 | setShow(!show);
|
13763 | if (onClick) onClick.apply(void 0, arguments);
|
13764 | }, [onClick, setShow, show]);
|
13765 | var handleMouseOver = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
13766 | for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
13767 | args[_key3] = arguments[_key3];
|
13768 | }
|
13769 |
|
13770 | handleMouseOverOut(handleShow, args, 'fromElement');
|
13771 | }, [handleShow]);
|
13772 | var handleMouseOut = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
13773 | for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
13774 | args[_key4] = arguments[_key4];
|
13775 | }
|
13776 |
|
13777 | handleMouseOverOut(handleHide, args, 'toElement');
|
13778 | }, [handleHide]);
|
13779 | var triggers = trigger == null ? [] : [].concat(trigger);
|
13780 | var triggerProps = {};
|
13781 |
|
13782 | if (triggers.indexOf('click') !== -1) {
|
13783 | triggerProps.onClick = handleClick;
|
13784 | }
|
13785 |
|
13786 | if (triggers.indexOf('focus') !== -1) {
|
13787 | triggerProps.onFocus = handleFocus;
|
13788 | triggerProps.onBlur = handleBlur;
|
13789 | }
|
13790 |
|
13791 | if (triggers.indexOf('hover') !== -1) {
|
13792 | false ? 0 : void 0;
|
13793 | triggerProps.onMouseOver = handleMouseOver;
|
13794 | triggerProps.onMouseOut = handleMouseOut;
|
13795 | }
|
13796 |
|
13797 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof children === 'function' ? children(extends_extends({}, triggerProps, {
|
13798 | ref: triggerNodeRef
|
13799 | })) : external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(RefHolder, {
|
13800 | ref: triggerNodeRef,
|
13801 | __self: this,
|
13802 | __source: {
|
13803 | fileName: OverlayTrigger_jsxFileName,
|
13804 | lineNumber: 299,
|
13805 | columnNumber: 9
|
13806 | }
|
13807 | }, (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, triggerProps)), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Overlay, extends_extends({}, props, {
|
13808 | show: show,
|
13809 | onHide: handleHide,
|
13810 | flip: flip,
|
13811 | placement: placement,
|
13812 | popperConfig: popperConfig,
|
13813 | target: getTarget,
|
13814 | __self: this,
|
13815 | __source: {
|
13816 | fileName: OverlayTrigger_jsxFileName,
|
13817 | lineNumber: 303,
|
13818 | columnNumber: 7
|
13819 | }
|
13820 | }), overlay));
|
13821 | }
|
13822 |
|
13823 | OverlayTrigger.propTypes = OverlayTrigger_propTypes;
|
13824 | OverlayTrigger.defaultProps = OverlayTrigger_defaultProps;
|
13825 | const src_OverlayTrigger = (OverlayTrigger);
|
13826 | ;
|
13827 |
|
13828 |
|
13829 | var PageItem_excluded = ["active", "disabled", "className", "style", "activeLabel", "children"],
|
13830 | PageItem_excluded2 = ["children"];
|
13831 |
|
13832 | var PageItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PageItem.tsx",
|
13833 | PageItem_this = undefined;
|
13834 |
|
13835 |
|
13836 |
|
13837 |
|
13838 |
|
13839 |
|
13840 | var PageItem_propTypes = {
|
13841 |
|
13842 | disabled: (prop_types_default()).bool,
|
13843 |
|
13844 |
|
13845 | active: (prop_types_default()).bool,
|
13846 |
|
13847 |
|
13848 | activeLabel: (prop_types_default()).string,
|
13849 |
|
13850 |
|
13851 | onClick: (prop_types_default()).func
|
13852 | };
|
13853 | var PageItem_defaultProps = {
|
13854 | active: false,
|
13855 | disabled: false,
|
13856 | activeLabel: '(current)'
|
13857 | };
|
13858 | var PageItem = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
13859 | var active = _ref.active,
|
13860 | disabled = _ref.disabled,
|
13861 | className = _ref.className,
|
13862 | style = _ref.style,
|
13863 | activeLabel = _ref.activeLabel,
|
13864 | children = _ref.children,
|
13865 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, PageItem_excluded);
|
13866 |
|
13867 | var Component = active || disabled ? 'span' : src_SafeAnchor;
|
13868 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
|
13869 | ref: ref,
|
13870 | style: style,
|
13871 | className: classnames_default()(className, 'page-item', {
|
13872 | active: active,
|
13873 | disabled: disabled
|
13874 | }),
|
13875 | __self: PageItem_this,
|
13876 | __source: {
|
13877 | fileName: PageItem_jsxFileName,
|
13878 | lineNumber: 58,
|
13879 | columnNumber: 7
|
13880 | }
|
13881 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
13882 | className: "page-link",
|
13883 | disabled: disabled
|
13884 | }, props, {
|
13885 | __self: PageItem_this,
|
13886 | __source: {
|
13887 | fileName: PageItem_jsxFileName,
|
13888 | lineNumber: 63,
|
13889 | columnNumber: 9
|
13890 | }
|
13891 | }), children, active && activeLabel && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
13892 | className: "sr-only",
|
13893 | __self: PageItem_this,
|
13894 | __source: {
|
13895 | fileName: PageItem_jsxFileName,
|
13896 | lineNumber: 66,
|
13897 | columnNumber: 13
|
13898 | }
|
13899 | }, activeLabel)));
|
13900 | });
|
13901 | PageItem.propTypes = PageItem_propTypes;
|
13902 | PageItem.defaultProps = PageItem_defaultProps;
|
13903 | PageItem.displayName = 'PageItem';
|
13904 | const src_PageItem = (PageItem);
|
13905 |
|
13906 | function createButton(name, defaultValue, label) {
|
13907 | if (label === void 0) {
|
13908 | label = name;
|
13909 | }
|
13910 |
|
13911 | function Button(_ref2) {
|
13912 | var children = _ref2.children,
|
13913 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, PageItem_excluded2);
|
13914 |
|
13915 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PageItem, extends_extends({}, props, {
|
13916 | __self: this,
|
13917 | __source: {
|
13918 | fileName: PageItem_jsxFileName,
|
13919 | lineNumber: 83,
|
13920 | columnNumber: 7
|
13921 | }
|
13922 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
13923 | "aria-hidden": "true",
|
13924 | __self: this,
|
13925 | __source: {
|
13926 | fileName: PageItem_jsxFileName,
|
13927 | lineNumber: 84,
|
13928 | columnNumber: 9
|
13929 | }
|
13930 | }, children || defaultValue), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
13931 | className: "sr-only",
|
13932 | __self: this,
|
13933 | __source: {
|
13934 | fileName: PageItem_jsxFileName,
|
13935 | lineNumber: 85,
|
13936 | columnNumber: 9
|
13937 | }
|
13938 | }, label));
|
13939 | }
|
13940 |
|
13941 | Button.displayName = name;
|
13942 | return Button;
|
13943 | }
|
13944 |
|
13945 | var First = createButton('First', '«');
|
13946 | var Prev = createButton('Prev', '‹', 'Previous');
|
13947 | var Ellipsis = createButton('Ellipsis', '…', 'More');
|
13948 | var Next = createButton('Next', '›');
|
13949 | var Last = createButton('Last', '»');
|
13950 | ;
|
13951 |
|
13952 |
|
13953 | var Pagination_excluded = ["bsPrefix", "className", "children", "size"];
|
13954 |
|
13955 | var Pagination_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Pagination.tsx",
|
13956 | Pagination_this = undefined;
|
13957 |
|
13958 |
|
13959 |
|
13960 |
|
13961 |
|
13962 |
|
13963 | var Pagination_propTypes = {
|
13964 | |
13965 |
|
13966 |
|
13967 | bsPrefix: (prop_types_default()).string,
|
13968 |
|
13969 | |
13970 |
|
13971 |
|
13972 |
|
13973 |
|
13974 | size: (prop_types_default()).string
|
13975 | };
|
13976 |
|
13977 |
|
13978 |
|
13979 |
|
13980 |
|
13981 |
|
13982 |
|
13983 |
|
13984 |
|
13985 | var Pagination = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
13986 | var bsPrefix = _ref.bsPrefix,
|
13987 | className = _ref.className,
|
13988 | children = _ref.children,
|
13989 | size = _ref.size,
|
13990 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Pagination_excluded);
|
13991 |
|
13992 | var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'pagination');
|
13993 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", extends_extends({
|
13994 | ref: ref
|
13995 | }, props, {
|
13996 | className: classnames_default()(className, decoratedBsPrefix, size && decoratedBsPrefix + "-" + size),
|
13997 | __self: Pagination_this,
|
13998 | __source: {
|
13999 | fileName: Pagination_jsxFileName,
|
14000 | lineNumber: 53,
|
14001 | columnNumber: 5
|
14002 | }
|
14003 | }), children);
|
14004 | });
|
14005 | Pagination.propTypes = Pagination_propTypes;
|
14006 | Pagination.First = First;
|
14007 | Pagination.Prev = Prev;
|
14008 | Pagination.Ellipsis = Ellipsis;
|
14009 | Pagination.Item = src_PageItem;
|
14010 | Pagination.Next = Next;
|
14011 | Pagination.Last = Last;
|
14012 | const src_Pagination = (Pagination);
|
14013 | ;
|
14014 |
|
14015 |
|
14016 | var PopoverTitle_excluded = ["as", "bsPrefix", "className", "children"];
|
14017 |
|
14018 | var PopoverTitle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PopoverTitle.tsx",
|
14019 | PopoverTitle_this = undefined;
|
14020 |
|
14021 |
|
14022 |
|
14023 |
|
14024 |
|
14025 | var PopoverTitle_propTypes = {
|
14026 |
|
14027 | as: (prop_types_default()).elementType,
|
14028 |
|
14029 |
|
14030 | bsPrefix: (prop_types_default()).string
|
14031 | };
|
14032 | var PopoverTitle = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
14033 | var _ref$as = _ref.as,
|
14034 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
14035 | bsPrefix = _ref.bsPrefix,
|
14036 | className = _ref.className,
|
14037 | children = _ref.children,
|
14038 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, PopoverTitle_excluded);
|
14039 |
|
14040 | bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-header');
|
14041 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
14042 | ref: ref
|
14043 | }, props, {
|
14044 | className: classnames_default()(bsPrefix, className),
|
14045 | __self: PopoverTitle_this,
|
14046 | __source: {
|
14047 | fileName: PopoverTitle_jsxFileName,
|
14048 | lineNumber: 37,
|
14049 | columnNumber: 7
|
14050 | }
|
14051 | }), children);
|
14052 | });
|
14053 | PopoverTitle.propTypes = PopoverTitle_propTypes;
|
14054 | const src_PopoverTitle = (PopoverTitle);
|
14055 | ;
|
14056 |
|
14057 |
|
14058 | var PopoverContent_excluded = ["as", "bsPrefix", "className", "children"];
|
14059 |
|
14060 | var PopoverContent_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PopoverContent.tsx",
|
14061 | PopoverContent_this = undefined;
|
14062 |
|
14063 |
|
14064 |
|
14065 |
|
14066 |
|
14067 | var PopoverContent_propTypes = {
|
14068 |
|
14069 | as: (prop_types_default()).elementType,
|
14070 |
|
14071 |
|
14072 | bsPrefix: (prop_types_default()).string
|
14073 | };
|
14074 | var PopoverContent = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
14075 | var _ref$as = _ref.as,
|
14076 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
14077 | bsPrefix = _ref.bsPrefix,
|
14078 | className = _ref.className,
|
14079 | children = _ref.children,
|
14080 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, PopoverContent_excluded);
|
14081 |
|
14082 | bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-body');
|
14083 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
14084 | ref: ref
|
14085 | }, props, {
|
14086 | className: classnames_default()(className, bsPrefix),
|
14087 | __self: PopoverContent_this,
|
14088 | __source: {
|
14089 | fileName: PopoverContent_jsxFileName,
|
14090 | lineNumber: 40,
|
14091 | columnNumber: 7
|
14092 | }
|
14093 | }), children);
|
14094 | });
|
14095 | PopoverContent.propTypes = PopoverContent_propTypes;
|
14096 | const src_PopoverContent = (PopoverContent);
|
14097 | ;
|
14098 |
|
14099 |
|
14100 | var Popover_excluded = ["bsPrefix", "placement", "className", "style", "children", "content", "arrowProps", "popper", "show"];
|
14101 |
|
14102 | var Popover_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Popover.tsx",
|
14103 | Popover_this = undefined;
|
14104 |
|
14105 |
|
14106 |
|
14107 |
|
14108 |
|
14109 |
|
14110 |
|
14111 |
|
14112 | var Popover_propTypes = {
|
14113 | |
14114 |
|
14115 |
|
14116 | bsPrefix: (prop_types_default()).string,
|
14117 |
|
14118 | |
14119 |
|
14120 |
|
14121 |
|
14122 |
|
14123 | id: isRequiredForA11y_default()(prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])),
|
14124 |
|
14125 | |
14126 |
|
14127 |
|
14128 |
|
14129 |
|
14130 | placement: prop_types_default().oneOf(['auto', 'top', 'bottom', 'left', 'right']),
|
14131 |
|
14132 | |
14133 |
|
14134 |
|
14135 |
|
14136 |
|
14137 | arrowProps: prop_types_default().shape({
|
14138 | ref: (prop_types_default()).any,
|
14139 | style: (prop_types_default()).object
|
14140 | }),
|
14141 |
|
14142 | |
14143 |
|
14144 |
|
14145 |
|
14146 | content: (prop_types_default()).bool,
|
14147 |
|
14148 |
|
14149 | popper: (prop_types_default()).object,
|
14150 |
|
14151 |
|
14152 | show: (prop_types_default()).bool
|
14153 | };
|
14154 | var Popover_defaultProps = {
|
14155 | placement: 'right'
|
14156 | };
|
14157 | var Popover = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
14158 | var bsPrefix = _ref.bsPrefix,
|
14159 | placement = _ref.placement,
|
14160 | className = _ref.className,
|
14161 | style = _ref.style,
|
14162 | children = _ref.children,
|
14163 | content = _ref.content,
|
14164 | arrowProps = _ref.arrowProps,
|
14165 | _ = _ref.popper,
|
14166 | _1 = _ref.show,
|
14167 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Popover_excluded);
|
14168 |
|
14169 | var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'popover');
|
14170 |
|
14171 | var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],
|
14172 | primaryPlacement = _ref2[0];
|
14173 |
|
14174 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
14175 | ref: ref,
|
14176 | role: "tooltip",
|
14177 | style: style,
|
14178 | "x-placement": primaryPlacement,
|
14179 | className: classnames_default()(className, decoratedBsPrefix, primaryPlacement && "bs-popover-" + primaryPlacement)
|
14180 | }, props, {
|
14181 | __self: Popover_this,
|
14182 | __source: {
|
14183 | fileName: Popover_jsxFileName,
|
14184 | lineNumber: 100,
|
14185 | columnNumber: 7
|
14186 | }
|
14187 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
14188 | className: "arrow"
|
14189 | }, arrowProps, {
|
14190 | __self: Popover_this,
|
14191 | __source: {
|
14192 | fileName: Popover_jsxFileName,
|
14193 | lineNumber: 112,
|
14194 | columnNumber: 9
|
14195 | }
|
14196 | })), content ? external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_PopoverContent, {
|
14197 | __self: Popover_this,
|
14198 | __source: {
|
14199 | fileName: Popover_jsxFileName,
|
14200 | lineNumber: 113,
|
14201 | columnNumber: 20
|
14202 | }
|
14203 | }, children) : children);
|
14204 | });
|
14205 | Popover.propTypes = Popover_propTypes;
|
14206 | Popover.defaultProps = Popover_defaultProps;
|
14207 | Popover.Title = src_PopoverTitle;
|
14208 | Popover.Content = src_PopoverContent;
|
14209 | const src_Popover = (Popover);
|
14210 | ;
|
14211 |
|
14212 |
|
14213 | var ProgressBar_excluded = ["min", "now", "max", "label", "srOnly", "striped", "animated", "className", "style", "variant", "bsPrefix"],
|
14214 | ProgressBar_excluded2 = ["isChild"],
|
14215 | _excluded3 = ["min", "now", "max", "label", "srOnly", "striped", "animated", "bsPrefix", "variant", "className", "children"];
|
14216 |
|
14217 | var ProgressBar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ProgressBar.tsx",
|
14218 | _this2 = undefined;
|
14219 |
|
14220 |
|
14221 |
|
14222 |
|
14223 |
|
14224 |
|
14225 | var ROUND_PRECISION = 1000;
|
14226 |
|
14227 |
|
14228 |
|
14229 |
|
14230 | function onlyProgressBar(props, propName, componentName) {
|
14231 | var _this = this;
|
14232 |
|
14233 | var children = props[propName];
|
14234 |
|
14235 | if (!children) {
|
14236 | return null;
|
14237 | }
|
14238 |
|
14239 | var error = null;
|
14240 | external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.forEach(children, function (child) {
|
14241 | if (error) {
|
14242 | return;
|
14243 | }
|
14244 | |
14245 |
|
14246 |
|
14247 |
|
14248 |
|
14249 |
|
14250 |
|
14251 |
|
14252 |
|
14253 | var element = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ProgressBar, {
|
14254 | __self: _this,
|
14255 | __source: {
|
14256 | fileName: ProgressBar_jsxFileName,
|
14257 | lineNumber: 49,
|
14258 | columnNumber: 21
|
14259 | }
|
14260 | });
|
14261 | if (child.type === element.type) return;
|
14262 | var childType = child.type;
|
14263 | var childIdentifier = external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child) ? childType.displayName || childType.name || childType : child;
|
14264 | error = new Error("Children of " + componentName + " can contain only ProgressBar " + ("components. Found " + childIdentifier + "."));
|
14265 | });
|
14266 | return error;
|
14267 | }
|
14268 |
|
14269 | var ProgressBar_propTypes = {
|
14270 | |
14271 |
|
14272 |
|
14273 | min: (prop_types_default()).number,
|
14274 |
|
14275 | |
14276 |
|
14277 |
|
14278 | now: (prop_types_default()).number,
|
14279 |
|
14280 | |
14281 |
|
14282 |
|
14283 | max: (prop_types_default()).number,
|
14284 |
|
14285 | |
14286 |
|
14287 |
|
14288 |
|
14289 | label: (prop_types_default()).node,
|
14290 |
|
14291 | |
14292 |
|
14293 |
|
14294 | srOnly: (prop_types_default()).bool,
|
14295 |
|
14296 | |
14297 |
|
14298 |
|
14299 | striped: (prop_types_default()).bool,
|
14300 |
|
14301 | |
14302 |
|
14303 |
|
14304 | animated: (prop_types_default()).bool,
|
14305 |
|
14306 | |
14307 |
|
14308 |
|
14309 |
|
14310 | bsPrefix: (prop_types_default()).string,
|
14311 |
|
14312 | |
14313 |
|
14314 |
|
14315 |
|
14316 |
|
14317 | variant: (prop_types_default()).string,
|
14318 |
|
14319 | |
14320 |
|
14321 |
|
14322 | children: onlyProgressBar,
|
14323 |
|
14324 | |
14325 |
|
14326 |
|
14327 | isChild: (prop_types_default()).bool
|
14328 | };
|
14329 | var ProgressBar_defaultProps = {
|
14330 | min: 0,
|
14331 | max: 100,
|
14332 | animated: false,
|
14333 | isChild: false,
|
14334 | srOnly: false,
|
14335 | striped: false
|
14336 | };
|
14337 |
|
14338 | function getPercentage(now, min, max) {
|
14339 | var percentage = (now - min) / (max - min) * 100;
|
14340 | return Math.round(percentage * ROUND_PRECISION) / ROUND_PRECISION;
|
14341 | }
|
14342 |
|
14343 | function renderProgressBar(_ref, ref) {
|
14344 | var _classNames;
|
14345 |
|
14346 | var min = _ref.min,
|
14347 | now = _ref.now,
|
14348 | max = _ref.max,
|
14349 | label = _ref.label,
|
14350 | srOnly = _ref.srOnly,
|
14351 | striped = _ref.striped,
|
14352 | animated = _ref.animated,
|
14353 | className = _ref.className,
|
14354 | style = _ref.style,
|
14355 | variant = _ref.variant,
|
14356 | bsPrefix = _ref.bsPrefix,
|
14357 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ProgressBar_excluded);
|
14358 |
|
14359 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
14360 | ref: ref
|
14361 | }, props, {
|
14362 | role: "progressbar",
|
14363 | className: classnames_default()(className, bsPrefix + "-bar", (_classNames = {}, _classNames["bg-" + variant] = variant, _classNames[bsPrefix + "-bar-animated"] = animated, _classNames[bsPrefix + "-bar-striped"] = animated || striped, _classNames)),
|
14364 | style: extends_extends({
|
14365 | width: getPercentage(now, min, max) + "%"
|
14366 | }, style),
|
14367 | "aria-valuenow": now,
|
14368 | "aria-valuemin": min,
|
14369 | "aria-valuemax": max,
|
14370 | __self: this,
|
14371 | __source: {
|
14372 | fileName: ProgressBar_jsxFileName,
|
14373 | lineNumber: 158,
|
14374 | columnNumber: 5
|
14375 | }
|
14376 | }), srOnly ? external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
14377 | className: "sr-only",
|
14378 | __self: this,
|
14379 | __source: {
|
14380 | fileName: ProgressBar_jsxFileName,
|
14381 | lineNumber: 172,
|
14382 | columnNumber: 17
|
14383 | }
|
14384 | }, label) : label);
|
14385 | }
|
14386 |
|
14387 | renderProgressBar.propTypes = ProgressBar_propTypes;
|
14388 | var ProgressBar = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref2, ref) {
|
14389 | var isChild = _ref2.isChild,
|
14390 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref2, ProgressBar_excluded2);
|
14391 |
|
14392 | props.bsPrefix = useBootstrapPrefix(props.bsPrefix, 'progress');
|
14393 |
|
14394 | if (isChild) {
|
14395 | return renderProgressBar(props, ref);
|
14396 | }
|
14397 |
|
14398 | var min = props.min,
|
14399 | now = props.now,
|
14400 | max = props.max,
|
14401 | label = props.label,
|
14402 | srOnly = props.srOnly,
|
14403 | striped = props.striped,
|
14404 | animated = props.animated,
|
14405 | bsPrefix = props.bsPrefix,
|
14406 | variant = props.variant,
|
14407 | className = props.className,
|
14408 | children = props.children,
|
14409 | wrapperProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(props, _excluded3);
|
14410 |
|
14411 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
14412 | ref: ref
|
14413 | }, wrapperProps, {
|
14414 | className: classnames_default()(className, bsPrefix),
|
14415 | __self: _this2,
|
14416 | __source: {
|
14417 | fileName: ProgressBar_jsxFileName,
|
14418 | lineNumber: 203,
|
14419 | columnNumber: 7
|
14420 | }
|
14421 | }), children ? map(children, function (child) {
|
14422 | return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(child, {
|
14423 | isChild: true
|
14424 | });
|
14425 | }) : renderProgressBar({
|
14426 | min: min,
|
14427 | now: now,
|
14428 | max: max,
|
14429 | label: label,
|
14430 | srOnly: srOnly,
|
14431 | striped: striped,
|
14432 | animated: animated,
|
14433 | bsPrefix: bsPrefix,
|
14434 | variant: variant
|
14435 | }, ref));
|
14436 | });
|
14437 | ProgressBar.displayName = 'ProgressBar';
|
14438 | ProgressBar.propTypes = ProgressBar_propTypes;
|
14439 | ProgressBar.defaultProps = ProgressBar_defaultProps;
|
14440 | const src_ProgressBar = (ProgressBar);
|
14441 | ;
|
14442 |
|
14443 |
|
14444 | var ResponsiveEmbed_excluded = ["bsPrefix", "className", "children", "aspectRatio"];
|
14445 |
|
14446 | var ResponsiveEmbed_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ResponsiveEmbed.tsx",
|
14447 | ResponsiveEmbed_this = undefined;
|
14448 |
|
14449 |
|
14450 |
|
14451 |
|
14452 |
|
14453 | var ResponsiveEmbed_propTypes = {
|
14454 | |
14455 |
|
14456 |
|
14457 | bsPrefix: (prop_types_default()).string,
|
14458 |
|
14459 | |
14460 |
|
14461 |
|
14462 | children: (prop_types_default()).element.isRequired,
|
14463 |
|
14464 | |
14465 |
|
14466 |
|
14467 | aspectRatio: prop_types_default().oneOf(['21by9', '16by9', '4by3', '1by1'])
|
14468 | };
|
14469 | var ResponsiveEmbed_defaultProps = {
|
14470 | aspectRatio: '1by1'
|
14471 | };
|
14472 | var ResponsiveEmbed = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
14473 | var bsPrefix = _ref.bsPrefix,
|
14474 | className = _ref.className,
|
14475 | children = _ref.children,
|
14476 | aspectRatio = _ref.aspectRatio,
|
14477 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ResponsiveEmbed_excluded);
|
14478 |
|
14479 | var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'embed-responsive');
|
14480 | var child = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children);
|
14481 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
14482 | ref: ref
|
14483 | }, props, {
|
14484 | className: classnames_default()(decoratedBsPrefix, className, aspectRatio && decoratedBsPrefix + "-" + aspectRatio),
|
14485 | __self: ResponsiveEmbed_this,
|
14486 | __source: {
|
14487 | fileName: ResponsiveEmbed_jsxFileName,
|
14488 | lineNumber: 59,
|
14489 | columnNumber: 7
|
14490 | }
|
14491 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
|
14492 | className: classnames_default()(child.props.className, decoratedBsPrefix + "-item")
|
14493 | }));
|
14494 | });
|
14495 | ResponsiveEmbed.propTypes = ResponsiveEmbed_propTypes;
|
14496 | ResponsiveEmbed.defaultProps = ResponsiveEmbed_defaultProps;
|
14497 | const src_ResponsiveEmbed = (ResponsiveEmbed);
|
14498 | ;
|
14499 |
|
14500 |
|
14501 | var Row_excluded = ["bsPrefix", "className", "noGutters", "as"];
|
14502 |
|
14503 | var Row_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Row.tsx",
|
14504 | Row_this = undefined;
|
14505 |
|
14506 |
|
14507 |
|
14508 |
|
14509 |
|
14510 | var Row_DEVICE_SIZES = ['xl', 'lg', 'md', 'sm', 'xs'];
|
14511 | var rowColWidth = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]);
|
14512 | var rowColumns = prop_types_default().oneOfType([rowColWidth, prop_types_default().shape({
|
14513 | cols: rowColWidth
|
14514 | })]);
|
14515 | var Row_propTypes = {
|
14516 | |
14517 |
|
14518 |
|
14519 | bsPrefix: (prop_types_default()).string,
|
14520 |
|
14521 |
|
14522 | noGutters: (prop_types_default()).bool.isRequired,
|
14523 | as: (prop_types_default()).elementType,
|
14524 |
|
14525 | |
14526 |
|
14527 |
|
14528 |
|
14529 |
|
14530 | xs: rowColumns,
|
14531 |
|
14532 | |
14533 |
|
14534 |
|
14535 |
|
14536 |
|
14537 | sm: rowColumns,
|
14538 |
|
14539 | |
14540 |
|
14541 |
|
14542 |
|
14543 |
|
14544 | md: rowColumns,
|
14545 |
|
14546 | |
14547 |
|
14548 |
|
14549 |
|
14550 |
|
14551 | lg: rowColumns,
|
14552 |
|
14553 | |
14554 |
|
14555 |
|
14556 |
|
14557 |
|
14558 | xl: rowColumns
|
14559 | };
|
14560 | var Row_defaultProps = {
|
14561 | noGutters: false
|
14562 | };
|
14563 | var Row = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
14564 | var bsPrefix = _ref.bsPrefix,
|
14565 | className = _ref.className,
|
14566 | noGutters = _ref.noGutters,
|
14567 | _ref$as = _ref.as,
|
14568 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
14569 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Row_excluded);
|
14570 |
|
14571 | var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');
|
14572 | var sizePrefix = decoratedBsPrefix + "-cols";
|
14573 | var classes = [];
|
14574 | Row_DEVICE_SIZES.forEach(function (brkPoint) {
|
14575 | var propValue = props[brkPoint];
|
14576 | delete props[brkPoint];
|
14577 | var cols;
|
14578 |
|
14579 | if (propValue != null && typeof propValue === 'object') {
|
14580 | cols = propValue.cols;
|
14581 | } else {
|
14582 | cols = propValue;
|
14583 | }
|
14584 |
|
14585 | var infix = brkPoint !== 'xs' ? "-" + brkPoint : '';
|
14586 | if (cols != null) classes.push("" + sizePrefix + infix + "-" + cols);
|
14587 | });
|
14588 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
14589 | ref: ref
|
14590 | }, props, {
|
14591 | className: classnames_default().apply(void 0, [className, decoratedBsPrefix, noGutters && 'no-gutters'].concat(classes)),
|
14592 | __self: Row_this,
|
14593 | __source: {
|
14594 | fileName: Row_jsxFileName,
|
14595 | lineNumber: 132,
|
14596 | columnNumber: 7
|
14597 | }
|
14598 | }));
|
14599 | });
|
14600 | Row.displayName = 'Row';
|
14601 | Row.propTypes = Row_propTypes;
|
14602 | Row.defaultProps = Row_defaultProps;
|
14603 | const src_Row = (Row);
|
14604 | ;
|
14605 |
|
14606 |
|
14607 | var Spinner_excluded = ["bsPrefix", "variant", "animation", "size", "children", "as", "className"];
|
14608 |
|
14609 | var Spinner_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Spinner.tsx",
|
14610 | Spinner_this = undefined;
|
14611 |
|
14612 |
|
14613 |
|
14614 |
|
14615 |
|
14616 | var Spinner_propTypes = {
|
14617 | |
14618 |
|
14619 |
|
14620 | bsPrefix: (prop_types_default()).string,
|
14621 |
|
14622 | |
14623 |
|
14624 |
|
14625 |
|
14626 |
|
14627 | variant: (prop_types_default()).string,
|
14628 |
|
14629 | |
14630 |
|
14631 |
|
14632 |
|
14633 |
|
14634 |
|
14635 | animation: prop_types_default().oneOf(['border', 'grow']).isRequired,
|
14636 |
|
14637 | |
14638 |
|
14639 |
|
14640 |
|
14641 |
|
14642 | size: (prop_types_default()).string,
|
14643 |
|
14644 | |
14645 |
|
14646 |
|
14647 | children: (prop_types_default()).element,
|
14648 |
|
14649 | |
14650 |
|
14651 |
|
14652 | role: (prop_types_default()).string,
|
14653 |
|
14654 | |
14655 |
|
14656 |
|
14657 | as: (prop_types_default()).elementType
|
14658 | };
|
14659 | var Spinner = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
14660 | var bsPrefix = _ref.bsPrefix,
|
14661 | variant = _ref.variant,
|
14662 | animation = _ref.animation,
|
14663 | size = _ref.size,
|
14664 | children = _ref.children,
|
14665 | _ref$as = _ref.as,
|
14666 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
14667 | className = _ref.className,
|
14668 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Spinner_excluded);
|
14669 |
|
14670 | bsPrefix = useBootstrapPrefix(bsPrefix, 'spinner');
|
14671 | var bsSpinnerPrefix = bsPrefix + "-" + animation;
|
14672 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
14673 | ref: ref
|
14674 | }, props, {
|
14675 | className: classnames_default()(className, bsSpinnerPrefix, size && bsSpinnerPrefix + "-" + size, variant && "text-" + variant),
|
14676 | __self: Spinner_this,
|
14677 | __source: {
|
14678 | fileName: Spinner_jsxFileName,
|
14679 | lineNumber: 80,
|
14680 | columnNumber: 7
|
14681 | }
|
14682 | }), children);
|
14683 | });
|
14684 | Spinner.propTypes = Spinner_propTypes;
|
14685 | Spinner.displayName = 'Spinner';
|
14686 | const src_Spinner = (Spinner);
|
14687 | ;
|
14688 |
|
14689 |
|
14690 | var SplitButton_excluded = ["id", "bsPrefix", "size", "variant", "title", "type", "toggleLabel", "children", "onClick", "href", "target", "menuAlign", "menuRole", "renderMenuOnMount", "rootCloseEvent"];
|
14691 |
|
14692 | var SplitButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/SplitButton.tsx",
|
14693 | SplitButton_this = undefined;
|
14694 |
|
14695 |
|
14696 |
|
14697 |
|
14698 |
|
14699 |
|
14700 |
|
14701 | var SplitButton_propTypes = {
|
14702 | |
14703 |
|
14704 |
|
14705 |
|
14706 |
|
14707 | id: (prop_types_default()).any,
|
14708 |
|
14709 | |
14710 |
|
14711 |
|
14712 | toggleLabel: (prop_types_default()).string,
|
14713 |
|
14714 |
|
14715 | href: (prop_types_default()).string,
|
14716 |
|
14717 |
|
14718 | target: (prop_types_default()).string,
|
14719 |
|
14720 |
|
14721 | onClick: (prop_types_default()).func,
|
14722 |
|
14723 |
|
14724 | title: (prop_types_default()).node.isRequired,
|
14725 |
|
14726 |
|
14727 | type: (prop_types_default()).string,
|
14728 |
|
14729 |
|
14730 | disabled: (prop_types_default()).bool,
|
14731 |
|
14732 | |
14733 |
|
14734 |
|
14735 |
|
14736 |
|
14737 |
|
14738 |
|
14739 | menuAlign: alignPropType,
|
14740 |
|
14741 |
|
14742 | menuRole: (prop_types_default()).string,
|
14743 |
|
14744 |
|
14745 | renderMenuOnMount: (prop_types_default()).bool,
|
14746 |
|
14747 | |
14748 |
|
14749 |
|
14750 |
|
14751 |
|
14752 | rootCloseEvent: (prop_types_default()).string,
|
14753 |
|
14754 |
|
14755 | bsPrefix: (prop_types_default()).string,
|
14756 |
|
14757 |
|
14758 | variant: (prop_types_default()).string,
|
14759 |
|
14760 |
|
14761 | size: (prop_types_default()).string
|
14762 | };
|
14763 | var SplitButton_defaultProps = {
|
14764 | toggleLabel: 'Toggle dropdown',
|
14765 | type: 'button'
|
14766 | };
|
14767 |
|
14768 |
|
14769 |
|
14770 |
|
14771 |
|
14772 |
|
14773 |
|
14774 |
|
14775 |
|
14776 |
|
14777 |
|
14778 | var SplitButton = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
14779 | var id = _ref.id,
|
14780 | bsPrefix = _ref.bsPrefix,
|
14781 | size = _ref.size,
|
14782 | variant = _ref.variant,
|
14783 | title = _ref.title,
|
14784 | type = _ref.type,
|
14785 | toggleLabel = _ref.toggleLabel,
|
14786 | children = _ref.children,
|
14787 | onClick = _ref.onClick,
|
14788 | href = _ref.href,
|
14789 | target = _ref.target,
|
14790 | menuAlign = _ref.menuAlign,
|
14791 | menuRole = _ref.menuRole,
|
14792 | renderMenuOnMount = _ref.renderMenuOnMount,
|
14793 | rootCloseEvent = _ref.rootCloseEvent,
|
14794 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, SplitButton_excluded);
|
14795 |
|
14796 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown, extends_extends({
|
14797 | ref: ref
|
14798 | }, props, {
|
14799 | as: src_ButtonGroup,
|
14800 | __self: SplitButton_this,
|
14801 | __source: {
|
14802 | fileName: SplitButton_jsxFileName,
|
14803 | lineNumber: 125,
|
14804 | columnNumber: 5
|
14805 | }
|
14806 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Button, {
|
14807 | size: size,
|
14808 | variant: variant,
|
14809 | disabled: props.disabled,
|
14810 | bsPrefix: bsPrefix,
|
14811 | href: href,
|
14812 | target: target,
|
14813 | onClick: onClick,
|
14814 | type: type,
|
14815 | __self: SplitButton_this,
|
14816 | __source: {
|
14817 | fileName: SplitButton_jsxFileName,
|
14818 | lineNumber: 126,
|
14819 | columnNumber: 7
|
14820 | }
|
14821 | }, title), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown.Toggle, {
|
14822 | split: true,
|
14823 | id: id ? id.toString() : undefined,
|
14824 | size: size,
|
14825 | variant: variant,
|
14826 | disabled: props.disabled,
|
14827 | childBsPrefix: bsPrefix,
|
14828 | __self: SplitButton_this,
|
14829 | __source: {
|
14830 | fileName: SplitButton_jsxFileName,
|
14831 | lineNumber: 138,
|
14832 | columnNumber: 7
|
14833 | }
|
14834 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
14835 | className: "sr-only",
|
14836 | __self: SplitButton_this,
|
14837 | __source: {
|
14838 | fileName: SplitButton_jsxFileName,
|
14839 | lineNumber: 146,
|
14840 | columnNumber: 9
|
14841 | }
|
14842 | }, toggleLabel)), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Dropdown.Menu, {
|
14843 | align: menuAlign,
|
14844 | role: menuRole,
|
14845 | renderOnMount: renderMenuOnMount,
|
14846 | rootCloseEvent: rootCloseEvent,
|
14847 | __self: SplitButton_this,
|
14848 | __source: {
|
14849 | fileName: SplitButton_jsxFileName,
|
14850 | lineNumber: 149,
|
14851 | columnNumber: 7
|
14852 | }
|
14853 | }, children));
|
14854 | });
|
14855 | SplitButton.propTypes = SplitButton_propTypes;
|
14856 | SplitButton.defaultProps = SplitButton_defaultProps;
|
14857 | SplitButton.displayName = 'SplitButton';
|
14858 | const src_SplitButton = (SplitButton);
|
14859 | ;
|
14860 | var TabContainer_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabContainer.tsx",
|
14861 | TabContainer_this = undefined;
|
14862 |
|
14863 |
|
14864 |
|
14865 |
|
14866 |
|
14867 |
|
14868 |
|
14869 | var validateId = function validateId(props) {
|
14870 | var error = null;
|
14871 |
|
14872 | if (!props.generateChildId) {
|
14873 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
14874 | args[_key - 1] = arguments[_key];
|
14875 | }
|
14876 |
|
14877 | error = prop_types_default().string.apply((prop_types_default()), [props].concat(args));
|
14878 |
|
14879 | if (!error && !props.id) {
|
14880 | error = new Error('In order to properly initialize Tabs in a way that is accessible ' + 'to assistive technologies (such as screen readers) an `id` or a ' + '`generateChildId` prop to TabContainer is required');
|
14881 | }
|
14882 | }
|
14883 |
|
14884 | return error;
|
14885 | };
|
14886 |
|
14887 |
|
14888 |
|
14889 | var TabContainer_propTypes = {
|
14890 | |
14891 |
|
14892 |
|
14893 |
|
14894 |
|
14895 |
|
14896 | id: validateId,
|
14897 |
|
14898 | |
14899 |
|
14900 |
|
14901 |
|
14902 |
|
14903 |
|
14904 |
|
14905 |
|
14906 | transition: prop_types_default().oneOfType([prop_types_default().oneOf([false]), (prop_types_default()).elementType]),
|
14907 |
|
14908 | |
14909 |
|
14910 |
|
14911 | mountOnEnter: (prop_types_default()).bool,
|
14912 |
|
14913 | |
14914 |
|
14915 |
|
14916 | unmountOnExit: (prop_types_default()).bool,
|
14917 |
|
14918 | |
14919 |
|
14920 |
|
14921 |
|
14922 |
|
14923 |
|
14924 |
|
14925 |
|
14926 |
|
14927 |
|
14928 |
|
14929 | generateChildId: (prop_types_default()).func,
|
14930 |
|
14931 | |
14932 |
|
14933 |
|
14934 |
|
14935 |
|
14936 | onSelect: (prop_types_default()).func,
|
14937 |
|
14938 | |
14939 |
|
14940 |
|
14941 |
|
14942 |
|
14943 | activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])
|
14944 | };
|
14945 |
|
14946 | var TabContainer = function TabContainer(props) {
|
14947 | var _useUncontrolled = useUncontrolled(props, {
|
14948 | activeKey: 'onSelect'
|
14949 | }),
|
14950 | id = _useUncontrolled.id,
|
14951 | generateCustomChildId = _useUncontrolled.generateChildId,
|
14952 | onSelect = _useUncontrolled.onSelect,
|
14953 | activeKey = _useUncontrolled.activeKey,
|
14954 | transition = _useUncontrolled.transition,
|
14955 | mountOnEnter = _useUncontrolled.mountOnEnter,
|
14956 | unmountOnExit = _useUncontrolled.unmountOnExit,
|
14957 | children = _useUncontrolled.children;
|
14958 |
|
14959 | var generateChildId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
14960 | return generateCustomChildId || function (key, type) {
|
14961 | return id ? id + "-" + type + "-" + key : null;
|
14962 | };
|
14963 | }, [id, generateCustomChildId]);
|
14964 | var tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
14965 | return {
|
14966 | onSelect: onSelect,
|
14967 | activeKey: activeKey,
|
14968 | transition: transition,
|
14969 | mountOnEnter: mountOnEnter || false,
|
14970 | unmountOnExit: unmountOnExit || false,
|
14971 | getControlledId: function getControlledId(key) {
|
14972 | return generateChildId(key, 'tabpane');
|
14973 | },
|
14974 | getControllerId: function getControllerId(key) {
|
14975 | return generateChildId(key, 'tab');
|
14976 | }
|
14977 | };
|
14978 | }, [onSelect, activeKey, transition, mountOnEnter, unmountOnExit, generateChildId]);
|
14979 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabContext.Provider, {
|
14980 | value: tabContext,
|
14981 | __self: TabContainer_this,
|
14982 | __source: {
|
14983 | fileName: TabContainer_jsxFileName,
|
14984 | lineNumber: 139,
|
14985 | columnNumber: 5
|
14986 | }
|
14987 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
|
14988 | value: onSelect || null,
|
14989 | __self: TabContainer_this,
|
14990 | __source: {
|
14991 | fileName: TabContainer_jsxFileName,
|
14992 | lineNumber: 140,
|
14993 | columnNumber: 7
|
14994 | }
|
14995 | }, children));
|
14996 | };
|
14997 |
|
14998 | TabContainer.propTypes = TabContainer_propTypes;
|
14999 | const src_TabContainer = (TabContainer);
|
15000 | ;
|
15001 |
|
15002 |
|
15003 | var TabContent_excluded = ["bsPrefix", "as", "className"];
|
15004 |
|
15005 | var TabContent_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabContent.tsx",
|
15006 | TabContent_this = undefined;
|
15007 |
|
15008 |
|
15009 |
|
15010 |
|
15011 |
|
15012 | var TabContent_propTypes = {
|
15013 | |
15014 |
|
15015 |
|
15016 | bsPrefix: (prop_types_default()).string,
|
15017 | as: (prop_types_default()).elementType
|
15018 | };
|
15019 | var TabContent = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
15020 | var bsPrefix = _ref.bsPrefix,
|
15021 | _ref$as = _ref.as,
|
15022 | Component = _ref$as === void 0 ? 'div' : _ref$as,
|
15023 | className = _ref.className,
|
15024 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, TabContent_excluded);
|
15025 |
|
15026 | var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'tab-content');
|
15027 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({
|
15028 | ref: ref
|
15029 | }, props, {
|
15030 | className: classnames_default()(className, decoratedBsPrefix),
|
15031 | __self: TabContent_this,
|
15032 | __source: {
|
15033 | fileName: TabContent_jsxFileName,
|
15034 | lineNumber: 36,
|
15035 | columnNumber: 7
|
15036 | }
|
15037 | }));
|
15038 | });
|
15039 | TabContent.propTypes = TabContent_propTypes;
|
15040 | const src_TabContent = (TabContent);
|
15041 | ;
|
15042 |
|
15043 |
|
15044 | var TabPane_excluded = ["activeKey", "getControlledId", "getControllerId"],
|
15045 | TabPane_excluded2 = ["bsPrefix", "className", "active", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "mountOnEnter", "unmountOnExit", "transition", "as", "eventKey"];
|
15046 |
|
15047 | var TabPane_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabPane.tsx",
|
15048 | TabPane_this = undefined;
|
15049 |
|
15050 |
|
15051 |
|
15052 |
|
15053 |
|
15054 |
|
15055 |
|
15056 |
|
15057 | var TabPane_propTypes = {
|
15058 | |
15059 |
|
15060 |
|
15061 | bsPrefix: (prop_types_default()).string,
|
15062 | as: (prop_types_default()).elementType,
|
15063 |
|
15064 | |
15065 |
|
15066 |
|
15067 | eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
|
15068 |
|
15069 | |
15070 |
|
15071 |
|
15072 |
|
15073 | active: (prop_types_default()).bool,
|
15074 |
|
15075 | |
15076 |
|
15077 |
|
15078 |
|
15079 |
|
15080 | transition: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).elementType]),
|
15081 |
|
15082 | |
15083 |
|
15084 |
|
15085 | onEnter: (prop_types_default()).func,
|
15086 |
|
15087 | |
15088 |
|
15089 |
|
15090 | onEntering: (prop_types_default()).func,
|
15091 |
|
15092 | |
15093 |
|
15094 |
|
15095 | onEntered: (prop_types_default()).func,
|
15096 |
|
15097 | |
15098 |
|
15099 |
|
15100 | onExit: (prop_types_default()).func,
|
15101 |
|
15102 | |
15103 |
|
15104 |
|
15105 | onExiting: (prop_types_default()).func,
|
15106 |
|
15107 | |
15108 |
|
15109 |
|
15110 | onExited: (prop_types_default()).func,
|
15111 |
|
15112 | |
15113 |
|
15114 |
|
15115 | mountOnEnter: (prop_types_default()).bool,
|
15116 |
|
15117 | |
15118 |
|
15119 |
|
15120 | unmountOnExit: (prop_types_default()).bool,
|
15121 |
|
15122 |
|
15123 | id: (prop_types_default()).string,
|
15124 |
|
15125 |
|
15126 | 'aria-labelledby': (prop_types_default()).string
|
15127 | };
|
15128 |
|
15129 | function useTabContext(props) {
|
15130 | var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_TabContext);
|
15131 | if (!context) return props;
|
15132 |
|
15133 | var activeKey = context.activeKey,
|
15134 | getControlledId = context.getControlledId,
|
15135 | getControllerId = context.getControllerId,
|
15136 | rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(context, TabPane_excluded);
|
15137 |
|
15138 | var shouldTransition = props.transition !== false && rest.transition !== false;
|
15139 | var key = makeEventKey(props.eventKey);
|
15140 | return extends_extends({}, props, {
|
15141 | active: props.active == null && key != null ? makeEventKey(activeKey) === key : props.active,
|
15142 | id: getControlledId(props.eventKey),
|
15143 | 'aria-labelledby': getControllerId(props.eventKey),
|
15144 | transition: shouldTransition && (props.transition || rest.transition || src_Fade),
|
15145 | mountOnEnter: props.mountOnEnter != null ? props.mountOnEnter : rest.mountOnEnter,
|
15146 | unmountOnExit: props.unmountOnExit != null ? props.unmountOnExit : rest.unmountOnExit
|
15147 | });
|
15148 | }
|
15149 |
|
15150 | var TabPane = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
15151 | var _useTabContext = useTabContext(props),
|
15152 | bsPrefix = _useTabContext.bsPrefix,
|
15153 | className = _useTabContext.className,
|
15154 | active = _useTabContext.active,
|
15155 | onEnter = _useTabContext.onEnter,
|
15156 | onEntering = _useTabContext.onEntering,
|
15157 | onEntered = _useTabContext.onEntered,
|
15158 | onExit = _useTabContext.onExit,
|
15159 | onExiting = _useTabContext.onExiting,
|
15160 | onExited = _useTabContext.onExited,
|
15161 | mountOnEnter = _useTabContext.mountOnEnter,
|
15162 | unmountOnExit = _useTabContext.unmountOnExit,
|
15163 | Transition = _useTabContext.transition,
|
15164 | _useTabContext$as = _useTabContext.as,
|
15165 | Component = _useTabContext$as === void 0 ? 'div' : _useTabContext$as,
|
15166 | _ = _useTabContext.eventKey,
|
15167 | rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useTabContext, TabPane_excluded2);
|
15168 |
|
15169 | var prefix = useBootstrapPrefix(bsPrefix, 'tab-pane');
|
15170 | if (!active && !Transition && unmountOnExit) return null;
|
15171 | var pane = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Component, extends_extends({}, rest, {
|
15172 | ref: ref,
|
15173 | role: "tabpanel",
|
15174 | "aria-hidden": !active,
|
15175 | className: classnames_default()(className, prefix, {
|
15176 | active: active
|
15177 | }),
|
15178 | __self: TabPane_this,
|
15179 | __source: {
|
15180 | fileName: TabPane_jsxFileName,
|
15181 | lineNumber: 153,
|
15182 | columnNumber: 5
|
15183 | }
|
15184 | }));
|
15185 | if (Transition) pane = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, {
|
15186 | in: active,
|
15187 | onEnter: onEnter,
|
15188 | onEntering: onEntering,
|
15189 | onEntered: onEntered,
|
15190 | onExit: onExit,
|
15191 | onExiting: onExiting,
|
15192 | onExited: onExited,
|
15193 | mountOnEnter: mountOnEnter,
|
15194 | unmountOnExit: unmountOnExit,
|
15195 | __self: TabPane_this,
|
15196 | __source: {
|
15197 | fileName: TabPane_jsxFileName,
|
15198 | lineNumber: 164,
|
15199 | columnNumber: 7
|
15200 | }
|
15201 | }, pane);
|
15202 |
|
15203 |
|
15204 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabContext.Provider, {
|
15205 | value: null,
|
15206 | __self: TabPane_this,
|
15207 | __source: {
|
15208 | fileName: TabPane_jsxFileName,
|
15209 | lineNumber: 182,
|
15210 | columnNumber: 5
|
15211 | }
|
15212 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_SelectableContext.Provider, {
|
15213 | value: null,
|
15214 | __self: TabPane_this,
|
15215 | __source: {
|
15216 | fileName: TabPane_jsxFileName,
|
15217 | lineNumber: 183,
|
15218 | columnNumber: 7
|
15219 | }
|
15220 | }, pane));
|
15221 | });
|
15222 | TabPane.displayName = 'TabPane';
|
15223 | TabPane.propTypes = TabPane_propTypes;
|
15224 | const src_TabPane = (TabPane);
|
15225 | ;
|
15226 |
|
15227 |
|
15228 |
|
15229 |
|
15230 |
|
15231 |
|
15232 |
|
15233 |
|
15234 | var Tab = function (_React$Component) {
|
15235 | inheritsLoose_inheritsLoose(Tab, _React$Component);
|
15236 |
|
15237 | function Tab() {
|
15238 | return _React$Component.apply(this, arguments) || this;
|
15239 | }
|
15240 |
|
15241 | var _proto = Tab.prototype;
|
15242 |
|
15243 | _proto.render = function render() {
|
15244 | throw new Error('ReactBootstrap: The `Tab` component is not meant to be rendered! ' + "It's an abstract component that is only valid as a direct Child of the `Tabs` Component. " + 'For custom tabs components use TabPane and TabsContainer directly');
|
15245 | return null;
|
15246 | };
|
15247 |
|
15248 | return Tab;
|
15249 | }((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
|
15250 |
|
15251 | Tab.propTypes = {
|
15252 | title: (prop_types_default()).node.isRequired,
|
15253 | eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])
|
15254 | };
|
15255 | Tab.Container = src_TabContainer;
|
15256 | Tab.Content = src_TabContent;
|
15257 | Tab.Pane = src_TabPane;
|
15258 | const src_Tab = (Tab);
|
15259 | ;
|
15260 |
|
15261 |
|
15262 | var Table_excluded = ["bsPrefix", "className", "striped", "bordered", "borderless", "hover", "size", "variant", "responsive"];
|
15263 |
|
15264 | var Table_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Table.tsx",
|
15265 | Table_this = undefined;
|
15266 |
|
15267 |
|
15268 |
|
15269 |
|
15270 |
|
15271 | var Table_propTypes = {
|
15272 | |
15273 |
|
15274 |
|
15275 | bsPrefix: (prop_types_default()).string,
|
15276 |
|
15277 | |
15278 |
|
15279 |
|
15280 | striped: (prop_types_default()).bool,
|
15281 |
|
15282 | |
15283 |
|
15284 |
|
15285 | bordered: (prop_types_default()).bool,
|
15286 |
|
15287 | |
15288 |
|
15289 |
|
15290 | borderless: (prop_types_default()).bool,
|
15291 |
|
15292 | |
15293 |
|
15294 |
|
15295 | hover: (prop_types_default()).bool,
|
15296 |
|
15297 | |
15298 |
|
15299 |
|
15300 |
|
15301 | size: (prop_types_default()).string,
|
15302 |
|
15303 | |
15304 |
|
15305 |
|
15306 |
|
15307 | variant: (prop_types_default()).string,
|
15308 |
|
15309 | |
15310 |
|
15311 |
|
15312 |
|
15313 |
|
15314 |
|
15315 |
|
15316 |
|
15317 |
|
15318 | responsive: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string])
|
15319 | };
|
15320 | var Table = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
15321 | var bsPrefix = _ref.bsPrefix,
|
15322 | className = _ref.className,
|
15323 | striped = _ref.striped,
|
15324 | bordered = _ref.bordered,
|
15325 | borderless = _ref.borderless,
|
15326 | hover = _ref.hover,
|
15327 | size = _ref.size,
|
15328 | variant = _ref.variant,
|
15329 | responsive = _ref.responsive,
|
15330 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Table_excluded);
|
15331 |
|
15332 | var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');
|
15333 | var classes = classnames_default()(className, decoratedBsPrefix, variant && decoratedBsPrefix + "-" + variant, size && decoratedBsPrefix + "-" + size, striped && decoratedBsPrefix + "-striped", bordered && decoratedBsPrefix + "-bordered", borderless && decoratedBsPrefix + "-borderless", hover && decoratedBsPrefix + "-hover");
|
15334 | var table = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("table", extends_extends({}, props, {
|
15335 | className: classes,
|
15336 | ref: ref,
|
15337 | __self: Table_this,
|
15338 | __source: {
|
15339 | fileName: Table_jsxFileName,
|
15340 | lineNumber: 101,
|
15341 | columnNumber: 19
|
15342 | }
|
15343 | }));
|
15344 |
|
15345 | if (responsive) {
|
15346 | var responsiveClass = decoratedBsPrefix + "-responsive";
|
15347 |
|
15348 | if (typeof responsive === 'string') {
|
15349 | responsiveClass = responsiveClass + "-" + responsive;
|
15350 | }
|
15351 |
|
15352 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
15353 | className: responsiveClass,
|
15354 | __self: Table_this,
|
15355 | __source: {
|
15356 | fileName: Table_jsxFileName,
|
15357 | lineNumber: 108,
|
15358 | columnNumber: 14
|
15359 | }
|
15360 | }, table);
|
15361 | }
|
15362 |
|
15363 | return table;
|
15364 | });
|
15365 | Table.propTypes = Table_propTypes;
|
15366 | const src_Table = (Table);
|
15367 | ;
|
15368 |
|
15369 |
|
15370 | var Tabs_excluded = ["id", "onSelect", "transition", "mountOnEnter", "unmountOnExit", "children", "activeKey"];
|
15371 |
|
15372 | var Tabs_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tabs.tsx",
|
15373 | Tabs_this = undefined;
|
15374 |
|
15375 |
|
15376 |
|
15377 |
|
15378 |
|
15379 |
|
15380 |
|
15381 |
|
15382 |
|
15383 |
|
15384 |
|
15385 |
|
15386 | var Tabs_propTypes = {
|
15387 | |
15388 |
|
15389 |
|
15390 |
|
15391 |
|
15392 | activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
|
15393 |
|
15394 |
|
15395 | defaultActiveKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
|
15396 |
|
15397 | |
15398 |
|
15399 |
|
15400 |
|
15401 |
|
15402 | variant: (prop_types_default()).string,
|
15403 |
|
15404 | |
15405 |
|
15406 |
|
15407 |
|
15408 |
|
15409 |
|
15410 |
|
15411 |
|
15412 | transition: prop_types_default().oneOfType([prop_types_default().oneOf([false]), (prop_types_default()).elementType]),
|
15413 |
|
15414 | |
15415 |
|
15416 |
|
15417 |
|
15418 |
|
15419 |
|
15420 | id: isRequiredForA11y_default()((prop_types_default()).string),
|
15421 |
|
15422 | |
15423 |
|
15424 |
|
15425 |
|
15426 |
|
15427 |
|
15428 |
|
15429 |
|
15430 |
|
15431 |
|
15432 |
|
15433 |
|
15434 | onSelect: (prop_types_default()).func,
|
15435 |
|
15436 | |
15437 |
|
15438 |
|
15439 | mountOnEnter: (prop_types_default()).bool,
|
15440 |
|
15441 | |
15442 |
|
15443 |
|
15444 | unmountOnExit: (prop_types_default()).bool
|
15445 | };
|
15446 | var Tabs_defaultProps = {
|
15447 | variant: 'tabs',
|
15448 | mountOnEnter: false,
|
15449 | unmountOnExit: false
|
15450 | };
|
15451 |
|
15452 | function getDefaultActiveKey(children) {
|
15453 | var defaultActiveKey;
|
15454 | forEach(children, function (child) {
|
15455 | if (defaultActiveKey == null) {
|
15456 | defaultActiveKey = child.props.eventKey;
|
15457 | }
|
15458 | });
|
15459 | return defaultActiveKey;
|
15460 | }
|
15461 |
|
15462 | function renderTab(child) {
|
15463 | var _child$props = child.props,
|
15464 | title = _child$props.title,
|
15465 | eventKey = _child$props.eventKey,
|
15466 | disabled = _child$props.disabled,
|
15467 | tabClassName = _child$props.tabClassName,
|
15468 | id = _child$props.id;
|
15469 |
|
15470 | if (title == null) {
|
15471 | return null;
|
15472 | }
|
15473 |
|
15474 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_NavItem, {
|
15475 | as: src_NavLink,
|
15476 | eventKey: eventKey,
|
15477 | disabled: disabled,
|
15478 | id: id,
|
15479 | className: tabClassName,
|
15480 | __self: this,
|
15481 | __source: {
|
15482 | fileName: Tabs_jsxFileName,
|
15483 | lineNumber: 116,
|
15484 | columnNumber: 5
|
15485 | }
|
15486 | }, title);
|
15487 | }
|
15488 |
|
15489 | var Tabs = function Tabs(props) {
|
15490 | var _useUncontrolled = useUncontrolled(props, {
|
15491 | activeKey: 'onSelect'
|
15492 | }),
|
15493 | id = _useUncontrolled.id,
|
15494 | onSelect = _useUncontrolled.onSelect,
|
15495 | transition = _useUncontrolled.transition,
|
15496 | mountOnEnter = _useUncontrolled.mountOnEnter,
|
15497 | unmountOnExit = _useUncontrolled.unmountOnExit,
|
15498 | children = _useUncontrolled.children,
|
15499 | _useUncontrolled$acti = _useUncontrolled.activeKey,
|
15500 | activeKey = _useUncontrolled$acti === void 0 ? getDefaultActiveKey(children) : _useUncontrolled$acti,
|
15501 | controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, Tabs_excluded);
|
15502 |
|
15503 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabContainer, {
|
15504 | id: id,
|
15505 | activeKey: activeKey,
|
15506 | onSelect: onSelect,
|
15507 | transition: transition,
|
15508 | mountOnEnter: mountOnEnter,
|
15509 | unmountOnExit: unmountOnExit,
|
15510 | __self: Tabs_this,
|
15511 | __source: {
|
15512 | fileName: Tabs_jsxFileName,
|
15513 | lineNumber: 143,
|
15514 | columnNumber: 5
|
15515 | }
|
15516 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Nav, extends_extends({}, controlledProps, {
|
15517 | role: "tablist",
|
15518 | as: "nav",
|
15519 | __self: Tabs_this,
|
15520 | __source: {
|
15521 | fileName: Tabs_jsxFileName,
|
15522 | lineNumber: 151,
|
15523 | columnNumber: 7
|
15524 | }
|
15525 | }), map(children, renderTab)), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabContent, {
|
15526 | __self: Tabs_this,
|
15527 | __source: {
|
15528 | fileName: Tabs_jsxFileName,
|
15529 | lineNumber: 155,
|
15530 | columnNumber: 7
|
15531 | }
|
15532 | }, map(children, function (child) {
|
15533 | var childProps = extends_extends({}, child.props);
|
15534 |
|
15535 | delete childProps.title;
|
15536 | delete childProps.disabled;
|
15537 | delete childProps.tabClassName;
|
15538 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TabPane, extends_extends({}, childProps, {
|
15539 | __self: Tabs_this,
|
15540 | __source: {
|
15541 | fileName: Tabs_jsxFileName,
|
15542 | lineNumber: 163,
|
15543 | columnNumber: 18
|
15544 | }
|
15545 | }));
|
15546 | })));
|
15547 | };
|
15548 |
|
15549 | Tabs.propTypes = Tabs_propTypes;
|
15550 | Tabs.defaultProps = Tabs_defaultProps;
|
15551 | Tabs.displayName = 'Tabs';
|
15552 | const src_Tabs = (Tabs);
|
15553 | ;
|
15554 |
|
15555 |
|
15556 | var ToastContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({
|
15557 |
|
15558 | onClose: function onClose() {}
|
15559 | });
|
15560 | const src_ToastContext = (ToastContext);
|
15561 | ;
|
15562 |
|
15563 |
|
15564 | var ToastHeader_excluded = ["bsPrefix", "closeLabel", "closeButton", "className", "children"];
|
15565 |
|
15566 | var ToastHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToastHeader.tsx",
|
15567 | ToastHeader_this = undefined;
|
15568 |
|
15569 |
|
15570 |
|
15571 |
|
15572 |
|
15573 |
|
15574 |
|
15575 |
|
15576 | var ToastHeader_propTypes = {
|
15577 | bsPrefix: (prop_types_default()).string,
|
15578 |
|
15579 | |
15580 |
|
15581 |
|
15582 |
|
15583 |
|
15584 | closeLabel: (prop_types_default()).string,
|
15585 |
|
15586 | |
15587 |
|
15588 |
|
15589 | closeButton: (prop_types_default()).bool
|
15590 | };
|
15591 | var ToastHeader_defaultProps = {
|
15592 | closeLabel: 'Close',
|
15593 | closeButton: true
|
15594 | };
|
15595 | var ToastHeader = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
15596 | var bsPrefix = _ref.bsPrefix,
|
15597 | closeLabel = _ref.closeLabel,
|
15598 | closeButton = _ref.closeButton,
|
15599 | className = _ref.className,
|
15600 | children = _ref.children,
|
15601 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ToastHeader_excluded);
|
15602 |
|
15603 | bsPrefix = useBootstrapPrefix(bsPrefix, 'toast-header');
|
15604 | var context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_ToastContext);
|
15605 | var handleClick = useEventCallback(function (e) {
|
15606 | if (context && context.onClose) {
|
15607 | context.onClose(e);
|
15608 | }
|
15609 | });
|
15610 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
15611 | ref: ref
|
15612 | }, props, {
|
15613 | className: classnames_default()(bsPrefix, className),
|
15614 | __self: ToastHeader_this,
|
15615 | __source: {
|
15616 | fileName: ToastHeader_jsxFileName,
|
15617 | lineNumber: 69,
|
15618 | columnNumber: 7
|
15619 | }
|
15620 | }), children, closeButton && external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_CloseButton, {
|
15621 | label: closeLabel,
|
15622 | onClick: handleClick,
|
15623 | className: "ml-2 mb-1",
|
15624 | "data-dismiss": "toast",
|
15625 | __self: ToastHeader_this,
|
15626 | __source: {
|
15627 | fileName: ToastHeader_jsxFileName,
|
15628 | lineNumber: 73,
|
15629 | columnNumber: 11
|
15630 | }
|
15631 | }));
|
15632 | });
|
15633 | ToastHeader.displayName = 'ToastHeader';
|
15634 | ToastHeader.propTypes = ToastHeader_propTypes;
|
15635 | ToastHeader.defaultProps = ToastHeader_defaultProps;
|
15636 | const src_ToastHeader = (ToastHeader);
|
15637 | ;
|
15638 |
|
15639 | const ToastBody = (createWithBsPrefix('toast-body'));
|
15640 | ;
|
15641 |
|
15642 |
|
15643 | var Toast_excluded = ["bsPrefix", "className", "children", "transition", "show", "animation", "delay", "autohide", "onClose"];
|
15644 |
|
15645 | var Toast_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Toast.tsx",
|
15646 | Toast_this = undefined;
|
15647 |
|
15648 |
|
15649 |
|
15650 |
|
15651 |
|
15652 |
|
15653 |
|
15654 |
|
15655 |
|
15656 |
|
15657 | var Toast_propTypes = {
|
15658 | |
15659 |
|
15660 |
|
15661 | bsPrefix: (prop_types_default()).string,
|
15662 |
|
15663 | |
15664 |
|
15665 |
|
15666 | animation: (prop_types_default()).bool,
|
15667 |
|
15668 | |
15669 |
|
15670 |
|
15671 | autohide: (prop_types_default()).bool,
|
15672 |
|
15673 | |
15674 |
|
15675 |
|
15676 | delay: (prop_types_default()).number,
|
15677 |
|
15678 | |
15679 |
|
15680 |
|
15681 | onClose: (prop_types_default()).func,
|
15682 |
|
15683 | |
15684 |
|
15685 |
|
15686 | show: (prop_types_default()).bool,
|
15687 |
|
15688 | |
15689 |
|
15690 |
|
15691 | transition: (prop_types_default()).elementType
|
15692 | };
|
15693 | var Toast = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
15694 | var bsPrefix = _ref.bsPrefix,
|
15695 | className = _ref.className,
|
15696 | children = _ref.children,
|
15697 | _ref$transition = _ref.transition,
|
15698 | Transition = _ref$transition === void 0 ? src_Fade : _ref$transition,
|
15699 | _ref$show = _ref.show,
|
15700 | show = _ref$show === void 0 ? true : _ref$show,
|
15701 | _ref$animation = _ref.animation,
|
15702 | animation = _ref$animation === void 0 ? true : _ref$animation,
|
15703 | _ref$delay = _ref.delay,
|
15704 | delay = _ref$delay === void 0 ? 3000 : _ref$delay,
|
15705 | _ref$autohide = _ref.autohide,
|
15706 | autohide = _ref$autohide === void 0 ? false : _ref$autohide,
|
15707 | onClose = _ref.onClose,
|
15708 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Toast_excluded);
|
15709 |
|
15710 | bsPrefix = useBootstrapPrefix(bsPrefix, 'toast');
|
15711 |
|
15712 |
|
15713 | var delayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(delay);
|
15714 | var onCloseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(onClose);
|
15715 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
15716 | delayRef.current = delay;
|
15717 | onCloseRef.current = onClose;
|
15718 | }, [delay, onClose]);
|
15719 | var autohideTimeout = useTimeout();
|
15720 | var autohideToast = !!(autohide && show);
|
15721 | var autohideFunc = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
15722 | if (autohideToast) {
|
15723 | onCloseRef.current == null ? void 0 : onCloseRef.current();
|
15724 | }
|
15725 | }, [autohideToast]);
|
15726 | (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
15727 |
|
15728 | autohideTimeout.set(autohideFunc, delayRef.current);
|
15729 | }, [autohideTimeout, autohideFunc]);
|
15730 | var toastContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
15731 | return {
|
15732 | onClose: onClose
|
15733 | };
|
15734 | }, [onClose]);
|
15735 | var hasAnimation = !!(Transition && animation);
|
15736 | var toast = external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({}, props, {
|
15737 | ref: ref,
|
15738 | className: classnames_default()(bsPrefix, className, !hasAnimation && (show ? 'show' : 'hide')),
|
15739 | role: "alert",
|
15740 | "aria-live": "assertive",
|
15741 | "aria-atomic": "true",
|
15742 | __self: Toast_this,
|
15743 | __source: {
|
15744 | fileName: Toast_jsxFileName,
|
15745 | lineNumber: 118,
|
15746 | columnNumber: 7
|
15747 | }
|
15748 | }), children);
|
15749 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_ToastContext.Provider, {
|
15750 | value: toastContext,
|
15751 | __self: Toast_this,
|
15752 | __source: {
|
15753 | fileName: Toast_jsxFileName,
|
15754 | lineNumber: 135,
|
15755 | columnNumber: 7
|
15756 | }
|
15757 | }, hasAnimation && Transition ? external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Transition, {
|
15758 | in: show,
|
15759 | unmountOnExit: true,
|
15760 | __self: Toast_this,
|
15761 | __source: {
|
15762 | fileName: Toast_jsxFileName,
|
15763 | lineNumber: 137,
|
15764 | columnNumber: 11
|
15765 | }
|
15766 | }, toast) : toast);
|
15767 | });
|
15768 | Toast.propTypes = Toast_propTypes;
|
15769 | Toast.displayName = 'Toast';
|
15770 | const src_Toast = (Object.assign(Toast, {
|
15771 | Body: ToastBody,
|
15772 | Header: src_ToastHeader
|
15773 | }));
|
15774 | ;
|
15775 |
|
15776 |
|
15777 | var ToggleButton_excluded = ["children", "name", "className", "checked", "type", "onChange", "value", "disabled", "inputRef"];
|
15778 |
|
15779 | var ToggleButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToggleButton.tsx",
|
15780 | ToggleButton_this = undefined;
|
15781 |
|
15782 |
|
15783 |
|
15784 |
|
15785 |
|
15786 |
|
15787 | var ToggleButton_noop = function noop() {
|
15788 | return undefined;
|
15789 | };
|
15790 |
|
15791 | var ToggleButton_propTypes = {
|
15792 | |
15793 |
|
15794 |
|
15795 | type: prop_types_default().oneOf(['checkbox', 'radio']),
|
15796 |
|
15797 | |
15798 |
|
15799 |
|
15800 |
|
15801 | name: (prop_types_default()).string,
|
15802 |
|
15803 | |
15804 |
|
15805 |
|
15806 | checked: (prop_types_default()).bool,
|
15807 |
|
15808 | |
15809 |
|
15810 |
|
15811 | disabled: (prop_types_default()).bool,
|
15812 |
|
15813 | |
15814 |
|
15815 |
|
15816 |
|
15817 | onChange: (prop_types_default()).func,
|
15818 |
|
15819 | |
15820 |
|
15821 |
|
15822 |
|
15823 | value: prop_types_default().oneOfType([(prop_types_default()).string, prop_types_default().arrayOf((prop_types_default()).string), (prop_types_default()).number]).isRequired,
|
15824 |
|
15825 | |
15826 |
|
15827 |
|
15828 |
|
15829 | inputRef: prop_types_default().oneOfType([(prop_types_default()).func, (prop_types_default()).object])
|
15830 | };
|
15831 | var ToggleButton = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
15832 | var children = _ref.children,
|
15833 | name = _ref.name,
|
15834 | className = _ref.className,
|
15835 | checked = _ref.checked,
|
15836 | type = _ref.type,
|
15837 | onChange = _ref.onChange,
|
15838 | value = _ref.value,
|
15839 | disabled = _ref.disabled,
|
15840 | inputRef = _ref.inputRef,
|
15841 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, ToggleButton_excluded);
|
15842 |
|
15843 | var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
15844 | focused = _useState[0],
|
15845 | setFocused = _useState[1];
|
15846 |
|
15847 | var handleFocus = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
|
15848 | if (e.target.tagName === 'INPUT') setFocused(true);
|
15849 | }, []);
|
15850 | var handleBlur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (e) {
|
15851 | if (e.target.tagName === 'INPUT') setFocused(false);
|
15852 | }, []);
|
15853 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_Button, extends_extends({}, props, {
|
15854 | ref: ref,
|
15855 | className: classnames_default()(className, focused && 'focus', disabled && 'disabled'),
|
15856 | type: undefined,
|
15857 | active: !!checked,
|
15858 | as: "label",
|
15859 | __self: ToggleButton_this,
|
15860 | __source: {
|
15861 | fileName: ToggleButton_jsxFileName,
|
15862 | lineNumber: 98,
|
15863 | columnNumber: 7
|
15864 | }
|
15865 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
|
15866 | name: name,
|
15867 | type: type,
|
15868 | value: value,
|
15869 | ref: inputRef,
|
15870 | autoComplete: "off",
|
15871 | checked: !!checked,
|
15872 | disabled: !!disabled,
|
15873 | onFocus: handleFocus,
|
15874 | onBlur: handleBlur,
|
15875 | onChange: onChange || ToggleButton_noop,
|
15876 | __self: ToggleButton_this,
|
15877 | __source: {
|
15878 | fileName: ToggleButton_jsxFileName,
|
15879 | lineNumber: 110,
|
15880 | columnNumber: 9
|
15881 | }
|
15882 | }), children);
|
15883 | });
|
15884 | ToggleButton.propTypes = ToggleButton_propTypes;
|
15885 | ToggleButton.displayName = 'ToggleButton';
|
15886 | const src_ToggleButton = (ToggleButton);
|
15887 | ;
|
15888 |
|
15889 |
|
15890 | var ToggleButtonGroup_excluded = ["children", "type", "name", "value", "onChange"];
|
15891 |
|
15892 | var ToggleButtonGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToggleButtonGroup.tsx",
|
15893 | ToggleButtonGroup_this = undefined;
|
15894 |
|
15895 |
|
15896 |
|
15897 |
|
15898 |
|
15899 |
|
15900 |
|
15901 |
|
15902 |
|
15903 | var ToggleButtonGroup_propTypes = {
|
15904 | |
15905 |
|
15906 |
|
15907 |
|
15908 |
|
15909 | name: (prop_types_default()).string,
|
15910 |
|
15911 | |
15912 |
|
15913 |
|
15914 |
|
15915 |
|
15916 | value: (prop_types_default()).any,
|
15917 |
|
15918 | |
15919 |
|
15920 |
|
15921 |
|
15922 |
|
15923 |
|
15924 |
|
15925 | onChange: (prop_types_default()).func,
|
15926 |
|
15927 | |
15928 |
|
15929 |
|
15930 |
|
15931 | type: prop_types_default().oneOf(['checkbox', 'radio']).isRequired,
|
15932 |
|
15933 | |
15934 |
|
15935 |
|
15936 |
|
15937 |
|
15938 | size: (prop_types_default()).string,
|
15939 |
|
15940 |
|
15941 | vertical: (prop_types_default()).bool
|
15942 | };
|
15943 | var ToggleButtonGroup_defaultProps = {
|
15944 | type: 'radio',
|
15945 | vertical: false
|
15946 | };
|
15947 | var ToggleButtonGroup = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
15948 | var _useUncontrolled = useUncontrolled(props, {
|
15949 | value: 'onChange'
|
15950 | }),
|
15951 | children = _useUncontrolled.children,
|
15952 | type = _useUncontrolled.type,
|
15953 | name = _useUncontrolled.name,
|
15954 | value = _useUncontrolled.value,
|
15955 | onChange = _useUncontrolled.onChange,
|
15956 | controlledProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_useUncontrolled, ToggleButtonGroup_excluded);
|
15957 |
|
15958 | var getValues = function getValues() {
|
15959 | return value == null ? [] : [].concat(value);
|
15960 | };
|
15961 |
|
15962 | var handleToggle = function handleToggle(inputVal, event) {
|
15963 | if (!onChange) {
|
15964 | return;
|
15965 | }
|
15966 |
|
15967 | var values = getValues();
|
15968 | var isActive = values.indexOf(inputVal) !== -1;
|
15969 |
|
15970 | if (type === 'radio') {
|
15971 | if (!isActive && onChange) onChange(inputVal, event);
|
15972 | return;
|
15973 | }
|
15974 |
|
15975 | if (isActive) {
|
15976 | onChange(values.filter(function (n) {
|
15977 | return n !== inputVal;
|
15978 | }), event);
|
15979 | } else {
|
15980 | onChange([].concat(values, [inputVal]), event);
|
15981 | }
|
15982 | };
|
15983 |
|
15984 | !(type !== 'radio' || !!name) ? false ? 0 : browser_default()(false) : void 0;
|
15985 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_ButtonGroup, extends_extends({}, controlledProps, {
|
15986 | ref: ref,
|
15987 | toggle: true,
|
15988 | __self: ToggleButtonGroup_this,
|
15989 | __source: {
|
15990 | fileName: ToggleButtonGroup_jsxFileName,
|
15991 | lineNumber: 132,
|
15992 | columnNumber: 7
|
15993 | }
|
15994 | }), map(children, function (child) {
|
15995 | var values = getValues();
|
15996 | var _child$props = child.props,
|
15997 | childVal = _child$props.value,
|
15998 | childOnChange = _child$props.onChange;
|
15999 |
|
16000 | var handler = function handler(e) {
|
16001 | return handleToggle(childVal, e);
|
16002 | };
|
16003 |
|
16004 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, {
|
16005 | type: type,
|
16006 | name: child.name || name,
|
16007 | checked: values.indexOf(childVal) !== -1,
|
16008 | onChange: src_createChainedFunction(childOnChange, handler)
|
16009 | });
|
16010 | }));
|
16011 | });
|
16012 | ToggleButtonGroup.propTypes = ToggleButtonGroup_propTypes;
|
16013 | ToggleButtonGroup.defaultProps = ToggleButtonGroup_defaultProps;
|
16014 | ToggleButtonGroup.Button = src_ToggleButton;
|
16015 | const src_ToggleButtonGroup = (ToggleButtonGroup);
|
16016 | ;
|
16017 |
|
16018 |
|
16019 | var Tooltip_excluded = ["bsPrefix", "placement", "className", "style", "children", "arrowProps", "popper", "show"];
|
16020 |
|
16021 | var Tooltip_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tooltip.tsx",
|
16022 | Tooltip_this = undefined;
|
16023 |
|
16024 |
|
16025 |
|
16026 |
|
16027 |
|
16028 |
|
16029 | var Tooltip_propTypes = {
|
16030 | |
16031 |
|
16032 |
|
16033 | bsPrefix: (prop_types_default()).string,
|
16034 |
|
16035 | |
16036 |
|
16037 |
|
16038 |
|
16039 |
|
16040 | id: isRequiredForA11y_default()(prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])),
|
16041 |
|
16042 | |
16043 |
|
16044 |
|
16045 |
|
16046 |
|
16047 | placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']),
|
16048 |
|
16049 | |
16050 |
|
16051 |
|
16052 |
|
16053 |
|
16054 |
|
16055 |
|
16056 | arrowProps: prop_types_default().shape({
|
16057 | ref: (prop_types_default()).any,
|
16058 | style: (prop_types_default()).object
|
16059 | }),
|
16060 |
|
16061 |
|
16062 | popper: (prop_types_default()).object,
|
16063 |
|
16064 |
|
16065 | show: (prop_types_default()).any
|
16066 | };
|
16067 | var Tooltip_defaultProps = {
|
16068 | placement: 'right'
|
16069 | };
|
16070 | var Tooltip = external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (_ref, ref) {
|
16071 | var bsPrefix = _ref.bsPrefix,
|
16072 | placement = _ref.placement,
|
16073 | className = _ref.className,
|
16074 | style = _ref.style,
|
16075 | children = _ref.children,
|
16076 | arrowProps = _ref.arrowProps,
|
16077 | _ = _ref.popper,
|
16078 | _2 = _ref.show,
|
16079 | props = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, Tooltip_excluded);
|
16080 |
|
16081 | bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');
|
16082 |
|
16083 | var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],
|
16084 | primaryPlacement = _ref2[0];
|
16085 |
|
16086 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
16087 | ref: ref,
|
16088 | style: style,
|
16089 | role: "tooltip",
|
16090 | "x-placement": primaryPlacement,
|
16091 | className: classnames_default()(className, bsPrefix, "bs-tooltip-" + primaryPlacement)
|
16092 | }, props, {
|
16093 | __self: Tooltip_this,
|
16094 | __source: {
|
16095 | fileName: Tooltip_jsxFileName,
|
16096 | lineNumber: 106,
|
16097 | columnNumber: 7
|
16098 | }
|
16099 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", extends_extends({
|
16100 | className: "arrow"
|
16101 | }, arrowProps, {
|
16102 | __self: Tooltip_this,
|
16103 | __source: {
|
16104 | fileName: Tooltip_jsxFileName,
|
16105 | lineNumber: 118,
|
16106 | columnNumber: 9
|
16107 | }
|
16108 | })), external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
16109 | className: bsPrefix + "-inner",
|
16110 | __self: Tooltip_this,
|
16111 | __source: {
|
16112 | fileName: Tooltip_jsxFileName,
|
16113 | lineNumber: 119,
|
16114 | columnNumber: 9
|
16115 | }
|
16116 | }, children));
|
16117 | });
|
16118 | Tooltip.propTypes = Tooltip_propTypes;
|
16119 | Tooltip.defaultProps = Tooltip_defaultProps;
|
16120 | Tooltip.displayName = 'Tooltip';
|
16121 | const src_Tooltip = (Tooltip);
|
16122 | ;
|
16123 |
|
16124 |
|
16125 |
|
16126 |
|
16127 |
|
16128 |
|
16129 |
|
16130 |
|
16131 |
|
16132 |
|
16133 |
|
16134 |
|
16135 |
|
16136 |
|
16137 |
|
16138 |
|
16139 |
|
16140 |
|
16141 |
|
16142 |
|
16143 |
|
16144 |
|
16145 |
|
16146 |
|
16147 |
|
16148 |
|
16149 |
|
16150 |
|
16151 |
|
16152 |
|
16153 |
|
16154 |
|
16155 |
|
16156 |
|
16157 |
|
16158 |
|
16159 |
|
16160 |
|
16161 |
|
16162 |
|
16163 |
|
16164 |
|
16165 |
|
16166 |
|
16167 |
|
16168 |
|
16169 |
|
16170 |
|
16171 |
|
16172 |
|
16173 |
|
16174 |
|
16175 |
|
16176 |
|
16177 |
|
16178 |
|
16179 |
|
16180 |
|
16181 |
|
16182 |
|
16183 |
|
16184 |
|
16185 |
|
16186 |
|
16187 |
|
16188 |
|
16189 |
|
16190 |
|
16191 |
|
16192 |
|
16193 |
|
16194 |
|
16195 |
|
16196 |
|
16197 |
|
16198 |
|
16199 | })();
|
16200 |
|
16201 | return __webpack_exports__;
|
16202 | })()
|
16203 | ;
|
16204 | }); |
\ | No newline at end of file |