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
package/esm/ToastHeader.js
CHANGED
|
@@ -7,15 +7,11 @@ import CloseButton from './CloseButton';
|
|
|
7
7
|
import ToastContext from './ToastContext';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
closeLabel: 'Close',
|
|
12
|
-
closeButton: true
|
|
13
|
-
};
|
|
14
10
|
const ToastHeader = /*#__PURE__*/React.forwardRef(({
|
|
15
11
|
bsPrefix,
|
|
16
|
-
closeLabel,
|
|
12
|
+
closeLabel = 'Close',
|
|
17
13
|
closeVariant,
|
|
18
|
-
closeButton,
|
|
14
|
+
closeButton = true,
|
|
19
15
|
className,
|
|
20
16
|
children,
|
|
21
17
|
...props
|
|
@@ -38,5 +34,4 @@ const ToastHeader = /*#__PURE__*/React.forwardRef(({
|
|
|
38
34
|
});
|
|
39
35
|
});
|
|
40
36
|
ToastHeader.displayName = 'ToastHeader';
|
|
41
|
-
ToastHeader.defaultProps = defaultProps;
|
|
42
37
|
export default ToastHeader;
|
package/esm/ToggleButtonGroup.js
CHANGED
|
@@ -6,17 +6,14 @@ import { map } from './ElementChildren';
|
|
|
6
6
|
import ButtonGroup from './ButtonGroup';
|
|
7
7
|
import ToggleButton from './ToggleButton';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const defaultProps = {
|
|
10
|
-
type: 'radio',
|
|
11
|
-
vertical: false
|
|
12
|
-
};
|
|
13
9
|
const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
14
10
|
const {
|
|
15
11
|
children,
|
|
16
|
-
type,
|
|
12
|
+
type = 'radio',
|
|
17
13
|
name,
|
|
18
14
|
value,
|
|
19
15
|
onChange,
|
|
16
|
+
vertical = false,
|
|
20
17
|
...controlledProps
|
|
21
18
|
} = useUncontrolled(props, {
|
|
22
19
|
value: 'onChange'
|
|
@@ -42,6 +39,7 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
42
39
|
return /*#__PURE__*/_jsx(ButtonGroup, {
|
|
43
40
|
...controlledProps,
|
|
44
41
|
ref: ref,
|
|
42
|
+
vertical: vertical,
|
|
45
43
|
children: map(children, child => {
|
|
46
44
|
const values = getValues();
|
|
47
45
|
const {
|
|
@@ -58,7 +56,6 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
58
56
|
})
|
|
59
57
|
});
|
|
60
58
|
});
|
|
61
|
-
ToggleButtonGroup.defaultProps = defaultProps;
|
|
62
59
|
export default Object.assign(ToggleButtonGroup, {
|
|
63
60
|
Button: ToggleButton
|
|
64
61
|
});
|
package/esm/Tooltip.js
CHANGED
|
@@ -5,19 +5,16 @@ import { getOverlayDirection } from './helpers';
|
|
|
5
5
|
import getInitialPopperStyles from './getInitialPopperStyles';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
const defaultProps = {
|
|
9
|
-
placement: 'right'
|
|
10
|
-
};
|
|
11
8
|
const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
12
9
|
bsPrefix,
|
|
13
|
-
placement,
|
|
10
|
+
placement = 'right',
|
|
14
11
|
className,
|
|
15
12
|
style,
|
|
16
13
|
children,
|
|
17
14
|
arrowProps,
|
|
18
15
|
hasDoneInitialMeasure,
|
|
19
16
|
popper,
|
|
20
|
-
show
|
|
17
|
+
show,
|
|
21
18
|
...props
|
|
22
19
|
}, ref) => {
|
|
23
20
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');
|
|
@@ -25,7 +22,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
25
22
|
const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];
|
|
26
23
|
const bsDirection = getOverlayDirection(primaryPlacement, isRTL);
|
|
27
24
|
let computedStyle = style;
|
|
28
|
-
if (!hasDoneInitialMeasure) {
|
|
25
|
+
if (show && !hasDoneInitialMeasure) {
|
|
29
26
|
computedStyle = {
|
|
30
27
|
...style,
|
|
31
28
|
...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)
|
|
@@ -47,6 +44,5 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
47
44
|
})]
|
|
48
45
|
});
|
|
49
46
|
});
|
|
50
|
-
Tooltip.defaultProps = defaultProps;
|
|
51
47
|
Tooltip.displayName = 'Tooltip';
|
|
52
48
|
export default Tooltip;
|
|
@@ -16,14 +16,17 @@ export default function createWithBsPrefix(prefix, {
|
|
|
16
16
|
as: Tag = Component || 'div',
|
|
17
17
|
...props
|
|
18
18
|
}, ref) => {
|
|
19
|
+
const componentProps = {
|
|
20
|
+
...defaultProps,
|
|
21
|
+
...props
|
|
22
|
+
};
|
|
19
23
|
const resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix);
|
|
20
24
|
return /*#__PURE__*/_jsx(Tag, {
|
|
21
25
|
ref: ref,
|
|
22
26
|
className: classNames(className, resolvedPrefix),
|
|
23
|
-
...
|
|
27
|
+
...componentProps
|
|
24
28
|
});
|
|
25
29
|
});
|
|
26
|
-
BsComponent.defaultProps = defaultProps;
|
|
27
30
|
BsComponent.displayName = displayName;
|
|
28
31
|
return BsComponent;
|
|
29
32
|
}
|