react-bootstrap 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +1 -1
  2. package/cjs/AccordionCollapse.js +9 -3
  3. package/cjs/Button.js +1 -1
  4. package/cjs/Carousel.js +22 -4
  5. package/cjs/CarouselItem.d.ts +7 -2
  6. package/cjs/CarouselItem.js +25 -2
  7. package/cjs/DropdownButton.d.ts +2 -0
  8. package/cjs/DropdownButton.js +16 -3
  9. package/cjs/DropdownItem.js +3 -2
  10. package/cjs/DropdownMenu.d.ts +22 -0
  11. package/cjs/DropdownMenu.js +45 -6
  12. package/cjs/DropdownToggle.js +2 -3
  13. package/cjs/Fade.d.ts +6 -3
  14. package/cjs/Form.d.ts +1 -1
  15. package/cjs/FormCheck.d.ts +1 -3
  16. package/cjs/FormCheck.js +1 -1
  17. package/cjs/FormLabel.js +1 -1
  18. package/cjs/ListGroupItem.js +2 -1
  19. package/cjs/Modal.d.ts +1 -0
  20. package/cjs/Modal.js +4 -2
  21. package/cjs/ModalDialog.d.ts +1 -0
  22. package/cjs/ModalDialog.js +3 -2
  23. package/cjs/NavDropdown.d.ts +3 -3
  24. package/cjs/Overlay.d.ts +1 -1
  25. package/cjs/OverlayTrigger.d.ts +1 -1
  26. package/cjs/SplitButton.d.ts +2 -0
  27. package/cjs/SplitButton.js +15 -2
  28. package/cjs/ToggleButtonGroup.d.ts +4 -3
  29. package/cjs/ToggleButtonGroup.js +2 -1
  30. package/cjs/index.d.ts +1 -0
  31. package/cjs/usePopperMarginModifiers.d.ts +4 -1
  32. package/cjs/usePopperMarginModifiers.js +8 -4
  33. package/dist/react-bootstrap.js +327 -130
  34. package/dist/react-bootstrap.min.js +2 -2
  35. package/esm/AccordionCollapse.js +8 -3
  36. package/esm/Button.js +1 -1
  37. package/esm/Carousel.js +23 -5
  38. package/esm/CarouselItem.d.ts +7 -2
  39. package/esm/CarouselItem.js +22 -2
  40. package/esm/DropdownButton.d.ts +2 -0
  41. package/esm/DropdownButton.js +14 -3
  42. package/esm/DropdownItem.js +3 -2
  43. package/esm/DropdownMenu.d.ts +22 -0
  44. package/esm/DropdownMenu.js +38 -3
  45. package/esm/DropdownToggle.js +2 -3
  46. package/esm/Fade.d.ts +6 -3
  47. package/esm/Form.d.ts +1 -1
  48. package/esm/FormCheck.d.ts +1 -3
  49. package/esm/FormCheck.js +1 -1
  50. package/esm/FormLabel.js +1 -1
  51. package/esm/ListGroupItem.js +2 -1
  52. package/esm/Modal.d.ts +1 -0
  53. package/esm/Modal.js +4 -2
  54. package/esm/ModalDialog.d.ts +1 -0
  55. package/esm/ModalDialog.js +3 -2
  56. package/esm/NavDropdown.d.ts +3 -3
  57. package/esm/Overlay.d.ts +1 -1
  58. package/esm/OverlayTrigger.d.ts +1 -1
  59. package/esm/SplitButton.d.ts +2 -0
  60. package/esm/SplitButton.js +14 -2
  61. package/esm/ToggleButtonGroup.d.ts +4 -3
  62. package/esm/ToggleButtonGroup.js +2 -1
  63. package/esm/index.d.ts +1 -0
  64. package/esm/usePopperMarginModifiers.d.ts +4 -1
  65. package/esm/usePopperMarginModifiers.js +7 -4
  66. package/package.json +24 -24
@@ -7,7 +7,7 @@
7
7
  exports["ReactBootstrap"] = factory(require("react"), require("react-dom"));
8
8
  else
9
9
  root["ReactBootstrap"] = factory(root["React"], root["ReactDOM"]);
