react-bootstrap 2.3.0 → 2.3.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.
@@ -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
- })(self, function(__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) {
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) => {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
@@ -3144,7 +3144,7 @@ function useEventCallback(fn) {
3144
3144
  return ref.current && ref.current.apply(ref, arguments);
3145
3145
  }, [ref]);
3146
3146
  }
3147
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCallbackRef.js
3147
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
3148
3148
 
3149
3149
  /**
3150
3150
  * A convenience hook around `useState` designed to be paired with
@@ -3174,37 +3174,7 @@ function useEventCallback(fn) {
3174
3174
  function useCallbackRef() {
3175
3175
  return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
3176
3176
  }
3177
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCommittedRef.js
3178
-
3179
- /**
3180
- * Creates a `Ref` whose value is updated in an effect, ensuring the most recent
3181
- * value is the one rendered with. Generally only required for Concurrent mode usage
3182
- * where previous work in `render()` may be discarded before being used.
3183
- *
3184
- * This is safe to access in an event handler.
3185
- *
3186
- * @param value The `Ref` value
3187
- */
3188
-
3189
- function esm_useCommittedRef_useCommittedRef(value) {
3190
- var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
3191
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3192
- ref.current = value;
3193
- }, [value]);
3194
- return ref;
3195
- }
3196
-
3197
- /* harmony default export */ const hooks_esm_useCommittedRef = (esm_useCommittedRef_useCommittedRef);
3198
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useEventCallback.js
3199
-
3200
-
3201
- function useEventCallback_useEventCallback(fn) {
3202
- var ref = hooks_esm_useCommittedRef(fn);
3203
- return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
3204
- return ref.current && ref.current.apply(ref, arguments);
3205
- }, [ref]);
3206
- }
3207
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useEventListener.js
3177
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useEventListener.js
3208
3178
 
3209
3179
 
3210
3180
  /**
@@ -3222,7 +3192,7 @@ function useEventListener_useEventListener(eventTarget, event, listener, capture
3222
3192
  capture = false;
3223
3193
  }
3224
3194
 
3225
- var handler = useEventCallback_useEventCallback(listener);
3195
+ var handler = useEventCallback(listener);
3226
3196
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3227
3197
  var target = typeof eventTarget === 'function' ? eventTarget() : eventTarget;
3228
3198
  target.addEventListener(event, handler, capture);
@@ -3231,7 +3201,7 @@ function useEventListener_useEventListener(eventTarget, event, listener, capture
3231
3201
  };
3232
3202
  }, [eventTarget]);
3233
3203
  }
3234
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useGlobalListener.js
3204
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useGlobalListener.js
3235
3205
 
3236
3206
 
3237
3207
  /**
@@ -3259,7 +3229,7 @@ function useGlobalListener(event, handler, capture) {
3259
3229
  }, []);
3260
3230
  return useEventListener(documentTarget, event, handler, capture);
3261
3231
  }
3262
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useInterval.js
3232
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useInterval.js
3263
3233
 
3264
3234
 
3265
3235
  /**
@@ -3318,7 +3288,7 @@ function useInterval(fn, ms, paused, runImmediately) {
3318
3288
  }
3319
3289
 
3320
3290
  /* harmony default export */ const esm_useInterval = ((/* unused pure expression or super */ null && (useInterval)));
3321
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useRafInterval.js
3291
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useRafInterval.js
3322
3292
 
3323
3293
 
3324
3294
 
@@ -3357,7 +3327,7 @@ function useRafInterval(fn, ms, paused) {
3357
3327
  }
3358
3328
 
3359
3329
  /* harmony default export */ const esm_useRafInterval = ((/* unused pure expression or super */ null && (useRafInterval)));
