react-bootstrap 1.5.2 → 1.6.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.d.ts +10 -0
- package/cjs/AbstractNav.js +7 -3
- package/cjs/AbstractNavItem.d.ts +2 -1
- package/cjs/AbstractNavItem.js +7 -3
- package/cjs/Accordion.js +3 -1
- package/cjs/AccordionBody.d.ts +6 -0
- package/cjs/AccordionButton.d.ts +8 -0
- package/cjs/AccordionCollapse.js +7 -3
- package/cjs/AccordionHeader.d.ts +6 -0
- package/cjs/AccordionItem.d.ts +7 -0
- package/cjs/AccordionItemContext.d.ts +6 -0
- package/cjs/AccordionToggle.js +7 -3
- package/cjs/Alert.js +2 -1
- package/cjs/Anchor.d.ts +3 -0
- package/cjs/Badge.js +2 -1
- package/cjs/Breadcrumb.js +2 -1
- package/cjs/BreadcrumbItem.js +2 -1
- package/cjs/Button.js +2 -1
- package/cjs/ButtonGroup.js +2 -1
- package/cjs/ButtonToolbar.js +2 -1
- package/cjs/Card.js +7 -3
- package/cjs/CardHeader.d.ts +6 -0
- package/cjs/CardHeaderContext.d.ts +6 -0
- package/cjs/CardImg.js +2 -1
- package/cjs/Carousel.js +7 -3
- package/cjs/CarouselItem.js +3 -1
- package/cjs/CloseButton.js +2 -1
- package/cjs/Col.js +2 -1
- package/cjs/Collapse.d.ts +1 -2
- package/cjs/Collapse.js +7 -3
- package/cjs/Container.js +2 -1
- package/cjs/Dropdown.js +7 -3
- package/cjs/DropdownButton.js +7 -3
- package/cjs/DropdownContext.d.ts +10 -0
- package/cjs/DropdownItem.d.ts +2 -1
- package/cjs/DropdownItem.js +8 -5
- package/cjs/DropdownMenu.js +7 -3
- package/cjs/DropdownToggle.d.ts +0 -1
- package/cjs/DropdownToggle.js +3 -1
- package/cjs/Fade.js +7 -3
- package/cjs/Feedback.js +2 -1
- package/cjs/FigureImage.js +7 -3
- package/cjs/FloatingLabel.d.ts +9 -0
- package/cjs/Form.js +2 -1
- package/cjs/FormCheck.js +7 -3
- package/cjs/FormCheckInput.js +7 -3
- package/cjs/FormCheckLabel.js +7 -3
- package/cjs/FormControl.js +7 -3
- package/cjs/FormFile.js +7 -3
- package/cjs/FormFileInput.js +7 -3
- package/cjs/FormFileLabel.js +7 -3
- package/cjs/FormFloating.d.ts +2 -0
- package/cjs/FormGroup.js +7 -3
- package/cjs/FormLabel.js +8 -3
- package/cjs/FormRange.d.ts +6 -0
- package/cjs/FormSelect.d.ts +10 -0
- package/cjs/FormText.js +3 -1
- package/cjs/Image.js +2 -1
- package/cjs/InputGroup.js +2 -1
- package/cjs/InputGroupContext.d.ts +3 -0
- package/cjs/Jumbotron.js +2 -1
- package/cjs/ListGroup.d.ts +3 -2
- package/cjs/ListGroup.js +2 -1
- package/cjs/ListGroupItem.d.ts +2 -2
- package/cjs/ListGroupItem.js +8 -9
- package/cjs/Media.js +2 -1
- package/cjs/Modal.d.ts +3 -2
- package/cjs/Modal.js +23 -34
- package/cjs/ModalDialog.js +3 -1
- package/cjs/ModalHeader.js +7 -3
- package/cjs/Nav.d.ts +4 -2
- package/cjs/Nav.js +9 -4
- package/cjs/NavDropdown.js +3 -1
- package/cjs/NavItem.js +3 -1
- package/cjs/NavLink.d.ts +2 -1
- package/cjs/NavLink.js +2 -1
- package/cjs/Navbar.js +7 -3
- package/cjs/NavbarBrand.js +3 -1
- package/cjs/NavbarCollapse.js +3 -1
- package/cjs/NavbarToggle.js +7 -3
- package/cjs/Offcanvas.d.ts +16 -0
- package/cjs/OffcanvasBody.d.ts +2 -0
- package/cjs/OffcanvasHeader.d.ts +7 -0
- package/cjs/OffcanvasTitle.d.ts +3 -0
- package/cjs/OffcanvasToggling.d.ts +15 -0
- package/cjs/Overlay.js +9 -4
- package/cjs/OverlayTrigger.js +7 -3
- package/cjs/PageItem.js +4 -3
- package/cjs/Pagination.js +7 -3
- package/cjs/Placeholder.d.ts +8 -0
- package/cjs/PlaceholderButton.d.ts +8 -0
- package/cjs/Popover.js +2 -1
- package/cjs/PopoverBody.d.ts +2 -0
- package/cjs/PopoverContent.js +3 -1
- package/cjs/PopoverHeader.d.ts +2 -0
- package/cjs/PopoverTitle.js +3 -1
- package/cjs/ProgressBar.js +11 -5
- package/cjs/Ratio.d.ts +9 -0
- package/cjs/ResponsiveEmbed.js +2 -1
- package/cjs/Row.js +2 -1
- package/cjs/SafeAnchor.d.ts +0 -1
- package/cjs/SafeAnchor.js +3 -1
- package/cjs/SelectableContext.d.ts +1 -1
- package/cjs/Spinner.d.ts +0 -1
- package/cjs/Spinner.js +3 -1
- package/cjs/SplitButton.js +2 -1
- package/cjs/Tab.d.ts +4 -2
- package/cjs/TabContainer.d.ts +5 -4
- package/cjs/TabContainer.js +4 -2
- package/cjs/TabContent.js +3 -1
- package/cjs/TabPane.d.ts +2 -1
- package/cjs/TabPane.js +9 -4
- package/cjs/Table.js +3 -1
- package/cjs/Tabs.d.ts +3 -2
- package/cjs/Tabs.js +2 -1
- package/cjs/ThemeProvider.js +4 -2
- package/cjs/Toast.js +7 -3
- package/cjs/ToastContainer.d.ts +8 -0
- package/cjs/ToastHeader.js +7 -3
- package/cjs/ToggleButton.js +7 -3
- package/cjs/ToggleButtonGroup.js +2 -1
- package/cjs/Tooltip.js +2 -1
- package/cjs/TransitionWrapper.d.ts +8 -0
- package/cjs/createWithBsPrefix.js +3 -1
- package/cjs/getTabTransitionComponent.d.ts +3 -0
- package/cjs/index.js +5 -3
- package/cjs/safeFindDOMNode.d.ts +2 -0
- package/cjs/types.d.ts +1 -0
- package/cjs/types.js +3 -1
- package/cjs/useOverlayOffset.d.ts +6 -0
- package/cjs/usePlaceholder.d.ts +10 -0
- package/cjs/usePopperMarginModifiers.js +51 -13
- package/dist/react-bootstrap.js +899 -630
- package/dist/react-bootstrap.min.js +1 -1
- package/dist/react-bootstrap.min.js.LICENSE.txt +1 -1
- package/esm/AbstractModalHeader.d.ts +10 -0
- package/esm/AbstractNav.js +2 -1
- package/esm/AbstractNavItem.d.ts +2 -1
- package/esm/AbstractNavItem.js +2 -1
- package/esm/Accordion.js +2 -1
- package/esm/AccordionBody.d.ts +6 -0
- package/esm/AccordionButton.d.ts +8 -0
- package/esm/AccordionCollapse.js +2 -1
- package/esm/AccordionHeader.d.ts +6 -0
- package/esm/AccordionItem.d.ts +7 -0
- package/esm/AccordionItemContext.d.ts +6 -0
- package/esm/AccordionToggle.js +2 -1
- package/esm/Alert.js +2 -1
- package/esm/Anchor.d.ts +3 -0
- package/esm/Badge.js +2 -1
- package/esm/Breadcrumb.js +2 -1
- package/esm/BreadcrumbItem.js +2 -1
- package/esm/Button.js +2 -1
- package/esm/ButtonGroup.js +2 -1
- package/esm/ButtonToolbar.js +2 -1
- package/esm/Card.js +2 -1
- package/esm/CardHeader.d.ts +6 -0
- package/esm/CardHeaderContext.d.ts +6 -0
- package/esm/CardImg.js +2 -1
- package/esm/Carousel.js +2 -1
- package/esm/CarouselItem.js +2 -1
- package/esm/CloseButton.js +2 -1
- package/esm/Col.js +2 -1
- package/esm/Collapse.d.ts +1 -2
- package/esm/Collapse.js +2 -1
- package/esm/Container.js +2 -1
- package/esm/Dropdown.js +2 -1
- package/esm/DropdownButton.js +2 -1
- package/esm/DropdownContext.d.ts +10 -0
- package/esm/DropdownItem.d.ts +2 -1
- package/esm/DropdownItem.js +3 -3
- package/esm/DropdownMenu.js +2 -1
- package/esm/DropdownToggle.d.ts +0 -1
- package/esm/DropdownToggle.js +2 -1
- package/esm/Fade.js +2 -1
- package/esm/Feedback.js +2 -1
- package/esm/FigureImage.js +2 -1
- package/esm/FloatingLabel.d.ts +9 -0
- package/esm/Form.js +2 -1
- package/esm/FormCheck.js +2 -1
- package/esm/FormCheckInput.js +2 -1
- package/esm/FormCheckLabel.js +2 -1
- package/esm/FormControl.js +2 -1
- package/esm/FormFile.js +2 -1
- package/esm/FormFileInput.js +2 -1
- package/esm/FormFileLabel.js +2 -1
- package/esm/FormFloating.d.ts +2 -0
- package/esm/FormGroup.js +2 -1
- package/esm/FormLabel.js +3 -1
- package/esm/FormRange.d.ts +6 -0
- package/esm/FormSelect.d.ts +10 -0
- package/esm/FormText.js +2 -1
- package/esm/Image.js +2 -1
- package/esm/InputGroup.js +2 -1
- package/esm/InputGroupContext.d.ts +3 -0
- package/esm/Jumbotron.js +2 -1
- package/esm/ListGroup.d.ts +3 -2
- package/esm/ListGroup.js +2 -1
- package/esm/ListGroupItem.d.ts +2 -2
- package/esm/ListGroupItem.js +3 -6
- package/esm/Media.js +2 -1
- package/esm/Modal.d.ts +3 -2
- package/esm/Modal.js +17 -31
- package/esm/ModalDialog.js +2 -1
- package/esm/ModalHeader.js +2 -1
- package/esm/Nav.d.ts +4 -2
- package/esm/Nav.js +4 -2
- package/esm/NavDropdown.js +2 -1
- package/esm/NavItem.js +2 -1
- package/esm/NavLink.d.ts +2 -1
- package/esm/NavLink.js +2 -1
- package/esm/Navbar.js +2 -1
- package/esm/NavbarBrand.js +2 -1
- package/esm/NavbarCollapse.js +2 -1
- package/esm/NavbarToggle.js +2 -1
- package/esm/Offcanvas.d.ts +16 -0
- package/esm/OffcanvasBody.d.ts +2 -0
- package/esm/OffcanvasHeader.d.ts +7 -0
- package/esm/OffcanvasTitle.d.ts +3 -0
- package/esm/OffcanvasToggling.d.ts +15 -0
- package/esm/Overlay.js +4 -2
- package/esm/OverlayTrigger.js +2 -1
- package/esm/PageItem.js +4 -2
- package/esm/Pagination.js +2 -1
- package/esm/Placeholder.d.ts +8 -0
- package/esm/PlaceholderButton.d.ts +8 -0
- package/esm/Popover.js +2 -1
- package/esm/PopoverBody.d.ts +2 -0
- package/esm/PopoverContent.js +2 -1
- package/esm/PopoverHeader.d.ts +2 -0
- package/esm/PopoverTitle.js +2 -1
- package/esm/ProgressBar.js +6 -3
- package/esm/Ratio.d.ts +9 -0
- package/esm/ResponsiveEmbed.js +2 -1
- package/esm/Row.js +2 -1
- package/esm/SafeAnchor.d.ts +0 -1
- package/esm/SafeAnchor.js +2 -1
- package/esm/SelectableContext.d.ts +1 -1
- package/esm/Spinner.d.ts +0 -1
- package/esm/Spinner.js +2 -1
- package/esm/SplitButton.js +2 -1
- package/esm/Tab.d.ts +4 -2
- package/esm/TabContainer.d.ts +5 -4
- package/esm/TabContent.js +2 -1
- package/esm/TabPane.d.ts +2 -1
- package/esm/TabPane.js +4 -2
- package/esm/Table.js +2 -1
- package/esm/Tabs.d.ts +3 -2
- package/esm/Tabs.js +2 -1
- package/esm/Toast.js +2 -1
- package/esm/ToastContainer.d.ts +8 -0
- package/esm/ToastHeader.js +2 -1
- package/esm/ToggleButton.js +2 -1
- package/esm/ToggleButtonGroup.js +2 -1
- package/esm/Tooltip.js +2 -1
- package/esm/TransitionWrapper.d.ts +8 -0
- package/esm/createWithBsPrefix.js +2 -1
- package/esm/getTabTransitionComponent.d.ts +3 -0
- package/esm/safeFindDOMNode.d.ts +2 -0
- package/esm/types.d.ts +1 -0
- package/esm/types.js +1 -0
- package/esm/useOverlayOffset.d.ts +6 -0
- package/esm/usePlaceholder.d.ts +10 -0
- package/esm/usePopperMarginModifiers.js +51 -13
- package/package.json +6 -12
package/esm/FigureImage.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["className"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import Image, { propTypes as imagePropTypes } from './Image';
|
|
@@ -8,7 +9,7 @@ var defaultProps = {
|
|
|
8
9
|
};
|
|
9
10
|
var FigureImage = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10
11
|
var className = _ref.className,
|
|
11
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
12
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
12
13
|
|
|
13
14
|
return /*#__PURE__*/React.createElement(Image, _extends({
|
|
14
15
|
ref: ref
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FormGroupProps } from './FormGroup';
|
|
3
|
+
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
4
|
+
export interface FloatingLabelProps extends FormGroupProps, BsPrefixProps {
|
|
5
|
+
controlId?: string;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const FloatingLabel: BsPrefixRefForwardingComponent<'div', FloatingLabelProps>;
|
|
9
|
+
export default FloatingLabel;
|
package/esm/Form.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "inline", "className", "validated", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import FormCheck from './FormCheck';
|
|
@@ -22,7 +23,7 @@ var FormImpl = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
22
23
|
validated = _ref.validated,
|
|
23
24
|
_ref$as = _ref.as,
|
|
24
25
|
Component = _ref$as === void 0 ? 'form' : _ref$as,
|
|
25
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
26
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
26
27
|
|
|
27
28
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'form');
|
|
28
29
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
package/esm/FormCheck.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["id", "bsPrefix", "bsCustomPrefix", "inline", "disabled", "isValid", "isInvalid", "feedbackTooltip", "feedback", "className", "style", "title", "type", "label", "children", "custom", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import all from 'prop-types-extra/lib/all';
|
|
5
6
|
import React, { useContext, useMemo } from 'react';
|
|
@@ -34,7 +35,7 @@ var FormCheck = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
34
35
|
propCustom = _ref.custom,
|
|
35
36
|
_ref$as = _ref.as,
|
|
36
37
|
as = _ref$as === void 0 ? 'input' : _ref$as,
|
|
37
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
38
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
38
39
|
|
|
39
40
|
var custom = type === 'switch' ? true : propCustom;
|
|
40
41
|
|
package/esm/FormCheckInput.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["id", "bsPrefix", "bsCustomPrefix", "className", "type", "isValid", "isInvalid", "isStatic", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useContext } from 'react';
|
|
5
6
|
import FormContext from './FormContext';
|
|
@@ -18,7 +19,7 @@ var FormCheckInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
18
19
|
isStatic = _ref.isStatic,
|
|
19
20
|
_ref$as = _ref.as,
|
|
20
21
|
Component = _ref$as === void 0 ? 'input' : _ref$as,
|
|
21
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
22
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
22
23
|
|
|
23
24
|
var _useContext = useContext(FormContext),
|
|
24
25
|
controlId = _useContext.controlId,
|
package/esm/FormCheckLabel.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "bsCustomPrefix", "className", "htmlFor"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useContext } from 'react';
|
|
5
6
|
import FormContext from './FormContext';
|
|
@@ -9,7 +10,7 @@ var FormCheckLabel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
9
10
|
bsCustomPrefix = _ref.bsCustomPrefix,
|
|
10
11
|
className = _ref.className,
|
|
11
12
|
htmlFor = _ref.htmlFor,
|
|
12
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
13
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
14
|
|
|
14
15
|
var _useContext = useContext(FormContext),
|
|
15
16
|
controlId = _useContext.controlId,
|
package/esm/FormControl.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "bsCustomPrefix", "type", "size", "htmlSize", "id", "className", "isValid", "isInvalid", "plaintext", "readOnly", "custom", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import all from 'prop-types-extra/lib/all';
|
|
5
6
|
import React, { useContext } from 'react';
|
|
@@ -24,7 +25,7 @@ var FormControl = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24
25
|
custom = _ref.custom,
|
|
25
26
|
_ref$as = _ref.as,
|
|
26
27
|
Component = _ref$as === void 0 ? 'input' : _ref$as,
|
|
27
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
28
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
28
29
|
|
|
29
30
|
var _useContext = useContext(FormContext),
|
|
30
31
|
controlId = _useContext.controlId;
|
package/esm/FormFile.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["id", "bsPrefix", "bsCustomPrefix", "disabled", "isValid", "isInvalid", "feedbackTooltip", "feedback", "className", "style", "label", "children", "custom", "lang", "data-browse", "as", "inputAs"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useContext, useMemo } from 'react';
|
|
5
6
|
import all from 'prop-types-extra/lib/all';
|
|
@@ -32,7 +33,7 @@ var FormFile = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
32
33
|
Component = _ref$as === void 0 ? 'div' : _ref$as,
|
|
33
34
|
_ref$inputAs = _ref.inputAs,
|
|
34
35
|
inputAs = _ref$inputAs === void 0 ? 'input' : _ref$inputAs,
|
|
35
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
36
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
36
37
|
|
|
37
38
|
var _ref2 = custom ? [bsCustomPrefix, 'custom'] : [bsPrefix, 'form-file'],
|
|
38
39
|
prefix = _ref2[0],
|
package/esm/FormFileInput.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["id", "bsPrefix", "bsCustomPrefix", "className", "isValid", "isInvalid", "lang", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useContext } from 'react';
|
|
5
6
|
import FormContext from './FormContext';
|
|
@@ -14,7 +15,7 @@ var FormFileInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14
15
|
lang = _ref.lang,
|
|
15
16
|
_ref$as = _ref.as,
|
|
16
17
|
Component = _ref$as === void 0 ? 'input' : _ref$as,
|
|
17
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
18
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
18
19
|
|
|
19
20
|
var _useContext = useContext(FormContext),
|
|
20
21
|
controlId = _useContext.controlId,
|
package/esm/FormFileLabel.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "bsCustomPrefix", "className", "htmlFor"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useContext } from 'react';
|
|
5
6
|
import FormContext from './FormContext';
|
|
@@ -9,7 +10,7 @@ var FormFileLabel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
9
10
|
bsCustomPrefix = _ref.bsCustomPrefix,
|
|
10
11
|
className = _ref.className,
|
|
11
12
|
htmlFor = _ref.htmlFor,
|
|
12
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
13
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
14
|
|
|
14
15
|
var _useContext = useContext(FormContext),
|
|
15
16
|
controlId = _useContext.controlId,
|
package/esm/FormGroup.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "className", "children", "controlId", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useMemo } from 'react';
|
|
5
6
|
import FormContext from './FormContext';
|
|
@@ -11,7 +12,7 @@ var FormGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11
12
|
controlId = _ref.controlId,
|
|
12
13
|
_ref$as = _ref.as,
|
|
13
14
|
Component = _ref$as === void 0 ? 'div' : _ref$as,
|
|
14
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
15
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
16
|
|
|
16
17
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'form-group');
|
|
17
18
|
var context = useMemo(function () {
|
package/esm/FormLabel.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["as", "bsPrefix", "column", "srOnly", "className", "htmlFor"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useContext } from 'react';
|
|
5
6
|
import warning from 'warning';
|
|
@@ -18,7 +19,7 @@ var FormLabel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
18
19
|
srOnly = _ref.srOnly,
|
|
19
20
|
className = _ref.className,
|
|
20
21
|
htmlFor = _ref.htmlFor,
|
|
21
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
22
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
22
23
|
|
|
23
24
|
var _useContext = useContext(FormContext),
|
|
24
25
|
controlId = _useContext.controlId;
|
|
@@ -30,6 +31,7 @@ var FormLabel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
30
31
|
process.env.NODE_ENV !== "production" ? warning(controlId == null || !htmlFor, '`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified.') : void 0;
|
|
31
32
|
htmlFor = htmlFor || controlId;
|
|
32
33
|
if (column) return /*#__PURE__*/React.createElement(Col, _extends({
|
|
34
|
+
ref: ref,
|
|
33
35
|
as: "label",
|
|
34
36
|
className: classes,
|
|
35
37
|
htmlFor: htmlFor
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BsPrefixOnlyProps } from './helpers';
|
|
3
|
+
export interface FormRangeProps extends BsPrefixOnlyProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4
|
+
}
|
|
5
|
+
declare const FormRange: React.ForwardRefExoticComponent<FormRangeProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export default FormRange;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BsPrefixOnlyProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
3
|
+
export interface FormSelectProps extends BsPrefixOnlyProps, React.HTMLAttributes<HTMLSelectElement> {
|
|
4
|
+
htmlSize?: number;
|
|
5
|
+
size?: 'sm' | 'lg';
|
|
6
|
+
isValid?: boolean;
|
|
7
|
+
isInvalid?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const FormSelect: BsPrefixRefForwardingComponent<'select', FormSelectProps>;
|
|
10
|
+
export default FormSelect;
|
package/esm/FormText.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "className", "as", "muted"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
@@ -10,7 +11,7 @@ function (_ref, ref) {
|
|
|
10
11
|
_ref$as = _ref.as,
|
|
11
12
|
Component = _ref$as === void 0 ? 'small' : _ref$as,
|
|
12
13
|
muted = _ref.muted,
|
|
13
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
14
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
15
|
|
|
15
16
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');
|
|
16
17
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
package/esm/Image.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "className", "fluid", "rounded", "roundedCircle", "thumbnail"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
@@ -43,7 +44,7 @@ var Image = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
43
44
|
rounded = _ref.rounded,
|
|
44
45
|
roundedCircle = _ref.roundedCircle,
|
|
45
46
|
thumbnail = _ref.thumbnail,
|
|
46
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
47
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
47
48
|
|
|
48
49
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'img');
|
|
49
50
|
var classes = classNames(fluid && bsPrefix + "-fluid", rounded && "rounded", roundedCircle && "rounded-circle", thumbnail && bsPrefix + "-thumbnail");
|
package/esm/InputGroup.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
var _excluded = ["bsPrefix", "size", "hasValidation", "className", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import createWithBsPrefix from './createWithBsPrefix';
|
|
@@ -37,7 +38,7 @@ var InputGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
37
38
|
className = _ref.className,
|
|
38
39
|
_ref$as = _ref.as,
|
|
39
40
|
Component = _ref$as === void 0 ? 'div' : _ref$as,
|
|
40
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
41
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
41
42
|
|
|
42
43
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group');
|
|
43
44
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
package/esm/Jumbotron.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["as", "className", "fluid", "bsPrefix"];
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import classNames from 'classnames';
|
|
5
6
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
@@ -14,7 +15,7 @@ var Jumbotron = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14
15
|
className = _ref.className,
|
|
15
16
|
fluid = _ref.fluid,
|
|
16
17
|
bsPrefix = _ref.bsPrefix,
|
|
17
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
18
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
18
19
|
|
|
19
20
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'jumbotron');
|
|
20
21
|
var classes = (_classes = {}, _classes[bsPrefix] = true, _classes[bsPrefix + "-fluid"] = fluid, _classes);
|
package/esm/ListGroup.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import ListGroupItem from './ListGroupItem';
|
|
2
2
|
import { BsPrefixProps, BsPrefixRefForwardingComponent, SelectCallback } from './helpers';
|
|
3
|
+
import { EventKey } from './types';
|
|
3
4
|
export interface ListGroupProps extends BsPrefixProps {
|
|
4
5
|
variant?: 'flush';
|
|
5
6
|
horizontal?: boolean | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
-
activeKey?:
|
|
7
|
-
defaultActiveKey?:
|
|
7
|
+
activeKey?: EventKey;
|
|
8
|
+
defaultActiveKey?: EventKey;
|
|
8
9
|
onSelect?: SelectCallback;
|
|
9
10
|
}
|
|
10
11
|
declare type ListGroup = BsPrefixRefForwardingComponent<'div', ListGroupProps> & {
|
package/esm/ListGroup.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["className", "bsPrefix", "variant", "horizontal", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import warning from 'warning';
|
|
@@ -21,7 +22,7 @@ var ListGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
21
22
|
horizontal = _useUncontrolled.horizontal,
|
|
22
23
|
_useUncontrolled$as = _useUncontrolled.as,
|
|
23
24
|
as = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,
|
|
24
|
-
controlledProps = _objectWithoutPropertiesLoose(_useUncontrolled,
|
|
25
|
+
controlledProps = _objectWithoutPropertiesLoose(_useUncontrolled, _excluded);
|
|
25
26
|
|
|
26
27
|
var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'list-group');
|
|
27
28
|
var horizontalVariant;
|
package/esm/ListGroupItem.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
3
|
-
import { Variant } from './types';
|
|
3
|
+
import { EventKey, Variant } from './types';
|
|
4
4
|
export interface ListGroupItemProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'>, BsPrefixProps {
|
|
5
5
|
action?: boolean;
|
|
6
6
|
active?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
-
eventKey?:
|
|
8
|
+
eventKey?: EventKey;
|
|
9
9
|
href?: string;
|
|
10
10
|
onClick?: React.MouseEventHandler;
|
|
11
11
|
variant?: Variant;
|
package/esm/ListGroupItem.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "active", "disabled", "className", "variant", "action", "as", "onClick"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useCallback } from 'react';
|
|
5
6
|
import AbstractNavItem from './AbstractNavItem';
|
|
6
|
-
import { makeEventKey } from './SelectableContext';
|
|
7
7
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
8
8
|
var defaultProps = {
|
|
9
9
|
variant: undefined,
|
|
@@ -18,9 +18,8 @@ var ListGroupItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
18
18
|
variant = _ref.variant,
|
|
19
19
|
action = _ref.action,
|
|
20
20
|
as = _ref.as,
|
|
21
|
-
eventKey = _ref.eventKey,
|
|
22
21
|
onClick = _ref.onClick,
|
|
23
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
22
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24
23
|
|
|
25
24
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'list-group-item');
|
|
26
25
|
var handleClick = useCallback(function (event) {
|
|
@@ -41,9 +40,7 @@ var ListGroupItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
41
40
|
return /*#__PURE__*/React.createElement(AbstractNavItem, _extends({
|
|
42
41
|
ref: ref
|
|
43
42
|
}, props, {
|
|
44
|
-
//
|
|
45
|
-
eventKey: makeEventKey(eventKey, props.href) // eslint-disable-next-line no-nested-ternary
|
|
46
|
-
,
|
|
43
|
+
// eslint-disable-next-line no-nested-ternary
|
|
47
44
|
as: as || (action ? props.href ? 'a' : 'button' : 'div'),
|
|
48
45
|
onClick: handleClick,
|
|
49
46
|
className: classNames(className, bsPrefix, active && 'active', disabled && 'disabled', variant && bsPrefix + "-" + variant, action && bsPrefix + "-action")
|
package/esm/Media.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "className", "as"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import createWithBsPrefix from './createWithBsPrefix';
|
|
@@ -11,7 +12,7 @@ function (_ref, ref) {
|
|
|
11
12
|
className = _ref.className,
|
|
12
13
|
_ref$as = _ref.as,
|
|
13
14
|
Component = _ref$as === void 0 ? 'div' : _ref$as,
|
|
14
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
15
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
16
|
|
|
16
17
|
var prefix = useBootstrapPrefix(bsPrefix, 'media');
|
|
17
18
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
package/esm/Modal.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseModalProps } from 'react-overlays/Modal';
|
|
3
3
|
import ModalBody from './ModalBody';
|
|
4
4
|
import ModalDialog from './ModalDialog';
|
|
5
5
|
import ModalFooter from './ModalFooter';
|
|
6
6
|
import ModalHeader from './ModalHeader';
|
|
7
7
|
import ModalTitle from './ModalTitle';
|
|
8
8
|
import { BsPrefixRefForwardingComponent } from './helpers';
|
|
9
|
-
export interface ModalProps extends Omit<BaseModalProps, 'role' | 'renderBackdrop' | 'renderDialog' | 'transition' | 'backdropTransition'> {
|
|
9
|
+
export interface ModalProps extends Omit<BaseModalProps, 'role' | 'renderBackdrop' | 'renderDialog' | 'transition' | 'backdropTransition' | 'children'> {
|
|
10
10
|
size?: 'sm' | 'lg' | 'xl';
|
|
11
11
|
bsPrefix?: string;
|
|
12
12
|
centered?: boolean;
|
|
@@ -16,6 +16,7 @@ export interface ModalProps extends Omit<BaseModalProps, 'role' | 'renderBackdro
|
|
|
16
16
|
contentClassName?: string;
|
|
17
17
|
dialogAs?: React.ElementType;
|
|
18
18
|
scrollable?: boolean;
|
|
19
|
+
[other: string]: any;
|
|
19
20
|
}
|
|
20
21
|
declare type Modal = BsPrefixRefForwardingComponent<'div', ModalProps> & {
|
|
21
22
|
Body: typeof ModalBody;
|
package/esm/Modal.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
var _excluded = ["bsPrefix", "className", "style", "dialogClassName", "contentClassName", "children", "dialogAs", "aria-labelledby", "show", "animation", "backdrop", "keyboard", "onEscapeKeyDown", "onShow", "onHide", "container", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "onEntered", "onExit", "onExiting", "onEnter", "onEntering", "onExited", "backdropClassName", "manager"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import addEventListener from 'dom-helpers/addEventListener';
|
|
5
6
|
import canUseDOM from 'dom-helpers/canUseDOM';
|
|
@@ -36,11 +37,15 @@ var defaultProps = {
|
|
|
36
37
|
/* eslint-disable no-use-before-define, react/no-multi-comp */
|
|
37
38
|
|
|
38
39
|
function DialogTransition(props) {
|
|
39
|
-
return /*#__PURE__*/React.createElement(Fade, props
|
|
40
|
+
return /*#__PURE__*/React.createElement(Fade, _extends({}, props, {
|
|
41
|
+
timeout: null
|
|
42
|
+
}));
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
function BackdropTransition(props) {
|
|
43
|
-
return /*#__PURE__*/React.createElement(Fade, props
|
|
46
|
+
return /*#__PURE__*/React.createElement(Fade, _extends({}, props, {
|
|
47
|
+
timeout: null
|
|
48
|
+
}));
|
|
44
49
|
}
|
|
45
50
|
/* eslint-enable no-use-before-define */
|
|
46
51
|
|
|
@@ -74,7 +79,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
74
79
|
onExited = _ref.onExited,
|
|
75
80
|
backdropClassName = _ref.backdropClassName,
|
|
76
81
|
propsManager = _ref.manager,
|
|
77
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
82
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
78
83
|
|
|
79
84
|
var _useState = useState({}),
|
|
80
85
|
modalStyle = _useState[0],
|
|
@@ -178,7 +183,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
178
183
|
return;
|
|
179
184
|
}
|
|
180
185
|
|
|
181
|
-
onHide();
|
|
186
|
+
onHide == null ? void 0 : onHide();
|
|
182
187
|
};
|
|
183
188
|
|
|
184
189
|
var handleEscapeKeyDown = function handleEscapeKeyDown(e) {
|
|
@@ -192,37 +197,22 @@ var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
192
197
|
}
|
|
193
198
|
};
|
|
194
199
|
|
|
195
|
-
var handleEnter = function handleEnter(node) {
|
|
200
|
+
var handleEnter = function handleEnter(node, isAppearing) {
|
|
196
201
|
if (node) {
|
|
197
202
|
node.style.display = 'block';
|
|
198
203
|
updateDialogStyle(node);
|
|
199
204
|
}
|
|
200
205
|
|
|
201
|
-
|
|
202
|
-
args[_key - 1] = arguments[_key];
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (onEnter) onEnter.apply(void 0, [node].concat(args));
|
|
206
|
+
onEnter == null ? void 0 : onEnter(node, isAppearing);
|
|
206
207
|
};
|
|
207
208
|
|
|
208
209
|
var handleExit = function handleExit(node) {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
214
|
-
args[_key2 - 1] = arguments[_key2];
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (onExit) onExit.apply(void 0, [node].concat(args));
|
|
210
|
+
removeStaticModalAnimationRef.current == null ? void 0 : removeStaticModalAnimationRef.current();
|
|
211
|
+
onExit == null ? void 0 : onExit(node);
|
|
218
212
|
};
|
|
219
213
|
|
|
220
|
-
var handleEntering = function handleEntering(node) {
|
|
221
|
-
|
|
222
|
-
args[_key3 - 1] = arguments[_key3];
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
if (onEntering) onEntering.apply(void 0, [node].concat(args)); // FIXME: This should work even when animation is disabled.
|
|
214
|
+
var handleEntering = function handleEntering(node, isAppearing) {
|
|
215
|
+
onEntering == null ? void 0 : onEntering(node, isAppearing); // FIXME: This should work even when animation is disabled.
|
|
226
216
|
|
|
227
217
|
addEventListener(window, 'resize', handleWindowResize);
|
|
228
218
|
};
|
|
@@ -230,11 +220,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
230
220
|
var handleExited = function handleExited(node) {
|
|
231
221
|
if (node) node.style.display = ''; // RHL removes it sometimes
|
|
232
222
|
|
|
233
|
-
|
|
234
|
-
args[_key4 - 1] = arguments[_key4];
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
if (onExited) onExited.apply(void 0, args); // FIXME: This should work even when animation is disabled.
|
|
223
|
+
onExited == null ? void 0 : onExited(node); // FIXME: This should work even when animation is disabled.
|
|
238
224
|
|
|
239
225
|
removeEventListener(window, 'resize', handleWindowResize);
|
|
240
226
|
};
|
package/esm/ModalDialog.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "className", "contentClassName", "centered", "size", "children", "scrollable"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
@@ -11,7 +12,7 @@ var ModalDialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11
12
|
size = _ref.size,
|
|
12
13
|
children = _ref.children,
|
|
13
14
|
scrollable = _ref.scrollable,
|
|
14
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
15
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
16
|
|
|
16
17
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
|
|
17
18
|
var dialogClass = bsPrefix + "-dialog";
|
package/esm/ModalHeader.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["bsPrefix", "closeLabel", "closeButton", "onHide", "className", "children"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React, { useContext } from 'react';
|
|
5
6
|
import useEventCallback from '@restart/hooks/useEventCallback';
|
|
@@ -17,7 +18,7 @@ var ModalHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
17
18
|
onHide = _ref.onHide,
|
|
18
19
|
className = _ref.className,
|
|
19
20
|
children = _ref.children,
|
|
20
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
21
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
21
22
|
|
|
22
23
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-header');
|
|
23
24
|
var context = useContext(ModalContext);
|
package/esm/Nav.d.ts
CHANGED
|
@@ -2,17 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import NavItem from './NavItem';
|
|
3
3
|
import NavLink from './NavLink';
|
|
4
4
|
import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent, SelectCallback } from './helpers';
|
|
5
|
+
import { EventKey } from './types';
|
|
5
6
|
export interface NavProps extends BsPrefixPropsWithChildren {
|
|
6
7
|
navbarBsPrefix?: string;
|
|
7
8
|
cardHeaderBsPrefix?: string;
|
|
8
9
|
variant?: 'tabs' | 'pills';
|
|
9
|
-
activeKey?:
|
|
10
|
-
defaultActiveKey?:
|
|
10
|
+
activeKey?: EventKey;
|
|
11
|
+
defaultActiveKey?: EventKey;
|
|
11
12
|
fill?: boolean;
|
|
12
13
|
justify?: boolean;
|
|
13
14
|
onSelect?: SelectCallback;
|
|
14
15
|
role?: string;
|
|
15
16
|
navbar?: boolean;
|
|
17
|
+
navbarScroll?: boolean;
|
|
16
18
|
onKeyDown?: React.KeyboardEventHandler<this>;
|
|
17
19
|
}
|
|
18
20
|
declare type Nav = BsPrefixRefForwardingComponent<'div', NavProps> & {
|
package/esm/Nav.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["as", "bsPrefix", "variant", "fill", "justify", "navbar", "navbarScroll", "className", "children", "activeKey"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import all from 'prop-types-extra/lib/all';
|
|
5
6
|
import React, { useContext } from 'react';
|
|
@@ -27,10 +28,11 @@ var Nav = /*#__PURE__*/React.forwardRef(function (uncontrolledProps, ref) {
|
|
|
27
28
|
fill = _useUncontrolled.fill,
|
|
28
29
|
justify = _useUncontrolled.justify,
|
|
29
30
|
navbar = _useUncontrolled.navbar,
|
|
31
|
+
navbarScroll = _useUncontrolled.navbarScroll,
|
|
30
32
|
className = _useUncontrolled.className,
|
|
31
33
|
children = _useUncontrolled.children,
|
|
32
34
|
activeKey = _useUncontrolled.activeKey,
|
|
33
|
-
props = _objectWithoutPropertiesLoose(_useUncontrolled,
|
|
35
|
+
props = _objectWithoutPropertiesLoose(_useUncontrolled, _excluded);
|
|
34
36
|
|
|
35
37
|
var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'nav');
|
|
36
38
|
var navbarBsPrefix;
|
|
@@ -50,7 +52,7 @@ var Nav = /*#__PURE__*/React.forwardRef(function (uncontrolledProps, ref) {
|
|
|
50
52
|
as: as,
|
|
51
53
|
ref: ref,
|
|
52
54
|
activeKey: activeKey,
|
|
53
|
-
className: classNames(className, (_classNames = {}, _classNames[bsPrefix] = !isNavbar, _classNames[navbarBsPrefix + "-nav"] = isNavbar, _classNames[cardHeaderBsPrefix + "-" + variant] = !!cardHeaderBsPrefix, _classNames[bsPrefix + "-" + variant] = !!variant, _classNames[bsPrefix + "-fill"] = fill, _classNames[bsPrefix + "-justified"] = justify, _classNames))
|
|
55
|
+
className: classNames(className, (_classNames = {}, _classNames[bsPrefix] = !isNavbar, _classNames[navbarBsPrefix + "-nav"] = isNavbar, _classNames[navbarBsPrefix + "-nav-scroll"] = isNavbar && navbarScroll, _classNames[cardHeaderBsPrefix + "-" + variant] = !!cardHeaderBsPrefix, _classNames[bsPrefix + "-" + variant] = !!variant, _classNames[bsPrefix + "-fill"] = fill, _classNames[bsPrefix + "-justified"] = justify, _classNames))
|
|
54
56
|
}, props), children);
|
|
55
57
|
});
|
|
56
58
|
Nav.displayName = 'Nav';
|
package/esm/NavDropdown.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["id", "title", "children", "bsPrefix", "className", "rootCloseEvent", "menuRole", "disabled", "active", "renderMenuOnMount"];
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
@@ -16,7 +17,7 @@ var NavDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
16
17
|
disabled = _ref.disabled,
|
|
17
18
|
active = _ref.active,
|
|
18
19
|
renderMenuOnMount = _ref.renderMenuOnMount,
|
|
19
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
20
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
21
|
|
|
21
22
|
/* NavItem has no additional logic, it's purely presentational. Can set nav item class here to support "as" */
|
|
22
23
|
var navItemPrefix = useBootstrapPrefix(undefined, 'nav-item');
|