New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-overlays

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-overlays - npm Package Compare versions

Comparing version 0.8.5 to 1.1.0

react-overlays/lib/Dropdown.d.ts

71

react-overlays/index.d.ts

@@ -1,19 +0,22 @@

// Type definitions for React Overlays 0.8
// Type definitions for React Overlays 1.1
// Project: https://github.com/react-bootstrap/react-overlays
// Definitions by: Aaron Beall <https://github.com/aaronbeall>
// Vito Samson <https://github.com/vitosamson>
// Aaron Dancer <https://github.com/aarondancer>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from "react";
export {
Affix,
AutoAffix,
Modal,
ModalManager,
Overlay,
Portal,
Position,
RootCloseWrapper,
Affix,
AutoAffix,
Modal,
ModalManager,
Overlay,
Portal,
Dropdown,
DropdownMenu,
DropdownToggle,
RootCloseWrapper,
WaitForContainer
} from './lib';

@@ -23,31 +26,31 @@

export interface TransitionCallbacks {
/**
* Callback fired before the Overlay transitions in
*/
onEnter?(node: HTMLElement): any;
/**
* Callback fired before the Overlay transitions in
*/
onEnter?(node: HTMLElement): any;
/**
* Callback fired as the Overlay begins to transition in
*/
onEntering?(node: HTMLElement): any;
/**
* Callback fired as the Overlay begins to transition in
*/
onEntering?(node: HTMLElement): any;
/**
* Callback fired after the Overlay finishes transitioning in
*/
onEntered?(node: HTMLElement): any;
/**
* Callback fired after the Overlay finishes transitioning in
*/
onEntered?(node: HTMLElement): any;
/**
* Callback fired right before the Overlay transitions out
*/
onExit?(node: HTMLElement): any;
/**
* Callback fired right before the Overlay transitions out
*/
onExit?(node: HTMLElement): any;
/**
* Callback fired as the Overlay begins to transition out
*/
onExiting?(node: HTMLElement): any;
/**
* Callback fired as the Overlay begins to transition out
*/
onExiting?(node: HTMLElement): any;
/**
* Callback fired after the Overlay finishes transitioning out
*/
onExited?(node: HTMLElement): any;
/**
* Callback fired after the Overlay finishes transitioning out
*/
onExited?(node: HTMLElement): any;
}

@@ -1,84 +0,84 @@

import * as React from 'react';
import * as React from "react";
declare class Affix extends React.Component<Affix.AffixProps> { }
declare class Affix extends React.Component<Affix.AffixProps> {}
export = Affix;
declare namespace Affix {
// put AffixProps inside the exported namespace so it's importable in AutoAffix
interface AffixProps {
/**
* Pixels to offset from top of screen when calculating position
*/
offsetTop?: number;
// put AffixProps inside the exported namespace so it's importable in AutoAffix
interface AffixProps {
/**
* Pixels to offset from top of screen when calculating position
*/
offsetTop?: number;
/**
* When affixed, pixels to offset from top of viewport
*/
viewportOffsetTop?: number;
/**
* When affixed, pixels to offset from top of viewport
*/
viewportOffsetTop?: number;
/**
* Pixels to offset from bottom of screen when calculating position
*/
offsetBottom?: number;
/**
* Pixels to offset from bottom of screen when calculating position
*/
offsetBottom?: number;
/**
* CSS class or classes to apply when at top
*/
topClassName?: string;
/**
* CSS class or classes to apply when at top
*/
topClassName?: string;
/**
* Style to apply when at top
*/
topStyle?: React.CSSProperties;
/**
* Style to apply when at top
*/
topStyle?: React.CSSProperties;
/**
* CSS class or classes to apply when affixed
*/
affixClassName?: string;
/**
* CSS class or classes to apply when affixed
*/
affixClassName?: string;
/**
* Style to apply when affixed
*/
affixStyle?: React.CSSProperties;
/**
* Style to apply when affixed
*/
affixStyle?: React.CSSProperties;
/**
* CSS class or classes to apply when at bottom
*/
bottomClassName?: string;
/**
* CSS class or classes to apply when at bottom
*/
bottomClassName?: string;
/**
* Style to apply when at bottom
*/
bottomStyle?: React.CSSProperties;
/**
* Style to apply when at bottom
*/
bottomStyle?: React.CSSProperties;
/**
* Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered
*/
onAffix?(): void;
/**
* Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered
*/
onAffix?(): void;
/**
* Callback fired after the component `affixStyle` and `affixClassName` props have been rendered.
*/
onAffixed?(): void;
/**
* Callback fired after the component `affixStyle` and `affixClassName` props have been rendered.
*/
onAffixed?(): void;
/**
* Callback fired when the right before the `topStyle` and `topClassName` props are rendered
*/
onAffixTop?(): void;
/**
* Callback fired when the right before the `topStyle` and `topClassName` props are rendered
*/
onAffixTop?(): void;
/**
* Callback fired after the component `topStyle` and `topClassName` props have been rendered.
*/
onAffixedTop?(): void;
/**
* Callback fired after the component `topStyle` and `topClassName` props have been rendered.
*/
onAffixedTop?(): void;
/**
* Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered
*/
onAffixBottom?(): void;
/**
* Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered
*/
onAffixBottom?(): void;
/**
* Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered.
*/
onAffixedBottom?(): void;
}
/**
* Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered.
*/
onAffixedBottom?(): void;
}
}

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

