react-bootstrap 2.0.2 → 2.1.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.
@@ -1626,8 +1626,8 @@ function createBootstrapComponent(Component, opts) {
1626
1626
  bsPrefix: bsPrefix
1627
1627
  }, void 0, false, {
1628
1628
  fileName: ThemeProvider_jsxFileName,
1629
- lineNumber: 56,
1630
- columnNumber: 12
1629
+ lineNumber: 57,
1630
+ columnNumber: 14
1631
1631
  }, this);
1632
1632
  });
1633
1633
  Wrapped.displayName = `Bootstrap(${Component.displayName || Component.name})`;
@@ -2694,6 +2694,9 @@ Collapse.defaultProps = defaultProps;
2694
2694
  /* harmony default export */ const src_Collapse = (Collapse);
2695
2695
  ;// CONCATENATED MODULE: ./src/AccordionContext.ts
2696
2696
 
2697
+ function isAccordionItemSelected(activeEventKey, eventKey) {
2698
+ return Array.isArray(activeEventKey) ? activeEventKey.includes(eventKey) : activeEventKey === eventKey;
2699
+ }
2697
2700
  const context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
2698
2701
  context.displayName = 'AccordionContext';
2699
2702
  /* harmony default export */ const AccordionContext = (context);
@@ -2733,7 +2736,7 @@ const AccordionCollapse = /*#__PURE__*/external_root_React_commonjs2_react_commo
2733
2736
  bsPrefix = useBootstrapPrefix(bsPrefix, 'accordion-collapse');
2734
2737
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Collapse, {
2735
2738
  ref: ref,
2736
- in: activeEventKey === eventKey,
2739
+ in: isAccordionItemSelected(activeEventKey, eventKey),
2737
2740
  ...props,
2738
2741
  className: classnames_default()(className, bsPrefix),
2739
2742
  children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
@@ -2830,16 +2833,31 @@ const AccordionButton_propTypes = {
2830
2833
  function useAccordionButton(eventKey, onClick) {
2831
2834
  const {
2832
2835
  activeEventKey,
2833
- onSelect
2836
+ onSelect,
2837
+ alwaysOpen
2834
2838
  } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext);
2835
2839
  return e => {
2836
2840
  /*
2837
2841
  Compare the event key in context with the given event key.
2838
2842
  If they are the same, then collapse the component.
2839
2843
  */
2840
- const eventKeyPassed = eventKey === activeEventKey ? null : eventKey;
2841
- if (onSelect) onSelect(eventKeyPassed, e);
2842
- if (onClick) onClick(e);
2844
+ let eventKeyPassed = eventKey === activeEventKey ? null : eventKey;
2845
+
2846
+ if (alwaysOpen) {
2847
+ if (Array.isArray(activeEventKey)) {
2848
+ if (activeEventKey.includes(eventKey)) {
2849
+ eventKeyPassed = activeEventKey.filter(k => k !== eventKey);
2850
+ } else {
2851
+ eventKeyPassed = [...activeEventKey, eventKey];
2852
+ }
2853
+ } else {
2854
+ // activeEventKey is undefined.
2855
+ eventKeyPassed = [eventKey];
2856
+ }
2857
+ }
2858
+
2859
+ onSelect == null ? void 0 : onSelect(eventKeyPassed, e);
2860
+ onClick == null ? void 0 : onClick(e);
2843
2861
  };
2844
2862
  }
2845
2863
  const AccordionButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
@@ -2868,10 +2886,10 @@ const AccordionButton = /*#__PURE__*/external_root_React_commonjs2_react_commonj
2868
2886
  onClick: accordionOnClick,
2869
2887
  ...props,
2870
2888
  "aria-expanded": eventKey === activeEventKey,
2871
- className: classnames_default()(className, bsPrefix, eventKey !== activeEventKey && 'collapsed')
2889
+ className: classnames_default()(className, bsPrefix, !isAccordionItemSelected(activeEventKey, eventKey) && 'collapsed')
2872
2890
  }, void 0, false, {
2873
2891
  fileName: AccordionButton_jsxFileName,
2874
- lineNumber: 70,
2892
+ lineNumber: 86,
2875
2893
  columnNumber: 7
2876
2894
  }, undefined);
2877
2895
  });
@@ -3004,13 +3022,16 @@ const Accordion_propTypes = {
3004
3022
  bsPrefix: (prop_types_default()).string,
3005
3023
 
3006
3024
  /** The current active key that corresponds to the currently expanded card */
3007
- activeKey: (prop_types_default()).string,
3025
+ activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).array]),
3008
3026
 
