react-bootstrap 2.3.1 → 2.5.0-beta.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/Col.js +2 -1
- package/cjs/Dropdown.d.ts +0 -1
- package/cjs/DropdownButton.d.ts +1 -0
- package/cjs/DropdownButton.js +9 -0
- package/cjs/Form.d.ts +1 -0
- package/cjs/FormCheck.d.ts +1 -0
- package/cjs/FormCheck.js +2 -1
- package/cjs/NavbarOffcanvas.js +2 -56
- package/cjs/Offcanvas.d.ts +1 -0
- package/cjs/Offcanvas.js +41 -31
- package/cjs/Overlay.d.ts +2 -7
- package/cjs/Overlay.js +18 -1
- package/cjs/OverlayTrigger.d.ts +2 -0
- package/cjs/Popover.d.ts +2 -2
- package/cjs/Row.js +2 -1
- package/cjs/SplitButton.d.ts +1 -0
- package/cjs/SplitButton.js +9 -0
- package/cjs/Stack.js +3 -1
- package/cjs/Table.d.ts +1 -1
- package/cjs/Table.js +1 -1
- package/cjs/Tabs.d.ts +10 -2
- package/cjs/ThemeProvider.d.ts +4 -1
- package/cjs/ThemeProvider.js +16 -3
- package/cjs/ToastContainer.d.ts +1 -0
- package/cjs/ToastContainer.js +2 -1
- package/cjs/ToggleButtonGroup.js +1 -1
- package/cjs/Tooltip.d.ts +2 -2
- package/cjs/createUtilityClasses.d.ts +1 -1
- package/cjs/createUtilityClasses.js +2 -2
- package/cjs/types.d.ts +7 -0
- package/dist/react-bootstrap.js +574 -306
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/Col.js +3 -2
- package/esm/Dropdown.d.ts +0 -1
- package/esm/DropdownButton.d.ts +1 -0
- package/esm/DropdownButton.js +9 -0
- package/esm/Form.d.ts +1 -0
- package/esm/FormCheck.d.ts +1 -0
- package/esm/FormCheck.js +2 -1
- package/esm/NavbarOffcanvas.js +2 -53
- package/esm/Offcanvas.d.ts +1 -0
- package/esm/Offcanvas.js +43 -32
- package/esm/Overlay.d.ts +2 -7
- package/esm/Overlay.js +15 -1
- package/esm/OverlayTrigger.d.ts +2 -0
- package/esm/Popover.d.ts +2 -2
- package/esm/Row.js +3 -2
- package/esm/SplitButton.d.ts +1 -0
- package/esm/SplitButton.js +9 -0
- package/esm/Stack.js +4 -2
- package/esm/Table.d.ts +1 -1
- package/esm/Table.js +1 -1
- package/esm/Tabs.d.ts +10 -2
- package/esm/ThemeProvider.d.ts +4 -1
- package/esm/ThemeProvider.js +12 -2
- package/esm/ToastContainer.d.ts +1 -0
- package/esm/ToastContainer.js +2 -1
- package/esm/ToggleButtonGroup.js +1 -1
- package/esm/Tooltip.d.ts +2 -2
- package/esm/createUtilityClasses.d.ts +1 -1
- package/esm/createUtilityClasses.js +3 -3
- package/esm/types.d.ts +7 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { DEFAULT_BREAKPOINTS } from './ThemeProvider';
|
|
2
|
+
import { DEFAULT_BREAKPOINTS, DEFAULT_MIN_BREAKPOINT } from './ThemeProvider';
|
|
3
3
|
export function responsivePropType(propType) {
|
|
4
4
|
return PropTypes.oneOfType([propType, PropTypes.shape({
|
|
5
5
|
xs: propType,
|
|
@@ -10,7 +10,7 @@ export function responsivePropType(propType) {
|
|
|
10
10
|
xxl: propType
|
|
11
11
|
})]);
|
|
12
12
|
}
|
|
13
|
-
export default function createUtilityClassName(utilityValues, breakpoints = DEFAULT_BREAKPOINTS) {
|
|
13
|
+
export default function createUtilityClassName(utilityValues, breakpoints = DEFAULT_BREAKPOINTS, minBreakpoint = DEFAULT_MIN_BREAKPOINT) {
|
|
14
14
|
const classes = [];
|
|
15
15
|
Object.entries(utilityValues).forEach(([utilName, utilValue]) => {
|
|
16
16
|
if (utilValue != null) {
|
|
@@ -19,7 +19,7 @@ export default function createUtilityClassName(utilityValues, breakpoints = DEFA
|
|
|
19
19
|
const bpValue = utilValue[brkPoint];
|
|
20
20
|
|
|
21
21
|
if (bpValue != null) {
|
|
22
|
-
const infix = brkPoint !==
|
|
22
|
+
const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';
|
|
23
23
|
classes.push(`${utilName}${infix}-${bpValue}`);
|
|
24
24
|
}
|
|
25
25
|
});
|
package/esm/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import { State } from '@restart/ui/usePopper';
|
|
2
3
|
export declare type Variant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string;
|
|
3
4
|
export declare type ButtonVariant = Variant | 'link' | 'outline-primary' | 'outline-secondary' | 'outline-success' | 'outline-danger' | 'outline-warning' | 'outline-info' | 'outline-dark' | 'outline-light';
|
|
4
5
|
export declare type Color = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'white' | 'muted';
|
|
@@ -19,3 +20,9 @@ export declare type AlignType = AlignDirection | ResponsiveAlignProp;
|
|
|
19
20
|
export declare const alignPropType: PropTypes.Requireable<object | AlignDirection>;
|
|
20
21
|
export declare type RootCloseEvent = 'click' | 'mousedown';
|
|
21
22
|
export declare type GapValue = 0 | 1 | 2 | 3 | 4 | 5;
|
|
23
|
+
export interface PopperRef {
|
|
24
|
+
state: State | undefined;
|
|
25
|
+
outOfBoundaries: boolean;
|
|
26
|
+
placement: Placement | undefined;
|
|
27
|
+
scheduleUpdate?: () => void;
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-bootstrap",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0-beta.1",
|
|
4
4
|
"description": "Bootstrap 5 components built with React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bootstrap",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@babel/runtime": "^7.17.2",
|
|
39
39
|
"@restart/hooks": "^0.4.6",
|
|
40
|
-
"@restart/ui": "^1.
|
|
40
|
+
"@restart/ui": "^1.3.0",
|
|
41
41
|
"@types/react-transition-group": "^4.4.4",
|
|
42
42
|
"classnames": "^2.3.1",
|
|
43
43
|
"dom-helpers": "^5.2.1",
|