3360
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeState.js
3330
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeState.js
3361
3331
  function useMergeState_extends() {
3362
3332
  useMergeState_extends = Object.assign || function (target) {
3363
3333
  for (var i = 1; i < arguments.length; i++) {
@@ -3414,7 +3384,7 @@ function useMergeState_useMergeState(initialState) {
3414
3384
  }, [setState]);
3415
3385
  return [state, updater];
3416
3386
  }
3417
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeStateFromProps.js
3387
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeStateFromProps.js
3418
3388
 
3419
3389
  function useMergeStateFromProps(props, gDSFP, initialState) {
3420
3390
  var _useMergeState = useMergeState(initialState),
@@ -3425,7 +3395,7 @@ function useMergeStateFromProps(props, gDSFP, initialState) {
3425
3395
  if (nextState !== null) setState(nextState);
3426
3396
  return [state, setState];
3427
3397
  }
3428
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMounted.js
3398
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
3429
3399
 
3430
3400
  /**
3431
3401
  * Track whether a component is current mounted. Generally less preferable than
@@ -3454,13 +3424,14 @@ function useMounted() {
3454
3424
  return mounted.current;
3455
3425
  });
3456
3426
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3427
+ mounted.current = true;
3457
3428
  return function () {
3458
3429
  mounted.current = false;
3459
3430
  };
3460
3431
  }, []);
3461
3432
  return isMounted.current;
3462
3433
  }
3463
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/usePrevious.js
3434
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/usePrevious.js
3464
3435
 
3465
3436
  /**
3466
3437
  * Store the last of some value. Tracked via a `Ref` only updating it
@@ -3487,7 +3458,7 @@ function usePrevious(value) {
3487
3458
  });
3488
3459
  return ref.current;
3489
3460
  }
3490
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useImage.js
3461
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useImage.js
3491
3462
 
3492
3463
  /**
3493
3464
  * Fetch and load an image for programatic use such as in a `<canvas>` element.
@@ -3566,7 +3537,7 @@ function useImage(imageOrUrl, crossOrigin) {
3566
3537
  }, [imageOrUrl, crossOrigin]);
3567
3538
  return state;
3568
3539
  }
3569
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useIsomorphicEffect.js
3540
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
3570
3541
 
3571
3542
  var isReactNative = typeof __webpack_require__.g !== 'undefined' && // @ts-ignore
3572
3543
  __webpack_require__.g.navigator && // @ts-ignore
@@ -3582,7 +3553,7 @@ var isDOM = typeof document !== 'undefined';
3582
3553
  */
3583
3554
 
3584
3555
  /* 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);
3585
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useResizeObserver.js
3556
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useResizeObserver.js
3586
3557
 
3587
3558
 
3588
3559
  var targetMap = new WeakMap();
@@ -3635,7 +3606,7 @@ function useResizeObserver(element) {
3635
3606
  }, [element]);
3636
3607
  return rect;
3637
3608
  }
3638
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/index.js
3609
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/index.js
3639
3610
 
3640
3611
 
3641
3612
 
@@ -3809,7 +3780,7 @@ const Anchor = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
3809
3780
  const [buttonProps] = useButtonProps(Object.assign({
3810
3781
  tagName: 'a'
3811
3782
  }, props));
3812
- const handleKeyDown = useEventCallback_useEventCallback(e => {
3783
+ const handleKeyDown = useEventCallback(e => {
3813
3784
  buttonProps.onKeyDown(e);
3814
3785
  onKeyDown == null ? void 0 : onKeyDown(e);
3815
3786
  });
@@ -4848,42 +4819,6 @@ function useUpdateEffect(fn, deps) {
4848
4819
  }
4849
4820
 
4850
4821
  /* harmony default export */ const esm_useUpdateEffect = (useUpdateEffect);
4851
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
4852
-
4853
- /**
4854
- * Track whether a component is current mounted. Generally less preferable than
4855
- * properlly canceling effects so they don't run after a component is unmounted,
4856
- * but helpful in cases where that isn't feasible, such as a `Promise` resolution.
4857
- *
4858
- * @returns a function that returns the current isMounted state of the component
4859
- *
4860
- * ```ts
4861
- * const [data, setData] = useState(null)
4862
- * const isMounted = useMounted()
4863
- *
4864
- * useEffect(() => {
4865
- * fetchdata().then((newData) => {
4866
- * if (isMounted()) {
4867
- * setData(newData);
4868
- * }
4869
- * })
4870
- * })
4871
- * ```
4872
- */
4873
-
4874
- function useMounted_useMounted() {
4875
- var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
4876
- var isMounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(function () {
4877
- return mounted.current;
4878
- });
4879
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4880
- mounted.current = true;
4881
- return function () {
4882
- mounted.current = false;
4883
- };
4884
- }, []);
4885
- return isMounted.current;
4886
- }
4887
4822
  ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdatedRef.js
4888
4823
 