3009
3027
  /** The default active key that is expanded on start */
3010
- defaultActiveKey: (prop_types_default()).string,
3028
+ defaultActiveKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).array]),
3011
3029
 
3012
3030
  /** Renders accordion edge-to-edge with its parent container */
3013
- flush: (prop_types_default()).bool
3031
+ flush: (prop_types_default()).bool,
3032
+
3033
+ /** Allow accordion items to stay open when another item is opened */
3034
+ alwaysOpen: (prop_types_default()).bool
3014
3035
  };
3015
3036
  const Accordion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
3016
3037
  const {
@@ -3021,6 +3042,7 @@ const Accordion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
3021
3042
  className,
3022
3043
  onSelect,
3023
3044
  flush,
3045
+ alwaysOpen,
3024
3046
  ...controlledProps
3025
3047
  } = useUncontrolled(props, {
3026
3048
  activeKey: 'onSelect'
@@ -3028,8 +3050,9 @@ const Accordion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
3028
3050
  const prefix = useBootstrapPrefix(bsPrefix, 'accordion');
3029
3051
  const contextValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
3030
3052
  activeEventKey: activeKey,
3031
- onSelect
3032
- }), [activeKey, onSelect]);
3053
+ onSelect,
3054
+ alwaysOpen
3055
+ }), [activeKey, onSelect, alwaysOpen]);
3033
3056
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(AccordionContext.Provider, {
3034
3057
  value: contextValue,
3035
3058
  children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
@@ -3038,12 +3061,12 @@ const Accordion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
3038
3061
  className: classnames_default()(className, prefix, flush && `${prefix}-flush`)
3039
3062
  }, void 0, false, {
3040
3063
  fileName: Accordion_jsxFileName,
3041
- lineNumber: 68,
3064
+ lineNumber: 76,
3042
3065
  columnNumber: 9
3043
3066
  }, undefined)
3044
3067
  }, void 0, false, {
3045
3068
  fileName: Accordion_jsxFileName,
3046
- lineNumber: 67,
3069
+ lineNumber: 75,
3047
3070
  columnNumber: 7
3048
3071
  }, undefined);
3049
3072
  });
@@ -3063,7 +3086,7 @@ var lib = __webpack_require__(517);
3063
3086
  /**
3064
3087
  * Creates a `Ref` whose value is updated in an effect, ensuring the most recent
3065
3088
  * value is the one rendered with. Generally only required for Concurrent mode usage
3066
- * where previous work in `render()` may be discarded befor being used.
3089
+ * where previous work in `render()` may be discarded before being used.
3067
3090
  *
3068
3091
  * This is safe to access in an event handler.
3069
3092
  *
@@ -3161,7 +3184,7 @@ function useEventCallback_useEventCallback(fn) {
3161
3184
  * @param capture Whether or not to listen during the capture event phase
3162
3185
  */
3163
3186
 
3164
- function useEventListener(eventTarget, event, listener, capture) {
3187
+ function useEventListener_useEventListener(eventTarget, event, listener, capture) {
3165
3188
  if (capture === void 0) {
3166
3189
  capture = false;
3167
3190
  }
@@ -3198,7 +3221,7 @@ function useGlobalListener(event, handler, capture) {
3198
3221
  capture = false;
3199
3222
  }
3200
3223
 
3201
- var documentTarget = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
3224
+ var documentTarget = useCallback(function () {
3202
3225
  return document;
3203
3226
  }, []);
3204
3227
  return useEventListener(documentTarget, event, handler, capture);
@@ -4995,6 +5018,15 @@ function forEach(children, func) {
4995
5018
  if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child)) func(child, index++);
4996
5019
  });
4997
5020
  }
5021
+ /**
5022
+ * Finds whether a component's `children` prop includes a React element of the
5023
+ * specified type.
5024
+ */
5025
+
5026
+
5027
+ function hasChildOfType(children, type) {
5028
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.toArray(children).some(child => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child) && child.type === type);
5029
+ }
4998
5030
 
4999
5031
 
5000
5032
  ;// CONCATENATED MODULE: ./src/Carousel.tsx
@@ -7895,11 +7927,11 @@ function useRootClose(ref, onRootClose, {
7895
7927
  }
7896
7928
  });
7897
7929
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
7898
- if (disabled || ref == null) return undefined; // Store the current event to avoid triggering handlers immediately
7930
+ if (disabled || ref == null) return undefined;
7931
+ const doc = ownerDocument(getRefTarget(ref)); // Store the current event to avoid triggering handlers immediately
7899
7932
  // https://github.com/facebook/react/issues/20074
