react-bootstrap 2.1.1 → 2.2.1

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 (63) hide show
  1. package/cjs/Button.js +2 -2
  2. package/cjs/Carousel.js +12 -12
  3. package/cjs/Col.d.ts +1 -0
  4. package/cjs/Col.js +2 -3
  5. package/cjs/Container.d.ts +1 -1
  6. package/cjs/ListGroup.d.ts +1 -1
  7. package/cjs/Modal.d.ts +1 -1
  8. package/cjs/ModalDialog.d.ts +1 -1
  9. package/cjs/Navbar.d.ts +1 -1
  10. package/cjs/Overlay.js +1 -1
  11. package/cjs/Row.d.ts +1 -0
  12. package/cjs/Row.js +2 -2
  13. package/cjs/Stack.js +3 -1
  14. package/cjs/Tab.d.ts +1 -0
  15. package/cjs/Tab.js +6 -1
  16. package/cjs/TabContainer.d.ts +0 -1
  17. package/cjs/TabPane.js +3 -3
  18. package/cjs/Tabs.js +3 -0
  19. package/cjs/ThemeProvider.d.ts +4 -1
  20. package/cjs/ThemeProvider.js +16 -3
  21. package/cjs/ToggleButton.js +1 -0
  22. package/cjs/createUtilityClasses.d.ts +1 -2
  23. package/cjs/createUtilityClasses.js +4 -6
  24. package/cjs/index.d.ts +2 -0
  25. package/cjs/index.js +5 -1
  26. package/cjs/safeFindDOMNode.d.ts +1 -1
  27. package/cjs/types.d.ts +2 -12
  28. package/cjs/types.js +1 -1
  29. package/cjs/useOverlayOffset.d.ts +2 -5
  30. package/cjs/useOverlayOffset.js +4 -4
  31. package/dist/react-bootstrap.js +257 -329
  32. package/dist/react-bootstrap.min.js +1 -1
  33. package/esm/Button.js +2 -2
  34. package/esm/Carousel.js +12 -12
  35. package/esm/Col.d.ts +1 -0
  36. package/esm/Col.js +3 -3
  37. package/esm/Container.d.ts +1 -1
  38. package/esm/ListGroup.d.ts +1 -1
  39. package/esm/Modal.d.ts +1 -1
  40. package/esm/ModalDialog.d.ts +1 -1
  41. package/esm/Navbar.d.ts +1 -1
  42. package/esm/Overlay.js +1 -1
  43. package/esm/Row.d.ts +1 -0
  44. package/esm/Row.js +3 -3
  45. package/esm/Stack.js +4 -2
  46. package/esm/Tab.d.ts +1 -0
  47. package/esm/Tab.js +6 -1
  48. package/esm/TabContainer.d.ts +0 -1
  49. package/esm/TabPane.js +2 -2
  50. package/esm/Tabs.js +3 -0
  51. package/esm/ThemeProvider.d.ts +4 -1
  52. package/esm/ThemeProvider.js +12 -2
  53. package/esm/ToggleButton.js +1 -0
  54. package/esm/createUtilityClasses.d.ts +1 -2
  55. package/esm/createUtilityClasses.js +3 -3
  56. package/esm/index.d.ts +2 -0
  57. package/esm/index.js +1 -0
  58. package/esm/safeFindDOMNode.d.ts +1 -1
  59. package/esm/types.d.ts +2 -12
  60. package/esm/types.js +1 -1
  61. package/esm/useOverlayOffset.d.ts +2 -5
  62. package/esm/useOverlayOffset.js +4 -4
  63. package/package.json +8 -8
@@ -497,6 +497,7 @@ module.exports = function () {
497
497
 
498
498
  var ReactPropTypes = {
499
499
  array: shim,
500
+ bigint: shim,
500
501
  bool: shim,
501
502
  func: shim,
502
503
  number: shim,
@@ -1044,6 +1045,7 @@ __webpack_require__.d(__webpack_exports__, {
1044
1045
  "ModalBody": () => (/* reexport */ ModalBody),
1045
1046
  "ModalDialog": () => (/* reexport */ src_ModalDialog),
1046
1047
  "ModalFooter": () => (/* reexport */ ModalFooter),
1048
+ "ModalHeader": () => (/* reexport */ src_ModalHeader),
1047
1049
  "ModalTitle": () => (/* reexport */ ModalTitle),
1048
1050
  "Nav": () => (/* reexport */ src_Nav),
1049
1051
  "NavDropdown": () => (/* reexport */ src_NavDropdown),
@@ -1563,8 +1565,10 @@ var ThemeProvider_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-boot
1563
1565
 
1564
1566
 
1565
1567
 
1568
+ const DEFAULT_BREAKPOINTS = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
1566
1569
  const ThemeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
1567
- prefixes: {}
1570
+ prefixes: {},
1571
+ breakpoints: DEFAULT_BREAKPOINTS
1568
1572
  });
1569
1573
  const {
1570
1574
  Consumer,
@@ -1573,26 +1577,49 @@ const {
1573
1577
 
1574
1578
  function ThemeProvider({
1575
1579
  prefixes = {},
1580
+ breakpoints = DEFAULT_BREAKPOINTS,
1576
1581
  dir,
1577
1582
  children
1578
1583
  }) {
1579
1584
  const contextValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
1580
1585
  prefixes: { ...prefixes
1581
1586
  },
1587
+ breakpoints,
1582
1588
  dir
1583
- }), [prefixes, dir]);
1589
+ }), [prefixes, breakpoints, dir]);
1584
1590
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Provider, {
1585
1591
  value: contextValue,
1586
1592
  children: children
1587
1593
  }, void 0, false, {
1588
1594
  fileName: ThemeProvider_jsxFileName,
1589
- lineNumber: 26,
1595
+ lineNumber: 38,
1590
1596
  columnNumber: 10
1591
1597
  }, this);
1592
1598
  }
1593
1599
 
1594
1600
  ThemeProvider.propTypes = {
1601
+ /**
1602
+ * An object mapping of Bootstrap component classes that
1603
+ * map to a custom class.
1604
+ *
1605
+ * **Note: Changing prefixes is an escape hatch and generally
1606
+ * shouldn't be used.**
1607
+ *
1608
+ * For more information, see [here](/getting-started/theming/#prefixing-components).
1609
+ */
1595
1610
  prefixes: (prop_types_default()).object,
1611
+
1612
+ /**
1613
+ * An array of breakpoints that your application supports.
1614
+ * Defaults to the standard Bootstrap breakpoints.
1615
+ */
1616
+ breakpoints: prop_types_default().arrayOf((prop_types_default()).string),
1617
+
1618
+ /**
1619
+ * Indicates the directionality of the application's text.
1620
+ *
1621
+ * Use `rtl` to set text as "right to left".
1622
+ */
1596
1623
  dir: (prop_types_default()).string
1597
1624
  };
1598
1625
  function useBootstrapPrefix(prefix, defaultPrefix) {
@@ -1601,6 +1628,12 @@ function useBootstrapPrefix(prefix, defaultPrefix) {
1601
1628
  } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1602
1629
  return prefix || prefixes[defaultPrefix] || defaultPrefix;
1603
1630
  }
1631
+ function useBootstrapBreakpoints() {
1632
+ const {
1633
+ breakpoints
1634
+ } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1635
+ return breakpoints;
1636
+ }
1604
1637
  function useIsRTL() {
1605
1638
  const {
1606
1639
  dir
@@ -1626,7 +1659,7 @@ function createBootstrapComponent(Component, opts) {
1626
1659
  bsPrefix: bsPrefix
1627
1660
  }, void 0, false, {
1628
1661
  fileName: ThemeProvider_jsxFileName,
1629
- lineNumber: 57,
1662
+ lineNumber: 95,
1630
1663
  columnNumber: 14
1631
1664
  }, this);
1632
1665
  });
@@ -3111,7 +3144,7 @@ function useEventCallback(fn) {
3111
3144
  return ref.current && ref.current.apply(ref, arguments);
3112
3145
  }, [ref]);
3113
3146
  }
3114
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCallbackRef.js
3147
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
3115
3148
 