4889
4824
  /**
@@ -4958,7 +4893,7 @@ function setChainedTimeout(handleRef, fn, timeoutAtMs) {
4958
4893
 
4959
4894
 
4960
4895
  function useTimeout() {
4961
- var isMounted = useMounted_useMounted(); // types are confused between node and web here IDK
4896
+ var isMounted = useMounted(); // types are confused between node and web here IDK
4962
4897
 
4963
4898
  var handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
4964
4899
  useWillUnmount(function () {
@@ -5739,7 +5674,7 @@ var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
5739
5674
  function qsa(element, selector) {
5740
5675
  return toArray(element.querySelectorAll(selector));
5741
5676
  }
5742
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useForceUpdate.js
5677
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useForceUpdate.js
5743
5678
 
5744
5679
  /**
5745
5680
  * Returns a function that triggers a component update. the hook equivalent to
@@ -5858,7 +5793,7 @@ function dequal(foo, bar) {
5858
5793
  return foo !== foo && bar !== bar;
5859
5794
  }
5860
5795
 
5861
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useSafeState.js
5796
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useSafeState.js
5862
5797
 
5863
5798
 
5864
5799
 
@@ -7961,14 +7896,14 @@ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
7961
7896
  preventMouseClickOutsideRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target) || waitingForTrigger.current;
7962
7897
  waitingForTrigger.current = false;
7963
7898
  }, [ref]);
7964
- const handleInitialMouse = useEventCallback_useEventCallback(e => {
7899
+ const handleInitialMouse = useEventCallback(e => {
7965
7900
  const currentTarget = getRefTarget(ref);
7966
7901
 
7967
7902
  if (currentTarget && contains_contains(currentTarget, e.target)) {
7968
7903
  waitingForTrigger.current = true;
7969
7904
  }
7970
7905
  });
7971
- const handleMouse = useEventCallback_useEventCallback(e => {
7906
+ const handleMouse = useEventCallback(e => {
7972
7907
  if (!preventMouseClickOutsideRef.current) {
7973
7908
  onClickOutside(e);
7974
7909
  }
@@ -8415,7 +8350,7 @@ function useDropdownItem({
8415
8350
  } = navContext || {};
8416
8351
  const eventKey = makeEventKey(key, href);
8417
8352
  const isActive = active == null && key != null ? makeEventKey(activeKey) === eventKey : active;
8418
- const handleClick = useEventCallback_useEventCallback(event => {
8353
+ const handleClick = useEventCallback(event => {
8419
8354
  if (disabled) return;
8420
8355
  onClick == null ? void 0 : onClick(event);
8421
8356
 
@@ -8534,7 +8469,7 @@ function Dropdown({
8534
8469
  source
8535
8470
  });
8536
8471
  }, [onToggle]);
8537
- const handleSelect = useEventCallback_useEventCallback((key, event) => {
8472
+ const handleSelect = useEventCallback((key, event) => {
8538
8473
  onSelect == null ? void 0 : onSelect(key, event);
8539
8474
  toggle(false, event, 'select');
8540
8475
 
@@ -8556,12 +8491,12 @@ function Dropdown({
8556
8491
  focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);
8557
8492
  }
8558
8493
 
8559
- const focusToggle = useEventCallback_useEventCallback(() => {
8494
+ const focusToggle = useEventCallback(() => {
8560
8495
  if (toggleElement && toggleElement.focus) {
8561
8496
  toggleElement.focus();
8562
8497
  }
8563
8498
  });
8564
- const maybeFocusFirst = useEventCallback_useEventCallback(() => {
8499
+ const maybeFocusFirst = useEventCallback(() => {
8565
8500
  const type = lastSourceEvent.current;
8566
8501
  let focusType = focusFirstItemOnShow;
8567
8502
 
@@ -8763,22 +8698,6 @@ const DropdownItem_DropdownItem = /*#__PURE__*/external_root_React_commonjs2_rea
8763
8698
  DropdownItem_DropdownItem.displayName = 'DropdownItem';
8764
8699
  DropdownItem_DropdownItem.propTypes = DropdownItem_propTypes;
8765
8700
  /* harmony default export */ const src_DropdownItem = (DropdownItem_DropdownItem);
8766
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
8767
-
8768
- var useIsomorphicEffect_isReactNative = typeof __webpack_require__.g !== 'undefined' && // @ts-ignore
8769
- __webpack_require__.g.navigator && // @ts-ignore
8770
- __webpack_require__.g.navigator.product === 'ReactNative';
8771
- var useIsomorphicEffect_isDOM = typeof document !== 'undefined';
8772
- /**
8773
- * Is `useLayoutEffect` in a DOM or React Native environment, otherwise resolves to useEffect
8774
- * Only useful to avoid the console warning.
8775
- *
8776
- * PREFER `useEffect` UNLESS YOU KNOW WHAT YOU ARE DOING.
8777
- *
8778
- * @category effects
8779
- */
8780
-
8781
- /* 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);
8782
8701
  ;// CONCATENATED MODULE: ./src/InputGroupContext.tsx
8783
8702
 
8784
8703
  const InputGroupContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
@@ -8967,7 +8886,7 @@ const DropdownMenu_DropdownMenu = /*#__PURE__*/external_root_React_commonjs2_rea
8967
8886
  placement
