Socket
Socket
Sign inDemoInstall

react-bootstrap

Package Overview
Dependencies
Maintainers
3
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bootstrap - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

26

cjs/Form.d.ts

@@ -75,5 +75,5 @@ import * as React from 'react';

'aria-activedescendant'?: string | undefined;
'aria-atomic'?: boolean | "true" | "false" | undefined;
'aria-atomic'?: (boolean | "true" | "false") | undefined;
'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
'aria-busy'?: boolean | "true" | "false" | undefined;
'aria-busy'?: (boolean | "true" | "false") | undefined;
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;

@@ -87,10 +87,10 @@ 'aria-colcount'?: number | undefined;

'aria-details'?: string | undefined;
'aria-disabled'?: boolean | "true" | "false" | undefined;
'aria-disabled'?: (boolean | "true" | "false") | undefined;
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
'aria-errormessage'?: string | undefined;
'aria-expanded'?: boolean | "true" | "false" | undefined;
'aria-expanded'?: (boolean | "true" | "false") | undefined;
'aria-flowto'?: string | undefined;
'aria-grabbed'?: boolean | "true" | "false" | undefined;
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
'aria-hidden'?: boolean | "true" | "false" | undefined;
'aria-hidden'?: (boolean | "true" | "false") | undefined;
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;

@@ -102,5 +102,5 @@ 'aria-keyshortcuts'?: string | undefined;

'aria-live'?: "off" | "assertive" | "polite" | undefined;
'aria-modal'?: boolean | "true" | "false" | undefined;
'aria-multiline'?: boolean | "true" | "false" | undefined;
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
'aria-modal'?: (boolean | "true" | "false") | undefined;
'aria-multiline'?: (boolean | "true" | "false") | undefined;
'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
'aria-orientation'?: "horizontal" | "vertical" | undefined;

@@ -111,5 +111,5 @@ 'aria-owns'?: string | undefined;

'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-readonly'?: boolean | "true" | "false" | undefined;
'aria-readonly'?: (boolean | "true" | "false") | undefined;
'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
'aria-required'?: boolean | "true" | "false" | undefined;
'aria-required'?: (boolean | "true" | "false") | undefined;
'aria-roledescription'?: string | undefined;

@@ -119,3 +119,3 @@ 'aria-rowcount'?: number | undefined;

'aria-rowspan'?: number | undefined;
'aria-selected'?: boolean | "true" | "false" | undefined;
'aria-selected'?: (boolean | "true" | "false") | undefined;
'aria-setsize'?: number | undefined;

@@ -305,3 +305,3 @@ 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;

accept?: string | undefined;
capture?: string | boolean | undefined;
capture?: boolean | "user" | "environment" | undefined;
checked?: boolean | undefined;

@@ -308,0 +308,0 @@ maxLength?: number | undefined;

@@ -8,2 +8,4 @@ "use strict";

var _NoopTransition = _interopRequireDefault(require("@restart/ui/NoopTransition"));
var _Fade = _interopRequireDefault(require("./Fade"));

@@ -13,3 +15,3 @@

if (typeof transition === 'boolean') {
return transition ? _Fade.default : undefined;
return transition ? _Fade.default : _NoopTransition.default;
}

@@ -16,0 +18,0 @@

@@ -18,3 +18,3 @@ import * as React from 'react';

Collapse: React.ForwardRefExoticComponent<import("./NavbarCollapse").NavbarCollapseProps & React.RefAttributes<HTMLDivElement>>;
Offcanvas: React.ForwardRefExoticComponent<Pick<import("./Offcanvas").OffcanvasProps, keyof import("./Offcanvas").OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
Offcanvas: React.ForwardRefExoticComponent<Pick<import("./NavbarOffcanvas").NavbarOffcanvasProps, keyof import("./Offcanvas").OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
Text: BsPrefixRefForwardingComponent<"span", unknown>;

@@ -21,0 +21,0 @@ Toggle: BsPrefixRefForwardingComponent<"button", import("./NavbarToggle").NavbarToggleProps>;

