@radix-ui/react-popover 0.1.7-rc.36 → 0.1.7-rc.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
3
3
  import { FocusScope } from "@radix-ui/react-focus-scope";
4
4
  import * as PopperPrimitive from "@radix-ui/react-popper";
5
- import { UnstablePortal } from "@radix-ui/react-portal";
5
+ import { Portal as _Portal1 } from "@radix-ui/react-portal";
6
6
  import * as Radix from "@radix-ui/react-primitive";
7
7
  import { Primitive } from "@radix-ui/react-primitive";
8
8
  import { RemoveScroll } from "react-remove-scroll";
@@ -28,7 +28,7 @@ type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.butt
28
28
  export interface PopoverTriggerProps extends PrimitiveButtonProps {
29
29
  }
30
30
  export const PopoverTrigger: React.ForwardRefExoticComponent<PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
31
- type PortalProps = React.ComponentPropsWithoutRef<typeof UnstablePortal>;
31
+ type PortalProps = React.ComponentPropsWithoutRef<typeof _Portal1>;
32
32
  export interface PopoverPortalProps extends Omit<PortalProps, 'asChild'> {
33
33
  children?: React.ReactNode;
34
34
  /**
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AA4BA,OAAA,yFAEE,CAAC;AAmBH,yBAAyB,MAAM,cAAc,CAAC,mBAAmB,CAAC,CAAC;AACnE;IACE,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,C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gB,CAAC,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;CAC1D;AAmED,kCAA4B,SAAQ,oBAAoB;CAAG;AAE3D,OAAA,MAAM,yGAaL,CAAC;AAWF,wBAAwB,MAAM,wBAAwB,CAAC,OAAO,gBAAgB,KAAK,CAAC,CAAC;AACrF,kCAA4B,SAAQ,gBAAgB;CAAG;AAEvD,OAAA,MAAM,qGAML,CAAC;AAUF,OAAA,MAAM,4BAAc,CAAC;AACrB,OAAA,MAAM,iGAAsB,CAAC;AAC7B,OAAA,MAAM,sGAAwB,CAAC;AAC/B,OAAA,MAAM,oCAAsB,CAAC;AAC7B,OAAA,MAAM,mGAAwB,CAAC;AAC/B,OAAA,MAAM,kGAAoB,CAAC;AAC3B,OAAA,MAAM,8FAAoB,CAAC","sources":["packages/react/popover/src/packages/react/popover/src/Popover.tsx","packages/react/popover/src/packages/react/popover/src/index.ts","packages/react/popover/src/index.ts"],"sourcesContent":[null,null,"export * from './Popover';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";;;;;;;;AA4BA,OAAA,yFAEE,CAAC;AAmBH,yBAAyB,MAAM,cAAc,CAAC,mBAAmB,CAAC,CAAC;AACnE;IACE,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;CACtD;AAED,OAAA,MAAM,SAAS,MAAM,EAAE,CAAC,YAAY,CAsCnC,CAAC;AAWF,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,gBAAgB,MAAM,CAAC,CAAC;AACvF,mCAA6B,SAAQ,iBAAiB;CAAG;AAEzD,OAAA,MAAM,wGAcL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A4B,SAAQ,gBAAgB;CAAG;AAEvD,OAAA,MAAM,qGAML,CAAC;AAUF,OAAA,MAAM,4BAAc,CAAC;AACrB,OAAA,MAAM,iGAAsB,CAAC;AAC7B,OAAA,MAAM,sGAAwB,CAAC;AAC/B,OAAA,MAAM,oCAAsB,CAAC;AAC7B,OAAA,MAAM,mGAAwB,CAAC;AAC/B,OAAA,MAAM,kGAAoB,CAAC;AAC3B,OAAA,MAAM,8FAAoB,CAAC","sources":["packages/react/popover/src/packages/react/popover/src/Popover.tsx","packages/react/popover/src/packages/react/popover/src/index.ts","packages/react/popover/src/index.ts"],"sourcesContent":[null,null,"export * from './Popover';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
package/dist/index.js CHANGED
@@ -176,7 +176,7 @@ const $7d632c09314cddaf$export$dd679ffb4362d2d4 = (props)=>{
176
176
  forceMount: forceMount
177
177
  }, /*#__PURE__*/ $aJPOC$react.createElement($aJPOC$radixuireactpresence.Presence, {
178
178
  present: forceMount || context.open
179
- }, /*#__PURE__*/ $aJPOC$react.createElement($aJPOC$radixuireactportal.UnstablePortal, {
179
+ }, /*#__PURE__*/ $aJPOC$react.createElement($aJPOC$radixuireactportal.Portal, {
180
180
  asChild: true,
181
181
  container: container
182
182
  }, children)));
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;ACqBA;;oGAEA,CAEA,MAAMiB,kCAAY,GAAG,SAArB,AAAA;AAGA,MAAM,CAACC,0CAAD,EAAuBC,yCAAvB,CAAA,GAA6ChB,6CAAkB,CAACc,kCAAD,EAAe;IAClFR,2CADkF;CAAf,CAArE,AAAA;AAGA,MAAMW,oCAAc,GAAGX,2CAAiB,EAAxC,AAAA;AAeA,MAAM,CAACY,qCAAD,EAAkBC,uCAAlB,CAAA,GACJJ,0CAAoB,CAAsBD,kCAAtB,CADtB,AAAA;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A,MAAMW,yCAAK,GAAGR,yCAAd,AAAA;;ADteA","sources":["packages/react/popover/src/index.ts","packages/react/popover/src/Popover.tsx"],"sourcesContent":["export * from './Popover';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { UnstablePortal } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n allowPinchZoom: PopoverProps['allowPinchZoom'];\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\ntype RemoveScrollProps = React.ComponentProps<typeof RemoveScroll>;\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: RemoveScrollProps['allowPinchZoom'];\n}\n\nconst Popover: React.FC<PopoverProps> = (props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n allowPinchZoom,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n allowPinchZoom={allowPinchZoom}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n {trigger}\n </PopperPrimitive.Anchor>\n );\n }\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof UnstablePortal>;\ninterface PopoverPortalProps extends Omit<PortalProps, 'asChild'> {\n children?: React.ReactNode;\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: React.FC<PopoverPortalProps> = (props: ScopedProps<PopoverPortalProps>) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n <PortalProvider scope={__scopePopover} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <UnstablePortal asChild container={container}>\n {children}\n </UnstablePortal>\n </Presence>\n </PortalProvider>\n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent';\n\ninterface PopoverContentProps extends PopoverContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverContent = React.forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <PopoverContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\ninterface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst PopoverContentModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <RemoveScroll as={Slot} allowPinchZoom={context.allowPinchZoom}>\n <PopoverContentImpl\n {...props}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n />\n </RemoveScroll>\n );\n }\n);\n\nconst PopoverContentNonModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <PopoverContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) hasInteractedOutsideRef.current = true;\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n //\n // We use `onInteractOutside` as some browsers also\n // focus on pointer down, creating the same issue.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ElementRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface PopoverContentImplProps\n extends PopperContentProps,\n Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = React.forwardRef<PopoverContentImplElement, PopoverContentImplProps>(\n (props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (beacuse of the `Portal`)\n useFocusGuards();\n\n return (\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onDismiss={() => context.onOpenChange(false)}\n >\n <PopperPrimitive.Content\n data-state={getState(context.open)}\n role=\"dialog\"\n id={context.contentId}\n {...popperScope}\n {...contentProps}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // re-namespace exposed content custom property\n ['--radix-popover-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n </DismissableLayer>\n </FocusScope>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = React.ElementRef<typeof Primitive.button>;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = React.ElementRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = React.forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Popover;\nconst Anchor = PopoverAnchor;\nconst Trigger = PopoverTrigger;\nconst Portal = PopoverPortal;\nconst Content = PopoverContent;\nconst Close = PopoverClose;\nconst Arrow = PopoverArrow;\n\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n};\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n};\n"],"names":["React","composeEventHandlers","useComposedRefs","createContextScope","DismissableLayer","useFocusGuards","FocusScope","useId","PopperPrimitive","createPopperScope","UnstablePortal","Presence","Primitive","Slot","useControllableState","hideOthers","RemoveScroll","POPOVER_NAME","createPopoverContext","createPopoverScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","open","openProp","defaultOpen","onOpenChange","modal","allowPinchZoom","popperScope","triggerRef","useRef","hasCustomAnchor","setHasCustomAnchor","useState","setOpen","prop","defaultProp","onChange","useCallback","prevOpen","ANCHOR_NAME","PopoverAnchor","forwardRef","forwardedRef","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","useEffect","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","trigger","contentId","getState","onClick","onOpenToggle","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","undefined","PopoverPortal","container","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","contentRef","composedRefs","isRightClickOutsideRef","content","current","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","button","ctrlKey","isRightClick","checkForDefaultPrevented","onFocusOutside","PopoverContentNonModal","hasInteractedOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","PopoverContentImpl","trapFocus","onOpenAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","style","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","Root","Anchor","Trigger","Portal","Content","Close","Arrow"],"version":3,"file":"index.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;ACqBA;;oGAEA,CAEA,MAAMkB,kCAAY,GAAG,SAArB,AAAA;AAGA,MAAM,CAACC,0CAAD,EAAuBC,yCAAvB,CAAA,GAA6CjB,6CAAkB,CAACe,kCAAD,EAAe;IAClFT,2CADkF;CAAf,CAArE,AAAA;AAGA,MAAMY,oCAAc,GAAGZ,2CAAiB,EAAxC,AAAA;AAeA,MAAM,CAACa,qCAAD,EAAkBC,uCAAlB,CAAA,GACJJ,0CAAoB,CAAsBD,kCAAtB,CADtB,AAAA;AAgBA,MAAMM,yCAA+B,GAAIC,CAAAA,KAAD,GAAsC;IAC5E,MAAM,E,gBACJC,cADI,CAAA,E,UAEJC,QAFI,CAAA,EAGJC,IAAI,EAAEC,QAHF,CAAA,E,aAIJC,WAJI,CAAA,E,cAKJC,YALI,CAAA,SAMJC,KAAK,GAAG,KANJ,G,gBAOJC,cAAAA,CAAAA,EAPI,GAQFR,KARJ,AAAM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,WAAA,EAAA,gCAAA;CAAA,CAAA,CAAA;AAEA;;oGAEA,CAEA,MAAM+E,gCAAU,GAAG,cAAnB,AAAA;AAMA,MAAMC,yCAAY,GAAA,aAAG/G,CAAAA,uBAAA,CACnB,CAACyB,KAAD,EAAwCwB,YAAxC,GAAyD;IACvD,MAAM,E,gBAAEvB,cAAF,CAAA,EAAkB,GAAGsF,UAAH,EAAlB,GAAoCvF,KAA1C,AAAM;IACN,MAAMS,WAAW,GAAGb,oCAAc,CAACK,cAAD,CAAlC,AAAA;IACA,OAAA,aAAO,CAAA,0BAAA,CAAC,+BAAD,EAAA,2DAAA,CAAA,EAAA,EAA2BQ,WAA3B,EAA4C8E,UAA5C,EAAP;QAA+D,GAAG,EAAE/D,YAAL;KAAxD,CAAA,CAAP,CAAO;CAJU,CAArB,AAKG;AAGH,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,gCAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,SAASY,8BAAT,CAAkBjC,IAAlB,EAAiC;IAC/B,OAAOA,IAAI,GAAG,MAAH,GAAY,QAAvB,CAAA;CACD;AAED,MAAMqF,yCAAI,GAAGzF,yCAAb,AAAA;AACA,MAAM0F,yCAAM,GAAGnE,yCAAf,AAAA;AACA,MAAMoE,yCAAO,GAAG3D,wCAAhB,AAAA;AACA,MAAM9C,yCAAM,GAAG2D,yCAAf,AAAA;AACA,MAAM+C,yCAAO,GAAG5C,yCAAhB,AAAA;AACA,MAAM6C,yCAAK,GAAGT,yCAAd,AAAA;AACA,MAAMU,yCAAK,GAAGP,yCAAd,AAAA;;ADteA","sources":["packages/react/popover/src/index.ts","packages/react/popover/src/Popover.tsx"],"sourcesContent":["export * from './Popover';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n allowPinchZoom: PopoverProps['allowPinchZoom'];\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\ntype RemoveScrollProps = React.ComponentProps<typeof RemoveScroll>;\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: RemoveScrollProps['allowPinchZoom'];\n}\n\nconst Popover: React.FC<PopoverProps> = (props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n allowPinchZoom,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n allowPinchZoom={allowPinchZoom}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n {trigger}\n </PopperPrimitive.Anchor>\n );\n }\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface PopoverPortalProps extends Omit<PortalProps, 'asChild'> {\n children?: React.ReactNode;\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: React.FC<PopoverPortalProps> = (props: ScopedProps<PopoverPortalProps>) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n <PortalProvider scope={__scopePopover} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent';\n\ninterface PopoverContentProps extends PopoverContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverContent = React.forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <PopoverContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\ninterface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst PopoverContentModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <RemoveScroll as={Slot} allowPinchZoom={context.allowPinchZoom}>\n <PopoverContentImpl\n {...props}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n />\n </RemoveScroll>\n );\n }\n);\n\nconst PopoverContentNonModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <PopoverContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) hasInteractedOutsideRef.current = true;\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n //\n // We use `onInteractOutside` as some browsers also\n // focus on pointer down, creating the same issue.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ElementRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface PopoverContentImplProps\n extends PopperContentProps,\n Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = React.forwardRef<PopoverContentImplElement, PopoverContentImplProps>(\n (props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (beacuse of the `Portal`)\n useFocusGuards();\n\n return (\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onDismiss={() => context.onOpenChange(false)}\n >\n <PopperPrimitive.Content\n data-state={getState(context.open)}\n role=\"dialog\"\n id={context.contentId}\n {...popperScope}\n {...contentProps}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // re-namespace exposed content custom property\n ['--radix-popover-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n </DismissableLayer>\n </FocusScope>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = React.ElementRef<typeof Primitive.button>;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = React.ElementRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = React.forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Popover;\nconst Anchor = PopoverAnchor;\nconst Trigger = PopoverTrigger;\nconst Portal = PopoverPortal;\nconst Content = PopoverContent;\nconst Close = PopoverClose;\nconst Arrow = PopoverArrow;\n\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n};\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n};\n"],"names":["React","composeEventHandlers","useComposedRefs","createContextScope","DismissableLayer","useFocusGuards","FocusScope","useId","PopperPrimitive","createPopperScope","Portal","PortalPrimitive","Presence","Primitive","Slot","useControllableState","hideOthers","RemoveScroll","POPOVER_NAME","createPopoverContext","createPopoverScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","open","openProp","defaultOpen","onOpenChange","modal","allowPinchZoom","popperScope","triggerRef","useRef","hasCustomAnchor","setHasCustomAnchor","useState","setOpen","prop","defaultProp","onChange","useCallback","prevOpen","ANCHOR_NAME","PopoverAnchor","forwardRef","forwardedRef","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","useEffect","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","trigger","contentId","getState","onClick","onOpenToggle","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","undefined","PopoverPortal","container","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","contentRef","composedRefs","isRightClickOutsideRef","content","current","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","button","ctrlKey","isRightClick","checkForDefaultPrevented","onFocusOutside","PopoverContentNonModal","hasInteractedOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","PopoverContentImpl","trapFocus","onOpenAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","style","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","Root","Anchor","Trigger","Content","Close","Arrow"],"version":3,"file":"index.js.map"}
@@ -8,7 +8,7 @@ import {useFocusGuards as $am6gm$useFocusGuards} from "@radix-ui/react-focus-gua
8
8
  import {FocusScope as $am6gm$FocusScope} from "@radix-ui/react-focus-scope";
