react-bootstrap 2.10.6 → 2.10.7
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 +1 -1
- package/cjs/Ratio.d.ts +1 -1
- package/cjs/Tabs.d.ts +1 -67
- package/dist/react-bootstrap.js +221 -47
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/Dropdown.d.ts +1 -1
- package/esm/Ratio.d.ts +1 -1
- package/esm/Tabs.d.ts +1 -67
- package/package.json +3 -2
package/dist/react-bootstrap.js
CHANGED
|
@@ -3023,7 +3023,7 @@ const AlertHeading = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_r
|
|
|
3023
3023
|
});
|
|
3024
3024
|
AlertHeading.displayName = 'AlertHeading';
|
|
3025
3025
|
/* harmony default export */ const src_AlertHeading = (AlertHeading);
|
|
3026
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
|
|
3026
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCallbackRef.js
|
|
3027
3027
|
|
|
3028
3028
|
|
|
3029
3029
|
/**
|
|
@@ -3053,7 +3053,36 @@ AlertHeading.displayName = 'AlertHeading';
|
|
|
3053
3053
|
function useCallbackRef() {
|
|
3054
3054
|
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
|
|
3055
3055
|
}
|
|
3056
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/
|
|
3056
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useCommittedRef.js
|
|
3057
|
+
|
|
3058
|
+
|
|
3059
|
+
/**
|
|
3060
|
+
* Creates a `Ref` whose value is updated in an effect, ensuring the most recent
|
|
3061
|
+
* value is the one rendered with. Generally only required for Concurrent mode usage
|
|
3062
|
+
* where previous work in `render()` may be discarded before being used.
|
|
3063
|
+
*
|
|
3064
|
+
* This is safe to access in an event handler.
|
|
3065
|
+
*
|
|
3066
|
+
* @param value The `Ref` value
|
|
3067
|
+
*/
|
|
3068
|
+
function esm_useCommittedRef_useCommittedRef(value) {
|
|
3069
|
+
const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
|
|
3070
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
3071
|
+
ref.current = value;
|
|
3072
|
+
}, [value]);
|
|
3073
|
+
return ref;
|
|
3074
|
+
}
|
|
3075
|
+
/* harmony default export */ const hooks_esm_useCommittedRef = (esm_useCommittedRef_useCommittedRef);
|
|
3076
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useEventCallback.js
|
|
3077
|
+
|
|
3078
|
+
|
|
3079
|
+
function useEventCallback_useEventCallback(fn) {
|
|
3080
|
+
const ref = hooks_esm_useCommittedRef(fn);
|
|
3081
|
+
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (...args) {
|
|
3082
|
+
return ref.current && ref.current(...args);
|
|
3083
|
+
}, [ref]);
|
|
3084
|
+
}
|
|
3085
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useEventListener.js
|
|
3057
3086
|
|
|
3058
3087
|
|
|
3059
3088
|
/**
|
|
@@ -3066,14 +3095,14 @@ function useCallbackRef() {
|
|
|
3066
3095
|
* @param capture Whether or not to listen during the capture event phase
|
|
3067
3096
|
*/
|
|
3068
3097
|
function useEventListener_useEventListener(eventTarget, event, listener, capture = false) {
|
|
3069
|
-
const handler =
|
|
3098
|
+
const handler = useEventCallback_useEventCallback(listener);
|
|
3070
3099
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
3071
3100
|
const target = typeof eventTarget === 'function' ? eventTarget() : eventTarget;
|
|
3072
3101
|
target.addEventListener(event, handler, capture);
|
|
3073
3102
|
return () => target.removeEventListener(event, handler, capture);
|
|
3074
3103
|
}, [eventTarget]);
|
|
3075
3104
|
}
|
|
3076
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useGlobalListener.js
|
|
3105
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useGlobalListener.js
|
|
3077
3106
|
|
|
3078
3107
|
|
|
3079
3108
|
/**
|
|
@@ -3094,7 +3123,7 @@ function useGlobalListener(event, handler, capture = false) {
|
|
|
3094
3123
|
const documentTarget = useCallback(() => document, []);
|
|
3095
3124
|
return useEventListener(documentTarget, event, handler, capture);
|
|
3096
3125
|
}
|
|
3097
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useInterval.js
|
|
3126
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useInterval.js
|
|
3098
3127
|
|
|
3099
3128
|
|
|
3100
3129
|
|
|
@@ -3183,7 +3212,7 @@ function useInterval(fn, ms, paused = false, runImmediately = false) {
|
|
|
3183
3212
|
}, [paused, runImmediately]);
|
|
3184
3213
|
}
|
|
3185
3214
|
/* harmony default export */ const esm_useInterval = ((/* unused pure expression or super */ null && (useInterval)));
|
|
3186
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useRafInterval.js
|
|
3215
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useRafInterval.js
|
|
3187
3216
|
|
|
3188
3217
|
|
|
3189
3218
|
function useRafInterval(fn, ms, paused = false) {
|
|
@@ -3210,7 +3239,7 @@ function useRafInterval(fn, ms, paused = false) {
|
|
|
3210
3239
|
}, []);
|
|
3211
3240
|
}
|
|
3212
3241
|
/* harmony default export */ const esm_useRafInterval = ((/* unused pure expression or super */ null && (useRafInterval)));
|
|
3213
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeState.js
|
|
3242
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeState.js
|
|
3214
3243
|
|
|
3215
3244
|
|
|
3216
3245
|
/**
|
|
@@ -3247,7 +3276,7 @@ function useMergeState_useMergeState(initialState) {
|
|
|
3247
3276
|
}, [setState]);
|
|
3248
3277
|
return [state, updater];
|
|
3249
3278
|
}
|
|
3250
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeStateFromProps.js
|
|
3279
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergeStateFromProps.js
|
|
3251
3280
|
|
|
3252
3281
|
function useMergeStateFromProps(props, gDSFP, initialState) {
|
|
3253
3282
|
const [state, setState] = useMergeState(initialState);
|
|
@@ -3255,7 +3284,7 @@ function useMergeStateFromProps(props, gDSFP, initialState) {
|
|
|
3255
3284
|
if (nextState !== null) setState(nextState);
|
|
3256
3285
|
return [state, setState];
|
|
3257
3286
|
}
|
|
3258
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
|
|
3287
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMounted.js
|
|
3259
3288
|
|
|
3260
3289
|
|
|
3261
3290
|
/**
|
|
@@ -3289,7 +3318,7 @@ function useMounted() {
|
|
|
3289
3318
|
}, []);
|
|
3290
3319
|
return isMounted.current;
|
|
3291
3320
|
}
|
|
3292
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/usePrevious.js
|
|
3321
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/usePrevious.js
|
|
3293
3322
|
|
|
3294
3323
|
|
|
3295
3324
|
/**
|
|
@@ -3316,7 +3345,7 @@ function usePrevious(value) {
|
|
|
3316
3345
|
});
|
|
3317
3346
|
return ref.current;
|
|
3318
3347
|
}
|
|
3319
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useImage.js
|
|
3348
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useImage.js
|
|
3320
3349
|
|
|
3321
3350
|
/**
|
|
3322
3351
|
* Fetch and load an image for programatic use such as in a `<canvas>` element.
|
|
@@ -3386,7 +3415,7 @@ function useImage(imageOrUrl, crossOrigin) {
|
|
|
3386
3415
|
}, [imageOrUrl, crossOrigin]);
|
|
3387
3416
|
return state;
|
|
3388
3417
|
}
|
|
3389
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
|
|
3418
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useIsomorphicEffect.js
|
|
3390
3419
|
|
|
3391
3420
|
const isReactNative = typeof __webpack_require__.g !== 'undefined' &&
|
|
3392
3421
|
// @ts-ignore
|
|
@@ -3404,7 +3433,7 @@ const isDOM = typeof document !== 'undefined';
|
|
|
3404
3433
|
* @category effects
|
|
3405
3434
|
*/
|
|
3406
3435
|
/* 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);
|
|
3407
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useResizeObserver.js
|
|
3436
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useResizeObserver.js
|
|
3408
3437
|
|
|
3409
3438
|
|
|
3410
3439
|
const targetMap = new WeakMap();
|
|
@@ -3452,7 +3481,7 @@ function useResizeObserver(element) {
|
|
|
3452
3481
|
}, [element]);
|
|
3453
3482
|
return rect;
|
|
3454
3483
|
}
|
|
3455
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/index.js
|
|
3484
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/index.js
|
|
3456
3485
|
|
|
3457
3486
|
|
|
3458
3487
|
|
|
@@ -3600,7 +3629,7 @@ const Anchor = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
|
|
|
3600
3629
|
const [buttonProps] = useButtonProps(Object.assign({
|
|
3601
3630
|
tagName: 'a'
|
|
3602
3631
|
}, props));
|
|
3603
|
-
const handleKeyDown =
|
|
3632
|
+
const handleKeyDown = useEventCallback_useEventCallback(e => {
|
|
3604
3633
|
buttonProps.onKeyDown(e);
|
|
3605
3634
|
onKeyDown == null ? void 0 : onKeyDown(e);
|
|
3606
3635
|
});
|
|
@@ -4714,6 +4743,40 @@ function useUpdateEffect(fn, deps) {
|
|
|
4714
4743
|
}, deps);
|
|
4715
4744
|
}
|
|
4716
4745
|
/* harmony default export */ const esm_useUpdateEffect = (useUpdateEffect);
|
|
4746
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
|
|
4747
|
+
|
|
4748
|
+
|
|
4749
|
+
/**
|
|
4750
|
+
* Track whether a component is current mounted. Generally less preferable than
|
|
4751
|
+
* properlly canceling effects so they don't run after a component is unmounted,
|
|
4752
|
+
* but helpful in cases where that isn't feasible, such as a `Promise` resolution.
|
|
4753
|
+
*
|
|
4754
|
+
* @returns a function that returns the current isMounted state of the component
|
|
4755
|
+
*
|
|
4756
|
+
* ```ts
|
|
4757
|
+
* const [data, setData] = useState(null)
|
|
4758
|
+
* const isMounted = useMounted()
|
|
4759
|
+
*
|
|
4760
|
+
* useEffect(() => {
|
|
4761
|
+
* fetchdata().then((newData) => {
|
|
4762
|
+
* if (isMounted()) {
|
|
4763
|
+
* setData(newData);
|
|
4764
|
+
* }
|
|
4765
|
+
* })
|
|
4766
|
+
* })
|
|
4767
|
+
* ```
|
|
4768
|
+
*/
|
|
4769
|
+
function useMounted_useMounted() {
|
|
4770
|
+
const mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
|
|
4771
|
+
const isMounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(() => mounted.current);
|
|
4772
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
4773
|
+
mounted.current = true;
|
|
4774
|
+
return () => {
|
|
4775
|
+
mounted.current = false;
|
|
4776
|
+
};
|
|
4777
|
+
}, []);
|
|
4778
|
+
return isMounted.current;
|
|
4779
|
+
}
|
|
4717
4780
|
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdatedRef.js
|
|
4718
4781
|
|
|
4719
4782
|
|
|
@@ -4780,7 +4843,7 @@ function setChainedTimeout(handleRef, fn, timeoutAtMs) {
|
|
|
4780
4843
|
* ```
|
|
4781
4844
|
*/
|
|
4782
4845
|
function useTimeout() {
|
|
4783
|
-
const isMounted =
|
|
4846
|
+
const isMounted = useMounted_useMounted();
|
|
4784
4847
|
|
|
4785
4848
|
// types are confused between node and web here IDK
|
|
4786
4849
|
const handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
@@ -5624,7 +5687,7 @@ function esm_useUncontrolled(props, config) {
|
|
|
5624
5687
|
});
|
|
5625
5688
|
}, props);
|
|
5626
5689
|
}
|
|
5627
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useForceUpdate.js
|
|
5690
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useForceUpdate.js
|
|
5628
5691
|
|
|
5629
5692
|
|
|
5630
5693
|
/**
|
|
@@ -5646,7 +5709,7 @@ function esm_useUncontrolled(props, config) {
|
|
|
5646
5709
|
function useForceUpdate() {
|
|
5647
5710
|
// The toggling state value is designed to defeat React optimizations for skipping
|
|
5648
5711
|
// updates when they are strictly equal to the last state value
|
|
5649
|
-
const [, dispatch] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(
|
|
5712
|
+
const [, dispatch] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(revision => revision + 1, 0);
|
|
5650
5713
|
return dispatch;
|
|
5651
5714
|
}
|
|
5652
5715
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/DropdownContext.js
|
|
@@ -5739,7 +5802,7 @@ function dequal(foo, bar) {
|
|
|
5739
5802
|
return foo !== foo && bar !== bar;
|
|
5740
5803
|
}
|
|
5741
5804
|
|
|
5742
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useSafeState.js
|
|
5805
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useSafeState.js
|
|
5743
5806
|
|
|
5744
5807
|
|
|
5745
5808
|
|
|
@@ -7697,7 +7760,7 @@ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
|
|
|
7697
7760
|
preventMouseClickOutsideRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target) || waitingForTrigger.current;
|
|
7698
7761
|
waitingForTrigger.current = false;
|
|
7699
7762
|
}, [ref]);
|
|
7700
|
-
const handleInitialMouse =
|
|
7763
|
+
const handleInitialMouse = useEventCallback_useEventCallback(e => {
|
|
7701
7764
|
const currentTarget = getRefTarget(ref);
|
|
7702
7765
|
if (currentTarget && contains_contains(currentTarget, e.target)) {
|
|
7703
7766
|
waitingForTrigger.current = true;
|
|
@@ -7708,7 +7771,7 @@ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
|
|
|
7708
7771
|
waitingForTrigger.current = false;
|
|
7709
7772
|
}
|
|
7710
7773
|
});
|
|
7711
|
-
const handleMouse =
|
|
7774
|
+
const handleMouse = useEventCallback_useEventCallback(e => {
|
|
7712
7775
|
if (!preventMouseClickOutsideRef.current) {
|
|
7713
7776
|
onClickOutside(e);
|
|
7714
7777
|
}
|
|
@@ -8215,7 +8278,7 @@ function useDropdownItem({
|
|
|
8215
8278
|
} = navContext || {};
|
|
8216
8279
|
const eventKey = makeEventKey(key, href);
|
|
8217
8280
|
const isActive = active == null && key != null ? makeEventKey(activeKey) === eventKey : active;
|
|
8218
|
-
const handleClick =
|
|
8281
|
+
const handleClick = useEventCallback_useEventCallback(event => {
|
|
8219
8282
|
if (disabled) return;
|
|
8220
8283
|
onClick == null ? void 0 : onClick(event);
|
|
8221
8284
|
if (onSelectCtx && !event.isPropagationStopped()) {
|
|
@@ -8331,7 +8394,7 @@ function Dropdown({
|
|
|
8331
8394
|
source
|
|
8332
8395
|
});
|
|
8333
8396
|
}, [onToggle]);
|
|
8334
|
-
const handleSelect =
|
|
8397
|
+
const handleSelect = useEventCallback_useEventCallback((key, event) => {
|
|
8335
8398
|
onSelect == null ? void 0 : onSelect(key, event);
|
|
8336
8399
|
toggle(false, event, 'select');
|
|
8337
8400
|
if (!event.isPropagationStopped()) {
|
|
@@ -8350,12 +8413,12 @@ function Dropdown({
|
|
|
8350
8413
|
if (menuElement && lastShow && !show) {
|
|
8351
8414
|
focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);
|
|
8352
8415
|
}
|
|
8353
|
-
const focusToggle =
|
|
8416
|
+
const focusToggle = useEventCallback_useEventCallback(() => {
|
|
8354
8417
|
if (toggleElement && toggleElement.focus) {
|
|
8355
8418
|
toggleElement.focus();
|
|
8356
8419
|
}
|
|
8357
8420
|
});
|
|
8358
|
-
const maybeFocusFirst =
|
|
8421
|
+
const maybeFocusFirst = useEventCallback_useEventCallback(() => {
|
|
8359
8422
|
const type = lastSourceEvent.current;
|
|
8360
8423
|
let focusType = focusFirstItemOnShow;
|
|
8361
8424
|
if (focusType == null) {
|
|
@@ -8614,6 +8677,24 @@ const DropdownItemText = /*#__PURE__*/external_root_React_commonjs2_react_common
|
|
|
8614
8677
|
});
|
|
8615
8678
|
DropdownItemText.displayName = 'DropdownItemText';
|
|
8616
8679
|
/* harmony default export */ const src_DropdownItemText = (DropdownItemText);
|
|
8680
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
|
|
8681
|
+
|
|
8682
|
+
const useIsomorphicEffect_isReactNative = typeof __webpack_require__.g !== 'undefined' &&
|
|
8683
|
+
// @ts-ignore
|
|
8684
|
+
__webpack_require__.g.navigator &&
|
|
8685
|
+
// @ts-ignore
|
|
8686
|
+
__webpack_require__.g.navigator.product === 'ReactNative';
|
|
8687
|
+
const useIsomorphicEffect_isDOM = typeof document !== 'undefined';
|
|
8688
|
+
|
|
8689
|
+
/**
|
|
8690
|
+
* Is `useLayoutEffect` in a DOM or React Native environment, otherwise resolves to useEffect
|
|
8691
|
+
* Only useful to avoid the console warning.
|
|
8692
|
+
*
|
|
8693
|
+
* PREFER `useEffect` UNLESS YOU KNOW WHAT YOU ARE DOING.
|
|
8694
|
+
*
|
|
8695
|
+
* @category effects
|
|
8696
|
+
*/
|
|
8697
|
+
/* 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);
|
|
8617
8698
|
;// CONCATENATED MODULE: ./src/InputGroupContext.tsx
|
|
8618
8699
|
|
|
8619
8700
|
const InputGroupContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
|
|
@@ -8792,7 +8873,7 @@ const DropdownMenu_DropdownMenu = /*#__PURE__*/external_root_React_commonjs2_rea
|
|
|
8792
8873
|
placement
|
|
8793
8874
|
});
|
|
8794
8875
|
menuProps.ref = esm_useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref);
|
|
8795
|
-
|
|
8876
|
+
esm_useIsomorphicEffect(() => {
|
|
8796
8877
|
// Popper's initial position for the menu is incorrect when
|
|
8797
8878
|
// renderOnMount=true. Need to call update() to correct it.
|
|
8798
8879
|
if (show) popper == null || popper.update();
|
|
@@ -9054,17 +9135,17 @@ const Dropdown_Dropdown = /*#__PURE__*/external_root_React_commonjs2_react_commo
|
|
|
9054
9135
|
className: classnames_default()(className, show && 'show', directionClasses[drop])
|
|
9055
9136
|
}, void 0, false, {
|
|
9056
9137
|
fileName: Dropdown_jsxFileName,
|
|
9057
|
-
lineNumber:
|
|
9138
|
+
lineNumber: 209,
|
|
9058
9139
|
columnNumber: 13
|
|
9059
9140
|
}, undefined)
|
|
9060
9141
|
}, void 0, false, {
|
|
9061
9142
|
fileName: Dropdown_jsxFileName,
|
|
9062
|
-
lineNumber:
|
|
9143
|
+
lineNumber: 198,
|
|
9063
9144
|
columnNumber: 9
|
|
9064
9145
|
}, undefined)
|
|
9065
9146
|
}, void 0, false, {
|
|
9066
9147
|
fileName: Dropdown_jsxFileName,
|
|
9067
|
-
lineNumber:
|
|
9148
|
+
lineNumber: 197,
|
|
9068
9149
|
columnNumber: 7
|
|
9069
9150
|
}, undefined);
|
|
9070
9151
|
});
|
|
@@ -10352,6 +10433,40 @@ InputGroup.displayName = 'InputGroup';
|
|
|
10352
10433
|
Radio: InputGroupRadio,
|
|
10353
10434
|
Checkbox: InputGroupCheckbox
|
|
10354
10435
|
}));
|
|
10436
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useMergedRefs.js
|
|
10437
|
+
|
|
10438
|
+
const useMergedRefs_toFnRef = ref => !ref || typeof ref === 'function' ? ref : value => {
|
|
10439
|
+
ref.current = value;
|
|
10440
|
+
};
|
|
10441
|
+
function useMergedRefs_mergeRefs(refA, refB) {
|
|
10442
|
+
const a = useMergedRefs_toFnRef(refA);
|
|
10443
|
+
const b = useMergedRefs_toFnRef(refB);
|
|
10444
|
+
return value => {
|
|
10445
|
+
if (a) a(value);
|
|
10446
|
+
if (b) b(value);
|
|
10447
|
+
};
|
|
10448
|
+
}
|
|
10449
|
+
|
|
10450
|
+
/**
|
|
10451
|
+
* Create and returns a single callback ref composed from two other Refs.
|
|
10452
|
+
*
|
|
10453
|
+
* ```tsx
|
|
10454
|
+
* const Button = React.forwardRef((props, ref) => {
|
|
10455
|
+
* const [element, attachRef] = useCallbackRef<HTMLButtonElement>();
|
|
10456
|
+
* const mergedRef = useMergedRefs(ref, attachRef);
|
|
10457
|
+
*
|
|
10458
|
+
* return <button ref={mergedRef} {...props}/>
|
|
10459
|
+
* })
|
|
10460
|
+
* ```
|
|
10461
|
+
*
|
|
10462
|
+
* @param refA A Callback or mutable Ref
|
|
10463
|
+
* @param refB A Callback or mutable Ref
|
|
10464
|
+
* @category refs
|
|
10465
|
+
*/
|
|
10466
|
+
function useMergedRefs_useMergedRefs(refA, refB) {
|
|
10467
|
+
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => useMergedRefs_mergeRefs(refA, refB), [refA, refB]);
|
|
10468
|
+
}
|
|
10469
|
+
/* harmony default export */ const hooks_esm_useMergedRefs = (useMergedRefs_useMergedRefs);
|
|
10355
10470
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabContext.js
|
|
10356
10471
|
|
|
10357
10472
|
const TabContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
|
|
@@ -10422,7 +10537,7 @@ function useNavItem({
|
|
|
10422
10537
|
props['aria-disabled'] = true;
|
|
10423
10538
|
}
|
|
10424
10539
|
}
|
|
10425
|
-
props.onClick =
|
|
10540
|
+
props.onClick = useEventCallback_useEventCallback(e => {
|
|
10426
10541
|
if (disabled) return;
|
|
10427
10542
|
onClick == null ? void 0 : onClick(e);
|
|
10428
10543
|
if (key == null) {
|
|
@@ -10555,7 +10670,7 @@ const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
|
|
|
10555
10670
|
}
|
|
10556
10671
|
needsRefocusRef.current = false;
|
|
10557
10672
|
});
|
|
10558
|
-
const mergedRef =
|
|
10673
|
+
const mergedRef = hooks_esm_useMergedRefs(ref, listNode);
|
|
10559
10674
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
|
|
10560
10675
|
value: handleSelect,
|
|
10561
10676
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_NavContext.Provider, {
|
|
@@ -10766,6 +10881,36 @@ function scrollbarSize(recalc) {
|
|
|
10766
10881
|
}
|
|
10767
10882
|
return size;
|
|
10768
10883
|
}
|
|
10884
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
|
|
10885
|
+
|
|
10886
|
+
|
|
10887
|
+
/**
|
|
10888
|
+
* A convenience hook around `useState` designed to be paired with
|
|
10889
|
+
* the component [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) api.
|
|
10890
|
+
* Callback refs are useful over `useRef()` when you need to respond to the ref being set
|
|
10891
|
+
* instead of lazily accessing it in an effect.
|
|
10892
|
+
*
|
|
10893
|
+
* ```ts
|
|
10894
|
+
* const [element, attachRef] = useCallbackRef<HTMLDivElement>()
|
|
10895
|
+
*
|
|
10896
|
+
* useEffect(() => {
|
|
10897
|
+
* if (!element) return
|
|
10898
|
+
*
|
|
10899
|
+
* const calendar = new FullCalendar.Calendar(element)
|
|
10900
|
+
*
|
|
10901
|
+
* return () => {
|
|
10902
|
+
* calendar.destroy()
|
|
10903
|
+
* }
|
|
10904
|
+
* }, [element])
|
|
10905
|
+
*
|
|
10906
|
+
* return <div ref={attachRef} />
|
|
10907
|
+
* ```
|
|
10908
|
+
*
|
|
10909
|
+
* @category refs
|
|
10910
|
+
*/
|
|
10911
|
+
function useCallbackRef_useCallbackRef() {
|
|
10912
|
+
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
|
|
10913
|
+
}
|
|
10769
10914
|
;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/activeElement.js
|
|
10770
10915
|
|
|
10771
10916
|
/**
|
|
@@ -10792,6 +10937,35 @@ function activeElement(doc) {
|
|
|
10792
10937
|
return doc.body;
|
|
10793
10938
|
}
|
|
10794
10939
|
}
|
|
10940
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useUpdatedRef.js
|
|
10941
|
+
|
|
10942
|
+
|
|
10943
|
+
/**
|
|
10944
|
+
* Returns a ref that is immediately updated with the new value
|
|
10945
|
+
*
|
|
10946
|
+
* @param value The Ref value
|
|
10947
|
+
* @category refs
|
|
10948
|
+
*/
|
|
10949
|
+
function useUpdatedRef_useUpdatedRef(value) {
|
|
10950
|
+
const valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
|
|
10951
|
+
valueRef.current = value;
|
|
10952
|
+
return valueRef;
|
|
10953
|
+
}
|
|
10954
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/@restart/hooks/esm/useWillUnmount.js
|
|
10955
|
+
|
|
10956
|
+
|
|
10957
|
+
|
|
10958
|
+
/**
|
|
10959
|
+
* Attach a callback that fires when a component unmounts
|
|
10960
|
+
*
|
|
10961
|
+
* @param fn Handler to run when the component unmounts
|
|
10962
|
+
* @deprecated Use `useMounted` and normal effects, this is not StrictMode safe
|
|
10963
|
+
* @category effects
|
|
10964
|
+
*/
|
|
10965
|
+
function useWillUnmount_useWillUnmount(fn) {
|
|
10966
|
+
const onUnmount = useUpdatedRef_useUpdatedRef(fn);
|
|
10967
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => () => onUnmount.current(), []);
|
|
10968
|
+
}
|
|
10795
10969
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/getScrollbarWidth.js
|
|
10796
10970
|
/**
|
|
10797
10971
|
* Get the width of the vertical window scrollbar if it's visible
|
|
@@ -10947,13 +11121,13 @@ function NoopTransition({
|
|
|
10947
11121
|
}) {
|
|
10948
11122
|
const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
10949
11123
|
const hasEnteredRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(inProp);
|
|
10950
|
-
const handleExited =
|
|
11124
|
+
const handleExited = useEventCallback_useEventCallback(onExited);
|
|
10951
11125
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
10952
11126
|
if (inProp) hasEnteredRef.current = true;else {
|
|
10953
11127
|
handleExited(ref.current);
|
|
10954
11128
|
}
|
|
10955
11129
|
}, [inProp, handleExited]);
|
|
10956
|
-
const combinedRef =
|
|
11130
|
+
const combinedRef = hooks_esm_useMergedRefs(ref, children.ref);
|
|
10957
11131
|
const child = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
|
|
10958
11132
|
ref: combinedRef
|
|
10959
11133
|
});
|
|
@@ -11001,7 +11175,7 @@ function useRTGTransitionProps(_ref) {
|
|
|
11001
11175
|
} = _ref,
|
|
11002
11176
|
props = useRTGTransitionProps_objectWithoutPropertiesLoose(_ref, useRTGTransitionProps_excluded);
|
|
11003
11177
|
const nodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
11004
|
-
const mergedRef =
|
|
11178
|
+
const mergedRef = hooks_esm_useMergedRefs(nodeRef, getChildRef(children));
|
|
11005
11179
|
const normalize = callback => param => {
|
|
11006
11180
|
if (callback && nodeRef.current) {
|
|
11007
11181
|
callback(nodeRef.current, param);
|
|
@@ -11084,7 +11258,7 @@ function useTransition({
|
|
|
11084
11258
|
}) {
|
|
11085
11259
|
const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
11086
11260
|
const isInitialRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
|
|
11087
|
-
const handleTransition =
|
|
11261
|
+
const handleTransition = useEventCallback_useEventCallback(onTransition);
|
|
11088
11262
|
useIsomorphicEffect(() => {
|
|
11089
11263
|
if (!ref.current) {
|
|
11090
11264
|
return undefined;
|
|
@@ -11146,7 +11320,7 @@ function ImperativeTransition({
|
|
|
11146
11320
|
});
|
|
11147
11321
|
}
|
|
11148
11322
|
});
|
|
11149
|
-
const combinedRef =
|
|
11323
|
+
const combinedRef = hooks_esm_useMergedRefs(ref, children.ref);
|
|
11150
11324
|
return exited && !inProp ? null : /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
|
|
11151
11325
|
ref: combinedRef
|
|
11152
11326
|
});
|
|
@@ -11275,7 +11449,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11275
11449
|
if (show && exited) {
|
|
11276
11450
|
setExited(false);
|
|
11277
11451
|
}
|
|
11278
|
-
const handleShow =
|
|
11452
|
+
const handleShow = useEventCallback_useEventCallback(() => {
|
|
11279
11453
|
modal.add();
|
|
11280
11454
|
removeKeydownListenerRef.current = esm_listen(document, 'keydown', handleDocumentKeyDown);
|
|
11281
11455
|
removeFocusListenerRef.current = esm_listen(document, 'focus',
|
|
@@ -11297,7 +11471,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11297
11471
|
}
|
|
11298
11472
|
}
|
|
11299
11473
|
});
|
|
11300
|
-
const handleHide =
|
|
11474
|
+
const handleHide = useEventCallback_useEventCallback(() => {
|
|
11301
11475
|
modal.remove();
|
|
11302
11476
|
removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();
|
|
11303
11477
|
removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
|
|
@@ -11325,13 +11499,13 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11325
11499
|
if (!exited) return;
|
|
11326
11500
|
handleHide();
|
|
11327
11501
|
}, [exited, handleHide]);
|
|
11328
|
-
|
|
11502
|
+
useWillUnmount_useWillUnmount(() => {
|
|
11329
11503
|
handleHide();
|
|
11330
11504
|
});
|
|
11331
11505
|
|
|
11332
11506
|
// --------------------------------
|
|
11333
11507
|
|
|
11334
|
-
const handleEnforceFocus =
|
|
11508
|
+
const handleEnforceFocus = useEventCallback_useEventCallback(() => {
|
|
11335
11509
|
if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
|
|
11336
11510
|
return;
|
|
11337
11511
|
}
|
|
@@ -11340,7 +11514,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11340
11514
|
modal.dialog.focus();
|
|
11341
11515
|
}
|
|
11342
11516
|
});
|
|
11343
|
-
const handleBackdropClick =
|
|
11517
|
+
const handleBackdropClick = useEventCallback_useEventCallback(e => {
|
|
11344
11518
|
if (e.target !== e.currentTarget) {
|
|
11345
11519
|
return;
|
|
11346
11520
|
}
|
|
@@ -11349,7 +11523,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
11349
11523
|
onHide();
|
|
11350
11524
|
}
|
|
11351
11525
|
});
|
|
11352
|
-
const handleDocumentKeyDown =
|
|
11526
|
+
const handleDocumentKeyDown = useEventCallback_useEventCallback(e => {
|
|
11353
11527
|
if (keyboard && isEscKey(e) && modal.isTopModal()) {
|
|
11354
11528
|
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
|
|
11355
11529
|
if (!e.defaultPrevented) {
|
|
@@ -12023,7 +12197,7 @@ const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
12023
12197
|
const waitingForMouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
12024
12198
|
const ignoreBackdropClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
12025
12199
|
const removeStaticModalAnimationRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
12026
|
-
const [modal, setModalRef] =
|
|
12200
|
+
const [modal, setModalRef] = useCallbackRef_useCallbackRef();
|
|
12027
12201
|
const mergedRef = esm_useMergedRefs(ref, setModalRef);
|
|
12028
12202
|
const handleHide = useEventCallback(onHide);
|
|
12029
12203
|
const isRTL = useIsRTL();
|
|
@@ -12641,7 +12815,7 @@ const getMatcher = (query, targetWindow) => {
|
|
|
12641
12815
|
function useMediaQuery(query, targetWindow = typeof window === 'undefined' ? undefined : window) {
|
|
12642
12816
|
const mql = getMatcher(query, targetWindow);
|
|
12643
12817
|
const [matches, setMatches] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => mql ? mql.matches : false);
|
|
12644
|
-
|
|
12818
|
+
esm_useIsomorphicEffect(() => {
|
|
12645
12819
|
let mql = getMatcher(query, targetWindow);
|
|
12646
12820
|
if (!mql) {
|
|
12647
12821
|
return setMatches(false);
|
|
@@ -13631,7 +13805,7 @@ function useRootClose(ref, onRootClose, {
|
|
|
13631
13805
|
disabled,
|
|
13632
13806
|
clickTrigger
|
|
13633
13807
|
});
|
|
13634
|
-
const handleKeyUp =
|
|
13808
|
+
const handleKeyUp = useEventCallback_useEventCallback(e => {
|
|
13635
13809
|
if (isEscKey(e)) {
|
|
13636
13810
|
onClose(e);
|
|
13637
13811
|
}
|
|
@@ -13684,7 +13858,7 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
|
|
|
13684
13858
|
} = props;
|
|
13685
13859
|
const [rootElement, attachRef] = useCallbackRef();
|
|
13686
13860
|
const [arrowElement, attachArrowRef] = useCallbackRef();
|
|
13687
|
-
const mergedRef =
|
|
13861
|
+
const mergedRef = hooks_esm_useMergedRefs(attachRef, outerRef);
|
|
13688
13862
|
const container = useWaitForDOMRef(props.container);
|
|
13689
13863
|
const target = useWaitForDOMRef(props.target);
|
|
13690
13864
|
const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!props.show);
|
|
@@ -14187,7 +14361,7 @@ const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonj
|
|
|
14187
14361
|
setFirstRenderedState(state);
|
|
14188
14362
|
popperConfig == null || popperConfig.onFirstUpdate == null || popperConfig.onFirstUpdate(state);
|
|
14189
14363
|
});
|
|
14190
|
-
|
|
14364
|
+
esm_useIsomorphicEffect(() => {
|
|
14191
14365
|
if (firstRenderedState && outerProps.target) {
|
|
14192
14366
|
// Must wait for target element to resolve before updating popper.
|
|
14193
14367
|
popperRef.current.scheduleUpdate == null || popperRef.current.scheduleUpdate();
|