3116
3149
  /**
3117
3150
  * A convenience hook around `useState` designed to be paired with
@@ -3141,37 +3174,7 @@ function useEventCallback(fn) {
3141
3174
  function useCallbackRef() {
3142
3175
  return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
3143
3176
  }
3144
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCommittedRef.js
3145
-
3146
- /**
3147
- * Creates a `Ref` whose value is updated in an effect, ensuring the most recent
3148
- * value is the one rendered with. Generally only required for Concurrent mode usage
3149
- * where previous work in `render()` may be discarded befor being used.
3150
- *
3151
- * This is safe to access in an event handler.
3152
- *
3153
- * @param value The `Ref` value
3154
- */
3155
-
3156
- function esm_useCommittedRef_useCommittedRef(value) {
3157
- var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
3158
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3159
- ref.current = value;
3160
- }, [value]);
3161
- return ref;
3162
- }
3163
-
3164
- /* harmony default export */ const hooks_esm_useCommittedRef = (esm_useCommittedRef_useCommittedRef);
3165
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useEventCallback.js
3166
-
3167
-
3168
- function useEventCallback_useEventCallback(fn) {
3169
- var ref = hooks_esm_useCommittedRef(fn);
3170
- return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
3171
- return ref.current && ref.current.apply(ref, arguments);
3172
- }, [ref]);
3173
- }
3174
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useEventListener.js
3177
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useEventListener.js
3175
3178
 
3176
3179
 
3177
3180
  /**
@@ -3189,7 +3192,7 @@ function useEventListener_useEventListener(eventTarget, event, listener, capture
3189
3192
  capture = false;
3190
3193
  }
3191
3194
 
3192
- var handler = useEventCallback_useEventCallback(listener);
3195
+ var handler = useEventCallback(listener);
3193
3196
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3194
3197
  var target = typeof eventTarget === 'function' ? eventTarget() : eventTarget;
3195
3198
  target.addEventListener(event, handler, capture);
@@ -3198,7 +3201,7 @@ function useEventListener_useEventListener(eventTarget, event, listener, capture
3198
3201
  };
3199
3202
  }, [eventTarget]);
3200
3203
  }
3201
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useGlobalListener.js
3204
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useGlobalListener.js
3202
3205
 
3203
3206
 
3204
3207
  /**
@@ -3226,7 +3229,7 @@ function useGlobalListener(event, handler, capture) {
3226
3229
  }, []);
3227
3230
  return useEventListener(documentTarget, event, handler, capture);
3228
3231
  }
3229
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useInterval.js
3232
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useInterval.js
3230
3233
 
3231
3234
 
3232
3235
  /**
@@ -3285,7 +3288,7 @@ function useInterval(fn, ms, paused, runImmediately) {
3285
3288
  }
3286
3289
 
3287
3290
  /* harmony default export */ const esm_useInterval = ((/* unused pure expression or super */ null && (useInterval)));
3288
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useRafInterval.js
3291
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useRafInterval.js
3289
3292
 
3290
3293
 
3291
3294
 
@@ -3324,7 +3327,7 @@ function useRafInterval(fn, ms, paused) {
3324
3327
  }
3325
3328
 
3326
3329
  /* harmony default export */ const esm_useRafInterval = ((/* unused pure expression or super */ null && (useRafInterval)));
3327
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeState.js
3330
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeState.js
3328
3331
  function useMergeState_extends() {
3329
3332
  useMergeState_extends = Object.assign || function (target) {
3330
3333
  for (var i = 1; i < arguments.length; i++) {
@@ -3381,7 +3384,7 @@ function useMergeState_useMergeState(initialState) {
3381
3384
  }, [setState]);
3382
3385
  return [state, updater];
3383
3386
  }
3384
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeStateFromProps.js
3387
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeStateFromProps.js
3385
3388
 
3386
3389
  function useMergeStateFromProps(props, gDSFP, initialState) {
3387
3390
  var _useMergeState = useMergeState(initialState),
@@ -3392,7 +3395,7 @@ function useMergeStateFromProps(props, gDSFP, initialState) {
3392
3395
  if (nextState !== null) setState(nextState);
3393
3396
  return [state, setState];
3394
3397
  }
3395
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMounted.js
3398
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
3396
3399
 
3397
3400
  /**
3398
3401
  * Track whether a component is current mounted. Generally less preferable than
@@ -3427,7 +3430,7 @@ function useMounted() {
3427
3430
  }, []);
3428
3431
  return isMounted.current;
3429
3432
  }
3430
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/usePrevious.js
3433
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/usePrevious.js
3431
3434
 
3432
3435
  /**
3433
3436
  * Store the last of some value. Tracked via a `Ref` only updating it
@@ -3454,7 +3457,7 @@ function usePrevious(value) {
3454
3457
  });
3455
3458
  return ref.current;
3456
3459
  }
3457
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useImage.js
3460
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useImage.js
3458
3461
 
3459
3462
  /**
3460
3463
  * Fetch and load an image for programatic use such as in a `<canvas>` element.
@@ -3533,7 +3536,7 @@ function useImage(imageOrUrl, crossOrigin) {
3533
3536
  }, [imageOrUrl, crossOrigin]);
3534
3537
  return state;
3535
3538
  }
3536
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useIsomorphicEffect.js
3539
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
3537
3540
 
3538
3541
  var isReactNative = typeof __webpack_require__.g !== 'undefined' && // @ts-ignore
3539
3542
  __webpack_require__.g.navigator && // @ts-ignore
@@ -3549,7 +3552,7 @@ var isDOM = typeof document !== 'undefined';
3549
3552
  */
3550
3553
 
3551
3554
  /* harmony default export */ const useIsomorphicEffect = (isDOM || isReactNative ? external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect : external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect);
3552
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useResizeObserver.js
3555
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useResizeObserver.js
3553
3556
 
3554
3557
 
3555
3558
  var targetMap = new WeakMap();
@@ -3602,7 +3605,7 @@ function useResizeObserver(element) {
3602
3605
  }, [element]);
3603
3606
  return rect;
3604
3607
  }
3605
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/index.js
3608
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/index.js
3606
3609
 
3607
3610
 
3608
3611
 
@@ -3691,13 +3694,22 @@ function useButtonProps({
3691
3694
  }
3692
3695
  };
3693
3696
 
