react-bootstrap 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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/hooks/esm/useCallbackRef.js
3147
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCallbackRef.js
3148
3148
 
3149
3149
  /**
3150
3150
  * A convenience hook around `useState` designed to be paired with
@@ -3174,7 +3174,37 @@ 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/hooks/esm/useEventListener.js
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
3178
3208
 
3179
3209
 
3180
3210
  /**
@@ -3192,7 +3222,7 @@ function useEventListener_useEventListener(eventTarget, event, listener, capture
3192
3222
  capture = false;
3193
3223
  }
3194
3224
 
3195
- var handler = useEventCallback(listener);
3225
+ var handler = useEventCallback_useEventCallback(listener);
3196
3226
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3197
3227
  var target = typeof eventTarget === 'function' ? eventTarget() : eventTarget;
3198
3228
  target.addEventListener(event, handler, capture);
@@ -3201,7 +3231,7 @@ function useEventListener_useEventListener(eventTarget, event, listener, capture
3201
3231
  };
3202
3232
  }, [eventTarget]);
3203
3233
  }
3204
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useGlobalListener.js
3234
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useGlobalListener.js
3205
3235
 
3206
3236
 
3207
3237
  /**
@@ -3229,7 +3259,7 @@ function useGlobalListener(event, handler, capture) {
3229
3259
  }, []);
3230
3260
  return useEventListener(documentTarget, event, handler, capture);
3231
3261
  }
3232
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useInterval.js
3262
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useInterval.js
3233
3263
 
3234
3264
 
3235
3265
  /**
@@ -3288,7 +3318,7 @@ function useInterval(fn, ms, paused, runImmediately) {
3288
3318
  }
3289
3319
 
3290
3320
  /* harmony default export */ const esm_useInterval = ((/* unused pure expression or super */ null && (useInterval)));
3291
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useRafInterval.js
3321
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useRafInterval.js
3292
3322
 
3293
3323
 
3294
3324
 
@@ -3327,7 +3357,7 @@ function useRafInterval(fn, ms, paused) {
3327
3357
  }
3328
3358
 
3329
3359
  /* harmony default export */ const esm_useRafInterval = ((/* unused pure expression or super */ null && (useRafInterval)));