8968
8887
  });
8969
8888
  menuProps.ref = esm_useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref);
8970
- esm_useIsomorphicEffect(() => {
8889
+ useIsomorphicEffect(() => {
8971
8890
  // Popper's initial position for the menu is incorrect when
8972
8891
  // renderOnMount=true. Need to call update() to correct it.
8973
8892
  if (show) popper == null ? void 0 : popper.update();
@@ -10602,47 +10521,6 @@ InputGroup.displayName = 'InputGroup';
10602
10521
  Radio: InputGroupRadio,
10603
10522
  Checkbox: InputGroupCheckbox
10604
10523
  }));
10605
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergedRefs.js
10606
-
10607
-
10608
- var useMergedRefs_toFnRef = function toFnRef(ref) {
10609
- return !ref || typeof ref === 'function' ? ref : function (value) {
10610
- ref.current = value;
10611
- };
10612
- };
10613
-
10614
- function useMergedRefs_mergeRefs(refA, refB) {
10615
- var a = useMergedRefs_toFnRef(refA);
10616
- var b = useMergedRefs_toFnRef(refB);
10617
- return function (value) {
10618
- if (a) a(value);
10619
- if (b) b(value);
10620
- };
10621
- }
10622
- /**
10623
- * Create and returns a single callback ref composed from two other Refs.
10624
- *
10625
- * ```tsx
10626
- * const Button = React.forwardRef((props, ref) => {
10627
- * const [element, attachRef] = useCallbackRef<HTMLButtonElement>();
10628
- * const mergedRef = useMergedRefs(ref, attachRef);
10629
- *
10630
- * return <button ref={mergedRef} {...props}/>
10631
- * })
10632
- * ```
10633
- *
10634
- * @param refA A Callback or mutable Ref
10635
- * @param refB A Callback or mutable Ref
10636
- * @category refs
10637
- */
10638
-
10639
- function useMergedRefs_useMergedRefs(refA, refB) {
10640
- return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
10641
- return useMergedRefs_mergeRefs(refA, refB);
10642
- }, [refA, refB]);
10643
- }
10644
-
10645
- /* harmony default export */ const hooks_esm_useMergedRefs = (useMergedRefs_useMergedRefs);
10646
10524
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabContext.js
10647
10525
 
10648
10526
  const TabContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
@@ -10724,7 +10602,7 @@ function useNavItem({
10724
10602
  }
10725
10603
  }
10726
10604
 