7900
7933
 
7901
- let currentEvent = window.event;
7902
- const doc = ownerDocument(getRefTarget(ref)); // Use capture for this listener so it fires before React's listener, to
7934
+ let currentEvent = (doc.defaultView || window).event; // Use capture for this listener so it fires before React's listener, to
7903
7935
  // avoid false positives in the contains() check below if the target DOM
7904
7936
  // element is removed in the React mouse callback.
7905
7937
 
@@ -8379,6 +8411,21 @@ const DropdownItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_r
8379
8411
  });
8380
8412
  DropdownItem.displayName = 'DropdownItem';
8381
8413
  /* harmony default export */ const esm_DropdownItem = (DropdownItem);
8414
+ ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useWindow.js
8415
+
8416
+
8417
+ const Context = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(canUseDOM ? window : undefined);
8418
+ const WindowProvider = Context.Provider;
8419
+ /**
8420
+ * The document "window" placed in React context. Helpful for determining
8421
+ * SSR context, or when rendering into an iframe.
8422
+ *
8423
+ * @returns the current window
8424
+ */
8425
+
8426
+ function useWindow() {
8427
+ return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(Context);
8428
+ }
8382
8429
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Dropdown.js
8383
8430
 
8384
8431
 
@@ -8397,6 +8444,7 @@ DropdownItem.displayName = 'DropdownItem';
8397
8444
 
8398
8445
 
8399
8446
 
8447
+
8400
8448
  function useRefWithUpdate() {
8401
8449
  const forceUpdate = useForceUpdate();
8402
8450
  const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
@@ -8423,6 +8471,7 @@ function Dropdown({
8423
8471
  placement = 'bottom-start',
8424
8472
  children
8425
8473
  }) {
8474
+ const window = useWindow();
8426
8475
  const [show, onToggle] = useUncontrolledProp(rawShow, defaultShow, rawOnToggle); // We use normal refs instead of useCallbackRef in order to populate the
8427
8476
  // the value as quickly as possible, otherwise the effect to focus the element
8428
8477
  // may run before the state value is set
@@ -8460,7 +8509,7 @@ function Dropdown({
8460
8509
  }), [toggle, placement, show, menuElement, toggleElement, setMenu, setToggle]);
8461
8510
 
8462
8511
  if (menuElement && lastShow && !show) {
8463
- focusInDropdown.current = menuElement.contains(document.activeElement);
8512
+ focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);
8464
8513
  }
8465
8514
 
