react-bootstrap 2.2.1 → 2.3.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/cjs/DropdownMenu.d.ts +1 -3
- package/cjs/Modal.js +7 -5
- package/cjs/PageItem.d.ts +5 -20
- package/cjs/PageItem.js +11 -13
- package/cjs/Pagination.d.ts +5 -20
- package/dist/react-bootstrap.js +307 -82
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/DropdownMenu.d.ts +1 -3
- package/esm/Modal.js +7 -5
- package/esm/PageItem.d.ts +5 -20
- package/esm/PageItem.js +11 -13
- package/esm/Pagination.d.ts +5 -20
- package/package.json +13 -9
package/cjs/DropdownMenu.d.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { UseDropdownMenuOptions } from '@restart/ui/DropdownMenu';
|
|
3
|
-
import { SelectCallback } from '@restart/ui/types';
|
|
4
3
|
import { DropDirection } from './DropdownContext';
|
|
5
4
|
import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
|
|
6
5
|
import { AlignType } from './types';
|
|
7
6
|
export declare type DropdownMenuVariant = 'dark' | string;
|
|
8
|
-
export interface DropdownMenuProps extends BsPrefixProps,
|
|
7
|
+
export interface DropdownMenuProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
|
|
9
8
|
show?: boolean;
|
|
10
9
|
renderOnMount?: boolean;
|
|
11
10
|
flip?: boolean;
|
|
12
11
|
align?: AlignType;
|
|
13
|
-
onSelect?: SelectCallback;
|
|
14
12
|
rootCloseEvent?: 'click' | 'mousedown';
|
|
15
13
|
popperConfig?: UseDropdownMenuOptions['popperConfig'];
|
|
16
14
|
variant?: DropdownMenuVariant;
|
package/cjs/Modal.js
CHANGED
|
@@ -90,6 +90,8 @@ const Modal = /*#__PURE__*/React.forwardRef(({
|
|
|
90
90
|
children,
|
|
91
91
|
dialogAs: Dialog,
|
|
92
92
|
'aria-labelledby': ariaLabelledby,
|
|
93
|
+
'aria-describedby': ariaDescribedby,
|
|
94
|
+
'aria-label': ariaLabel,
|
|
93
95
|
|
|
94
96
|
/* BaseModal props */
|
|
95
97
|
show,
|
|
@@ -211,7 +213,6 @@ const Modal = /*#__PURE__*/React.forwardRef(({
|
|
|
211
213
|
|
|
212
214
|
const handleEnter = (node, isAppearing) => {
|
|
213
215
|
if (node) {
|
|
214
|
-
node.style.display = 'block';
|
|
215
216
|
updateDialogStyle(node);
|
|
216
217
|
}
|
|
217
218
|
|
|
@@ -242,11 +243,10 @@ const Modal = /*#__PURE__*/React.forwardRef(({
|
|
|
242
243
|
}), [animation, backdropClassName, bsPrefix]);
|
|
243
244
|
const baseModalStyle = { ...style,
|
|
244
245
|
...modalStyle
|
|
245
|
-
}; //
|
|
246
|
+
}; // If `display` is not set to block, autoFocus inside the modal fails
|
|
247
|
+
// https://github.com/react-bootstrap/react-bootstrap/issues/5102
|
|
246
248
|
|
|
247
|
-
|
|
248
|
-
baseModalStyle.display = 'block';
|
|
249
|
-
}
|
|
249
|
+
baseModalStyle.display = 'block';
|
|
250
250
|
|
|
251
251
|
const renderDialog = dialogProps => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
252
252
|
role: "dialog",
|
|
@@ -255,7 +255,9 @@ const Modal = /*#__PURE__*/React.forwardRef(({
|
|
|
255
255
|
className: (0, _classnames.default)(className, bsPrefix, animateStaticModal && `${bsPrefix}-static`),
|
|
256
256
|
onClick: backdrop ? handleClick : undefined,
|
|
257
257
|
onMouseUp: handleMouseUp,
|
|
258
|
+
"aria-label": ariaLabel,
|
|
258
259
|
"aria-labelledby": ariaLabelledby,
|
|
260
|
+
"aria-describedby": ariaDescribedby,
|
|
259
261
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog, { ...props,
|
|
260
262
|
onMouseDown: handleDialogMouseDown,
|
|
261
263
|
className: dialogClassName,
|
package/cjs/PageItem.d.ts
CHANGED
|
@@ -8,23 +8,8 @@ export interface PageItemProps extends React.HTMLAttributes<HTMLElement>, BsPref
|
|
|
8
8
|
}
|
|
9
9
|
declare const PageItem: BsPrefixRefForwardingComponent<'li', PageItemProps>;
|
|
10
10
|
export default PageItem;
|
|
11
|
-
export declare const First:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare const
|
|
16
|
-
({ children, ...props }: PageItemProps): JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const Ellipsis: {
|
|
20
|
-
({ children, ...props }: PageItemProps): JSX.Element;
|
|
21
|
-
displayName: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const Next: {
|
|
24
|
-
({ children, ...props }: PageItemProps): JSX.Element;
|
|
25
|
-
displayName: string;
|
|
26
|
-
};
|
|
27
|
-
export declare const Last: {
|
|
28
|
-
({ children, ...props }: PageItemProps): JSX.Element;
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
11
|
+
export declare const First: React.ForwardRefExoticComponent<PageItemProps & React.RefAttributes<unknown>>;
|
|
12
|
+
export declare const Prev: React.ForwardRefExoticComponent<PageItemProps & React.RefAttributes<unknown>>;
|
|
13
|
+
export declare const Ellipsis: React.ForwardRefExoticComponent<PageItemProps & React.RefAttributes<unknown>>;
|
|
14
|
+
export declare const Next: React.ForwardRefExoticComponent<PageItemProps & React.RefAttributes<unknown>>;
|
|
15
|
+
export declare const Last: React.ForwardRefExoticComponent<PageItemProps & React.RefAttributes<unknown>>;
|
package/cjs/PageItem.js
CHANGED
|
@@ -57,21 +57,19 @@ var _default = PageItem;
|
|
|
57
57
|
exports.default = _default;
|
|
58
58
|
|
|
59
59
|
function createButton(name, defaultValue, label = name) {
|
|
60
|
-
|
|
60
|
+
const Button = /*#__PURE__*/React.forwardRef(({
|
|
61
61
|
children,
|
|
62
62
|
...props
|
|
63
|
-
}) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
63
|
+
}, ref) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(PageItem, { ...props,
|
|
64
|
+
ref: ref,
|
|
65
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
children: children || defaultValue
|
|
68
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
69
|
+
className: "visually-hidden",
|
|
70
|
+
children: label
|
|
71
|
+
})]
|
|
72
|
+
}));
|
|
75
73
|
Button.displayName = name;
|
|
76
74
|
return Button;
|
|
77
75
|
}
|
package/cjs/Pagination.d.ts
CHANGED
|
@@ -4,26 +4,11 @@ export interface PaginationProps extends BsPrefixProps, React.HTMLAttributes<HTM
|
|
|
4
4
|
size?: 'sm' | 'lg';
|
|
5
5
|
}
|
|
6
6
|
declare const _default: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLUListElement>> & {
|
|
7
|
-
First:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
Prev: {
|
|
12
|
-
({ children, ...props }: import("./PageItem").PageItemProps): JSX.Element;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
15
|
-
Ellipsis: {
|
|
16
|
-
({ children, ...props }: import("./PageItem").PageItemProps): JSX.Element;
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
7
|
+
First: React.ForwardRefExoticComponent<import("./PageItem").PageItemProps & React.RefAttributes<unknown>>;
|
|
8
|
+
Prev: React.ForwardRefExoticComponent<import("./PageItem").PageItemProps & React.RefAttributes<unknown>>;
|
|
9
|
+
Ellipsis: React.ForwardRefExoticComponent<import("./PageItem").PageItemProps & React.RefAttributes<unknown>>;
|
|
19
10
|
Item: import("./helpers").BsPrefixRefForwardingComponent<"li", import("./PageItem").PageItemProps>;
|
|
20
|
-
Next:
|
|
21
|
-
|
|
22
|
-
displayName: string;
|
|
23
|
-
};
|
|
24
|
-
Last: {
|
|
25
|
-
({ children, ...props }: import("./PageItem").PageItemProps): JSX.Element;
|
|
26
|
-
displayName: string;
|
|
27
|
-
};
|
|
11
|
+
Next: React.ForwardRefExoticComponent<import("./PageItem").PageItemProps & React.RefAttributes<unknown>>;
|
|
12
|
+
Last: React.ForwardRefExoticComponent<import("./PageItem").PageItemProps & React.RefAttributes<unknown>>;
|
|
28
13
|
};
|
|
29
14
|
export default _default;
|