10
- })(window, function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__4__) {
10
+ })(window, function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__5__) {
11
11
  return /******/ (function(modules) { // webpackBootstrap
12
12
  /******/ // The module cache
13
13
  /******/ var installedModules = {};
@@ -226,12 +226,6 @@ module.exports = exports['default'];
226
226
 
227
227
  /***/ }),
228
228
  /* 4 */
229
- /***/ (function(module, exports) {
230
-
231
- module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
232
-
233
- /***/ }),
234
- /* 5 */
235
229
  /***/ (function(module, exports, __webpack_require__) {
236
230
 
237
231
  "use strict";
@@ -299,6 +293,12 @@ if (__DEV__) {
299
293
 
300
294
  module.exports = warning;
301
295
 
296
+ /***/ }),
297
+ /* 5 */
298
+ /***/ (function(module, exports) {
299
+
300
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5__;
301
+
302
302
  /***/ }),
303
303
  /* 6 */
304
304
  /***/ (function(module, exports, __webpack_require__) {
@@ -616,7 +616,7 @@ Object.defineProperty(exports, "__esModule", {
616
616
  });
617
617
  exports.default = deprecated;
618
618
 
619
- var _warning = __webpack_require__(5);
619
+ var _warning = __webpack_require__(4);
620
620
 
621
621
  var _warning2 = _interopRequireDefault(_warning);
622
622
 
@@ -885,7 +885,7 @@ __webpack_require__.d(__webpack_exports__, "CardDeck", function() { return /* re
885
885
  __webpack_require__.d(__webpack_exports__, "CardImg", function() { return /* reexport */ src_CardImg; });
886
886
  __webpack_require__.d(__webpack_exports__, "CardGroup", function() { return /* reexport */ CardGroup; });
887
887
  __webpack_require__.d(__webpack_exports__, "Carousel", function() { return /* reexport */ src_Carousel; });
888
- __webpack_require__.d(__webpack_exports__, "CarouselItem", function() { return /* reexport */ CarouselItem; });
888
+ __webpack_require__.d(__webpack_exports__, "CarouselItem", function() { return /* reexport */ src_CarouselItem; });
889
889
  __webpack_require__.d(__webpack_exports__, "CloseButton", function() { return /* reexport */ src_CloseButton; });
890
890
  __webpack_require__.d(__webpack_exports__, "Col", function() { return /* reexport */ src_Col; });
891
891
  __webpack_require__.d(__webpack_exports__, "Collapse", function() { return /* reexport */ src_Collapse; });
@@ -1762,7 +1762,7 @@ function transitionEnd(element, handler, duration) {
1762
1762
 
1763
1763
  /* harmony default export */ var esm_transitionEnd = (transitionEnd);
1764
1764
  // EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
1765
- var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__(4);
1765
+ var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__(5);
1766
1766
  var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
1767
1767
 
1768
1768
  // CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
@@ -2456,6 +2456,7 @@ var AccordionCollapse_this = undefined,
2456
2456
 
2457
2457
 
2458
2458
 
2459
+
2459
2460
  var AccordionCollapse_propTypes = {
2460
2461
  /**
2461
2462
  * A key that corresponds to the toggler that triggers this collapse's expand or collapse.
@@ -2470,25 +2471,35 @@ var AccordionCollapse = external_root_React_commonjs2_react_commonjs_react_amd_r
2470
2471
  eventKey = _ref.eventKey,
2471
2472
  props = _objectWithoutPropertiesLoose(_ref, ["children", "eventKey"]);
2472
2473
 
2473
- var contextEventKey = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"])(AccordionContext);
2474
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Collapse, _extends({
2474
+ var contextEventKey = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"])(AccordionContext); // Empty SelectableContext is to prevent elements in the collapse
2475
+ // from collapsing the accordion when clicked.
2476
+
2477
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_SelectableContext.Provider, {
2478
+ value: null,
2479
+ __self: AccordionCollapse_this,
2480
+ __source: {
2481
+ fileName: AccordionCollapse_jsxFileName,
2482
+ lineNumber: 36,
2483
+ columnNumber: 7
2484
+ }
2485
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Collapse, _extends({
2475
2486
  ref: ref,
2476
2487
  in: contextEventKey === eventKey
2477
2488
  }, props, {
2478
2489
  __self: AccordionCollapse_this,
2479
2490
  __source: {
2480
2491
  fileName: AccordionCollapse_jsxFileName,
2481
- lineNumber: 33,
2482
- columnNumber: 7
2492
+ lineNumber: 37,
2493
+ columnNumber: 9
2483
2494
  }
2484
2495
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
2485
2496
  __self: AccordionCollapse_this,
2486
2497
  __source: {
2487
2498
  fileName: AccordionCollapse_jsxFileName,
2488
- lineNumber: 34,
2489
- columnNumber: 9
2499
+ lineNumber: 38,
2500
+ columnNumber: 11
2490
2501
  }
2491
- }, external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.only(children)));
2502
+ }, external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.only(children))));
2492
2503
  });
2493
2504
  AccordionCollapse.propTypes = AccordionCollapse_propTypes;
2494
2505
  AccordionCollapse.displayName = 'AccordionCollapse';
@@ -2700,7 +2711,7 @@ var Fade = external_root_React_commonjs2_react_commonjs_react_amd_react_default.
2700
2711
  __self: Fade_this,
2701
2712
  __source: {
2702
2713
  fileName: Fade_jsxFileName,
2703
- lineNumber: 99,
2714
+ lineNumber: 101,
2704
2715
  columnNumber: 7
2705
2716
  }
2706
2717
  }), function (status, innerProps) {
@@ -3390,7 +3401,7 @@ var Button_Button = external_root_React_commonjs2_react_commonjs_react_amd_react
3390
3401
  props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "variant", "size", "active", "className", "block", "type", "as"]);
3391
3402
 
3392
3403
  var prefix = useBootstrapPrefix(bsPrefix, 'btn');
3393
- var classes = classnames_default()(className, prefix, active && 'active', prefix + "-" + variant, block && prefix + "-block", size && prefix + "-" + size);
3404
+ var classes = classnames_default()(className, prefix, active && 'active', variant && prefix + "-" + variant, block && prefix + "-block", size && prefix + "-" + size);
3394
3405
 
3395
3406
  if (props.href) {
3396
3407
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_SafeAnchor, _extends({}, props, {
@@ -3923,7 +3934,49 @@ function useTimeout() {
3923
3934
  /* harmony default export */ var CarouselCaption = (createWithBsPrefix('carousel-caption'));
3924
3935
  // CONCATENATED MODULE: ./src/CarouselItem.tsx
3925
3936
 
3926
- /* harmony default export */ var CarouselItem = (createWithBsPrefix('carousel-item'));
3937
+
3938
+
3939
+ var CarouselItem_this = undefined,
3940
+ CarouselItem_jsxFileName = "/Users/jquense/src/react-bootstrap/src/CarouselItem.tsx";
3941
+
3942
+
3943
+
3944
+
3945
+
3946
+ var CarouselItem_propTypes = {
3947
+ /** Set a custom element for this component */
3948
+ as: prop_types_default.a.elementType,
3949
+
3950
+ /** @default 'carousel-item' */
3951
+ bsPrefix: prop_types_default.a.string,
3952
+
3953
+ /** The amount of time to delay between automatically cycling this specific item. Will default to the Carousel's `interval` prop value if none is specified. */
3954
+ interval: prop_types_default.a.number
3955
+ };
3956
+ var CarouselItem = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef(function (_ref, ref) {
3957
+ var _ref$as = _ref.as,
3958
+ Component = _ref$as === void 0 ? 'div' : _ref$as,
3959
+ bsPrefix = _ref.bsPrefix,
3960
+ children = _ref.children,
3961
+ className = _ref.className,
3962
+ props = _objectWithoutPropertiesLoose(_ref, ["as", "bsPrefix", "children", "className"]);
3963
+
3964
+ var finalClassName = classnames_default()(className, useBootstrapPrefix(bsPrefix, 'carousel-item'));
3965
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, _extends({
3966
+ ref: ref
3967
+ }, props, {
3968
+ className: finalClassName,
3969
+ __self: CarouselItem_this,
3970
+ __source: {
3971
+ fileName: CarouselItem_jsxFileName,
3972
+ lineNumber: 44,
3973
+ columnNumber: 7
3974
+ }
3975
+ }), children);
3976
+ });
3977
+ CarouselItem.displayName = 'CarouselItem';
3978
+ CarouselItem.propTypes = CarouselItem_propTypes;
3979
+ /* harmony default export */ var src_CarouselItem = (CarouselItem);
3927
3980
  // CONCATENATED MODULE: ./src/ElementChildren.tsx
3928
3981
 
3929
3982
  /**
@@ -3976,6 +4029,7 @@ var Carousel_jsxFileName = "/Users/jquense/src/react-bootstrap/src/Carousel.tsx"
3976
4029
 
3977
4030
 
3978
4031
 
4032
+
3979
4033
  var SWIPE_THRESHOLD = 40;
3980
4034
  var Carousel_propTypes = {
3981
4035
  /**
@@ -4096,7 +4150,7 @@ var Carousel_defaultProps = {
4096
4150
  __self: undefined,
4097
4151
  __source: {
4098
4152
  fileName: Carousel_jsxFileName,
4099
- lineNumber: 182,
4153
+ lineNumber: 183,
4100
4154
  columnNumber: 13
4101
4155
  }
4102
4156
  }),
@@ -4107,7 +4161,7 @@ var Carousel_defaultProps = {
4107
4161
  __self: undefined,
4108
4162
  __source: {
4109
4163
  fileName: Carousel_jsxFileName,
4110
- lineNumber: 185,
4164
+ lineNumber: 186,
4111
4165
  columnNumber: 13
4112
4166
  }
4113
4167
  }),
@@ -4177,7 +4231,6 @@ function CarouselFunc(uncontrolledProps, ref) {
4177
4231
  if (!isSliding && activeIndex !== renderedActiveIndex) {
4178
4232
  if (nextDirectionRef.current) {
4179
4233
  setDirection(nextDirectionRef.current);
4180
- nextDirectionRef.current = null;
4181
4234
  } else {
4182
4235
  setDirection((activeIndex || 0) > renderedActiveIndex ? 'next' : 'prev');
4183
4236
  }
@@ -4189,7 +4242,23 @@ function CarouselFunc(uncontrolledProps, ref) {
4189
4242
  setRenderedActiveIndex(activeIndex || 0);
4190
4243
  }
4191
4244
 
4192
- var numChildren = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children).filter(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement).length;
4245
+ Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"])(function () {
4246
+ if (nextDirectionRef.current) {
4247
+ nextDirectionRef.current = null;
4248
+ }
4249
+ });
4250
+ var numChildren = 0;
4251
+ var activeChildInterval; // Iterate to grab all of the children's interval values
4252
+ // (and count them, too)
4253
+
4254
+ forEach(children, function (child, index) {
4255
+ ++numChildren;
4256
+
4257
+ if (index === activeIndex) {
4258
+ activeChildInterval = child.props.interval;
4259
+ }
4260
+ });
4261
+ var activeChildIntervalRef = esm_useCommittedRef(activeChildInterval);
4193
4262
  var prev = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"])(function (event) {
4194
4263
  if (isSliding) {
4195
4264
  return;
@@ -4377,17 +4446,19 @@ function CarouselFunc(uncontrolledProps, ref) {
4377
4446
  var shouldPlay = interval != null && !pausedOnHover && !pausedOnTouch && !isSliding;
4378
4447
  var intervalHandleRef = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"])();
4379
4448
  Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"])(function () {
4449
+ var _ref, _activeChildIntervalR;
4450
+
4380
4451
  if (!shouldPlay) {
4381
4452
  return undefined;
4382
4453
  }
4383
4454
 
4384
- intervalHandleRef.current = window.setInterval(document.visibilityState ? nextWhenVisible : next, interval || undefined);
4455
+ intervalHandleRef.current = window.setInterval(document.visibilityState ? nextWhenVisible : next, (_ref = (_activeChildIntervalR = activeChildIntervalRef.current) != null ? _activeChildIntervalR : interval) != null ? _ref : undefined);
4385
4456
  return function () {
4386
4457
  if (intervalHandleRef.current !== null) {
4387
4458
  clearInterval(intervalHandleRef.current);
4388
4459
  }
4389
4460
  };
4390
- }, [shouldPlay, next, interval, nextWhenVisible]);
4461
+ }, [shouldPlay, next, activeChildIntervalRef, interval, nextWhenVisible]);
4391
4462
  var indicatorOnClicks = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(function () {
4392
4463
  return indicators && Array.from({
4393
4464
  length: numChildren
@@ -4412,7 +4483,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4412
4483
  __self: this,
4413
4484
  __source: {
4414
4485
  fileName: Carousel_jsxFileName,
4415
- lineNumber: 514,
4486
+ lineNumber: 530,
4416
4487
  columnNumber: 5
4417
4488
  }
4418
4489
  }), indicators && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ol", {
@@ -4420,7 +4491,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4420
4491
  __self: this,
4421
4492
  __source: {
4422
4493
  fileName: Carousel_jsxFileName,
4423
- lineNumber: 531,
4494
+ lineNumber: 547,
4424
4495
  columnNumber: 9
4425
4496
  }
4426
4497
  }, map(children, function (_child, index) {
@@ -4431,7 +4502,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4431
4502
  __self: _this,
4432
4503
  __source: {
4433
4504
  fileName: Carousel_jsxFileName,
4434
- lineNumber: 533,
4505
+ lineNumber: 549,
4435
4506
  columnNumber: 13
4436
4507
  }
4437
4508
  });
@@ -4440,7 +4511,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4440
4511
  __self: this,
4441
4512
  __source: {
4442
4513
  fileName: Carousel_jsxFileName,
4443
- lineNumber: 542,
4514
+ lineNumber: 558,
4444
4515
  columnNumber: 7
4445
4516
  }
4446
4517
  }, map(children, function (child, index) {
@@ -4453,7 +4524,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4453
4524
  __self: _this,
4454
4525
  __source: {
4455
4526
  fileName: Carousel_jsxFileName,
4456
- lineNumber: 547,
4527
+ lineNumber: 563,
4457
4528
  columnNumber: 13
4458
4529
  }
4459
4530
  }, function (status) {
@@ -4469,7 +4540,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4469
4540
  __self: this,
4470
4541
  __source: {
4471
4542
  fileName: Carousel_jsxFileName,
4472
- lineNumber: 579,
4543
+ lineNumber: 595,
4473
4544
  columnNumber: 13
4474
4545
  }
4475
4546
  }, prevIcon, prevLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
@@ -4477,7 +4548,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4477
4548
  __self: this,
4478
4549
  __source: {
4479
4550
  fileName: Carousel_jsxFileName,
4480
- lineNumber: 581,
4551
+ lineNumber: 597,
4481
4552
  columnNumber: 29
4482
4553
  }
4483
4554
  }, prevLabel)), (wrap || activeIndex !== numChildren - 1) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_SafeAnchor, {
@@ -4486,7 +4557,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4486
4557
  __self: this,
4487
4558
  __source: {
4488
4559
  fileName: Carousel_jsxFileName,
4489
- lineNumber: 585,
4560
+ lineNumber: 601,
4490
4561
  columnNumber: 13
4491
4562
  }
4492
4563
  }, nextIcon, nextLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
@@ -4494,7 +4565,7 @@ function CarouselFunc(uncontrolledProps, ref) {
4494
4565
  __self: this,
4495
4566
  __source: {
4496
4567
  fileName: Carousel_jsxFileName,
4497
- lineNumber: 587,
4568
+ lineNumber: 603,
4498
4569
  columnNumber: 29
4499
4570
  }
4500
4571
  }, nextLabel))));
@@ -4505,7 +4576,7 @@ Carousel.displayName = 'Carousel';
4505
4576
  Carousel.propTypes = Carousel_propTypes;
4506
4577
  Carousel.defaultProps = Carousel_defaultProps;
4507
4578
  Carousel.Caption = CarouselCaption;
4508
- Carousel.Item = CarouselItem;
4579
+ Carousel.Item = src_CarouselItem;
4509
4580
  /* harmony default export */ var src_Carousel = (Carousel);
4510
4581
  // CONCATENATED MODULE: ./src/Col.tsx
4511
4582
 
@@ -6609,7 +6680,7 @@ function contains_contains(context, node) {
6609
6680
  if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);
6610
6681
  }
6611
6682
  // EXTERNAL MODULE: ./node_modules/warning/warning.js
6612
- var warning = __webpack_require__(5);
6683
+ var warning = __webpack_require__(4);
6613
6684
  var warning_default = /*#__PURE__*/__webpack_require__.n(warning);
6614
6685
 
6615
6686
  // CONCATENATED MODULE: ./node_modules/react-overlays/esm/safeFindDOMNode.js
@@ -7369,9 +7440,10 @@ var DropdownItem = external_root_React_commonjs2_react_commonjs_react_amd_react_
7369
7440
  var navContext = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"])(src_NavContext);
7370
7441
 
7371
7442
  var _ref2 = navContext || {},
7372
- activeKey = _ref2.activeKey;
7443
+ activeKey = _ref2.activeKey; // TODO: Restrict eventKey to string in v5?
7444
+
7373
7445
 
7374
- var key = makeEventKey(eventKey || null, href);
7446
+ var key = makeEventKey(eventKey, href);
7375
7447
  var active = propActive == null && key != null ? makeEventKey(activeKey) === key : propActive;
7376
7448
  var handleClick = useEventCallback(function (event) {
7377
7449
  // SafeAnchor handles the disabled case, but we handle it here
@@ -7394,7 +7466,7 @@ var DropdownItem = external_root_React_commonjs2_react_commonjs_react_amd_react_
7394
7466
  __self: DropdownItem_this,
7395
7467
  __source: {
7396
7468
  fileName: DropdownItem_jsxFileName,
7397
- lineNumber: 117,
7469
+ lineNumber: 118,
7398
7470
  columnNumber: 7
7399
7471
  }
7400
7472
  }), children)
@@ -7474,6 +7546,7 @@ function hasClass(element, className) {
7474
7546
 
7475
7547
 
7476
7548
 
7549
+
7477
7550
  function getMargins(element) {
7478
7551
  var styles = window.getComputedStyle(element);
7479
7552
  var top = parseFloat(styles.marginTop) || 0;
@@ -7491,12 +7564,14 @@ function getMargins(element) {
7491
7564
  function usePopperMarginModifiers() {
7492
7565
  var overlayRef = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"])(null);
7493
7566
  var margins = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"])(null);
7567
+ var popoverClass = useBootstrapPrefix(undefined, 'popover');
7568
+ var dropdownMenuClass = useBootstrapPrefix(undefined, 'dropdown-menu');
7494
7569
  var callback = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"])(function (overlay) {
7495
- if (!overlay || !(hasClass(overlay, 'popover') || hasClass(overlay, 'dropdown-menu'))) return;
7570
+ if (!overlay || !(hasClass(overlay, popoverClass) || hasClass(overlay, dropdownMenuClass))) return;
7496
7571
  margins.current = getMargins(overlay);
7497
7572
  overlay.style.margin = '0';
7498
7573
  overlayRef.current = overlay;
7499
- }, []);
7574
+ }, [popoverClass, dropdownMenuClass]);
7500
7575
  var offset = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(function () {
7501
7576
  return {
7502
7577
  name: 'offset',
@@ -7540,7 +7615,7 @@ function usePopperMarginModifiers() {
7540
7615
  effect: function effect(_ref2) {
7541
7616
  var state = _ref2.state;
7542
7617
 
7543
- if (!overlayRef.current || !state.elements.arrow || !hasClass(overlayRef.current, 'popover') || !state.modifiersData['arrow#persistent']) {
7618
+ if (!overlayRef.current || !state.elements.arrow || !hasClass(overlayRef.current, popoverClass) || !state.modifiersData['arrow#persistent']) {
7544
7619
  return undefined;
7545
7620
  }
7546
7621
 
@@ -7561,7 +7636,7 @@ function usePopperMarginModifiers() {
7561
7636
  };
7562
7637
  }
7563
7638
  };
7564
- }, []);
7639
+ }, [popoverClass]);
7565
7640
  return [callback, [offset, popoverArrowMargins]];
7566
7641
  }
7567
7642
  // CONCATENATED MODULE: ./src/DropdownMenu.tsx
@@ -7580,6 +7655,17 @@ var DropdownMenu_this = undefined,
7580
7655
 
7581
7656
 
7582
7657
 
7658
+
7659
+ var alignDirection = prop_types_default.a.oneOf(['left', 'right']);
7660
+ var alignPropType = prop_types_default.a.oneOfType([alignDirection, prop_types_default.a.shape({
7661
+ sm: alignDirection
7662
+ }), prop_types_default.a.shape({
7663
+ md: alignDirection
7664
+ }), prop_types_default.a.shape({
7665
+ lg: alignDirection
7666
+ }), prop_types_default.a.shape({
7667
+ xl: alignDirection
7668
+ })]);
7583
7669
  var src_DropdownMenu_propTypes = {
7584
7670
  /**
7585
7671
  * @default 'dropdown-menu'
@@ -7595,7 +7681,22 @@ var src_DropdownMenu_propTypes = {
7595
7681
  /** Have the dropdown switch to it's opposite placement when necessary to stay on screen. */
7596
7682
  flip: prop_types_default.a.bool,
7597
7683
 
7598
- /** Aligns the Dropdown menu to the right of it's container. */
7684
+ /**
7685
+ * Aligns the dropdown menu to the specified side of the container. You can also align
7686
+ * the menu responsively for breakpoints starting at `sm` and up. The alignment
7687
+ * direction will affect the specified breakpoint or larger.
7688
+ *
7689
+ * *Note: Using responsive alignment will disable Popper usage for positioning.*
7690
+ *
7691
+ * @type {"left"|"right"|{ sm: "left"|"right" }|{ md: "left"|"right" }|{ lg: "left"|"right" }|{ xl: "left"|"right"} }
7692
+ */
7693
+ align: alignPropType,
7694
+
7695
+ /**
7696
+ * Aligns the Dropdown menu to the right of it's container.
7697
+ *
7698
+ * @deprecated Use align="right"
7699
+ */
7599
7700
  alignRight: prop_types_default.a.bool,
7600
7701
  onSelect: prop_types_default.a.func,
7601
7702
 
@@ -7623,6 +7724,7 @@ var src_DropdownMenu_propTypes = {
7623
7724
  popperConfig: prop_types_default.a.object
7624
7725
  };
7625
7726
  var src_DropdownMenu_defaultProps = {
7727
+ align: 'left',
7626
7728
  alignRight: false,
7627
7729
  flip: true
7628
7730
  }; // TODO: remove this hack
@@ -7630,6 +7732,7 @@ var src_DropdownMenu_defaultProps = {
7630
7732
  var DropdownMenu_DropdownMenu = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef(function (_ref, ref) {
7631
7733
  var bsPrefix = _ref.bsPrefix,
7632
7734
  className = _ref.className,
7735
+ align = _ref.align,
7633
7736
  alignRight = _ref.alignRight,
7634
7737
  rootCloseEvent = _ref.rootCloseEvent,
7635
7738
  flip = _ref.flip,
@@ -7638,7 +7741,7 @@ var DropdownMenu_DropdownMenu = external_root_React_commonjs2_react_commonjs_rea
7638
7741
  _ref$as = _ref.as,
7639
7742
  Component = _ref$as === void 0 ? 'div' : _ref$as,
7640
7743
  popperConfig = _ref.popperConfig,
7641
- props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "alignRight", "rootCloseEvent", "flip", "show", "renderOnMount", "as", "popperConfig"]);
7744
+ props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "align", "alignRight", "rootCloseEvent", "flip", "show", "renderOnMount", "as", "popperConfig"]);
7642
7745
 
7643
7746
  var isNavbar = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"])(NavbarContext);
7644
7747
  var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-menu');
@@ -7647,12 +7750,33 @@ var DropdownMenu_DropdownMenu = external_root_React_commonjs2_react_commonjs_rea
7647
7750
  popperRef = _usePopperMarginModif[0],
7648
7751
  marginModifiers = _usePopperMarginModif[1];
7649
7752
 
7753
+ var alignClasses = [];
7754
+
7755
+ if (align) {
7756
+ if (typeof align === 'object') {
7757
+ var keys = Object.keys(align);
7758
+ false ? undefined : void 0;
7759
+
7760
+ if (keys.length) {
7761
+ var brkPoint = keys[0];
7762
+ var direction = align[brkPoint]; // .dropdown-menu-right is required for responsively aligning
7763
+ // left in addition to align left classes.
7764
+ // Reuse alignRight to toggle the class below.
7765
+
7766
+ alignRight = direction === 'left';
7767
+ alignClasses.push(prefix + "-" + brkPoint + "-" + direction);
7768
+ }
7769
+ } else if (align === 'right') {
7770
+ alignRight = true;
7771
+ }
7772
+ }
7773
+
7650
7774
  var _ref2 = useDropdownMenu({
7651
7775
  flip: flip,
7652
7776
  rootCloseEvent: rootCloseEvent,
7653
7777
  show: showProps,
7654
7778
  alignEnd: alignRight,
7655
- usePopper: !isNavbar,
7779
+ usePopper: !isNavbar && alignClasses.length === 0,
7656
7780
  popperConfig: _extends({}, popperConfig, {
7657
7781
  modifiers: marginModifiers.concat((popperConfig == null ? void 0 : popperConfig.modifiers) || [])
7658
7782
  })
@@ -7681,11 +7805,11 @@ var DropdownMenu_DropdownMenu = external_root_React_commonjs2_react_commonjs_rea
7681
7805
  }
7682
7806
 
7683
7807
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, _extends({}, props, menuProps, {
7684
- className: classnames_default()(className, prefix, show && 'show', alignEnd && prefix + "-right"),
7808
+ className: classnames_default.a.apply(void 0, [className, prefix, show && 'show', alignEnd && prefix + "-right"].concat(alignClasses)),
7685
7809
  __self: DropdownMenu_this,
7686
7810
  __source: {
7687
7811
  fileName: DropdownMenu_jsxFileName,
7688
- lineNumber: 147,
7812
+ lineNumber: 215,
7689
7813
  columnNumber: 7
7690
7814
  }
7691
7815
  }));
@@ -7739,11 +7863,10 @@ var DropdownToggle_DropdownToggle = external_root_React_commonjs2_react_commonjs
7739
7863
  var bsPrefix = _ref.bsPrefix,
7740
7864
  split = _ref.split,
7741
7865
  className = _ref.className,
7742
- children = _ref.children,
7743
7866
  childBsPrefix = _ref.childBsPrefix,
7744
7867
  _ref$as = _ref.as,
7745
7868
  Component = _ref$as === void 0 ? src_Button : _ref$as,
7746
- props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "split", "className", "children", "childBsPrefix", "as"]);
7869
+ props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "split", "className", "childBsPrefix", "as"]);
7747
7870
 
