react-bootstrap 1.2.0 → 1.4.0
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/README.md +1 -1
- package/cjs/AccordionCollapse.js +9 -3
- package/cjs/Alert.d.ts +2 -2
- package/cjs/Button.d.ts +2 -1
- package/cjs/Button.js +1 -1
- package/cjs/Card.d.ts +8 -8
- package/cjs/CardColumns.d.ts +1 -1
- package/cjs/CardDeck.d.ts +1 -1
- package/cjs/CardGroup.d.ts +1 -1
- package/cjs/Carousel.d.ts +1 -1
- package/cjs/Carousel.js +22 -4
- package/cjs/CarouselCaption.d.ts +1 -1
- package/cjs/CarouselItem.d.ts +7 -2
- package/cjs/CarouselItem.js +25 -2
- package/cjs/Dropdown.d.ts +4 -2
- package/cjs/Dropdown.js +4 -0
- package/cjs/DropdownButton.d.ts +3 -2
- package/cjs/DropdownButton.js +16 -3
- package/cjs/DropdownItem.js +3 -2
- package/cjs/DropdownMenu.d.ts +24 -3
- package/cjs/DropdownMenu.js +47 -9
- package/cjs/DropdownToggle.js +2 -3
- package/cjs/Fade.d.ts +6 -3
- package/cjs/Figure.d.ts +2 -2
- package/cjs/FigureCaption.d.ts +1 -1
- package/cjs/Form.d.ts +4 -4
- package/cjs/Form.js +12 -12
- package/cjs/FormCheck.d.ts +1 -3
- package/cjs/FormCheck.js +1 -1
- package/cjs/FormFile.js +2 -0
- package/cjs/FormLabel.js +1 -1
- package/cjs/InputGroup.d.ts +4 -3
- package/cjs/ListGroupItem.js +2 -1
- package/cjs/Media.d.ts +1 -1
- package/cjs/Modal.d.ts +1 -0
- package/cjs/Modal.js +4 -2
- package/cjs/ModalBody.d.ts +1 -1
- package/cjs/ModalDialog.d.ts +2 -1
- package/cjs/ModalDialog.js +3 -2
- package/cjs/ModalFooter.d.ts +1 -1
- package/cjs/ModalTitle.d.ts +1 -1
- package/cjs/NavContext.js +1 -0
- package/cjs/NavDropdown.d.ts +4 -3
- package/cjs/NavDropdown.js +1 -0
- package/cjs/Navbar.d.ts +1 -1
- package/cjs/Overlay.d.ts +6 -5
- package/cjs/Overlay.js +8 -6
- package/cjs/OverlayTrigger.d.ts +5 -2
- package/cjs/OverlayTrigger.js +29 -50
- package/cjs/PageItem.d.ts +3 -2
- package/cjs/Popover.d.ts +2 -5
- package/cjs/Popover.js +1 -6
- package/cjs/ProgressBar.d.ts +1 -2
- package/cjs/SafeAnchor.d.ts +1 -3
- package/cjs/Spinner.d.ts +1 -1
- package/cjs/SplitButton.d.ts +4 -1
- package/cjs/SplitButton.js +15 -2
- package/cjs/TabContainer.d.ts +1 -1
- package/cjs/TabPane.d.ts +0 -1
- package/cjs/Tabs.d.ts +1 -1
- package/cjs/ThemeProvider.d.ts +1 -1
- package/cjs/Toast.d.ts +1 -1
- package/cjs/ToastBody.d.ts +1 -1
- package/cjs/ToggleButton.d.ts +2 -2
- package/cjs/ToggleButtonGroup.d.ts +4 -3
- package/cjs/ToggleButtonGroup.js +2 -1
- package/cjs/Tooltip.d.ts +4 -7
- package/cjs/helpers.d.ts +3 -3
- package/cjs/index.d.ts +1 -0
- package/cjs/usePopperMarginModifiers.d.ts +4 -1
- package/cjs/usePopperMarginModifiers.js +41 -5
- package/dist/react-bootstrap.js +757 -484
- package/dist/react-bootstrap.min.js +2 -2
- package/esm/AccordionCollapse.js +8 -3
- package/esm/Alert.d.ts +2 -2
- package/esm/Button.d.ts +2 -1
- package/esm/Button.js +1 -1
- package/esm/Card.d.ts +8 -8
- package/esm/CardColumns.d.ts +1 -1
- package/esm/CardDeck.d.ts +1 -1
- package/esm/CardGroup.d.ts +1 -1
- package/esm/Carousel.d.ts +1 -1
- package/esm/Carousel.js +23 -5
- package/esm/CarouselCaption.d.ts +1 -1
- package/esm/CarouselItem.d.ts +7 -2
- package/esm/CarouselItem.js +22 -2
- package/esm/Dropdown.d.ts +4 -2
- package/esm/Dropdown.js +4 -0
- package/esm/DropdownButton.d.ts +3 -2
- package/esm/DropdownButton.js +14 -3
- package/esm/DropdownItem.js +3 -2
- package/esm/DropdownMenu.d.ts +24 -3
- package/esm/DropdownMenu.js +40 -6
- package/esm/DropdownToggle.js +2 -3
- package/esm/Fade.d.ts +6 -3
- package/esm/Figure.d.ts +2 -2
- package/esm/FigureCaption.d.ts +1 -1
- package/esm/Form.d.ts +4 -4
- package/esm/Form.js +12 -12
- package/esm/FormCheck.d.ts +1 -3
- package/esm/FormCheck.js +1 -1
- package/esm/FormFile.js +2 -0
- package/esm/FormLabel.js +1 -1
- package/esm/InputGroup.d.ts +4 -3
- package/esm/ListGroupItem.js +2 -1
- package/esm/Media.d.ts +1 -1
- package/esm/Modal.d.ts +1 -0
- package/esm/Modal.js +4 -2
- package/esm/ModalBody.d.ts +1 -1
- package/esm/ModalDialog.d.ts +2 -1
- package/esm/ModalDialog.js +3 -2
- package/esm/ModalFooter.d.ts +1 -1
- package/esm/ModalTitle.d.ts +1 -1
- package/esm/NavContext.js +1 -0
- package/esm/NavDropdown.d.ts +4 -3
- package/esm/NavDropdown.js +1 -0
- package/esm/Navbar.d.ts +1 -1
- package/esm/Overlay.d.ts +6 -5
- package/esm/Overlay.js +8 -6
- package/esm/OverlayTrigger.d.ts +5 -2
- package/esm/OverlayTrigger.js +31 -50
- package/esm/PageItem.d.ts +3 -2
- package/esm/Popover.d.ts +2 -5
- package/esm/Popover.js +1 -6
- package/esm/ProgressBar.d.ts +1 -2
- package/esm/SafeAnchor.d.ts +1 -3
- package/esm/Spinner.d.ts +1 -1
- package/esm/SplitButton.d.ts +4 -1
- package/esm/SplitButton.js +14 -2
- package/esm/TabContainer.d.ts +1 -1
- package/esm/TabContext.js +1 -3
- package/esm/TabPane.d.ts +0 -1
- package/esm/Tabs.d.ts +1 -1
- package/esm/ThemeProvider.d.ts +1 -1
- package/esm/Toast.d.ts +1 -1
- package/esm/ToastBody.d.ts +1 -1
- package/esm/ToggleButton.d.ts +2 -2
- package/esm/ToggleButtonGroup.d.ts +4 -3
- package/esm/ToggleButtonGroup.js +2 -1
- package/esm/Tooltip.d.ts +4 -7
- package/esm/helpers.d.ts +3 -3
- package/esm/index.d.ts +1 -0
- package/esm/usePopperMarginModifiers.d.ts +4 -1
- package/esm/usePopperMarginModifiers.js +40 -5
- package/package.json +26 -26
package/esm/Figure.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { BsPrefixRefForwardingComponent } from './helpers';
|
|
2
2
|
import FigureImage from './FigureImage';
|
|
3
3
|
import FigureCaption from './FigureCaption';
|
|
4
|
-
declare type Figure =
|
|
4
|
+
declare type Figure = BsPrefixRefForwardingComponent<'figure'> & {
|
|
5
5
|
Image: typeof FigureImage;
|
|
6
6
|
Caption: typeof FigureCaption;
|
|
7
7
|
};
|
package/esm/FigureCaption.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const FigureCaption: import("./helpers").BsPrefixRefForwardingComponent<"figcaption",
|
|
1
|
+
declare const FigureCaption: import("./helpers").BsPrefixRefForwardingComponent<"figcaption", unknown>;
|
|
2
2
|
export default FigureCaption;
|
package/esm/Form.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import FormLabel from './FormLabel';
|
|
|
7
7
|
import FormText from './FormText';
|
|
8
8
|
import Switch from './Switch';
|
|
9
9
|
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
10
|
-
declare const FormRow: BsPrefixRefForwardingComponent<"div",
|
|
11
|
-
export interface FormProps extends React.HTMLAttributes<
|
|
10
|
+
declare const FormRow: BsPrefixRefForwardingComponent<"div", unknown>;
|
|
11
|
+
export interface FormProps extends React.HTMLAttributes<HTMLFormElement>, BsPrefixProps {
|
|
12
12
|
inline?: boolean;
|
|
13
13
|
validated?: boolean;
|
|
14
14
|
}
|
|
@@ -22,5 +22,5 @@ declare type Form = BsPrefixRefForwardingComponent<'form', FormProps> & {
|
|
|
22
22
|
Label: typeof FormLabel;
|
|
23
23
|
Text: typeof FormText;
|
|
24
24
|
};
|
|
25
|
-
declare const
|
|
26
|
-
export default
|
|
25
|
+
declare const FormImpl: Form;
|
|
26
|
+
export default FormImpl;
|
package/esm/Form.js
CHANGED
|
@@ -15,7 +15,7 @@ var FormRow = createWithBsPrefix('form-row');
|
|
|
15
15
|
var defaultProps = {
|
|
16
16
|
inline: false
|
|
17
17
|
};
|
|
18
|
-
var
|
|
18
|
+
var FormImpl = React.forwardRef(function (_ref, ref) {
|
|
19
19
|
var bsPrefix = _ref.bsPrefix,
|
|
20
20
|
inline = _ref.inline,
|
|
21
21
|
className = _ref.className,
|
|
@@ -30,14 +30,14 @@ var Form = React.forwardRef(function (_ref, ref) {
|
|
|
30
30
|
className: classNames(className, validated && 'was-validated', inline && bsPrefix + "-inline")
|
|
31
31
|
}));
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export default
|
|
33
|
+
FormImpl.displayName = 'Form';
|
|
34
|
+
FormImpl.defaultProps = defaultProps;
|
|
35
|
+
FormImpl.Row = FormRow;
|
|
36
|
+
FormImpl.Group = FormGroup;
|
|
37
|
+
FormImpl.Control = FormControl;
|
|
38
|
+
FormImpl.Check = FormCheck;
|
|
39
|
+
FormImpl.File = FormFile;
|
|
40
|
+
FormImpl.Switch = Switch;
|
|
41
|
+
FormImpl.Label = FormLabel;
|
|
42
|
+
FormImpl.Text = FormText;
|
|
43
|
+
export default FormImpl;
|
package/esm/FormCheck.d.ts
CHANGED
|
@@ -3,12 +3,10 @@ import FormCheckInput from './FormCheckInput';
|
|
|
3
3
|
import FormCheckLabel from './FormCheckLabel';
|
|
4
4
|
import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
|
|
5
5
|
export declare type FormCheckType = 'checkbox' | 'radio' | 'switch';
|
|
6
|
-
export interface FormCheckProps extends BsPrefixPropsWithChildren,
|
|
6
|
+
export interface FormCheckProps extends BsPrefixPropsWithChildren, React.HTMLAttributes<HTMLInputElement> {
|
|
7
7
|
bsCustomPrefix?: string;
|
|
8
|
-
id?: string;
|
|
9
8
|
inline?: boolean;
|
|
10
9
|
disabled?: boolean;
|
|
11
|
-
title?: string;
|
|
12
10
|
label?: React.ReactNode;
|
|
13
11
|
custom?: boolean;
|
|
14
12
|
type?: FormCheckType;
|
package/esm/FormCheck.js
CHANGED
|
@@ -53,7 +53,7 @@ var FormCheck = React.forwardRef(function (_ref, ref) {
|
|
|
53
53
|
custom: custom
|
|
54
54
|
};
|
|
55
55
|
}, [controlId, custom, id]);
|
|
56
|
-
var hasLabel = label != null && label !== false && !children;
|
|
56
|
+
var hasLabel = custom || label != null && label !== false && !children;
|
|
57
57
|
var input = /*#__PURE__*/React.createElement(FormCheckInput, _extends({}, props, {
|
|
58
58
|
type: type === 'switch' ? 'checkbox' : type,
|
|
59
59
|
ref: ref,
|
package/esm/FormFile.js
CHANGED
package/esm/FormLabel.js
CHANGED
|
@@ -25,7 +25,7 @@ var FormLabel = React.forwardRef(function (_ref, ref) {
|
|
|
25
25
|
|
|
26
26
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');
|
|
27
27
|
var columnClass = 'col-form-label';
|
|
28
|
-
if (typeof column === 'string') columnClass = columnClass + "-" + column;
|
|
28
|
+
if (typeof column === 'string') columnClass = columnClass + " " + columnClass + "-" + column;
|
|
29
29
|
var classes = classNames(className, bsPrefix, srOnly && 'sr-only', column && columnClass);
|
|
30
30
|
process.env.NODE_ENV !== "production" ? warning(controlId == null || !htmlFor, '`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified.') : void 0;
|
|
31
31
|
htmlFor = htmlFor || controlId;
|
package/esm/InputGroup.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
|
|
2
|
-
declare const InputGroupAppend: BsPrefixRefForwardingComponent<"div",
|
|
3
|
-
declare const InputGroupPrepend: BsPrefixRefForwardingComponent<"div",
|
|
4
|
-
declare const InputGroupText: BsPrefixRefForwardingComponent<"span",
|
|
3
|
+
declare const InputGroupAppend: BsPrefixRefForwardingComponent<"div", unknown>;
|
|
4
|
+
declare const InputGroupPrepend: BsPrefixRefForwardingComponent<"div", unknown>;
|
|
5
|
+
declare const InputGroupText: BsPrefixRefForwardingComponent<"span", unknown>;
|
|
5
6
|
declare const InputGroupCheckbox: (props: any) => JSX.Element;
|
|
6
7
|
declare const InputGroupRadio: (props: any) => JSX.Element;
|
|
7
8
|
export interface InputGroupProps extends BsPrefixPropsWithChildren {
|
package/esm/ListGroupItem.js
CHANGED
|
@@ -35,7 +35,8 @@ var ListGroupItem = React.forwardRef(function (_ref, ref) {
|
|
|
35
35
|
return /*#__PURE__*/React.createElement(AbstractNavItem, _extends({
|
|
36
36
|
ref: ref
|
|
37
37
|
}, props, {
|
|
38
|
-
|
|
38
|
+
// TODO: Restrict eventKey to string in v5?
|
|
39
|
+
eventKey: makeEventKey(eventKey, props.href) // eslint-disable-next-line no-nested-ternary
|
|
39
40
|
,
|
|
40
41
|
as: as || (action ? props.href ? 'a' : 'button' : 'div'),
|
|
41
42
|
onClick: handleClick,
|
package/esm/Media.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
2
|
-
declare const MediaBody: BsPrefixRefForwardingComponent<"div",
|
|
2
|
+
declare const MediaBody: BsPrefixRefForwardingComponent<"div", unknown>;
|
|
3
3
|
declare type MediaProps = BsPrefixProps;
|
|
4
4
|
declare type Media = BsPrefixRefForwardingComponent<'div', MediaProps> & {
|
|
5
5
|
Body: typeof MediaBody;
|
package/esm/Modal.d.ts
CHANGED
package/esm/Modal.js
CHANGED
|
@@ -50,6 +50,7 @@ var Modal = React.forwardRef(function (_ref, ref) {
|
|
|
50
50
|
className = _ref.className,
|
|
51
51
|
style = _ref.style,
|
|
52
52
|
dialogClassName = _ref.dialogClassName,
|
|
53
|
+
contentClassName = _ref.contentClassName,
|
|
53
54
|
children = _ref.children,
|
|
54
55
|
Dialog = _ref.dialogAs,
|
|
55
56
|
ariaLabelledby = _ref['aria-labelledby'],
|
|
@@ -73,7 +74,7 @@ var Modal = React.forwardRef(function (_ref, ref) {
|
|
|
73
74
|
onExited = _ref.onExited,
|
|
74
75
|
backdropClassName = _ref.backdropClassName,
|
|
75
76
|
propsManager = _ref.manager,
|
|
76
|
-
props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "style", "dialogClassName", "children", "dialogAs", "aria-labelledby", "show", "animation", "backdrop", "keyboard", "onEscapeKeyDown", "onShow", "onHide", "container", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "onEntered", "onExit", "onExiting", "onEnter", "onEntering", "onExited", "backdropClassName", "manager"]);
|
|
77
|
+
props = _objectWithoutPropertiesLoose(_ref, ["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"]);
|
|
77
78
|
|
|
78
79
|
var _useState = useState({}),
|
|
79
80
|
modalStyle = _useState[0],
|
|
@@ -263,7 +264,8 @@ var Modal = React.forwardRef(function (_ref, ref) {
|
|
|
263
264
|
}), /*#__PURE__*/React.createElement(Dialog, _extends({}, props, {
|
|
264
265
|
role: "document",
|
|
265
266
|
onMouseDown: handleDialogMouseDown,
|
|
266
|
-
className: dialogClassName
|
|
267
|
+
className: dialogClassName,
|
|
268
|
+
contentClassName: contentClassName
|
|
267
269
|
}), children));
|
|
268
270
|
};
|
|
269
271
|
|
package/esm/ModalBody.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div",
|
|
1
|
+
declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
|
|
2
2
|
export default _default;
|
package/esm/ModalDialog.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BsPrefixPropsWithChildren } from './helpers';
|
|
3
|
-
export interface ModalDialogProps extends BsPrefixPropsWithChildren {
|
|
3
|
+
export interface ModalDialogProps extends React.HTMLAttributes<HTMLDivElement>, BsPrefixPropsWithChildren {
|
|
4
4
|
size?: 'sm' | 'lg' | 'xl';
|
|
5
5
|
centered?: boolean;
|
|
6
6
|
scrollable?: boolean;
|
|
7
|
+
contentClassName?: string;
|
|
7
8
|
}
|
|
8
9
|
declare const ModalDialog: React.ForwardRefExoticComponent<ModalDialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export default ModalDialog;
|
package/esm/ModalDialog.js
CHANGED
|
@@ -6,11 +6,12 @@ import { useBootstrapPrefix } from './ThemeProvider';
|
|
|
6
6
|
var ModalDialog = React.forwardRef(function (_ref, ref) {
|
|
7
7
|
var bsPrefix = _ref.bsPrefix,
|
|
8
8
|
className = _ref.className,
|
|
9
|
+
contentClassName = _ref.contentClassName,
|
|
9
10
|
centered = _ref.centered,
|
|
10
11
|
size = _ref.size,
|
|
11
12
|
children = _ref.children,
|
|
12
13
|
scrollable = _ref.scrollable,
|
|
13
|
-
props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "centered", "size", "children", "scrollable"]);
|
|
14
|
+
props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "contentClassName", "centered", "size", "children", "scrollable"]);
|
|
14
15
|
|
|
15
16
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
|
|
16
17
|
var dialogClass = bsPrefix + "-dialog";
|
|
@@ -18,7 +19,7 @@ var ModalDialog = React.forwardRef(function (_ref, ref) {
|
|
|
18
19
|
ref: ref,
|
|
19
20
|
className: classNames(dialogClass, className, size && bsPrefix + "-" + size, centered && dialogClass + "-centered", scrollable && dialogClass + "-scrollable")
|
|
20
21
|
}), /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: bsPrefix + "-content"
|
|
22
|
+
className: classNames(bsPrefix + "-content", contentClassName)
|
|
22
23
|
}, children));
|
|
23
24
|
});
|
|
24
25
|
ModalDialog.displayName = 'ModalDialog';
|
package/esm/ModalFooter.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div",
|
|
1
|
+
declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
|
|
2
2
|
export default _default;
|
package/esm/ModalTitle.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const _default: import("./helpers").BsPrefixRefForwardingComponent<import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "className" | "key" | "onKeyDown" | "onSelect" | "role" | "color" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & import("react").RefAttributes<HTMLDivElement>>,
|
|
2
|
+
declare const _default: import("./helpers").BsPrefixRefForwardingComponent<import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "className" | "key" | "onKeyDown" | "onSelect" | "role" | "color" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & import("react").RefAttributes<HTMLDivElement>>, unknown>;
|
|
3
3
|
export default _default;
|
package/esm/NavContext.js
CHANGED
package/esm/NavDropdown.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Dropdown from './Dropdown';
|
|
3
|
-
import {
|
|
4
|
-
export interface NavDropdownProps extends
|
|
2
|
+
import Dropdown, { DropdownProps } from './Dropdown';
|
|
3
|
+
import { BsPrefixRefForwardingComponent } from './helpers';
|
|
4
|
+
export interface NavDropdownProps extends DropdownProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect' | 'title'> {
|
|
5
5
|
id: string;
|
|
6
6
|
title: React.ReactNode;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -12,6 +12,7 @@ export interface NavDropdownProps extends BsPrefixPropsWithChildren {
|
|
|
12
12
|
}
|
|
13
13
|
declare type NavDropdown = BsPrefixRefForwardingComponent<'div', NavDropdownProps> & {
|
|
14
14
|
Item: typeof Dropdown.Item;
|
|
15
|
+
ItemText: typeof Dropdown.ItemText;
|
|
15
16
|
Divider: typeof Dropdown.Divider;
|
|
16
17
|
Header: typeof Dropdown.Header;
|
|
17
18
|
};
|
package/esm/NavDropdown.js
CHANGED
|
@@ -73,6 +73,7 @@ var NavDropdown = React.forwardRef(function (_ref, ref) {
|
|
|
73
73
|
NavDropdown.displayName = 'NavDropdown';
|
|
74
74
|
NavDropdown.propTypes = propTypes;
|
|
75
75
|
NavDropdown.Item = Dropdown.Item;
|
|
76
|
+
NavDropdown.ItemText = Dropdown.ItemText;
|
|
76
77
|
NavDropdown.Divider = Dropdown.Divider;
|
|
77
78
|
NavDropdown.Header = Dropdown.Header;
|
|
78
79
|
export default NavDropdown;
|
package/esm/Navbar.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import NavbarBrand from './NavbarBrand';
|
|
|
2
2
|
import NavbarCollapse from './NavbarCollapse';
|
|
3
3
|
import NavbarToggle from './NavbarToggle';
|
|
4
4
|
import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent, SelectCallback } from './helpers';
|
|
5
|
-
declare const NavbarText: BsPrefixRefForwardingComponent<"span",
|
|
5
|
+
declare const NavbarText: BsPrefixRefForwardingComponent<"span", unknown>;
|
|
6
6
|
export interface NavbarProps extends BsPrefixPropsWithChildren {
|
|
7
7
|
variant?: 'light' | 'dark';
|
|
8
8
|
expand?: boolean | 'sm' | 'md' | 'lg' | 'xl';
|
package/esm/Overlay.d.ts
CHANGED
|
@@ -3,14 +3,15 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { OverlayProps as BaseOverlayProps } from 'react-overlays/Overlay';
|
|
4
4
|
import { TransitionType } from './helpers';
|
|
5
5
|
export declare type Placement = import('react-overlays/usePopper').Placement;
|
|
6
|
+
export declare type ArrowProps = {
|
|
7
|
+
ref: React.RefCallback<HTMLElement>;
|
|
8
|
+
style: React.CSSProperties;
|
|
9
|
+
};
|
|
6
10
|
export interface OverlayInjectedProps {
|
|
7
11
|
ref: React.RefCallback<HTMLElement>;
|
|
8
12
|
style: React.CSSProperties;
|
|
9
13
|
'aria-labelledby'?: string;
|
|
10
|
-
arrowProps:
|
|
11
|
-
ref: React.RefCallback<HTMLElement>;
|
|
12
|
-
style: React.CSSProperties;
|
|
13
|
-
};
|
|
14
|
+
arrowProps: ArrowProps;
|
|
14
15
|
show: boolean;
|
|
15
16
|
placement: Placement;
|
|
16
17
|
popper: {
|
|
@@ -96,7 +97,7 @@ declare namespace Overlay {
|
|
|
96
97
|
placement: PropTypes.Requireable<string>;
|
|
97
98
|
};
|
|
98
99
|
var defaultProps: {
|
|
99
|
-
transition: React.ForwardRefExoticComponent<
|
|
100
|
+
transition: React.ForwardRefExoticComponent<import("./Fade").FadeProps & React.RefAttributes<import("react-transition-group/Transition").default<any>>>;
|
|
100
101
|
rootClose: boolean;
|
|
101
102
|
show: boolean;
|
|
102
103
|
placement: string;
|
package/esm/Overlay.js
CHANGED
|
@@ -47,21 +47,23 @@ function Overlay(_ref) {
|
|
|
47
47
|
}),
|
|
48
48
|
transition: actualTransition
|
|
49
49
|
}), function (_ref2) {
|
|
50
|
+
var _state$modifiersData$;
|
|
51
|
+
|
|
50
52
|
var overlayProps = _ref2.props,
|
|
51
53
|
arrowProps = _ref2.arrowProps,
|
|
52
54
|
show = _ref2.show,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
update = _ref2.update,
|
|
56
|
+
_ = _ref2.forceUpdate,
|
|
55
57
|
placement = _ref2.placement,
|
|
56
|
-
|
|
57
|
-
props = _objectWithoutPropertiesLoose(_ref2, ["props", "arrowProps", "show", "
|
|
58
|
+
state = _ref2.state,
|
|
59
|
+
props = _objectWithoutPropertiesLoose(_ref2, ["props", "arrowProps", "show", "update", "forceUpdate", "placement", "state"]);
|
|
58
60
|
|
|
59
61
|
wrapRefs(overlayProps, arrowProps);
|
|
60
62
|
var popper = Object.assign(popperRef.current, {
|
|
61
63
|
state: state,
|
|
62
|
-
scheduleUpdate:
|
|
64
|
+
scheduleUpdate: update,
|
|
63
65
|
placement: placement,
|
|
64
|
-
outOfBoundaries:
|
|
66
|
+
outOfBoundaries: (state == null ? void 0 : (_state$modifiersData$ = state.modifiersData.hide) == null ? void 0 : _state$modifiersData$.isReferenceHidden) || false
|
|
65
67
|
});
|
|
66
68
|
if (typeof overlay === 'function') return overlay(_extends({}, props, {}, overlayProps, {
|
|
67
69
|
placement: placement,
|
package/esm/OverlayTrigger.d.ts
CHANGED
|
@@ -9,8 +9,11 @@ export declare type OverlayDelay = number | {
|
|
|
9
9
|
export declare type OverlayInjectedProps = {
|
|
10
10
|
onFocus?: (...args: any[]) => any;
|
|
11
11
|
};
|
|
12
|
+
export declare type OverlayTriggerRenderProps = OverlayInjectedProps & {
|
|
13
|
+
ref: React.Ref<any>;
|
|
14
|
+
};
|
|
12
15
|
export interface OverlayTriggerProps extends Omit<OverlayProps, 'children' | 'target'> {
|
|
13
|
-
children: React.ReactElement;
|
|
16
|
+
children: React.ReactElement | ((props: OverlayTriggerRenderProps) => React.ReactNode);
|
|
14
17
|
trigger?: OverlayTriggerType | OverlayTriggerType[];
|
|
15
18
|
delay?: OverlayDelay;
|
|
16
19
|
show?: boolean;
|
|
@@ -24,7 +27,7 @@ export interface OverlayTriggerProps extends Omit<OverlayProps, 'children' | 'ta
|
|
|
24
27
|
declare function OverlayTrigger({ trigger, overlay, children, popperConfig, show: propsShow, defaultShow, onToggle, delay: propsDelay, placement, flip, ...props }: OverlayTriggerProps): JSX.Element;
|
|
25
28
|
declare namespace OverlayTrigger {
|
|
26
29
|
var propTypes: {
|
|
27
|
-
children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
30
|
+
children: PropTypes.Validator<((...args: any[]) => any) | PropTypes.ReactElementLike>;
|
|
28
31
|
/**
|
|
29
32
|
* Specify which action or actions trigger Overlay visibility
|
|
30
33
|
*
|
package/esm/OverlayTrigger.js
CHANGED
|
@@ -76,11 +76,12 @@ function OverlayTrigger(_ref) {
|
|
|
76
76
|
setShow = _useUncontrolledProp[1];
|
|
77
77
|
|
|
78
78
|
var delay = normalizeDelay(propsDelay);
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
onFocus =
|
|
82
|
-
onBlur =
|
|
83
|
-
onClick =
|
|
79
|
+
|
|
80
|
+
var _ref2 = typeof children !== 'function' ? React.Children.only(children).props : {},
|
|
81
|
+
onFocus = _ref2.onFocus,
|
|
82
|
+
onBlur = _ref2.onBlur,
|
|
83
|
+
onClick = _ref2.onClick;
|
|
84
|
+
|
|
84
85
|
var getTarget = useCallback(function () {
|
|
85
86
|
return safeFindDOMNode(triggerNodeRef.current);
|
|
86
87
|
}, []);
|
|
@@ -112,55 +113,40 @@ function OverlayTrigger(_ref) {
|
|
|
112
113
|
}, [delay.hide, setShow, timeout]);
|
|
113
114
|
var handleFocus = useCallback(function () {
|
|
114
115
|
handleShow();
|
|
115
|
-
|
|
116
|
+
|
|
117
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
118
|
+
args[_key] = arguments[_key];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
onFocus == null ? void 0 : onFocus.apply(void 0, args);
|
|
116
122
|
}, [handleShow, onFocus]);
|
|
117
123
|
var handleBlur = useCallback(function () {
|
|
118
124
|
handleHide();
|
|
119
|
-
|
|
125
|
+
|
|
126
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
127
|
+
args[_key2] = arguments[_key2];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
onBlur == null ? void 0 : onBlur.apply(void 0, args);
|
|
120
131
|
}, [handleHide, onBlur]);
|
|
121
132
|
var handleClick = useCallback(function () {
|
|
122
133
|
setShow(!show);
|
|
123
134
|
if (onClick) onClick.apply(void 0, arguments);
|
|
124
135
|
}, [onClick, setShow, show]);
|
|
125
136
|
var handleMouseOver = useCallback(function () {
|
|
126
|
-
for (var
|
|
127
|
-
args[
|
|
137
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
138
|
+
args[_key3] = arguments[_key3];
|
|
128
139
|
}
|
|
129
140
|
|
|
130
141
|
handleMouseOverOut(handleShow, args, 'fromElement');
|
|
131
142
|
}, [handleShow]);
|
|
132
143
|
var handleMouseOut = useCallback(function () {
|
|
133
|
-
for (var
|
|
134
|
-
args[
|
|
144
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
145
|
+
args[_key4] = arguments[_key4];
|
|
135
146
|
}
|
|
136
147
|
|
|
137
148
|
handleMouseOverOut(handleHide, args, 'toElement');
|
|
138
|
-
}, [handleHide]);
|
|
139
|
-
// for other cases describedby isn't appropriate (e.g. a popover with inputs) so we don't add it.
|
|
140
|
-
|
|
141
|
-
var ariaModifier = {
|
|
142
|
-
name: 'ariaDescribedBy',
|
|
143
|
-
enabled: true,
|
|
144
|
-
phase: 'afterWrite',
|
|
145
|
-
effect: function effect(_ref2) {
|
|
146
|
-
var state = _ref2.state;
|
|
147
|
-
return function () {
|
|
148
|
-
state.elements.reference.removeAttribute('aria-describedby');
|
|
149
|
-
};
|
|
150
|
-
},
|
|
151
|
-
fn: function fn(_ref3) {
|
|
152
|
-
var state = _ref3.state;
|
|
153
|
-
var _state$elements = state.elements,
|
|
154
|
-
popper = _state$elements.popper,
|
|
155
|
-
reference = _state$elements.reference;
|
|
156
|
-
if (!show || !reference) return;
|
|
157
|
-
var role = popper.getAttribute('role') || '';
|
|
158
|
-
|
|
159
|
-
if (popper.id && role.toLowerCase() === 'tooltip') {
|
|
160
|
-
reference.setAttribute('aria-describedby', popper.id);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
};
|
|
149
|
+
}, [handleHide]);
|
|
164
150
|
var triggers = trigger == null ? [] : [].concat(trigger);
|
|
165
151
|
var triggerProps = {};
|
|
166
152
|
|
|
@@ -177,24 +163,19 @@ function OverlayTrigger(_ref) {
|
|
|
177
163
|
process.env.NODE_ENV !== "production" ? warning(triggers.length > 1, '[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.') : void 0;
|
|
178
164
|
triggerProps.onMouseOver = handleMouseOver;
|
|
179
165
|
triggerProps.onMouseOut = handleMouseOut;
|
|
180
|
-
}
|
|
181
|
-
// @ts-ignore
|
|
182
|
-
|
|
166
|
+
}
|
|
183
167
|
|
|
184
|
-
|
|
185
|
-
|
|
168
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, typeof children === 'function' ? children(_extends({}, triggerProps, {
|
|
169
|
+
ref: triggerNodeRef
|
|
170
|
+
})) : /*#__PURE__*/React.createElement(RefHolder, {
|
|
186
171
|
ref: triggerNodeRef
|
|
187
|
-
}, cloneElement(
|
|
188
|
-
popperConfig: _extends({}, popperConfig, {
|
|
189
|
-
// TODO: fix typing
|
|
190
|
-
// @ts-ignore
|
|
191
|
-
modifiers: modifiers
|
|
192
|
-
}),
|
|
172
|
+
}, cloneElement(children, triggerProps)), /*#__PURE__*/React.createElement(Overlay, _extends({}, props, {
|
|
193
173
|
show: show,
|
|
194
174
|
onHide: handleHide,
|
|
195
|
-
|
|
175
|
+
flip: flip,
|
|
196
176
|
placement: placement,
|
|
197
|
-
|
|
177
|
+
popperConfig: popperConfig,
|
|
178
|
+
target: getTarget
|
|
198
179
|
}), overlay));
|
|
199
180
|
}
|
|
200
181
|
|
package/esm/PageItem.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
|
|
2
|
-
export interface PageItemProps extends BsPrefixPropsWithChildren {
|
|
3
|
-
style?: any;
|
|
3
|
+
export interface PageItemProps extends React.HTMLAttributes<HTMLElement>, BsPrefixPropsWithChildren {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
active?: boolean;
|
|
6
6
|
activeLabel?: string;
|
|
7
|
+
href?: string;
|
|
7
8
|
}
|
|
8
9
|
declare type PageItem = BsPrefixRefForwardingComponent<'li', PageItemProps>;
|
|
9
10
|
declare const PageItem: PageItem;
|
package/esm/Popover.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PopoverTitle from './PopoverTitle';
|
|
3
3
|
import PopoverContent from './PopoverContent';
|
|
4
|
-
import { Placement } from './Overlay';
|
|
4
|
+
import { ArrowProps, Placement } from './Overlay';
|
|
5
5
|
import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
|
|
6
6
|
export interface PopoverProps extends React.ComponentPropsWithoutRef<'div'>, BsPrefixPropsWithChildren {
|
|
7
7
|
id: string;
|
|
8
8
|
placement?: Placement;
|
|
9
9
|
title?: string;
|
|
10
|
-
arrowProps?:
|
|
11
|
-
ref: any;
|
|
12
|
-
style: object;
|
|
13
|
-
};
|
|
10
|
+
arrowProps?: ArrowProps;
|
|
14
11
|
content?: boolean;
|
|
15
12
|
popper?: any;
|
|
16
13
|
show?: boolean;
|
package/esm/Popover.js
CHANGED
|
@@ -34,12 +34,7 @@ var Popover = React.forwardRef(function (_ref, ref) {
|
|
|
34
34
|
className: classNames(className, decoratedBsPrefix, primaryPlacement && "bs-popover-" + primaryPlacement)
|
|
35
35
|
}, props), /*#__PURE__*/React.createElement("div", _extends({
|
|
36
36
|
className: "arrow"
|
|
37
|
-
}, arrowProps,
|
|
38
|
-
// this prevents an error if you render a Popover without arrow props, like in a test
|
|
39
|
-
style: arrowProps ? _extends({}, arrowProps.style, {
|
|
40
|
-
margin: 0
|
|
41
|
-
}) : undefined
|
|
42
|
-
})), content ? /*#__PURE__*/React.createElement(PopoverContent, null, children) : children);
|
|
37
|
+
}, arrowProps)), content ? /*#__PURE__*/React.createElement(PopoverContent, null, children) : children);
|
|
43
38
|
});
|
|
44
39
|
Popover.defaultProps = defaultProps;
|
|
45
40
|
Popover.Title = PopoverTitle;
|
package/esm/ProgressBar.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BsPrefixPropsWithChildren } from './helpers';
|
|
3
|
-
export interface ProgressBarProps extends BsPrefixPropsWithChildren {
|
|
4
|
-
style?: any;
|
|
3
|
+
export interface ProgressBarProps extends React.HTMLAttributes<HTMLDivElement>, BsPrefixPropsWithChildren {
|
|
5
4
|
min?: number;
|
|
6
5
|
now?: number;
|
|
7
6
|
max?: number;
|
package/esm/SafeAnchor.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
3
|
-
export interface SafeAnchorProps extends BsPrefixProps {
|
|
3
|
+
export interface SafeAnchorProps extends React.HTMLAttributes<HTMLElement>, BsPrefixProps {
|
|
4
4
|
href?: string;
|
|
5
|
-
onClick?: React.MouseEventHandler<this>;
|
|
6
|
-
onKeyDown?: React.KeyboardEventHandler<this>;
|
|
7
5
|
disabled?: boolean;
|
|
8
6
|
role?: string;
|
|
9
7
|
tabIndex?: number;
|
package/esm/Spinner.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BsPrefixPropsWithChildren } from './helpers';
|
|
3
3
|
import { Variant } from './types';
|
|
4
|
-
export interface SpinnerProps extends BsPrefixPropsWithChildren {
|
|
4
|
+
export interface SpinnerProps extends React.HTMLAttributes<HTMLElement>, BsPrefixPropsWithChildren {
|
|
5
5
|
animation: 'border' | 'grow';
|
|
6
6
|
role?: string;
|
|
7
7
|
size?: 'sm';
|
package/esm/SplitButton.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ButtonType } from './Button';
|
|
3
|
+
import { AlignType } from './DropdownMenu';
|
|
2
4
|
import { PropsFromToggle } from './DropdownToggle';
|
|
3
5
|
import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
|
|
4
6
|
export interface SplitButtonProps extends PropsFromToggle, BsPrefixPropsWithChildren {
|
|
5
7
|
id: string | number;
|
|
8
|
+
menuAlign?: AlignType;
|
|
6
9
|
menuRole?: string;
|
|
7
10
|
onClick?: React.MouseEventHandler<this>;
|
|
8
11
|
renderMenuOnMount?: boolean;
|
|
@@ -10,7 +13,7 @@ export interface SplitButtonProps extends PropsFromToggle, BsPrefixPropsWithChil
|
|
|
10
13
|
target?: string;
|
|
11
14
|
title: React.ReactNode;
|
|
12
15
|
toggleLabel?: string;
|
|
13
|
-
type?:
|
|
16
|
+
type?: ButtonType;
|
|
14
17
|
}
|
|
15
18
|
declare type SplitButton = BsPrefixRefForwardingComponent<'div', SplitButtonProps>;
|
|
16
19
|
declare const SplitButton: SplitButton;
|