3330
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeState.js
3360
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeState.js
3331
3361
  function useMergeState_extends() {
3332
3362
  useMergeState_extends = Object.assign || function (target) {
3333
3363
  for (var i = 1; i < arguments.length; i++) {
@@ -3384,7 +3414,7 @@ function useMergeState_useMergeState(initialState) {
3384
3414
  }, [setState]);
3385
3415
  return [state, updater];
3386
3416
  }
3387
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeStateFromProps.js
3417
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeStateFromProps.js
3388
3418
 
3389
3419
  function useMergeStateFromProps(props, gDSFP, initialState) {
3390
3420
  var _useMergeState = useMergeState(initialState),
@@ -3395,7 +3425,7 @@ function useMergeStateFromProps(props, gDSFP, initialState) {
3395
3425
  if (nextState !== null) setState(nextState);
3396
3426
  return [state, setState];
3397
3427
  }
3398
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
3428
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMounted.js
3399
3429
 
3400
3430
  /**
3401
3431
  * Track whether a component is current mounted. Generally less preferable than
@@ -3430,7 +3460,7 @@ function useMounted() {
3430
3460
  }, []);
3431
3461
  return isMounted.current;
3432
3462
  }
3433
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/usePrevious.js
3463
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/usePrevious.js
3434
3464
 
3435
3465
  /**
3436
3466
  * Store the last of some value. Tracked via a `Ref` only updating it
@@ -3457,7 +3487,7 @@ function usePrevious(value) {
3457
3487
  });
3458
3488
  return ref.current;
3459
3489
  }
3460
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useImage.js
3490
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useImage.js
3461
3491
 
3462
3492
  /**
3463
3493
  * Fetch and load an image for programatic use such as in a `<canvas>` element.
@@ -3536,7 +3566,7 @@ function useImage(imageOrUrl, crossOrigin) {
3536
3566
  }, [imageOrUrl, crossOrigin]);
3537
3567
  return state;
3538
3568
  }
3539
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
3569
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useIsomorphicEffect.js
3540
3570
 
3541
3571
  var isReactNative = typeof __webpack_require__.g !== 'undefined' && // @ts-ignore
3542
3572
  __webpack_require__.g.navigator && // @ts-ignore
@@ -3552,7 +3582,7 @@ var isDOM = typeof document !== 'undefined';
3552
3582
  */
3553
3583
 
3554
3584
  /* 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);
3555
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useResizeObserver.js
3585
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useResizeObserver.js
3556
3586
 
3557
3587
 
3558
3588
  var targetMap = new WeakMap();
@@ -3605,7 +3635,7 @@ function useResizeObserver(element) {
3605
3635
  }, [element]);
3606
3636
  return rect;
3607
3637
  }
3608
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/index.js
3638
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/index.js
3609
3639
 
3610
3640
 
3611
3641
 
@@ -3779,7 +3809,7 @@ const Anchor = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
3779
3809
  const [buttonProps] = useButtonProps(Object.assign({
3780
3810
  tagName: 'a'
3781
3811
  }, props));
3782
- const handleKeyDown = useEventCallback(e => {
3812
+ const handleKeyDown = useEventCallback_useEventCallback(e => {
3783
3813
  buttonProps.onKeyDown(e);
3784
3814
  onKeyDown == null ? void 0 : onKeyDown(e);
3785
3815
  });
@@ -4818,6 +4848,42 @@ function useUpdateEffect(fn, deps) {
4818
4848
  }
4819
4849
 
4820
4850
  /* 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
+ }
4821
4887
  ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdatedRef.js
4822
4888
 
4823
4889
  /**
@@ -4892,7 +4958,7 @@ function setChainedTimeout(handleRef, fn, timeoutAtMs) {
4892
4958
 
4893
4959
 
4894
4960
  function useTimeout() {
4895
- var isMounted = useMounted(); // types are confused between node and web here IDK
4961
+ var isMounted = useMounted_useMounted(); // types are confused between node and web here IDK
4896
4962
 
4897
4963
  var handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
4898
4964
  useWillUnmount(function () {
@@ -5095,7 +5161,7 @@ const Carousel_propTypes = {
5095
5161
  /**
5096
5162
  * The amount of time to delay between automatically cycling an item. If `null`, carousel will not automatically cycle.
5097
5163
  */
5098
- interval: (prop_types_default()).number,
5164
+ interval: prop_types_default().oneOfType([(prop_types_default()).number, prop_types_default().oneOf([null])]),
5099
5165
 
5100
5166
  /** Whether the carousel should react to keyboard events. */
5101
5167
  keyboard: (prop_types_default()).bool,
@@ -5673,7 +5739,7 @@ var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
5673
5739
  function qsa(element, selector) {
5674
5740
  return toArray(element.querySelectorAll(selector));
5675
5741
  }
5676
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useForceUpdate.js
5742
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useForceUpdate.js
5677
5743
 
5678
5744
  /**
5679
5745
  * Returns a function that triggers a component update. the hook equivalent to
@@ -5792,7 +5858,7 @@ function dequal(foo, bar) {
5792
5858
  return foo !== foo && bar !== bar;
5793
5859
  }
5794
5860
 
5795
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useSafeState.js
5861
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useSafeState.js
5796
5862
 
5797
5863
 
5798
5864
 
@@ -7867,6 +7933,11 @@ function isModifiedEvent(event) {
7867
7933
  }
7868
7934
 
7869
7935
  const getRefTarget = ref => ref && ('current' in ref ? ref.current : ref);
7936
+ const InitialTriggerEvents = {
7937
+ click: 'mousedown',
7938
+ mouseup: 'mousedown',
7939
+ pointerup: 'pointerdown'
7940
+ };
7870
7941
  /**
7871
7942
  * The `useClickOutside` hook registers your callback on the document that fires
7872
7943
  * when a pointer event is registered outside of the provided ref or element.
@@ -7883,12 +7954,21 @@ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
7883
7954
  clickTrigger = 'click'
7884
7955
  } = {}) {
7885
7956
  const preventMouseClickOutsideRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7957
+ const waitingForTrigger = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7886
7958
  const handleMouseCapture = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(e => {
7887
7959
  const currentTarget = getRefTarget(ref);
7888
7960
  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);
7961
+ preventMouseClickOutsideRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target) || waitingForTrigger.current;
7962
+ waitingForTrigger.current = false;
7890
7963
  }, [ref]);
7891
- const handleMouse = useEventCallback(e => {
7964
+ const handleInitialMouse = useEventCallback_useEventCallback(e => {
7965
+ const currentTarget = getRefTarget(ref);
7966
+
7967
+ if (currentTarget && contains_contains(currentTarget, e.target)) {
7968
+ waitingForTrigger.current = true;
7969
+ }
7970
+ });
7971
+ const handleMouse = useEventCallback_useEventCallback(e => {
7892
7972
  if (!preventMouseClickOutsideRef.current) {
7893
7973
  onClickOutside(e);
7894
7974
  }
@@ -7898,10 +7978,16 @@ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
7898
7978
  const doc = ownerDocument(getRefTarget(ref)); // Store the current event to avoid triggering handlers immediately
7899
7979
  // https://github.com/facebook/react/issues/20074
7900
7980
 
7901
- let currentEvent = (doc.defaultView || window).event; // Use capture for this listener so it fires before React's listener, to
7981
+ let currentEvent = (doc.defaultView || window).event;
7982
+ let removeInitialTriggerListener = null;
7983
+
7984
+ if (InitialTriggerEvents[clickTrigger]) {
7985
+ removeInitialTriggerListener = esm_listen(doc, InitialTriggerEvents[clickTrigger], handleInitialMouse, true);
7986
+ } // Use capture for this listener so it fires before React's listener, to
7902
7987
  // avoid false positives in the contains() check below if the target DOM
7903
7988
  // element is removed in the React mouse callback.
7904
7989
 
7990
+
7905
7991
  const removeMouseCaptureListener = esm_listen(doc, clickTrigger, handleMouseCapture, true);
7906
7992
  const removeMouseListener = esm_listen(doc, clickTrigger, e => {
7907
7993
  // skip if this event is the same as the one running when we added the handlers
@@ -7919,11 +8005,12 @@ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
7919
8005
  }
7920
8006
 
7921
8007
  return () => {
8008
+ removeInitialTriggerListener == null ? void 0 : removeInitialTriggerListener();
7922
8009
  removeMouseCaptureListener();
7923
8010
  removeMouseListener();
7924
8011
  mobileSafariHackListeners.forEach(remove => remove());
7925
8012
  };
7926
- }, [ref, disabled, clickTrigger, handleMouseCapture, handleMouse]);
8013
+ }, [ref, disabled, clickTrigger, handleMouseCapture, handleInitialMouse, handleMouse]);
7927
8014
  }
7928
8015
 
7929
8016
  /* harmony default export */ const esm_useClickOutside = (useClickOutside);
@@ -8328,7 +8415,7 @@ function useDropdownItem({
8328
8415
  } = navContext || {};
8329
8416
  const eventKey = makeEventKey(key, href);
8330
8417
  const isActive = active == null && key != null ? makeEventKey(activeKey) === eventKey : active;
8331
- const handleClick = useEventCallback(event => {
8418
+ const handleClick = useEventCallback_useEventCallback(event => {
8332
8419
  if (disabled) return;
8333
8420
  onClick == null ? void 0 : onClick(event);
8334
8421
 
@@ -8447,7 +8534,7 @@ function Dropdown({
8447
8534
  source
8448
8535
  });
8449
8536
  }, [onToggle]);
8450
- const handleSelect = useEventCallback((key, event) => {
8537
+ const handleSelect = useEventCallback_useEventCallback((key, event) => {
8451
8538
  onSelect == null ? void 0 : onSelect(key, event);
8452
8539
  toggle(false, event, 'select');
8453
8540
 
@@ -8469,12 +8556,12 @@ function Dropdown({
8469
8556
  focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);
8470
8557
  }
8471
8558
 
8472
- const focusToggle = useEventCallback(() => {
8559
+ const focusToggle = useEventCallback_useEventCallback(() => {
8473
8560
  if (toggleElement && toggleElement.focus) {
8474
8561
  toggleElement.focus();
8475
8562
  }
8476
8563
  });
8477
- const maybeFocusFirst = useEventCallback(() => {
8564
+ const maybeFocusFirst = useEventCallback_useEventCallback(() => {
8478
8565
  const type = lastSourceEvent.current;
8479
8566
  let focusType = focusFirstItemOnShow;
8480
8567
 
@@ -8676,6 +8763,22 @@ const DropdownItem_DropdownItem = /*#__PURE__*/external_root_React_commonjs2_rea
8676
8763
  DropdownItem_DropdownItem.displayName = 'DropdownItem';
8677
8764
  DropdownItem_DropdownItem.propTypes = DropdownItem_propTypes;
8678
8765
  /* 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);
8679
8782
  ;// CONCATENATED MODULE: ./src/InputGroupContext.tsx
8680
8783
 
8681
8784
  const InputGroupContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
@@ -8757,7 +8860,6 @@ const DropdownMenu_propTypes = {
8757
8860
  * @type {"start"|"end"|{ sm: "start"|"end" }|{ md: "start"|"end" }|{ lg: "start"|"end" }|{ xl: "start"|"end"}|{ xxl: "start"|"end"} }
8758
8861
  */
8759
8862
  align: alignPropType,
8760
- onSelect: (prop_types_default()).func,
8761
8863
 
8762
8864
  /**
8763
8865
  * Which event when fired outside the component will cause it to be closed
@@ -8865,7 +8967,7 @@ const DropdownMenu_DropdownMenu = /*#__PURE__*/external_root_React_commonjs2_rea
8865
8967
  placement
8866
8968
  });
8867
8969
  menuProps.ref = esm_useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref);
8868
- useIsomorphicEffect(() => {
8970
+ esm_useIsomorphicEffect(() => {
8869
8971
  // Popper's initial position for the menu is incorrect when
8870
8972
  // renderOnMount=true. Need to call update() to correct it.
8871
8973
  if (show) popper == null ? void 0 : popper.update();
@@ -8901,7 +9003,7 @@ const DropdownMenu_DropdownMenu = /*#__PURE__*/external_root_React_commonjs2_rea
8901
9003
  className: classnames_default()(className, prefix, show && 'show', alignEnd && `${prefix}-end`, variant && `${prefix}-${variant}`, ...alignClasses)
8902
9004
  }, void 0, false, {
8903
9005
  fileName: DropdownMenu_jsxFileName,
8904
- lineNumber: 213,
9006
+ lineNumber: 209,
8905
9007
  columnNumber: 9
8906
9008
  }, undefined);
8907
9009
  });
@@ -10500,6 +10602,47 @@ InputGroup.displayName = 'InputGroup';
10500
10602
  Radio: InputGroupRadio,
10501
10603
  Checkbox: InputGroupCheckbox
10502
10604
  }));
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);
10503
10646
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabContext.js
10504
10647
 
10505
10648
  const TabContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
@@ -10581,7 +10724,7 @@ function useNavItem({
10581
10724
  }
10582
10725
  }
10583
10726
 
10584
- props.onClick = useEventCallback(e => {
10727
+ props.onClick = useEventCallback_useEventCallback(e => {
10585
10728
  if (disabled) return;
10586
10729
  onClick == null ? void 0 : onClick(e);
10587
10730
 
@@ -10738,7 +10881,7 @@ const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
10738
10881
 
10739
10882
  needsRefocusRef.current = false;
10740
10883
  });
10741
- const mergedRef = esm_useMergedRefs(ref, listNode);
10884
+ const mergedRef = hooks_esm_useMergedRefs(ref, listNode);
10742
10885
  return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
10743
10886
  value: handleSelect,
10744
10887
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_NavContext.Provider, {
@@ -10959,6 +11102,36 @@ function scrollbarSize(recalc) {
10959
11102
 
10960
11103
  return size;
10961
11104
  }
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
+ }
10962
11135
  ;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/activeElement.js
10963
11136
 
10964
11137
  /**
@@ -10985,6 +11158,38 @@ function activeElement(doc) {
10985
11158
  return doc.body;
10986
11159
  }
10987
11160
  }
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
+ }
10988
11193
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/getScrollbarWidth.js
10989
11194
  /**
10990
11195
  * Get the width of the vertical window scrollbar if it's visible
@@ -11267,7 +11472,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11267
11472
  setExited(false);
11268
11473
  }
11269
11474
 
11270
- const handleShow = useEventCallback(() => {
11475
+ const handleShow = useEventCallback_useEventCallback(() => {
11271
11476
  modal.add();
11272
11477
  removeKeydownListenerRef.current = esm_listen(document, 'keydown', handleDocumentKeyDown);
11273
11478
  removeFocusListenerRef.current = esm_listen(document, 'focus', // the timeout is necessary b/c this will run before the new modal is mounted
@@ -11289,7 +11494,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11289
11494
  }
11290
11495
  }
11291
11496
  });
11292
- const handleHide = useEventCallback(() => {
11497
+ const handleHide = useEventCallback_useEventCallback(() => {
11293
11498
  modal.remove();
11294
11499
  removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();
11295
11500
  removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
@@ -11318,11 +11523,11 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11318
11523
  if (!exited) return;
11319
11524
  handleHide();
11320
11525
  }, [exited, handleHide]);
11321
- useWillUnmount(() => {
11526
+ useWillUnmount_useWillUnmount(() => {
11322
11527
  handleHide();
11323
11528
  }); // --------------------------------
11324
11529
 
11325
- const handleEnforceFocus = useEventCallback(() => {
11530
+ const handleEnforceFocus = useEventCallback_useEventCallback(() => {
11326
11531
  if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
11327
11532
  return;
11328
11533
  }
@@ -11333,7 +11538,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11333
11538
  modal.dialog.focus();
11334
11539
  }
11335
11540
  });
11336
- const handleBackdropClick = useEventCallback(e => {
11541
+ const handleBackdropClick = useEventCallback_useEventCallback(e => {
11337
11542
  if (e.target !== e.currentTarget) {
11338
11543
  return;
11339
11544
  }
@@ -11344,7 +11549,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
11344
11549
  onHide();
11345
11550
  }
11346
11551
  });
11347
- const handleDocumentKeyDown = useEventCallback(e => {
11552
+ const handleDocumentKeyDown = useEventCallback_useEventCallback(e => {
11348
11553
  if (keyboard && e.keyCode === 27 && modal.isTopModal()) {
11349
11554
  onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
11350
11555
 
@@ -11949,7 +12154,9 @@ const Modal_propTypes = {
11949
12154
  * @private
11950
12155
  */
11951
12156
  container: (prop_types_default()).any,
11952
- 'aria-labelledby': (prop_types_default()).any
12157
+ 'aria-labelledby': (prop_types_default()).string,
12158
+ 'aria-describedby': (prop_types_default()).string,
12159
+ 'aria-label': (prop_types_default()).string
11953
12160
  };
11954
12161
  const Modal_defaultProps = {
11955
12162
  show: false,
@@ -11968,7 +12175,7 @@ function DialogTransition(props) {
11968
12175
  timeout: null
11969
12176
  }, void 0, false, {
11970
12177
  fileName: Modal_jsxFileName,
11971
- lineNumber: 236,
12178
+ lineNumber: 238,
11972
12179
  columnNumber: 10
11973
12180
  }, this);
11974
12181
  }
@@ -11978,7 +12185,7 @@ function BackdropTransition(props) {
11978
12185
  timeout: null
11979
12186
  }, void 0, false, {
11980
12187
  fileName: Modal_jsxFileName,
11981
- lineNumber: 240,
12188
+ lineNumber: 242,
11982
12189
  columnNumber: 10
11983
12190
  }, this);
11984
12191
  }
@@ -11994,6 +12201,8 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
11994
12201
  children,
11995
12202
  dialogAs: Dialog,
11996
12203
  'aria-labelledby': ariaLabelledby,
12204
+ 'aria-describedby': ariaDescribedby,
12205
+ 'aria-label': ariaLabel,
11997
12206
 
11998
12207
  /* BaseModal props */
11999
12208
  show,
@@ -12023,7 +12232,7 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12023
12232
  const waitingForMouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
12024
12233
  const ignoreBackdropClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
12025
12234
  const removeStaticModalAnimationRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
12026
- const [modal, setModalRef] = useCallbackRef();
12235
+ const [modal, setModalRef] = useCallbackRef_useCallbackRef();
12027
12236
  const mergedRef = esm_useMergedRefs(ref, setModalRef);
12028
12237
  const handleHide = useEventCallback(onHide);
12029
12238
  const isRTL = useIsRTL();
@@ -12115,7 +12324,6 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12115
12324
 
12116
12325
  const handleEnter = (node, isAppearing) => {
12117
12326
  if (node) {
12118
- node.style.display = 'block';
12119
12327
  updateDialogStyle(node);
12120
12328
  }
12121
12329
 
@@ -12145,16 +12353,15 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12145
12353
  className: classnames_default()(`${bsPrefix}-backdrop`, backdropClassName, !animation && 'show')
12146
12354
  }, void 0, false, {
12147
12355
  fileName: Modal_jsxFileName,
12148
- lineNumber: 431,
12356
+ lineNumber: 434,
12149
12357
  columnNumber: 11
12150
12358
  }, undefined), [animation, backdropClassName, bsPrefix]);
12151
12359
  const baseModalStyle = { ...style,
12152
12360
  ...modalStyle
12153
- }; // Sets `display` always block when `animation` is false
12361
+ }; // If `display` is not set to block, autoFocus inside the modal fails
12362
+ // https://github.com/react-bootstrap/react-bootstrap/issues/5102
12154
12363
 
12155
- if (!animation) {
12156
- baseModalStyle.display = 'block';
12157
- }
12364
+ baseModalStyle.display = 'block';
12158
12365
 
12159
12366
  const renderDialog = dialogProps => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
12160
12367
  role: "dialog",
@@ -12163,7 +12370,9 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12163
12370
  className: classnames_default()(className, bsPrefix, animateStaticModal && `${bsPrefix}-static`),
12164
12371
  onClick: backdrop ? handleClick : undefined,
12165
12372
  onMouseUp: handleMouseUp,
12373
+ "aria-label": ariaLabel,
12166
12374
  "aria-labelledby": ariaLabelledby,
12375
+ "aria-describedby": ariaDescribedby,
12167
12376
  children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Dialog, { ...props,
12168
12377
  onMouseDown: handleDialogMouseDown,
12169
12378
  className: dialogClassName,
@@ -12171,12 +12380,12 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12171
12380
  children: children
12172
12381
  }, void 0, false, {
12173
12382
  fileName: Modal_jsxFileName,
12174
- lineNumber: 466,
12383
+ lineNumber: 470,
12175
12384
  columnNumber: 11
12176
12385
  }, undefined)
12177
12386
  }, void 0, false, {
12178
12387
  fileName: Modal_jsxFileName,
12179
- lineNumber: 451,
12388
+ lineNumber: 453,
12180
12389
  columnNumber: 9
12181
12390
  }, undefined);