10727
- props.onClick = useEventCallback_useEventCallback(e => {
10605
+ props.onClick = useEventCallback(e => {
10728
10606
  if (disabled) return;
10729
10607
  onClick == null ? void 0 : onClick(e);
10730
10608
 
@@ -10881,7 +10759,7 @@ const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
10881
10759
 
10882
10760
  needsRefocusRef.current = false;
10883
10761
  });
10884
- const mergedRef = hooks_esm_useMergedRefs(ref, listNode);
10762
+ const mergedRef = esm_useMergedRefs(ref, listNode);
10885
10763
  return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
10886
10764
  value: handleSelect,
10887
10765
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_NavContext.Provider, {
@@ -11102,36 +10980,6 @@ function scrollbarSize(recalc) {
11102
10980
 
11103
10981
  return size;
11104
10982
  }
11105
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
11106
-
11107
- /**
11108
- * A convenience hook around `useState` designed to be paired with
11109
- * the component [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) api.
11110
- * Callback refs are useful over `useRef()` when you need to respond to the ref being set
11111
- * instead of lazily accessing it in an effect.
11112
- *
11113
- * ```ts
11114
- * const [element, attachRef] = useCallbackRef<HTMLDivElement>()
11115
- *
11116
- * useEffect(() => {
11117
- * if (!element) return
11118
- *
11119
- * const calendar = new FullCalendar.Calendar(element)
11120
- *
11121
- * return () => {
11122
- * calendar.destroy()
11123
- * }
11124
- * }, [element])
11125
- *
11126
- * return <div ref={attachRef} />
11127
- * ```
11128
- *
11129
- * @category refs
11130
- */
11131
-
11132
- function useCallbackRef_useCallbackRef() {
11133
- return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
11134
- }
11135
10983
  ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/activeElement.js
11136
10984
 
11137
10985
  /**
@@ -11158,38 +11006,6 @@ function activeElement(doc) {
11158
11006
  return doc.body;
11159
11007
  }
11160
11008
  }
11161
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useUpdatedRef.js
11162
-
11163
- /**
11164
- * Returns a ref that is immediately updated with the new value
11165
- *
11166
- * @param value The Ref value
11167
- * @category refs
11168
- */
11169
-
11170
- function useUpdatedRef_useUpdatedRef(value) {
11171
- var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
11172
- valueRef.current = value;
11173
- return valueRef;
11174
- }
11175
- ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useWillUnmount.js
11176
-
11177
-
11178
- /**
11179
- * Attach a callback that fires when a component unmounts
11180
- *
11181
- * @param fn Handler to run when the component unmounts
11182
- * @category effects
11183
- */
11184
-
11185
- function useWillUnmount_useWillUnmount(fn) {
11186
- var onUnmount = useUpdatedRef_useUpdatedRef(fn);
11187
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
11188
- return function () {
11189
- return onUnmount.current();
11190
- };
11191
- }, []);
11192
- }
11193
11009
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/getScrollbarWidth.js
11194
11010
  /**
11195
11011
  * Get the width of the vertical window scrollbar if it's visible
@@ -11472,7 +11288,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11472
11288
  setExited(false);
11473
11289
  }
11474
11290
 
11475
- const handleShow = useEventCallback_useEventCallback(() => {
11291
+ const handleShow = useEventCallback(() => {
11476
11292
  modal.add();
11477
11293
  removeKeydownListenerRef.current = esm_listen(document, 'keydown', handleDocumentKeyDown);
11478
11294
  removeFocusListenerRef.current = esm_listen(document, 'focus', // the timeout is necessary b/c this will run before the new modal is mounted
@@ -11494,7 +11310,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11494
11310
  }
11495
11311
  }
11496
11312
  });
11497
- const handleHide = useEventCallback_useEventCallback(() => {
11313
+ const handleHide = useEventCallback(() => {
11498
11314
  modal.remove();
11499
11315
  removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();
11500
11316
  removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
@@ -11523,11 +11339,11 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11523
11339
  if (!exited) return;
11524
11340
  handleHide();
11525
11341
  }, [exited, handleHide]);
11526
- useWillUnmount_useWillUnmount(() => {
11342
+ useWillUnmount(() => {
11527
11343
  handleHide();
11528
11344
  }); // --------------------------------
11529
11345
 
11530
- const handleEnforceFocus = useEventCallback_useEventCallback(() => {
11346
+ const handleEnforceFocus = useEventCallback(() => {
11531
11347
  if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
11532
11348
  return;
11533
11349
  }
@@ -11538,7 +11354,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11538
11354
  modal.dialog.focus();
11539
11355
  }
11540
11356
  });
11541
- const handleBackdropClick = useEventCallback_useEventCallback(e => {
11357
+ const handleBackdropClick = useEventCallback(e => {
11542
11358
  if (e.target !== e.currentTarget) {
11543
11359
  return;
11544
11360
  }
@@ -11549,7 +11365,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11549
11365
  onHide();
11550
11366
  }
11551
11367
  });
11552
- const handleDocumentKeyDown = useEventCallback_useEventCallback(e => {
11368
+ const handleDocumentKeyDown = useEventCallback(e => {
11553
11369
  if (keyboard && e.keyCode === 27 && modal.isTopModal()) {
11554
11370
  onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
11555
11371
 
@@ -12232,7 +12048,7 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12232
12048
  const waitingForMouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
12233
12049
  const ignoreBackdropClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
12234
12050
  const removeStaticModalAnimationRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
12235
- const [modal, setModalRef] = useCallbackRef_useCallbackRef();
12051
+ const [modal, setModalRef] = useCallbackRef();
12236
12052
  const mergedRef = esm_useMergedRefs(ref, setModalRef);
12237
12053
  const handleHide = useEventCallback(onHide);
12238
12054
  const isRTL = useIsRTL();
@@ -12835,6 +12651,205 @@ NavbarToggle.displayName = 'NavbarToggle';
12835
12651
  NavbarToggle.propTypes = NavbarToggle_propTypes;
12836
12652
  NavbarToggle.defaultProps = NavbarToggle_defaultProps;
12837
12653
  /* harmony default export */ const src_NavbarToggle = (NavbarToggle);
12654
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMediaQuery.js
12655
+
12656
+
12657
+ var matchersByWindow = new WeakMap();
12658
+
12659
+ var getMatcher = function getMatcher(query, targetWindow) {
12660
+ if (!query || !targetWindow) return undefined;
12661
+ var matchers = matchersByWindow.get(targetWindow) || new Map();
12662
+ matchersByWindow.set(targetWindow, matchers);
12663
+ var mql = matchers.get(query);
12664
+
12665
+ if (!mql) {
12666
+ mql = targetWindow.matchMedia(query);
12667
+ mql.refCount = 0;
12668
+ matchers.set(mql.media, mql);
12669
+ }
12670
+
12671
+ return mql;
12672
+ };
12673
+ /**
12674
+ * Match a media query and get updates as the match changes. The media string is
12675
+ * passed directly to `window.matchMedia` and run as a Layout Effect, so initial
12676
+ * matches are returned before the browser has a chance to paint.
12677
+ *
12678
+ * ```tsx
12679
+ * function Page() {
12680
+ * const isWide = useMediaQuery('min-width: 1000px')
12681
+ *
12682
+ * return isWide ? "very wide" : 'not so wide'
12683
+ * }
12684
+ * ```
12685
+ *
12686
+ * Media query lists are also reused globally, hook calls for the same query
12687
+ * will only create a matcher once under the hood.
12688
+ *
12689
+ * @param query A media query
12690
+ * @param targetWindow The window to match against, uses the globally available one as a default.
12691
+ */
12692
+
12693
+
12694
+ function useMediaQuery(query, targetWindow) {
12695
+ if (targetWindow === void 0) {
12696
+ targetWindow = typeof window === 'undefined' ? undefined : window;
12697
+ }
12698
+
12699
+ var mql = getMatcher(query, targetWindow);
12700
+
12701
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(function () {
12702
+ return mql ? mql.matches : false;
12703
+ }),
12704
+ matches = _useState[0],
12705
+ setMatches = _useState[1];
12706
+
12707
+ useIsomorphicEffect(function () {
12708
+ var mql = getMatcher(query, targetWindow);
12709
+
12710
+ if (!mql) {
12711
+ return setMatches(false);
12712
+ }
12713
+
12714
+ var matchers = matchersByWindow.get(targetWindow);
12715
+
12716
+ var handleChange = function handleChange() {
12717
+ setMatches(mql.matches);
12718
+ };
12719
+
12720
+ mql.refCount++;
12721
+ mql.addListener(handleChange);
12722
+ handleChange();
12723
+ return function () {
12724
+ mql.removeListener(handleChange);
12725
+ mql.refCount--;
12726
+
12727
+ if (mql.refCount <= 0) {
12728
+ matchers == null ? void 0 : matchers.delete(mql.media);
12729
+ }
12730
+
12731
+ mql = undefined;
12732
+ };
12733
+ }, [query]);
12734
+ return matches;
12735
+ }
12736
+ ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useBreakpoint.js
12737
+
12738
+
12739
+ /**
12740
+ * Create a responsive hook we a set of breakpoint names and widths.
12741
+ * You can use any valid css units as well as a numbers (for pixels).
12742
+ *
12743
+ * **NOTE:** The object key order is important! it's assumed to be in order from smallest to largest
12744
+ *
12745
+ * ```ts
12746
+ * const useBreakpoint = createBreakpointHook({
12747
+ * xs: 0,
12748
+ * sm: 576,
12749
+ * md: 768,
12750
+ * lg: 992,
12751
+ * xl: 1200,
12752
+ * })
12753
+ * ```
12754
+ *
12755
+ * **Watch out!** using string values will sometimes construct media queries using css `calc()` which
12756
+ * is NOT supported in media queries by all browsers at the moment. use numbers for
12757
+ * the widest range of browser support.
12758
+ *
12759
+ * @param breakpointValues A object hash of names to breakpoint dimensions
12760
+ */
12761
+
12762
+ function createBreakpointHook(breakpointValues) {
12763
+ var names = Object.keys(breakpointValues);
12764
+
12765
+ function and(query, next) {
12766
+ if (query === next) {
12767
+ return next;
12768
+ }
12769
+
12770
+ return query ? query + " and " + next : next;
12771
+ }
12772
+
12773
+ function getNext(breakpoint) {
12774
+ return names[Math.min(names.indexOf(breakpoint) + 1, names.length - 1)];
12775
+ }
12776
+
12777
+ function getMaxQuery(breakpoint) {
12778
+ var next = getNext(breakpoint);
12779
+ var value = breakpointValues[next];
12780
+ if (typeof value === 'number') value = value - 0.2 + "px";else value = "calc(" + value + " - 0.2px)";
12781
+ return "(max-width: " + value + ")";
12782
+ }
12783
+
12784
+ function getMinQuery(breakpoint) {
12785
+ var value = breakpointValues[breakpoint];
12786
+
12787
+ if (typeof value === 'number') {
12788
+ value = value + "px";
12789
+ }
12790
+
12791
+ return "(min-width: " + value + ")";
12792
+ }
12793
+ /**
12794
+ * Match a set of breakpoints
12795
+ *
12796
+ * ```tsx
12797
+ * const MidSizeOnly = () => {
12798
+ * const isMid = useBreakpoint({ lg: 'down', sm: 'up' });
12799
+ *
12800
+ * if (isMid) return <div>On a Reasonable sized Screen!</div>
12801
+ * return null;
12802
+ * }
12803
+ * ```
12804
+ * @param breakpointMap An object map of breakpoints and directions, queries are constructed using "and" to join
12805
+ * breakpoints together
12806
+ * @param window Optionally specify the target window to match against (useful when rendering into iframes)
12807
+ */
12808
+
12809
+
12810
+ function useBreakpoint(breakpointOrMap, direction, window) {
12811
+ var breakpointMap;
12812
+
12813
+ if (typeof breakpointOrMap === 'object') {
12814
+ breakpointMap = breakpointOrMap;
12815
+ window = direction;
12816
+ direction = true;
12817
+ } else {
12818
+ var _breakpointMap;
12819
+
12820
+ direction = direction || true;
12821
+ breakpointMap = (_breakpointMap = {}, _breakpointMap[breakpointOrMap] = direction, _breakpointMap);
12822
+ }
12823
+
12824
+ var query = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
12825
+ return Object.entries(breakpointMap).reduce(function (query, _ref) {
12826
+ var key = _ref[0],
12827
+ direction = _ref[1];
12828
+
12829
+ if (direction === 'up' || direction === true) {
12830
+ query = and(query, getMinQuery(key));
12831
+ }
12832
+
12833
+ if (direction === 'down' || direction === true) {
12834
+ query = and(query, getMaxQuery(key));
12835
+ }
12836
+
12837
+ return query;
12838
+ }, '');
12839
+ }, [JSON.stringify(breakpointMap)]);
12840
+ return useMediaQuery(query, window);
12841
+ }
12842
+
12843
+ return useBreakpoint;
12844
+ }
12845
+ var useBreakpoint = createBreakpointHook({
12846
+ xs: 0,
12847
+ sm: 576,
12848
+ md: 768,
12849
+ lg: 992,
12850
+ xl: 1200
12851
+ });
12852
+ /* harmony default export */ const esm_useBreakpoint = (useBreakpoint);
12838
12853
  ;// CONCATENATED MODULE: ./src/OffcanvasBody.tsx
