@react-types/overlays
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-nightly-4980928d3-240906
{ | ||
"name": "@react-types/overlays", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-nightly-4980928d3-240906", | ||
"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-4980928d3-240906" | ||
}, | ||
"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 | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
106
4499
3
+ Addedreact@18.3.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-is@16.13.1(transitive)