fix error line
This commit is contained in:
@@ -42,6 +42,7 @@ const badgeVariants = cva(
|
||||
}
|
||||
)
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Badge = React.forwardRef(({ className, variant, size, shape, ...props }, ref) => (
|
||||
<div ref={ref} className={cn(badgeVariants({ variant, size, shape }), className)} {...props} />
|
||||
))
|
||||
|
||||
@@ -4,11 +4,13 @@ import { ChevronRight, MoreHorizontal } from "lucide-react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Breadcrumb = React.forwardRef(
|
||||
({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />
|
||||
)
|
||||
Breadcrumb.displayName = "Breadcrumb"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<ol
|
||||
ref={ref}
|
||||
@@ -20,6 +22,7 @@ const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
BreadcrumbList.displayName = "BreadcrumbList"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<li
|
||||
ref={ref}
|
||||
@@ -28,6 +31,7 @@ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
BreadcrumbItem.displayName = "BreadcrumbItem"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
||||
const Comp = asChild ? Slot : "a"
|
||||
|
||||
@@ -40,6 +44,7 @@ const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref)
|
||||
})
|
||||
BreadcrumbLink.displayName = "BreadcrumbLink"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<span
|
||||
ref={ref}
|
||||
@@ -51,6 +56,7 @@ const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
BreadcrumbPage.displayName = "BreadcrumbPage"
|
||||
|
||||
/** @param {any} props */
|
||||
const BreadcrumbSeparator = ({
|
||||
children,
|
||||
className,
|
||||
@@ -66,6 +72,7 @@ const BreadcrumbSeparator = ({
|
||||
)
|
||||
BreadcrumbSeparator.displayName = "BreadcrumbSeparator"
|
||||
|
||||
/** @param {any} props */
|
||||
const BreadcrumbEllipsis = ({
|
||||
className,
|
||||
...props
|
||||
|
||||
@@ -82,6 +82,7 @@ const buttonVariants = cva(
|
||||
}
|
||||
)
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Button = React.forwardRef((
|
||||
{ className, variant, size, shape, block, asChild = false, loading = false, disabled, children, ...props },
|
||||
ref
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Card = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
@@ -10,6 +11,7 @@ const Card = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
Card.displayName = "Card"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const CardHeader = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
@@ -18,6 +20,7 @@ const CardHeader = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
CardHeader.displayName = "CardHeader"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const CardTitle = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
@@ -26,6 +29,7 @@ const CardTitle = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
CardTitle.displayName = "CardTitle"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const CardDescription = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
@@ -34,11 +38,13 @@ const CardDescription = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
CardDescription.displayName = "CardDescription"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const CardContent = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
||||
))
|
||||
CardContent.displayName = "CardContent"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const CardFooter = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Check } from "lucide-react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Checkbox = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<CheckboxPrimitive.Root
|
||||
ref={ref}
|
||||
|
||||
@@ -14,6 +14,7 @@ const DialogPortal = DialogPrimitive.Portal
|
||||
|
||||
const DialogClose = DialogPrimitive.Close
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<DialogPrimitive.Overlay
|
||||
ref={ref}
|
||||
@@ -25,6 +26,7 @@ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (
|
||||
<DialogPortal>
|
||||
<DialogOverlay />
|
||||
@@ -46,8 +48,9 @@ const DialogContent = React.forwardRef(({ className, children, ...props }, ref)
|
||||
))
|
||||
DialogContent.displayName = DialogPrimitive.Content.displayName
|
||||
|
||||
/** @param {any} props */
|
||||
const DialogHeader = ({
|
||||
className,
|
||||
className = '',
|
||||
...props
|
||||
}) => (
|
||||
<div
|
||||
@@ -56,8 +59,9 @@ const DialogHeader = ({
|
||||
)
|
||||
DialogHeader.displayName = "DialogHeader"
|
||||
|
||||
/** @param {any} props */
|
||||
const DialogFooter = ({
|
||||
className,
|
||||
className = '',
|
||||
...props
|
||||
}) => (
|
||||
<div
|
||||
@@ -66,6 +70,7 @@ const DialogFooter = ({
|
||||
)
|
||||
DialogFooter.displayName = "DialogFooter"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<DialogPrimitive.Title
|
||||
ref={ref}
|
||||
@@ -74,6 +79,7 @@ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
DialogTitle.displayName = DialogPrimitive.Title.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<DialogPrimitive.Description
|
||||
ref={ref}
|
||||
|
||||
@@ -16,6 +16,7 @@ const DropdownMenuSub = DropdownMenuPrimitive.Sub
|
||||
|
||||
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.SubTrigger
|
||||
ref={ref}
|
||||
@@ -32,6 +33,7 @@ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, .
|
||||
DropdownMenuSubTrigger.displayName =
|
||||
DropdownMenuPrimitive.SubTrigger.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.SubContent
|
||||
ref={ref}
|
||||
@@ -44,6 +46,7 @@ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =
|
||||
DropdownMenuSubContent.displayName =
|
||||
DropdownMenuPrimitive.SubContent.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.Portal>
|
||||
<DropdownMenuPrimitive.Content
|
||||
@@ -59,6 +62,7 @@ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...pr
|
||||
))
|
||||
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.Item
|
||||
ref={ref}
|
||||
@@ -71,6 +75,7 @@ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref)
|
||||
))
|
||||
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.CheckboxItem
|
||||
ref={ref}
|
||||
@@ -91,9 +96,11 @@ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checke
|
||||
DropdownMenuCheckboxItem.displayName =
|
||||
DropdownMenuPrimitive.CheckboxItem.displayName
|
||||
|
||||
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DropdownMenuRadioItem = React.forwardRef(({ className, children, value, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.RadioItem
|
||||
ref={ref}
|
||||
value={value}
|
||||
className={cn(
|
||||
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||
className
|
||||
@@ -109,6 +116,7 @@ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props
|
||||
))
|
||||
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.Label
|
||||
ref={ref}
|
||||
@@ -117,6 +125,7 @@ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref)
|
||||
))
|
||||
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.Separator
|
||||
ref={ref}
|
||||
|
||||
@@ -9,6 +9,7 @@ const HoverCard = HoverCardPrimitive.Root
|
||||
|
||||
const HoverCardTrigger = HoverCardPrimitive.Trigger
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
||||
<HoverCardPrimitive.Content
|
||||
ref={ref}
|
||||
|
||||
@@ -72,6 +72,7 @@ function buildSrcSet(parsed, options) {
|
||||
).join(", ")
|
||||
}
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const ImageWrapper = React.forwardRef(({ aspectRatio, className, style, children }, ref) => (
|
||||
<span
|
||||
ref={ref}
|
||||
@@ -83,6 +84,7 @@ const ImageWrapper = React.forwardRef(({ aspectRatio, className, style, children
|
||||
))
|
||||
ImageWrapper.displayName = "ImageWrapper"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const ResponsiveImage = React.forwardRef(
|
||||
({ parsed, fittingType, focalPoint, quality, className, style, aspectRatio, onLoad, ...props }, parentRef) => {
|
||||
const wrapperRef = React.useRef(null)
|
||||
@@ -172,6 +174,7 @@ ResponsiveImage.displayName = "ResponsiveImage"
|
||||
* server-side, optionally anchored at a focal point. Other URLs render as a
|
||||
* plain <img>. Failed loads swap to a fallback image.
|
||||
*/
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Image = React.forwardRef(
|
||||
(
|
||||
{
|
||||
|
||||
@@ -34,6 +34,7 @@ const inputVariants = cva(
|
||||
}
|
||||
)
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Input = React.forwardRef(({ className, type, size, shape, ...props }, ref) => (
|
||||
<input
|
||||
type={type}
|
||||
|
||||
@@ -8,6 +8,7 @@ const labelVariants = cva(
|
||||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
||||
)
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Label = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />
|
||||
))
|
||||
|
||||
@@ -9,6 +9,7 @@ const PopoverTrigger = PopoverPrimitive.Trigger
|
||||
|
||||
const PopoverAnchor = PopoverPrimitive.Anchor
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
||||
<PopoverPrimitive.Portal>
|
||||
<PopoverPrimitive.Content
|
||||
|
||||
@@ -4,15 +4,18 @@ import { Circle } from "lucide-react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
||||
return (<RadioGroupPrimitive.Root className={cn("grid gap-2", className)} {...props} ref={ref} />);
|
||||
})
|
||||
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName
|
||||
|
||||
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const RadioGroupItem = React.forwardRef(({ className = '', value, ...props }, ref) => {
|
||||
return (
|
||||
(<RadioGroupPrimitive.Item
|
||||
ref={ref}
|
||||
value={value}
|
||||
className={cn(
|
||||
"aspect-square h-4 w-4 rounded-full border border-border data-[state=checked]:border-krow-blue text-krow-blue shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-krow-blue/60 disabled:cursor-not-allowed disabled:opacity-50",
|
||||
className
|
||||
|
||||
@@ -12,6 +12,7 @@ const SelectGroup = SelectPrimitive.Group
|
||||
|
||||
const SelectValue = SelectPrimitive.Value
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (
|
||||
<SelectPrimitive.Trigger
|
||||
ref={ref}
|
||||
@@ -28,6 +29,7 @@ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref)
|
||||
))
|
||||
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SelectPrimitive.ScrollUpButton
|
||||
ref={ref}
|
||||
@@ -38,6 +40,7 @@ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) =>
|
||||
))
|
||||
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SelectPrimitive.ScrollDownButton
|
||||
ref={ref}
|
||||
@@ -49,6 +52,7 @@ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) =
|
||||
SelectScrollDownButton.displayName =
|
||||
SelectPrimitive.ScrollDownButton.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (
|
||||
<SelectPrimitive.Portal>
|
||||
<SelectPrimitive.Content
|
||||
@@ -73,6 +77,7 @@ const SelectContent = React.forwardRef(({ className, children, position = "poppe
|
||||
))
|
||||
SelectContent.displayName = SelectPrimitive.Content.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SelectPrimitive.Label
|
||||
ref={ref}
|
||||
@@ -81,9 +86,17 @@ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
||||
|
||||
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
/* `value` is named and forwarded explicitly — the props type here is `any`, so a
|
||||
value arriving only through `...props` is invisible to the checker and it flags
|
||||
the required prop as missing. Naming it without passing it back down is the
|
||||
trap: Radix then has no value to match against, no item is ever `isSelected`,
|
||||
the trigger's value node never receives any item text, and every closed select
|
||||
renders as an empty pill with nothing but a chevron. */
|
||||
const SelectItem = React.forwardRef(({ className = '', children, value, ...props }, ref) => (
|
||||
<SelectPrimitive.Item
|
||||
ref={ref}
|
||||
value={value}
|
||||
className={cn(
|
||||
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||
className
|
||||
@@ -99,6 +112,7 @@ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) =>
|
||||
))
|
||||
SelectItem.displayName = SelectPrimitive.Item.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SelectPrimitive.Separator
|
||||
ref={ref}
|
||||
|
||||
@@ -14,6 +14,7 @@ const SheetClose = SheetPrimitive.Close
|
||||
|
||||
const SheetPortal = SheetPrimitive.Portal
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SheetPrimitive.Overlay
|
||||
className={cn(
|
||||
@@ -44,6 +45,7 @@ const sheetVariants = cva(
|
||||
}
|
||||
)
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SheetContent = React.forwardRef(({ side = "right", className, children, ...props }, ref) => (
|
||||
<SheetPortal>
|
||||
<SheetOverlay />
|
||||
@@ -79,6 +81,7 @@ const SheetFooter = ({
|
||||
)
|
||||
SheetFooter.displayName = "SheetFooter"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SheetTitle = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SheetPrimitive.Title
|
||||
ref={ref}
|
||||
@@ -87,6 +90,7 @@ const SheetTitle = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
SheetTitle.displayName = SheetPrimitive.Title.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const SheetDescription = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SheetPrimitive.Description
|
||||
ref={ref}
|
||||
|
||||
@@ -3,6 +3,7 @@ import * as SliderPrimitive from "@radix-ui/react-slider"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Slider = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SliderPrimitive.Root
|
||||
ref={ref}
|
||||
|
||||
@@ -3,6 +3,7 @@ import * as SwitchPrimitives from "@radix-ui/react-switch"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Switch = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<SwitchPrimitives.Root
|
||||
className={cn(
|
||||
|
||||
@@ -5,6 +5,7 @@ import { cn } from "@/lib/utils"
|
||||
|
||||
const Tabs = TabsPrimitive.Root
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const TabsList = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<TabsPrimitive.List
|
||||
ref={ref}
|
||||
@@ -16,6 +17,7 @@ const TabsList = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
TabsList.displayName = TabsPrimitive.List.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<TabsPrimitive.Trigger
|
||||
ref={ref}
|
||||
@@ -27,6 +29,7 @@ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (
|
||||
))
|
||||
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const TabsContent = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<TabsPrimitive.Content
|
||||
ref={ref}
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
||||
return (
|
||||
(<textarea
|
||||
|
||||
@@ -3,6 +3,7 @@ import { cva } from "class-variance-authority";
|
||||
import { X } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const ToastProvider = React.forwardRef(({ ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
@@ -12,6 +13,7 @@ const ToastProvider = React.forwardRef(({ ...props }, ref) => (
|
||||
));
|
||||
ToastProvider.displayName = "ToastProvider";
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const ToastViewport = React.forwardRef(({ ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
@@ -37,6 +39,7 @@ const toastVariants = cva(
|
||||
}
|
||||
);
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
|
||||
return (
|
||||
<div
|
||||
@@ -48,6 +51,7 @@ const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
|
||||
});
|
||||
Toast.displayName = "Toast";
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const ToastAction = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
@@ -60,6 +64,7 @@ const ToastAction = React.forwardRef(({ className, ...props }, ref) => (
|
||||
));
|
||||
ToastAction.displayName = "ToastAction";
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const ToastClose = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<button
|
||||
ref={ref}
|
||||
@@ -75,6 +80,7 @@ const ToastClose = React.forwardRef(({ className, ...props }, ref) => (
|
||||
));
|
||||
ToastClose.displayName = "ToastClose";
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
@@ -84,6 +90,7 @@ const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (
|
||||
));
|
||||
ToastTitle.displayName = "ToastTitle";
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const ToastDescription = React.forwardRef(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
|
||||
@@ -8,7 +8,8 @@ import {
|
||||
ToastViewport,
|
||||
} from "@/components/ui/toast";
|
||||
|
||||
export function Toaster() {
|
||||
/** @param {any} [props] */
|
||||
export function Toaster(props) {
|
||||
const { toasts } = useToast();
|
||||
|
||||
return (
|
||||
|
||||
@@ -11,6 +11,7 @@ const Tooltip = TooltipPrimitive.Root
|
||||
|
||||
const TooltipTrigger = TooltipPrimitive.Trigger
|
||||
|
||||
/** @type {React.ForwardRefExoticComponent<any>} */
|
||||
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (
|
||||
<TooltipPrimitive.Portal>
|
||||
<TooltipPrimitive.Content
|
||||
|
||||
Reference in New Issue
Block a user