3697
+ if (tagName === 'a') {
3698
+ // Ensure there's a href so Enter can trigger anchor button.
3699
+ href || (href = '#');
3700
+
3701
+ if (disabled) {
3702
+ href = undefined;
3703
+ }
3704
+ }
3705
+
3694
3706
  return [{
3695
3707
  role: 'button',
3696
3708
  // explicitly undefined so that it overrides the props disabled in a spread
3697
3709
  // e.g. <Tag {...props} {...hookProps} />
3698
3710
  disabled: undefined,
3699
3711
  tabIndex: disabled ? undefined : tabIndex,
3700
- href: tagName === 'a' && disabled ? undefined : href,
3712
+ href,
3701
3713
  target: tagName === 'a' ? target : undefined,
3702
3714
  'aria-disabled': !disabled ? undefined : disabled,
3703
3715
  rel: tagName === 'a' ? rel : undefined,
@@ -3767,7 +3779,7 @@ const Anchor = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
3767
3779
  const [buttonProps] = useButtonProps(Object.assign({
3768
3780
  tagName: 'a'
3769
3781
  }, props));
3770
- const handleKeyDown = useEventCallback_useEventCallback(e => {
3782
+ const handleKeyDown = useEventCallback(e => {
3771
3783
  buttonProps.onKeyDown(e);
3772
3784
  onKeyDown == null ? void 0 : onKeyDown(e);
3773
3785
  });
@@ -4446,8 +4458,8 @@ const Button_Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_
4446
4458
  ...props
4447
4459
  });
4448
4460
  const Component = tagName;
4449
- return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, { ...props,
4450
- ...buttonProps,
4461
+ return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, { ...buttonProps,
4462
+ ...props,
4451
4463
  ref: ref,
4452
4464
  className: classnames_default()(className, prefix, active && 'active', variant && `${prefix}-${variant}`, size && `${prefix}-${size}`, props.href && props.disabled && 'disabled')
4453
4465
  }, void 0, false, {
@@ -4806,41 +4818,6 @@ function useUpdateEffect(fn, deps) {
4806
4818
  }
4807
4819
 
4808
4820
  /* harmony default export */ const esm_useUpdateEffect = (useUpdateEffect);
4809
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
4810
-
4811
- /**
4812
- * Track whether a component is current mounted. Generally less preferable than
4813
- * properlly canceling effects so they don't run after a component is unmounted,
4814
- * but helpful in cases where that isn't feasible, such as a `Promise` resolution.
4815
- *
4816
- * @returns a function that returns the current isMounted state of the component
4817
- *
4818
- * ```ts
4819
- * const [data, setData] = useState(null)
4820
- * const isMounted = useMounted()
4821
- *
4822
- * useEffect(() => {
4823
- * fetchdata().then((newData) => {
4824
- * if (isMounted()) {
4825
- * setData(newData);
4826
- * }
4827
- * })
4828
- * })
4829
- * ```
4830
- */
4831
-
4832
- function useMounted_useMounted() {
4833
- var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
4834
- var isMounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(function () {
4835
- return mounted.current;
4836
- });
4837
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4838
- return function () {
4839
- mounted.current = false;
4840
- };
4841
- }, []);
4842
- return isMounted.current;
4843
- }
4844
4821
  ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdatedRef.js
4845
4822
 
4846
4823
  /**
@@ -4915,7 +4892,7 @@ function setChainedTimeout(handleRef, fn, timeoutAtMs) {
4915
4892
 
4916
4893
 
4917
4894
  function useTimeout() {
4918
- var isMounted = useMounted_useMounted(); // types are confused between node and web here IDK
4895
+ var isMounted = useMounted(); // types are confused between node and web here IDK
4919
4896
 
4920
4897
  var handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
4921
4898
  useWillUnmount(function () {
@@ -5248,21 +5225,21 @@ const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
5248
5225
  const [paused, setPaused] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
5249
5226
  const [isSliding, setIsSliding] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
5250
5227
  const [renderedActiveIndex, setRenderedActiveIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(activeIndex || 0);
5228
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
5229
+ if (!isSliding && activeIndex !== renderedActiveIndex) {
5230
+ if (nextDirectionRef.current) {
5231
+ setDirection(nextDirectionRef.current);
5232
+ } else {
5233
+ setDirection((activeIndex || 0) > renderedActiveIndex ? 'next' : 'prev');
5234
+ }
5251
5235
 
5252
- if (!isSliding && activeIndex !== renderedActiveIndex) {
5253
- if (nextDirectionRef.current) {
5254
- setDirection(nextDirectionRef.current);
5255
- } else {
5256
- setDirection((activeIndex || 0) > renderedActiveIndex ? 'next' : 'prev');
5257
- }
5236
+ if (slide) {
5237
+ setIsSliding(true);
5238
+ }
5258
5239
 
5259
- if (slide) {
5260
- setIsSliding(true);
5240
+ setRenderedActiveIndex(activeIndex || 0);
5261
5241
  }
5262
-
5263
- setRenderedActiveIndex(activeIndex || 0);
5264
- }
5265
-
5242
+ }, [activeIndex, isSliding, renderedActiveIndex, slide]);
5266
5243
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
5267
5244
  if (nextDirectionRef.current) {
5268
5245
  nextDirectionRef.current = null;
@@ -5482,12 +5459,12 @@ const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
5482
5459
  "aria-current": index === renderedActiveIndex
5483
5460
  }, index, false, {
5484
5461
  fileName: Carousel_jsxFileName,
5485
- lineNumber: 558,
5462
+ lineNumber: 560,
5486
5463
  columnNumber: 15
5487
5464
  }, undefined))
5488
5465
  }, void 0, false, {
5489
5466
  fileName: Carousel_jsxFileName,
5490
- lineNumber: 556,
5467
+ lineNumber: 558,
5491
5468
  columnNumber: 11
5492
5469
  }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
5493
5470
  className: `${prefix}-inner`,
@@ -5503,7 +5480,7 @@ const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
5503
5480
  })
5504
5481
  }, void 0, false, {
5505
5482
  fileName: Carousel_jsxFileName,
5506
- lineNumber: 582,
5483
+ lineNumber: 584,
5507
5484
  columnNumber: 15
5508
5485
  }, undefined) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, {
5509
5486
  className: classnames_default()(child.props.className, isActive && 'active')
@@ -5511,7 +5488,7 @@ const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
5511
5488
  })
5512
5489
  }, void 0, false, {
5513
5490
  fileName: Carousel_jsxFileName,
5514
- lineNumber: 577,
5491
+ lineNumber: 579,
5515
5492
  columnNumber: 9
5516
5493
  }, undefined), controls && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
5517
5494
  children: [(wrap || activeIndex !== 0) && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Anchor, {
@@ -5522,12 +5499,12 @@ const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
5522
5499
  children: prevLabel
5523
5500
  }, void 0, false, {
5524
5501
  fileName: Carousel_jsxFileName,
5525
- lineNumber: 622,
5502
+ lineNumber: 624,
5526
5503
  columnNumber: 19
5527
5504
  }, undefined)]
5528
5505
  }, void 0, true, {
5529
5506
  fileName: Carousel_jsxFileName,
5530
- lineNumber: 619,
5507
+ lineNumber: 621,
5531
5508
  columnNumber: 15
5532
5509
  }, undefined), (wrap || activeIndex !== numChildren - 1) && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Anchor, {
5533
5510
  className: `${prefix}-control-next`,
@@ -5537,18 +5514,18 @@ const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
5537
5514
  children: nextLabel
5538
5515
  }, void 0, false, {
5539
5516
  fileName: Carousel_jsxFileName,
5540
- lineNumber: 630,
5517
+ lineNumber: 632,
5541
5518
  columnNumber: 19
5542
5519
  }, undefined)]
5543
5520
  }, void 0, true, {
5544
5521
  fileName: Carousel_jsxFileName,
5545
- lineNumber: 627,
5522
+ lineNumber: 629,
5546
5523
  columnNumber: 15
5547
5524
  }, undefined)]
5548
5525
  }, void 0, true)]
5549
5526
  }, void 0, true, {
5550
5527
  fileName: Carousel_jsxFileName,
5551
- lineNumber: 538,
5528
+ lineNumber: 540,
5552
5529
  columnNumber: 7
5553
5530
  }, undefined);
5554
5531
  });
@@ -5566,7 +5543,6 @@ var Col_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/
5566
5543
 
5567
5544
 
5568
5545
 
5569
- const DEVICE_SIZES = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
5570
5546
  const colSize = prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).number, (prop_types_default()).string, prop_types_default().oneOf(['auto'])]);
5571
5547
  const stringOrNumber = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]);
5572
5548
  const column = prop_types_default().oneOfType([colSize, prop_types_default().shape({
@@ -5630,9 +5606,10 @@ function useCol({
5630
5606
  ...props
5631
5607
  }) {
5632
5608
  bsPrefix = useBootstrapPrefix(bsPrefix, 'col');
5609
+ const breakpoints = useBootstrapBreakpoints();
5633
5610
  const spans = [];
5634
5611
  const classes = [];
5635
- DEVICE_SIZES.forEach(brkPoint => {
5612
+ breakpoints.forEach(brkPoint => {
5636
5613
  const propValue = props[brkPoint];
5637
5614
  delete props[brkPoint];
5638
5615
  let span;
@@ -5677,7 +5654,7 @@ const Col = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
5677
5654
  className: classnames_default()(className, !spans.length && bsPrefix)
5678
5655
  }, void 0, false, {
5679
5656
  fileName: Col_jsxFileName,
5680
- lineNumber: 178,
5657
+ lineNumber: 179,
5681
5658
  columnNumber: 7
5682
5659
  }, undefined);
5683
5660
  });
@@ -5696,7 +5673,7 @@ var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
5696
5673
  function qsa(element, selector) {
5697
5674
  return toArray(element.querySelectorAll(selector));
5698
5675
  }
5699
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useForceUpdate.js
5676
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useForceUpdate.js
5700
5677
 
5701
5678
  /**
5702
5679
  * Returns a function that triggers a component update. the hook equivalent to
@@ -5815,7 +5792,7 @@ function dequal(foo, bar) {
5815
5792
  return foo !== foo && bar !== bar;
5816
5793
  }
5817
5794
 
5818
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useSafeState.js
5795
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useSafeState.js
5819
5796
 
5820
5797
 
5821
5798
 
@@ -7871,16 +7848,15 @@ function contains_contains(context, node) {
7871
7848
  // EXTERNAL MODULE: ./node_modules/warning/warning.js
7872
7849
  var warning = __webpack_require__(459);
7873
7850
  var warning_default = /*#__PURE__*/__webpack_require__.n(warning);
7874
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useRootClose.js
7851
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useClickOutside.js
7875
7852
 
7876
7853
 
7877
7854
 
7878
7855
 
7879
7856
 
7880
7857
 
7881
- const escapeKeyCode = 27;
7882
7858
 
7883
- const useRootClose_noop = () => {};
7859
+ const useClickOutside_noop = () => {};
7884
7860
 
7885
7861
  function isLeftClickEvent(event) {
7886
7862
  return event.button === 0;
@@ -7892,38 +7868,29 @@ function isModifiedEvent(event) {
7892
7868
 
7893
7869
  const getRefTarget = ref => ref && ('current' in ref ? ref.current : ref);
7894
7870
  /**
7895
- * The `useRootClose` hook registers your callback on the document
7896
- * when rendered. Powers the `<Overlay/>` component. This is used achieve modal
7897
- * style behavior where your callback is triggered when the user tries to
7898
- * interact with the rest of the document or hits the `esc` key.
7871
+ * The `useClickOutside` hook registers your callback on the document that fires
7872
+ * when a pointer event is registered outside of the provided ref or element.
7899
7873
  *
7900
7874
  * @param {Ref<HTMLElement>| HTMLElement} ref The element boundary
7901
- * @param {function} onRootClose
7875
+ * @param {function} onClickOutside
7902
7876
  * @param {object=} options
7903
7877
  * @param {boolean=} options.disabled
7904
7878
  * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on
7905
7879
  */
7906
7880
 
7907
-
7908
- function useRootClose(ref, onRootClose, {
7881
+ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
7909
7882
  disabled,
7910
7883
  clickTrigger = 'click'
7911
7884
  } = {}) {
7912
- const preventMouseRootCloseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7913
- const onClose = onRootClose || useRootClose_noop;
7885
+ const preventMouseClickOutsideRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7914
7886
  const handleMouseCapture = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(e => {
7915
7887
  const currentTarget = getRefTarget(ref);
7916
- 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');
7917
- preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target);
7888
+ warning_default()(!!currentTarget, 'ClickOutside captured a close event but does not have a ref to compare it to. ' + 'useClickOutside(), should be passed a ref that resolves to a DOM node');
7889
+ preventMouseClickOutsideRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target);
7918
7890
  }, [ref]);
7919
- const handleMouse = useEventCallback_useEventCallback(e => {
7920
- if (!preventMouseRootCloseRef.current) {
7921
- onClose(e);
7922
- }
7923
- });
7924
- const handleKeyUp = useEventCallback_useEventCallback(e => {
7925
- if (e.keyCode === escapeKeyCode) {
7926
- onClose(e);
7891
+ const handleMouse = useEventCallback(e => {
7892
+ if (!preventMouseClickOutsideRef.current) {
7893
+ onClickOutside(e);
7927
7894
  }
7928
7895
  });
7929
7896
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
@@ -7945,31 +7912,21 @@ function useRootClose(ref, onRootClose, {
7945
7912
 
7946
7913
  handleMouse(e);
7947
7914
  });
7948
- const removeKeyupListener = esm_listen(doc, 'keyup', e => {
7949
- // skip if this event is the same as the one running when we added the handlers
7950
- if (e === currentEvent) {
7951
- currentEvent = undefined;
7952
- return;
7953
- }
7954
-
7955
- handleKeyUp(e);
7956
- });
7957
7915
  let mobileSafariHackListeners = [];
7958
7916
 
7959
7917
  if ('ontouchstart' in doc.documentElement) {
7960
- mobileSafariHackListeners = [].slice.call(doc.body.children).map(el => esm_listen(el, 'mousemove', useRootClose_noop));
7918
+ mobileSafariHackListeners = [].slice.call(doc.body.children).map(el => esm_listen(el, 'mousemove', useClickOutside_noop));
7961
7919
  }
7962
7920
 
7963
7921
  return () => {
7964
7922
  removeMouseCaptureListener();
7965
7923
  removeMouseListener();
7966
- removeKeyupListener();
7967
7924
  mobileSafariHackListeners.forEach(remove => remove());
7968
7925
  };
7969
- }, [ref, disabled, clickTrigger, handleMouseCapture, handleMouse, handleKeyUp]);
7926
+ }, [ref, disabled, clickTrigger, handleMouseCapture, handleMouse]);
7970
7927
  }
7971
7928
 
7972
- /* harmony default export */ const esm_useRootClose = (useRootClose);
7929
+ /* harmony default export */ const esm_useClickOutside = (useClickOutside);
7973
7930
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/mergeOptionsWithPopperConfig.js
7974
7931
  function toModifierMap(modifiers) {
7975
7932
  const result = {};
@@ -8134,7 +8091,7 @@ function useDropdownMenu(options = {}) {
8134
8091
  style: popper.styles.arrow
8135
8092
  }) : {}
8136
8093
  };