import * as React from 'react';
import { AffixProps } from './Affix';
import * as React from "react";
declare class AutoAffix extends React.Component<AutoAffixProps> { }
declare namespace AutoAffix { }
import { AffixProps } from "./Affix";
declare class AutoAffix extends React.Component<AutoAffixProps> {}
declare namespace AutoAffix {}
export = AutoAffix;

@@ -7,0 +8,0 @@

@@ -1,19 +0,25 @@

import Affix = require('./Affix');
import AutoAffix = require('./AutoAffix');
import Modal = require('./Modal');
import ModalManager = require('./ModalManager');
import Overlay = require('./Overlay');
import Portal = require('./Portal');
import Position = require('./Position');
import RootCloseWrapper = require('./RootCloseWrapper');
import Affix = require("./Affix");
import AutoAffix = require("./AutoAffix");
import Dropdown = require("./Dropdown");
import DropdownMenu = require("./DropdownMenu");
import DropdownToggle = require("./DropdownToggle");
import Modal = require("./Modal");
import ModalManager = require("./ModalManager");
import Overlay = require("./Overlay");
import Portal = require("./Portal");
import RootCloseWrapper = require("./RootCloseWrapper");
import WaitForContainer = require("./WaitForContainer");
export {
Affix,
AutoAffix,
Modal,
ModalManager,
Overlay,
Portal,
Position,
RootCloseWrapper,
Affix,
AutoAffix,
Dropdown,
DropdownMenu,
DropdownToggle,
Modal,
ModalManager,
Overlay,
Portal,
RootCloseWrapper,
WaitForContainer
};

@@ -1,129 +0,131 @@