12182
12391
 
@@ -12209,12 +12418,12 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
12209
12418
  renderDialog: renderDialog
12210
12419
  }, void 0, false, {
12211
12420
  fileName: Modal_jsxFileName,
12212
- lineNumber: 479,
12421
+ lineNumber: 483,
12213
12422
  columnNumber: 11
12214
12423
  }, undefined)
12215
12424
  }, void 0, false, {
12216
12425
  fileName: Modal_jsxFileName,
12217
- lineNumber: 478,
12426
+ lineNumber: 482,
12218
12427
  columnNumber: 9
12219
12428
  }, undefined);
12220
12429
  });
@@ -13464,7 +13673,7 @@ function useRootClose(ref, onRootClose, {
13464
13673
  disabled,
13465
13674
  clickTrigger
13466
13675
  });
13467
- const handleKeyUp = useEventCallback(e => {
13676
+ const handleKeyUp = useEventCallback_useEventCallback(e => {
13468
13677
  if (e.keyCode === escapeKeyCode) {
13469
13678
  onClose(e);
13470
13679
  }
@@ -13518,7 +13727,7 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
13518
13727
  } = props;
13519
13728
  const [rootElement, attachRef] = useCallbackRef();
13520
13729
  const [arrowElement, attachArrowRef] = useCallbackRef();
13521
- const mergedRef = esm_useMergedRefs(attachRef, outerRef);
13730
+ const mergedRef = hooks_esm_useMergedRefs(attachRef, outerRef);
13522
13731
  const container = useWaitForDOMRef(props.container);
13523
13732
  const target = useWaitForDOMRef(props.target);
13524
13733
  const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!props.show);
@@ -14225,33 +14434,31 @@ PageItem.displayName = 'PageItem';
14225
14434
  /* harmony default export */ const src_PageItem = (PageItem);
14226
14435
 
14227
14436
  function createButton(name, defaultValue, label = name) {
14228
- function Button({
14437
+ const Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14229
14438
  children,
14230
14439
  ...props
14231
- }) {
14232
- return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(PageItem, { ...props,
14233
- children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
14234
- "aria-hidden": "true",
14235
- children: children || defaultValue
14236
- }, void 0, false, {
14237
- fileName: PageItem_jsxFileName,
14238
- lineNumber: 80,
14239
- columnNumber: 9
14240
- }, this), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
14241
- className: "visually-hidden",
14242
- children: label
14243
- }, void 0, false, {
14244
- fileName: PageItem_jsxFileName,
14245
- lineNumber: 81,
14246
- columnNumber: 9
14247
- }, this)]
14248
- }, void 0, true, {
14440
+ }, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(PageItem, { ...props,
14441
+ ref: ref,
14442
+ children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
14443
+ "aria-hidden": "true",
14444
+ children: children || defaultValue
14445
+ }, void 0, false, {
14249
14446
  fileName: PageItem_jsxFileName,
14250
- lineNumber: 79,
14251
- columnNumber: 7
14252
- }, this);
14253
- }
14254
-
14447
+ lineNumber: 80,
14448
+ columnNumber: 9
14449
+ }, this), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
14450
+ className: "visually-hidden",
14451
+ children: label
14452
+ }, void 0, false, {
14453
+ fileName: PageItem_jsxFileName,
14454
+ lineNumber: 81,
14455
+ columnNumber: 9
14456
+ }, this)]
14457
+ }, void 0, true, {
14458
+ fileName: PageItem_jsxFileName,
14459
+ lineNumber: 79,
14460
+ columnNumber: 7
14461
+ }, this));
14255
14462
  Button.displayName = name;