9
9
  import {useId as $am6gm$useId} from "@radix-ui/react-id";
10
10
  import {createPopperScope as $am6gm$createPopperScope, Root as $am6gm$Root, Anchor as $am6gm$Anchor, Content as $am6gm$Content, Arrow as $am6gm$Arrow} from "@radix-ui/react-popper";
11
- import {UnstablePortal as $am6gm$UnstablePortal} from "@radix-ui/react-portal";
11
+ import {Portal as $am6gm$Portal} from "@radix-ui/react-portal";
12
12
  import {Presence as $am6gm$Presence} from "@radix-ui/react-presence";
13
13
  import {Primitive as $am6gm$Primitive} from "@radix-ui/react-primitive";
14
14
  import {Slot as $am6gm$Slot} from "@radix-ui/react-slot";
@@ -157,7 +157,7 @@ const $cb5cc270b50c6fcd$export$dd679ffb4362d2d4 = (props)=>{
157
157
  forceMount: forceMount
158
158
  }, /*#__PURE__*/ $am6gm$createElement($am6gm$Presence, {
159
159
  present: forceMount || context.open
160
- }, /*#__PURE__*/ $am6gm$createElement($am6gm$UnstablePortal, {
160
+ }, /*#__PURE__*/ $am6gm$createElement($am6gm$Portal, {
161
161
  asChild: true,
162
162
  container: container
163
163
  }, children)));
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;ACqBA;;oGAEA,CAEA,MAAMiB,kCAA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A;CACD;AAED,MAAMqF,yCAAI,GAAGzF,yCAAb,AAAA;AACA,MAAM0F,yCAAM,GAAGnE,yCAAf,AAAA;AACA,MAAMoE,yCAAO,GAAG3D,wCAAhB,AAAA;AACA,MAAM4D,yCAAM,GAAG/C,yCAAf,AAAA;AACA,MAAMgD,yCAAO,GAAG7C,yCAAhB,AAAA;AACA,MAAM8C,yCAAK,GAAGV,yCAAd,AAAA;AACA,MAAMW,yCAAK,GAAGR,yCAAd,AAAA;;ADteA","sources":["packages/react/popover/src/index.ts","packages/react/popover/src/Popover.tsx"],"sourcesContent":["export * from './Popover';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { UnstablePortal } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n allowPinchZoom: PopoverProps['allowPinchZoom'];\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\ntype RemoveScrollProps = React.ComponentProps<typeof RemoveScroll>;\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: RemoveScrollProps['allowPinchZoom'];\n}\n\nconst Popover: React.FC<PopoverProps> = (props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n allowPinchZoom,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n allowPinchZoom={allowPinchZoom}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n {trigger}\n </PopperPrimitive.Anchor>\n );\n }\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof UnstablePortal>;\ninterface PopoverPortalProps extends Omit<PortalProps, 'asChild'> {\n children?: React.ReactNode;\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: React.FC<PopoverPortalProps> = (props: ScopedProps<PopoverPortalProps>) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n <PortalProvider scope={__scopePopover} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <UnstablePortal asChild container={container}>\n {children}\n </UnstablePortal>\n </Presence>\n </PortalProvider>\n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent';\n\ninterface PopoverContentProps extends PopoverContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverContent = React.forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <PopoverContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\ninterface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst PopoverContentModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <RemoveScroll as={Slot} allowPinchZoom={context.allowPinchZoom}>\n <PopoverContentImpl\n {...props}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n />\n </RemoveScroll>\n );\n }\n);\n\nconst PopoverContentNonModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <PopoverContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) hasInteractedOutsideRef.current = true;\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n //\n // We use `onInteractOutside` as some browsers also\n // focus on pointer down, creating the same issue.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ElementRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface PopoverContentImplProps\n extends PopperContentProps,\n Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = React.forwardRef<PopoverContentImplElement, PopoverContentImplProps>(\n (props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (beacuse of the `Portal`)\n useFocusGuards();\n\n return (\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onDismiss={() => context.onOpenChange(false)}\n >\n <PopperPrimitive.Content\n data-state={getState(context.open)}\n role=\"dialog\"\n id={context.contentId}\n {...popperScope}\n {...contentProps}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // re-namespace exposed content custom property\n ['--radix-popover-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n </DismissableLayer>\n </FocusScope>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = React.ElementRef<typeof Primitive.button>;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = React.ElementRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = React.forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Popover;\nconst Anchor = PopoverAnchor;\nconst Trigger = PopoverTrigger;\nconst Portal = PopoverPortal;\nconst Content = PopoverContent;\nconst Close = PopoverClose;\nconst Arrow = PopoverArrow;\n\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n};\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n};\n"],"names":["React","composeEventHandlers","useComposedRefs","createContextScope","DismissableLayer","useFocusGuards","FocusScope","useId","PopperPrimitive","createPopperScope","UnstablePortal","Presence","Primitive","Slot","useControllableState","hideOthers","RemoveScroll","POPOVER_NAME","createPopoverContext","createPopoverScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","open","openProp","defaultOpen","onOpenChange","modal","allowPinchZoom","popperScope","triggerRef","useRef","hasCustomAnchor","setHasCustomAnchor","useState","setOpen","prop","defaultProp","onChange","useCallback","prevOpen","ANCHOR_NAME","PopoverAnchor","forwardRef","forwardedRef","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","useEffect","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","trigger","contentId","getState","onClick","onOpenToggle","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","undefined","PopoverPortal","container","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","contentRef","composedRefs","isRightClickOutsideRef","content","current","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","button","ctrlKey","isRightClick","checkForDefaultPrevented","onFocusOutside","PopoverContentNonModal","hasInteractedOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","PopoverContentImpl","trapFocus","onOpenAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","style","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","Root","Anchor","Trigger","Portal","Content","Close","Arrow"],"version":3,"file":"index.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;;;;;;;;;;ACqBA;;oGAEA,CAEA,MAAMkB,kCAAY,GAAG,SAArB,AAAA;AAGA,MAAM,CAACC,0CAAD,EAAuBC,yCAAvB,CAAA,GAA6CjB,yBAAkB,CAACe,kCAAD,EAAe;IAClFT,wBADkF;CAAf,CAArE,AAAA;AAGA,MAAMY,oCAAc,GAAGZ,wBAAiB,EAAxC,AAAA;AAeA,MAAM,CAACa,qCAAD,EAAkBC,uCAAlB,CAAA,GACJJ,0CAAoB,CAAsBD,kCAAtB,CADtB,AAAA;AAgBA,MAAM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Ad,AAAA;;ADteA","sources":["packages/react/popover/src/index.ts","packages/react/popover/src/Popover.tsx"],"sourcesContent":["export * from './Popover';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n allowPinchZoom: PopoverProps['allowPinchZoom'];\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\ntype RemoveScrollProps = React.ComponentProps<typeof RemoveScroll>;\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: RemoveScrollProps['allowPinchZoom'];\n}\n\nconst Popover: React.FC<PopoverProps> = (props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n allowPinchZoom,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n allowPinchZoom={allowPinchZoom}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n {trigger}\n </PopperPrimitive.Anchor>\n );\n }\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface PopoverPortalProps extends Omit<PortalProps, 'asChild'> {\n children?: React.ReactNode;\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: React.FC<PopoverPortalProps> = (props: ScopedProps<PopoverPortalProps>) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n <PortalProvider scope={__scopePopover} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent';\n\ninterface PopoverContentProps extends PopoverContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverContent = React.forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <PopoverContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\ninterface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst PopoverContentModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <RemoveScroll as={Slot} allowPinchZoom={context.allowPinchZoom}>\n <PopoverContentImpl\n {...props}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n />\n </RemoveScroll>\n );\n }\n);\n\nconst PopoverContentNonModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <PopoverContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) hasInteractedOutsideRef.current = true;\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n //\n // We use `onInteractOutside` as some browsers also\n // focus on pointer down, creating the same issue.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ElementRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface PopoverContentImplProps\n extends PopperContentProps,\n Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = React.forwardRef<PopoverContentImplElement, PopoverContentImplProps>(\n (props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (beacuse of the `Portal`)\n useFocusGuards();\n\n return (\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onDismiss={() => context.onOpenChange(false)}\n >\n <PopperPrimitive.Content\n data-state={getState(context.open)}\n role=\"dialog\"\n id={context.contentId}\n {...popperScope}\n {...contentProps}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // re-namespace exposed content custom property\n ['--radix-popover-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n </DismissableLayer>\n </FocusScope>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = React.ElementRef<typeof Primitive.button>;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = React.ElementRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = React.forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Popover;\nconst Anchor = PopoverAnchor;\nconst Trigger = PopoverTrigger;\nconst Portal = PopoverPortal;\nconst Content = PopoverContent;\nconst Close = PopoverClose;\nconst Arrow = PopoverArrow;\n\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n};\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n};\n"],"names":["React","composeEventHandlers","useComposedRefs","createContextScope","DismissableLayer","useFocusGuards","FocusScope","useId","PopperPrimitive","createPopperScope","Portal","PortalPrimitive","Presence","Primitive","Slot","useControllableState","hideOthers","RemoveScroll","POPOVER_NAME","createPopoverContext","createPopoverScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","open","openProp","defaultOpen","onOpenChange","modal","allowPinchZoom","popperScope","triggerRef","useRef","hasCustomAnchor","setHasCustomAnchor","useState","setOpen","prop","defaultProp","onChange","useCallback","prevOpen","ANCHOR_NAME","PopoverAnchor","forwardRef","forwardedRef","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","useEffect","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","trigger","contentId","getState","onClick","onOpenToggle","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","undefined","PopoverPortal","container","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","contentRef","composedRefs","isRightClickOutsideRef","content","current","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","button","ctrlKey","isRightClick","checkForDefaultPrevented","onFocusOutside","PopoverContentNonModal","hasInteractedOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","PopoverContentImpl","trapFocus","onOpenAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","style","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","Root","Anchor","Trigger","Content","Close","Arrow"],"version":3,"file":"index.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-popover",
3
- "version": "0.1.7-rc.36",
3
+ "version": "0.1.7-rc.37",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -18,18 +18,18 @@
18
18
  "dependencies": {
19
19
  "@babel/runtime": "^7.13.10",
20
20
  "@radix-ui/primitive": "0.1.0",
21
- "@radix-ui/react-compose-refs": "0.1.1-rc.36",
22
- "@radix-ui/react-context": "0.1.2-rc.36",
23
- "@radix-ui/react-dismissable-layer": "0.1.6-rc.36",
24
- "@radix-ui/react-focus-guards": "0.1.1-rc.36",
25
- "@radix-ui/react-focus-scope": "0.1.5-rc.36",
26
- "@radix-ui/react-id": "0.1.6-rc.36",
27
- "@radix-ui/react-popper": "0.1.5-rc.36",
28
- "@radix-ui/react-portal": "0.1.5-rc.36",
29
- "@radix-ui/react-presence": "0.1.3-rc.36",
30
- "@radix-ui/react-primitive": "0.1.5-rc.36",
31
- "@radix-ui/react-slot": "0.1.3-rc.36",
32
- "@radix-ui/react-use-controllable-state": "0.1.1-rc.36",
21
+ "@radix-ui/react-compose-refs": "0.1.1-rc.37",
22
+ "@radix-ui/react-context": "0.1.2-rc.37",
23
+ "@radix-ui/react-dismissable-layer": "0.1.6-rc.37",
24
+ "@radix-ui/react-focus-guards": "0.1.1-rc.37",
25
+ "@radix-ui/react-focus-scope": "0.1.5-rc.37",
26
+ "@radix-ui/react-id": "0.1.6-rc.37",
27
+ "@radix-ui/react-popper": "0.1.5-rc.37",
28
+ "@radix-ui/react-portal": "0.1.5-rc.37",
29
+ "@radix-ui/react-presence": "0.1.3-rc.37",
30
+ "@radix-ui/react-primitive": "0.1.5-rc.37",
31
+ "@radix-ui/react-slot": "0.1.3-rc.37",
32
+ "@radix-ui/react-use-controllable-state": "0.1.1-rc.37",
33
33
  "aria-hidden": "^1.1.1",
34
34
  "react-remove-scroll": "2.5.4"
35
35
  },