12839
12854
 
12840
12855
  /* harmony default export */ const OffcanvasBody = (createWithBsPrefix('offcanvas-body'));
@@ -13317,16 +13332,71 @@ var NavbarOffcanvas_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bo
13317
13332
 
13318
13333
 
13319
13334
 
13320
- const NavbarOffcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
13335
+
13336
+
13337
+
13338
+ const NavbarOffcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
13339
+ className,
13340
+ bsPrefix,
13341
+ backdrop,
13342
+ backdropClassName,
13343
+ keyboard,
13344
+ scroll,
13345
+ placement,
13346
+ autoFocus,
13347
+ enforceFocus,
13348
+ restoreFocus,
13349
+ restoreFocusOptions,
13350
+ onShow,
13351
+ onHide,
13352
+ onEscapeKeyDown,
13353
+ onEnter,
13354
+ onEntering,
13355
+ onEntered,
13356
+ onExit,
13357
+ onExiting,
13358
+ onExited,
13359
+ ...props
13360
+ }, ref) => {
13321
13361
  const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
13322
- return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Offcanvas, {
13362
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas');
13363
+ const hasExpandProp = typeof (context == null ? void 0 : context.expand) === 'string';
13364
+ const shouldExpand = esm_useBreakpoint(hasExpandProp ? context.expand : 'xs', 'up');
13365
+ return hasExpandProp && shouldExpand ? /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13366
+ ref: ref,
13367
+ ...props,
13368
+ className: classnames_default()(className, bsPrefix, `${bsPrefix}-${placement}`)
13369
+ }, void 0, false, {
13370
+ fileName: NavbarOffcanvas_jsxFileName,
13371
+ lineNumber: 47,
13372
+ columnNumber: 7
13373
+ }, undefined) : /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Offcanvas, {
13323
13374
  ref: ref,
13324
13375
  show: !!(context != null && context.expanded),
13376
+ bsPrefix: bsPrefix,
13377
+ backdrop: backdrop,
13378
+ backdropClassName: backdropClassName,
13379
+ keyboard: keyboard,
13380
+ scroll: scroll,
13381
+ placement: placement,
13382
+ autoFocus: autoFocus,
13383
+ enforceFocus: enforceFocus,
13384
+ restoreFocus: restoreFocus,
13385
+ restoreFocusOptions: restoreFocusOptions,
13386
+ onShow: onShow,
13387
+ onHide: onHide,
13388
+ onEscapeKeyDown: onEscapeKeyDown,
13389
+ onEnter: onEnter,
13390
+ onEntering: onEntering,
13391
+ onEntered: onEntered,
13392
+ onExit: onExit,
13393
+ onExiting: onExiting,
13394
+ onExited: onExited,
13325
13395
  ...props
13326
13396
  }, void 0, false, {
13327
13397
  fileName: NavbarOffcanvas_jsxFileName,
13328
- lineNumber: 10,
13329
- columnNumber: 12
13398
+ lineNumber: 53,
13399
+ columnNumber: 7
13330
13400
  }, undefined);
