react-bootstrap 2.7.1 → 2.7.3
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 +2 -7
- package/cjs/Alert.js +4 -11
- package/cjs/Badge.js +2 -7
- package/cjs/Breadcrumb.js +2 -7
- package/cjs/BreadcrumbItem.js +2 -7
- package/cjs/Button.js +6 -9
- package/cjs/ButtonGroup.js +3 -6
- package/cjs/ButtonToolbar.js +3 -5
- package/cjs/Card.js +1 -5
- package/cjs/Carousel.js +28 -40
- package/cjs/CloseButton.js +2 -4
- package/cjs/Collapse.js +11 -12
- package/cjs/Container.js +1 -5
- package/cjs/Dropdown.js +3 -10
- package/cjs/DropdownMenu.js +1 -5
- package/cjs/Fade.js +12 -11
- package/cjs/FigureImage.js +2 -4
- package/cjs/Form.d.ts +1 -1
- package/cjs/FormLabel.js +2 -7
- package/cjs/Image.js +4 -11
- package/cjs/Modal.js +9 -21
- package/cjs/ModalHeader.js +5 -6
- package/cjs/Nav.js +2 -7
- package/cjs/NavLink.js +4 -5
- package/cjs/Navbar.js +3 -9
- package/cjs/NavbarToggle.js +1 -5
- package/cjs/Offcanvas.js +9 -21
- package/cjs/OffcanvasHeader.js +5 -6
- package/cjs/OffcanvasToggling.js +8 -7
- package/cjs/Overlay.js +9 -10
- package/cjs/OverlayTrigger.d.ts +0 -4
- package/cjs/OverlayTrigger.js +1 -6
- package/cjs/PageItem.js +3 -9
- package/cjs/Popover.js +3 -7
- package/cjs/ProgressBar.js +10 -11
- package/cjs/Ratio.js +1 -5
- package/cjs/SplitButton.js +2 -7
- package/cjs/Tabs.d.ts +0 -5
- package/cjs/Tabs.js +4 -8
- package/cjs/ToastContainer.js +2 -2
- package/cjs/ToastHeader.js +2 -7
- package/cjs/ToggleButtonGroup.js +3 -6
- package/cjs/Tooltip.js +3 -7
- package/cjs/createWithBsPrefix.js +5 -2
- package/dist/react-bootstrap.js +299 -461
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/AbstractModalHeader.js +2 -7
- package/esm/Alert.js +4 -11
- package/esm/Badge.js +2 -7
- package/esm/Breadcrumb.js +2 -7
- package/esm/BreadcrumbItem.js +2 -7
- package/esm/Button.js +6 -9
- package/esm/ButtonGroup.js +3 -6
- package/esm/ButtonToolbar.js +3 -5
- package/esm/Card.js +1 -5
- package/esm/Carousel.js +28 -40
- package/esm/CloseButton.js +2 -4
- package/esm/Collapse.js +11 -11
- package/esm/Container.js +1 -5
- package/esm/Dropdown.js +3 -10
- package/esm/DropdownMenu.js +1 -5
- package/esm/Fade.js +12 -11
- package/esm/FigureImage.js +2 -4
- package/esm/Form.d.ts +1 -1
- package/esm/FormLabel.js +2 -7
- package/esm/Image.js +4 -11
- package/esm/Modal.js +9 -21
- package/esm/ModalHeader.js +5 -6
- package/esm/Nav.js +2 -7
- package/esm/NavLink.js +4 -5
- package/esm/Navbar.js +3 -9
- package/esm/NavbarToggle.js +1 -5
- package/esm/Offcanvas.js +9 -21
- package/esm/OffcanvasHeader.js +5 -6
- package/esm/OffcanvasToggling.js +8 -7
- package/esm/Overlay.js +9 -10
- package/esm/OverlayTrigger.d.ts +0 -4
- package/esm/OverlayTrigger.js +1 -6
- package/esm/PageItem.js +3 -9
- package/esm/Popover.js +3 -7
- package/esm/ProgressBar.js +10 -11
- package/esm/Ratio.js +1 -5
- package/esm/SplitButton.js +2 -7
- package/esm/Tabs.d.ts +0 -5
- package/esm/Tabs.js +4 -8
- package/esm/ToastContainer.js +2 -2
- package/esm/ToastHeader.js +2 -7
- package/esm/ToggleButtonGroup.js +3 -6
- package/esm/Tooltip.js +3 -7
- package/esm/createWithBsPrefix.js +5 -2
- package/package.json +1 -1
|
@@ -5,14 +5,10 @@ import CloseButton from './CloseButton';
|
|
|
5
5
|
import ModalContext from './ModalContext';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
const defaultProps = {
|
|
9
|
-
closeLabel: 'Close',
|
|
10
|
-
closeButton: false
|
|
11
|
-
};
|
|
12
8
|
const AbstractModalHeader = /*#__PURE__*/React.forwardRef(({
|
|
13
|
-
closeLabel,
|
|
9
|
+
closeLabel = 'Close',
|
|
14
10
|
closeVariant,
|
|
15
|
-
closeButton,
|
|
11
|
+
closeButton = false,
|
|
16
12
|
onHide,
|
|
17
13
|
children,
|
|
18
14
|
...props
|
|
@@ -32,5 +28,4 @@ const AbstractModalHeader = /*#__PURE__*/React.forwardRef(({
|
|
|
32
28
|
})]
|
|
33
29
|
});
|
|
34
30
|
});
|
|
35
|
-
AbstractModalHeader.defaultProps = defaultProps;
|
|
36
31
|
export default AbstractModalHeader;
|
package/esm/Alert.js
CHANGED
|
@@ -18,24 +18,18 @@ const AlertHeading = createWithBsPrefix('alert-heading', {
|
|
|
18
18
|
const AlertLink = createWithBsPrefix('alert-link', {
|
|
19
19
|
Component: Anchor
|
|
20
20
|
});
|
|
21
|
-
const defaultProps = {
|
|
22
|
-
variant: 'primary',
|
|
23
|
-
show: true,
|
|
24
|
-
transition: Fade,
|
|
25
|
-
closeLabel: 'Close alert'
|
|
26
|
-
};
|
|
27
21
|
const Alert = /*#__PURE__*/React.forwardRef((uncontrolledProps, ref) => {
|
|
28
22
|
const {
|
|
29
23
|
bsPrefix,
|
|
30
|
-
show,
|
|
31
|
-
closeLabel,
|
|
24
|
+
show = true,
|
|
25
|
+
closeLabel = 'Close alert',
|
|
32
26
|
closeVariant,
|
|
33
27
|
className,
|
|
34
28
|
children,
|
|
35
|
-
variant,
|
|
29
|
+
variant = 'primary',
|
|
36
30
|
onClose,
|
|
37
31
|
dismissible,
|
|
38
|
-
transition,
|
|
32
|
+
transition = Fade,
|
|
39
33
|
...props
|
|
40
34
|
} = useUncontrolled(uncontrolledProps, {
|
|
41
35
|
show: 'onClose'
|
|
@@ -68,7 +62,6 @@ const Alert = /*#__PURE__*/React.forwardRef((uncontrolledProps, ref) => {
|
|
|
68
62
|
});
|
|
69
63
|
});
|
|
70
64
|
Alert.displayName = 'Alert';
|
|
71
|
-
Alert.defaultProps = defaultProps;
|
|
72
65
|
export default Object.assign(Alert, {
|
|
73
66
|
Link: AlertLink,
|
|
74
67
|
Heading: AlertHeading
|
package/esm/Badge.js
CHANGED
|
@@ -2,14 +2,10 @@ import classNames from 'classnames';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
bg: 'primary',
|
|
7
|
-
pill: false
|
|
8
|
-
};
|
|
9
5
|
const Badge = /*#__PURE__*/React.forwardRef(({
|
|
10
6
|
bsPrefix,
|
|
11
|
-
bg,
|
|
12
|
-
pill,
|
|
7
|
+
bg = 'primary',
|
|
8
|
+
pill = false,
|
|
13
9
|
text,
|
|
14
10
|
className,
|
|
15
11
|
as: Component = 'span',
|
|
@@ -23,5 +19,4 @@ const Badge = /*#__PURE__*/React.forwardRef(({
|
|
|
23
19
|
});
|
|
24
20
|
});
|
|
25
21
|
Badge.displayName = 'Badge';
|
|
26
|
-
Badge.defaultProps = defaultProps;
|
|
27
22
|
export default Badge;
|
package/esm/Breadcrumb.js
CHANGED
|
@@ -3,16 +3,12 @@ import * as React from 'react';
|
|
|
3
3
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
4
4
|
import BreadcrumbItem from './BreadcrumbItem';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const defaultProps = {
|
|
7
|
-
label: 'breadcrumb',
|
|
8
|
-
listProps: {}
|
|
9
|
-
};
|
|
10
6
|
const Breadcrumb = /*#__PURE__*/React.forwardRef(({
|
|
11
7
|
bsPrefix,
|
|
12
8
|
className,
|
|
13
|
-
listProps,
|
|
9
|
+
listProps = {},
|
|
14
10
|
children,
|
|
15
|
-
label,
|
|
11
|
+
label = 'breadcrumb',
|
|
16
12
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
17
13
|
as: Component = 'nav',
|
|
18
14
|
...props
|
|
@@ -31,7 +27,6 @@ const Breadcrumb = /*#__PURE__*/React.forwardRef(({
|
|
|
31
27
|
});
|
|
32
28
|
});
|
|
33
29
|
Breadcrumb.displayName = 'Breadcrumb';
|
|
34
|
-
Breadcrumb.defaultProps = defaultProps;
|
|
35
30
|
export default Object.assign(Breadcrumb, {
|
|
36
31
|
Item: BreadcrumbItem
|
|
37
32
|
});
|
package/esm/BreadcrumbItem.js
CHANGED
|
@@ -3,19 +3,15 @@ import * as React from 'react';
|
|
|
3
3
|
import Anchor from '@restart/ui/Anchor';
|
|
4
4
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const defaultProps = {
|
|
7
|
-
active: false,
|
|
8
|
-
linkProps: {}
|
|
9
|
-
};
|
|
10
6
|
const BreadcrumbItem = /*#__PURE__*/React.forwardRef(({
|
|
11
7
|
bsPrefix,
|
|
12
|
-
active,
|
|
8
|
+
active = false,
|
|
13
9
|
children,
|
|
14
10
|
className,
|
|
15
11
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
16
12
|
as: Component = 'li',
|
|
17
13
|
linkAs: LinkComponent = Anchor,
|
|
18
|
-
linkProps,
|
|
14
|
+
linkProps = {},
|
|
19
15
|
href,
|
|
20
16
|
title,
|
|
21
17
|
target,
|
|
@@ -39,5 +35,4 @@ const BreadcrumbItem = /*#__PURE__*/React.forwardRef(({
|
|
|
39
35
|
});
|
|
40
36
|
});
|
|
41
37
|
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
42
|
-
BreadcrumbItem.defaultProps = defaultProps;
|
|
43
38
|
export default BreadcrumbItem;
|
package/esm/Button.js
CHANGED
|
@@ -3,17 +3,13 @@ import * as React from 'react';
|
|
|
3
3
|
import { useButtonProps } from '@restart/ui/Button';
|
|
4
4
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const defaultProps = {
|
|
7
|
-
variant: 'primary',
|
|
8
|
-
active: false,
|
|
9
|
-
disabled: false
|
|
10
|
-
};
|
|
11
6
|
const Button = /*#__PURE__*/React.forwardRef(({
|
|
12
7
|
as,
|
|
13
8
|
bsPrefix,
|
|
14
|
-
variant,
|
|
9
|
+
variant = 'primary',
|
|
15
10
|
size,
|
|
16
|
-
active,
|
|
11
|
+
active = false,
|
|
12
|
+
disabled = false,
|
|
17
13
|
className,
|
|
18
14
|
...props
|
|
19
15
|
}, ref) => {
|
|
@@ -22,6 +18,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
22
18
|
tagName
|
|
23
19
|
}] = useButtonProps({
|
|
24
20
|
tagName: as,
|
|
21
|
+
disabled,
|
|
25
22
|
...props
|
|
26
23
|
});
|
|
27
24
|
const Component = tagName;
|
|
@@ -29,9 +26,9 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
29
26
|
...buttonProps,
|
|
30
27
|
...props,
|
|
31
28
|
ref: ref,
|
|
32
|
-
|
|
29
|
+
disabled: disabled,
|
|
30
|
+
className: classNames(className, prefix, active && 'active', variant && `${prefix}-${variant}`, size && `${prefix}-${size}`, props.href && disabled && 'disabled')
|
|
33
31
|
});
|
|
34
32
|
});
|
|
35
33
|
Button.displayName = 'Button';
|
|
36
|
-
Button.defaultProps = defaultProps;
|
|
37
34
|
export default Button;
|
package/esm/ButtonGroup.js
CHANGED
|
@@ -2,15 +2,12 @@ import classNames from 'classnames';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
vertical: false,
|
|
7
|
-
role: 'group'
|
|
8
|
-
};
|
|
9
5
|
const ButtonGroup = /*#__PURE__*/React.forwardRef(({
|
|
10
6
|
bsPrefix,
|
|
11
7
|
size,
|
|
12
|
-
vertical,
|
|
8
|
+
vertical = false,
|
|
13
9
|
className,
|
|
10
|
+
role = 'group',
|
|
14
11
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
15
12
|
as: Component = 'div',
|
|
16
13
|
...rest
|
|
@@ -21,9 +18,9 @@ const ButtonGroup = /*#__PURE__*/React.forwardRef(({
|
|
|
21
18
|
return /*#__PURE__*/_jsx(Component, {
|
|
22
19
|
...rest,
|
|
23
20
|
ref: ref,
|
|
21
|
+
role: role,
|
|
24
22
|
className: classNames(className, baseClass, size && `${prefix}-${size}`)
|
|
25
23
|
});
|
|
26
24
|
});
|
|
27
25
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
28
|
-
ButtonGroup.defaultProps = defaultProps;
|
|
29
26
|
export default ButtonGroup;
|
package/esm/ButtonToolbar.js
CHANGED
|
@@ -2,21 +2,19 @@ import classNames from 'classnames';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
role: 'toolbar'
|
|
7
|
-
};
|
|
8
5
|
const ButtonToolbar = /*#__PURE__*/React.forwardRef(({
|
|
9
6
|
bsPrefix,
|
|
10
7
|
className,
|
|
8
|
+
role = 'toolbar',
|
|
11
9
|
...props
|
|
12
10
|
}, ref) => {
|
|
13
11
|
const prefix = useBootstrapPrefix(bsPrefix, 'btn-toolbar');
|
|
14
12
|
return /*#__PURE__*/_jsx("div", {
|
|
15
13
|
...props,
|
|
16
14
|
ref: ref,
|
|
17
|
-
className: classNames(className, prefix)
|
|
15
|
+
className: classNames(className, prefix),
|
|
16
|
+
role: role
|
|
18
17
|
});
|
|
19
18
|
});
|
|
20
19
|
ButtonToolbar.displayName = 'ButtonToolbar';
|
|
21
|
-
ButtonToolbar.defaultProps = defaultProps;
|
|
22
20
|
export default ButtonToolbar;
|
package/esm/Card.js
CHANGED
|
@@ -23,16 +23,13 @@ const CardText = createWithBsPrefix('card-text', {
|
|
|
23
23
|
});
|
|
24
24
|
const CardFooter = createWithBsPrefix('card-footer');
|
|
25
25
|
const CardImgOverlay = createWithBsPrefix('card-img-overlay');
|
|
26
|
-
const defaultProps = {
|
|
27
|
-
body: false
|
|
28
|
-
};
|
|
29
26
|
const Card = /*#__PURE__*/React.forwardRef(({
|
|
30
27
|
bsPrefix,
|
|
31
28
|
className,
|
|
32
29
|
bg,
|
|
33
30
|
text,
|
|
34
31
|
border,
|
|
35
|
-
body,
|
|
32
|
+
body = false,
|
|
36
33
|
children,
|
|
37
34
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
38
35
|
as: Component = 'div',
|
|
@@ -49,7 +46,6 @@ const Card = /*#__PURE__*/React.forwardRef(({
|
|
|
49
46
|
});
|
|
50
47
|
});
|
|
51
48
|
Card.displayName = 'Card';
|
|
52
|
-
Card.defaultProps = defaultProps;
|
|
53
49
|
export default Object.assign(Card, {
|
|
54
50
|
Img: CardImg,
|
|
55
51
|
Title: CardTitle,
|
package/esm/Carousel.js
CHANGED
|
@@ -18,29 +18,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
18
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
20
|
const SWIPE_THRESHOLD = 40;
|
|
21
|
-
const defaultProps = {
|
|
22
|
-
slide: true,
|
|
23
|
-
fade: false,
|
|
24
|
-
controls: true,
|
|
25
|
-
indicators: true,
|
|
26
|
-
indicatorLabels: [],
|
|
27
|
-
defaultActiveIndex: 0,
|
|
28
|
-
interval: 5000,
|
|
29
|
-
keyboard: true,
|
|
30
|
-
pause: 'hover',
|
|
31
|
-
wrap: true,
|
|
32
|
-
touch: true,
|
|
33
|
-
prevIcon: /*#__PURE__*/_jsx("span", {
|
|
34
|
-
"aria-hidden": "true",
|
|
35
|
-
className: "carousel-control-prev-icon"
|
|
36
|
-
}),
|
|
37
|
-
prevLabel: 'Previous',
|
|
38
|
-
nextIcon: /*#__PURE__*/_jsx("span", {
|
|
39
|
-
"aria-hidden": "true",
|
|
40
|
-
className: "carousel-control-next-icon"
|
|
41
|
-
}),
|
|
42
|
-
nextLabel: 'Next'
|
|
43
|
-
};
|
|
44
21
|
function isVisible(element) {
|
|
45
22
|
if (!element || !element.style || !element.parentNode || !element.parentNode.style) {
|
|
46
23
|
return false;
|
|
@@ -48,40 +25,52 @@ function isVisible(element) {
|
|
|
48
25
|
const elementStyle = getComputedStyle(element);
|
|
49
26
|
return elementStyle.display !== 'none' && elementStyle.visibility !== 'hidden' && getComputedStyle(element.parentNode).display !== 'none';
|
|
50
27
|
}
|
|
51
|
-
const Carousel = /*#__PURE__*/React.forwardRef((
|
|
28
|
+
const Carousel = /*#__PURE__*/React.forwardRef(({
|
|
29
|
+
defaultActiveIndex = 0,
|
|
30
|
+
...uncontrolledProps
|
|
31
|
+
}, ref) => {
|
|
52
32
|
const {
|
|
53
33
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
54
34
|
as: Component = 'div',
|
|
55
35
|
bsPrefix,
|
|
56
|
-
slide,
|
|
57
|
-
fade,
|
|
58
|
-
controls,
|
|
59
|
-
indicators,
|
|
60
|
-
indicatorLabels,
|
|
36
|
+
slide = true,
|
|
37
|
+
fade = false,
|
|
38
|
+
controls = true,
|
|
39
|
+
indicators = true,
|
|
40
|
+
indicatorLabels = [],
|
|
61
41
|
activeIndex,
|
|
62
42
|
onSelect,
|
|
63
43
|
onSlide,
|
|
64
44
|
onSlid,
|
|
65
|
-
interval,
|
|
66
|
-
keyboard,
|
|
45
|
+
interval = 5000,
|
|
46
|
+
keyboard = true,
|
|
67
47
|
onKeyDown,
|
|
68
|
-
pause,
|
|
48
|
+
pause = 'hover',
|
|
69
49
|
onMouseOver,
|
|
70
50
|
onMouseOut,
|
|
71
|
-
wrap,
|
|
72
|
-
touch,
|
|
51
|
+
wrap = true,
|
|
52
|
+
touch = true,
|
|
73
53
|
onTouchStart,
|
|
74
54
|
onTouchMove,
|
|
75
55
|
onTouchEnd,
|
|
76
|
-
prevIcon,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
56
|
+
prevIcon = /*#__PURE__*/_jsx("span", {
|
|
57
|
+
"aria-hidden": "true",
|
|
58
|
+
className: "carousel-control-prev-icon"
|
|
59
|
+
}),
|
|
60
|
+
prevLabel = 'Previous',
|
|
61
|
+
nextIcon = /*#__PURE__*/_jsx("span", {
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
className: "carousel-control-next-icon"
|
|
64
|
+
}),
|
|
65
|
+
nextLabel = 'Next',
|
|
80
66
|
variant,
|
|
81
67
|
className,
|
|
82
68
|
children,
|
|
83
69
|
...props
|
|
84
|
-
} = useUncontrolled(
|
|
70
|
+
} = useUncontrolled({
|
|
71
|
+
defaultActiveIndex,
|
|
72
|
+
...uncontrolledProps
|
|
73
|
+
}, {
|
|
85
74
|
activeIndex: 'onSelect'
|
|
86
75
|
});
|
|
87
76
|
const prefix = useBootstrapPrefix(bsPrefix, 'carousel');
|
|
@@ -336,7 +325,6 @@ const Carousel = /*#__PURE__*/React.forwardRef((uncontrolledProps, ref) => {
|
|
|
336
325
|
});
|
|
337
326
|
});
|
|
338
327
|
Carousel.displayName = 'Carousel';
|
|
339
|
-
Carousel.defaultProps = defaultProps;
|
|
340
328
|
export default Object.assign(Carousel, {
|
|
341
329
|
Caption: CarouselCaption,
|
|
342
330
|
Item: CarouselItem
|
package/esm/CloseButton.js
CHANGED
|
@@ -14,20 +14,18 @@ const propTypes = {
|
|
|
14
14
|
*/
|
|
15
15
|
variant: PropTypes.oneOf(['white'])
|
|
16
16
|
};
|
|
17
|
-
const defaultProps = {
|
|
18
|
-
'aria-label': 'Close'
|
|
19
|
-
};
|
|
20
17
|
const CloseButton = /*#__PURE__*/React.forwardRef(({
|
|
21
18
|
className,
|
|
22
19
|
variant,
|
|
20
|
+
'aria-label': ariaLabel = 'Close',
|
|
23
21
|
...props
|
|
24
22
|
}, ref) => /*#__PURE__*/_jsx("button", {
|
|
25
23
|
ref: ref,
|
|
26
24
|
type: "button",
|
|
27
25
|
className: classNames('btn-close', variant && `btn-close-${variant}`, className),
|
|
26
|
+
"aria-label": ariaLabel,
|
|
28
27
|
...props
|
|
29
28
|
}));
|
|
30
29
|
CloseButton.displayName = 'CloseButton';
|
|
31
30
|
CloseButton.propTypes = propTypes;
|
|
32
|
-
CloseButton.defaultProps = defaultProps;
|
|
33
31
|
export default CloseButton;
|
package/esm/Collapse.js
CHANGED
|
@@ -27,14 +27,6 @@ const collapseStyles = {
|
|
|
27
27
|
[ENTERING]: 'collapsing',
|
|
28
28
|
[ENTERED]: 'collapse show'
|
|
29
29
|
};
|
|
30
|
-
const defaultProps = {
|
|
31
|
-
in: false,
|
|
32
|
-
timeout: 300,
|
|
33
|
-
mountOnEnter: false,
|
|
34
|
-
unmountOnExit: false,
|
|
35
|
-
appear: false,
|
|
36
|
-
getDimensionValue: getDefaultDimensionValue
|
|
37
|
-
};
|
|
38
30
|
const Collapse = /*#__PURE__*/React.forwardRef(({
|
|
39
31
|
onEnter,
|
|
40
32
|
onEntering,
|
|
@@ -44,6 +36,11 @@ const Collapse = /*#__PURE__*/React.forwardRef(({
|
|
|
44
36
|
className,
|
|
45
37
|
children,
|
|
46
38
|
dimension = 'height',
|
|
39
|
+
in: inProp = false,
|
|
40
|
+
timeout = 300,
|
|
41
|
+
mountOnEnter = false,
|
|
42
|
+
unmountOnExit = false,
|
|
43
|
+
appear = false,
|
|
47
44
|
getDimensionValue = getDefaultDimensionValue,
|
|
48
45
|
...props
|
|
49
46
|
}, ref) => {
|
|
@@ -74,13 +71,18 @@ const Collapse = /*#__PURE__*/React.forwardRef(({
|
|
|
74
71
|
ref: ref,
|
|
75
72
|
addEndListener: transitionEndListener,
|
|
76
73
|
...props,
|
|
77
|
-
"aria-expanded": props.role ?
|
|
74
|
+
"aria-expanded": props.role ? inProp : null,
|
|
78
75
|
onEnter: handleEnter,
|
|
79
76
|
onEntering: handleEntering,
|
|
80
77
|
onEntered: handleEntered,
|
|
81
78
|
onExit: handleExit,
|
|
82
79
|
onExiting: handleExiting,
|
|
83
80
|
childRef: children.ref,
|
|
81
|
+
in: inProp,
|
|
82
|
+
timeout: timeout,
|
|
83
|
+
mountOnEnter: mountOnEnter,
|
|
84
|
+
unmountOnExit: unmountOnExit,
|
|
85
|
+
appear: appear,
|
|
84
86
|
children: (state, innerProps) => /*#__PURE__*/React.cloneElement(children, {
|
|
85
87
|
...innerProps,
|
|
86
88
|
className: classNames(className, children.props.className, collapseStyles[state], computedDimension === 'width' && 'collapse-horizontal')
|
|
@@ -90,6 +92,4 @@ const Collapse = /*#__PURE__*/React.forwardRef(({
|
|
|
90
92
|
|
|
91
93
|
// @ts-ignore
|
|
92
94
|
|
|
93
|
-
// @ts-ignore
|
|
94
|
-
Collapse.defaultProps = defaultProps;
|
|
95
95
|
export default Collapse;
|
package/esm/Container.js
CHANGED
|
@@ -2,12 +2,9 @@ import classNames from 'classnames';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
fluid: false
|
|
7
|
-
};
|
|
8
5
|
const Container = /*#__PURE__*/React.forwardRef(({
|
|
9
6
|
bsPrefix,
|
|
10
|
-
fluid,
|
|
7
|
+
fluid = false,
|
|
11
8
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
12
9
|
as: Component = 'div',
|
|
13
10
|
className,
|
|
@@ -22,5 +19,4 @@ const Container = /*#__PURE__*/React.forwardRef(({
|
|
|
22
19
|
});
|
|
23
20
|
});
|
|
24
21
|
Container.displayName = 'Container';
|
|
25
|
-
Container.defaultProps = defaultProps;
|
|
26
22
|
export default Container;
|
package/esm/Dropdown.js
CHANGED
|
@@ -27,26 +27,20 @@ const DropdownDivider = createWithBsPrefix('dropdown-divider', {
|
|
|
27
27
|
const DropdownItemText = createWithBsPrefix('dropdown-item-text', {
|
|
28
28
|
Component: 'span'
|
|
29
29
|
});
|
|
30
|
-
const defaultProps = {
|
|
31
|
-
navbar: false,
|
|
32
|
-
align: 'start',
|
|
33
|
-
autoClose: true,
|
|
34
|
-
drop: 'down'
|
|
35
|
-
};
|
|
36
30
|
const Dropdown = /*#__PURE__*/React.forwardRef((pProps, ref) => {
|
|
37
31
|
const {
|
|
38
32
|
bsPrefix,
|
|
39
|
-
drop,
|
|
33
|
+
drop = 'down',
|
|
40
34
|
show,
|
|
41
35
|
className,
|
|
42
|
-
align,
|
|
36
|
+
align = 'start',
|
|
43
37
|
onSelect,
|
|
44
38
|
onToggle,
|
|
45
39
|
focusFirstItemOnShow,
|
|
46
40
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
47
41
|
as: Component = 'div',
|
|
48
42
|
navbar: _4,
|
|
49
|
-
autoClose,
|
|
43
|
+
autoClose = true,
|
|
50
44
|
...props
|
|
51
45
|
} = useUncontrolled(pProps, {
|
|
52
46
|
show: 'onToggle'
|
|
@@ -102,7 +96,6 @@ const Dropdown = /*#__PURE__*/React.forwardRef((pProps, ref) => {
|
|
|
102
96
|
});
|
|
103
97
|
});
|
|
104
98
|
Dropdown.displayName = 'Dropdown';
|
|
105
|
-
Dropdown.defaultProps = defaultProps;
|
|
106
99
|
export default Object.assign(Dropdown, {
|
|
107
100
|
Toggle: DropdownToggle,
|
|
108
101
|
Menu: DropdownMenu,
|
package/esm/DropdownMenu.js
CHANGED
|
@@ -12,9 +12,6 @@ import { useBootstrapPrefix } from './ThemeProvider';
|
|
|
12
12
|
import useWrappedRefWithWarning from './useWrappedRefWithWarning';
|
|
13
13
|
import { alignPropType } from './types';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
const defaultProps = {
|
|
16
|
-
flip: true
|
|
17
|
-
};
|
|
18
15
|
export function getDropdownMenuPlacement(alignEnd, dropDirection, isRTL) {
|
|
19
16
|
const topStart = isRTL ? 'top-end' : 'top-start';
|
|
20
17
|
const topEnd = isRTL ? 'top-start' : 'top-end';
|
|
@@ -33,7 +30,7 @@ const DropdownMenu = /*#__PURE__*/React.forwardRef(({
|
|
|
33
30
|
className,
|
|
34
31
|
align,
|
|
35
32
|
rootCloseEvent,
|
|
36
|
-
flip,
|
|
33
|
+
flip = true,
|
|
37
34
|
show: showProps,
|
|
38
35
|
renderOnMount,
|
|
39
36
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
@@ -122,5 +119,4 @@ const DropdownMenu = /*#__PURE__*/React.forwardRef(({
|
|
|
122
119
|
});
|
|
123
120
|
});
|
|
124
121
|
DropdownMenu.displayName = 'DropdownMenu';
|
|
125
|
-
DropdownMenu.defaultProps = defaultProps;
|
|
126
122
|
export default DropdownMenu;
|
package/esm/Fade.js
CHANGED
|
@@ -6,13 +6,6 @@ import transitionEndListener from './transitionEndListener';
|
|
|
6
6
|
import triggerBrowserReflow from './triggerBrowserReflow';
|
|
7
7
|
import TransitionWrapper from './TransitionWrapper';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const defaultProps = {
|
|
10
|
-
in: false,
|
|
11
|
-
timeout: 300,
|
|
12
|
-
mountOnEnter: false,
|
|
13
|
-
unmountOnExit: false,
|
|
14
|
-
appear: false
|
|
15
|
-
};
|
|
16
9
|
const fadeStyles = {
|
|
17
10
|
[ENTERING]: 'show',
|
|
18
11
|
[ENTERED]: 'show'
|
|
@@ -21,12 +14,21 @@ const Fade = /*#__PURE__*/React.forwardRef(({
|
|
|
21
14
|
className,
|
|
22
15
|
children,
|
|
23
16
|
transitionClasses = {},
|
|
24
|
-
|
|
17
|
+
onEnter,
|
|
18
|
+
...rest
|
|
25
19
|
}, ref) => {
|
|
20
|
+
const props = {
|
|
21
|
+
in: false,
|
|
22
|
+
timeout: 300,
|
|
23
|
+
mountOnEnter: false,
|
|
24
|
+
unmountOnExit: false,
|
|
25
|
+
appear: false,
|
|
26
|
+
...rest
|
|
27
|
+
};
|
|
26
28
|
const handleEnter = useCallback((node, isAppearing) => {
|
|
27
29
|
triggerBrowserReflow(node);
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
+
onEnter == null ? void 0 : onEnter(node, isAppearing);
|
|
31
|
+
}, [onEnter]);
|
|
30
32
|
return /*#__PURE__*/_jsx(TransitionWrapper, {
|
|
31
33
|
ref: ref,
|
|
32
34
|
addEndListener: transitionEndListener,
|
|
@@ -39,6 +41,5 @@ const Fade = /*#__PURE__*/React.forwardRef(({
|
|
|
39
41
|
})
|
|
40
42
|
});
|
|
41
43
|
});
|
|
42
|
-
Fade.defaultProps = defaultProps;
|
|
43
44
|
Fade.displayName = 'Fade';
|
|
44
45
|
export default Fade;
|
package/esm/FigureImage.js
CHANGED
|
@@ -2,18 +2,16 @@ import classNames from 'classnames';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import Image, { propTypes as imagePropTypes } from './Image';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const defaultProps = {
|
|
6
|
-
fluid: true
|
|
7
|
-
};
|
|
8
5
|
const FigureImage = /*#__PURE__*/React.forwardRef(({
|
|
9
6
|
className,
|
|
7
|
+
fluid = true,
|
|
10
8
|
...props
|
|
11
9
|
}, ref) => /*#__PURE__*/_jsx(Image, {
|
|
12
10
|
ref: ref,
|
|
13
11
|
...props,
|
|
12
|
+
fluid: fluid,
|
|
14
13
|
className: classNames(className, 'figure-img')
|
|
15
14
|
}));
|
|
16
15
|
FigureImage.displayName = 'FigureImage';
|
|
17
16
|
FigureImage.propTypes = imagePropTypes;
|
|
18
|
-
FigureImage.defaultProps = defaultProps;
|
|
19
17
|
export default FigureImage;
|
package/esm/Form.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
|
|
|
18
18
|
Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
19
19
|
}, {
|
|
20
20
|
className?: string | undefined;
|
|
21
|
+
'aria-label'?: string | undefined;
|
|
21
22
|
autoFocus?: boolean | undefined;
|
|
22
23
|
disabled?: boolean | undefined;
|
|
23
24
|
form?: string | undefined;
|
|
@@ -93,7 +94,6 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
|
|
|
93
94
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
94
95
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
95
96
|
'aria-keyshortcuts'?: string | undefined;
|
|
96
|
-
'aria-label'?: string | undefined;
|
|
97
97
|
'aria-labelledby'?: string | undefined;
|
|
98
98
|
'aria-level'?: number | undefined;
|
|
99
99
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
package/esm/FormLabel.js
CHANGED
|
@@ -6,16 +6,12 @@ import Col from './Col';
|
|
|
6
6
|
import FormContext from './FormContext';
|
|
7
7
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const defaultProps = {
|
|
10
|
-
column: false,
|
|
11
|
-
visuallyHidden: false
|
|
12
|
-
};
|
|
13
9
|
const FormLabel = /*#__PURE__*/React.forwardRef(({
|
|
14
10
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
15
11
|
as: Component = 'label',
|
|
16
12
|
bsPrefix,
|
|
17
|
-
column,
|
|
18
|
-
visuallyHidden,
|
|
13
|
+
column = false,
|
|
14
|
+
visuallyHidden = false,
|
|
19
15
|
className,
|
|
20
16
|
htmlFor,
|
|
21
17
|
...props
|
|
@@ -48,5 +44,4 @@ const FormLabel = /*#__PURE__*/React.forwardRef(({
|
|
|
48
44
|
);
|
|
49
45
|
});
|
|
50
46
|
FormLabel.displayName = 'FormLabel';
|
|
51
|
-
FormLabel.defaultProps = defaultProps;
|
|
52
47
|
export default FormLabel;
|
package/esm/Image.js
CHANGED
|
@@ -25,19 +25,13 @@ export const propTypes = {
|
|
|
25
25
|
*/
|
|
26
26
|
thumbnail: PropTypes.bool
|
|
27
27
|
};
|
|
28
|
-
const defaultProps = {
|
|
29
|
-
fluid: false,
|
|
30
|
-
rounded: false,
|
|
31
|
-
roundedCircle: false,
|
|
32
|
-
thumbnail: false
|
|
33
|
-
};
|
|
34
28
|
const Image = /*#__PURE__*/React.forwardRef(({
|
|
35
29
|
bsPrefix,
|
|
36
30
|
className,
|
|
37
|
-
fluid,
|
|
38
|
-
rounded,
|
|
39
|
-
roundedCircle,
|
|
40
|
-
thumbnail,
|
|
31
|
+
fluid = false,
|
|
32
|
+
rounded = false,
|
|
33
|
+
roundedCircle = false,
|
|
34
|
+
thumbnail = false,
|
|
41
35
|
...props
|
|
42
36
|
}, ref) => {
|
|
43
37
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'img');
|
|
@@ -49,5 +43,4 @@ const Image = /*#__PURE__*/React.forwardRef(({
|
|
|
49
43
|
});
|
|
50
44
|
});
|
|
51
45
|
Image.displayName = 'Image';
|
|
52
|
-
Image.defaultProps = defaultProps;
|
|
53
46
|
export default Image;
|