8137
- esm_useRootClose(menuElement, handleClose, {
8094
+ esm_useClickOutside(menuElement, handleClose, {
8138
8095
  clickTrigger: rootCloseEvent,
8139
8096
  disabled: !show
8140
8097
  });
@@ -8371,7 +8328,7 @@ function useDropdownItem({
8371
8328
  } = navContext || {};
8372
8329
  const eventKey = makeEventKey(key, href);
8373
8330
  const isActive = active == null && key != null ? makeEventKey(activeKey) === eventKey : active;
8374
- const handleClick = useEventCallback_useEventCallback(event => {
8331
+ const handleClick = useEventCallback(event => {
8375
8332
  if (disabled) return;
8376
8333
  onClick == null ? void 0 : onClick(event);
8377
8334
 
@@ -8490,7 +8447,7 @@ function Dropdown({
8490
8447
  source
8491
8448
  });
8492
8449
  }, [onToggle]);
8493
- const handleSelect = useEventCallback_useEventCallback((key, event) => {
8450
+ const handleSelect = useEventCallback((key, event) => {
8494
8451
  onSelect == null ? void 0 : onSelect(key, event);
8495
8452
  toggle(false, event, 'select');
8496
8453
 
@@ -8512,12 +8469,12 @@ function Dropdown({
8512
8469
  focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);
8513
8470
  }
8514
8471
 
8515
- const focusToggle = useEventCallback_useEventCallback(() => {
8472
+ const focusToggle = useEventCallback(() => {
8516
8473
  if (toggleElement && toggleElement.focus) {
8517
8474
  toggleElement.focus();
8518
8475
  }
8519
8476
  });
8520
- const maybeFocusFirst = useEventCallback_useEventCallback(() => {
8477
+ const maybeFocusFirst = useEventCallback(() => {
8521
8478
  const type = lastSourceEvent.current;
8522
8479
  let focusType = focusFirstItemOnShow;
8523
8480
 
@@ -8563,7 +8520,7 @@ function Dropdown({
8563
8520
 
8564
8521
  const isInput = /input|textarea/i.test(target.tagName);
8565
8522
 
8566
- if (isInput && (key === ' ' || key !== 'Escape' && fromMenu)) {
8523
+ if (isInput && (key === ' ' || key !== 'Escape' && fromMenu || key === 'Escape' && target.type === 'search')) {
8567
8524
  return;
8568
8525
  }
8569
8526
 
@@ -8719,22 +8676,6 @@ const DropdownItem_DropdownItem = /*#__PURE__*/external_root_React_commonjs2_rea
8719
8676
  DropdownItem_DropdownItem.displayName = 'DropdownItem';
8720
8677
  DropdownItem_DropdownItem.propTypes = DropdownItem_propTypes;
8721
8678
  /* harmony default export */ const src_DropdownItem = (DropdownItem_DropdownItem);
8722
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
8723
-
8724
- var useIsomorphicEffect_isReactNative = typeof __webpack_require__.g !== 'undefined' && // @ts-ignore
8725
- __webpack_require__.g.navigator && // @ts-ignore
8726
- __webpack_require__.g.navigator.product === 'ReactNative';
8727
- var useIsomorphicEffect_isDOM = typeof document !== 'undefined';
8728
- /**
8729
- * Is `useLayoutEffect` in a DOM or React Native environment, otherwise resolves to useEffect
8730
- * Only useful to avoid the console warning.
8731
- *
8732
- * PREFER `useEffect` UNLESS YOU KNOW WHAT YOU ARE DOING.
8733
- *
8734
- * @category effects
8735
- */
8736
-
8737
- /* harmony default export */ const esm_useIsomorphicEffect = (useIsomorphicEffect_isDOM || useIsomorphicEffect_isReactNative ? external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect : external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect);
8738
8679
  ;// CONCATENATED MODULE: ./src/InputGroupContext.tsx
8739
8680
 
8740
8681
  const InputGroupContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
@@ -8773,7 +8714,7 @@ const alignPropType = prop_types_default().oneOfType([alignDirection, prop_types
8773
8714
  xl: alignDirection
8774
8715
  }), prop_types_default().shape({
8775
8716
  xxl: alignDirection
8776
- })]);
8717
+ }), (prop_types_default()).object]);
8777
8718
  ;// CONCATENATED MODULE: ./src/DropdownMenu.tsx
8778
8719
  var DropdownMenu_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownMenu.tsx";
8779
8720
 
@@ -8924,7 +8865,7 @@ const DropdownMenu_DropdownMenu = /*#__PURE__*/external_root_React_commonjs2_rea
8924
8865
  placement
8925
8866
  });
8926
8867
  menuProps.ref = esm_useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref);
8927
- esm_useIsomorphicEffect(() => {
8868
+ useIsomorphicEffect(() => {
8928
8869
  // Popper's initial position for the menu is incorrect when
8929
8870
  // renderOnMount=true. Need to call update() to correct it.
8930
8871
  if (show) popper == null ? void 0 : popper.update();
@@ -10301,7 +10242,6 @@ var Container_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstra
10301
10242
 
10302
10243
 
10303
10244
 
10304
- const containerSizes = prop_types_default().oneOfType([(prop_types_default()).bool, prop_types_default().oneOf(['sm', 'md', 'lg', 'xl', 'xxl'])]);
10305
10245
  const Container_propTypes = {
10306
10246
  /**
10307
10247
  * @default 'container'
@@ -10312,7 +10252,7 @@ const Container_propTypes = {
10312
10252
  * Allow the Container to fill all of its available horizontal space.
10313
10253
  * @type {(true|"sm"|"md"|"lg"|"xl"|"xxl")}
10314
10254
  */
10315
- fluid: containerSizes,
10255
+ fluid: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
10316
10256
 
10317
10257
  /**
10318
10258
  * You can use a custom element for this component
@@ -10338,7 +10278,7 @@ const Container = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
10338
10278
  className: classnames_default()(className, fluid ? `${prefix}${suffix}` : prefix)
10339
10279
  }, void 0, false, {
10340
10280
  fileName: Container_jsxFileName,
10341
- lineNumber: 56,
10281
+ lineNumber: 51,
10342
10282
  columnNumber: 9
10343
10283
  }, undefined);
10344
10284
  });
@@ -10560,47 +10500,6 @@ InputGroup.displayName = 'InputGroup';
10560
10500
  Radio: InputGroupRadio,
10561
10501
  Checkbox: InputGroupCheckbox
10562
10502
  }));
10563
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergedRefs.js
10564
-
10565
-
10566
- var useMergedRefs_toFnRef = function toFnRef(ref) {
10567
- return !ref || typeof ref === 'function' ? ref : function (value) {
10568
- ref.current = value;
10569
- };
10570
- };
10571
-
10572
- function useMergedRefs_mergeRefs(refA, refB) {
10573
- var a = useMergedRefs_toFnRef(refA);
10574
- var b = useMergedRefs_toFnRef(refB);
10575
- return function (value) {
10576
- if (a) a(value);
10577
- if (b) b(value);
10578
- };
10579
- }
10580
- /**
10581
- * Create and returns a single callback ref composed from two other Refs.
10582
- *
10583
- * ```tsx
10584
- * const Button = React.forwardRef((props, ref) => {
10585
- * const [element, attachRef] = useCallbackRef<HTMLButtonElement>();
10586
- * const mergedRef = useMergedRefs(ref, attachRef);
10587
- *
10588
- * return <button ref={mergedRef} {...props}/>
10589
- * })
10590
- * ```
10591
- *
10592
- * @param refA A Callback or mutable Ref
10593
- * @param refB A Callback or mutable Ref
10594
- * @category refs
10595
- */
10596
-
10597
- function useMergedRefs_useMergedRefs(refA, refB) {
10598
- return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
10599
- return useMergedRefs_mergeRefs(refA, refB);
10600
- }, [refA, refB]);
10601
- }
10602
-
10603
- /* harmony default export */ const hooks_esm_useMergedRefs = (useMergedRefs_useMergedRefs);
10604
10503
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabContext.js
10605
10504
 
10606
10505
  const TabContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
@@ -10631,6 +10530,7 @@ function NavItem_objectWithoutPropertiesLoose(source, excluded) {
10631
10530
 
10632
10531
 
10633
10532
 
10533
+
10634
10534
  function useNavItem({
10635
10535
  key,
10636
10536
  onClick,
@@ -10641,6 +10541,7 @@ function useNavItem({
10641
10541
  }) {
10642
10542
  const parentOnSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_SelectableContext);
10643
10543
  const navContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_NavContext);
10544
+ const tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_TabContext);
10644
10545
  let isActive = active;
10645
10546
  const props = {
10646
10547
  role
@@ -10653,8 +10554,18 @@ function useNavItem({
10653
10554
 
10654
10555
  props[dataAttr('event-key')] = key;
10655
10556
  props.id = contextControllerId || id;
10656
- props['aria-controls'] = contextControlledId;
10657
10557
  isActive = active == null && key != null ? navContext.activeKey === key : active;
10558
+ /**
10559
+ * Simplified scenario for `mountOnEnter`.
10560
+ *
10561
+ * While it would make sense to keep 'aria-controls' for tabs that have been mounted at least
10562
+ * once, it would also complicate the code quite a bit, for very little gain.
10563
+ * The following implementation is probably good enough.
10564
+ *
10565
+ * @see https://github.com/react-restart/ui/pull/40#issuecomment-1009971561
10566
+ */
10567
+
10568
+ if (isActive || !(tabContext != null && tabContext.unmountOnExit) && !(tabContext != null && tabContext.mountOnEnter)) props['aria-controls'] = contextControlledId;
10658
10569
  }
10659
10570
 
10660
10571
  if (props.role === 'tab') {
@@ -10670,7 +10581,7 @@ function useNavItem({
10670
10581
  }
10671
10582
  }
10672
10583
 
10673
- props.onClick = useEventCallback_useEventCallback(e => {
10584
+ props.onClick = useEventCallback(e => {
10674
10585
  if (disabled) return;
10675
10586
  onClick == null ? void 0 : onClick(e);
10676
10587
 
@@ -10773,7 +10684,7 @@ const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
10773
10684
  if (!currentListNode) return null;
10774
10685
  const items = qsa(currentListNode, `[${EVENT_KEY_ATTR}]:not([aria-disabled=true])`);
10775
10686
  const activeChild = currentListNode.querySelector('[aria-selected=true]');
10776
- if (!activeChild) return null;
10687
+ if (!activeChild || activeChild !== document.activeElement) return null;
10777
10688
  const index = items.indexOf(activeChild);
10778
10689
  if (index === -1) return null;
10779
10690
  let nextIndex = index + offset;
@@ -10827,7 +10738,7 @@ const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
10827
10738
 
10828
10739
  needsRefocusRef.current = false;
10829
10740
  });
10830
- const mergedRef = hooks_esm_useMergedRefs(ref, listNode);
10741
+ const mergedRef = esm_useMergedRefs(ref, listNode);
10831
10742
  return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
10832
10743
  value: handleSelect,
10833
10744
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_NavContext.Provider, {
@@ -10979,7 +10890,7 @@ const ListGroup_propTypes = {
10979
10890
  * makes the list group horizontal starting at that breakpoint’s `min-width`.
10980
10891
  * @type {(true|'sm'|'md'|'lg'|'xl'|'xxl')}
10981
10892
  */
10982
- horizontal: prop_types_default().oneOf([true, 'sm', 'md', 'lg', 'xl', 'xxl']),
10893
+ horizontal: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
10983
10894
 
10984
10895
  /**
10985
10896
  * Generate numbered list items.
@@ -11048,36 +10959,6 @@ function scrollbarSize(recalc) {
11048
10959
 
11049
10960
  return size;
11050
10961
  }
11051
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
11052
-
11053
- /**
11054
- * A convenience hook around `useState` designed to be paired with
11055
- * the component [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) api.
11056
- * Callback refs are useful over `useRef()` when you need to respond to the ref being set
11057
- * instead of lazily accessing it in an effect.
11058
- *
11059
- * ```ts
11060
- * const [element, attachRef] = useCallbackRef<HTMLDivElement>()
11061
- *
11062
- * useEffect(() => {
11063
- * if (!element) return
11064
- *
11065
- * const calendar = new FullCalendar.Calendar(element)
11066
- *
11067
- * return () => {
11068
- * calendar.destroy()
11069
- * }
11070
- * }, [element])
11071
- *
11072
- * return <div ref={attachRef} />
11073
- * ```
11074
- *
11075
- * @category refs
11076
- */
11077
-
11078
- function useCallbackRef_useCallbackRef() {
11079
- return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
11080
- }
11081
10962
  ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/activeElement.js
11082
10963
 
11083
10964
  /**
@@ -11104,38 +10985,6 @@ function activeElement(doc) {
11104
10985
  return doc.body;
11105
10986
  }
11106
10987
  }
11107
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useUpdatedRef.js
11108
-
11109
- /**
11110
- * Returns a ref that is immediately updated with the new value
11111
- *
11112
- * @param value The Ref value
11113
- * @category refs
11114
- */
11115
-
11116
- function useUpdatedRef_useUpdatedRef(value) {
11117
- var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
11118
- valueRef.current = value;
11119
- return valueRef;
11120
- }
11121
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useWillUnmount.js
11122
-
11123
-
11124
- /**
11125
- * Attach a callback that fires when a component unmounts
11126
- *
11127
- * @param fn Handler to run when the component unmounts
11128
- * @category effects
11129
- */
11130
-
11131
- function useWillUnmount_useWillUnmount(fn) {
11132
- var onUnmount = useUpdatedRef_useUpdatedRef(fn);
11133
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
11134
- return function () {
11135
- return onUnmount.current();
11136
- };
11137
- }, []);
11138
- }
11139
10988
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/getScrollbarWidth.js
11140
10989
  /**
11141
10990
  * Get the width of the vertical window scrollbar if it's visible
@@ -11418,7 +11267,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11418
11267
  setExited(false);
11419
11268
  }
11420
11269
 
11421
- const handleShow = useEventCallback_useEventCallback(() => {
11270
+ const handleShow = useEventCallback(() => {
11422
11271
  modal.add();
11423
11272
  removeKeydownListenerRef.current = esm_listen(document, 'keydown', handleDocumentKeyDown);
11424
11273
  removeFocusListenerRef.current = esm_listen(document, 'focus', // the timeout is necessary b/c this will run before the new modal is mounted
@@ -11440,7 +11289,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11440
11289
  }
11441
11290
  }
11442
11291
  });
11443
- const handleHide = useEventCallback_useEventCallback(() => {
11292
+ const handleHide = useEventCallback(() => {
11444
11293
  modal.remove();
11445
11294
  removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();
11446
11295
  removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
@@ -11469,11 +11318,11 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11469
11318
  if (!exited) return;
11470
11319
  handleHide();
11471
11320
  }, [exited, handleHide]);
11472
- useWillUnmount_useWillUnmount(() => {
11321
+ useWillUnmount(() => {
11473
11322
  handleHide();
11474
11323
  }); // --------------------------------
11475
11324
 
11476
- const handleEnforceFocus = useEventCallback_useEventCallback(() => {
11325
+ const handleEnforceFocus = useEventCallback(() => {
11477
11326
  if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
11478
11327
  return;
11479
11328
  }
@@ -11484,7 +11333,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11484
11333
  modal.dialog.focus();
11485
11334
  }
11486
11335
  });
11487
- const handleBackdropClick = useEventCallback_useEventCallback(e => {
11336
+ const handleBackdropClick = useEventCallback(e => {
11488
11337
  if (e.target !== e.currentTarget) {
11489
11338
  return;
11490
11339
  }
@@ -11495,7 +11344,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11495
11344
  onHide();
11496
11345
  }
11497
11346
  });
11498
- const handleDocumentKeyDown = useEventCallback_useEventCallback(e => {
11347
+ const handleDocumentKeyDown = useEventCallback(e => {
11499
11348
  if (keyboard && e.keyCode === 27 && modal.isTopModal()) {
11500
11349
  onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
11501
11350
 
@@ -11756,12 +11605,12 @@ const ModalDialog = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
11756
11605
  children: children
11757
11606
  }, void 0, false, {
11758
11607
  fileName: ModalDialog_jsxFileName,
11759
- lineNumber: 92,
11608
+ lineNumber: 93,
11760
11609
  columnNumber: 9
11761
11610
  }, undefined)
11762
11611
  }, void 0, false, {
11763
11612
  fileName: ModalDialog_jsxFileName,
11764
- lineNumber: 80,
11613
+ lineNumber: 81,
11765
11614
  columnNumber: 7
11766
11615
  }, undefined);
11767
11616
  });
@@ -12119,7 +11968,7 @@ function DialogTransition(props) {
12119
11968
  timeout: null
12120
11969
  }, void 0, false, {
12121
11970
  fileName: Modal_jsxFileName,
12122
- lineNumber: 235,
11971
+ lineNumber: 236,
12123
11972
  columnNumber: 10
12124
11973
  }, this);
12125
11974
  }
@@ -12129,7 +11978,7 @@ function BackdropTransition(props) {
12129
11978
  timeout: null
12130
11979
  }, void 0, false, {
12131
11980
  fileName: Modal_jsxFileName,
12132
- lineNumber: 239,
11981
+ lineNumber: 240,
12133
11982
  columnNumber: 10
12134
11983
  }, this);
12135
11984
  }
@@ -12174,7 +12023,7 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12174
12023
  const waitingForMouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
12175
12024
  const ignoreBackdropClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
12176
12025
  const removeStaticModalAnimationRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
12177
- const [modal, setModalRef] = useCallbackRef_useCallbackRef();
12026
+ const [modal, setModalRef] = useCallbackRef();
12178
12027
  const mergedRef = esm_useMergedRefs(ref, setModalRef);
12179
12028
  const handleHide = useEventCallback(onHide);
12180
12029
  const isRTL = useIsRTL();
@@ -12296,7 +12145,7 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12296
12145
  className: classnames_default()(`${bsPrefix}-backdrop`, backdropClassName, !animation && 'show')
12297
12146
  }, void 0, false, {
12298
12147
  fileName: Modal_jsxFileName,
12299
- lineNumber: 430,
12148
+ lineNumber: 431,
12300
12149
  columnNumber: 11
12301
12150
  }, undefined), [animation, backdropClassName, bsPrefix]);
12302
12151
  const baseModalStyle = { ...style,
@@ -12322,12 +12171,12 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12322
12171
  children: children
12323
12172
  }, void 0, false, {
12324
12173
  fileName: Modal_jsxFileName,
12325
- lineNumber: 465,
12174
+ lineNumber: 466,
12326
12175
  columnNumber: 11
12327
12176
  }, undefined)
12328
12177
  }, void 0, false, {
12329
12178
  fileName: Modal_jsxFileName,
12330
- lineNumber: 450,
12179
+ lineNumber: 451,
12331
12180
  columnNumber: 9
12332
12181
  }, undefined);
12333
12182
 
@@ -12360,12 +12209,12 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12360
12209
  renderDialog: renderDialog
12361
12210
  }, void 0, false, {
12362
12211
  fileName: Modal_jsxFileName,
12363
- lineNumber: 478,
12212
+ lineNumber: 479,
12364
12213
  columnNumber: 11
12365
12214
  }, undefined)
12366
12215
  }, void 0, false, {
12367
12216
  fileName: Modal_jsxFileName,
12368
- lineNumber: 477,
12217
+ lineNumber: 478,
12369
12218
  columnNumber: 9
12370
12219
  }, undefined);
12371
12220
  });
@@ -12501,6 +12350,11 @@ const Nav_propTypes = {
12501
12350
  */
12502
12351
  activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
12503
12352
 
12353
+ /**
12354
+ * The default active key that is selected on start.
12355
+ */
12356
+ defaultActiveKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
12357
+
12504
12358
  /**
12505
12359
  * Have all `NavItem`s proportionately fill all available width.
12506
12360
  */
@@ -12604,7 +12458,7 @@ const Nav_Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
12604
12458
  ...props
12605
12459
  }, void 0, false, {
12606
12460
  fileName: Nav_jsxFileName,
12607
- lineNumber: 143,
12461
+ lineNumber: 148,
12608
12462
  columnNumber: 5
12609
12463
  }, undefined);
12610
12464
  });
@@ -13304,7 +13158,7 @@ const Navbar_propTypes = {
13304
13158
  * The breakpoint, below which, the Navbar will collapse.
13305
13159
  * When `true` the Navbar will always be expanded regardless of screen size.
13306
13160
  */
13307
- expand: prop_types_default().oneOf([false, true, 'sm', 'md', 'lg', 'xl', 'xxl']).isRequired,
13161
+ expand: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]).isRequired,
13308
13162
 
13309
13163
  /**
13310
13164
  * A convenience prop for adding `bg-*` utility classes since they are so commonly used here.
@@ -13446,17 +13300,17 @@ const Navbar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
13446
13300
  className: classnames_default()(className, bsPrefix, expand && expandClass, variant && `${bsPrefix}-${variant}`, bg && `bg-${bg}`, sticky && `sticky-${sticky}`, fixed && `fixed-${fixed}`)
13447
13301
  }, void 0, false, {
13448
13302
  fileName: Navbar_jsxFileName,
13449
- lineNumber: 201,
13303
+ lineNumber: 200,
13450
13304
  columnNumber: 11
13451
13305
  }, undefined)
13452
13306
  }, void 0, false, {
13453
13307
  fileName: Navbar_jsxFileName,
13454
- lineNumber: 200,
13308
+ lineNumber: 199,
13455
13309
  columnNumber: 9
13456
13310
  }, undefined)
13457
13311
  }, void 0, false, {
13458
13312
  fileName: Navbar_jsxFileName,
13459
- lineNumber: 199,
13313
+ lineNumber: 198,
13460
13314
  columnNumber: 7
13461
13315
  }, undefined);
13462
13316
  });
@@ -13578,6 +13432,65 @@ NavDropdown.propTypes = NavDropdown_propTypes;
13578
13432
  Divider: src_Dropdown.Divider,
13579
13433
  Header: src_Dropdown.Header
13580
13434
  }));
13435
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useRootClose.js
13436
+
13437
+
13438
+
13439
+
13440
+
13441
+ const escapeKeyCode = 27;
13442
+
13443
+ const useRootClose_noop = () => {};
13444
+ /**
13445
+ * The `useRootClose` hook registers your callback on the document
13446
+ * when rendered. Powers the `<Overlay/>` component. This is used achieve modal
13447
+ * style behavior where your callback is triggered when the user tries to
13448
+ * interact with the rest of the document or hits the `esc` key.
13449
+ *
13450
+ * @param {Ref<HTMLElement>| HTMLElement} ref The element boundary
13451
+ * @param {function} onRootClose
13452
+ * @param {object=} options
13453
+ * @param {boolean=} options.disabled
13454
+ * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on
13455
+ */
13456
+
13457
+
13458
+ function useRootClose(ref, onRootClose, {
13459
+ disabled,
13460
+ clickTrigger
13461
+ } = {}) {
13462
+ const onClose = onRootClose || useRootClose_noop;
13463
+ esm_useClickOutside(ref, onClose, {
13464
+ disabled,
13465
+ clickTrigger
13466
+ });
13467
+ const handleKeyUp = useEventCallback(e => {
13468
+ if (e.keyCode === escapeKeyCode) {
13469
+ onClose(e);
13470
+ }
13471
+ });
13472
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
13473
+ if (disabled || ref == null) return undefined;
13474
+ const doc = ownerDocument(getRefTarget(ref)); // Store the current event to avoid triggering handlers immediately
13475
+ // https://github.com/facebook/react/issues/20074
13476
+
13477
+ let currentEvent = (doc.defaultView || window).event;
13478
+ const removeKeyupListener = esm_listen(doc, 'keyup', e => {
13479
+ // skip if this event is the same as the one running when we added the handlers
13480
+ if (e === currentEvent) {
13481
+ currentEvent = undefined;
13482
+ return;
13483
+ }
13484
+
13485
+ handleKeyUp(e);
13486
+ });
13487
+ return () => {
13488
+ removeKeyupListener();
13489
+ };
13490
+ }, [ref, disabled, handleKeyUp]);
13491
+ }
13492
+
13493
+ /* harmony default export */ const esm_useRootClose = (useRootClose);
13581
13494
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Overlay.js
13582
13495
 
13583
13496
 
@@ -13605,7 +13518,7 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
13605
13518
  } = props;
13606
13519
  const [rootElement, attachRef] = useCallbackRef();
13607
13520
  const [arrowElement, attachArrowRef] = useCallbackRef();
13608
- const mergedRef = hooks_esm_useMergedRefs(attachRef, outerRef);
13521
+ const mergedRef = esm_useMergedRefs(attachRef, outerRef);
13609
13522
  const container = useWaitForDOMRef(props.container);
13610
13523
  const target = useWaitForDOMRef(props.target);
13611
13524
  const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!props.show);
@@ -13818,7 +13731,7 @@ Popover.defaultProps = Popover_defaultProps;
13818
13731
  // This is meant for internal use.
13819
13732
  // This applies a custom offset to the overlay if it's a popover.
13820
13733
 
13821
- function useOverlayOffset() {
13734
+ function useOverlayOffset(customOffset) {
13822
13735
  const overlayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
13823
13736
  const popoverClass = useBootstrapPrefix(undefined, 'popover');
13824
13737
  const offset = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
@@ -13826,13 +13739,13 @@ function useOverlayOffset() {
13826
13739
  options: {
13827
13740
  offset: () => {
13828
13741
  if (overlayRef.current && hasClass(overlayRef.current, popoverClass)) {
13829
- return src_Popover.POPPER_OFFSET;
13742
+ return customOffset || src_Popover.POPPER_OFFSET;
13830
13743
  }
13831
13744
 
13832
- return [0, 0];
13745
+ return customOffset || [0, 0];
13833
13746
  }
13834
13747
  }
13835
- }), [popoverClass]);
13748
+ }), [customOffset, popoverClass]);
13836
13749
  return [overlayRef, [offset]];
13837
13750
  }
13838
13751
  ;// CONCATENATED MODULE: ./src/Overlay.tsx
@@ -13955,7 +13868,7 @@ const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonj
13955
13868
  ...outerProps
13956
13869
  }, outerRef) => {
13957
13870
  const popperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
13958
- const [ref, modifiers] = useOverlayOffset();
13871
+ const [ref, modifiers] = useOverlayOffset(outerProps.offset);
13959
13872
  const mergedRef = esm_useMergedRefs(outerRef, ref);
13960
13873
  const actualTransition = transition === true ? src_Fade : transition || undefined;
13961
13874
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Overlay, { ...outerProps,
@@ -14806,7 +14719,6 @@ var Row_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/
14806
14719
 
14807
14720
 
14808
14721
 
14809
- const Row_DEVICE_SIZES = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
14810
14722
  const rowColWidth = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]);
14811
14723
  const rowColumns = prop_types_default().oneOfType([rowColWidth, prop_types_default().shape({
14812
14724
  cols: rowColWidth
@@ -14874,9 +14786,10 @@ const Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
14874
14786
  ...props
14875
14787
  }, ref) => {
14876
14788
  const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');
14789
+ const breakpoints = useBootstrapBreakpoints();
14877
14790
  const sizePrefix = `${decoratedBsPrefix}-cols`;
14878
14791
  const classes = [];
14879
- Row_DEVICE_SIZES.forEach(brkPoint => {
14792
+ breakpoints.forEach(brkPoint => {
14880
14793
  const propValue = props[brkPoint];
14881
14794
  delete props[brkPoint];
14882
14795
  let cols;
@@ -14898,7 +14811,7 @@ const Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
14898
14811
  className: classnames_default()(className, decoratedBsPrefix, ...classes)
14899
14812
  }, void 0, false, {
14900
14813
  fileName: Row_jsxFileName,
14901
- lineNumber: 139,
14814
+ lineNumber: 141,
14902
14815
  columnNumber: 7
14903
14816
  }, undefined);
14904
14817
  });
@@ -15143,6 +15056,7 @@ SplitButton.displayName = 'SplitButton';
15143
15056
  /* harmony default export */ const src_SSRProvider = (SSRProvider);
15144
15057
  ;// CONCATENATED MODULE: ./src/createUtilityClasses.ts
15145
15058
 
15059
+
15146
15060
  function responsivePropType(propType) {
15147
15061
  return prop_types_default().oneOfType([propType, prop_types_default().shape({
15148
15062
  xs: propType,
@@ -15153,13 +15067,12 @@ function responsivePropType(propType) {
15153
15067
  xxl: propType
15154
15068
  })]);
15155
15069
  }
15156
- const createUtilityClasses_DEVICE_SIZES = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
15157
- function createUtilityClassName(utilityValues) {
15070
+ function createUtilityClassName(utilityValues, breakpoints = DEFAULT_BREAKPOINTS) {
15158
15071
  const classes = [];
15159
15072
  Object.entries(utilityValues).forEach(([utilName, utilValue]) => {
15160
15073
  if (utilValue != null) {
15161
15074
  if (typeof utilValue === 'object') {
15162
- createUtilityClasses_DEVICE_SIZES.forEach(brkPoint => {
15075
+ breakpoints.forEach(brkPoint => {
15163
15076
  const bpValue = utilValue[brkPoint];
15164
15077
 
15165
15078
  if (bpValue != null) {
@@ -15208,14 +15121,16 @@ const Stack = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
15208
15121
  ...props
15209
15122
  }, ref) => {
15210
15123
  bsPrefix = useBootstrapPrefix(bsPrefix, direction === 'horizontal' ? 'hstack' : 'vstack');
15124
+ const breakpoints = useBootstrapBreakpoints();
15211
15125
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, { ...props,
15212
15126
  ref: ref,
15213
15127
  className: classnames_default()(className, bsPrefix, ...createUtilityClassName({
15214
- gap
15128
+ gap,
15129
+ breakpoints
15215
15130
  }))
15216
15131
  }, void 0, false, {
15217
15132
  fileName: Stack_jsxFileName,
15218
- lineNumber: 51,
15133
+ lineNumber: 52,
15219
15134
  columnNumber: 9
15220
15135
  }, undefined);
15221
15136
  });
@@ -15254,7 +15169,7 @@ function NoopTransition({
15254
15169
 
15255
15170
  /* harmony default export */ const esm_NoopTransition = (NoopTransition);
15256
15171
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabPanel.js
15257
- const TabPanel_excluded = ["active", "eventKey", "mountOnEnter", "transition", "unmountOnExit"],
15172
+ const TabPanel_excluded = ["active", "eventKey", "mountOnEnter", "transition", "unmountOnExit", "role"],
15258
15173
  _excluded2 = ["activeKey", "getControlledId", "getControllerId"],
15259
15174
  _excluded3 = ["as"];
15260
15175
 
@@ -15285,12 +15200,15 @@ function useTabPanel(_ref) {
15285
15200
  eventKey,
15286
15201
  mountOnEnter,
15287
15202
  transition,
15288
- unmountOnExit
15203
+ unmountOnExit,
15204
+ role = 'tabpanel'
15289
15205
  } = _ref,
15290
15206
  props = TabPanel_objectWithoutPropertiesLoose(_ref, TabPanel_excluded);
15291
15207
 
15292
15208
  const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_TabContext);
15293
- if (!context) return [props, {
15209
+ if (!context) return [Object.assign({}, props, {
15210
+ role
15211
+ }), {
15294
15212
  eventKey,
15295
15213
  isActive: active,
15296
15214
  mountOnEnter,
@@ -15307,6 +15225,7 @@ function useTabPanel(_ref) {
15307
15225
 
15308
15226
  const key = makeEventKey(eventKey);
15309
15227
  return [Object.assign({}, props, {
15228
+ role,
15310
15229
  id: getControlledId(eventKey),
15311
15230
  'aria-labelledby': getControllerId(eventKey)
15312
15231
  }), {
@@ -15354,7 +15273,6 @@ const TabPanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
15354
15273
  unmountOnExit: unmountOnExit,
15355
15274
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, tabPanelProps, {
15356
15275
  ref: ref,
15357
- role: "tabpanel",
15358
15276
  hidden: !isActive,
15359
15277
  "aria-hidden": !isActive
15360
15278
  }))
@@ -15602,7 +15520,7 @@ const TabPane = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
15602
15520
  onExited,
15603
15521
  mountOnEnter,
15604
15522
  unmountOnExit,
15605
- transition: Transition = esm_NoopTransition
15523
+ transition: Transition = src_Fade
15606
15524
  }] = useTabPanel({ ...props,
15607
15525
  transition: getTabTransitionComponent(transition)
15608
15526
  });
@@ -15676,7 +15594,12 @@ const Tab_propTypes = {
15676
15594
  /**
15677
15595
  * Class to pass to the underlying nav link.
15678
15596
  */
15679
- tabClassName: (prop_types_default()).string
15597
+ tabClassName: (prop_types_default()).string,
15598
+
15599
+ /**
15600
+ * Object containing attributes to pass to underlying nav link.
15601
+ */
15602
+ tabAttrs: (prop_types_default()).object
15680
15603
  };
15681
15604
 
15682
15605
  const Tab = () => {
@@ -15889,6 +15812,7 @@ function renderTab(child) {
15889
15812
  eventKey,
15890
15813
  disabled,
15891
15814
  tabClassName,
15815
+ tabAttrs,
15892
15816
  id
15893
15817
  } = child.props;
15894
15818
 
@@ -15906,6 +15830,7 @@ function renderTab(child) {
15906
15830
  disabled: disabled,
15907
15831
  id: id,
15908
15832
  className: tabClassName,
15833
+ ...tabAttrs,
15909
15834
  children: title
15910
15835
  }, void 0, false, {
15911
15836
  fileName: Tabs_jsxFileName,
@@ -15945,7 +15870,7 @@ const Tabs_Tabs = props => {
15945
15870
  children: map(children, renderTab)
15946
15871
  }, void 0, false, {
15947
15872
  fileName: Tabs_jsxFileName,
15948
- lineNumber: 149,
15873
+ lineNumber: 150,
15949
15874
  columnNumber: 7
15950
15875
  }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(TabContent, {
15951
15876
  children: map(children, child => {
@@ -15954,21 +15879,22 @@ const Tabs_Tabs = props => {
15954
15879
  delete childProps.title;
15955
15880
  delete childProps.disabled;
15956
15881
  delete childProps.tabClassName;
15882
+ delete childProps.tabAttrs;
15957
15883
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_TabPane, { ...childProps
15958
15884
  }, void 0, false, {
15959
15885
  fileName: Tabs_jsxFileName,
15960
- lineNumber: 161,
15886
+ lineNumber: 163,
15961
15887
  columnNumber: 18
15962
15888
  }, undefined);
15963
15889
  })
15964
15890
  }, void 0, false, {
15965
15891
  fileName: Tabs_jsxFileName,
15966
- lineNumber: 153,
15892
+ lineNumber: 154,
15967
15893
  columnNumber: 7
15968
15894
  }, undefined)]
15969
15895
  }, void 0, true, {
15970
15896
  fileName: Tabs_jsxFileName,
15971
- lineNumber: 141,
15897
+ lineNumber: 142,
15972
15898
  columnNumber: 5
15973
15899
  }, undefined);
15974
15900
  };
@@ -16356,6 +16282,7 @@ const ToggleButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_r
16356
16282
  ref: ref,
16357
16283
  className: classnames_default()(className, disabled && 'disabled'),
16358
16284
  type: undefined,
16285
+ role: undefined,
16359
16286
  as: "label",
16360
16287
  htmlFor: id
16361
16288
  }, void 0, false, {
@@ -16665,6 +16592,7 @@ Tooltip.displayName = 'Tooltip';
16665
16592
 
16666
16593
 
16667
16594
 
16595
+
16668
16596
 
16669
16597
 
16670
16598
  })();