@@ -83,4 +83,5 @@ "use strict";

bsPrefix,
expanded: !!expanded
}), [bsPrefix, expanded, onToggle]);
expanded: !!expanded,
expand
}), [bsPrefix, expanded, expand, onToggle]);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavbarContext.default.Provider, {

@@ -87,0 +88,0 @@ value: navbarContext,

@@ -6,4 +6,5 @@ import * as React from 'react';

expanded: boolean;
expand?: boolean | string | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
}
declare const context: React.Context<NavbarContextType | null>;
export default context;
import * as React from 'react';
import { OffcanvasProps } from './Offcanvas';
declare const NavbarOffcanvas: React.ForwardRefExoticComponent<Pick<OffcanvasProps, keyof OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
export declare type NavbarOffcanvasProps = Omit<OffcanvasProps, 'show'>;
declare const NavbarOffcanvas: React.ForwardRefExoticComponent<Pick<NavbarOffcanvasProps, keyof OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
export default NavbarOffcanvas;

@@ -10,2 +10,8 @@ "use strict";

var _useBreakpoint = _interopRequireDefault(require("@restart/hooks/useBreakpoint"));
var _classnames = _interopRequireDefault(require("classnames"));
var _ThemeProvider = require("./ThemeProvider");
var _Offcanvas = _interopRequireDefault(require("./Offcanvas"));

@@ -21,7 +27,55 @@

