react-bootstrap 2.5.0-beta.0 → 2.5.0-beta.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.
- package/cjs/Dropdown.d.ts +0 -1
- package/cjs/DropdownButton.d.ts +1 -0
- package/cjs/DropdownButton.js +9 -0
- package/cjs/Offcanvas.js +11 -2
- package/cjs/OverlayTrigger.d.ts +2 -0
- package/cjs/SplitButton.d.ts +1 -0
- package/cjs/SplitButton.js +9 -0
- package/cjs/Tabs.d.ts +10 -2
- package/dist/react-bootstrap.js +646 -179
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/Dropdown.d.ts +0 -1
- package/esm/DropdownButton.d.ts +1 -0
- package/esm/DropdownButton.js +9 -0
- package/esm/Offcanvas.js +11 -3
- package/esm/OverlayTrigger.d.ts +2 -0
- package/esm/SplitButton.d.ts +1 -0
- package/esm/SplitButton.js +9 -0
- package/esm/Tabs.d.ts +10 -2
- package/package.json +2 -2
package/dist/react-bootstrap.js
CHANGED
|
@@ -1069,7 +1069,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1069
1069
|
"ProgressBar": () => (/* reexport */ src_ProgressBar),
|
|
1070
1070
|
"Ratio": () => (/* reexport */ src_Ratio),
|
|
1071
1071
|
"Row": () => (/* reexport */ src_Row),
|
|
1072
|
-
"SSRProvider": () => (/* reexport */
|
|
1072
|
+
"SSRProvider": () => (/* reexport */ SSRProvider),
|
|
1073
1073
|
"Spinner": () => (/* reexport */ src_Spinner),
|
|
1074
1074
|
"SplitButton": () => (/* reexport */ src_SplitButton),
|
|
1075
1075
|
"Stack": () => (/* reexport */ src_Stack),
|
|
@@ -3160,7 +3160,7 @@ function useEventCallback(fn) {
|
|
|
3160
3160
|
return ref.current && ref.current.apply(ref, arguments);
|
|
3161
3161
|
}, [ref]);
|
|
3162
3162
|
}
|
|
3163
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
|
|
3163
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCallbackRef.js
|
|
3164
3164
|
|
|
3165
3165
|
/**
|
|
3166
3166
|
* A convenience hook around `useState` designed to be paired with
|
|
@@ -3190,7 +3190,37 @@ function useEventCallback(fn) {
|
|
|
3190
3190
|
function useCallbackRef() {
|
|
3191
3191
|
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
|
|
3192
3192
|
}
|
|
3193
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/
|
|
3193
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCommittedRef.js
|
|
3194
|
+
|
|
3195
|
+
/**
|
|
3196
|
+
* Creates a `Ref` whose value is updated in an effect, ensuring the most recent
|
|
3197
|
+
* value is the one rendered with. Generally only required for Concurrent mode usage
|
|
3198
|
+
* where previous work in `render()` may be discarded before being used.
|
|
3199
|
+
*
|
|
3200
|
+
* This is safe to access in an event handler.
|
|
3201
|
+
*
|
|
3202
|
+
* @param value The `Ref` value
|
|
3203
|
+
*/
|
|
3204
|
+
|
|
3205
|
+
function esm_useCommittedRef_useCommittedRef(value) {
|
|
3206
|
+
var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
|
|
3207
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
3208
|
+
ref.current = value;
|
|
3209
|
+
}, [value]);
|
|
3210
|
+
return ref;
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
/* harmony default export */ const hooks_esm_useCommittedRef = (esm_useCommittedRef_useCommittedRef);
|
|
3214
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useEventCallback.js
|
|
3215
|
+
|
|
3216
|
+
|
|
3217
|
+
function useEventCallback_useEventCallback(fn) {
|
|
3218
|
+
var ref = hooks_esm_useCommittedRef(fn);
|
|
3219
|
+
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
|
3220
|
+
return ref.current && ref.current.apply(ref, arguments);
|
|
3221
|
+
}, [ref]);
|
|
3222
|
+
}
|
|
3223
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useEventListener.js
|
|
3194
3224
|
|
|
3195
3225
|
|
|
3196
3226
|
/**
|
|
@@ -3208,7 +3238,7 @@ function useEventListener_useEventListener(eventTarget, event, listener, capture
|
|
|
3208
3238
|
capture = false;
|
|
3209
3239
|
}
|
|
3210
3240
|
|
|
3211
|
-
var handler =
|
|
3241
|
+
var handler = useEventCallback_useEventCallback(listener);
|
|
3212
3242
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
3213
3243
|
var target = typeof eventTarget === 'function' ? eventTarget() : eventTarget;
|
|
3214
3244
|
target.addEventListener(event, handler, capture);
|
|
@@ -3217,7 +3247,7 @@ function useEventListener_useEventListener(eventTarget, event, listener, capture
|
|
|
3217
3247
|
};
|
|
3218
3248
|
}, [eventTarget]);
|
|
3219
3249
|
}
|
|
3220
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useGlobalListener.js
|
|
3250
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useGlobalListener.js
|
|
3221
3251
|
|
|
3222
3252
|
|
|
3223
3253
|
/**
|
|
@@ -3245,7 +3275,7 @@ function useGlobalListener(event, handler, capture) {
|
|
|
3245
3275
|
}, []);
|
|
3246
3276
|
return useEventListener(documentTarget, event, handler, capture);
|
|
3247
3277
|
}
|
|
3248
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useInterval.js
|
|
3278
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useInterval.js
|
|
3249
3279
|
|
|
3250
3280
|
|
|
3251
3281
|
/**
|
|
@@ -3304,7 +3334,7 @@ function useInterval(fn, ms, paused, runImmediately) {
|
|
|
3304
3334
|
}
|
|
3305
3335
|
|
|
3306
3336
|
/* harmony default export */ const esm_useInterval = ((/* unused pure expression or super */ null && (useInterval)));
|
|
3307
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useRafInterval.js
|
|
3337
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useRafInterval.js
|
|
3308
3338
|
|
|
3309
3339
|
|
|
3310
3340
|
|
|
@@ -3343,7 +3373,7 @@ function useRafInterval(fn, ms, paused) {
|
|
|
3343
3373
|
}
|
|
3344
3374
|
|
|
3345
3375
|
/* harmony default export */ const esm_useRafInterval = ((/* unused pure expression or super */ null && (useRafInterval)));
|
|
3346
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeState.js
|
|
3376
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeState.js
|
|
3347
3377
|
function useMergeState_extends() {
|
|
3348
3378
|
useMergeState_extends = Object.assign || function (target) {
|
|
3349
3379
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -3400,7 +3430,7 @@ function useMergeState_useMergeState(initialState) {
|
|
|
3400
3430
|
}, [setState]);
|
|
3401
3431
|
return [state, updater];
|
|
3402
3432
|
}
|
|
3403
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeStateFromProps.js
|
|
3433
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeStateFromProps.js
|
|
3404
3434
|
|
|
3405
3435
|
function useMergeStateFromProps(props, gDSFP, initialState) {
|
|
3406
3436
|
var _useMergeState = useMergeState(initialState),
|
|
@@ -3411,7 +3441,7 @@ function useMergeStateFromProps(props, gDSFP, initialState) {
|
|
|
3411
3441
|
if (nextState !== null) setState(nextState);
|
|
3412
3442
|
return [state, setState];
|
|
3413
3443
|
}
|
|
3414
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
|
|
3444
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMounted.js
|
|
3415
3445
|
|
|
3416
3446
|
/**
|
|
3417
3447
|
* Track whether a component is current mounted. Generally less preferable than
|
|
@@ -3447,7 +3477,7 @@ function useMounted() {
|
|
|
3447
3477
|
}, []);
|
|
3448
3478
|
return isMounted.current;
|
|
3449
3479
|
}
|
|
3450
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/usePrevious.js
|
|
3480
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/usePrevious.js
|
|
3451
3481
|
|
|
3452
3482
|
/**
|
|
3453
3483
|
* Store the last of some value. Tracked via a `Ref` only updating it
|
|
@@ -3474,7 +3504,7 @@ function usePrevious(value) {
|
|
|
3474
3504
|
});
|
|
3475
3505
|
return ref.current;
|
|
3476
3506
|
}
|
|
3477
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useImage.js
|
|
3507
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useImage.js
|
|
3478
3508
|
|
|
3479
3509
|
/**
|
|
3480
3510
|
* Fetch and load an image for programatic use such as in a `<canvas>` element.
|
|
@@ -3553,7 +3583,7 @@ function useImage(imageOrUrl, crossOrigin) {
|
|
|
3553
3583
|
}, [imageOrUrl, crossOrigin]);
|
|
3554
3584
|
return state;
|
|
3555
3585
|
}
|
|
3556
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
|
|
3586
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useIsomorphicEffect.js
|
|
3557
3587
|
|
|
3558
3588
|
var isReactNative = typeof __webpack_require__.g !== 'undefined' && // @ts-ignore
|
|
3559
3589
|
__webpack_require__.g.navigator && // @ts-ignore
|
|
@@ -3569,7 +3599,7 @@ var isDOM = typeof document !== 'undefined';
|
|
|
3569
3599
|
*/
|
|
3570
3600
|
|
|
3571
3601
|
/* 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);
|
|
3572
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useResizeObserver.js
|
|
3602
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useResizeObserver.js
|
|
3573
3603
|
|
|
3574
3604
|
|
|
3575
3605
|
var targetMap = new WeakMap();
|
|
@@ -3622,7 +3652,7 @@ function useResizeObserver(element) {
|
|
|
3622
3652
|
}, [element]);
|
|
3623
3653
|
return rect;
|
|
3624
3654
|
}
|
|
3625
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/index.js
|
|
3655
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/index.js
|
|
3626
3656
|
|
|
3627
3657
|
|
|
3628
3658
|
|
|
@@ -3796,7 +3826,7 @@ const Anchor = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
|
|
|
3796
3826
|
const [buttonProps] = useButtonProps(Object.assign({
|
|
3797
3827
|
tagName: 'a'
|
|
3798
3828
|
}, props));
|
|
3799
|
-
const handleKeyDown =
|
|
3829
|
+
const handleKeyDown = useEventCallback_useEventCallback(e => {
|
|
3800
3830
|
buttonProps.onKeyDown(e);
|
|
3801
3831
|
onKeyDown == null ? void 0 : onKeyDown(e);
|
|
3802
3832
|
});
|
|
@@ -4835,6 +4865,42 @@ function useUpdateEffect(fn, deps) {
|
|
|
4835
4865
|
}
|
|
4836
4866
|
|
|
4837
4867
|
/* harmony default export */ const esm_useUpdateEffect = (useUpdateEffect);
|
|
4868
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
|
|
4869
|
+
|
|
4870
|
+
/**
|
|
4871
|
+
* Track whether a component is current mounted. Generally less preferable than
|
|
4872
|
+
* properlly canceling effects so they don't run after a component is unmounted,
|
|
4873
|
+
* but helpful in cases where that isn't feasible, such as a `Promise` resolution.
|
|
4874
|
+
*
|
|
4875
|
+
* @returns a function that returns the current isMounted state of the component
|
|
4876
|
+
*
|
|
4877
|
+
* ```ts
|
|
4878
|
+
* const [data, setData] = useState(null)
|
|
4879
|
+
* const isMounted = useMounted()
|
|
4880
|
+
*
|
|
4881
|
+
* useEffect(() => {
|
|
4882
|
+
* fetchdata().then((newData) => {
|
|
4883
|
+
* if (isMounted()) {
|
|
4884
|
+
* setData(newData);
|
|
4885
|
+
* }
|
|
4886
|
+
* })
|
|
4887
|
+
* })
|
|
4888
|
+
* ```
|
|
4889
|
+
*/
|
|
4890
|
+
|
|
4891
|
+
function useMounted_useMounted() {
|
|
4892
|
+
var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
|
|
4893
|
+
var isMounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(function () {
|
|
4894
|
+
return mounted.current;
|
|
4895
|
+
});
|
|
4896
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
4897
|
+
mounted.current = true;
|
|
4898
|
+
return function () {
|
|
4899
|
+
mounted.current = false;
|
|
4900
|
+
};
|
|
4901
|
+
}, []);
|
|
4902
|
+
return isMounted.current;
|
|
4903
|
+
}
|
|
4838
4904
|
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdatedRef.js
|
|
4839
4905
|
|
|
4840
4906
|
/**
|
|
@@ -4909,7 +4975,7 @@ function setChainedTimeout(handleRef, fn, timeoutAtMs) {
|
|
|
4909
4975
|
|
|
4910
4976
|
|
|
4911
4977
|
function useTimeout() {
|
|
4912
|
-
var isMounted =
|
|
4978
|
+
var isMounted = useMounted_useMounted(); // types are confused between node and web here IDK
|
|
4913
4979
|
|
|
4914
4980
|
var handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
4915
4981
|
useWillUnmount(function () {
|
|
@@ -5691,7 +5757,7 @@ var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
|
|
|
5691
5757
|
function qsa(element, selector) {
|
|
5692
5758
|
return toArray(element.querySelectorAll(selector));
|
|
5693
5759
|
}
|
|
5694
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useForceUpdate.js
|
|
5760
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useForceUpdate.js
|
|
5695
5761
|
|
|
5696
5762
|
/**
|
|
5697
5763
|
* Returns a function that triggers a component update. the hook equivalent to
|
|
@@ -5810,7 +5876,7 @@ function dequal(foo, bar) {
|
|
|
5810
5876
|
return foo !== foo && bar !== bar;
|
|
5811
5877
|
}
|
|
5812
5878
|
|
|
5813
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useSafeState.js
|
|
5879
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useSafeState.js
|
|
5814
5880
|
|
|
5815
5881
|
|
|
5816
5882
|
|
|
@@ -5865,9 +5931,13 @@ function isShadowRoot(node) {
|
|
|
5865
5931
|
}
|
|
5866
5932
|
|
|
5867
5933
|
|
|
5934
|
+
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js
|
|
5935
|
+
var math_max = Math.max;
|
|
5936
|
+
var math_min = Math.min;
|
|
5937
|
+
var round = Math.round;
|
|
5868
5938
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
|
|
5869
5939
|
|
|
5870
|
-
|
|
5940
|
+
|
|
5871
5941
|
function getBoundingClientRect(element, includeScale) {
|
|
5872
5942
|
if (includeScale === void 0) {
|
|
5873
5943
|
includeScale = false;
|
|
@@ -5883,23 +5953,23 @@ function getBoundingClientRect(element, includeScale) {
|
|
|
5883
5953
|
// Fallback to 1 in case both values are `0`
|
|
5884
5954
|
|
|
5885
5955
|
if (offsetWidth > 0) {
|
|
5886
|
-
scaleX = rect.width / offsetWidth || 1;
|
|
5956
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
5887
5957
|
}
|
|
5888
5958
|
|
|
5889
5959
|
if (offsetHeight > 0) {
|
|
5890
|
-
scaleY = rect.height / offsetHeight || 1;
|
|
5960
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
5891
5961
|
}
|
|
5892
5962
|
}
|
|
5893
5963
|
|
|
5894
5964
|
return {
|
|
5895
|
-
width:
|
|
5896
|
-
height:
|
|
5897
|
-
top:
|
|
5898
|
-
right:
|
|
5899
|
-
bottom:
|
|
5900
|
-
left:
|
|
5901
|
-
x:
|
|
5902
|
-
y:
|
|
5965
|
+
width: rect.width / scaleX,
|
|
5966
|
+
height: rect.height / scaleY,
|
|
5967
|
+
top: rect.top / scaleY,
|
|
5968
|
+
right: rect.right / scaleX,
|
|
5969
|
+
bottom: rect.bottom / scaleY,
|
|
5970
|
+
left: rect.left / scaleX,
|
|
5971
|
+
x: rect.left / scaleX,
|
|
5972
|
+
y: rect.top / scaleY
|
|
5903
5973
|
};
|
|
5904
5974
|
}
|
|
5905
5975
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js
|
|
@@ -6027,6 +6097,10 @@ function getContainingBlock(element) {
|
|
|
6027
6097
|
|
|
6028
6098
|
var currentNode = getParentNode(element);
|
|
6029
6099
|
|
|
6100
|
+
if (isShadowRoot(currentNode)) {
|
|
6101
|
+
currentNode = currentNode.host;
|
|
6102
|
+
}
|
|
6103
|
+
|
|
6030
6104
|
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
|
6031
6105
|
var css = dom_utils_getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
|
|
6032
6106
|
// create a containing block.
|
|
@@ -6062,15 +6136,15 @@ function getOffsetParent(element) {
|
|
|
6062
6136
|
function getMainAxisFromPlacement(placement) {
|
|
6063
6137
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
6064
6138
|
}
|
|
6065
|
-
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js
|
|
6066
|
-
var math_max = Math.max;
|
|
6067
|
-
var math_min = Math.min;
|
|
6068
|
-
var math_round = Math.round;
|
|
6069
6139
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js
|
|
6070
6140
|
|
|
6071
6141
|
function within(min, value, max) {
|
|
6072
6142
|
return math_max(min, math_min(value, max));
|
|
6073
6143
|
}
|
|
6144
|
+
function withinMaxClamp(min, value, max) {
|
|
6145
|
+
var v = within(min, value, max);
|
|
6146
|
+
return v > max ? max : v;
|
|
6147
|
+
}
|
|
6074
6148
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js
|
|
6075
6149
|
function getFreshSideObject() {
|
|
6076
6150
|
return {
|
|
@@ -6249,8 +6323,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
6249
6323
|
var win = window;
|
|
6250
6324
|
var dpr = win.devicePixelRatio || 1;
|
|
6251
6325
|
return {
|
|
6252
|
-
x:
|
|
6253
|
-
y:
|
|
6326
|
+
x: round(x * dpr) / dpr || 0,
|
|
6327
|
+
y: round(y * dpr) / dpr || 0
|
|
6254
6328
|
};
|
|
6255
6329
|
}
|
|
6256
6330
|
|
|
@@ -6265,14 +6339,23 @@ function mapToStyles(_ref2) {
|
|
|
6265
6339
|
position = _ref2.position,
|
|
6266
6340
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
6267
6341
|
adaptive = _ref2.adaptive,
|
|
6268
|
-
roundOffsets = _ref2.roundOffsets
|
|
6269
|
-
|
|
6270
|
-
var
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6342
|
+
roundOffsets = _ref2.roundOffsets,
|
|
6343
|
+
isFixed = _ref2.isFixed;
|
|
6344
|
+
var _offsets$x = offsets.x,
|
|
6345
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
6346
|
+
_offsets$y = offsets.y,
|
|
6347
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
6348
|
+
|
|
6349
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
6350
|
+
x: x,
|
|
6351
|
+
y: y
|
|
6352
|
+
}) : {
|
|
6353
|
+
x: x,
|
|
6354
|
+
y: y
|
|
6355
|
+
};
|
|
6275
6356
|
|
|
6357
|
+
x = _ref3.x;
|
|
6358
|
+
y = _ref3.y;
|
|
6276
6359
|
var hasX = offsets.hasOwnProperty('x');
|
|
6277
6360
|
var hasY = offsets.hasOwnProperty('y');
|
|
6278
6361
|
var sideX = left;
|
|
@@ -6297,16 +6380,18 @@ function mapToStyles(_ref2) {
|
|
|
6297
6380
|
offsetParent = offsetParent;
|
|
6298
6381
|
|
|
6299
6382
|
if (placement === enums_top || (placement === left || placement === right) && variation === end) {
|
|
6300
|
-
sideY = bottom;
|
|
6301
|
-
|
|
6302
|
-
|
|
6383
|
+
sideY = bottom;
|
|
6384
|
+
var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
6385
|
+
offsetParent[heightProp];
|
|
6386
|
+
y -= offsetY - popperRect.height;
|
|
6303
6387
|
y *= gpuAcceleration ? 1 : -1;
|
|
6304
6388
|
}
|
|
6305
6389
|
|
|
6306
6390
|
if (placement === left || (placement === enums_top || placement === bottom) && variation === end) {
|
|
6307
|
-
sideX = right;
|
|
6308
|
-
|
|
6309
|
-
|
|
6391
|
+
sideX = right;
|
|
6392
|
+
var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
6393
|
+
offsetParent[widthProp];
|
|
6394
|
+
x -= offsetX - popperRect.width;
|
|
6310
6395
|
x *= gpuAcceleration ? 1 : -1;
|
|
6311
6396
|
}
|
|
6312
6397
|
}
|
|
@@ -6315,6 +6400,17 @@ function mapToStyles(_ref2) {
|
|
|
6315
6400
|
position: position
|
|
6316
6401
|
}, adaptive && unsetSides);
|
|
6317
6402
|
|
|
6403
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
6404
|
+
x: x,
|
|
6405
|
+
y: y
|
|
6406
|
+
}) : {
|
|
6407
|
+
x: x,
|
|
6408
|
+
y: y
|
|
6409
|
+
};
|
|
6410
|
+
|
|
6411
|
+
x = _ref4.x;
|
|
6412
|
+
y = _ref4.y;
|
|
6413
|
+
|
|
6318
6414
|
if (gpuAcceleration) {
|
|
6319
6415
|
var _Object$assign;
|
|
6320
6416
|
|
|
@@ -6324,9 +6420,9 @@ function mapToStyles(_ref2) {
|
|
|
6324
6420
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
6325
6421
|
}
|
|
6326
6422
|
|
|
6327
|
-
function computeStyles(
|
|
6328
|
-
var state =
|
|
6329
|
-
options =
|
|
6423
|
+
function computeStyles(_ref5) {
|
|
6424
|
+
var state = _ref5.state,
|
|
6425
|
+
options = _ref5.options;
|
|
6330
6426
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
6331
6427
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
6332
6428
|
_options$adaptive = options.adaptive,
|
|
@@ -6341,7 +6437,8 @@ function computeStyles(_ref4) {
|
|
|
6341
6437
|
variation: getVariation(state.placement),
|
|
6342
6438
|
popper: state.elements.popper,
|
|
6343
6439
|
popperRect: state.rects.popper,
|
|
6344
|
-
gpuAcceleration: gpuAcceleration
|
|
6440
|
+
gpuAcceleration: gpuAcceleration,
|
|
6441
|
+
isFixed: state.options.strategy === 'fixed'
|
|
6345
6442
|
};
|
|
6346
6443
|
|
|
6347
6444
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -6637,7 +6734,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
6637
6734
|
}
|
|
6638
6735
|
|
|
6639
6736
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
6640
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
6737
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
6641
6738
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
6642
6739
|
// clipping (or hiding) overflowing elements with a position different from
|
|
6643
6740
|
// `initial`
|
|
@@ -7071,6 +7168,7 @@ function hide(_ref) {
|
|
|
7071
7168
|
});
|
|
7072
7169
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js
|
|
7073
7170
|
|
|
7171
|
+
// eslint-disable-next-line import/no-unused-modules
|
|
7074
7172
|
|
|
7075
7173
|
function distanceAndSkiddingToXY(placement, rects, offset) {
|
|
7076
7174
|
var basePlacement = getBasePlacement(placement);
|
|
@@ -7199,6 +7297,14 @@ function preventOverflow(_ref) {
|
|
|
7199
7297
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
7200
7298
|
placement: state.placement
|
|
7201
7299
|
})) : tetherOffset;
|
|
7300
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
7301
|
+
mainAxis: tetherOffsetValue,
|
|
7302
|
+
altAxis: tetherOffsetValue
|
|
7303
|
+
} : Object.assign({
|
|
7304
|
+
mainAxis: 0,
|
|
7305
|
+
altAxis: 0
|
|
7306
|
+
}, tetherOffsetValue);
|
|
7307
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
7202
7308
|
var data = {
|
|
7203
7309
|
x: 0,
|
|
7204
7310
|
y: 0
|
|
@@ -7208,13 +7314,15 @@ function preventOverflow(_ref) {
|
|
|
7208
7314
|
return;
|
|
7209
7315
|
}
|
|
7210
7316
|
|
|
7211
|
-
if (checkMainAxis
|
|
7317
|
+
if (checkMainAxis) {
|
|
7318
|
+
var _offsetModifierState$;
|
|
7319
|
+
|
|
7212
7320
|
var mainSide = mainAxis === 'y' ? enums_top : left;
|
|
7213
7321
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
7214
7322
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
7215
7323
|
var offset = popperOffsets[mainAxis];
|
|
7216
|
-
var min =
|
|
7217
|
-
var max =
|
|
7324
|
+
var min = offset + overflow[mainSide];
|
|
7325
|
+
var max = offset - overflow[altSide];
|
|
7218
7326
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
7219
7327
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
7220
7328
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -7234,36 +7342,45 @@ function preventOverflow(_ref) {
|
|
|
7234
7342
|
// width or height)
|
|
7235
7343
|
|
|
7236
7344
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
7237
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
7238
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
7345
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
7346
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
7239
7347
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
7240
7348
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
7241
|
-
var offsetModifierValue =
|
|
7242
|
-
var tetherMin =
|
|
7243
|
-
var tetherMax =
|
|
7349
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
7350
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
7351
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
7352
|
+
var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max);
|
|
7353
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
7354
|
+
data[mainAxis] = preventedOffset - offset;
|
|
7355
|
+
}
|
|
7244
7356
|
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
7248
|
-
data[mainAxis] = preventedOffset - offset;
|
|
7249
|
-
}
|
|
7357
|
+
if (checkAltAxis) {
|
|
7358
|
+
var _offsetModifierState$2;
|
|
7250
7359
|
|
|
7251
|
-
|
|
7252
|
-
var _mainSide = mainAxis === 'x' ? enums_top : left;
|
|
7360
|
+
var _mainSide = mainAxis === 'x' ? enums_top : left;
|
|
7253
7361
|
|
|
7254
|
-
|
|
7362
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
7255
7363
|
|
|
7256
|
-
|
|
7364
|
+
var _offset = popperOffsets[altAxis];
|
|
7257
7365
|
|
|
7258
|
-
|
|
7366
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
7259
7367
|
|
|
7260
|
-
|
|
7368
|
+
var _min = _offset + overflow[_mainSide];
|
|
7261
7369
|
|
|
7262
|
-
|
|
7370
|
+
var _max = _offset - overflow[_altSide];
|
|
7263
7371
|
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7372
|
+
var isOriginSide = [enums_top, left].indexOf(basePlacement) !== -1;
|
|
7373
|
+
|
|
7374
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
7375
|
+
|
|
7376
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
7377
|
+
|
|
7378
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
7379
|
+
|
|
7380
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
7381
|
+
|
|
7382
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
7383
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
7267
7384
|
}
|
|
7268
7385
|
|
|
7269
7386
|
state.modifiersData[name] = data;
|
|
@@ -7305,10 +7422,11 @@ function getNodeScroll(node) {
|
|
|
7305
7422
|
|
|
7306
7423
|
|
|
7307
7424
|
|
|
7425
|
+
|
|
7308
7426
|
function isElementScaled(element) {
|
|
7309
7427
|
var rect = element.getBoundingClientRect();
|
|
7310
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
7311
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
7428
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
7429
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
7312
7430
|
return scaleX !== 1 || scaleY !== 1;
|
|
7313
7431
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
7314
7432
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -7913,14 +8031,14 @@ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
|
|
|
7913
8031
|
preventMouseClickOutsideRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target) || waitingForTrigger.current;
|
|
7914
8032
|
waitingForTrigger.current = false;
|
|
7915
8033
|
}, [ref]);
|
|
7916
|
-
const handleInitialMouse =
|
|
8034
|
+
const handleInitialMouse = useEventCallback_useEventCallback(e => {
|
|
7917
8035
|
const currentTarget = getRefTarget(ref);
|
|
7918
8036
|
|
|
7919
8037
|
if (currentTarget && contains_contains(currentTarget, e.target)) {
|
|
7920
8038
|
waitingForTrigger.current = true;
|
|
7921
8039
|
}
|
|
7922
8040
|
});
|
|
7923
|
-
const handleMouse =
|
|
8041
|
+
const handleMouse = useEventCallback_useEventCallback(e => {
|
|
7924
8042
|
if (!preventMouseClickOutsideRef.current) {
|
|
7925
8043
|
onClickOutside(e);
|
|
7926
8044
|
}
|
|
@@ -8164,71 +8282,71 @@ DropdownMenu.defaultProps = DropdownMenu_defaultProps;
|
|
|
8164
8282
|
|
|
8165
8283
|
/* harmony default export */ const esm_DropdownMenu = (DropdownMenu);
|
|
8166
8284
|
;// CONCATENATED MODULE: ./node_modules/@react-aria/ssr/dist/module.js
|
|
8167
|
-
|
|
8285
|
+
|
|
8286
|
+
|
|
8287
|
+
function $parcel$export(e, n, v, s) {
|
|
8288
|
+
Object.defineProperty(e, n, {
|
|
8289
|
+
get: v,
|
|
8290
|
+
set: s,
|
|
8291
|
+
enumerable: true,
|
|
8292
|
+
configurable: true
|
|
8293
|
+
});
|
|
8294
|
+
}
|
|
8295
|
+
|
|
8296
|
+
var $704cf1d3b684cc5c$exports = {};
|
|
8297
|
+
$parcel$export($704cf1d3b684cc5c$exports, "SSRProvider", () => $704cf1d3b684cc5c$export$9f8ac96af4b1b2ae);
|
|
8298
|
+
$parcel$export($704cf1d3b684cc5c$exports, "useSSRSafeId", () => $704cf1d3b684cc5c$export$619500959fc48b26);
|
|
8299
|
+
$parcel$export($704cf1d3b684cc5c$exports, "useIsSSR", () => $704cf1d3b684cc5c$export$535bd6ca7f90a273); // Default context value to use in case there is no SSRProvider. This is fine for
|
|
8168
8300
|
// client-only apps. In order to support multiple copies of React Aria potentially
|
|
8169
8301
|
// being on the page at once, the prefix is set to a random number. SSRProvider
|
|
8170
8302
|
// will reset this to zero for consistency between server and client, so in the
|
|
8171
8303
|
// SSR case multiple copies of React Aria is not supported.
|
|
8172
8304
|
|
|
8173
|
-
const $
|
|
8174
|
-
prefix: Math.round(Math.random() * 10000000000),
|
|
8305
|
+
const $704cf1d3b684cc5c$var$defaultContext = {
|
|
8306
|
+
prefix: String(Math.round(Math.random() * 10000000000)),
|
|
8175
8307
|
current: 0
|
|
8176
8308
|
};
|
|
8309
|
+
const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext($704cf1d3b684cc5c$var$defaultContext);
|
|
8177
8310
|
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
* When using SSR with React Aria, applications must be wrapped in an SSRProvider.
|
|
8181
|
-
* This ensures that auto generated ids are consistent between the client and server.
|
|
8182
|
-
*/
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
function SSRProvider(props) {
|
|
8186
|
-
let cur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($f01a183cc7bdff77849e49ad26eb904$var$SSRContext);
|
|
8311
|
+
function $704cf1d3b684cc5c$export$9f8ac96af4b1b2ae(props) {
|
|
8312
|
+
let cur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
8187
8313
|
let value = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
|
|
8188
|
-
// If this is the first SSRProvider,
|
|
8189
|
-
|
|
8314
|
+
// If this is the first SSRProvider, start with an empty string prefix, otherwise
|
|
8315
|
+
// append and increment the counter.
|
|
8316
|
+
prefix: cur === $704cf1d3b684cc5c$var$defaultContext ? '' : `${cur.prefix}-${++cur.current}`,
|
|
8190
8317
|
current: 0
|
|
8191
8318
|
}), [cur]);
|
|
8192
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement($
|
|
8319
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement($704cf1d3b684cc5c$var$SSRContext.Provider, {
|
|
8193
8320
|
value: value
|
|
8194
8321
|
}, props.children);
|
|
8195
8322
|
}
|
|
8196
|
-
let $f01a183cc7bdff77849e49ad26eb904$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
8197
|
-
/** @private */
|
|
8198
8323
|
|
|
8199
|
-
|
|
8200
|
-
let ctx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($f01a183cc7bdff77849e49ad26eb904$var$SSRContext); // If we are rendering in a non-DOM environment, and there's no SSRProvider,
|
|
8201
|
-
// provide a warning to hint to the developer to add one.
|
|
8324
|
+
let $704cf1d3b684cc5c$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
8202
8325
|
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8326
|
+
function $704cf1d3b684cc5c$export$619500959fc48b26(defaultId) {
|
|
8327
|
+
let ctx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext); // If we are rendering in a non-DOM environment, and there's no SSRProvider,
|
|
8328
|
+
// provide a warning to hint to the developer to add one.
|
|
8206
8329
|
|
|
8207
|
-
|
|
8330
|
+
if (ctx === $704cf1d3b684cc5c$var$defaultContext && !$704cf1d3b684cc5c$var$canUseDOM) console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');
|
|
8331
|
+
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => defaultId || `react-aria${ctx.prefix}-${++ctx.current}`, [defaultId]);
|
|
8208
8332
|
}
|
|
8209
|
-
/**
|
|
8210
|
-
* Returns whether the component is currently being server side rendered or
|
|
8211
|
-
* hydrated on the client. Can be used to delay browser-specific rendering
|
|
8212
|
-
* until after hydration.
|
|
8213
|
-
*/
|
|
8214
8333
|
|
|
8215
|
-
function
|
|
8216
|
-
let cur = useContext($
|
|
8217
|
-
let isInSSRContext = cur !== $
|
|
8218
|
-
let [isSSR, setIsSSR] = useState(isInSSRContext); // If on the client, and the component was initially server rendered,
|
|
8334
|
+
function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
|
|
8335
|
+
let cur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
8336
|
+
let isInSSRContext = cur !== $704cf1d3b684cc5c$var$defaultContext;
|
|
8337
|
+
let [isSSR, setIsSSR] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(isInSSRContext); // If on the client, and the component was initially server rendered,
|
|
8219
8338
|
// then schedule a layout effect to update the component after hydration.
|
|
8220
8339
|
|
|
8221
|
-
if (typeof window !== 'undefined' && isInSSRContext)
|
|
8222
|
-
// This if statement technically breaks the rules of hooks, but is safe
|
|
8340
|
+
if (typeof window !== 'undefined' && isInSSRContext) // This if statement technically breaks the rules of hooks, but is safe
|
|
8223
8341
|
// because the condition never changes after mounting.
|
|
8224
8342
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
8225
|
-
useLayoutEffect(() => {
|
|
8343
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(() => {
|
|
8226
8344
|
setIsSSR(false);
|
|
8227
8345
|
}, []);
|
|
8228
|
-
}
|
|
8229
|
-
|
|
8230
8346
|
return isSSR;
|
|
8231
8347
|
}
|
|
8348
|
+
|
|
8349
|
+
|
|
8232
8350
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/DropdownToggle.js
|
|
8233
8351
|
|
|
8234
8352
|
|
|
@@ -8252,7 +8370,7 @@ const DropdownToggle_noop = () => {};
|
|
|
8252
8370
|
|
|
8253
8371
|
|
|
8254
8372
|
function useDropdownToggle() {
|
|
8255
|
-
const id =
|
|
8373
|
+
const id = $704cf1d3b684cc5c$export$619500959fc48b26();
|
|
8256
8374
|
const {
|
|
8257
8375
|
show = false,
|
|
8258
8376
|
toggle = DropdownToggle_noop,
|
|
@@ -8367,7 +8485,7 @@ function useDropdownItem({
|
|
|
8367
8485
|
} = navContext || {};
|
|
8368
8486
|
const eventKey = makeEventKey(key, href);
|
|
8369
8487
|
const isActive = active == null && key != null ? makeEventKey(activeKey) === eventKey : active;
|
|
8370
|
-
const handleClick =
|
|
8488
|
+
const handleClick = useEventCallback_useEventCallback(event => {
|
|
8371
8489
|
if (disabled) return;
|
|
8372
8490
|
onClick == null ? void 0 : onClick(event);
|
|
8373
8491
|
|
|
@@ -8486,7 +8604,7 @@ function Dropdown({
|
|
|
8486
8604
|
source
|
|
8487
8605
|
});
|
|
8488
8606
|
}, [onToggle]);
|
|
8489
|
-
const handleSelect =
|
|
8607
|
+
const handleSelect = useEventCallback_useEventCallback((key, event) => {
|
|
8490
8608
|
onSelect == null ? void 0 : onSelect(key, event);
|
|
8491
8609
|
toggle(false, event, 'select');
|
|
8492
8610
|
|
|
@@ -8508,12 +8626,12 @@ function Dropdown({
|
|
|
8508
8626
|
focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);
|
|
8509
8627
|
}
|
|
8510
8628
|
|
|
8511
|
-
const focusToggle =
|
|
8629
|
+
const focusToggle = useEventCallback_useEventCallback(() => {
|
|
8512
8630
|
if (toggleElement && toggleElement.focus) {
|
|
8513
8631
|
toggleElement.focus();
|
|
8514
8632
|
}
|
|
8515
8633
|
});
|
|
8516
|
-
const maybeFocusFirst =
|
|
8634
|
+
const maybeFocusFirst = useEventCallback_useEventCallback(() => {
|
|
8517
8635
|
const type = lastSourceEvent.current;
|
|
8518
8636
|
let focusType = focusFirstItemOnShow;
|
|
8519
8637
|
|
|
@@ -8715,6 +8833,22 @@ const DropdownItem_DropdownItem = /*#__PURE__*/external_root_React_commonjs2_rea
|
|
|
8715
8833
|
DropdownItem_DropdownItem.displayName = 'DropdownItem';
|
|
8716
8834
|
DropdownItem_DropdownItem.propTypes = DropdownItem_propTypes;
|
|
8717
8835
|
/* harmony default export */ const src_DropdownItem = (DropdownItem_DropdownItem);
|
|
8836
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
|
|
8837
|
+
|
|
8838
|
+
var useIsomorphicEffect_isReactNative = typeof __webpack_require__.g !== 'undefined' && // @ts-ignore
|
|
8839
|
+
__webpack_require__.g.navigator && // @ts-ignore
|
|
8840
|
+
__webpack_require__.g.navigator.product === 'ReactNative';
|
|
8841
|
+
var useIsomorphicEffect_isDOM = typeof document !== 'undefined';
|
|
8842
|
+
/**
|
|
8843
|
+
* Is `useLayoutEffect` in a DOM or React Native environment, otherwise resolves to useEffect
|
|
8844
|
+
* Only useful to avoid the console warning.
|
|
8845
|
+
*
|
|
8846
|
+
* PREFER `useEffect` UNLESS YOU KNOW WHAT YOU ARE DOING.
|
|
8847
|
+
*
|
|
8848
|
+
* @category effects
|
|
8849
|
+
*/
|
|
8850
|
+
|
|
8851
|
+
/* 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);
|
|
8718
8852
|
;// CONCATENATED MODULE: ./src/InputGroupContext.tsx
|
|
8719
8853
|
|
|
8720
8854
|
const InputGroupContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
|
|
@@ -8903,7 +9037,7 @@ const DropdownMenu_DropdownMenu = /*#__PURE__*/external_root_React_commonjs2_rea
|
|
|
8903
9037
|
placement
|
|
8904
9038
|
});
|
|
8905
9039
|
menuProps.ref = esm_useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref);
|
|
8906
|
-
|
|
9040
|
+
esm_useIsomorphicEffect(() => {
|
|
8907
9041
|
// Popper's initial position for the menu is incorrect when
|
|
8908
9042
|
// renderOnMount=true. Need to call update() to correct it.
|
|
8909
9043
|
if (show) popper == null ? void 0 : popper.update();
|
|
@@ -9075,13 +9209,6 @@ const Dropdown_propTypes = {
|
|
|
9075
9209
|
*/
|
|
9076
9210
|
show: (prop_types_default()).bool,
|
|
9077
9211
|
|
|
9078
|
-
/**
|
|
9079
|
-
* Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to
|
|
9080
|
-
* Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).
|
|
9081
|
-
*
|
|
9082
|
-
*/
|
|
9083
|
-
flip: (prop_types_default()).bool,
|
|
9084
|
-
|
|
9085
9212
|
/**
|
|
9086
9213
|
* A callback fired when the Dropdown wishes to change visibility. Called with the requested
|
|
9087
9214
|
* `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.
|
|
@@ -9187,17 +9314,17 @@ const Dropdown_Dropdown = /*#__PURE__*/external_root_React_commonjs2_react_commo
|
|
|
9187
9314
|
className: classnames_default()(className, show && 'show', (!drop || drop === 'down') && prefix, drop === 'up' && 'dropup', drop === 'end' && 'dropend', drop === 'start' && 'dropstart')
|
|
9188
9315
|
}, void 0, false, {
|
|
9189
9316
|
fileName: Dropdown_jsxFileName,
|
|
9190
|
-
lineNumber:
|
|
9317
|
+
lineNumber: 194,
|
|
9191
9318
|
columnNumber: 13
|
|
9192
9319
|
}, undefined)
|
|
9193
9320
|
}, void 0, false, {
|
|
9194
9321
|
fileName: Dropdown_jsxFileName,
|
|
9195
|
-
lineNumber:
|
|
9322
|
+
lineNumber: 183,
|
|
9196
9323
|
columnNumber: 9
|
|
9197
9324
|
}, undefined)
|
|
9198
9325
|
}, void 0, false, {
|
|
9199
9326
|
fileName: Dropdown_jsxFileName,
|
|
9200
|
-
lineNumber:
|
|
9327
|
+
lineNumber: 182,
|
|
9201
9328
|
columnNumber: 7
|
|
9202
9329
|
}, undefined);
|
|
9203
9330
|
});
|
|
@@ -9269,6 +9396,13 @@ const DropdownButton_propTypes = {
|
|
|
9269
9396
|
*/
|
|
9270
9397
|
menuVariant: prop_types_default().oneOf(['dark']),
|
|
9271
9398
|
|
|
9399
|
+
/**
|
|
9400
|
+
* Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to
|
|
9401
|
+
* Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).
|
|
9402
|
+
*
|
|
9403
|
+
*/
|
|
9404
|
+
flip: (prop_types_default()).bool,
|
|
9405
|
+
|
|
9272
9406
|
/** @ignore */
|
|
9273
9407
|
bsPrefix: (prop_types_default()).string,
|
|
9274
9408
|
|
|
@@ -9301,6 +9435,7 @@ const DropdownButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs
|
|
|
9301
9435
|
href,
|
|
9302
9436
|
id,
|
|
9303
9437
|
menuVariant,
|
|
9438
|
+
flip,
|
|
9304
9439
|
...props
|
|
9305
9440
|
}, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown, {
|
|
9306
9441
|
ref: ref,
|
|
@@ -9315,22 +9450,23 @@ const DropdownButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs
|
|
|
9315
9450
|
children: title
|
|
9316
9451
|
}, void 0, false, {
|
|
9317
9452
|
fileName: DropdownButton_jsxFileName,
|
|
9318
|
-
lineNumber:
|
|
9453
|
+
lineNumber: 118,
|
|
9319
9454
|
columnNumber: 7
|
|
9320
9455
|
}, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_DropdownMenu, {
|
|
9321
9456
|
role: menuRole,
|
|
9322
9457
|
renderOnMount: renderMenuOnMount,
|
|
9323
9458
|
rootCloseEvent: rootCloseEvent,
|
|
9324
9459
|
variant: menuVariant,
|
|
9460
|
+
flip: flip,
|
|
9325
9461
|
children: children
|
|
9326
9462
|
}, void 0, false, {
|
|
9327
9463
|
fileName: DropdownButton_jsxFileName,
|
|
9328
|
-
lineNumber:
|
|
9464
|
+
lineNumber: 128,
|
|
9329
9465
|
columnNumber: 7
|
|
9330
9466
|
}, undefined)]
|
|
9331
9467
|
}, void 0, true, {
|
|
9332
9468
|
fileName: DropdownButton_jsxFileName,
|
|
9333
|
-
lineNumber:
|
|
9469
|
+
lineNumber: 117,
|
|
9334
9470
|
columnNumber: 5
|
|
9335
9471
|
}, undefined));
|
|
9336
9472
|
DropdownButton.displayName = 'DropdownButton';
|
|
@@ -10541,6 +10677,47 @@ InputGroup.displayName = 'InputGroup';
|
|
|
10541
10677
|
Radio: InputGroupRadio,
|
|
10542
10678
|
Checkbox: InputGroupCheckbox
|
|
10543
10679
|
}));
|
|
10680
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergedRefs.js
|
|
10681
|
+
|
|
10682
|
+
|
|
10683
|
+
var useMergedRefs_toFnRef = function toFnRef(ref) {
|
|
10684
|
+
return !ref || typeof ref === 'function' ? ref : function (value) {
|
|
10685
|
+
ref.current = value;
|
|
10686
|
+
};
|
|
10687
|
+
};
|
|
10688
|
+
|
|
10689
|
+
function useMergedRefs_mergeRefs(refA, refB) {
|
|
10690
|
+
var a = useMergedRefs_toFnRef(refA);
|
|
10691
|
+
var b = useMergedRefs_toFnRef(refB);
|
|
10692
|
+
return function (value) {
|
|
10693
|
+
if (a) a(value);
|
|
10694
|
+
if (b) b(value);
|
|
10695
|
+
};
|
|
10696
|
+
}
|
|
10697
|
+
/**
|
|
10698
|
+
* Create and returns a single callback ref composed from two other Refs.
|
|
10699
|
+
*
|
|
10700
|
+
* ```tsx
|
|
10701
|
+
* const Button = React.forwardRef((props, ref) => {
|
|
10702
|
+
* const [element, attachRef] = useCallbackRef<HTMLButtonElement>();
|
|
10703
|
+
* const mergedRef = useMergedRefs(ref, attachRef);
|
|
10704
|
+
*
|
|
10705
|
+
* return <button ref={mergedRef} {...props}/>
|
|
10706
|
+
* })
|
|
10707
|
+
* ```
|
|
10708
|
+
*
|
|
10709
|
+
* @param refA A Callback or mutable Ref
|
|
10710
|
+
* @param refB A Callback or mutable Ref
|
|
10711
|
+
* @category refs
|
|
10712
|
+
*/
|
|
10713
|
+
|
|
10714
|
+
function useMergedRefs_useMergedRefs(refA, refB) {
|
|
10715
|
+
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
10716
|
+
return useMergedRefs_mergeRefs(refA, refB);
|
|
10717
|
+
}, [refA, refB]);
|
|
10718
|
+
}
|
|
10719
|
+
|
|
10720
|
+
/* harmony default export */ const hooks_esm_useMergedRefs = (useMergedRefs_useMergedRefs);
|
|
10544
10721
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabContext.js
|
|
10545
10722
|
|
|
10546
10723
|
const TabContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
|
|
@@ -10610,19 +10787,19 @@ function useNavItem({
|
|
|
10610
10787
|
}
|
|
10611
10788
|
|
|
10612
10789
|
if (props.role === 'tab') {
|
|
10613
|
-
|
|
10790
|
+
props['aria-selected'] = isActive;
|
|
10791
|
+
|
|
10792
|
+
if (!isActive) {
|
|
10614
10793
|
props.tabIndex = -1;
|
|
10615
|
-
props['aria-disabled'] = true;
|
|
10616
10794
|
}
|
|
10617
10795
|
|
|
10618
|
-
if (
|
|
10619
|
-
props['aria-selected'] = isActive;
|
|
10620
|
-
} else {
|
|
10796
|
+
if (disabled) {
|
|
10621
10797
|
props.tabIndex = -1;
|
|
10798
|
+
props['aria-disabled'] = true;
|
|
10622
10799
|
}
|
|
10623
10800
|
}
|
|
10624
10801
|
|
|
10625
|
-
props.onClick =
|
|
10802
|
+
props.onClick = useEventCallback_useEventCallback(e => {
|
|
10626
10803
|
if (disabled) return;
|
|
10627
10804
|
onClick == null ? void 0 : onClick(e);
|
|
10628
10805
|
|
|
@@ -10779,7 +10956,7 @@ const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
|
|
|
10779
10956
|
|
|
10780
10957
|
needsRefocusRef.current = false;
|
|
10781
10958
|
});
|
|
10782
|
-
const mergedRef =
|
|
10959
|
+
const mergedRef = hooks_esm_useMergedRefs(ref, listNode);
|
|
10783
10960
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
|
|
10784
10961
|
value: handleSelect,
|
|
10785
10962
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_NavContext.Provider, {
|
|
@@ -11000,6 +11177,36 @@ function scrollbarSize(recalc) {
|
|
|
11000
11177
|
|
|
11001
11178
|
return size;
|
|
11002
11179
|
}
|
|
11180
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
|
|
11181
|
+
|
|
11182
|
+
/**
|
|
11183
|
+
* A convenience hook around `useState` designed to be paired with
|
|
11184
|
+
* the component [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) api.
|
|
11185
|
+
* Callback refs are useful over `useRef()` when you need to respond to the ref being set
|
|
11186
|
+
* instead of lazily accessing it in an effect.
|
|
11187
|
+
*
|
|
11188
|
+
* ```ts
|
|
11189
|
+
* const [element, attachRef] = useCallbackRef<HTMLDivElement>()
|
|
11190
|
+
*
|
|
11191
|
+
* useEffect(() => {
|
|
11192
|
+
* if (!element) return
|
|
11193
|
+
*
|
|
11194
|
+
* const calendar = new FullCalendar.Calendar(element)
|
|
11195
|
+
*
|
|
11196
|
+
* return () => {
|
|
11197
|
+
* calendar.destroy()
|
|
11198
|
+
* }
|
|
11199
|
+
* }, [element])
|
|
11200
|
+
*
|
|
11201
|
+
* return <div ref={attachRef} />
|
|
11202
|
+
* ```
|
|
11203
|
+
*
|
|
11204
|
+
* @category refs
|
|
11205
|
+
*/
|
|
11206
|
+
|
|
11207
|
+
function useCallbackRef_useCallbackRef() {
|
|
11208
|
+
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
|
|
11209
|
+
}
|
|
11003
11210
|
;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/activeElement.js
|
|
11004
11211
|
|
|
11005
11212
|
/**
|
|
@@ -11026,6 +11233,38 @@ function activeElement(doc) {
|
|
|
11026
11233
|
return doc.body;
|
|
11027
11234
|
}
|
|
11028
11235
|
}
|
|
11236
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useUpdatedRef.js
|
|
11237
|
+
|
|
11238
|
+
/**
|
|
11239
|
+
* Returns a ref that is immediately updated with the new value
|
|
11240
|
+
*
|
|
11241
|
+
* @param value The Ref value
|
|
11242
|
+
* @category refs
|
|
11243
|
+
*/
|
|
11244
|
+
|
|
11245
|
+
function useUpdatedRef_useUpdatedRef(value) {
|
|
11246
|
+
var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
|
|
11247
|
+
valueRef.current = value;
|
|
11248
|
+
return valueRef;
|
|
11249
|
+
}
|
|
11250
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useWillUnmount.js
|
|
11251
|
+
|
|
11252
|
+
|
|
11253
|
+
/**
|
|
11254
|
+
* Attach a callback that fires when a component unmounts
|
|
11255
|
+
*
|
|
11256
|
+
* @param fn Handler to run when the component unmounts
|
|
11257
|
+
* @category effects
|
|
11258
|
+
*/
|
|
11259
|
+
|
|
11260
|
+
function useWillUnmount_useWillUnmount(fn) {
|
|
11261
|
+
var onUnmount = useUpdatedRef_useUpdatedRef(fn);
|
|
11262
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
11263
|
+
return function () {
|
|
11264
|
+
return onUnmount.current();
|
|
11265
|
+
};
|
|
11266
|
+
}, []);
|
|
11267
|
+
}
|
|
11029
11268
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/getScrollbarWidth.js
|
|
11030
11269
|
/**
|
|
11031
11270
|
* Get the width of the vertical window scrollbar if it's visible
|
|
@@ -11308,7 +11547,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11308
11547
|
setExited(false);
|
|
11309
11548
|
}
|
|
11310
11549
|
|
|
11311
|
-
const handleShow =
|
|
11550
|
+
const handleShow = useEventCallback_useEventCallback(() => {
|
|
11312
11551
|
modal.add();
|
|
11313
11552
|
removeKeydownListenerRef.current = esm_listen(document, 'keydown', handleDocumentKeyDown);
|
|
11314
11553
|
removeFocusListenerRef.current = esm_listen(document, 'focus', // the timeout is necessary b/c this will run before the new modal is mounted
|
|
@@ -11330,7 +11569,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11330
11569
|
}
|
|
11331
11570
|
}
|
|
11332
11571
|
});
|
|
11333
|
-
const handleHide =
|
|
11572
|
+
const handleHide = useEventCallback_useEventCallback(() => {
|
|
11334
11573
|
modal.remove();
|
|
11335
11574
|
removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();
|
|
11336
11575
|
removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
|
|
@@ -11359,11 +11598,11 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11359
11598
|
if (!exited) return;
|
|
11360
11599
|
handleHide();
|
|
11361
11600
|
}, [exited, handleHide]);
|
|
11362
|
-
|
|
11601
|
+
useWillUnmount_useWillUnmount(() => {
|
|
11363
11602
|
handleHide();
|
|
11364
11603
|
}); // --------------------------------
|
|
11365
11604
|
|
|
11366
|
-
const handleEnforceFocus =
|
|
11605
|
+
const handleEnforceFocus = useEventCallback_useEventCallback(() => {
|
|
11367
11606
|
if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
|
|
11368
11607
|
return;
|
|
11369
11608
|
}
|
|
@@ -11374,7 +11613,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11374
11613
|
modal.dialog.focus();
|
|
11375
11614
|
}
|
|
11376
11615
|
});
|
|
11377
|
-
const handleBackdropClick =
|
|
11616
|
+
const handleBackdropClick = useEventCallback_useEventCallback(e => {
|
|
11378
11617
|
if (e.target !== e.currentTarget) {
|
|
11379
11618
|
return;
|
|
11380
11619
|
}
|
|
@@ -11385,7 +11624,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11385
11624
|
onHide();
|
|
11386
11625
|
}
|
|
11387
11626
|
});
|
|
11388
|
-
const handleDocumentKeyDown =
|
|
11627
|
+
const handleDocumentKeyDown = useEventCallback_useEventCallback(e => {
|
|
11389
11628
|
if (keyboard && e.keyCode === 27 && modal.isTopModal()) {
|
|
11390
11629
|
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
|
|
11391
11630
|
|
|
@@ -12068,7 +12307,7 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
12068
12307
|
const waitingForMouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
12069
12308
|
const ignoreBackdropClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
12070
12309
|
const removeStaticModalAnimationRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
12071
|
-
const [modal, setModalRef] =
|
|
12310
|
+
const [modal, setModalRef] = useCallbackRef_useCallbackRef();
|
|
12072
12311
|
const mergedRef = esm_useMergedRefs(ref, setModalRef);
|
|
12073
12312
|
const handleHide = useEventCallback(onHide);
|
|
12074
12313
|
const isRTL = useIsRTL();
|
|
@@ -12671,6 +12910,205 @@ NavbarToggle.displayName = 'NavbarToggle';
|
|
|
12671
12910
|
NavbarToggle.propTypes = NavbarToggle_propTypes;
|
|
12672
12911
|
NavbarToggle.defaultProps = NavbarToggle_defaultProps;
|
|
12673
12912
|
/* harmony default export */ const src_NavbarToggle = (NavbarToggle);
|
|
12913
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMediaQuery.js
|
|
12914
|
+
|
|
12915
|
+
|
|
12916
|
+
var matchersByWindow = new WeakMap();
|
|
12917
|
+
|
|
12918
|
+
var getMatcher = function getMatcher(query, targetWindow) {
|
|
12919
|
+
if (!query || !targetWindow) return undefined;
|
|
12920
|
+
var matchers = matchersByWindow.get(targetWindow) || new Map();
|
|
12921
|
+
matchersByWindow.set(targetWindow, matchers);
|
|
12922
|
+
var mql = matchers.get(query);
|
|
12923
|
+
|
|
12924
|
+
if (!mql) {
|
|
12925
|
+
mql = targetWindow.matchMedia(query);
|
|
12926
|
+
mql.refCount = 0;
|
|
12927
|
+
matchers.set(mql.media, mql);
|
|
12928
|
+
}
|
|
12929
|
+
|
|
12930
|
+
return mql;
|
|
12931
|
+
};
|
|
12932
|
+
/**
|
|
12933
|
+
* Match a media query and get updates as the match changes. The media string is
|
|
12934
|
+
* passed directly to `window.matchMedia` and run as a Layout Effect, so initial
|
|
12935
|
+
* matches are returned before the browser has a chance to paint.
|
|
12936
|
+
*
|
|
12937
|
+
* ```tsx
|
|
12938
|
+
* function Page() {
|
|
12939
|
+
* const isWide = useMediaQuery('min-width: 1000px')
|
|
12940
|
+
*
|
|
12941
|
+
* return isWide ? "very wide" : 'not so wide'
|
|
12942
|
+
* }
|
|
12943
|
+
* ```
|
|
12944
|
+
*
|
|
12945
|
+
* Media query lists are also reused globally, hook calls for the same query
|
|
12946
|
+
* will only create a matcher once under the hood.
|
|
12947
|
+
*
|
|
12948
|
+
* @param query A media query
|
|
12949
|
+
* @param targetWindow The window to match against, uses the globally available one as a default.
|
|
12950
|
+
*/
|
|
12951
|
+
|
|
12952
|
+
|
|
12953
|
+
function useMediaQuery(query, targetWindow) {
|
|
12954
|
+
if (targetWindow === void 0) {
|
|
12955
|
+
targetWindow = typeof window === 'undefined' ? undefined : window;
|
|
12956
|
+
}
|
|
12957
|
+
|
|
12958
|
+
var mql = getMatcher(query, targetWindow);
|
|
12959
|
+
|
|
12960
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(function () {
|
|
12961
|
+
return mql ? mql.matches : false;
|
|
12962
|
+
}),
|
|
12963
|
+
matches = _useState[0],
|
|
12964
|
+
setMatches = _useState[1];
|
|
12965
|
+
|
|
12966
|
+
esm_useIsomorphicEffect(function () {
|
|
12967
|
+
var mql = getMatcher(query, targetWindow);
|
|
12968
|
+
|
|
12969
|
+
if (!mql) {
|
|
12970
|
+
return setMatches(false);
|
|
12971
|
+
}
|
|
12972
|
+
|
|
12973
|
+
var matchers = matchersByWindow.get(targetWindow);
|
|
12974
|
+
|
|
12975
|
+
var handleChange = function handleChange() {
|
|
12976
|
+
setMatches(mql.matches);
|
|
12977
|
+
};
|
|
12978
|
+
|
|
12979
|
+
mql.refCount++;
|
|
12980
|
+
mql.addListener(handleChange);
|
|
12981
|
+
handleChange();
|
|
12982
|
+
return function () {
|
|
12983
|
+
mql.removeListener(handleChange);
|
|
12984
|
+
mql.refCount--;
|
|
12985
|
+
|
|
12986
|
+
if (mql.refCount <= 0) {
|
|
12987
|
+
matchers == null ? void 0 : matchers.delete(mql.media);
|
|
12988
|
+
}
|
|
12989
|
+
|
|
12990
|
+
mql = undefined;
|
|
12991
|
+
};
|
|
12992
|
+
}, [query]);
|
|
12993
|
+
return matches;
|
|
12994
|
+
}
|
|
12995
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useBreakpoint.js
|
|
12996
|
+
|
|
12997
|
+
|
|
12998
|
+
/**
|
|
12999
|
+
* Create a responsive hook we a set of breakpoint names and widths.
|
|
13000
|
+
* You can use any valid css units as well as a numbers (for pixels).
|
|
13001
|
+
*
|
|
13002
|
+
* **NOTE:** The object key order is important! it's assumed to be in order from smallest to largest
|
|
13003
|
+
*
|
|
13004
|
+
* ```ts
|
|
13005
|
+
* const useBreakpoint = createBreakpointHook({
|
|
13006
|
+
* xs: 0,
|
|
13007
|
+
* sm: 576,
|
|
13008
|
+
* md: 768,
|
|
13009
|
+
* lg: 992,
|
|
13010
|
+
* xl: 1200,
|
|
13011
|
+
* })
|
|
13012
|
+
* ```
|
|
13013
|
+
*
|
|
13014
|
+
* **Watch out!** using string values will sometimes construct media queries using css `calc()` which
|
|
13015
|
+
* is NOT supported in media queries by all browsers at the moment. use numbers for
|
|
13016
|
+
* the widest range of browser support.
|
|
13017
|
+
*
|
|
13018
|
+
* @param breakpointValues A object hash of names to breakpoint dimensions
|
|
13019
|
+
*/
|
|
13020
|
+
|
|
13021
|
+
function createBreakpointHook(breakpointValues) {
|
|
13022
|
+
var names = Object.keys(breakpointValues);
|
|
13023
|
+
|
|
13024
|
+
function and(query, next) {
|
|
13025
|
+
if (query === next) {
|
|
13026
|
+
return next;
|
|
13027
|
+
}
|
|
13028
|
+
|
|
13029
|
+
return query ? query + " and " + next : next;
|
|
13030
|
+
}
|
|
13031
|
+
|
|
13032
|
+
function getNext(breakpoint) {
|
|
13033
|
+
return names[Math.min(names.indexOf(breakpoint) + 1, names.length - 1)];
|
|
13034
|
+
}
|
|
13035
|
+
|
|
13036
|
+
function getMaxQuery(breakpoint) {
|
|
13037
|
+
var next = getNext(breakpoint);
|
|
13038
|
+
var value = breakpointValues[next];
|
|
13039
|
+
if (typeof value === 'number') value = value - 0.2 + "px";else value = "calc(" + value + " - 0.2px)";
|
|
13040
|
+
return "(max-width: " + value + ")";
|
|
13041
|
+
}
|
|
13042
|
+
|
|
13043
|
+
function getMinQuery(breakpoint) {
|
|
13044
|
+
var value = breakpointValues[breakpoint];
|
|
13045
|
+
|
|
13046
|
+
if (typeof value === 'number') {
|
|
13047
|
+
value = value + "px";
|
|
13048
|
+
}
|
|
13049
|
+
|
|
13050
|
+
return "(min-width: " + value + ")";
|
|
13051
|
+
}
|
|
13052
|
+
/**
|
|
13053
|
+
* Match a set of breakpoints
|
|
13054
|
+
*
|
|
13055
|
+
* ```tsx
|
|
13056
|
+
* const MidSizeOnly = () => {
|
|
13057
|
+
* const isMid = useBreakpoint({ lg: 'down', sm: 'up' });
|
|
13058
|
+
*
|
|
13059
|
+
* if (isMid) return <div>On a Reasonable sized Screen!</div>
|
|
13060
|
+
* return null;
|
|
13061
|
+
* }
|
|
13062
|
+
* ```
|
|
13063
|
+
* @param breakpointMap An object map of breakpoints and directions, queries are constructed using "and" to join
|
|
13064
|
+
* breakpoints together
|
|
13065
|
+
* @param window Optionally specify the target window to match against (useful when rendering into iframes)
|
|
13066
|
+
*/
|
|
13067
|
+
|
|
13068
|
+
|
|
13069
|
+
function useBreakpoint(breakpointOrMap, direction, window) {
|
|
13070
|
+
var breakpointMap;
|
|
13071
|
+
|
|
13072
|
+
if (typeof breakpointOrMap === 'object') {
|
|
13073
|
+
breakpointMap = breakpointOrMap;
|
|
13074
|
+
window = direction;
|
|
13075
|
+
direction = true;
|
|
13076
|
+
} else {
|
|
13077
|
+
var _breakpointMap;
|
|
13078
|
+
|
|
13079
|
+
direction = direction || true;
|
|
13080
|
+
breakpointMap = (_breakpointMap = {}, _breakpointMap[breakpointOrMap] = direction, _breakpointMap);
|
|
13081
|
+
}
|
|
13082
|
+
|
|
13083
|
+
var query = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
13084
|
+
return Object.entries(breakpointMap).reduce(function (query, _ref) {
|
|
13085
|
+
var key = _ref[0],
|
|
13086
|
+
direction = _ref[1];
|
|
13087
|
+
|
|
13088
|
+
if (direction === 'up' || direction === true) {
|
|
13089
|
+
query = and(query, getMinQuery(key));
|
|
13090
|
+
}
|
|
13091
|
+
|
|
13092
|
+
if (direction === 'down' || direction === true) {
|
|
13093
|
+
query = and(query, getMaxQuery(key));
|
|
13094
|
+
}
|
|
13095
|
+
|
|
13096
|
+
return query;
|
|
13097
|
+
}, '');
|
|
13098
|
+
}, [JSON.stringify(breakpointMap)]);
|
|
13099
|
+
return useMediaQuery(query, window);
|
|
13100
|
+
}
|
|
13101
|
+
|
|
13102
|
+
return useBreakpoint;
|
|
13103
|
+
}
|
|
13104
|
+
var useBreakpoint = createBreakpointHook({
|
|
13105
|
+
xs: 0,
|
|
13106
|
+
sm: 576,
|
|
13107
|
+
md: 768,
|
|
13108
|
+
lg: 992,
|
|
13109
|
+
xl: 1200
|
|
13110
|
+
});
|
|
13111
|
+
/* harmony default export */ const esm_useBreakpoint = (useBreakpoint);
|
|
12674
13112
|
;// CONCATENATED MODULE: ./src/OffcanvasBody.tsx
|
|
12675
13113
|
|
|
12676
13114
|
/* harmony default export */ const OffcanvasBody = (createWithBsPrefix('offcanvas-body'));
|
|
@@ -12866,6 +13304,7 @@ var Offcanvas_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstra
|
|
|
12866
13304
|
|
|
12867
13305
|
|
|
12868
13306
|
|
|
13307
|
+
|
|
12869
13308
|
const Offcanvas_propTypes = {
|
|
12870
13309
|
/**
|
|
12871
13310
|
* @default 'offcanvas'
|
|
@@ -13006,7 +13445,7 @@ function Offcanvas_DialogTransition(props) {
|
|
|
13006
13445
|
return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_OffcanvasToggling, { ...props
|
|
13007
13446
|
}, void 0, false, {
|
|
13008
13447
|
fileName: Offcanvas_jsxFileName,
|
|
13009
|
-
lineNumber:
|
|
13448
|
+
lineNumber: 194,
|
|
13010
13449
|
columnNumber: 10
|
|
13011
13450
|
}, this);
|
|
13012
13451
|
}
|
|
@@ -13015,7 +13454,7 @@ function Offcanvas_BackdropTransition(props) {
|
|
|
13015
13454
|
return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Fade, { ...props
|
|
13016
13455
|
}, void 0, false, {
|
|
13017
13456
|
fileName: Offcanvas_jsxFileName,
|
|
13018
|
-
lineNumber:
|
|
13457
|
+
lineNumber: 198,
|
|
13019
13458
|
columnNumber: 10
|
|
13020
13459
|
}, this);
|
|
13021
13460
|
}
|
|
@@ -13056,6 +13495,13 @@ const Offcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
13056
13495
|
const {
|
|
13057
13496
|
onToggle
|
|
13058
13497
|
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext) || {};
|
|
13498
|
+
const [showOffcanvas, setShowOffcanvas] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
|
|
13499
|
+
const hideResponsiveOffcanvas = esm_useBreakpoint(responsive || 'xs', 'up');
|
|
13500
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
13501
|
+
// Handles the case where screen is resized while the responsive
|
|
13502
|
+
// offcanvas is shown. If `responsive` not provided, just use `show`.
|
|
13503
|
+
setShowOffcanvas(responsive ? show && !hideResponsiveOffcanvas : show);
|
|
13504
|
+
}, [show, responsive, hideResponsiveOffcanvas]);
|
|
13059
13505
|
const handleHide = useEventCallback(() => {
|
|
13060
13506
|
onToggle == null ? void 0 : onToggle();
|
|
13061
13507
|
onHide == null ? void 0 : onHide();
|
|
@@ -13093,7 +13539,7 @@ const Offcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
13093
13539
|
className: classnames_default()(`${bsPrefix}-backdrop`, backdropClassName)
|
|
13094
13540
|
}, void 0, false, {
|
|
13095
13541
|
fileName: Offcanvas_jsxFileName,
|
|
13096
|
-
lineNumber:
|
|
13542
|
+
lineNumber: 293,
|
|
13097
13543
|
columnNumber: 11
|
|
13098
13544
|
}, undefined), [backdropClassName, bsPrefix]);
|
|
13099
13545
|
|
|
@@ -13104,15 +13550,15 @@ const Offcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
13104
13550
|
children: children
|
|
13105
13551
|
}, void 0, false, {
|
|
13106
13552
|
fileName: Offcanvas_jsxFileName,
|
|
13107
|
-
lineNumber:
|
|
13553
|
+
lineNumber: 302,
|
|
13108
13554
|
columnNumber: 9
|
|
13109
13555
|
}, undefined);
|
|
13110
13556
|
|
|
13111
13557
|
return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
|
|
13112
|
-
children: [!
|
|
13558
|
+
children: [!showOffcanvas && renderDialog({}), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_ModalContext.Provider, {
|
|
13113
13559
|
value: modalContext,
|
|
13114
13560
|
children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Modal, {
|
|
13115
|
-
show:
|
|
13561
|
+
show: showOffcanvas,
|
|
13116
13562
|
ref: ref,
|
|
13117
13563
|
backdrop: backdrop,
|
|
13118
13564
|
container: container,
|
|
@@ -13137,12 +13583,12 @@ const Offcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
13137
13583
|
renderDialog: renderDialog
|
|
13138
13584
|
}, void 0, false, {
|
|
13139
13585
|
fileName: Offcanvas_jsxFileName,
|
|
13140
|
-
lineNumber:
|
|
13586
|
+
lineNumber: 325,
|
|
13141
13587
|
columnNumber: 13
|
|
13142
13588
|
}, undefined)
|
|
13143
13589
|
}, void 0, false, {
|
|
13144
13590
|
fileName: Offcanvas_jsxFileName,
|
|
13145
|
-
lineNumber:
|
|
13591
|
+
lineNumber: 324,
|
|
13146
13592
|
columnNumber: 11
|
|
13147
13593
|
}, undefined)]
|
|
13148
13594
|
}, void 0, true);
|
|
@@ -13519,7 +13965,7 @@ function useRootClose(ref, onRootClose, {
|
|
|
13519
13965
|
disabled,
|
|
13520
13966
|
clickTrigger
|
|
13521
13967
|
});
|
|
13522
|
-
const handleKeyUp =
|
|
13968
|
+
const handleKeyUp = useEventCallback_useEventCallback(e => {
|
|
13523
13969
|
if (e.keyCode === escapeKeyCode) {
|
|
13524
13970
|
onClose(e);
|
|
13525
13971
|
}
|
|
@@ -13573,7 +14019,7 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
|
|
|
13573
14019
|
} = props;
|
|
13574
14020
|
const [rootElement, attachRef] = useCallbackRef();
|
|
13575
14021
|
const [arrowElement, attachArrowRef] = useCallbackRef();
|
|
13576
|
-
const mergedRef =
|
|
14022
|
+
const mergedRef = hooks_esm_useMergedRefs(attachRef, outerRef);
|
|
13577
14023
|
const container = useWaitForDOMRef(props.container);
|
|
13578
14024
|
const target = useWaitForDOMRef(props.target);
|
|
13579
14025
|
const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!props.show);
|
|
@@ -13926,7 +14372,7 @@ const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonj
|
|
|
13926
14372
|
...outerProps
|
|
13927
14373
|
}, outerRef) => {
|
|
13928
14374
|
const popperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
|
|
13929
|
-
const [firstRenderedState, setFirstRenderedState] =
|
|
14375
|
+
const [firstRenderedState, setFirstRenderedState] = useCallbackRef_useCallbackRef();
|
|
13930
14376
|
const [ref, modifiers] = useOverlayOffset(outerProps.offset);
|
|
13931
14377
|
const mergedRef = esm_useMergedRefs(outerRef, ref);
|
|
13932
14378
|
const actualTransition = transition === true ? src_Fade : transition || undefined;
|
|
@@ -13934,7 +14380,7 @@ const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonj
|
|
|
13934
14380
|
setFirstRenderedState(state);
|
|
13935
14381
|
popperConfig == null ? void 0 : popperConfig.onFirstUpdate == null ? void 0 : popperConfig.onFirstUpdate(state);
|
|
13936
14382
|
});
|
|
13937
|
-
|
|
14383
|
+
esm_useIsomorphicEffect(() => {
|
|
13938
14384
|
if (firstRenderedState) {
|
|
13939
14385
|
popperRef.current.scheduleUpdate == null ? void 0 : popperRef.current.scheduleUpdate();
|
|
13940
14386
|
}
|
|
@@ -14035,6 +14481,8 @@ const OverlayTrigger_propTypes = {
|
|
|
14035
14481
|
/**
|
|
14036
14482
|
* Specify which action or actions trigger Overlay visibility
|
|
14037
14483
|
*
|
|
14484
|
+
* The `click` trigger ignores the configured `delay`.
|
|
14485
|
+
*
|
|
14038
14486
|
* @type {'hover' | 'click' |'focus' | Array<'hover' | 'click' |'focus'>}
|
|
14039
14487
|
*/
|
|
14040
14488
|
trigger: prop_types_default().oneOfType([triggerType, prop_types_default().arrayOf(triggerType)]),
|
|
@@ -14212,7 +14660,7 @@ function OverlayTrigger({
|
|
|
14212
14660
|
children: overlay
|
|
14213
14661
|
}, void 0, false, {
|
|
14214
14662
|
fileName: OverlayTrigger_jsxFileName,
|
|
14215
|
-
lineNumber:
|
|
14663
|
+
lineNumber: 302,
|
|
14216
14664
|
columnNumber: 7
|
|
14217
14665
|
}, this)]
|
|
14218
14666
|
}, void 0, true);
|
|
@@ -15023,6 +15471,13 @@ const SplitButton_propTypes = {
|
|
|
15023
15471
|
*/
|
|
15024
15472
|
rootCloseEvent: (prop_types_default()).string,
|
|
15025
15473
|
|
|
15474
|
+
/**
|
|
15475
|
+
* Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to
|
|
15476
|
+
* Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).
|
|
15477
|
+
*
|
|
15478
|
+
*/
|
|
15479
|
+
flip: (prop_types_default()).bool,
|
|
15480
|
+
|
|
15026
15481
|
/** @ignore */
|
|
15027
15482
|
bsPrefix: (prop_types_default()).string,
|
|
15028
15483
|
|
|
@@ -15062,6 +15517,7 @@ const SplitButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
15062
15517
|
menuRole,
|
|
15063
15518
|
renderMenuOnMount,
|
|
15064
15519
|
rootCloseEvent,
|
|
15520
|
+
flip,
|
|
15065
15521
|
...props
|
|
15066
15522
|
}, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown, {
|
|
15067
15523
|
ref: ref,
|
|
@@ -15079,7 +15535,7 @@ const SplitButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
15079
15535
|
children: title
|
|
15080
15536
|
}, void 0, false, {
|
|
15081
15537
|
fileName: SplitButton_jsxFileName,
|
|
15082
|
-
lineNumber:
|
|
15538
|
+
lineNumber: 131,
|
|
15083
15539
|
columnNumber: 7
|
|
15084
15540
|
}, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown.Toggle, {
|
|
15085
15541
|
split: true,
|
|
@@ -15093,26 +15549,27 @@ const SplitButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
15093
15549
|
children: toggleLabel
|
|
15094
15550
|
}, void 0, false, {
|
|
15095
15551
|
fileName: SplitButton_jsxFileName,
|
|
15096
|
-
lineNumber:
|
|
15552
|
+
lineNumber: 151,
|
|
15097
15553
|
columnNumber: 9
|
|
15098
15554
|
}, undefined)
|
|
15099
15555
|
}, void 0, false, {
|
|
15100
15556
|
fileName: SplitButton_jsxFileName,
|
|
15101
|
-
lineNumber:
|
|
15557
|
+
lineNumber: 143,
|
|
15102
15558
|
columnNumber: 7
|
|
15103
15559
|
}, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown.Menu, {
|
|
15104
15560
|
role: menuRole,
|
|
15105
15561
|
renderOnMount: renderMenuOnMount,
|
|
15106
15562
|
rootCloseEvent: rootCloseEvent,
|
|
15563
|
+
flip: flip,
|
|
15107
15564
|
children: children
|
|
15108
15565
|
}, void 0, false, {
|
|
15109
15566
|
fileName: SplitButton_jsxFileName,
|
|
15110
|
-
lineNumber:
|
|
15567
|
+
lineNumber: 154,
|
|
15111
15568
|
columnNumber: 7
|
|
15112
15569
|
}, undefined)]
|
|
15113
15570
|
}, void 0, true, {
|
|
15114
15571
|
fileName: SplitButton_jsxFileName,
|
|
15115
|
-
lineNumber:
|
|
15572
|
+
lineNumber: 130,
|
|
15116
15573
|
columnNumber: 5
|
|
15117
15574
|
}, undefined));
|
|
15118
15575
|
SplitButton.propTypes = SplitButton_propTypes;
|
|
@@ -15121,7 +15578,7 @@ SplitButton.displayName = 'SplitButton';
|
|
|
15121
15578
|
/* harmony default export */ const src_SplitButton = (SplitButton);
|
|
15122
15579
|
;// CONCATENATED MODULE: ./src/SSRProvider.ts
|
|
15123
15580
|
|
|
15124
|
-
/* harmony default export */ const
|
|
15581
|
+
/* harmony default export */ const SSRProvider = ($704cf1d3b684cc5c$export$9f8ac96af4b1b2ae);
|
|
15125
15582
|
;// CONCATENATED MODULE: ./src/createUtilityClasses.ts
|
|
15126
15583
|
|
|
15127
15584
|
|
|
@@ -15393,7 +15850,7 @@ const Tabs = props => {
|
|
|
15393
15850
|
children
|
|
15394
15851
|
} = props;
|
|
15395
15852
|
const [activeKey, onSelect] = useUncontrolledProp(propsActiveKey, defaultActiveKey, propsOnSelect);
|
|
15396
|
-
const id =
|
|
15853
|
+
const id = $704cf1d3b684cc5c$export$619500959fc48b26(userId);
|
|
15397
15854
|
const generateChildId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => generateCustomChildId || ((key, type) => id ? `${id}-${type}-${key}` : null), [id, generateCustomChildId]);
|
|
15398
15855
|
const tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
|
|
15399
15856
|
onSelect,
|
|
@@ -15878,7 +16335,17 @@ const Tabs_propTypes = {
|
|
|
15878
16335
|
/**
|
|
15879
16336
|
* Unmount tabs (remove it from the DOM) when it is no longer visible
|
|
15880
16337
|
*/
|
|
15881
|
-
unmountOnExit: (prop_types_default()).bool
|
|
16338
|
+
unmountOnExit: (prop_types_default()).bool,
|
|
16339
|
+
|
|
16340
|
+
/**
|
|
16341
|
+
* Have all `Tabs`s proportionately fill all available width.
|
|
16342
|
+
*/
|
|
16343
|
+
fill: (prop_types_default()).bool,
|
|
16344
|
+
|
|
16345
|
+
/**
|
|
16346
|
+
* Have all `Tab`s evenly fill all available width.
|
|
16347
|
+
*/
|
|
16348
|
+
justify: (prop_types_default()).bool
|
|
15882
16349
|
};
|
|
15883
16350
|
const Tabs_defaultProps = {
|
|
15884
16351
|
variant: 'tabs',
|
|
@@ -15924,12 +16391,12 @@ function renderTab(child) {
|
|
|
15924
16391
|
children: title
|
|
15925
16392
|
}, void 0, false, {
|
|
15926
16393
|
fileName: Tabs_jsxFileName,
|
|
15927
|
-
lineNumber:
|
|
16394
|
+
lineNumber: 122,
|
|
15928
16395
|
columnNumber: 7
|
|
15929
16396
|
}, this)
|
|
15930
16397
|
}, void 0, false, {
|
|
15931
16398
|
fileName: Tabs_jsxFileName,
|
|
15932
|
-
lineNumber:
|
|
16399
|
+
lineNumber: 121,
|
|
15933
16400
|
columnNumber: 5
|
|
15934
16401
|
}, this);
|
|
15935
16402
|
}
|
|
@@ -15960,7 +16427,7 @@ const Tabs_Tabs = props => {
|
|
|
15960
16427
|
children: map(children, renderTab)
|
|
15961
16428
|
}, void 0, false, {
|
|
15962
16429
|
fileName: Tabs_jsxFileName,
|
|
15963
|
-
lineNumber:
|
|
16430
|
+
lineNumber: 160,
|
|
15964
16431
|
columnNumber: 7
|
|
15965
16432
|
}, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(TabContent, {
|
|
15966
16433
|
children: map(children, child => {
|
|
@@ -15973,18 +16440,18 @@ const Tabs_Tabs = props => {
|
|
|
15973
16440
|
return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_TabPane, { ...childProps
|
|
15974
16441
|
}, void 0, false, {
|
|
15975
16442
|
fileName: Tabs_jsxFileName,
|
|
15976
|
-
lineNumber:
|
|
16443
|
+
lineNumber: 173,
|
|
15977
16444
|
columnNumber: 18
|
|
15978
16445
|
}, undefined);
|
|
15979
16446
|
})
|
|
15980
16447
|
}, void 0, false, {
|
|
15981
16448
|
fileName: Tabs_jsxFileName,
|
|
15982
|
-
lineNumber:
|
|
16449
|
+
lineNumber: 164,
|
|
15983
16450
|
columnNumber: 7
|
|
15984
16451
|
}, undefined)]
|
|
15985
16452
|
}, void 0, true, {
|
|
15986
16453
|
fileName: Tabs_jsxFileName,
|
|
15987
|
-
lineNumber:
|
|
16454
|
+
lineNumber: 152,
|
|
15988
16455
|
columnNumber: 5
|
|
15989
16456
|
}, undefined);
|
|
15990
16457
|
};
|