import * as React from 'react';
import { TransitionCallbacks } from 'react-overlays';
import { TransitionProps } from 'react-transition-group/Transition';
import * as ModalManager from './ModalManager';
import { PortalProps } from './Portal';
import * as React from "react";
import { TransitionCallbacks } from "react-overlays";
import { TransitionProps } from "react-transition-group/Transition";
import * as ModalManager from "./ModalManager";
import { PortalProps } from "./Portal";
declare class Modal extends React.Component<ModalProps> {
public static Manager: ModalManager;
public static Manager: ModalManager;
}
declare namespace Modal { }
declare namespace Modal {}
export = Modal;
interface ModalProps extends TransitionCallbacks, PortalProps {
className?: string;
className?: string;
/**
* Set the visibility of the Modal
*/
show?: boolean;
/**
* Set the visibility of the Modal
*/
show?: boolean;
/**
* A Node, Component instance, or function that returns either. The Modal is appended to it's container element.
*
* For the sake of assistive technologies, the container should usually be the document body, so that the rest of the
* page content can be placed behind a virtual backdrop as well as a visual one.
*/
container?: React.ReactNode | Function;
/**
* A Node, Component instance, or function that returns either. The Modal is appended to it's container element.
*
* For the sake of assistive technologies, the container should usually be the document body, so that the rest of the
* page content can be placed behind a virtual backdrop as well as a visual one.
*/
container?: React.ReactNode | Function;
/**
* A callback fired when the Modal is opening.
*/
onShow?: Function;
/**
* A callback fired when the Modal is opening.
*/
onShow?: Function;
/**
* A callback fired when either the backdrop is clicked, or the escape key is pressed.
*
* The `onHide` callback only signals intent from the Modal,
* you must actually set the `show` prop to `false` for the Modal to close.
*/
onHide?: Function;
/**
* A callback fired when either the backdrop is clicked, or the escape key is pressed.
*
* The `onHide` callback only signals intent from the Modal,
* you must actually set the `show` prop to `false` for the Modal to close.
*/
onHide?: Function;
/**
* Include a backdrop component.
*/
backdrop?: boolean | 'static';
/**
* Include a backdrop component.
*/
backdrop?: boolean | 'static';
/**
* A function that returns a backdrop component. Useful for custom
* backdrop rendering.
*
* ```js
* renderBackdrop={props => <MyBackdrop {...props} />}
* ```
*/
renderBackdrop?(props: any): React.ReactNode;
/**
* A function that returns the dialog component. Useful for custom
* rendering. **Note:** the component should make sure to apply the provided ref.
*
* ```js
* renderDialog={props => <MyDialog {...props} />}
* ```
*/
renderDialog?(props: any): React.ReactNode;
/**
* A callback fired when the escape key, if specified in `keyboard`, is pressed.
*/
onEscapeKeyUp?: Function;
/**
* A function that returns a backdrop component. Useful for custom
* backdrop rendering.
*
* ```js
* renderBackdrop={props => <MyBackdrop {...props} />}
* ```
*/
renderBackdrop?(props: any): React.ReactNode;
/**
* A callback fired when the backdrop, if specified, is clicked.
*/
onBackdropClick?: Function;
/**
* A callback fired when the escape key, if specified in `keyboard`, is pressed.
*/
onEscapeKeyDown?: Function;
/**
* A style object for the backdrop component.
*/
backdropStyle?: Object;
/**
* A callback fired when the backdrop, if specified, is clicked.
*/
onBackdropClick?: Function;
/**
* A css class or classes for the backdrop component.
*/
backdropClassName?: string;
/**
* A css class or set of classes applied to the modal container when the modal is open,
* and removed when it is closed.
*/
containerClassName?: string;
/**
* A css class or set of classes applied to the modal container when the modal is open,
* and removed when it is closed.
*/
containerClassName?: string;
/**
* Close the modal when escape key is pressed
*/
keyboard?: boolean;
/**
* Close the modal when escape key is pressed
*/
keyboard?: boolean;
/**
* A `react-transition-group@2.0.0` `<Transition/>` component used
* to control animations for the dialog component.
*/
transition?: React.ComponentType<TransitionProps>;
/**
* A `react-transition-group@2.0.0` `<Transition/>` component used
* to control animations for the dialog component.
*/
transition?: React.ComponentType<TransitionProps>;
/**
* A `react-transition-group@2.0.0` `<Transition/>` component used
* to control animations for the backdrop components.
*/
backdropTransition?: React.ComponentType<TransitionProps>;
/**
* A `react-transition-group@2.0.0` `<Transition/>` component used
* to control animations for the backdrop components.
*/
backdropTransition?: React.ComponentType<TransitionProps>;
/**
* When `true` The modal will automatically shift focus to itself when it opens, and
* replace it to the last focused element when it closes. This also
* works correctly with any Modal children that have the `autoFocus` prop.
*
* Generally this should never be set to `false` as it makes the Modal less
* accessible to assistive technologies, like screen readers.
*/
autoFocus?: boolean;
/**
* When `true` The modal will automatically shift focus to itself when it opens, and
* replace it to the last focused element when it closes. This also
* works correctly with any Modal children that have the `autoFocus` prop.
*
* Generally this should never be set to `false` as it makes the Modal less
* accessible to assistive technologies, like screen readers.
*/
autoFocus?: boolean;
/**
* When `true` The modal will prevent focus from leaving the Modal while open.
*
* Generally this should never be set to `false` as it makes the Modal less
* accessible to assistive technologies, like screen readers.
*/
enforceFocus?: boolean;
/**
* When `true` The modal will prevent focus from leaving the Modal while open.
*
* Generally this should never be set to `false` as it makes the Modal less
* accessible to assistive technologies, like screen readers.
*/
enforceFocus?: boolean;
/**
* When `true` The modal will restore focus to previously focused element once
* modal is hidden
*/
restoreFocus?: boolean;
/**
* When `true` The modal will restore focus to previously focused element once
* modal is hidden
*/
restoreFocus?: boolean;
/**
* A ModalManager instance used to track and manage the state of open
* Modals. Useful when customizing how modals interact within a container
*/
manager?: ModalManager;
/**
* A ModalManager instance used to track and manage the state of open
* Modals. Useful when customizing how modals interact within a container
*/
manager?: ModalManager;
}