8466
8515
  const focusToggle = useEventCallback_useEventCallback(() => {
@@ -8501,7 +8550,7 @@ function Dropdown({
8501
8550
  return items[index];
8502
8551
  };
8503
8552
 
8504
- useGlobalListener('keydown', event => {
8553
+ useEventListener_useEventListener((0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => window.document, [window]), 'keydown', event => {
8505
8554
  var _menuRef$current, _toggleRef$current;
8506
8555
 
8507
8556
  const {
@@ -8558,7 +8607,7 @@ function Dropdown({
8558
8607
  // to know if this event is relevant to this dropdown (e.g. in this menu).
8559
8608
  // On `keyup` the target is the element being tagged TO which we use to check
8560
8609
  // if focus has left the menu
8561
- esm_addEventListener(document, 'keyup', e => {
8610
+ esm_addEventListener(target.ownerDocument, 'keyup', e => {
8562
8611
  var _menuRef$current2;
8563
8612
 
8564
8613
  if (e.key === 'Tab' && !e.target || !((_menuRef$current2 = menuRef.current) != null && _menuRef$current2.contains(e.target))) {
@@ -9469,6 +9518,7 @@ var FormCheck_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstra
9469
9518
 
9470
9519
 
9471
9520
 
9521
+
9472
9522
  const FormCheck_propTypes = {
9473
9523
  /**
9474
9524
  * @default 'form-check'
@@ -9586,7 +9636,7 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
9586
9636
  const innerFormContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
9587
9637
  controlId: id || controlId
9588
9638
  }), [controlId, id]);
9589
- const hasLabel = label != null && label !== false && !children;
9639
+ const hasLabel = !children && label != null && label !== false || hasChildOfType(children, src_FormCheckLabel);
9590
9640
 
9591
9641
  const input = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckInput, { ...props,
9592
9642
  type: type === 'switch' ? 'checkbox' : type,
@@ -9597,7 +9647,7 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
9597
9647
  as: as
9598
9648
  }, void 0, false, {
9599
9649
  fileName: FormCheck_jsxFileName,
9600
- lineNumber: 158,
9650
+ lineNumber: 161,
9601
9651
  columnNumber: 9
9602
9652
  }, undefined);
9603
9653
 
@@ -9605,14 +9655,14 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
9605
9655
  value: innerFormContext,
9606
9656
  children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
9607
9657
  style: style,
9608
- className: classnames_default()(className, label && bsPrefix, inline && `${bsPrefix}-inline`, type === 'switch' && bsSwitchPrefix),
9658
+ className: classnames_default()(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, type === 'switch' && bsSwitchPrefix),
9609
9659
  children: children || /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
9610
9660
  children: [input, hasLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckLabel, {
9611
9661
  title: title,
9612
9662
  children: label
9613
9663
  }, void 0, false, {
9614
9664
  fileName: FormCheck_jsxFileName,
9615
- lineNumber: 184,
9665
+ lineNumber: 187,
9616
9666
  columnNumber: 19
9617
9667
  }, undefined), feedback && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Feedback, {
9618
9668
  type: feedbackType,
@@ -9620,18 +9670,18 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
9620
9670
  children: feedback
9621
9671
  }, void 0, false, {
9622
9672
  fileName: FormCheck_jsxFileName,
9623
- lineNumber: 187,
9673
+ lineNumber: 190,
9624
9674
  columnNumber: 19
9625
9675
  }, undefined)]
9626
9676
  }, void 0, true)
9627
9677
  }, void 0, false, {
9628
9678
  fileName: FormCheck_jsxFileName,
9629
- lineNumber: 171,
9679
+ lineNumber: 174,
9630
9680
  columnNumber: 11
9631
9681
  }, undefined)
9632
9682
  }, void 0, false, {
9633
9683
  fileName: FormCheck_jsxFileName,
9634
- lineNumber: 170,
9684
+ lineNumber: 173,
9635
9685
  columnNumber: 9
9636
9686
  }, undefined);
9637
9687
  });
@@ -11090,8 +11140,9 @@ function useWillUnmount_useWillUnmount(fn) {
11090
11140
  /**
11091
11141
  * Get the width of the vertical window scrollbar if it's visible
11092
11142
  */
11093
- function getBodyScrollbarWidth() {
11094
- return Math.abs(window.innerWidth - document.documentElement.clientWidth);
11143
+ function getBodyScrollbarWidth(ownerDocument = document) {
11144
+ const window = ownerDocument.defaultView;
11145
+ return Math.abs(window.innerWidth - ownerDocument.documentElement.clientWidth);
11095
11146
  }
11096
11147
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/ModalManager.js
11097
11148
 
@@ -11105,20 +11156,22 @@ const OPEN_DATA_ATTRIBUTE = dataAttr('modal-open');
11105
11156
 
11106
11157
  class ModalManager {
11107
11158
  constructor({
11159
+ ownerDocument,
11108
11160
  handleContainerOverflow = true,
11109
11161
  isRTL = false
11110
11162
  } = {}) {
11111
11163
  this.handleContainerOverflow = handleContainerOverflow;
11112
11164
  this.isRTL = isRTL;
11113
11165
  this.modals = [];
11166
+ this.ownerDocument = ownerDocument;
11114
11167
  }
11115
11168
 
11116
11169
  getScrollbarWidth() {
11117
- return getBodyScrollbarWidth();
11170
+ return getBodyScrollbarWidth(this.ownerDocument);
11118
11171
  }
11119
11172
 
11120
11173
  getElement() {
11121
- return document.body;
11174
+ return (this.ownerDocument || document).body;
11122
11175
  }
11123
11176
 
11124
11177
  setModalAttributes(_modal) {// For overriding
@@ -11214,18 +11267,21 @@ class ModalManager {
11214
11267
  ;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useWaitForDOMRef.js
11215
11268
 
11216
11269
 
11217
- const resolveContainerRef = ref => {
11270
+
11271
+
11272
+ const resolveContainerRef = (ref, document) => {
11218
11273
  var _ref;
11219
11274
 
11220
- if (typeof document === 'undefined') return null;
11221
- if (ref == null) return ownerDocument().body;
11275
+ if (!canUseDOM) return null;
11276
+ if (ref == null) return (document || ownerDocument()).body;
11222
11277
  if (typeof ref === 'function') ref = ref();
11223
11278
  if (ref && 'current' in ref) ref = ref.current;
11224
11279
  if ((_ref = ref) != null && _ref.nodeType) return ref || null;
11225
11280
  return null;
11226
11281
  };
11227
11282
  function useWaitForDOMRef(ref, onResolved) {
11228
- const [resolvedRef, setRef] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => resolveContainerRef(ref));
11283
+ const window = useWindow();
11284
+ const [resolvedRef, setRef] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => resolveContainerRef(ref, window == null ? void 0 : window.document));
11229
11285
 
11230
11286
  if (!resolvedRef) {
11231
11287
  const earlyRef = resolveContainerRef(ref);
@@ -11282,15 +11338,19 @@ function Modal_objectWithoutPropertiesLoose(source, excluded) {
11282
11338
 
11283
11339
 
11284
11340
 
11341
+
11285
11342
  let manager;
11286
11343
 
11287
- function getManager() {
11288
- if (!manager) manager = new esm_ModalManager();
11344
+ function getManager(window) {
11345
+ if (!manager) manager = new esm_ModalManager({
11346
+ ownerDocument: window == null ? void 0 : window.document
11347
+ });
11289
11348
  return manager;
11290
11349
  }
11291
11350
 
11292
11351
  function useModalManager(provided) {
11293
- const modalManager = provided || getManager();
11352
+ const window = useWindow();
11353
+ const modalManager = provided || getManager(window);
11294
11354
  const modal = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
11295
11355
  dialog: null,
11296
11356
  backdrop: null
@@ -13491,7 +13551,7 @@ const NavDropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
13491
13551
  children: title
13492
13552
  }, void 0, false, {
13493
13553
  fileName: NavDropdown_jsxFileName,
13494
- lineNumber: 93,
13554
+ lineNumber: 92,
13495
13555
  columnNumber: 11
13496
13556
  }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown.Menu, {
13497
13557
  role: menuRole,
@@ -13501,12 +13561,12 @@ const NavDropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
13501
13561
  children: children
13502
13562
  }, void 0, false, {
13503
13563
  fileName: NavDropdown_jsxFileName,
13504
- lineNumber: 104,
13564
+ lineNumber: 103,
13505
13565
  columnNumber: 11
13506
13566
  }, undefined)]
13507
13567
  }, void 0, true, {
13508
13568
  fileName: NavDropdown_jsxFileName,
13509
- lineNumber: 88,
13569
+ lineNumber: 87,
13510
13570
  columnNumber: 9
13511
13571
  }, undefined);
13512
13572
  });
@@ -13906,21 +13966,22 @@ const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonj
13906
13966
  transition: actualTransition,
13907
13967
  children: (overlayProps, {
13908
13968
  arrowProps,
13909
- placement,
13910
13969
  popper: popperObj,
13911
13970
  show
13912
13971
  }) => {
13913
13972
  var _popperObj$state, _popperObj$state$modi;
13914
13973
 
13915
- wrapRefs(overlayProps, arrowProps);
13974
+ wrapRefs(overlayProps, arrowProps); // Need to get placement from popper object, handling case when overlay is flipped using 'flip' prop
13975
+
13976
+ const updatedPlacement = popperObj == null ? void 0 : popperObj.placement;
13916
13977
  const popper = Object.assign(popperRef.current, {
13917
13978
  state: popperObj == null ? void 0 : popperObj.state,
13918
13979
  scheduleUpdate: popperObj == null ? void 0 : popperObj.update,
13919
- placement,
13980
+ placement: updatedPlacement,
13920
13981
  outOfBoundaries: (popperObj == null ? void 0 : (_popperObj$state = popperObj.state) == null ? void 0 : (_popperObj$state$modi = _popperObj$state.modifiersData.hide) == null ? void 0 : _popperObj$state$modi.isReferenceHidden) || false
13921
13982
  });
13922
13983
  if (typeof overlay === 'function') return overlay({ ...overlayProps,
13923
- placement,
13984
+ placement: updatedPlacement,
13924
13985
  show,
13925
13986
  ...(!transition && show && {
13926
13987
  className: 'show'
@@ -13929,7 +13990,7 @@ const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonj
13929
13990
  arrowProps
13930
13991
  });
13931
13992
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(overlay, { ...overlayProps,
13932
- placement,
13993
+ placement: updatedPlacement,
13933
13994
  arrowProps,
13934
13995
  popper,
13935
13996
  className: classnames_default()(overlay.props.className, !transition && show && 'show'),