13331
13401
  });
13332
13402
  NavbarOffcanvas.displayName = 'NavbarOffcanvas';
@@ -13497,8 +13567,9 @@ const Navbar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
13497
13567
  const navbarContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
13498
13568
  onToggle: () => onToggle == null ? void 0 : onToggle(!expanded),
13499
13569
  bsPrefix,
13500
- expanded: !!expanded
13501
- }), [bsPrefix, expanded, onToggle]);
13570
+ expanded: !!expanded,
13571
+ expand
13572
+ }), [bsPrefix, expanded, expand, onToggle]);
13502
13573
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(NavbarContext.Provider, {
13503
13574
  value: navbarContext,
13504
13575
  children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_SelectableContext.Provider, {
@@ -13509,17 +13580,17 @@ const Navbar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
13509
13580
  className: classnames_default()(className, bsPrefix, expand && expandClass, variant && `${bsPrefix}-${variant}`, bg && `bg-${bg}`, sticky && `sticky-${sticky}`, fixed && `fixed-${fixed}`)
13510
13581
  }, void 0, false, {
13511
13582
  fileName: Navbar_jsxFileName,
13512
- lineNumber: 200,
13583
+ lineNumber: 201,
13513
13584
  columnNumber: 11
13514
13585
  }, undefined)
13515
13586
  }, void 0, false, {
13516
13587
  fileName: Navbar_jsxFileName,
13517
- lineNumber: 199,
13588
+ lineNumber: 200,
13518
13589
  columnNumber: 9
13519
13590
  }, undefined)
