react-bootstrap 2.0.0 → 2.0.4
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.
- package/cjs/ElementChildren.d.ts +6 -1
- package/cjs/ElementChildren.js +10 -0
- package/cjs/FormCheck.js +4 -2
- package/cjs/FormSelect.d.ts +1 -1
- package/cjs/Modal.d.ts +1 -1
- package/cjs/NavDropdown.d.ts +1 -1
- package/dist/react-bootstrap.js +67 -30
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/ElementChildren.d.ts +6 -1
- package/esm/ElementChildren.js +10 -1
- package/esm/FormCheck.js +3 -2
- package/esm/FormSelect.d.ts +1 -1
- package/esm/Modal.d.ts +1 -1
- package/esm/NavDropdown.d.ts +1 -1
- package/package.json +3 -4
- package/cjs/AbstractNav.d.ts +0 -15
- package/cjs/AbstractNavItem.d.ts +0 -19
- package/cjs/AccordionToggle.d.ts +0 -11
- package/cjs/CardColumns.d.ts +0 -2
- package/cjs/CardContext.d.ts +0 -6
- package/cjs/CardDeck.d.ts +0 -2
- package/cjs/FormFile.d.ts +0 -23
- package/cjs/FormFileInput.d.ts +0 -10
- package/cjs/FormFileLabel.d.ts +0 -7
- package/cjs/Jumbotron.d.ts +0 -7
- package/cjs/Media.d.ts +0 -8
- package/cjs/PopoverContent.d.ts +0 -5
- package/cjs/PopoverTitle.d.ts +0 -5
- package/cjs/ResponsiveEmbed.d.ts +0 -9
- package/cjs/SafeAnchor.d.ts +0 -17
- package/cjs/SelectableContext.d.ts +0 -5
- package/cjs/TabContext.d.ts +0 -12
- package/cjs/usePopperMarginModifiers.d.ts +0 -4
- package/esm/AbstractNav.d.ts +0 -15
- package/esm/AbstractNavItem.d.ts +0 -19
- package/esm/AccordionToggle.d.ts +0 -11
- package/esm/CardColumns.d.ts +0 -2
- package/esm/CardContext.d.ts +0 -6
- package/esm/CardDeck.d.ts +0 -2
- package/esm/FormFile.d.ts +0 -23
- package/esm/FormFileInput.d.ts +0 -10
- package/esm/FormFileLabel.d.ts +0 -7
- package/esm/Jumbotron.d.ts +0 -7
- package/esm/Media.d.ts +0 -8
- package/esm/PopoverContent.d.ts +0 -5
- package/esm/PopoverTitle.d.ts +0 -5
- package/esm/ResponsiveEmbed.d.ts +0 -9
- package/esm/SafeAnchor.d.ts +0 -17
- package/esm/SelectableContext.d.ts +0 -5
- package/esm/TabContext.d.ts +0 -12
- package/esm/usePopperMarginModifiers.d.ts +0 -4
package/cjs/ElementChildren.d.ts
CHANGED
|
@@ -15,4 +15,9 @@ declare function map<P = any>(children: any, func: (el: React.ReactElement<P>, i
|
|
|
15
15
|
* leaf child with the index reflecting the position relative to "valid components".
|
|
16
16
|
*/
|
|
17
17
|
declare function forEach<P = any>(children: any, func: (el: React.ReactElement<P>, index: number) => void): void;
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Finds whether a component's `children` prop includes a React element of the
|
|
20
|
+
* specified type.
|
|
21
|
+
*/
|
|
22
|
+
declare function hasChildOfType<P = any>(children: React.ReactNode, type: string | React.JSXElementConstructor<P>): boolean;
|
|
23
|
+
export { map, forEach, hasChildOfType };
|
package/cjs/ElementChildren.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.forEach = forEach;
|
|
5
|
+
exports.hasChildOfType = hasChildOfType;
|
|
5
6
|
exports.map = map;
|
|
6
7
|
|
|
7
8
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -35,4 +36,13 @@ function forEach(children, func) {
|
|
|
35
36
|
React.Children.forEach(children, child => {
|
|
36
37
|
if ( /*#__PURE__*/React.isValidElement(child)) func(child, index++);
|
|
37
38
|
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Finds whether a component's `children` prop includes a React element of the
|
|
42
|
+
* specified type.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
function hasChildOfType(children, type) {
|
|
47
|
+
return React.Children.toArray(children).some(child => /*#__PURE__*/React.isValidElement(child) && child.type === type);
|
|
38
48
|
}
|
package/cjs/FormCheck.js
CHANGED
|
@@ -19,6 +19,8 @@ var _FormContext = _interopRequireDefault(require("./FormContext"));
|
|
|
19
19
|
|
|
20
20
|
var _ThemeProvider = require("./ThemeProvider");
|
|
21
21
|
|
|
22
|
+
var _ElementChildren = require("./ElementChildren");
|
|
23
|
+
|
|
22
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
25
|
|
|
24
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -54,7 +56,7 @@ const FormCheck = /*#__PURE__*/React.forwardRef(({
|
|
|
54
56
|
const innerFormContext = (0, React.useMemo)(() => ({
|
|
55
57
|
controlId: id || controlId
|
|
56
58
|
}), [controlId, id]);
|
|
57
|
-
const hasLabel = label != null && label !== false
|
|
59
|
+
const hasLabel = !children && label != null && label !== false || (0, _ElementChildren.hasChildOfType)(children, _FormCheckLabel.default);
|
|
58
60
|
const input = /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormCheckInput.default, { ...props,
|
|
59
61
|
type: type === 'switch' ? 'checkbox' : type,
|
|
60
62
|
ref: ref,
|
|
@@ -67,7 +69,7 @@ const FormCheck = /*#__PURE__*/React.forwardRef(({
|
|
|
67
69
|
value: innerFormContext,
|
|
68
70
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
71
|
style: style,
|
|
70
|
-
className: (0, _classnames.default)(className,
|
|
72
|
+
className: (0, _classnames.default)(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, type === 'switch' && bsSwitchPrefix),
|
|
71
73
|
children: children || /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
72
74
|
children: [input, hasLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormCheckLabel.default, {
|
|
73
75
|
title: title,
|
package/cjs/FormSelect.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BsPrefixOnlyProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
3
|
-
export interface FormSelectProps extends BsPrefixOnlyProps, React.
|
|
3
|
+
export interface FormSelectProps extends BsPrefixOnlyProps, Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
4
4
|
htmlSize?: number;
|
|
5
5
|
size?: 'sm' | 'lg';
|
|
6
6
|
isValid?: boolean;
|
package/cjs/Modal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseModalProps } from '@restart/ui/Modal';
|
|
3
3
|
import { BsPrefixRefForwardingComponent } from './helpers';
|
|
4
4
|
export interface ModalProps extends Omit<BaseModalProps, 'role' | 'renderBackdrop' | 'renderDialog' | 'transition' | 'backdropTransition' | 'children'> {
|
|
5
5
|
size?: 'sm' | 'lg' | 'xl';
|
package/cjs/NavDropdown.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { DropdownProps } from './Dropdown';
|
|
3
3
|
import { DropdownMenuVariant } from './DropdownMenu';
|
|
4
4
|
import { BsPrefixRefForwardingComponent } from './helpers';
|
|
5
|
-
export interface NavDropdownProps extends Omit<DropdownProps, '
|
|
5
|
+
export interface NavDropdownProps extends Omit<DropdownProps, 'title'> {
|
|
6
6
|
title: React.ReactNode;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
active?: boolean;
|
package/dist/react-bootstrap.js
CHANGED
|
@@ -3063,7 +3063,7 @@ var lib = __webpack_require__(517);
|
|
|
3063
3063
|
/**
|
|
3064
3064
|
* Creates a `Ref` whose value is updated in an effect, ensuring the most recent
|
|
3065
3065
|
* value is the one rendered with. Generally only required for Concurrent mode usage
|
|
3066
|
-
* where previous work in `render()` may be discarded
|
|
3066
|
+
* where previous work in `render()` may be discarded before being used.
|
|
3067
3067
|
*
|
|
3068
3068
|
* This is safe to access in an event handler.
|
|
3069
3069
|
*
|
|
@@ -3161,7 +3161,7 @@ function useEventCallback_useEventCallback(fn) {
|
|
|
3161
3161
|
* @param capture Whether or not to listen during the capture event phase
|
|
3162
3162
|
*/
|
|
3163
3163
|
|
|
3164
|
-
function
|
|
3164
|
+
function useEventListener_useEventListener(eventTarget, event, listener, capture) {
|
|
3165
3165
|
if (capture === void 0) {
|
|
3166
3166
|
capture = false;
|
|
3167
3167
|
}
|
|
@@ -3198,7 +3198,7 @@ function useGlobalListener(event, handler, capture) {
|
|
|
3198
3198
|
capture = false;
|
|
3199
3199
|
}
|
|
3200
3200
|
|
|
3201
|
-
var documentTarget =
|
|
3201
|
+
var documentTarget = useCallback(function () {
|
|
3202
3202
|
return document;
|
|
3203
3203
|
}, []);
|
|
3204
3204
|
return useEventListener(documentTarget, event, handler, capture);
|
|
@@ -4995,6 +4995,15 @@ function forEach(children, func) {
|
|
|
4995
4995
|
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child)) func(child, index++);
|
|
4996
4996
|
});
|
|
4997
4997
|
}
|
|
4998
|
+
/**
|
|
4999
|
+
* Finds whether a component's `children` prop includes a React element of the
|
|
5000
|
+
* specified type.
|
|
5001
|
+
*/
|
|
5002
|
+
|
|
5003
|
+
|
|
5004
|
+
function hasChildOfType(children, type) {
|
|
5005
|
+
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);
|
|
5006
|
+
}
|
|
4998
5007
|
|
|
4999
5008
|
|
|
5000
5009
|
;// CONCATENATED MODULE: ./src/Carousel.tsx
|
|
@@ -7895,11 +7904,11 @@ function useRootClose(ref, onRootClose, {
|
|
|
7895
7904
|
}
|
|
7896
7905
|
});
|
|
7897
7906
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
7898
|
-
if (disabled || ref == null) return undefined;
|
|
7907
|
+
if (disabled || ref == null) return undefined;
|
|
7908
|
+
const doc = ownerDocument(getRefTarget(ref)); // Store the current event to avoid triggering handlers immediately
|
|
7899
7909
|
// https://github.com/facebook/react/issues/20074
|
|
7900
7910
|
|
|
7901
|
-
let currentEvent = window.event;
|
|
7902
|
-
const doc = ownerDocument(getRefTarget(ref)); // Use capture for this listener so it fires before React's listener, to
|
|
7911
|
+
let currentEvent = (doc.defaultView || window).event; // Use capture for this listener so it fires before React's listener, to
|
|
7903
7912
|
// avoid false positives in the contains() check below if the target DOM
|
|
7904
7913
|
// element is removed in the React mouse callback.
|
|
7905
7914
|
|
|
@@ -8379,6 +8388,21 @@ const DropdownItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_r
|
|
|
8379
8388
|
});
|
|
8380
8389
|
DropdownItem.displayName = 'DropdownItem';
|
|
8381
8390
|
/* harmony default export */ const esm_DropdownItem = (DropdownItem);
|
|
8391
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useWindow.js
|
|
8392
|
+
|
|
8393
|
+
|
|
8394
|
+
const Context = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(canUseDOM ? window : undefined);
|
|
8395
|
+
const WindowProvider = Context.Provider;
|
|
8396
|
+
/**
|
|
8397
|
+
* The document "window" placed in React context. Helpful for determining
|
|
8398
|
+
* SSR context, or when rendering into an iframe.
|
|
8399
|
+
*
|
|
8400
|
+
* @returns the current window
|
|
8401
|
+
*/
|
|
8402
|
+
|
|
8403
|
+
function useWindow() {
|
|
8404
|
+
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(Context);
|
|
8405
|
+
}
|
|
8382
8406
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Dropdown.js
|
|
8383
8407
|
|
|
8384
8408
|
|
|
@@ -8397,6 +8421,7 @@ DropdownItem.displayName = 'DropdownItem';
|
|
|
8397
8421
|
|
|
8398
8422
|
|
|
8399
8423
|
|
|
8424
|
+
|
|
8400
8425
|
function useRefWithUpdate() {
|
|
8401
8426
|
const forceUpdate = useForceUpdate();
|
|
8402
8427
|
const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -8423,6 +8448,7 @@ function Dropdown({
|
|
|
8423
8448
|
placement = 'bottom-start',
|
|
8424
8449
|
children
|
|
8425
8450
|
}) {
|
|
8451
|
+
const window = useWindow();
|
|
8426
8452
|
const [show, onToggle] = useUncontrolledProp(rawShow, defaultShow, rawOnToggle); // We use normal refs instead of useCallbackRef in order to populate the
|
|
8427
8453
|
// the value as quickly as possible, otherwise the effect to focus the element
|
|
8428
8454
|
// may run before the state value is set
|
|
@@ -8460,7 +8486,7 @@ function Dropdown({
|
|
|
8460
8486
|
}), [toggle, placement, show, menuElement, toggleElement, setMenu, setToggle]);
|
|
8461
8487
|
|
|
8462
8488
|
if (menuElement && lastShow && !show) {
|
|
8463
|
-
focusInDropdown.current = menuElement.contains(
|
|
8489
|
+
focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);
|
|
8464
8490
|
}
|
|
8465
8491
|
|
|
8466
8492
|
const focusToggle = useEventCallback_useEventCallback(() => {
|
|
@@ -8501,7 +8527,7 @@ function Dropdown({
|
|
|
8501
8527
|
return items[index];
|
|
8502
8528
|
};
|
|
8503
8529
|
|
|
8504
|
-
|
|
8530
|
+
useEventListener_useEventListener((0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => window.document, [window]), 'keydown', event => {
|
|
8505
8531
|
var _menuRef$current, _toggleRef$current;
|
|
8506
8532
|
|
|
8507
8533
|
const {
|
|
@@ -8558,7 +8584,7 @@ function Dropdown({
|
|
|
8558
8584
|
// to know if this event is relevant to this dropdown (e.g. in this menu).
|
|
8559
8585
|
// On `keyup` the target is the element being tagged TO which we use to check
|
|
8560
8586
|
// if focus has left the menu
|
|
8561
|
-
esm_addEventListener(
|
|
8587
|
+
esm_addEventListener(target.ownerDocument, 'keyup', e => {
|
|
8562
8588
|
var _menuRef$current2;
|
|
8563
8589
|
|
|
8564
8590
|
if (e.key === 'Tab' && !e.target || !((_menuRef$current2 = menuRef.current) != null && _menuRef$current2.contains(e.target))) {
|
|
@@ -9469,6 +9495,7 @@ var FormCheck_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstra
|
|
|
9469
9495
|
|
|
9470
9496
|
|
|
9471
9497
|
|
|
9498
|
+
|
|
9472
9499
|
const FormCheck_propTypes = {
|
|
9473
9500
|
/**
|
|
9474
9501
|
* @default 'form-check'
|
|
@@ -9586,7 +9613,7 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
9586
9613
|
const innerFormContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
|
|
9587
9614
|
controlId: id || controlId
|
|
9588
9615
|
}), [controlId, id]);
|
|
9589
|
-
const hasLabel = label != null && label !== false
|
|
9616
|
+
const hasLabel = !children && label != null && label !== false || hasChildOfType(children, src_FormCheckLabel);
|
|
9590
9617
|
|
|
9591
9618
|
const input = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckInput, { ...props,
|
|
9592
9619
|
type: type === 'switch' ? 'checkbox' : type,
|
|
@@ -9597,7 +9624,7 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
9597
9624
|
as: as
|
|
9598
9625
|
}, void 0, false, {
|
|
9599
9626
|
fileName: FormCheck_jsxFileName,
|
|
9600
|
-
lineNumber:
|
|
9627
|
+
lineNumber: 161,
|
|
9601
9628
|
columnNumber: 9
|
|
9602
9629
|
}, undefined);
|
|
9603
9630
|
|
|
@@ -9605,14 +9632,14 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
9605
9632
|
value: innerFormContext,
|
|
9606
9633
|
children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
9607
9634
|
style: style,
|
|
9608
|
-
className: classnames_default()(className,
|
|
9635
|
+
className: classnames_default()(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, type === 'switch' && bsSwitchPrefix),
|
|
9609
9636
|
children: children || /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
|
|
9610
9637
|
children: [input, hasLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckLabel, {
|
|
9611
9638
|
title: title,
|
|
9612
9639
|
children: label
|
|
9613
9640
|
}, void 0, false, {
|
|
9614
9641
|
fileName: FormCheck_jsxFileName,
|
|
9615
|
-
lineNumber:
|
|
9642
|
+
lineNumber: 187,
|
|
9616
9643
|
columnNumber: 19
|
|
9617
9644
|
}, undefined), feedback && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Feedback, {
|
|
9618
9645
|
type: feedbackType,
|
|
@@ -9620,18 +9647,18 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
9620
9647
|
children: feedback
|
|
9621
9648
|
}, void 0, false, {
|
|
9622
9649
|
fileName: FormCheck_jsxFileName,
|
|
9623
|
-
lineNumber:
|
|
9650
|
+
lineNumber: 190,
|
|
9624
9651
|
columnNumber: 19
|
|
9625
9652
|
}, undefined)]
|
|
9626
9653
|
}, void 0, true)
|
|
9627
9654
|
}, void 0, false, {
|
|
9628
9655
|
fileName: FormCheck_jsxFileName,
|
|
9629
|
-
lineNumber:
|
|
9656
|
+
lineNumber: 174,
|
|
9630
9657
|
columnNumber: 11
|
|
9631
9658
|
}, undefined)
|
|
9632
9659
|
}, void 0, false, {
|
|
9633
9660
|
fileName: FormCheck_jsxFileName,
|
|
9634
|
-
lineNumber:
|
|
9661
|
+
lineNumber: 173,
|
|
9635
9662
|
columnNumber: 9
|
|
9636
9663
|
}, undefined);
|
|
9637
9664
|
});
|
|
@@ -11090,8 +11117,9 @@ function useWillUnmount_useWillUnmount(fn) {
|
|
|
11090
11117
|
/**
|
|
11091
11118
|
* Get the width of the vertical window scrollbar if it's visible
|
|
11092
11119
|
*/
|
|
11093
|
-
function getBodyScrollbarWidth() {
|
|
11094
|
-
|
|
11120
|
+
function getBodyScrollbarWidth(ownerDocument = document) {
|
|
11121
|
+
const window = ownerDocument.defaultView;
|
|
11122
|
+
return Math.abs(window.innerWidth - ownerDocument.documentElement.clientWidth);
|
|
11095
11123
|
}
|
|
11096
11124
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/ModalManager.js
|
|
11097
11125
|
|
|
@@ -11105,20 +11133,22 @@ const OPEN_DATA_ATTRIBUTE = dataAttr('modal-open');
|
|
|
11105
11133
|
|
|
11106
11134
|
class ModalManager {
|
|
11107
11135
|
constructor({
|
|
11136
|
+
ownerDocument,
|
|
11108
11137
|
handleContainerOverflow = true,
|
|
11109
11138
|
isRTL = false
|
|
11110
11139
|
} = {}) {
|
|
11111
11140
|
this.handleContainerOverflow = handleContainerOverflow;
|
|
11112
11141
|
this.isRTL = isRTL;
|
|
11113
11142
|
this.modals = [];
|
|
11143
|
+
this.ownerDocument = ownerDocument;
|
|
11114
11144
|
}
|
|
11115
11145
|
|
|
11116
11146
|
getScrollbarWidth() {
|
|
11117
|
-
return getBodyScrollbarWidth();
|
|
11147
|
+
return getBodyScrollbarWidth(this.ownerDocument);
|
|
11118
11148
|
}
|
|
11119
11149
|
|
|
11120
11150
|
getElement() {
|
|
11121
|
-
return document.body;
|
|
11151
|
+
return (this.ownerDocument || document).body;
|
|
11122
11152
|
}
|
|
11123
11153
|
|
|
11124
11154
|
setModalAttributes(_modal) {// For overriding
|
|
@@ -11214,18 +11244,21 @@ class ModalManager {
|
|
|
11214
11244
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useWaitForDOMRef.js
|
|
11215
11245
|
|
|
11216
11246
|
|
|
11217
|
-
|
|
11247
|
+
|
|
11248
|
+
|
|
11249
|
+
const resolveContainerRef = (ref, document) => {
|
|
11218
11250
|
var _ref;
|
|
11219
11251
|
|
|
11220
|
-
if (
|
|
11221
|
-
if (ref == null) return ownerDocument().body;
|
|
11252
|
+
if (!canUseDOM) return null;
|
|
11253
|
+
if (ref == null) return (document || ownerDocument()).body;
|
|
11222
11254
|
if (typeof ref === 'function') ref = ref();
|
|
11223
11255
|
if (ref && 'current' in ref) ref = ref.current;
|
|
11224
11256
|
if ((_ref = ref) != null && _ref.nodeType) return ref || null;
|
|
11225
11257
|
return null;
|
|
11226
11258
|
};
|
|
11227
11259
|
function useWaitForDOMRef(ref, onResolved) {
|
|
11228
|
-
const
|
|
11260
|
+
const window = useWindow();
|
|
11261
|
+
const [resolvedRef, setRef] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => resolveContainerRef(ref, window == null ? void 0 : window.document));
|
|
11229
11262
|
|
|
11230
11263
|
if (!resolvedRef) {
|
|
11231
11264
|
const earlyRef = resolveContainerRef(ref);
|
|
@@ -11282,15 +11315,19 @@ function Modal_objectWithoutPropertiesLoose(source, excluded) {
|
|
|
11282
11315
|
|
|
11283
11316
|
|
|
11284
11317
|
|
|
11318
|
+
|
|
11285
11319
|
let manager;
|
|
11286
11320
|
|
|
11287
|
-
function getManager() {
|
|
11288
|
-
if (!manager) manager = new esm_ModalManager(
|
|
11321
|
+
function getManager(window) {
|
|
11322
|
+
if (!manager) manager = new esm_ModalManager({
|
|
11323
|
+
ownerDocument: window == null ? void 0 : window.document
|
|
11324
|
+
});
|
|
11289
11325
|
return manager;
|
|
11290
11326
|
}
|
|
11291
11327
|
|
|
11292
11328
|
function useModalManager(provided) {
|
|
11293
|
-
const
|
|
11329
|
+
const window = useWindow();
|
|
11330
|
+
const modalManager = provided || getManager(window);
|
|
11294
11331
|
const modal = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
11295
11332
|
dialog: null,
|
|
11296
11333
|
backdrop: null
|
|
@@ -13491,7 +13528,7 @@ const NavDropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
13491
13528
|
children: title
|
|
13492
13529
|
}, void 0, false, {
|
|
13493
13530
|
fileName: NavDropdown_jsxFileName,
|
|
13494
|
-
lineNumber:
|
|
13531
|
+
lineNumber: 92,
|
|
13495
13532
|
columnNumber: 11
|
|
13496
13533
|
}, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown.Menu, {
|
|
13497
13534
|
role: menuRole,
|
|
@@ -13501,12 +13538,12 @@ const NavDropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
13501
13538
|
children: children
|
|
13502
13539
|
}, void 0, false, {
|
|
13503
13540
|
fileName: NavDropdown_jsxFileName,
|
|
13504
|
-
lineNumber:
|
|
13541
|
+
lineNumber: 103,
|
|
13505
13542
|
columnNumber: 11
|
|
13506
13543
|
}, undefined)]
|
|
13507
13544
|
}, void 0, true, {
|
|
13508
13545
|
fileName: NavDropdown_jsxFileName,
|
|
13509
|
-
lineNumber:
|
|
13546
|
+
lineNumber: 87,
|
|
13510
13547
|
columnNumber: 9
|
|
13511
13548
|
}, undefined);
|
|
13512
13549
|
});
|