Socket
Socket
Sign inDemoInstall

@react-types/overlays

Package Overview
Dependencies
Maintainers
2
Versions
745
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-types/overlays - npm Package Compare versions

Comparing version 3.0.0-alpha.1 to 3.0.0-nightly-641446f65-240905

12

package.json
{
"name": "@react-types/overlays",
"version": "3.0.0-alpha.1",
"version": "3.0.0-nightly-641446f65-240905",
"description": "Spectrum UI components in React",

@@ -9,9 +9,9 @@ "license": "Apache-2.0",

"type": "git",
"url": "https://github.com/adobe-private/react-spectrum-v3"
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-types/shared": "^3.0.0-rc.2"
"@react-types/shared": "^3.0.0-nightly-641446f65-240905"
},
"peerDependencies": {
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
},

@@ -21,3 +21,3 @@ "publishConfig": {

},
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410"
}
"stableVersion": "3.8.9"
}
# @react-types/overlays
This package is part of [react-spectrum](https://github.com/adobe-private/react-spectrum-v3). See the repo for more details.
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.

@@ -13,4 +13,4 @@ /*

import {DOMProps, StyleProps} from '@react-types/shared';
import {HTMLAttributes, ReactElement, ReactNode} from 'react';
import {HTMLAttributes, MutableRefObject, ReactElement, ReactNode} from 'react';
import {StyleProps} from '@react-types/shared';

@@ -27,8 +27,37 @@ export type Placement = 'bottom' | 'bottom left' | 'bottom right' | 'bottom start' | 'bottom end' |

export interface PositionProps {
/**
* The placement of the element with respect to its anchor element.
* @default 'bottom'
*/
placement?: Placement,
/**
* The placement padding that should be applied between the element and its
* surrounding container.
* @default 12
*/
containerPadding?: number,
/**
* The additional offset applied along the main axis between the element and its
* anchor element.
* @default 0
*/
offset?: number,
/**
* The additional offset applied along the cross axis between the element and its
* anchor element.
* @default 0
*/
crossOffset?: number,
/**
* Whether the element should flip its orientation (e.g. top to bottom or left to right) when
* there is insufficient room for it to render completely.
* @default true
*/
shouldFlip?: boolean,
boundaryElement?: Element,
// /**
// * The element that should be used as the bounding container when calculating container offset
// * or whether it should flip.
// */
// boundaryElement?: Element,
/** Whether the element is rendered. */
isOpen?: boolean

@@ -41,2 +70,3 @@ }

container?: Element,
isKeyboardDismissDisabled?: boolean,
onEnter?: () => void,

@@ -47,14 +77,16 @@ onEntering?: () => void,

onExiting?: () => void,
onExited?: () => void
onExited?: () => void,
nodeRef: MutableRefObject<HTMLElement | null>,
disableFocusManagement?: boolean
}
export interface ModalProps extends DOMProps, StyleProps, OverlayProps {
export interface ModalProps extends StyleProps, Omit<OverlayProps, 'nodeRef'> {
children: ReactElement,
isOpen?: boolean,
onClose?: () => void,
type?: 'fullscreen' | 'fullscreenTakeover',
type?: 'modal' | 'fullscreen' | 'fullscreenTakeover',
isDismissable?: boolean
}
export interface PopoverProps extends DOMProps, StyleProps, OverlayProps {
export interface PopoverProps extends StyleProps, Omit<OverlayProps, 'nodeRef'> {
children: ReactNode,

@@ -66,10 +98,23 @@ placement?: PlacementAxis,

onClose?: () => void,
shouldCloseOnBlur?: boolean
shouldCloseOnBlur?: boolean,
isNonModal?: boolean,
isDismissable?: boolean
}
export interface TrayProps extends DOMProps, StyleProps, OverlayProps {
export interface TrayProps extends StyleProps, Omit<OverlayProps, 'nodeRef'> {
children: ReactElement,
isOpen?: boolean,
onClose?: () => void,
shouldCloseOnBlur?: boolean
shouldCloseOnBlur?: boolean,
isFixedHeight?: boolean,
isNonModal?: boolean
}
export interface OverlayTriggerProps {
/** Whether the overlay is open by default (controlled). */
isOpen?: boolean,
/** Whether the overlay is open by default (uncontrolled). */
defaultOpen?: boolean,
/** Handler that is called when the overlay's open state changes. */
onOpenChange?: (isOpen: boolean) => void
}
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