← back to kumarnadar__VGEOSL10

Function bodies 234 total

All specs Real LLM only Function bodies
ScorecardTimeHeader function · typescript · L18-L83 (66 LOC)
src/components/scorecard/scorecard-time-header.tsx
export function ScorecardTimeHeader({
  weekEndingDay = 'friday',
  onWeekEndingsChange,
  onQuarterChange,
}: ScorecardTimeHeaderProps) {
  const now = new Date()
  const [selectedYear, setSelectedYear] = useState(now.getFullYear())
  const [selectedMonth, setSelectedMonth] = useState(now.getMonth())

  // Generate available years (current year and 2 prior)
  const years = useMemo(() => {
    const curr = now.getFullYear()
    return [curr, curr - 1, curr - 2]
  }, [])

  // Calculate week endings for selected month
  const weekEndings = useMemo(() => {
    const weeks = getWeekEndingsForMonth(selectedYear, selectedMonth, weekEndingDay)
    onWeekEndingsChange(weeks)
    return weeks
  }, [selectedYear, selectedMonth, weekEndingDay])

  // Determine quarter label
  const quarterLabel = useMemo(() => {
    const q = Math.ceil((selectedMonth + 1) / 3)
    return `${selectedYear}-Q${q}`
  }, [selectedYear, selectedMonth])

  const handleYearChange = (year: string) => {
    setSelectedYea
TrendLineChart function · typescript · L22-L70 (49 LOC)
src/components/scorecard/trend-line-chart.tsx
export function TrendLineChart({ data, goalPacePerWeek, dataType, label }: TrendLineChartProps) {
  const chartData = data.map((d) => ({
    name: formatWeekHeader(d.weekEnding),
    value: d.value,
    goal: goalPacePerWeek ?? undefined,
  }))

  const formatTick = (val: number) => {
    if (dataType === 'currency') {
      return val >= 1000 ? `$${(val / 1000).toFixed(0)}k` : `$${val}`
    }
    return String(val)
  }

  return (
    <div className="space-y-2">
      <p className="text-sm font-medium">{label}</p>
      <div className="h-64">
        <ResponsiveContainer width="100%" height="100%">
          <LineChart data={chartData} margin={{ top: 5, right: 20, left: 10, bottom: 5 }}>
            <CartesianGrid strokeDasharray="3 3" className="opacity-30" />
            <XAxis dataKey="name" tick={{ fontSize: 12 }} />
            <YAxis tickFormatter={formatTick} tick={{ fontSize: 12 }} />
            <Tooltip
              formatter={(value: any) => [formatTick(Number(value)), 'Va
ScoreInput function · typescript · L13-L45 (33 LOC)
src/components/score-input.tsx
export function ScoreInput({ attendee, meetingId }: ScoreInputProps) {
  const supabase = createClient()

  async function handleScoreChange(score: string) {
    const numScore = parseFloat(score)
    if (isNaN(numScore) || numScore < 1 || numScore > 10) return

    await supabase
      .from('meeting_attendees')
      .update({ score: numScore })
      .eq('id', attendee.id)
    mutate(`meeting-${meetingId}`)
  }

  return (
    <div className="flex items-center gap-3">
      <Label className="min-w-[120px] text-sm">{attendee.user?.full_name}</Label>
      <Input
        type="number"
        min="1"
        max="10"
        step="0.5"
        defaultValue={attendee.score || ''}
        onBlur={(e) => handleScoreChange(e.target.value)}
        placeholder="1-10"
        className="w-24 h-8"
      />
      {attendee.score && (
        <span className="text-sm text-muted-foreground">{attendee.score}/10</span>
      )}
    </div>
  )
}
handleScoreChange function · typescript · L16-L25 (10 LOC)
src/components/score-input.tsx
  async function handleScoreChange(score: string) {
    const numScore = parseFloat(score)
    if (isNaN(numScore) || numScore < 1 || numScore > 10) return

    await supabase
      .from('meeting_attendees')
      .update({ score: numScore })
      .eq('id', attendee.id)
    mutate(`meeting-${meetingId}`)
  }
getInitials function · typescript · L31-L39 (9 LOC)
src/components/sidebar.tsx
function getInitials(name: string): string {
  return name
    .split(' ')
    .filter(Boolean)
    .map((part) => part[0])
    .join('')
    .toUpperCase()
    .slice(0, 2)
}
SidebarContent function · typescript · L41-L231 (191 LOC)
src/components/sidebar.tsx
function SidebarContent({ onNavigate }: { onNavigate?: () => void }) {
  const { user, signOut, isLoading } = useUser()
  const pathname = usePathname()
  const { theme, setTheme } = useTheme()
  const supabase = createClient()

  const groups = user?.group_members?.map((gm: any) => gm.groups) || []
  const isAdmin = user?.role === 'system_admin'

  const { data: groupMembers } = useSWR(
    user ? 'group-members' : null,
    async () => {
      const groupIds = groups.map((g: any) => g.id)
      if (groupIds.length === 0) return {}
      const { data } = await supabase
        .from('group_members')
        .select('group_id, profiles(full_name)')
        .in('group_id', groupIds)
      const map: Record<string, string[]> = {}
      data?.forEach((gm: any) => {
        if (!map[gm.group_id]) map[gm.group_id] = []
        const name = gm.profiles?.full_name || 'Unknown'
        map[gm.group_id].push(name)
      })
      return map
    }
  )

  if (isLoading || !user) return null

  con
Sidebar function · typescript · L234-L240 (7 LOC)
src/components/sidebar.tsx
export function Sidebar() {
  return (
    <aside className="hidden lg:flex h-screen w-64 flex-col border-r bg-sidebar">
      <SidebarContent />
    </aside>
  )
}
All rows above produced by Repobility · https://repobility.com
MobileSidebar function · typescript · L243-L259 (17 LOC)
src/components/sidebar.tsx
export function MobileSidebar() {
  const [open, setOpen] = useState(false)

  return (
    <Sheet open={open} onOpenChange={setOpen}>
      <SheetTrigger asChild>
        <Button variant="ghost" size="icon" className="lg:hidden">
          <Menu className="h-5 w-5" />
          <span className="sr-only">Open menu</span>
        </Button>
      </SheetTrigger>
      <SheetContent side="left" className="w-64 p-0" showCloseButton={false}>
        <SidebarContent onNavigate={() => setOpen(false)} />
      </SheetContent>
    </Sheet>
  )
}
TodoList function · typescript · L12-L94 (83 LOC)
src/components/todo-list.tsx
export function TodoList({ groupId }: TodoListProps) {
  const supabase = createClient()

  const { data: todos, isLoading } = useSWR(`todos-${groupId}`, async () => {
    const { data, error } = await supabase
      .from('todos')
      .select('*, assigned_to:profiles!assigned_to_id(full_name), source_issue:issues!source_issue_id(description)')
      .eq('group_id', groupId)
      .eq('is_archived', false)
      .order('due_date', { ascending: true })
    if (error) throw error
    return data
  }, { refreshInterval: 30000 })

  async function toggleTodo(todoId: string, currentStatus: string) {
    const newStatus = currentStatus === 'open' ? 'done' : 'open'
    await supabase.from('todos').update({ status: newStatus }).eq('id', todoId)
    mutate(`todos-${groupId}`)
  }

  if (isLoading) return <p className="text-sm text-muted-foreground">Loading to-dos...</p>

  const today = new Date().toISOString().split('T')[0]
  const openTodos = todos?.filter((t: any) => t.status === 'open') |
toggleTodo function · typescript · L26-L30 (5 LOC)
src/components/todo-list.tsx
  async function toggleTodo(todoId: string, currentStatus: string) {
    const newStatus = currentStatus === 'open' ? 'done' : 'open'
    await supabase.from('todos').update({ status: newStatus }).eq('id', todoId)
    mutate(`todos-${groupId}`)
  }
Top10ReviewDialog function · typescript · L47-L175 (129 LOC)
src/components/top10-review-dialog.tsx
export function Top10ReviewDialog({ open, onOpenChange, title, snapshots }: Top10ReviewDialogProps) {
  const [selectedItem, setSelectedItem] = useState<FocusItemSummary | null>(null)
  const [selectedOwner, setSelectedOwner] = useState<string>('')

  function handleClose(isOpen: boolean) {
    if (!isOpen) {
      setSelectedItem(null)
      setSelectedOwner('')
    }
    onOpenChange(isOpen)
  }

  // Group snapshots by group name if multiple groups
  const hasMultipleGroups = new Set(snapshots.map(s => s.groupName).filter(Boolean)).size > 1
  const groupedByGroup: Record<string, UserSnapshot[]> = {}
  snapshots.forEach(snap => {
    const key = snap.groupName || 'Group'
    if (!groupedByGroup[key]) groupedByGroup[key] = []
    groupedByGroup[key].push(snap)
  })

  return (
    <Dialog open={open} onOpenChange={handleClose}>
      <DialogContent className="max-w-3xl max-h-[80vh] overflow-y-auto">
        <DialogHeader>
          <DialogTitle>{title}</DialogTitle>
        </DialogHe
handleClose function · typescript · L51-L57 (7 LOC)
src/components/top10-review-dialog.tsx
  function handleClose(isOpen: boolean) {
    if (!isOpen) {
      setSelectedItem(null)
      setSelectedOwner('')
    }
    onOpenChange(isOpen)
  }
Badge function · typescript · L29-L46 (18 LOC)
src/components/ui/badge.tsx
function Badge({
  className,
  variant = "default",
  asChild = false,
  ...props
}: React.ComponentProps<"span"> &
  VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
  const Comp = asChild ? Slot.Root : "span"

  return (
    <Comp
      data-slot="badge"
      data-variant={variant}
      className={cn(badgeVariants({ variant }), className)}
      {...props}
    />
  )
}
Button function · typescript · L41-L62 (22 LOC)
src/components/ui/button.tsx
function Button({
  className,
  variant = "default",
  size = "default",
  asChild = false,
  ...props
}: React.ComponentProps<"button"> &
  VariantProps<typeof buttonVariants> & {
    asChild?: boolean
  }) {
  const Comp = asChild ? Slot.Root : "button"

  return (
    <Comp
      data-slot="button"
      data-variant={variant}
      data-size={size}
      className={cn(buttonVariants({ variant, size, className }))}
      {...props}
    />
  )
}
Card function · typescript · L5-L16 (12 LOC)
src/components/ui/card.tsx
function Card({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card"
      className={cn(
        "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
        className
      )}
      {...props}
    />
  )
}
Citation: Repobility (2026). State of AI-Generated Code. https://repobility.com/research/
CardHeader function · typescript · L18-L29 (12 LOC)
src/components/ui/card.tsx
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-header"
      className={cn(
        "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
        className
      )}
      {...props}
    />
  )
}
CardTitle function · typescript · L31-L39 (9 LOC)
src/components/ui/card.tsx
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-title"
      className={cn("leading-none font-semibold", className)}
      {...props}
    />
  )
}
CardDescription function · typescript · L41-L49 (9 LOC)
src/components/ui/card.tsx
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-description"
      className={cn("text-muted-foreground text-sm", className)}
      {...props}
    />
  )
}
CardAction function · typescript · L51-L62 (12 LOC)
src/components/ui/card.tsx
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-action"
      className={cn(
        "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
        className
      )}
      {...props}
    />
  )
}
CardContent function · typescript · L64-L72 (9 LOC)
src/components/ui/card.tsx
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-content"
      className={cn("px-6", className)}
      {...props}
    />
  )
}
CardFooter function · typescript · L74-L82 (9 LOC)
src/components/ui/card.tsx
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="card-footer"
      className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
      {...props}
    />
  )
}
Command function · typescript · L16-L30 (15 LOC)
src/components/ui/command.tsx
function Command({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive>) {
  return (
    <CommandPrimitive
      data-slot="command"
      className={cn(
        "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
        className
      )}
      {...props}
    />
  )
}
CommandDialog function · typescript · L32-L61 (30 LOC)
src/components/ui/command.tsx
function CommandDialog({
  title = "Command Palette",
  description = "Search for a command to run...",
  children,
  className,
  showCloseButton = true,
  ...props
}: React.ComponentProps<typeof Dialog> & {
  title?: string
  description?: string
  className?: string
  showCloseButton?: boolean
}) {
  return (
    <Dialog {...props}>
      <DialogHeader className="sr-only">
        <DialogTitle>{title}</DialogTitle>
        <DialogDescription>{description}</DialogDescription>
      </DialogHeader>
      <DialogContent
        className={cn("overflow-hidden p-0", className)}
        showCloseButton={showCloseButton}
      >
        <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&
Want fix-PRs on findings? Install Repobility's GitHub App · github.com/apps/repobility-bot
CommandInput function · typescript · L63-L83 (21 LOC)
src/components/ui/command.tsx
function CommandInput({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
  return (
    <div
      data-slot="command-input-wrapper"
      className="flex h-9 items-center gap-2 border-b px-3"
    >
      <SearchIcon className="size-4 shrink-0 opacity-50" />
      <CommandPrimitive.Input
        data-slot="command-input"
        className={cn(
          "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
          className
        )}
        {...props}
      />
    </div>
  )
}
CommandList function · typescript · L85-L99 (15 LOC)
src/components/ui/command.tsx
function CommandList({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive.List>) {
  return (
    <CommandPrimitive.List
      data-slot="command-list"
      className={cn(
        "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
        className
      )}
      {...props}
    />
  )
}
CommandEmpty function · typescript · L101-L111 (11 LOC)
src/components/ui/command.tsx
function CommandEmpty({
  ...props
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
  return (
    <CommandPrimitive.Empty
      data-slot="command-empty"
      className="py-6 text-center text-sm"
      {...props}
    />
  )
}
CommandGroup function · typescript · L113-L127 (15 LOC)
src/components/ui/command.tsx
function CommandGroup({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
  return (
    <CommandPrimitive.Group
      data-slot="command-group"
      className={cn(
        "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
        className
      )}
      {...props}
    />
  )
}
CommandSeparator function · typescript · L129-L140 (12 LOC)
src/components/ui/command.tsx
function CommandSeparator({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
  return (
    <CommandPrimitive.Separator
      data-slot="command-separator"
      className={cn("bg-border -mx-1 h-px", className)}
      {...props}
    />
  )
}
CommandItem function · typescript · L142-L156 (15 LOC)
src/components/ui/command.tsx
function CommandItem({
  className,
  ...props
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
  return (
    <CommandPrimitive.Item
      data-slot="command-item"
      className={cn(
        "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
        className
      )}
      {...props}
    />
  )
}
CommandShortcut function · typescript · L158-L172 (15 LOC)
src/components/ui/command.tsx
function CommandShortcut({
  className,
  ...props
}: React.ComponentProps<"span">) {
  return (
    <span
      data-slot="command-shortcut"
      className={cn(
        "text-muted-foreground ml-auto text-xs tracking-widest",
        className
      )}
      {...props}
    />
  )
}
Dialog function · typescript · L10-L14 (5 LOC)
src/components/ui/dialog.tsx
function Dialog({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
  return <DialogPrimitive.Root data-slot="dialog" {...props} />
}
Provenance: Repobility (https://repobility.com) — every score reproducible from /scan/
DialogTrigger function · typescript · L16-L20 (5 LOC)
src/components/ui/dialog.tsx
function DialogTrigger({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
  return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
}
DialogPortal function · typescript · L22-L26 (5 LOC)
src/components/ui/dialog.tsx
function DialogPortal({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
  return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
}
DialogClose function · typescript · L28-L32 (5 LOC)
src/components/ui/dialog.tsx
function DialogClose({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
  return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
}
DialogOverlay function · typescript · L34-L48 (15 LOC)
src/components/ui/dialog.tsx
function DialogOverlay({
  className,
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
  return (
    <DialogPrimitive.Overlay
      data-slot="dialog-overlay"
      className={cn(
        "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
        className
      )}
      {...props}
    />
  )
}
DialogContent function · typescript · L50-L82 (33 LOC)
src/components/ui/dialog.tsx
function DialogContent({
  className,
  children,
  showCloseButton = true,
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
  showCloseButton?: boolean
}) {
  return (
    <DialogPortal data-slot="dialog-portal">
      <DialogOverlay />
      <DialogPrimitive.Content
        data-slot="dialog-content"
        className={cn(
          "bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",
          className
        )}
        {...props}
      >
        {children}
        {showCloseButton && (
          <DialogPrimitive.Close
            data-slot="dialog-close"
            className="ring-offset-background focus:ring-ring data-[state=open]:bg-a
DialogHeader function · typescript · L84-L92 (9 LOC)
src/components/ui/dialog.tsx
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="dialog-header"
      className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
      {...props}
    />
  )
}
DialogFooter function · typescript · L94-L119 (26 LOC)
src/components/ui/dialog.tsx
function DialogFooter({
  className,
  showCloseButton = false,
  children,
  ...props
}: React.ComponentProps<"div"> & {
  showCloseButton?: boolean
}) {
  return (
    <div
      data-slot="dialog-footer"
      className={cn(
        "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
        className
      )}
      {...props}
    >
      {children}
      {showCloseButton && (
        <DialogPrimitive.Close asChild>
          <Button variant="outline">Close</Button>
        </DialogPrimitive.Close>
      )}
    </div>
  )
}
DialogTitle function · typescript · L121-L132 (12 LOC)
src/components/ui/dialog.tsx
function DialogTitle({
  className,
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Title>) {
  return (
    <DialogPrimitive.Title
      data-slot="dialog-title"
      className={cn("text-lg leading-none font-semibold", className)}
      {...props}
    />
  )
}
All rows above produced by Repobility · https://repobility.com
DialogDescription function · typescript · L134-L145 (12 LOC)
src/components/ui/dialog.tsx
function DialogDescription({
  className,
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
  return (
    <DialogPrimitive.Description
      data-slot="dialog-description"
      className={cn("text-muted-foreground text-sm", className)}
      {...props}
    />
  )
}
DropdownMenu function · typescript · L9-L13 (5 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenu({
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
  return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
}
DropdownMenuPortal function · typescript · L15-L21 (7 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuPortal({
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
  return (
    <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
  )
}
DropdownMenuTrigger function · typescript · L23-L32 (10 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuTrigger({
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
  return (
    <DropdownMenuPrimitive.Trigger
      data-slot="dropdown-menu-trigger"
      {...props}
    />
  )
}
DropdownMenuContent function · typescript · L34-L52 (19 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuContent({
  className,
  sideOffset = 4,
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
  return (
    <DropdownMenuPrimitive.Portal>
      <DropdownMenuPrimitive.Content
        data-slot="dropdown-menu-content"
        sideOffset={sideOffset}
        className={cn(
          "bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
          className
        )}
        {...props}
      />
    </DropdownMenuPrimitive.Portal>
  )
}
DropdownMenuGroup function · typescript · L54-L60 (7 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuGroup({
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
  return (
    <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
  )
}
DropdownMenuItem function · typescript · L62-L83 (22 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuItem({
  className,
  inset,
  variant = "default",
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
  inset?: boolean
  variant?: "default" | "destructive"
}) {
  return (
    <DropdownMenuPrimitive.Item
      data-slot="dropdown-menu-item"
      data-inset={inset}
      data-variant={variant}
      className={cn(
        "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
      
DropdownMenuCheckboxItem function · typescript · L85-L109 (25 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuCheckboxItem({
  className,
  children,
  checked,
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
  return (
    <DropdownMenuPrimitive.CheckboxItem
      data-slot="dropdown-menu-checkbox-item"
      className={cn(
        "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
        className
      )}
      checked={checked}
      {...props}
    >
      <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
        <DropdownMenuPrimitive.ItemIndicator>
          <CheckIcon className="size-4" />
        </DropdownMenuPrimitive.ItemIndicator>
      </span>
      {children}
    </DropdownMenuPrimitive.CheckboxItem>
  )
}
Citation: Repobility (2026). State of AI-Generated Code. https://repobility.com/research/
DropdownMenuRadioGroup function · typescript · L111-L120 (10 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuRadioGroup({
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
  return (
    <DropdownMenuPrimitive.RadioGroup
      data-slot="dropdown-menu-radio-group"
      {...props}
    />
  )
}
DropdownMenuRadioItem function · typescript · L122-L144 (23 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuRadioItem({
  className,
  children,
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
  return (
    <DropdownMenuPrimitive.RadioItem
      data-slot="dropdown-menu-radio-item"
      className={cn(
        "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
        className
      )}
      {...props}
    >
      <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
        <DropdownMenuPrimitive.ItemIndicator>
          <CircleIcon className="size-2 fill-current" />
        </DropdownMenuPrimitive.ItemIndicator>
      </span>
      {children}
    </DropdownMenuPrimitive.RadioItem>
  )
}
DropdownMenuLabel function · typescript · L146-L164 (19 LOC)
src/components/ui/dropdown-menu.tsx
function DropdownMenuLabel({
  className,
  inset,
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
  inset?: boolean
}) {
  return (
    <DropdownMenuPrimitive.Label
      data-slot="dropdown-menu-label"
      data-inset={inset}
      className={cn(
        "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
        className
      )}
      {...props}
    />
  )
}
‹ prevpage 3 / 5next ›