react-bootstrap 2.2.2 → 2.3.1
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/Form.d.ts +13 -13
- package/cjs/Navbar.d.ts +1 -1
- package/cjs/Navbar.js +3 -2
- package/cjs/NavbarContext.d.ts +1 -0
- package/cjs/NavbarOffcanvas.d.ts +2 -1
- package/cjs/NavbarOffcanvas.js +56 -2
- package/cjs/PageItem.d.ts +5 -20
- package/cjs/PageItem.js +11 -13
- package/cjs/Pagination.d.ts +5 -20
- package/cjs/TransitionWrapper.d.ts +7 -1
- package/cjs/getTabTransitionComponent.js +3 -1
- package/dist/react-bootstrap.js +290 -35
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/Form.d.ts +13 -13
- package/esm/Navbar.d.ts +1 -1
- package/esm/Navbar.js +3 -2
- package/esm/NavbarContext.d.ts +1 -0
- package/esm/NavbarOffcanvas.d.ts +2 -1
- package/esm/NavbarOffcanvas.js +53 -2
- package/esm/PageItem.d.ts +5 -20
- package/esm/PageItem.js +11 -13
- package/esm/Pagination.d.ts +5 -20
- package/esm/TransitionWrapper.d.ts +7 -1
- package/esm/getTabTransitionComponent.js +2 -1
- package/package.json +8 -6
package/cjs/Form.d.ts
CHANGED
|
@@ -72,9 +72,9 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
|
|
|
72
72
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
73
73
|
is?: string | undefined;
|
|
74
74
|
'aria-activedescendant'?: string | undefined;
|
|
75
|
-
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
|
75
|
+
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
76
76
|
'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
|
|
77
|
-
'aria-busy'?: boolean | "true" | "false" | undefined;
|
|
77
|
+
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
78
78
|
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
79
79
|
'aria-colcount'?: number | undefined;
|
|
80
80
|
'aria-colindex'?: number | undefined;
|
|
@@ -83,36 +83,36 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
|
|
|
83
83
|
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
84
84
|
'aria-describedby'?: string | undefined;
|
|
85
85
|
'aria-details'?: string | undefined;
|
|
86
|
-
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
|
86
|
+
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
87
87
|
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
88
88
|
'aria-errormessage'?: string | undefined;
|
|
89
|
-
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
89
|
+
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
90
90
|
'aria-flowto'?: string | undefined;
|
|
91
|
-
'aria-grabbed'?: boolean | "true" | "false" | undefined;
|
|
91
|
+
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
|
|
92
92
|
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
93
|
-
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
|
93
|
+
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
94
94
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
95
95
|
'aria-keyshortcuts'?: string | undefined;
|
|
96
96
|
'aria-label'?: string | undefined;
|
|
97
97
|
'aria-labelledby'?: string | undefined;
|
|
98
98
|
'aria-level'?: number | undefined;
|
|
99
99
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
100
|
-
'aria-modal'?: boolean | "true" | "false" | undefined;
|
|
101
|
-
'aria-multiline'?: boolean | "true" | "false" | undefined;
|
|
102
|
-
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
|
|
100
|
+
'aria-modal'?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
'aria-multiline'?: (boolean | "true" | "false") | undefined;
|
|
102
|
+
'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
|
|
103
103
|
'aria-orientation'?: "horizontal" | "vertical" | undefined;
|
|
104
104
|
'aria-owns'?: string | undefined;
|
|
105
105
|
'aria-placeholder'?: string | undefined;
|
|
106
106
|
'aria-posinset'?: number | undefined;
|
|
107
107
|
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
108
|
-
'aria-readonly'?: boolean | "true" | "false" | undefined;
|
|
108
|
+
'aria-readonly'?: (boolean | "true" | "false") | undefined;
|
|
109
109
|
'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
110
|
-
'aria-required'?: boolean | "true" | "false" | undefined;
|
|
110
|
+
'aria-required'?: (boolean | "true" | "false") | undefined;
|
|
111
111
|
'aria-roledescription'?: string | undefined;
|
|
112
112
|
'aria-rowcount'?: number | undefined;
|
|
113
113
|
'aria-rowindex'?: number | undefined;
|
|
114
114
|
'aria-rowspan'?: number | undefined;
|
|
115
|
-
'aria-selected'?: boolean | "true" | "false" | undefined;
|
|
115
|
+
'aria-selected'?: (boolean | "true" | "false") | undefined;
|
|
116
116
|
'aria-setsize'?: number | undefined;
|
|
117
117
|
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
118
118
|
'aria-valuemax'?: number | undefined;
|
|
@@ -297,7 +297,7 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
|
|
|
297
297
|
autoComplete?: string | undefined;
|
|
298
298
|
alt?: string | undefined;
|
|
299
299
|
accept?: string | undefined;
|
|
300
|
-
capture?:
|
|
300
|
+
capture?: boolean | "user" | "environment" | undefined;
|
|
301
301
|
checked?: boolean | undefined;
|
|
302
302
|
maxLength?: number | undefined;
|
|
303
303
|
minLength?: number | undefined;
|
package/cjs/Navbar.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface NavbarProps extends BsPrefixProps, Omit<React.HTMLAttributes<HT
|
|
|
15
15
|
declare const _default: BsPrefixRefForwardingComponent<"nav", NavbarProps> & {
|
|
16
16
|
Brand: BsPrefixRefForwardingComponent<"a", import("./NavbarBrand").NavbarBrandProps>;
|
|
17
17
|
Collapse: React.ForwardRefExoticComponent<import("./NavbarCollapse").NavbarCollapseProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
Offcanvas: React.ForwardRefExoticComponent<Pick<import("./
|
|
18
|
+
Offcanvas: React.ForwardRefExoticComponent<Pick<import("./NavbarOffcanvas").NavbarOffcanvasProps, keyof import("./Offcanvas").OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
|
|
19
19
|
Text: BsPrefixRefForwardingComponent<"span", unknown>;
|
|
20
20
|
Toggle: BsPrefixRefForwardingComponent<"button", import("./NavbarToggle").NavbarToggleProps>;
|
|
21
21
|
};
|
package/cjs/Navbar.js
CHANGED
|
@@ -80,8 +80,9 @@ const Navbar = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
80
80
|
const navbarContext = (0, React.useMemo)(() => ({
|
|
81
81
|
onToggle: () => onToggle == null ? void 0 : onToggle(!expanded),
|
|
82
82
|
bsPrefix,
|
|
83
|
-
expanded: !!expanded
|
|
84
|
-
|
|
83
|
+
expanded: !!expanded,
|
|
84
|
+
expand
|
|
85
|
+
}), [bsPrefix, expanded, expand, onToggle]);
|
|
85
86
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavbarContext.default.Provider, {
|
|
86
87
|
value: navbarContext,
|
|
87
88
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectableContext.default.Provider, {
|
package/cjs/NavbarContext.d.ts
CHANGED
package/cjs/NavbarOffcanvas.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { OffcanvasProps } from './Offcanvas';
|
|
3
|
-
declare
|
|
3
|
+
export declare type NavbarOffcanvasProps = Omit<OffcanvasProps, 'show'>;
|
|
4
|
+
declare const NavbarOffcanvas: React.ForwardRefExoticComponent<Pick<NavbarOffcanvasProps, keyof OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
|
|
4
5
|
export default NavbarOffcanvas;
|
package/cjs/NavbarOffcanvas.js
CHANGED
|
@@ -7,6 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
+
var _useBreakpoint = _interopRequireDefault(require("@restart/hooks/useBreakpoint"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _ThemeProvider = require("./ThemeProvider");
|
|
15
|
+
|
|
10
16
|
var _Offcanvas = _interopRequireDefault(require("./Offcanvas"));
|
|
11
17
|
|
|
12
18
|
var _NavbarContext = _interopRequireDefault(require("./NavbarContext"));
|
|
@@ -17,11 +23,59 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
23
|
|
|
18
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
25
|
|
|
20
|
-
const NavbarOffcanvas = /*#__PURE__*/React.forwardRef((
|
|
26
|
+
const NavbarOffcanvas = /*#__PURE__*/React.forwardRef(({
|
|
27
|
+
className,
|
|
28
|
+
bsPrefix,
|
|
29
|
+
backdrop,
|
|
30
|
+
backdropClassName,
|
|
31
|
+
keyboard,
|
|
32
|
+
scroll,
|
|
33
|
+
placement,
|
|
34
|
+
autoFocus,
|
|
35
|
+
enforceFocus,
|
|
36
|
+
restoreFocus,
|
|
37
|
+
restoreFocusOptions,
|
|
38
|
+
onShow,
|
|
39
|
+
onHide,
|
|
40
|
+
onEscapeKeyDown,
|
|
41
|
+
onEnter,
|
|
42
|
+
onEntering,
|
|
43
|
+
onEntered,
|
|
44
|
+
onExit,
|
|
45
|
+
onExiting,
|
|
46
|
+
onExited,
|
|
47
|
+
...props
|
|
48
|
+
}, ref) => {
|
|
21
49
|
const context = (0, React.useContext)(_NavbarContext.default);
|
|
22
|
-
|
|
50
|
+
bsPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, 'offcanvas');
|
|
51
|
+
const hasExpandProp = typeof (context == null ? void 0 : context.expand) === 'string';
|
|
52
|
+
const shouldExpand = (0, _useBreakpoint.default)(hasExpandProp ? context.expand : 'xs', 'up');
|
|
53
|
+
return hasExpandProp && shouldExpand ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
54
|
+
ref: ref,
|
|
55
|
+
...props,
|
|
56
|
+
className: (0, _classnames.default)(className, bsPrefix, `${bsPrefix}-${placement}`)
|
|
57
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Offcanvas.default, {
|
|
23
58
|
ref: ref,
|
|
24
59
|
show: !!(context != null && context.expanded),
|
|
60
|
+
bsPrefix: bsPrefix,
|
|
61
|
+
backdrop: backdrop,
|
|
62
|
+
backdropClassName: backdropClassName,
|
|
63
|
+
keyboard: keyboard,
|
|
64
|
+
scroll: scroll,
|
|
65
|
+
placement: placement,
|
|
66
|
+
autoFocus: autoFocus,
|
|
67
|
+
enforceFocus: enforceFocus,
|
|
68
|
+
restoreFocus: restoreFocus,
|
|
69
|
+
restoreFocusOptions: restoreFocusOptions,
|
|
70
|
+
onShow: onShow,
|
|
71
|
+
onHide: onHide,
|
|
72
|
+
onEscapeKeyDown: onEscapeKeyDown,
|
|
73
|
+
onEnter: onEnter,
|
|
74
|
+
onEntering: onEntering,
|
|
75
|
+
onEntered: onEntered,
|
|
76
|
+
onExit: onExit,
|
|
77
|
+
onExiting: onExiting,
|
|
78
|
+
onExited: onExited,
|
|
25
79
|
...props
|
|
26
80
|
});
|
|
27
81
|
});
|
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;
|
|
@@ -4,5 +4,11 @@ export declare type TransitionWrapperProps = TransitionProps & {
|
|
|
4
4
|
childRef?: React.Ref<unknown>;
|
|
5
5
|
children: React.ReactElement | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
|
|
6
6
|
};
|
|
7
|
-
declare const TransitionWrapper: React.ForwardRefExoticComponent<Pick<
|
|
7
|
+
declare const TransitionWrapper: React.ForwardRefExoticComponent<(Pick<import("react-transition-group/Transition").TimeoutProps<undefined> & {
|
|
8
|
+
childRef?: React.Ref<unknown> | undefined;
|
|
9
|
+
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
|
|
10
|
+
}, keyof import("react-transition-group/Transition").TimeoutProps<undefined>> | Pick<import("react-transition-group/Transition").EndListenerProps<undefined> & {
|
|
11
|
+
childRef?: React.Ref<unknown> | undefined;
|
|
12
|
+
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
|
|
13
|
+
}, keyof import("react-transition-group/Transition").EndListenerProps<undefined>>) & React.RefAttributes<Transition<any>>>;
|
|
8
14
|
export default TransitionWrapper;
|
|
@@ -5,11 +5,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports.default = getTabTransitionComponent;
|
|
7
7
|
|
|
8
|
+
var _NoopTransition = _interopRequireDefault(require("@restart/ui/NoopTransition"));
|
|
9
|
+
|
|
8
10
|
var _Fade = _interopRequireDefault(require("./Fade"));
|
|
9
11
|
|
|
10
12
|
function getTabTransitionComponent(transition) {
|
|
11
13
|
if (typeof transition === 'boolean') {
|
|
12
|
-
return transition ? _Fade.default :
|
|
14
|
+
return transition ? _Fade.default : _NoopTransition.default;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
return transition;
|