diff --git a/elements/Popover.d.ts b/elements/Popover.d.ts index 0101136..924bb9a 100644 --- a/elements/Popover.d.ts +++ b/elements/Popover.d.ts @@ -1,6 +1,8 @@ import * as React from 'react'; import * as PopoverPrimitive from '@radix-ui/react-popover'; declare const Popover: React.FC; +declare const PopoverAnchor: React.ForwardRefExoticComponent>; +declare const PopoverClose: React.ForwardRefExoticComponent>; declare const PopoverTrigger: React.ForwardRefExoticComponent>; declare const PopoverContent: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; -export { Popover, PopoverTrigger, PopoverContent }; +export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, }; diff --git a/elements/Popover.js b/elements/Popover.js index 027a4b7..2eb9503 100644 --- a/elements/Popover.js +++ b/elements/Popover.js @@ -35,12 +35,16 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PopoverContent = exports.PopoverTrigger = exports.Popover = void 0; +exports.PopoverTrigger = exports.PopoverContent = exports.PopoverClose = exports.PopoverAnchor = exports.Popover = void 0; const React = __importStar(require("react")); const PopoverPrimitive = __importStar(require("@radix-ui/react-popover")); const utils_1 = require("@/lib/utils"); const Popover = PopoverPrimitive.Root; exports.Popover = Popover; +const PopoverAnchor = PopoverPrimitive.Anchor; +exports.PopoverAnchor = PopoverAnchor; +const PopoverClose = PopoverPrimitive.Close; +exports.PopoverClose = PopoverClose; const PopoverTrigger = PopoverPrimitive.Trigger; exports.PopoverTrigger = PopoverTrigger; const PopoverContent = React.forwardRef((_a, ref) => { diff --git a/esm/elements/Popover.d.ts b/esm/elements/Popover.d.ts index 0101136..924bb9a 100644 --- a/esm/elements/Popover.d.ts +++ b/esm/elements/Popover.d.ts @@ -1,6 +1,8 @@ import * as React from 'react'; import * as PopoverPrimitive from '@radix-ui/react-popover'; declare const Popover: React.FC; +declare const PopoverAnchor: React.ForwardRefExoticComponent>; +declare const PopoverClose: React.ForwardRefExoticComponent>; declare const PopoverTrigger: React.ForwardRefExoticComponent>; declare const PopoverContent: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; -export { Popover, PopoverTrigger, PopoverContent }; +export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, }; diff --git a/esm/elements/Popover.js b/esm/elements/Popover.js index c6ccc0f..3c142d9 100644 --- a/esm/elements/Popover.js +++ b/esm/elements/Popover.js @@ -3,8 +3,10 @@ import * as React from 'react'; import * as PopoverPrimitive from '@radix-ui/react-popover'; import { cn } from '@/lib/utils'; const Popover = PopoverPrimitive.Root; +const PopoverAnchor = PopoverPrimitive.Anchor; +const PopoverClose = PopoverPrimitive.Close; const PopoverTrigger = PopoverPrimitive.Trigger; const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (React.createElement(PopoverPrimitive.Portal, null, React.createElement(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn('z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props })))); PopoverContent.displayName = PopoverPrimitive.Content.displayName; -export { Popover, PopoverTrigger, PopoverContent }; +export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, }; diff --git a/package.json b/package.json index 2b5bf4d..ce47e7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kubetail-ui", - "version": "0.1.0", + "version": "0.1.1", "private": true, "sideEffects": false, "description": "Kubetail shared component library", diff --git a/src/elements/Popover.tsx b/src/elements/Popover.tsx index 46eef64..6cb84c8 100644 --- a/src/elements/Popover.tsx +++ b/src/elements/Popover.tsx @@ -7,6 +7,8 @@ import { cn } from '@/lib/utils'; const Popover = PopoverPrimitive.Root; +const PopoverAnchor = PopoverPrimitive.Anchor; +const PopoverClose = PopoverPrimitive.Close; const PopoverTrigger = PopoverPrimitive.Trigger; type T1 = React.ElementRef; @@ -33,4 +35,10 @@ const PopoverContent = React.forwardRef(({ )); PopoverContent.displayName = PopoverPrimitive.Content.displayName; -export { Popover, PopoverTrigger, PopoverContent }; +export { + Popover, + PopoverAnchor, + PopoverClose, + PopoverContent, + PopoverTrigger, +};