react-bootstrap 2.10.9 → 2.10.10
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/AbstractModalHeader.js +1 -0
- package/cjs/BootstrapModalManager.js +1 -2
- package/cjs/Carousel.js +4 -1
- package/cjs/Col.d.ts +1 -1
- package/cjs/Collapse.js +3 -4
- package/cjs/Form.d.ts +2 -2
- package/cjs/FormLabel.js +6 -10
- package/cjs/Image.js +0 -1
- package/cjs/InputGroup.d.ts +2 -2
- package/cjs/ListGroupItem.js +0 -2
- package/cjs/Modal.js +0 -3
- package/cjs/ModalContext.js +0 -1
- package/cjs/Navbar.d.ts +1 -0
- package/cjs/OverlayTrigger.js +1 -3
- package/cjs/PageItem.js +0 -2
- package/cjs/Popover.js +1 -0
- package/cjs/ProgressBar.js +0 -1
- package/cjs/Ratio.js +1 -0
- package/cjs/Tab.d.ts +1 -1
- package/cjs/Tab.js +0 -1
- package/cjs/TabContainer.d.ts +1 -2
- package/cjs/TabContainer.js +0 -3
- package/cjs/Table.js +1 -0
- package/cjs/ThemeProvider.d.ts +1 -1
- package/cjs/ToastContext.js +0 -1
- package/cjs/ToggleButtonGroup.js +1 -0
- package/cjs/TransitionWrapper.js +1 -4
- package/cjs/createChainedFunction.js +2 -2
- package/cjs/divWithClassName.js +4 -1
- package/cjs/safeFindDOMNode.js +2 -0
- package/cjs/useWrappedRefWithWarning.js +1 -1
- package/dist/react-bootstrap.js +70 -81
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/AbstractModalHeader.js +1 -0
- package/esm/BootstrapModalManager.js +1 -2
- package/esm/Carousel.js +4 -1
- package/esm/Col.d.ts +1 -1
- package/esm/Collapse.js +3 -5
- package/esm/Form.d.ts +2 -2
- package/esm/FormLabel.js +6 -10
- package/esm/Image.js +0 -1
- package/esm/InputGroup.d.ts +2 -2
- package/esm/ListGroupItem.js +0 -2
- package/esm/Modal.js +0 -3
- package/esm/ModalContext.js +0 -1
- package/esm/Navbar.d.ts +1 -0
- package/esm/OverlayTrigger.js +1 -3
- package/esm/PageItem.js +0 -1
- package/esm/Popover.js +1 -0
- package/esm/ProgressBar.js +0 -1
- package/esm/Ratio.js +1 -0
- package/esm/Tab.d.ts +1 -1
- package/esm/Tab.js +0 -1
- package/esm/TabContainer.d.ts +1 -2
- package/esm/TabContainer.js +0 -1
- package/esm/Table.js +1 -0
- package/esm/ThemeProvider.d.ts +1 -1
- package/esm/ToastContext.js +0 -1
- package/esm/ToggleButtonGroup.js +1 -0
- package/esm/TransitionWrapper.js +1 -4
- package/esm/createChainedFunction.js +2 -2
- package/esm/divWithClassName.js +4 -1
- package/esm/safeFindDOMNode.js +2 -0
- package/esm/useWrappedRefWithWarning.js +1 -1
- package/package.json +1 -1
|
@@ -11,8 +11,7 @@ const Selector = {
|
|
|
11
11
|
class BootstrapModalManager extends ModalManager {
|
|
12
12
|
adjustAndStore(prop, element, adjust) {
|
|
13
13
|
const actual = element.style[prop];
|
|
14
|
-
// TODO: DOMStringMap and CSSStyleDeclaration aren't strictly compatible
|
|
15
|
-
// @ts-ignore
|
|
14
|
+
// @ts-expect-error TODO: DOMStringMap and CSSStyleDeclaration aren't strictly compatible
|
|
16
15
|
element.dataset[prop] = actual;
|
|
17
16
|
css(element, {
|
|
18
17
|
[prop]: `${parseFloat(css(element, prop)) + adjust}px`
|
package/esm/Carousel.js
CHANGED
|
@@ -27,7 +27,10 @@ function isVisible(element) {
|
|
|
27
27
|
const elementStyle = getComputedStyle(element);
|
|
28
28
|
return elementStyle.display !== 'none' && elementStyle.visibility !== 'hidden' && getComputedStyle(element.parentNode).display !== 'none';
|
|
29
29
|
}
|
|
30
|
-
const Carousel =
|
|
30
|
+
const Carousel =
|
|
31
|
+
/*#__PURE__*/
|
|
32
|
+
// eslint-disable-next-line react/display-name
|
|
33
|
+
React.forwardRef(({
|
|
31
34
|
defaultActiveIndex = 0,
|
|
32
35
|
...uncontrolledProps
|
|
33
36
|
}, ref) => {
|
package/esm/Col.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type ColOrderNumber = number | '1' | '2' | '3' | '4' | '5';
|
|
|
5
5
|
type ColOrder = ColOrderNumber | 'first' | 'last';
|
|
6
6
|
type ColSize = boolean | 'auto' | NumberAttr;
|
|
7
7
|
type ColSpec = ColSize | {
|
|
8
|
-
span?: ColSize;
|
|
8
|
+
span?: ColSize | null;
|
|
9
9
|
offset?: NumberAttr;
|
|
10
10
|
order?: ColOrder;
|
|
11
11
|
};
|
package/esm/Collapse.js
CHANGED
|
@@ -17,9 +17,9 @@ function getDefaultDimensionValue(dimension, elem) {
|
|
|
17
17
|
const value = elem[offset];
|
|
18
18
|
const margins = MARGINS[dimension];
|
|
19
19
|
return value +
|
|
20
|
-
// @ts-
|
|
20
|
+
// @ts-expect-error TODO
|
|
21
21
|
parseInt(css(elem, margins[0]), 10) +
|
|
22
|
-
// @ts-
|
|
22
|
+
// @ts-expect-error TODO
|
|
23
23
|
parseInt(css(elem, margins[1]), 10);
|
|
24
24
|
}
|
|
25
25
|
const collapseStyles = {
|
|
@@ -90,7 +90,5 @@ const Collapse = /*#__PURE__*/React.forwardRef(({
|
|
|
90
90
|
})
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
|
-
|
|
94
|
-
// @ts-ignore
|
|
95
|
-
|
|
93
|
+
Collapse.displayName = 'Collapse';
|
|
96
94
|
export default Collapse;
|
package/esm/Form.d.ts
CHANGED
|
@@ -292,15 +292,15 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
|
|
|
292
292
|
onTransitionEnd?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
293
293
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
294
294
|
list?: string | undefined;
|
|
295
|
-
label?: React.ReactNode;
|
|
296
|
-
pattern?: string | undefined;
|
|
297
295
|
reverse?: boolean | undefined;
|
|
298
296
|
bsPrefix?: string | undefined;
|
|
299
297
|
height?: number | string | undefined;
|
|
300
298
|
width?: number | string | undefined;
|
|
299
|
+
label?: React.ReactNode;
|
|
301
300
|
size?: number | undefined;
|
|
302
301
|
inline?: boolean | undefined;
|
|
303
302
|
multiple?: boolean | undefined;
|
|
303
|
+
pattern?: string | undefined;
|
|
304
304
|
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
305
305
|
autoComplete?: React.HTMLInputAutoCompleteAttribute | undefined;
|
|
306
306
|
alt?: string | undefined;
|
package/esm/FormLabel.js
CHANGED
|
@@ -34,16 +34,12 @@ const FormLabel = /*#__PURE__*/React.forwardRef(({
|
|
|
34
34
|
htmlFor: htmlFor,
|
|
35
35
|
...props
|
|
36
36
|
});
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
htmlFor: htmlFor,
|
|
44
|
-
...props
|
|
45
|
-
})
|
|
46
|
-
);
|
|
37
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
38
|
+
ref: ref,
|
|
39
|
+
className: classes,
|
|
40
|
+
htmlFor: htmlFor,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
47
43
|
});
|
|
48
44
|
FormLabel.displayName = 'FormLabel';
|
|
49
45
|
export default FormLabel;
|
package/esm/Image.js
CHANGED
|
@@ -38,7 +38,6 @@ const Image = /*#__PURE__*/React.forwardRef(({
|
|
|
38
38
|
}, ref) => {
|
|
39
39
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'img');
|
|
40
40
|
return /*#__PURE__*/_jsx("img", {
|
|
41
|
-
// eslint-disable-line jsx-a11y/alt-text
|
|
42
41
|
ref: ref,
|
|
43
42
|
...props,
|
|
44
43
|
className: classNames(className, fluid && `${bsPrefix}-fluid`, rounded && `rounded`, roundedCircle && `rounded-circle`, thumbnail && `${bsPrefix}-thumbnail`)
|
package/esm/InputGroup.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface InputGroupProps extends BsPrefixProps, React.HTMLAttributes<HTM
|
|
|
7
7
|
}
|
|
8
8
|
declare const _default: BsPrefixRefForwardingComponent<"div", InputGroupProps> & {
|
|
9
9
|
Text: BsPrefixRefForwardingComponent<"span", import("./InputGroupText").InputGroupTextProps>;
|
|
10
|
-
Radio: (props: FormCheckInputProps) =>
|
|
11
|
-
Checkbox: (props: FormCheckInputProps) =>
|
|
10
|
+
Radio: (props: FormCheckInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
Checkbox: (props: FormCheckInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
package/esm/ListGroupItem.js
CHANGED
|
@@ -37,8 +37,6 @@ const ListGroupItem = /*#__PURE__*/React.forwardRef(({
|
|
|
37
37
|
props.tabIndex = -1;
|
|
38
38
|
props['aria-disabled'] = true;
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
// eslint-disable-next-line no-nested-ternary
|
|
42
40
|
const Component = as || (action ? props.href ? 'a' : 'button' : 'div');
|
|
43
41
|
process.env.NODE_ENV !== "production" ? warning(as || !(!action && props.href), '`action=false` and `href` should not be used together.') : void 0;
|
|
44
42
|
return /*#__PURE__*/_jsx(Component, {
|
package/esm/Modal.js
CHANGED
|
@@ -24,7 +24,6 @@ import ModalHeader from './ModalHeader';
|
|
|
24
24
|
import ModalTitle from './ModalTitle';
|
|
25
25
|
import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
|
|
26
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
-
/* eslint-disable no-use-before-define, react/no-multi-comp */
|
|
28
27
|
function DialogTransition(props) {
|
|
29
28
|
return /*#__PURE__*/_jsx(Fade, {
|
|
30
29
|
...props,
|
|
@@ -37,8 +36,6 @@ function BackdropTransition(props) {
|
|
|
37
36
|
timeout: null
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
|
-
|
|
41
|
-
/* eslint-enable no-use-before-define */
|
|
42
39
|
const Modal = /*#__PURE__*/React.forwardRef(({
|
|
43
40
|
bsPrefix,
|
|
44
41
|
className,
|
package/esm/ModalContext.js
CHANGED
package/esm/Navbar.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface NavbarProps extends BsPrefixProps, Omit<React.HTMLAttributes<HT
|
|
|
11
11
|
onSelect?: SelectCallback;
|
|
12
12
|
collapseOnSelect?: boolean;
|
|
13
13
|
expanded?: boolean;
|
|
14
|
+
defaultExpanded?: boolean;
|
|
14
15
|
}
|
|
15
16
|
declare const _default: BsPrefixRefForwardingComponent<"nav", NavbarProps> & {
|
|
16
17
|
Brand: BsPrefixRefForwardingComponent<"a", import("./NavbarBrand").NavbarBrandProps>;
|
package/esm/OverlayTrigger.js
CHANGED
|
@@ -25,9 +25,7 @@ function normalizeDelay(delay) {
|
|
|
25
25
|
// React's built version is broken: https://github.com/facebook/react/issues/4251
|
|
26
26
|
// for cases when the trigger is disabled and mouseOut/Over can cause flicker
|
|
27
27
|
// moving from one child element to another.
|
|
28
|
-
function handleMouseOverOut(
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
30
|
-
handler, args, relatedNative) {
|
|
28
|
+
function handleMouseOverOut(handler, args, relatedNative) {
|
|
31
29
|
const [e] = args;
|
|
32
30
|
const target = e.currentTarget;
|
|
33
31
|
const related = e.relatedTarget || e.nativeEvent[relatedNative];
|
package/esm/PageItem.js
CHANGED
package/esm/Popover.js
CHANGED
package/esm/ProgressBar.js
CHANGED
|
@@ -28,7 +28,6 @@ function onlyProgressBar(props, propName, componentName) {
|
|
|
28
28
|
*
|
|
29
29
|
* see https://github.com/gaearon/react-hot-loader#checking-element-types
|
|
30
30
|
*/
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
32
31
|
const element = /*#__PURE__*/_jsx(ProgressBar, {});
|
|
33
32
|
if (child.type === element.type) return;
|
|
34
33
|
const childType = child.type;
|
package/esm/Ratio.js
CHANGED
package/esm/Tab.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface TabProps extends Omit<TabPaneProps, 'title'> {
|
|
|
9
9
|
}
|
|
10
10
|
declare const _default: React.FC<TabProps> & {
|
|
11
11
|
Container: {
|
|
12
|
-
({ transition, ...props }: import("./TabContainer").TabContainerProps):
|
|
12
|
+
({ transition, ...props }: import("./TabContainer").TabContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
propTypes: {
|
|
14
14
|
id: PropTypes.Requireable<string>;
|
|
15
15
|
transition: PropTypes.Requireable<NonNullable<boolean | PropTypes.ReactComponentLike | null | undefined>>;
|
package/esm/Tab.js
CHANGED
|
@@ -2,7 +2,6 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
import TabContainer from './TabContainer';
|
|
3
3
|
import TabContent from './TabContent';
|
|
4
4
|
import TabPane from './TabPane';
|
|
5
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
6
5
|
const propTypes = {
|
|
7
6
|
eventKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
8
7
|
/**
|
package/esm/TabContainer.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
3
2
|
import { TabsProps } from '@restart/ui/Tabs';
|
|
4
3
|
import { TransitionType } from './helpers';
|
|
@@ -6,7 +5,7 @@ export interface TabContainerProps extends Omit<TabsProps, 'transition'> {
|
|
|
6
5
|
transition?: TransitionType;
|
|
7
6
|
}
|
|
8
7
|
declare const TabContainer: {
|
|
9
|
-
({ transition, ...props }: TabContainerProps):
|
|
8
|
+
({ transition, ...props }: TabContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
propTypes: {
|
|
11
10
|
/**
|
|
12
11
|
* HTML id attribute, required if no `generateChildId` prop
|
package/esm/TabContainer.js
CHANGED
package/esm/Table.js
CHANGED
package/esm/ThemeProvider.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface ThemeProviderProps extends Partial<ThemeContextValue> {
|
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
}
|
|
13
13
|
declare const Consumer: React.Consumer<ThemeContextValue>;
|
|
14
|
-
declare function ThemeProvider({ prefixes, breakpoints, minBreakpoint, dir, children, }: ThemeProviderProps):
|
|
14
|
+
declare function ThemeProvider({ prefixes, breakpoints, minBreakpoint, dir, children, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare namespace ThemeProvider {
|
|
16
16
|
var propTypes: any;
|
|
17
17
|
}
|
package/esm/ToastContext.js
CHANGED
package/esm/ToggleButtonGroup.js
CHANGED
package/esm/TransitionWrapper.js
CHANGED
|
@@ -28,8 +28,6 @@ const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
|
|
|
28
28
|
callback(nodeRef.current, param);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
33
31
|
const handleEnter = useCallback(normalize(onEnter), [onEnter]);
|
|
34
32
|
const handleEntering = useCallback(normalize(onEntering), [onEntering]);
|
|
35
33
|
const handleEntered = useCallback(normalize(onEntered), [onEntered]);
|
|
@@ -37,8 +35,6 @@ const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
|
|
|
37
35
|
const handleExiting = useCallback(normalize(onExiting), [onExiting]);
|
|
38
36
|
const handleExited = useCallback(normalize(onExited), [onExited]);
|
|
39
37
|
const handleAddEndListener = useCallback(normalize(addEndListener), [addEndListener]);
|
|
40
|
-
/* eslint-enable react-hooks/exhaustive-deps */
|
|
41
|
-
|
|
42
38
|
return /*#__PURE__*/_jsx(Transition, {
|
|
43
39
|
ref: ref,
|
|
44
40
|
...props,
|
|
@@ -60,4 +56,5 @@ const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
|
|
|
60
56
|
})
|
|
61
57
|
});
|
|
62
58
|
});
|
|
59
|
+
TransitionWrapper.displayName = 'TransitionWrapper';
|
|
63
60
|
export default TransitionWrapper;
|
|
@@ -14,9 +14,9 @@ function createChainedFunction(...funcs) {
|
|
|
14
14
|
}
|
|
15
15
|
if (acc === null) return f;
|
|
16
16
|
return function chainedFunction(...args) {
|
|
17
|
-
// @ts-ignore
|
|
17
|
+
// @ts-expect-error ignore "this" error
|
|
18
18
|
acc.apply(this, args);
|
|
19
|
-
// @ts-ignore
|
|
19
|
+
// @ts-expect-error ignore "this" error
|
|
20
20
|
f.apply(this, args);
|
|
21
21
|
};
|
|
22
22
|
}, null);
|
package/esm/divWithClassName.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
export default (className =>
|
|
4
|
+
export default (className =>
|
|
5
|
+
/*#__PURE__*/
|
|
6
|
+
// eslint-disable-next-line react/display-name
|
|
7
|
+
React.forwardRef((p, ref) => /*#__PURE__*/_jsx("div", {
|
|
5
8
|
...p,
|
|
6
9
|
ref: ref,
|
|
7
10
|
className: classNames(p.className, className)
|
package/esm/safeFindDOMNode.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import ReactDOM from 'react-dom';
|
|
2
2
|
export default function safeFindDOMNode(componentOrElement) {
|
|
3
3
|
if (componentOrElement && 'setState' in componentOrElement) {
|
|
4
|
+
// TODO: Remove in next major.
|
|
5
|
+
// eslint-disable-next-line react/no-find-dom-node
|
|
4
6
|
return ReactDOM.findDOMNode(componentOrElement);
|
|
5
7
|
}
|
|
6
8
|
return componentOrElement != null ? componentOrElement : null;
|
|
@@ -2,7 +2,7 @@ import invariant from 'invariant';
|
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import useMergedRefs from '@restart/hooks/useMergedRefs';
|
|
4
4
|
export default function useWrappedRefWithWarning(ref, componentName) {
|
|
5
|
-
// @ts-
|
|
5
|
+
// @ts-expect-error Ignore global __DEV__ variable
|
|
6
6
|
if (!(process.env.NODE_ENV !== "production")) return ref;
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|