@@ -1,10 +0,17 @@

import * as Modal from './Modal';
import * as Modal from "./Modal";
declare class ModalManager {
constructor(opts?: { hideSiblingNodes?: boolean; handleContainerOverflow?: boolean });
add(modal: Modal, container: any, className?: string): number;
remove(modal: Modal): void;
isTopModal(modal: Modal): boolean;
constructor(opts?: {
hideSiblingNodes?: boolean;
handleContainerOverflow?: boolean;
});
isContainerOverflowing(modal: Modal): boolean;
containerIndexFromModal(modal: Modal): number;
setContainerStyle(containerState: any, container: any): void;
removeContainerStyle(containerState: any, container: any): void;
add(modal: Modal, container: any, className?: string): number;
remove(modal: Modal): void;
isTopModal(modal: Modal): boolean;
}
declare namespace ModalManager { }
declare namespace ModalManager {}
export = ModalManager;

@@ -1,35 +0,87 @@

import * as React from 'react';
import { TransitionCallbacks } from 'react-overlays';
import { TransitionProps } from 'react-transition-group/Transition';
import { PortalProps } from './Portal';
import { PositionProps } from './Position';
import * as React from "react";
declare class Overlay extends React.Component<Overlay.OverlayProps> { }
import { TransitionCallbacks } from "react-overlays";
import { TransitionProps } from "react-transition-group/Transition";
import { RootCloseWrapper } from ".";
import { PortalProps } from "./Portal";
declare class Overlay extends React.Component<Overlay.OverlayProps> {}
export = Overlay;
declare namespace Overlay {
interface OverlayProps extends TransitionCallbacks, PortalProps, PositionProps {
/**
* Set the visibility of the Overlay
*/
show?: boolean;
type Placements = 'top' | 'left' | 'right' | 'bottom';
/**
* Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay
*/
rootClose?: boolean;
interface OverlayRenderProps {
show: boolean;
placement: Placements;
outOfBoundaries?: boolean;
scheduleUpdate(): void;
props: {
ref?(element: HTMLElement): void;
style: { [key: string]: string | number };
'aria-labelledby'?: string;
};
arrowProps: {
ref?(element: HTMLElement): void;
style: { [key: string]: string | number };
};
}
/**
* A Callback fired by the Overlay when it wishes to be hidden.
*
* __required__ when `rootClose` is `true`.
*/
onHide?(props: PortalProps, ...args: any[]): any;
interface OverlayProps extends TransitionCallbacks, PortalProps {
/**
* Set the visibility of the Overlay
*/
show?: boolean;
/**
* A `react-transition-group@2.0.0` `<Transition/>` component
* used to animate the overlay as it changes visibility.
*/
transition?: React.ComponentType<TransitionProps>;
}
/** Specify where the overlay element is positioned in relation to the target element */
placement?: Placements;
/**
* Enables the Popper.js `flip` modifier, allowing the Overlay to
* automatically adjust it's placement in case of overlap with the viewport or toggle.
*/
flip?: boolean;
/**
* A render prop that returns an element to overlay and position. See
* the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info.
*/
children(renderProps: OverlayRenderProps): React.ReactElement<any>;
/**
* A set of popper options and props passed directly to react-popper's Popper component.
*/
popperConfig?: object;
/**
* Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay
*/
rootClose?: boolean;
/**
* Specify event for toggling overlay
*/
rootCloseEvent?: RootCloseWrapper.RootCloseWrapperProps['event'];
/**
* Specify disabled for disable RootCloseWrapper
*/
rootCloseDisabled?: boolean;
/**
* A Callback fired by the Overlay when it wishes to be hidden.
*
* __required__ when `rootClose` is `true`.
*/
onHide?(props: PortalProps, ...args: any[]): any;
/**
* A `react-transition-group@2.0.0` `<Transition/>` component
* used to animate the overlay as it changes visibility.
*/
transition?: React.ComponentType<TransitionProps>;
target?: React.ReactInstance | (() => React.ReactInstance);
}
}