7748
7871
  var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');
7749
7872
 
@@ -7765,10 +7888,10 @@ var DropdownToggle_DropdownToggle = external_root_React_commonjs2_react_commonjs
7765
7888
  __self: DropdownToggle_this,
7766
7889
  __source: {
7767
7890
  fileName: DropdownToggle_jsxFileName,
7768
- lineNumber: 86,
7891
+ lineNumber: 85,
7769
7892
  columnNumber: 7
7770
7893
  }
7771
- }), children);
7894
+ }));
7772
7895
  });
7773
7896
  DropdownToggle_DropdownToggle.displayName = 'DropdownToggle';
7774
7897
  DropdownToggle_DropdownToggle.propTypes = src_DropdownToggle_propTypes;
@@ -7991,6 +8114,15 @@ var DropdownButton_propTypes = {
7991
8114
  /** Disables both Buttons */
7992
8115
  disabled: prop_types_default.a.bool,
7993
8116
 
8117
+ /**
8118
+ * Aligns the dropdown menu responsively.
8119
+ *
8120
+ * _see [DropdownMenu](#dropdown-menu-props) for more details_
8121
+ *
8122
+ * @type {"left"|"right"|{ sm: "left"|"right" }|{ md: "left"|"right" }|{ lg: "left"|"right" }|{ xl: "left"|"right"} }
8123
+ */
8124
+ menuAlign: alignPropType,
8125
+
7994
8126
  /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
7995
8127
  menuRole: prop_types_default.a.string,
7996
8128
 
@@ -8000,7 +8132,7 @@ var DropdownButton_propTypes = {
8000
8132
  /**
8001
8133
  * Which event when fired outside the component will cause it to be closed.
8002
8134
  *
8003
- * _see [DropdownMenu](#menu-props) for more details_
8135
+ * _see [DropdownMenu](#dropdown-menu-props) for more details_
8004
8136
  */
8005
8137
  rootCloseEvent: prop_types_default.a.string,
8006
8138
 
@@ -8029,12 +8161,13 @@ var DropdownButton = external_root_React_commonjs2_react_commonjs_react_amd_reac
8029
8161
  rootCloseEvent = _ref.rootCloseEvent,
8030
8162
  variant = _ref.variant,
8031
8163
  size = _ref.size,
8164
+ menuAlign = _ref.menuAlign,
8032
8165
  menuRole = _ref.menuRole,
8033
8166
  renderMenuOnMount = _ref.renderMenuOnMount,
8034
8167
  disabled = _ref.disabled,
8035
8168
  href = _ref.href,
8036
8169
  id = _ref.id,
8037
- props = _objectWithoutPropertiesLoose(_ref, ["title", "children", "bsPrefix", "rootCloseEvent", "variant", "size", "menuRole", "renderMenuOnMount", "disabled", "href", "id"]);
8170
+ props = _objectWithoutPropertiesLoose(_ref, ["title", "children", "bsPrefix", "rootCloseEvent", "variant", "size", "menuAlign", "menuRole", "renderMenuOnMount", "disabled", "href", "id"]);
8038
8171
 
8039
8172
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Dropdown, _extends({
8040
8173
  ref: ref
@@ -8042,7 +8175,7 @@ var DropdownButton = external_root_React_commonjs2_react_commonjs_react_amd_reac
8042
8175
  __self: DropdownButton_this,
8043
8176
  __source: {
8044
8177
  fileName: DropdownButton_jsxFileName,
8045
- lineNumber: 86,
8178
+ lineNumber: 97,
8046
8179
  columnNumber: 5
8047
8180
  }
8048
8181
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_DropdownToggle, {
@@ -8055,17 +8188,18 @@ var DropdownButton = external_root_React_commonjs2_react_commonjs_react_amd_reac
8055
8188
  __self: DropdownButton_this,
8056
8189
  __source: {
8057
8190
  fileName: DropdownButton_jsxFileName,
8058
- lineNumber: 87,
8191
+ lineNumber: 98,
8059
8192
  columnNumber: 7
8060
8193
  }
8061
8194
  }, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_DropdownMenu, {
8195
+ align: menuAlign,
8062
8196
  role: menuRole,
8063
8197
  renderOnMount: renderMenuOnMount,
8064
8198
  rootCloseEvent: rootCloseEvent,
8065
8199
  __self: DropdownButton_this,
8066
8200
  __source: {
8067
8201
  fileName: DropdownButton_jsxFileName,
8068
- lineNumber: 97,
8202
+ lineNumber: 108,
8069
8203
  columnNumber: 7
8070
8204
  }
8071
8205
  }, children));
@@ -8326,7 +8460,13 @@ var FormCheck_propTypes = {
8326
8460
  */
8327
8461
  as: prop_types_default.a.elementType,
8328
8462
 
8329
- /** A HTML id attribute, necessary for proper form accessibility. */
8463
+ /**
8464
+ * A HTML id attribute, necessary for proper form accessibility.
8465
+ * An id is recommended for allowing label clicks to toggle the check control.
8466
+ *
8467
+ * This is **required** for custom check controls or when `type="switch"` due to
8468
+ * how they are rendered.
8469
+ */
8330
8470
  id: prop_types_default.a.string,
8331
8471
 
8332
8472
  /**
@@ -8341,22 +8481,46 @@ var FormCheck_propTypes = {
8341
8481
  * ```
8342
8482
  */
8343
8483
  children: prop_types_default.a.node,
8484
+
8485
+ /**
8486
+ * Groups controls horizontally with other `FormCheck`s.
8487
+ */
8344
8488
  inline: prop_types_default.a.bool,
8489
+
8490
+ /**
8491
+ * Disables the control.
8492
+ */
8345
8493
  disabled: prop_types_default.a.bool,
8494
+
8495
+ /**
8496
+ * `title` attribute for the underlying `FormCheckLabel`.
8497
+ */
8346
8498
  title: prop_types_default.a.string,
8499
+
8500
+ /**
8501
+ * Label for the control.
8502
+ */
8347
8503
  label: prop_types_default.a.node,
8348
8504
 
8349
8505
  /** Use Bootstrap's custom form elements to replace the browser defaults */
8350
- custom: prop_types_default.a.bool,
8506
+ custom: all_default()(prop_types_default.a.bool, function (_ref) {
8507
+ var custom = _ref.custom,
8508
+ id = _ref.id;
8509
+ return custom && !id ? Error('Custom check controls require an id to work') : null;
8510
+ }),
8351
8511
 
8352
8512
  /**
8353
8513
  * The type of checkable.
8354
8514
  * @type {('radio' | 'checkbox' | 'switch')}
8355
8515
  */
8356
- type: all_default()(prop_types_default.a.oneOf(['radio', 'checkbox', 'switch']).isRequired, function (_ref) {
8357
- var type = _ref.type,
8358
- custom = _ref.custom;
8516
+ type: all_default()(prop_types_default.a.oneOf(['radio', 'checkbox', 'switch']).isRequired, function (_ref2) {
8517
+ var type = _ref2.type,
8518
+ custom = _ref2.custom;
8359
8519
  return type === 'switch' && custom === false ? Error('`custom` cannot be set to `false` when the type is `switch`') : null;
8520
+ }, function (_ref3) {
8521
+ var type = _ref3.type,
8522
+ id = _ref3.id;
8523
+ return type === 'switch' && !id ? Error('`id` must be defined when the type is `switch`') : null;
8360
8524
  }),
8361
8525
 
8362
8526
  /** Manually style the input as valid */
@@ -8371,39 +8535,39 @@ var FormCheck_propTypes = {
8371
8535
  /** A message to display when the input is in a validation state */
8372
8536
  feedback: prop_types_default.a.node
8373
8537
  };
8374
- var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef(function (_ref2, ref) {
8375
- var id = _ref2.id,
8376
- bsPrefix = _ref2.bsPrefix,
8377
- bsCustomPrefix = _ref2.bsCustomPrefix,
8378
- _ref2$inline = _ref2.inline,
8379
- inline = _ref2$inline === void 0 ? false : _ref2$inline,
8380
- _ref2$disabled = _ref2.disabled,
8381
- disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
8382
- _ref2$isValid = _ref2.isValid,
8383
- isValid = _ref2$isValid === void 0 ? false : _ref2$isValid,
8384
- _ref2$isInvalid = _ref2.isInvalid,
8385
- isInvalid = _ref2$isInvalid === void 0 ? false : _ref2$isInvalid,
8386
- _ref2$feedbackTooltip = _ref2.feedbackTooltip,
8387
- feedbackTooltip = _ref2$feedbackTooltip === void 0 ? false : _ref2$feedbackTooltip,
8388
- feedback = _ref2.feedback,
8389
- className = _ref2.className,
8390
- style = _ref2.style,
8391
- _ref2$title = _ref2.title,
8392
- title = _ref2$title === void 0 ? '' : _ref2$title,
8393
- _ref2$type = _ref2.type,
8394
- type = _ref2$type === void 0 ? 'checkbox' : _ref2$type,
8395
- label = _ref2.label,
8396
- children = _ref2.children,
8397
- propCustom = _ref2.custom,
8398
- _ref2$as = _ref2.as,
8399
- as = _ref2$as === void 0 ? 'input' : _ref2$as,
8400
- props = _objectWithoutPropertiesLoose(_ref2, ["id", "bsPrefix", "bsCustomPrefix", "inline", "disabled", "isValid", "isInvalid", "feedbackTooltip", "feedback", "className", "style", "title", "type", "label", "children", "custom", "as"]);
8538
+ var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef(function (_ref4, ref) {
8539
+ var id = _ref4.id,
8540
+ bsPrefix = _ref4.bsPrefix,
8541
+ bsCustomPrefix = _ref4.bsCustomPrefix,
8542
+ _ref4$inline = _ref4.inline,
8543
+ inline = _ref4$inline === void 0 ? false : _ref4$inline,
8544
+ _ref4$disabled = _ref4.disabled,
8545
+ disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
8546
+ _ref4$isValid = _ref4.isValid,
8547
+ isValid = _ref4$isValid === void 0 ? false : _ref4$isValid,
8548
+ _ref4$isInvalid = _ref4.isInvalid,
8549
+ isInvalid = _ref4$isInvalid === void 0 ? false : _ref4$isInvalid,
8550
+ _ref4$feedbackTooltip = _ref4.feedbackTooltip,
8551
+ feedbackTooltip = _ref4$feedbackTooltip === void 0 ? false : _ref4$feedbackTooltip,
8552
+ feedback = _ref4.feedback,
8553
+ className = _ref4.className,
8554
+ style = _ref4.style,
8555
+ _ref4$title = _ref4.title,
8556
+ title = _ref4$title === void 0 ? '' : _ref4$title,
8557
+ _ref4$type = _ref4.type,
8558
+ type = _ref4$type === void 0 ? 'checkbox' : _ref4$type,
8559
+ label = _ref4.label,
8560
+ children = _ref4.children,
8561
+ propCustom = _ref4.custom,
8562
+ _ref4$as = _ref4.as,
8563
+ as = _ref4$as === void 0 ? 'input' : _ref4$as,
8564
+ props = _objectWithoutPropertiesLoose(_ref4, ["id", "bsPrefix", "bsCustomPrefix", "inline", "disabled", "isValid", "isInvalid", "feedbackTooltip", "feedback", "className", "style", "title", "type", "label", "children", "custom", "as"]);
8401
8565
 
8402
8566
  var custom = type === 'switch' ? true : propCustom;
8403
8567
 
8404
- var _ref3 = custom ? [bsCustomPrefix, 'custom-control'] : [bsPrefix, 'form-check'],
8405
- prefix = _ref3[0],
8406
- defaultPrefix = _ref3[1];
8568
+ var _ref5 = custom ? [bsCustomPrefix, 'custom-control'] : [bsPrefix, 'form-check'],
8569
+ prefix = _ref5[0],
8570
+ defaultPrefix = _ref5[1];
8407
8571
 
8408
8572
  bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);
8409
8573
 
@@ -8416,7 +8580,7 @@ var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_def
8416
8580
  custom: custom
8417
8581
  };
8418
8582
  }, [controlId, custom, id]);
8419
- var hasLabel = label != null && label !== false && !children;
8583
+ var hasLabel = custom || label != null && label !== false && !children;
8420
8584
  var input = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_FormCheckInput, _extends({}, props, {
8421
8585
  type: type === 'switch' ? 'checkbox' : type,
8422
8586
  ref: ref,
@@ -8428,7 +8592,7 @@ var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_def
8428
8592
  __self: FormCheck_this,
8429
8593
  __source: {
8430
8594
  fileName: FormCheck_jsxFileName,
8431
- lineNumber: 161,
8595
+ lineNumber: 186,
8432
8596
  columnNumber: 7
8433
8597
  }
8434
8598
  }));
@@ -8437,7 +8601,7 @@ var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_def
8437
8601
  __self: FormCheck_this,
8438
8602
  __source: {
8439
8603
  fileName: FormCheck_jsxFileName,
8440
- lineNumber: 174,
8604
+ lineNumber: 199,
8441
8605
  columnNumber: 7
8442
8606
  }
8443
8607
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
@@ -8446,7 +8610,7 @@ var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_def
8446
8610
  __self: FormCheck_this,
8447
8611
  __source: {
8448
8612
  fileName: FormCheck_jsxFileName,
8449
- lineNumber: 175,
8613
+ lineNumber: 200,
8450
8614
  columnNumber: 9
8451
8615
  }
8452
8616
  }, children || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, input, hasLabel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_FormCheckLabel, {
@@ -8454,7 +8618,7 @@ var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_def
8454
8618
  __self: FormCheck_this,
8455
8619
  __source: {
8456
8620
  fileName: FormCheck_jsxFileName,
8457
- lineNumber: 188,
8621
+ lineNumber: 213,
8458
8622
  columnNumber: 17
8459
8623
  }
8460
8624
  }, label), (isValid || isInvalid) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Feedback, {
@@ -8463,7 +8627,7 @@ var FormCheck = external_root_React_commonjs2_react_commonjs_react_amd_react_def
8463
8627
  __self: FormCheck_this,
8464
8628
  __source: {
8465
8629
  fileName: FormCheck_jsxFileName,
8466
- lineNumber: 191,
8630
+ lineNumber: 216,
8467
8631
  columnNumber: 17
8468
8632
  }
8469
8633
  }, feedback))));