13520
13591
  }, void 0, false, {
13521
13592
  fileName: Navbar_jsxFileName,
13522
- lineNumber: 198,
13593
+ lineNumber: 199,
13523
13594
  columnNumber: 7
13524
13595
  }, undefined);
13525
13596
  });
@@ -13673,7 +13744,7 @@ function useRootClose(ref, onRootClose, {
13673
13744
  disabled,
13674
13745
  clickTrigger
13675
13746
  });
13676
- const handleKeyUp = useEventCallback_useEventCallback(e => {
13747
+ const handleKeyUp = useEventCallback(e => {
13677
13748
  if (e.keyCode === escapeKeyCode) {
13678
13749
  onClose(e);
13679
13750
  }
@@ -13727,7 +13798,7 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
13727
13798
  } = props;
13728
13799
  const [rootElement, attachRef] = useCallbackRef();
13729
13800
  const [arrowElement, attachArrowRef] = useCallbackRef();
13730
- const mergedRef = hooks_esm_useMergedRefs(attachRef, outerRef);
13801
+ const mergedRef = esm_useMergedRefs(attachRef, outerRef);
13731
13802
  const container = useWaitForDOMRef(props.container);
13732
13803
  const target = useWaitForDOMRef(props.target);
13733
13804
  const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!props.show);
@@ -15554,9 +15625,10 @@ Tabs.Panel = esm_TabPanel;
15554
15625
  /* harmony default export */ const esm_Tabs = (Tabs);
15555
15626
  ;// CONCATENATED MODULE: ./src/getTabTransitionComponent.ts
15556
15627
 
15628
+
15557
15629
  function getTabTransitionComponent(transition) {
15558
15630
  if (typeof transition === 'boolean') {
15559
- return transition ? src_Fade : undefined;
15631
+ return transition ? src_Fade : esm_NoopTransition;
15560
15632
  }
15561
15633
 
15562
15634
  return transition;