@@ -1,10 +0,12 @@

import * as React from 'react';
import * as React from "react";
declare class Portal extends React.Component<Portal.PortalProps> { }
declare class Portal extends React.Component<Portal.PortalProps> {}
export = Portal;
declare namespace Portal {
interface PortalProps {
container?: React.ReactNode | Function;
}
interface PortalProps {
container?: React.ReactNode | Function;
onRendered?: Function;
}
}
import * as React from "react";
declare class RootCloseWrapper extends React.Component<RootCloseWrapperProps> { }
declare namespace RootCloseWrapper { }
declare class RootCloseWrapper extends React.Component<
RootCloseWrapper.RootCloseWrapperProps
> {}
export = RootCloseWrapper;
interface RootCloseWrapperProps {
/**
* Callback fired after click or mousedown. Also triggers when user hits `esc`.
*/
onRootClose?(e: React.SyntheticEvent<any>): void;
declare namespace RootCloseWrapper {
interface RootCloseWrapperProps {
/**
* Callback fired after click or mousedown. Also triggers when user hits `esc`.
*/
onRootClose?(e: React.SyntheticEvent<any>): void;
/**
* Children to render.
*/
children?: React.ReactNode;
/**
* Children to render.
*/
children?: React.ReactNode;
/**
* Disable the the RootCloseWrapper, preventing it from triggering
* `onRootClose`.
*/
disabled?: boolean;
/**
* Disable the the RootCloseWrapper, preventing it from triggering
* `onRootClose`.
*/
disabled?: boolean;
/**
* Choose which document mouse event to bind to
*/
event?: 'click' | 'mousedown';
/**
* Choose which document mouse event to bind to
*/
event?: 'click' | 'mousedown';
}
}
{
"name": "@types/react-overlays",
"version": "0.8.5",
"version": "1.1.0",
"description": "TypeScript definitions for React Overlays",

@@ -16,5 +16,11 @@ "license": "MIT",

"githubUsername": "vitosamson"
},
{
"name": "Aaron Dancer",
"url": "https://github.com/aarondancer",
"githubUsername": "aarondancer"
}
],
"main": "",
"types": "index",
"repository": {

@@ -29,4 +35,4 @@ "type": "git",

},
"typesPublisherContentHash": "efb4c192efaeb0fe593636bd04f64d0a25e1da2ec2cb6dcadcae8bc2c3468f2e",
"typesPublisherContentHash": "a1ef1052770565560b2e5d9f162a7c78ea093a9c26c4195554e43f83bd0a3d91",
"typeScriptVersion": "2.8"
}

@@ -11,7 +11,7 @@ # Installation

Additional Details
* Last updated: Mon, 06 Aug 2018 21:55:28 GMT
* Dependencies: react, react-transition-group
* Last updated: Tue, 15 Jan 2019 23:59:35 GMT
* Dependencies: @types/react, @types/react-transition-group
* Global values: none
# Credits
These definitions were written by Aaron Beall <https://github.com/aaronbeall>, Vito Samson <https://github.com/vitosamson>.
These definitions were written by Aaron Beall <https://github.com/aaronbeall>, Vito Samson <https://github.com/vitosamson>, Aaron Dancer <https://github.com/aarondancer>.

Sorry, the diff of this file is not supported yet

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