const NavbarOffcanvas = /*#__PURE__*/React.forwardRef((props, ref) => {
const NavbarOffcanvas = /*#__PURE__*/React.forwardRef(({
className,
bsPrefix,
backdrop,
backdropClassName,
keyboard,
scroll,
placement,
autoFocus,
enforceFocus,
restoreFocus,
restoreFocusOptions,
onShow,
onHide,
onEscapeKeyDown,
onEnter,
onEntering,
onEntered,
onExit,
onExiting,
onExited,
...props
}, ref) => {
const context = (0, React.useContext)(_NavbarContext.default);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Offcanvas.default, {
bsPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, 'offcanvas');
const hasExpandProp = typeof (context == null ? void 0 : context.expand) === 'string';
const shouldExpand = (0, _useBreakpoint.default)(hasExpandProp ? context.expand : 'xs', 'up');
return hasExpandProp && shouldExpand ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
ref: ref,
...props,
className: (0, _classnames.default)(className, bsPrefix, `${bsPrefix}-${placement}`)
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Offcanvas.default, {
ref: ref,
show: !!(context != null && context.expanded),
bsPrefix: bsPrefix,
backdrop: backdrop,
backdropClassName: backdropClassName,
keyboard: keyboard,
scroll: scroll,
placement: placement,
autoFocus: autoFocus,
enforceFocus: enforceFocus,
restoreFocus: restoreFocus,
restoreFocusOptions: restoreFocusOptions,
onShow: onShow,
onHide: onHide,
onEscapeKeyDown: onEscapeKeyDown,
onEnter: onEnter,
onEntering: onEntering,
onEntered: onEntered,
onExit: onExit,
onExiting: onExiting,
onExited: onExited,
...props

@@ -28,0 +82,0 @@ });

@@ -7,3 +7,9 @@ import React from 'react';

};
declare const TransitionWrapper: React.ForwardRefExoticComponent<Pick<TransitionWrapperProps, string | number> & React.RefAttributes<Transition<any>>>;
declare const TransitionWrapper: React.ForwardRefExoticComponent<(Pick<import("react-transition-group/Transition").TimeoutProps<undefined> & {
childRef?: React.Ref<unknown> | undefined;
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
}, keyof import("react-transition-group/Transition").TimeoutProps<undefined>> | Pick<import("react-transition-group/Transition").EndListenerProps<undefined> & {
childRef?: React.Ref<unknown> | undefined;
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
}, keyof import("react-transition-group/Transition").EndListenerProps<undefined>>) & React.RefAttributes<Transition<any>>>;
export default TransitionWrapper;

@@ -75,5 +75,5 @@ import * as React from 'react';

'aria-activedescendant'?: string | undefined;
'aria-atomic'?: boolean | "true" | "false" | undefined;
'aria-atomic'?: (boolean | "true" | "false") | undefined;
'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
'aria-busy'?: boolean | "true" | "false" | undefined;
'aria-busy'?: (boolean | "true" | "false") | undefined;
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;

@@ -87,10 +87,10 @@ 'aria-colcount'?: number | undefined;

'aria-details'?: string | undefined;
'aria-disabled'?: boolean | "true" | "false" | undefined;
'aria-disabled'?: (boolean | "true" | "false") | undefined;
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
'aria-errormessage'?: string | undefined;
'aria-expanded'?: boolean | "true" | "false" | undefined;
'aria-expanded'?: (boolean | "true" | "false") | undefined;
'aria-flowto'?: string | undefined;
'aria-grabbed'?: boolean | "true" | "false" | undefined;
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
'aria-hidden'?: boolean | "true" | "false" | undefined;
'aria-hidden'?: (boolean | "true" | "false") | undefined;
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;

@@ -102,5 +102,5 @@ 'aria-keyshortcuts'?: string | undefined;

'aria-live'?: "off" | "assertive" | "polite" | undefined;
'aria-modal'?: boolean | "true" | "false" | undefined;
'aria-multiline'?: boolean | "true" | "false" | undefined;
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
'aria-modal'?: (boolean | "true" | "false") | undefined;
'aria-multiline'?: (boolean | "true" | "false") | undefined;
'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
'aria-orientation'?: "horizontal" | "vertical" | undefined;

@@ -111,5 +111,5 @@ 'aria-owns'?: string | undefined;

'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
'aria-readonly'?: boolean | "true" | "false" | undefined;
'aria-readonly'?: (boolean | "true" | "false") | undefined;
'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
'aria-required'?: boolean | "true" | "false" | undefined;
'aria-required'?: (boolean | "true" | "false") | undefined;
'aria-roledescription'?: string | undefined;

@@ -119,3 +119,3 @@ 'aria-rowcount'?: number | undefined;

'aria-rowspan'?: number | undefined;
'aria-selected'?: boolean | "true" | "false" | undefined;
'aria-selected'?: (boolean | "true" | "false") | undefined;
'aria-setsize'?: number | undefined;

@@ -305,3 +305,3 @@ 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;

accept?: string | undefined;
capture?: string | boolean | undefined;
capture?: boolean | "user" | "environment" | undefined;
checked?: boolean | undefined;

@@ -308,0 +308,0 @@ maxLength?: number | undefined;

@@ -0,5 +1,6 @@

import NoopTransition from '@restart/ui/NoopTransition';
import Fade from './Fade';
export default function getTabTransitionComponent(transition) {
if (typeof transition === 'boolean') {
return transition ? Fade : undefined;
return transition ? Fade : NoopTransition;
}

@@ -6,0 +7,0 @@

@@ -18,3 +18,3 @@ import * as React from 'react';

Collapse: React.ForwardRefExoticComponent<import("./NavbarCollapse").NavbarCollapseProps & React.RefAttributes<HTMLDivElement>>;
Offcanvas: React.ForwardRefExoticComponent<Pick<import("./Offcanvas").OffcanvasProps, keyof import("./Offcanvas").OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
Offcanvas: React.ForwardRefExoticComponent<Pick<import("./NavbarOffcanvas").NavbarOffcanvasProps, keyof import("./Offcanvas").OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
Text: BsPrefixRefForwardingComponent<"span", unknown>;

@@ -21,0 +21,0 @@ Toggle: BsPrefixRefForwardingComponent<"button", import("./NavbarToggle").NavbarToggleProps>;

@@ -61,4 +61,5 @@ import classNames from 'classnames';

bsPrefix,
expanded: !!expanded
}), [bsPrefix, expanded, onToggle]);
expanded: !!expanded,
expand
}), [bsPrefix, expanded, expand, onToggle]);
return /*#__PURE__*/_jsx(NavbarContext.Provider, {

@@ -65,0 +66,0 @@ value: navbarContext,

@@ -6,4 +6,5 @@ import * as React from 'react';

expanded: boolean;
expand?: boolean | string | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
}
declare const context: React.Context<NavbarContextType | null>;
export default context;
import * as React from 'react';
import { OffcanvasProps } from './Offcanvas';
declare const NavbarOffcanvas: React.ForwardRefExoticComponent<Pick<OffcanvasProps, keyof OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
export declare type NavbarOffcanvasProps = Omit<OffcanvasProps, 'show'>;
declare const NavbarOffcanvas: React.ForwardRefExoticComponent<Pick<NavbarOffcanvasProps, keyof OffcanvasProps> & React.RefAttributes<HTMLDivElement>>;
export default NavbarOffcanvas;
import * as React from 'react';
import { useContext } from 'react';
import useBreakpoint from '@restart/hooks/useBreakpoint';
import classNames from 'classnames';
import { useBootstrapPrefix } from './ThemeProvider';
import Offcanvas from './Offcanvas';
import NavbarContext from './NavbarContext';
import { jsx as _jsx } from "react/jsx-runtime";
const NavbarOffcanvas = /*#__PURE__*/React.forwardRef((props, ref) => {
const NavbarOffcanvas = /*#__PURE__*/React.forwardRef(({
className,
bsPrefix,
backdrop,
backdropClassName,
keyboard,
scroll,
placement,
autoFocus,
enforceFocus,
restoreFocus,
restoreFocusOptions,
onShow,
onHide,
onEscapeKeyDown,
onEnter,
onEntering,
onEntered,
onExit,
onExiting,
onExited,
...props
}, ref) => {
const context = useContext(NavbarContext);
return /*#__PURE__*/_jsx(Offcanvas, {
bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas');
const hasExpandProp = typeof (context == null ? void 0 : context.expand) === 'string';
const shouldExpand = useBreakpoint(hasExpandProp ? context.expand : 'xs', 'up');
return hasExpandProp && shouldExpand ? /*#__PURE__*/_jsx("div", {
ref: ref,
...props,
className: classNames(className, bsPrefix, `${bsPrefix}-${placement}`)
}) : /*#__PURE__*/_jsx(Offcanvas, {
ref: ref,
show: !!(context != null && context.expanded),
bsPrefix: bsPrefix,
backdrop: backdrop,
backdropClassName: backdropClassName,
keyboard: keyboard,
scroll: scroll,
placement: placement,
autoFocus: autoFocus,
enforceFocus: enforceFocus,
restoreFocus: restoreFocus,
restoreFocusOptions: restoreFocusOptions,
onShow: onShow,
onHide: onHide,
onEscapeKeyDown: onEscapeKeyDown,
onEnter: onEnter,
onEntering: onEntering,
onEntered: onEntered,
onExit: onExit,
onExiting: onExiting,
onExited: onExited,
...props

@@ -12,0 +63,0 @@ });

@@ -7,3 +7,9 @@ import React from 'react';

};
declare const TransitionWrapper: React.ForwardRefExoticComponent<Pick<TransitionWrapperProps, string | number> & React.RefAttributes<Transition<any>>>;
declare const TransitionWrapper: React.ForwardRefExoticComponent<(Pick<import("react-transition-group/Transition").TimeoutProps<undefined> & {
childRef?: React.Ref<unknown> | undefined;
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
}, keyof import("react-transition-group/Transition").TimeoutProps<undefined>> | Pick<import("react-transition-group/Transition").EndListenerProps<undefined> & {
childRef?: React.Ref<unknown> | undefined;
children: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
}, keyof import("react-transition-group/Transition").EndListenerProps<undefined>>) & React.RefAttributes<Transition<any>>>;
export default TransitionWrapper;
{
"name": "react-bootstrap",
"version": "2.3.0",
"version": "2.3.1",
"description": "Bootstrap 5 components built with React",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc