repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | "use client" |
| #2 | |
| #3 | import * as React from "react" |
| #4 | import * as MenubarPrimitive from "@radix-ui/react-menubar" |
| #5 | import { Check, ChevronRight, Circle } from "lucide-react" |
| #6 | |
| #7 | import { cn } from "@/lib/utils" |
| #8 | |
| #9 | const MenubarMenu = MenubarPrimitive.Menu |
| #10 | |
| #11 | const MenubarGroup = MenubarPrimitive.Group |
| #12 | |
| #13 | const MenubarPortal = MenubarPrimitive.Portal |
| #14 | |
| #15 | const MenubarSub = MenubarPrimitive.Sub |
| #16 | |
| #17 | const MenubarRadioGroup = MenubarPrimitive.RadioGroup |
| #18 | |
| #19 | const Menubar = React.forwardRef< |
| #20 | React.ElementRef<typeof MenubarPrimitive.Root>, |
| #21 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root> |
| #22 | >(({ className, ...props }, ref) => ( |
| #23 | <MenubarPrimitive.Root |
| #24 | ref={ref} |
| #25 | className={cn( |
| #26 | "flex h-10 items-center space-x-1 rounded-md border bg-background p-1", |
| #27 | className |
| #28 | )} |
| #29 | {...props} |
| #30 | /> |
| #31 | )) |
| #32 | Menubar.displayName = MenubarPrimitive.Root.displayName |
| #33 | |
| #34 | const MenubarTrigger = React.forwardRef< |
| #35 | React.ElementRef<typeof MenubarPrimitive.Trigger>, |
| #36 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger> |
| #37 | >(({ className, ...props }, ref) => ( |
| #38 | <MenubarPrimitive.Trigger |
| #39 | ref={ref} |
| #40 | className={cn( |
| #41 | "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", |
| #42 | className |
| #43 | )} |
| #44 | {...props} |
| #45 | /> |
| #46 | )) |
| #47 | MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName |
| #48 | |
| #49 | const MenubarSubTrigger = React.forwardRef< |
| #50 | React.ElementRef<typeof MenubarPrimitive.SubTrigger>, |
| #51 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & { |
| #52 | inset?: boolean |
| #53 | } |
| #54 | >(({ className, inset, children, ...props }, ref) => ( |
| #55 | <MenubarPrimitive.SubTrigger |
| #56 | ref={ref} |
| #57 | className={cn( |
| #58 | "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", |
| #59 | inset && "pl-8", |
| #60 | className |
| #61 | )} |
| #62 | {...props} |
| #63 | > |
| #64 | {children} |
| #65 | <ChevronRight className="ml-auto h-4 w-4" /> |
| #66 | </MenubarPrimitive.SubTrigger> |
| #67 | )) |
| #68 | MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName |
| #69 | |
| #70 | const MenubarSubContent = React.forwardRef< |
| #71 | React.ElementRef<typeof MenubarPrimitive.SubContent>, |
| #72 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent> |
| #73 | >(({ className, ...props }, ref) => ( |
| #74 | <MenubarPrimitive.SubContent |
| #75 | ref={ref} |
| #76 | className={cn( |
| #77 | "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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", |
| #78 | className |
| #79 | )} |
| #80 | {...props} |
| #81 | /> |
| #82 | )) |
| #83 | MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName |
| #84 | |
| #85 | const MenubarContent = React.forwardRef< |
| #86 | React.ElementRef<typeof MenubarPrimitive.Content>, |
| #87 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content> |
| #88 | >( |
| #89 | ( |
| #90 | { className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, |
| #91 | ref |
| #92 | ) => ( |
| #93 | <MenubarPrimitive.Portal> |
| #94 | <MenubarPrimitive.Content |
| #95 | ref={ref} |
| #96 | align={align} |
| #97 | alignOffset={alignOffset} |
| #98 | sideOffset={sideOffset} |
| #99 | className={cn( |
| #100 | "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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", |
| #101 | className |
| #102 | )} |
| #103 | {...props} |
| #104 | /> |
| #105 | </MenubarPrimitive.Portal> |
| #106 | ) |
| #107 | ) |
| #108 | MenubarContent.displayName = MenubarPrimitive.Content.displayName |
| #109 | |
| #110 | const MenubarItem = React.forwardRef< |
| #111 | React.ElementRef<typeof MenubarPrimitive.Item>, |
| #112 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & { |
| #113 | inset?: boolean |
| #114 | } |
| #115 | >(({ className, inset, ...props }, ref) => ( |
| #116 | <MenubarPrimitive.Item |
| #117 | ref={ref} |
| #118 | className={cn( |
| #119 | "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", |
| #120 | inset && "pl-8", |
| #121 | className |
| #122 | )} |
| #123 | {...props} |
| #124 | /> |
| #125 | )) |
| #126 | MenubarItem.displayName = MenubarPrimitive.Item.displayName |
| #127 | |
| #128 | const MenubarCheckboxItem = React.forwardRef< |
| #129 | React.ElementRef<typeof MenubarPrimitive.CheckboxItem>, |
| #130 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem> |
| #131 | >(({ className, children, checked, ...props }, ref) => ( |
| #132 | <MenubarPrimitive.CheckboxItem |
| #133 | ref={ref} |
| #134 | className={cn( |
| #135 | "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", |
| #136 | className |
| #137 | )} |
| #138 | checked={checked} |
| #139 | {...props} |
| #140 | > |
| #141 | <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"> |
| #142 | <MenubarPrimitive.ItemIndicator> |
| #143 | <Check className="h-4 w-4" /> |
| #144 | </MenubarPrimitive.ItemIndicator> |
| #145 | </span> |
| #146 | {children} |
| #147 | </MenubarPrimitive.CheckboxItem> |
| #148 | )) |
| #149 | MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName |
| #150 | |
| #151 | const MenubarRadioItem = React.forwardRef< |
| #152 | React.ElementRef<typeof MenubarPrimitive.RadioItem>, |
| #153 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem> |
| #154 | >(({ className, children, ...props }, ref) => ( |
| #155 | <MenubarPrimitive.RadioItem |
| #156 | ref={ref} |
| #157 | className={cn( |
| #158 | "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", |
| #159 | className |
| #160 | )} |
| #161 | {...props} |
| #162 | > |
| #163 | <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"> |
| #164 | <MenubarPrimitive.ItemIndicator> |
| #165 | <Circle className="h-2 w-2 fill-current" /> |
| #166 | </MenubarPrimitive.ItemIndicator> |
| #167 | </span> |
| #168 | {children} |
| #169 | </MenubarPrimitive.RadioItem> |
| #170 | )) |
| #171 | MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName |
| #172 | |
| #173 | const MenubarLabel = React.forwardRef< |
| #174 | React.ElementRef<typeof MenubarPrimitive.Label>, |
| #175 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & { |
| #176 | inset?: boolean |
| #177 | } |
| #178 | >(({ className, inset, ...props }, ref) => ( |
| #179 | <MenubarPrimitive.Label |
| #180 | ref={ref} |
| #181 | className={cn( |
| #182 | "px-2 py-1.5 text-sm font-semibold", |
| #183 | inset && "pl-8", |
| #184 | className |
| #185 | )} |
| #186 | {...props} |
| #187 | /> |
| #188 | )) |
| #189 | MenubarLabel.displayName = MenubarPrimitive.Label.displayName |
| #190 | |
| #191 | const MenubarSeparator = React.forwardRef< |
| #192 | React.ElementRef<typeof MenubarPrimitive.Separator>, |
| #193 | React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator> |
| #194 | >(({ className, ...props }, ref) => ( |
| #195 | <MenubarPrimitive.Separator |
| #196 | ref={ref} |
| #197 | className={cn("-mx-1 my-1 h-px bg-muted", className)} |
| #198 | {...props} |
| #199 | /> |
| #200 | )) |
| #201 | MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName |
| #202 | |
| #203 | const MenubarShortcut = ({ |
| #204 | className, |
| #205 | ...props |
| #206 | }: React.HTMLAttributes<HTMLSpanElement>) => { |
| #207 | return ( |
| #208 | <span |
| #209 | className={cn( |
| #210 | "ml-auto text-xs tracking-widest text-muted-foreground", |
| #211 | className |
| #212 | )} |
| #213 | {...props} |
| #214 | /> |
| #215 | ) |
| #216 | } |
| #217 | MenubarShortcut.displayname = "MenubarShortcut" |
| #218 | |
| #219 | export { |
| #220 | Menubar, |
| #221 | MenubarMenu, |
| #222 | MenubarTrigger, |
| #223 | MenubarContent, |
| #224 | MenubarItem, |
| #225 | MenubarSeparator, |
| #226 | MenubarLabel, |
| #227 | MenubarCheckboxItem, |
| #228 | MenubarRadioGroup, |
| #229 | MenubarRadioItem, |
| #230 | MenubarPortal, |
| #231 | MenubarSubContent, |
| #232 | MenubarSubTrigger, |
| #233 | MenubarGroup, |
| #234 | MenubarSub, |
| #235 | MenubarShortcut, |
| #236 | } |
| #237 |