@@ -9148,7 +9312,7 @@ var FormLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_def
9148
9312
 
9149
9313
  bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');
9150
9314
  var columnClass = 'col-form-label';
9151
- if (typeof column === 'string') columnClass = columnClass + "-" + column;
9315
+ if (typeof column === 'string') columnClass = columnClass + " " + columnClass + "-" + column;
9152
9316
  var classes = classnames_default()(className, bsPrefix, srOnly && 'sr-only', column && columnClass);
9153
9317
  false ? undefined : void 0;
9154
9318
  htmlFor = htmlFor || controlId;
@@ -9160,7 +9324,7 @@ var FormLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_def
9160
9324
  __self: FormLabel_this,
9161
9325
  __source: {
9162
9326
  fileName: FormLabel_jsxFileName,
9163
- lineNumber: 108,
9327
+ lineNumber: 110,
9164
9328
  columnNumber: 9
9165
9329
  }
9166
9330
  }));
@@ -9175,7 +9339,7 @@ var FormLabel = external_root_React_commonjs2_react_commonjs_react_amd_react_def
9175
9339
  __self: FormLabel_this,
9176
9340
  __source: {
9177
9341
  fileName: FormLabel_jsxFileName,
9178
- lineNumber: 113,
9342
+ lineNumber: 115,
9179
9343
  columnNumber: 7
9180
9344
  }
9181
9345
  }))
@@ -10016,7 +10180,8 @@ var ListGroupItem = external_root_React_commonjs2_react_commonjs_react_amd_react
10016
10180
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_AbstractNavItem, _extends({
10017
10181
  ref: ref
10018
10182
  }, props, {
10019
- eventKey: makeEventKey(eventKey || null, props.href) // eslint-disable-next-line no-nested-ternary
10183
+ // TODO: Restrict eventKey to string in v5?
10184
+ eventKey: makeEventKey(eventKey, props.href) // eslint-disable-next-line no-nested-ternary
10020
10185
  ,
10021
10186
  as: as || (action ? props.href ? 'a' : 'button' : 'div'),
10022
10187
  onClick: handleClick,
@@ -11041,6 +11206,7 @@ var ModalDialog_this = undefined,
11041
11206
  var ModalDialog_propTypes = {
11042
11207
  /** @default 'modal' */
11043
11208
  bsPrefix: prop_types_default.a.string,
11209
+ contentClassName: prop_types_default.a.string,
11044
11210
 
11045
11211
  /**
11046
11212
  * Render a large, extra large or small modal.
@@ -11062,11 +11228,12 @@ var ModalDialog_propTypes = {
11062
11228
  var ModalDialog = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef(function (_ref, ref) {
11063
11229
  var bsPrefix = _ref.bsPrefix,
11064
11230
  className = _ref.className,
11231
+ contentClassName = _ref.contentClassName,
11065
11232
  centered = _ref.centered,
11066
11233
  size = _ref.size,
11067
11234
  children = _ref.children,
11068
11235
  scrollable = _ref.scrollable,
11069
- props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "centered", "size", "children", "scrollable"]);
11236
+ props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "contentClassName", "centered", "size", "children", "scrollable"]);
11070
11237
 
11071
11238
  bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
11072
11239
  var dialogClass = bsPrefix + "-dialog";
@@ -11076,15 +11243,15 @@ var ModalDialog = external_root_React_commonjs2_react_commonjs_react_amd_react_d
11076
11243
  __self: ModalDialog_this,
11077
11244
  __source: {
11078
11245
  fileName: ModalDialog_jsxFileName,
11079
- lineNumber: 56,
11246
+ lineNumber: 59,
11080
11247
  columnNumber: 7
11081
11248
  }
11082
11249
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
11083
- className: bsPrefix + "-content",
11250
+ className: classnames_default()(bsPrefix + "-content", contentClassName),
11084
11251
  __self: ModalDialog_this,
11085
11252
  __source: {
11086
11253
  fileName: ModalDialog_jsxFileName,
11087
- lineNumber: 67,
11254
+ lineNumber: 70,
11088
11255
  columnNumber: 9
11089
11256
  }
11090
11257
  }, children));
@@ -11221,7 +11388,7 @@ var src_Modal_propTypes = {
11221
11388
 
11222
11389
  /**
11223
11390
  * Render a large, extra large or small modal.
11224
- *
11391
+ * When not provided, the modal is rendered with medium (default) size.
11225
11392
  * @type ('sm'|'lg','xl')
11226
11393
  */
11227
11394
  size: prop_types_default.a.string,
@@ -11263,6 +11430,11 @@ var src_Modal_propTypes = {
11263
11430
  */
11264
11431
  dialogClassName: prop_types_default.a.string,
11265
11432
 
11433
+ /**
11434
+ * Add an optional extra class name to .modal-content
11435
+ */
11436
+ contentClassName: prop_types_default.a.string,
11437
+
11266
11438
  /**
11267
11439
  * A Component type that provides the modal content Markup. This is a useful
11268
11440
  * prop when you want to use your own styles and markup to create a custom
@@ -11380,7 +11552,7 @@ function DialogTransition(props) {
11380
11552
  __self: this,
11381
11553
  __source: {
11382
11554
  fileName: Modal_jsxFileName,
11383
- lineNumber: 228,
11555
+ lineNumber: 234,
11384
11556
  columnNumber: 10
11385
11557
  }
11386
11558
  }));
@@ -11391,7 +11563,7 @@ function Modal_BackdropTransition(props) {
11391
11563
  __self: this,
11392
11564
  __source: {
11393
11565
  fileName: Modal_jsxFileName,
11394
- lineNumber: 232,
11566
+ lineNumber: 238,
11395
11567
  columnNumber: 10
11396
11568
  }
11397
11569
  }));
@@ -11404,6 +11576,7 @@ var Modal_Modal = external_root_React_commonjs2_react_commonjs_react_amd_react_d
11404
11576
  className = _ref.className,
11405
11577
  style = _ref.style,
11406
11578
  dialogClassName = _ref.dialogClassName,
11579
+ contentClassName = _ref.contentClassName,
11407
11580
  children = _ref.children,
11408
11581
  Dialog = _ref.dialogAs,
11409
11582
  ariaLabelledby = _ref['aria-labelledby'],
@@ -11427,7 +11600,7 @@ var Modal_Modal = external_root_React_commonjs2_react_commonjs_react_amd_react_d
11427
11600
  onExited = _ref.onExited,
11428
11601
  backdropClassName = _ref.backdropClassName,
11429
11602
  propsManager = _ref.manager,
11430
- props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "style", "dialogClassName", "children", "dialogAs", "aria-labelledby", "show", "animation", "backdrop", "keyboard", "onEscapeKeyDown", "onShow", "onHide", "container", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "onEntered", "onExit", "onExiting", "onEnter", "onEntering", "onExited", "backdropClassName", "manager"]);
11603
+ props = _objectWithoutPropertiesLoose(_ref, ["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"]);
11431
11604
 
11432
11605
  var _useState = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"])({}),
11433
11606
  modalStyle = _useState[0],
@@ -11598,7 +11771,7 @@ var Modal_Modal = external_root_React_commonjs2_react_commonjs_react_amd_react_d
11598
11771
  __self: Modal_this,
11599
11772
  __source: {
11600
11773
  fileName: Modal_jsxFileName,
11601
- lineNumber: 440,
11774
+ lineNumber: 447,
11602
11775
  columnNumber: 9
11603
11776
  }
11604
11777
  }));
@@ -11623,17 +11796,18 @@ var Modal_Modal = external_root_React_commonjs2_react_commonjs_react_amd_react_d
11623
11796
  __self: Modal_this,
11624
11797
  __source: {
11625
11798
  fileName: Modal_jsxFileName,
11626
- lineNumber: 460,
11799
+ lineNumber: 467,
11627
11800
  columnNumber: 7
11628
11801
  }
11629
11802
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Dialog, _extends({}, props, {
11630
11803
  role: "document",
11631
11804
  onMouseDown: handleDialogMouseDown,
11632
11805
  className: dialogClassName,
11806
+ contentClassName: contentClassName,
11633
11807
  __self: Modal_this,
11634
11808
  __source: {
11635
11809
  fileName: Modal_jsxFileName,
11636
- lineNumber: 475,
11810
+ lineNumber: 482,
11637
11811
  columnNumber: 9
11638
11812
  }
11639
11813
  }), children));
@@ -11644,7 +11818,7 @@ var Modal_Modal = external_root_React_commonjs2_react_commonjs_react_amd_react_d
11644
11818
  __self: Modal_this,
11645
11819
  __source: {
11646
11820
  fileName: Modal_jsxFileName,
11647
- lineNumber: 487,
11821
+ lineNumber: 495,
11648
11822
  columnNumber: 7
11649
11823
  }
11650
11824
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(esm_Modal, {
@@ -11676,7 +11850,7 @@ var Modal_Modal = external_root_React_commonjs2_react_commonjs_react_amd_react_d
11676
11850
  __self: Modal_this,
11677
11851
  __source: {
11678
11852
  fileName: Modal_jsxFileName,
11679
- lineNumber: 488,
11853
+ lineNumber: 496,
11680
11854
  columnNumber: 9
11681
11855
  }
11682
11856
  }));
@@ -12438,7 +12612,7 @@ var NavDropdown = external_root_React_commonjs2_react_commonjs_react_amd_react_d
12438
12612
  __self: NavDropdown_this,
12439
12613
  __source: {
12440
12614
  fileName: NavDropdown_jsxFileName,
12441
- lineNumber: 82,
12615
+ lineNumber: 81,
12442
12616
  columnNumber: 5
12443
12617
  }
12444
12618
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Dropdown.Toggle, {
@@ -12451,7 +12625,7 @@ var NavDropdown = external_root_React_commonjs2_react_commonjs_react_amd_react_d
12451
12625
  __self: NavDropdown_this,
12452
12626
  __source: {
12453
12627
  fileName: NavDropdown_jsxFileName,
12454
- lineNumber: 83,
12628
+ lineNumber: 82,
12455
12629
  columnNumber: 7
12456
12630
  }
12457
12631
  }, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Dropdown.Menu, {
@@ -12461,7 +12635,7 @@ var NavDropdown = external_root_React_commonjs2_react_commonjs_react_amd_react_d
12461
12635
  __self: NavDropdown_this,
12462
12636
  __source: {
12463
12637
  fileName: NavDropdown_jsxFileName,
12464
- lineNumber: 94,
12638
+ lineNumber: 93,
12465
12639
  columnNumber: 7
12466
12640
  }
12467
12641
  }, children));
@@ -12955,7 +13129,7 @@ function handleMouseOverOut(handler, args, relatedNative) {
12955
13129
 
12956
13130
  var triggerType = prop_types_default.a.oneOf(['click', 'hover', 'focus']);
12957
13131
  var OverlayTrigger_propTypes = {
12958
- children: prop_types_default.a.element.isRequired,
13132
+ children: prop_types_default.a.oneOfType([prop_types_default.a.element, prop_types_default.a.func]).isRequired,
12959
13133
 
12960
13134
  /**
12961
13135
  * Specify which action or actions trigger Overlay visibility
@@ -14033,6 +14207,7 @@ var SplitButton_this = undefined,
14033
14207
 
14034
14208
 
14035
14209
 
14210
+
14036
14211
  var SplitButton_propTypes = {
14037
14212
  /**
14038
14213
  * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
@@ -14064,6 +14239,15 @@ var SplitButton_propTypes = {
14064
14239
  /** Disables both Buttons */
14065
14240
  disabled: prop_types_default.a.bool,
14066
14241
 
14242
+ /**
14243
+ * Aligns the dropdown menu responsively.
14244
+ *
14245
+ * _see [DropdownMenu](#dropdown-menu-props) for more details_
14246
+ *
14247
+ * @type {"left"|"right"|{ sm: "left"|"right" }|{ md: "left"|"right" }|{ lg: "left"|"right" }|{ xl: "left"|"right"} }
14248
+ */
14249
+ menuAlign: alignPropType,
14250
+
14067
14251
  /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
14068
14252
  menuRole: prop_types_default.a.string,
14069
14253
 
@@ -14073,7 +14257,7 @@ var SplitButton_propTypes = {
14073
14257
  /**
14074
14258
  * Which event when fired outside the component will cause it to be closed.
14075
14259
  *
14076
- * _see [DropdownMenu](#menu-props) for more details_
14260
+ * _see [DropdownMenu](#dropdown-menu-props) for more details_
14077
14261
  */
14078
14262
  rootCloseEvent: prop_types_default.a.string,
14079
14263
 
@@ -14102,10 +14286,11 @@ var SplitButton = external_root_React_commonjs2_react_commonjs_react_amd_react_d
14102
14286
  onClick = _ref.onClick,
14103
14287
  href = _ref.href,
14104
14288
  target = _ref.target,
14289
+ menuAlign = _ref.menuAlign,
14105
14290
  menuRole = _ref.menuRole,
14106
14291
  renderMenuOnMount = _ref.renderMenuOnMount,
14107
14292
  rootCloseEvent = _ref.rootCloseEvent,
14108
- props = _objectWithoutPropertiesLoose(_ref, ["id", "bsPrefix", "size", "variant", "title", "type", "toggleLabel", "children", "onClick", "href", "target", "menuRole", "renderMenuOnMount", "rootCloseEvent"]);
14293
+ props = _objectWithoutPropertiesLoose(_ref, ["id", "bsPrefix", "size", "variant", "title", "type", "toggleLabel", "children", "onClick", "href", "target", "menuAlign", "menuRole", "renderMenuOnMount", "rootCloseEvent"]);
14109
14294
 
14110
14295
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Dropdown, _extends({
14111
14296
  ref: ref
@@ -14114,7 +14299,7 @@ var SplitButton = external_root_React_commonjs2_react_commonjs_react_amd_react_d
14114
14299
  __self: SplitButton_this,
14115
14300
  __source: {
14116
14301
  fileName: SplitButton_jsxFileName,
14117
- lineNumber: 107,
14302
+ lineNumber: 119,
14118
14303
  columnNumber: 5
14119
14304
  }
14120
14305
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Button, {
@@ -14129,7 +14314,7 @@ var SplitButton = external_root_React_commonjs2_react_commonjs_react_amd_react_d
14129
14314
  __self: SplitButton_this,
14130
14315
  __source: {
14131
14316
  fileName: SplitButton_jsxFileName,
14132
- lineNumber: 108,
14317
+ lineNumber: 120,
14133
14318
  columnNumber: 7
14134
14319
  }
14135
14320
  }, title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Dropdown.Toggle, {
@@ -14142,7 +14327,7 @@ var SplitButton = external_root_React_commonjs2_react_commonjs_react_amd_react_d
14142
14327
  __self: SplitButton_this,
14143
14328
  __source: {
14144
14329
  fileName: SplitButton_jsxFileName,
14145
- lineNumber: 120,
14330
+ lineNumber: 132,
14146
14331
  columnNumber: 7
14147
14332
  }
14148
14333
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
@@ -14150,17 +14335,18 @@ var SplitButton = external_root_React_commonjs2_react_commonjs_react_amd_react_d
14150
14335
  __self: SplitButton_this,
14151
14336
  __source: {
14152
14337
  fileName: SplitButton_jsxFileName,
14153
- lineNumber: 128,
14338
+ lineNumber: 140,
14154
14339
  columnNumber: 9
14155
14340
  }
14156
14341
  }, toggleLabel)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(src_Dropdown.Menu, {
14342
+ align: menuAlign,
14157
14343
  role: menuRole,
14158
14344
  renderOnMount: renderMenuOnMount,
14159
14345
  rootCloseEvent: rootCloseEvent,
14160
14346
  __self: SplitButton_this,
14161
14347
  __source: {
14162
14348
  fileName: SplitButton_jsxFileName,
14163
- lineNumber: 131,
14349
+ lineNumber: 143,
14164
14350
  columnNumber: 7
14165
14351
  }
14166
14352
  }, children));
@@ -15231,10 +15417,21 @@ var ToggleButtonGroup_propTypes = {
15231
15417
  * The input `type` of the rendered buttons, determines the toggle behavior
15232
15418
  * of the buttons
15233
15419
  */
15234
- type: prop_types_default.a.oneOf(['checkbox', 'radio']).isRequired
15420
+ type: prop_types_default.a.oneOf(['checkbox', 'radio']).isRequired,
15421
+
15422
+ /**
15423
+ * Sets the size for all Buttons in the group.
15424
+ *
15425
+ * @type ('sm'|'lg')
15426
+ */
15427
+ size: prop_types_default.a.string,
15428
+
15429
+ /** Make the set of Buttons appear vertically stacked. */
15430
+ vertical: prop_types_default.a.bool
15235
15431
  };
15236
15432
  var ToggleButtonGroup_defaultProps = {
15237
- type: 'radio'
15433
+ type: 'radio',
15434
+ vertical: false
15238
15435
  };
15239
15436
  var ToggleButtonGroup = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef(function (props, ref) {
15240
15437
  var _useUncontrolled = useUncontrolled(props, {
@@ -15280,7 +15477,7 @@ var ToggleButtonGroup = external_root_React_commonjs2_react_commonjs_react_amd_r
15280
15477
  __self: ToggleButtonGroup_this,
15281
15478
  __source: {
15282
15479
  fileName: ToggleButtonGroup_jsxFileName,
15283
- lineNumber: 123,
15480
+ lineNumber: 132,
15284
15481
  columnNumber: 7
15285
15482
  }
15286
15483
  }), map(children, function (child) {