@atlaskit/popup
Advanced tools
Comparing version 1.19.4 to 1.20.0
# @atlaskit/popup | ||
## 1.20.0 | ||
### Minor Changes | ||
- [#116426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116426) | ||
[`d6c9799d09e87`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d6c9799d09e87) - | ||
Updates compositional popup to take an optional prop for the popup content to expand to the full | ||
width of the parent container | ||
## 1.19.4 | ||
@@ -4,0 +13,0 @@ |
@@ -129,6 +129,6 @@ "use strict"; | ||
shouldUseCaptureOnOutsideClick = _ref4$shouldUseCaptur === void 0 ? false : _ref4$shouldUseCaptur, | ||
_ref4$shouldRenderToP = _ref4.shouldRenderToParent, | ||
shouldRenderToParent = _ref4$shouldRenderToP === void 0 ? false : _ref4$shouldRenderToP, | ||
shouldRenderToParent = _ref4.shouldRenderToParent, | ||
_ref4$shouldDisableFo = _ref4.shouldDisableFocusLock, | ||
shouldDisableFocusLock = _ref4$shouldDisableFo === void 0 ? false : _ref4$shouldDisableFo; | ||
shouldDisableFocusLock = _ref4$shouldDisableFo === void 0 ? false : _ref4$shouldDisableFo, | ||
shouldFitContainer = _ref4.shouldFitContainer; | ||
useEnsureIsInsidePopup(); | ||
@@ -157,2 +157,3 @@ var isOpen = (0, _react.useContext)(IsOpenContext); | ||
autoFocus: autoFocus, | ||
shouldFitContainer: shouldFitContainer, | ||
shouldUseCaptureOnOutsideClick: shouldUseCaptureOnOutsideClick, | ||
@@ -159,0 +160,0 @@ shouldRenderToParent: shouldRenderToParent, |
@@ -109,4 +109,5 @@ import React, { createContext, useContext, useState } from 'react'; | ||
shouldUseCaptureOnOutsideClick = false, | ||
shouldRenderToParent = false, | ||
shouldDisableFocusLock = false | ||
shouldRenderToParent, | ||
shouldDisableFocusLock = false, | ||
shouldFitContainer | ||
}) => { | ||
@@ -136,2 +137,3 @@ useEnsureIsInsidePopup(); | ||
autoFocus: autoFocus, | ||
shouldFitContainer: shouldFitContainer, | ||
shouldUseCaptureOnOutsideClick: shouldUseCaptureOnOutsideClick, | ||
@@ -138,0 +140,0 @@ shouldRenderToParent: shouldRenderToParent, |
@@ -119,6 +119,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
shouldUseCaptureOnOutsideClick = _ref4$shouldUseCaptur === void 0 ? false : _ref4$shouldUseCaptur, | ||
_ref4$shouldRenderToP = _ref4.shouldRenderToParent, | ||
shouldRenderToParent = _ref4$shouldRenderToP === void 0 ? false : _ref4$shouldRenderToP, | ||
shouldRenderToParent = _ref4.shouldRenderToParent, | ||
_ref4$shouldDisableFo = _ref4.shouldDisableFocusLock, | ||
shouldDisableFocusLock = _ref4$shouldDisableFo === void 0 ? false : _ref4$shouldDisableFo; | ||
shouldDisableFocusLock = _ref4$shouldDisableFo === void 0 ? false : _ref4$shouldDisableFo, | ||
shouldFitContainer = _ref4.shouldFitContainer; | ||
useEnsureIsInsidePopup(); | ||
@@ -147,2 +147,3 @@ var isOpen = useContext(IsOpenContext); | ||
autoFocus: autoFocus, | ||
shouldFitContainer: shouldFitContainer, | ||
shouldUseCaptureOnOutsideClick: shouldUseCaptureOnOutsideClick, | ||
@@ -149,0 +150,0 @@ shouldRenderToParent: shouldRenderToParent, |
@@ -39,5 +39,14 @@ import React from 'react'; | ||
export declare const PopupTrigger: ({ children }: PopupTriggerProps) => JSX.Element; | ||
export type PopupContentProps = Pick<LegacyPopupProps, 'boundary' | 'offset' | 'strategy' | 'onClose' | 'testId' | 'placement' | 'fallbackPlacements' | 'popupComponent' | 'shouldFlip' | 'rootBoundary' | 'autoFocus' | 'shouldUseCaptureOnOutsideClick' | 'shouldRenderToParent' | 'shouldDisableFocusLock' | 'zIndex'> & { | ||
type CommonContentPopupProps = Pick<LegacyPopupProps, 'boundary' | 'offset' | 'onClose' | 'testId' | 'placement' | 'fallbackPlacements' | 'popupComponent' | 'shouldFlip' | 'rootBoundary' | 'autoFocus' | 'shouldRenderToParent' | 'shouldUseCaptureOnOutsideClick' | 'shouldDisableFocusLock' | 'strategy' | 'zIndex'> & { | ||
children: (props: ContentProps) => React.ReactNode; | ||
}; | ||
type ShouldFitContainerContentPopupProps = CommonContentPopupProps & { | ||
shouldFitContainer: true; | ||
shouldRenderToParent?: true; | ||
strategy?: 'absolute'; | ||
}; | ||
type StandardPopupContentProps = CommonContentPopupProps & { | ||
shouldFitContainer?: false; | ||
}; | ||
export type PopupContentProps = ShouldFitContainerContentPopupProps | StandardPopupContentProps; | ||
/** | ||
@@ -50,2 +59,3 @@ * __Popup content__ | ||
*/ | ||
export declare const PopupContent: ({ children, boundary, offset, strategy, onClose, testId, rootBoundary, shouldFlip, placement, fallbackPlacements, popupComponent, autoFocus, zIndex, shouldUseCaptureOnOutsideClick, shouldRenderToParent, shouldDisableFocusLock, }: PopupContentProps) => JSX.Element | null; | ||
export declare const PopupContent: ({ children, boundary, offset, strategy, onClose, testId, rootBoundary, shouldFlip, placement, fallbackPlacements, popupComponent, autoFocus, zIndex, shouldUseCaptureOnOutsideClick, shouldRenderToParent, shouldDisableFocusLock, shouldFitContainer, }: PopupContentProps) => JSX.Element | null; | ||
export {}; |
@@ -39,5 +39,14 @@ import React from 'react'; | ||
export declare const PopupTrigger: ({ children }: PopupTriggerProps) => JSX.Element; | ||
export type PopupContentProps = Pick<LegacyPopupProps, 'boundary' | 'offset' | 'strategy' | 'onClose' | 'testId' | 'placement' | 'fallbackPlacements' | 'popupComponent' | 'shouldFlip' | 'rootBoundary' | 'autoFocus' | 'shouldUseCaptureOnOutsideClick' | 'shouldRenderToParent' | 'shouldDisableFocusLock' | 'zIndex'> & { | ||
type CommonContentPopupProps = Pick<LegacyPopupProps, 'boundary' | 'offset' | 'onClose' | 'testId' | 'placement' | 'fallbackPlacements' | 'popupComponent' | 'shouldFlip' | 'rootBoundary' | 'autoFocus' | 'shouldRenderToParent' | 'shouldUseCaptureOnOutsideClick' | 'shouldDisableFocusLock' | 'strategy' | 'zIndex'> & { | ||
children: (props: ContentProps) => React.ReactNode; | ||
}; | ||
type ShouldFitContainerContentPopupProps = CommonContentPopupProps & { | ||
shouldFitContainer: true; | ||
shouldRenderToParent?: true; | ||
strategy?: 'absolute'; | ||
}; | ||
type StandardPopupContentProps = CommonContentPopupProps & { | ||
shouldFitContainer?: false; | ||
}; | ||
export type PopupContentProps = ShouldFitContainerContentPopupProps | StandardPopupContentProps; | ||
/** | ||
@@ -50,2 +59,3 @@ * __Popup content__ | ||
*/ | ||
export declare const PopupContent: ({ children, boundary, offset, strategy, onClose, testId, rootBoundary, shouldFlip, placement, fallbackPlacements, popupComponent, autoFocus, zIndex, shouldUseCaptureOnOutsideClick, shouldRenderToParent, shouldDisableFocusLock, }: PopupContentProps) => JSX.Element | null; | ||
export declare const PopupContent: ({ children, boundary, offset, strategy, onClose, testId, rootBoundary, shouldFlip, placement, fallbackPlacements, popupComponent, autoFocus, zIndex, shouldUseCaptureOnOutsideClick, shouldRenderToParent, shouldDisableFocusLock, shouldFitContainer, }: PopupContentProps) => JSX.Element | null; | ||
export {}; |
{ | ||
"name": "@atlaskit/popup", | ||
"version": "1.19.4", | ||
"version": "1.20.0", | ||
"description": "A popup displays brief content in an overlay.", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
166535
3656