14256
14463
  return Button;
14257
14464
  }
@@ -15169,7 +15376,7 @@ function NoopTransition({
15169
15376
 
15170
15377
  /* harmony default export */ const esm_NoopTransition = (NoopTransition);
15171
15378
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabPanel.js
15172
- const TabPanel_excluded = ["active", "eventKey", "mountOnEnter", "transition", "unmountOnExit", "role"],
15379
+ const TabPanel_excluded = ["active", "eventKey", "mountOnEnter", "transition", "unmountOnExit", "role", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited"],
15173
15380
  _excluded2 = ["activeKey", "getControlledId", "getControllerId"],
15174
15381
  _excluded3 = ["as"];
15175
15382
 
@@ -15201,7 +15408,13 @@ function useTabPanel(_ref) {
15201
15408
  mountOnEnter,
15202
15409
  transition,
15203
15410
  unmountOnExit,
15204
- role = 'tabpanel'
15411
+ role = 'tabpanel',
15412
+ onEnter,
15413
+ onEntering,
15414
+ onEntered,
15415
+ onExit,
15416
+ onExiting,
15417
+ onExited
15205
15418
  } = _ref,
15206
15419
  props = TabPanel_objectWithoutPropertiesLoose(_ref, TabPanel_excluded);
15207
15420
 
@@ -15213,7 +15426,13 @@ function useTabPanel(_ref) {
15213
15426
  isActive: active,
15214
15427
  mountOnEnter,
15215
15428
  transition,
15216
- unmountOnExit
15429
+ unmountOnExit,
15430
+ onEnter,
15431
+ onEntering,
15432
+ onEntered,
15433
+ onExit,
15434
+ onExiting,
15435
+ onExited
15217
15436
  }];
15218
15437
 
15219
15438
  const {
@@ -15233,7 +15452,13 @@ function useTabPanel(_ref) {
15233
15452
  isActive: active == null && key != null ? makeEventKey(activeKey) === key : active,
15234
15453
  transition: transition || rest.transition,
15235
15454
  mountOnEnter: mountOnEnter != null ? mountOnEnter : rest.mountOnEnter,
15236
- unmountOnExit: unmountOnExit != null ? unmountOnExit : rest.unmountOnExit
15455
+ unmountOnExit: unmountOnExit != null ? unmountOnExit : rest.unmountOnExit,
15456
+ onEnter,
15457
+ onEntering,
15458
+ onEntered,
15459
+ onExit,
15460
+ onExiting,
15461
+ onExited
15237
15462
  }];
15238
15463
  }
15239
15464
  const TabPanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595