@kubetail/ui 2.7.1 → 3.0.0-rc2
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/elements/alert.cjs +1 -1
- package/dist/elements/alert.cjs.map +1 -1
- package/dist/elements/alert.d.ts +2 -2
- package/dist/elements/alert.js +6 -12
- package/dist/elements/alert.js.map +1 -1
- package/dist/elements/avatar.cjs +1 -1
- package/dist/elements/avatar.cjs.map +1 -1
- package/dist/elements/avatar.d.ts +1 -1
- package/dist/elements/avatar.js +1 -1
- package/dist/elements/avatar.js.map +1 -1
- package/dist/elements/button.cjs +1 -1
- package/dist/elements/button.cjs.map +1 -1
- package/dist/elements/button.d.ts +5 -13
- package/dist/elements/button.js +24 -18
- package/dist/elements/button.js.map +1 -1
- package/dist/elements/card.cjs +1 -1
- package/dist/elements/card.cjs.map +1 -1
- package/dist/elements/card.d.ts +3 -1
- package/dist/elements/card.js +9 -8
- package/dist/elements/card.js.map +1 -1
- package/dist/elements/checkbox.cjs +1 -1
- package/dist/elements/checkbox.cjs.map +1 -1
- package/dist/elements/checkbox.d.ts +2 -2
- package/dist/elements/checkbox.js +4 -4
- package/dist/elements/checkbox.js.map +1 -1
- package/dist/elements/context-menu.cjs +1 -1
- package/dist/elements/context-menu.cjs.map +1 -1
- package/dist/elements/context-menu.d.ts +16 -18
- package/dist/elements/context-menu.js +52 -44
- package/dist/elements/context-menu.js.map +1 -1
- package/dist/elements/dialog.cjs +1 -1
- package/dist/elements/dialog.cjs.map +1 -1
- package/dist/elements/dialog.d.ts +12 -11
- package/dist/elements/dialog.js +47 -42
- package/dist/elements/dialog.js.map +1 -1
- package/dist/elements/dropdown-menu.cjs +1 -1
- package/dist/elements/dropdown-menu.cjs.map +1 -1
- package/dist/elements/dropdown-menu.d.ts +20 -17
- package/dist/elements/dropdown-menu.js +86 -72
- package/dist/elements/dropdown-menu.js.map +1 -1
- package/dist/elements/field.cjs +2 -0
- package/dist/elements/field.cjs.map +1 -0
- package/dist/elements/field.d.ts +24 -0
- package/dist/elements/field.js +110 -0
- package/dist/elements/field.js.map +1 -0
- package/dist/elements/form.cjs +1 -1
- package/dist/elements/form.cjs.map +1 -1
- package/dist/elements/form.d.ts +5 -4
- package/dist/elements/form.js +39 -42
- package/dist/elements/form.js.map +1 -1
- package/dist/elements/input-group.cjs +2 -0
- package/dist/elements/input-group.cjs.map +1 -0
- package/dist/elements/input-group.d.ts +18 -0
- package/dist/elements/input-group.js +80 -0
- package/dist/elements/input-group.js.map +1 -0
- package/dist/elements/input.cjs +1 -1
- package/dist/elements/input.cjs.map +1 -1
- package/dist/elements/input.js +7 -6
- package/dist/elements/input.js.map +1 -1
- package/dist/elements/label.cjs +1 -1
- package/dist/elements/label.cjs.map +1 -1
- package/dist/elements/label.d.ts +2 -2
- package/dist/elements/label.js +6 -6
- package/dist/elements/label.js.map +1 -1
- package/dist/elements/link.cjs +1 -1
- package/dist/elements/link.cjs.map +1 -1
- package/dist/elements/link.d.ts +6 -5
- package/dist/elements/link.js +18 -13
- package/dist/elements/link.js.map +1 -1
- package/dist/elements/pagination.cjs +1 -1
- package/dist/elements/pagination.cjs.map +1 -1
- package/dist/elements/pagination.d.ts +8 -5
- package/dist/elements/pagination.js +32 -26
- package/dist/elements/pagination.js.map +1 -1
- package/dist/elements/popover.cjs +1 -1
- package/dist/elements/popover.cjs.map +1 -1
- package/dist/elements/popover.d.ts +8 -5
- package/dist/elements/popover.js +13 -19
- package/dist/elements/popover.js.map +1 -1
- package/dist/elements/search-box.cjs +1 -1
- package/dist/elements/search-box.cjs.map +1 -1
- package/dist/elements/search-box.js +5 -5
- package/dist/elements/select.cjs +1 -1
- package/dist/elements/select.cjs.map +1 -1
- package/dist/elements/select.d.ts +11 -11
- package/dist/elements/select.js +49 -51
- package/dist/elements/select.js.map +1 -1
- package/dist/elements/separator.cjs +1 -1
- package/dist/elements/separator.cjs.map +1 -1
- package/dist/elements/separator.d.ts +2 -2
- package/dist/elements/separator.js +7 -6
- package/dist/elements/separator.js.map +1 -1
- package/dist/elements/sheet.cjs +1 -1
- package/dist/elements/sheet.cjs.map +1 -1
- package/dist/elements/sheet.d.ts +8 -7
- package/dist/elements/sheet.js +44 -37
- package/dist/elements/sheet.js.map +1 -1
- package/dist/elements/sidebar.cjs +1 -1
- package/dist/elements/sidebar.cjs.map +1 -1
- package/dist/elements/sidebar.d.ts +11 -16
- package/dist/elements/sidebar.js +178 -166
- package/dist/elements/sidebar.js.map +1 -1
- package/dist/elements/skeleton.cjs +1 -1
- package/dist/elements/skeleton.cjs.map +1 -1
- package/dist/elements/skeleton.js +1 -1
- package/dist/elements/skeleton.js.map +1 -1
- package/dist/elements/spinner.cjs.map +1 -1
- package/dist/elements/spinner.js.map +1 -1
- package/dist/elements/switch.cjs +1 -1
- package/dist/elements/switch.cjs.map +1 -1
- package/dist/elements/switch.d.ts +2 -2
- package/dist/elements/switch.js +3 -3
- package/dist/elements/switch.js.map +1 -1
- package/dist/elements/table.cjs +1 -1
- package/dist/elements/table.cjs.map +1 -1
- package/dist/elements/table.d.ts +1 -1
- package/dist/elements/table.js +6 -5
- package/dist/elements/table.js.map +1 -1
- package/dist/elements/tabs.cjs +1 -1
- package/dist/elements/tabs.cjs.map +1 -1
- package/dist/elements/tabs.d.ts +10 -6
- package/dist/elements/tabs.js +28 -16
- package/dist/elements/tabs.js.map +1 -1
- package/dist/elements/textarea.cjs +2 -0
- package/dist/elements/textarea.cjs.map +1 -0
- package/dist/elements/textarea.d.ts +3 -0
- package/dist/elements/textarea.js +15 -0
- package/dist/elements/textarea.js.map +1 -0
- package/dist/elements/toggle.cjs +1 -1
- package/dist/elements/toggle.cjs.map +1 -1
- package/dist/elements/toggle.d.ts +2 -2
- package/dist/elements/toggle.js +8 -8
- package/dist/elements/toggle.js.map +1 -1
- package/dist/elements/tooltip.cjs +1 -1
- package/dist/elements/tooltip.cjs.map +1 -1
- package/dist/elements/tooltip.d.ts +5 -5
- package/dist/elements/tooltip.js +18 -12
- package/dist/elements/tooltip.js.map +1 -1
- package/package.json +3 -71
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","names":[],"sources":["../../src/elements/dialog.tsx"],"sourcesContent":["'use client';\n\nimport
|
|
1
|
+
{"version":3,"file":"dialog.js","names":[],"sources":["../../src/elements/dialog.tsx"],"sourcesContent":["'use client';\n\nimport { Dialog as DialogPrimitive } from '@base-ui/react/dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { Button } from '@/elements/button';\nimport { cn } from '@/lib/utils';\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fixed inset-0 isolate z-50 bg-black/50 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button variant=\"ghost\" className=\"absolute top-2 right-2\" size=\"icon-sm\">\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </Button>\n }\n />\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"dialog-header\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n '-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && <DialogPrimitive.Close render={<Button variant=\"outline\">Close</Button>} />}\n </div>\n );\n}\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('cn-font-heading text-base leading-none font-medium', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n 'text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;AAQA,SAAS,EAAO,EAAE,GAAG,KAAqC;AACxD,QAAO,kBAAC,E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A,EACD;EACD,GAAI;YANN,CAQG,GACA,KAAmB,kBAAC,EAAgB,OAAjB,EAAuB,QAAQ,kBAAC,GAAD;GAAQ,SAAQ;aAAU;GAAc,CAAA,EAAI,CAAA,CAC3F;;;AAIV,SAAS,EAAY,EAAE,cAAW,GAAG,KAAsC;AACzE,QACE,kBAAC,EAAgB,OAAjB;EACE,aAAU;EACV,WAAW,EAAG,sDAAsD,EAAU;EAC9E,GAAI;EACJ,CAAA;;AAIN,SAAS,EAAkB,EAAE,cAAW,GAAG,KAA4C;AACrF,QACE,kBAAC,EAAgB,aAAjB;EACE,aAAU;EACV,WAAW,EACT,sGACA,EACD;EACD,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`})
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../lib/utils.cjs`);let t=require(`react/jsx-runtime`),n=require(`lucide-react`),r=require(`@base-ui/react/menu`);function i({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":`dropdown-menu`,...e})}function a({...e}){return(0,t.jsx)(r.Menu.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function o({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function s({align:n=`start`,alignOffset:i=0,side:a=`bottom`,sideOffset:o=4,className:s,...c}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:`isolate z-50 outline-none`,align:n,alignOffset:i,side:a,sideOffset:o,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":`dropdown-menu-content`,className:e.cn(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,s),...c})})})}function c({...e}){return(0,t.jsx)(r.Menu.Group,{"data-slot":`dropdown-menu-group`,...e})}function l({className:n,inset:i,...a}){return(0,t.jsx)(r.Menu.GroupLabel,{"data-slot":`dropdown-menu-label`,"data-inset":i,className:e.cn(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),...a})}function u({className:n,inset:i,variant:a=`default`,...o}){return(0,t.jsx)(r.Menu.Item,{"data-slot":`dropdown-menu-item`,"data-inset":i,"data-variant":a,className:e.cn(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,n),...o})}function d({...e}){return(0,t.jsx)(r.Menu.SubmenuRoot,{"data-slot":`dropdown-menu-sub`,...e})}function f({className:i,inset:a,children:o,...s}){return(0,t.jsxs)(r.Menu.SubmenuTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":a,className:e.cn(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),...s,children:[o,(0,t.jsx)(n.ChevronRightIcon,{className:`cn-rtl-flip ml-auto`})]})}function p({align:n=`start`,alignOffset:r=-3,side:i=`right`,sideOffset:a=0,className:o,...c}){return(0,t.jsx)(s,{"data-slot":`dropdown-menu-sub-content`,className:e.cn(`w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,o),align:n,alignOffset:r,side:i,sideOffset:a,...c})}function m({className:i,children:a,checked:o,inset:s,...c}){return(0,t.jsxs)(r.Menu.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":s,className:e.cn(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),checked:o,...c,children:[(0,t.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,t.jsx)(r.Menu.CheckboxItemIndicator,{children:(0,t.jsx)(n.CheckIcon,{})})}),a]})}function h({...e}){return(0,t.jsx)(r.Menu.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function g({className:i,children:a,inset:o,...s}){return(0,t.jsxs)(r.Menu.RadioItem,{"data-slot":`dropdown-menu-radio-item`,"data-inset":o,className:e.cn(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),...s,children:[(0,t.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,t.jsx)(r.Menu.RadioItemIndicator,{children:(0,t.jsx)(n.CheckIcon,{})})}),a]})}function _({className:n,...i}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":`dropdown-menu-separator`,className:e.cn(`-mx-1 my-1 h-px bg-border`,n),...i})}function v({className:n,...r}){return(0,t.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e.cn(`ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground`,n),...r})}exports.DropdownMenu=i,exports.DropdownMenuCheckboxItem=m,exports.DropdownMenuContent=s,exports.DropdownMenuGroup=c,exports.DropdownMenuItem=u,exports.DropdownMenuLabel=l,exports.DropdownMenuPortal=a,exports.DropdownMenuRadioGroup=h,exports.DropdownMenuRadioItem=g,exports.DropdownMenuSeparator=_,exports.DropdownMenuShortcut=v,exports.DropdownMenuSub=d,exports.DropdownMenuSubContent=p,exports.DropdownMenuSubTrigger=f,exports.DropdownMenuTrigger=o;
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.cjs","names":[],"sources":["../../src/elements/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nexport type { DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n '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',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"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\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n '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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n"],"mappings":"4RASA,SAAS,EAAa,CAAE,GAAG,GAAkE,CAC3F,OAAO,EAAA,EAAA,KAAC,EAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAI,EAAS,CAAA,CAG5E,SAAS,EAAmB,CAAE,GAAG,GAAoE,CACnG,OAAO,EAAA,EAAA,KAAC,EAAsB,OAAvB,CAA8B,YAAU,uBAAuB,GAAI,EAAS,CAAA,CAGrF,SAAS,EAAoB,CAAE,GAAG,G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
|
+
{"version":3,"file":"dropdown-menu.cjs","names":[],"sources":["../../src/elements/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {\n return <MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {\n return <MenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {\n return <MenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n align = 'start',\n alignOffset = 0,\n side = 'bottom',\n sideOffset = 4,\n className,\n ...props\n}: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.Positioner\n className=\"isolate z-50 outline-none\"\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n >\n <MenuPrimitive.Popup\n data-slot=\"dropdown-menu-content\"\n className={cn(\n 'z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n {...props}\n />\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {\n return <MenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: MenuPrimitive.GroupLabel.Props & {\n inset?: boolean;\n}) {\n return (\n <MenuPrimitive.GroupLabel\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: MenuPrimitive.Item.Props & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <MenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {\n return <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: MenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean;\n}) {\n return (\n <MenuPrimitive.SubmenuTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"cn-rtl-flip ml-auto\" />\n </MenuPrimitive.SubmenuTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n align = 'start',\n alignOffset = -3,\n side = 'right',\n sideOffset = 0,\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuContent>) {\n return (\n <DropdownMenuContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n inset?: boolean;\n}) {\n return (\n <MenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n >\n <MenuPrimitive.CheckboxItemIndicator>\n <CheckIcon />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {\n return <MenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: MenuPrimitive.RadioItem.Props & {\n inset?: boolean;\n}) {\n return (\n <MenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-radio-item-indicator\"\n >\n <MenuPrimitive.RadioItemIndicator>\n <CheckIcon />\n </MenuPrimitive.RadioItemIndicator>\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props) {\n return (\n <MenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n"],"mappings":"+PAOA,SAAS,EAAa,CAAE,GAAG,GAAmC,CAC5D,OAAO,EAAA,EAAA,KAAC,EAAA,KAAc,KAAf,CAAoB,YAAU,gBAAgB,GAAI,EAAS,CAAA,CAGpE,SAAS,EAAmB,CAAE,GAAG,GAAqC,CACpE,OAAO,EAAA,EAAA,KAAC,EAAA,KAAc,OAAf,CAAsB,YAAU,uBAAuB,GAAI,EAAS,CAAA,CAG7E,SAAS,EAAoB,CAAE,GAAG,GAAsC,CACtE,OAAO,EAAA,EAAA,KAAC,EAAA,KAAc,QAAf,CAAuB,YAAU,wBAAwB,GAAI,EAAS,CAAA,CAG/E,SAAS,EAAoB,CAC3B,QAAQ,QACR,cAAc,EACd,OAAO,SACP,aAAa,EACb,YACA,GAAG,GACiH,CACpH,OACE,EAAA,EAAA,KAAC,EAAA,KAAc,OAAf,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,KAAc,WAAf,CACE,UAAU,4BACH,QACM,cACP,OACM,uBAEZ,EAAA,EAAA,KAAC,EAAA,KAAc,MAAf,CACE,YAAU,wBACV,UAAW,EAAA,GACT,ooBACA,EACD,CACD,GAAI,EACJ,CAAA,CACuB,CAAA,CACN,CAAA,CAI3B,SAAS,EAAkB,CAAE,GAAG,GAAoC,CAClE,OAAO,EAAA,EAAA,KAAC,EAAA,KAAc,MAAf,CAAqB,YAAU,sBAAsB,GAAI,EAAS,CAAA,CAG3E,SAAS,EAAkB,CACzB,YACA,QACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,KAAC,EAAA,KAAc,WAAf,CAC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AIjC,SAAS,EAAuB,CAAE,GAAG,GAAyC,CAC5E,OAAO,EAAA,EAAA,KAAC,EAAA,KAAc,WAAf,CAA0B,YAAU,4BAA4B,GAAI,EAAS,CAAA,CAGtF,SAAS,EAAsB,CAC7B,YACA,WACA,QACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,MAAC,EAAA,KAAc,UAAf,CACE,YAAU,2BACV,aAAY,EACZ,UAAW,EAAA,GACT,6VACA,EACD,CACD,GAAI,WAPN,EASE,EAAA,EAAA,KAAC,OAAD,CACE,UAAU,wEACV,YAAU,+CAEV,EAAA,EAAA,KAAC,EAAA,KAAc,mBAAf,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,UAAD,EAAa,CAAA,CACoB,CAAA,CAC9B,CAAA,CACN,EACuB,GAI9B,SAAS,EAAsB,CAAE,YAAW,GAAG,GAAwC,CACrF,OACE,EAAA,EAAA,KAAC,EAAA,KAAc,UAAf,CACE,YAAU,0BACV,UAAW,EAAA,GAAG,4BAA6B,EAAU,CACrD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAqB,CAAE,YAAW,GAAG,GAAuC,CACnF,OACE,EAAA,EAAA,KAAC,OAAD,CACE,YAAU,yBACV,UAAW,EAAA,GACT,8GACA,EACD,CACD,GAAI,EACJ,CAAA"}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare function
|
|
4
|
-
declare function
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
|
|
1
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
2
|
+
declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: MenuPrimitive.GroupLabel.Props & {
|
|
8
|
+
inset?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: MenuPrimitive.Item.Props & {
|
|
9
11
|
inset?: boolean;
|
|
10
12
|
variant?: 'default' | 'destructive';
|
|
11
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
declare function
|
|
13
|
-
declare function
|
|
14
|
-
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
14
|
+
declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: MenuPrimitive.SubmenuTrigger.Props & {
|
|
16
16
|
inset?: boolean;
|
|
17
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
declare function
|
|
19
|
-
declare function
|
|
20
|
-
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
18
|
+
declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: React.ComponentProps<typeof DropdownMenuContent>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
|
|
22
20
|
inset?: boolean;
|
|
23
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
declare function
|
|
22
|
+
declare function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function DropdownMenuRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
25
28
|
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -1,124 +1,138 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../lib/utils.js";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
-
import { CheckIcon as r, ChevronRightIcon as i
|
|
5
|
-
import
|
|
4
|
+
import { CheckIcon as r, ChevronRightIcon as i } from "lucide-react";
|
|
5
|
+
import { Menu as a } from "@base-ui/react/menu";
|
|
6
6
|
//#region src/elements/dropdown-menu.tsx
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */ t(
|
|
7
|
+
function o({ ...e }) {
|
|
8
|
+
return /* @__PURE__ */ t(a.Root, {
|
|
9
9
|
"data-slot": "dropdown-menu",
|
|
10
10
|
...e
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */ t(
|
|
13
|
+
function s({ ...e }) {
|
|
14
|
+
return /* @__PURE__ */ t(a.Portal, {
|
|
15
15
|
"data-slot": "dropdown-menu-portal",
|
|
16
16
|
...e
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return /* @__PURE__ */ t(
|
|
19
|
+
function c({ ...e }) {
|
|
20
|
+
return /* @__PURE__ */ t(a.Trigger, {
|
|
21
21
|
"data-slot": "dropdown-menu-trigger",
|
|
22
22
|
...e
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */ t(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
function l({ align: n = "start", alignOffset: r = 0, side: i = "bottom", sideOffset: o = 4, className: s, ...c }) {
|
|
26
|
+
return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(a.Positioner, {
|
|
27
|
+
className: "isolate z-50 outline-none",
|
|
28
|
+
align: n,
|
|
29
|
+
alignOffset: r,
|
|
30
|
+
side: i,
|
|
31
|
+
sideOffset: o,
|
|
32
|
+
children: /* @__PURE__ */ t(a.Popup, {
|
|
33
|
+
"data-slot": "dropdown-menu-content",
|
|
34
|
+
className: e("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", s),
|
|
35
|
+
...c
|
|
36
|
+
})
|
|
31
37
|
}) });
|
|
32
38
|
}
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */ t(
|
|
39
|
+
function u({ ...e }) {
|
|
40
|
+
return /* @__PURE__ */ t(a.Group, {
|
|
35
41
|
"data-slot": "dropdown-menu-group",
|
|
36
42
|
...e
|
|
37
43
|
});
|
|
38
44
|
}
|
|
39
|
-
function
|
|
40
|
-
return /* @__PURE__ */ t(
|
|
45
|
+
function d({ className: n, inset: r, ...i }) {
|
|
46
|
+
return /* @__PURE__ */ t(a.GroupLabel, {
|
|
47
|
+
"data-slot": "dropdown-menu-label",
|
|
48
|
+
"data-inset": r,
|
|
49
|
+
className: e("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", n),
|
|
50
|
+
...i
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function f({ className: n, inset: r, variant: i = "default", ...o }) {
|
|
54
|
+
return /* @__PURE__ */ t(a.Item, {
|
|
41
55
|
"data-slot": "dropdown-menu-item",
|
|
42
56
|
"data-inset": r,
|
|
43
57
|
"data-variant": i,
|
|
44
|
-
className: e("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-
|
|
45
|
-
...
|
|
58
|
+
className: e("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", n),
|
|
59
|
+
...o
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function p({ ...e }) {
|
|
63
|
+
return /* @__PURE__ */ t(a.SubmenuRoot, {
|
|
64
|
+
"data-slot": "dropdown-menu-sub",
|
|
65
|
+
...e
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function m({ className: r, inset: o, children: s, ...c }) {
|
|
69
|
+
return /* @__PURE__ */ n(a.SubmenuTrigger, {
|
|
70
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
71
|
+
"data-inset": o,
|
|
72
|
+
className: e("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", r),
|
|
73
|
+
...c,
|
|
74
|
+
children: [s, /* @__PURE__ */ t(i, { className: "cn-rtl-flip ml-auto" })]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function h({ align: n = "start", alignOffset: r = -3, side: i = "right", sideOffset: a = 0, className: o, ...s }) {
|
|
78
|
+
return /* @__PURE__ */ t(l, {
|
|
79
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
80
|
+
className: e("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
|
|
81
|
+
align: n,
|
|
82
|
+
alignOffset: r,
|
|
83
|
+
side: i,
|
|
84
|
+
sideOffset: a,
|
|
85
|
+
...s
|
|
46
86
|
});
|
|
47
87
|
}
|
|
48
|
-
function
|
|
49
|
-
return /* @__PURE__ */ n(
|
|
88
|
+
function g({ className: i, children: o, checked: s, inset: c, ...l }) {
|
|
89
|
+
return /* @__PURE__ */ n(a.CheckboxItem, {
|
|
50
90
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
51
|
-
|
|
91
|
+
"data-inset": c,
|
|
92
|
+
className: e("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", i),
|
|
52
93
|
checked: s,
|
|
53
|
-
...
|
|
94
|
+
...l,
|
|
54
95
|
children: [/* @__PURE__ */ t("span", {
|
|
55
|
-
className: "pointer-events-none absolute
|
|
56
|
-
|
|
57
|
-
|
|
96
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
97
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
98
|
+
children: /* @__PURE__ */ t(a.CheckboxItemIndicator, { children: /* @__PURE__ */ t(r, {}) })
|
|
99
|
+
}), o]
|
|
58
100
|
});
|
|
59
101
|
}
|
|
60
|
-
function
|
|
61
|
-
return /* @__PURE__ */ t(
|
|
102
|
+
function _({ ...e }) {
|
|
103
|
+
return /* @__PURE__ */ t(a.RadioGroup, {
|
|
62
104
|
"data-slot": "dropdown-menu-radio-group",
|
|
63
105
|
...e
|
|
64
106
|
});
|
|
65
107
|
}
|
|
66
|
-
function
|
|
67
|
-
return /* @__PURE__ */ n(
|
|
108
|
+
function v({ className: i, children: o, inset: s, ...c }) {
|
|
109
|
+
return /* @__PURE__ */ n(a.RadioItem, {
|
|
68
110
|
"data-slot": "dropdown-menu-radio-item",
|
|
69
|
-
|
|
70
|
-
|
|
111
|
+
"data-inset": s,
|
|
112
|
+
className: e("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", i),
|
|
113
|
+
...c,
|
|
71
114
|
children: [/* @__PURE__ */ t("span", {
|
|
72
|
-
className: "pointer-events-none absolute
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
function g({ className: n, inset: r, ...i }) {
|
|
78
|
-
return /* @__PURE__ */ t(o.Label, {
|
|
79
|
-
"data-slot": "dropdown-menu-label",
|
|
80
|
-
"data-inset": r,
|
|
81
|
-
className: e("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", n),
|
|
82
|
-
...i
|
|
115
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
116
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
117
|
+
children: /* @__PURE__ */ t(a.RadioItemIndicator, { children: /* @__PURE__ */ t(r, {}) })
|
|
118
|
+
}), o]
|
|
83
119
|
});
|
|
84
120
|
}
|
|
85
|
-
function
|
|
86
|
-
return /* @__PURE__ */ t(
|
|
121
|
+
function y({ className: n, ...r }) {
|
|
122
|
+
return /* @__PURE__ */ t(a.Separator, {
|
|
87
123
|
"data-slot": "dropdown-menu-separator",
|
|
88
|
-
className: e("
|
|
124
|
+
className: e("-mx-1 my-1 h-px bg-border", n),
|
|
89
125
|
...r
|
|
90
126
|
});
|
|
91
127
|
}
|
|
92
|
-
function
|
|
128
|
+
function b({ className: n, ...r }) {
|
|
93
129
|
return /* @__PURE__ */ t("span", {
|
|
94
130
|
"data-slot": "dropdown-menu-shortcut",
|
|
95
|
-
className: e("
|
|
96
|
-
...r
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function y({ ...e }) {
|
|
100
|
-
return /* @__PURE__ */ t(o.Sub, {
|
|
101
|
-
"data-slot": "dropdown-menu-sub",
|
|
102
|
-
...e
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function b({ className: r, inset: a, children: s, ...c }) {
|
|
106
|
-
return /* @__PURE__ */ n(o.SubTrigger, {
|
|
107
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
108
|
-
"data-inset": a,
|
|
109
|
-
className: e("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", r),
|
|
110
|
-
...c,
|
|
111
|
-
children: [s, /* @__PURE__ */ t(i, { className: "ml-auto size-4" })]
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
function x({ className: n, ...r }) {
|
|
115
|
-
return /* @__PURE__ */ t(o.SubContent, {
|
|
116
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
117
|
-
className: e("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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", n),
|
|
131
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", n),
|
|
118
132
|
...r
|
|
119
133
|
});
|
|
120
134
|
}
|
|
121
135
|
//#endregion
|
|
122
|
-
export {
|
|
136
|
+
export { o as DropdownMenu, g as DropdownMenuCheckboxItem, l as DropdownMenuContent, u as DropdownMenuGroup, f as DropdownMenuItem, d as DropdownMenuLabel, s as DropdownMenuPortal, _ as DropdownMenuRadioGroup, v as DropdownMenuRadioItem, y as DropdownMenuSeparator, b as DropdownMenuShortcut, p as DropdownMenuSub, h as DropdownMenuSubContent, m as DropdownMenuSubTrigger, c as DropdownMenuTrigger };
|
|
123
137
|
|
|
124
138
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","names":[],"sources":["../../src/elements/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nexport type { DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n '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',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"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\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n '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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n"],"mappings":";;;;;;AASA,SAAS,EAAa,EAAE,GAAG,KAAkE;AAC3F,QAAO,kBAAC,EAAsB,MAAvB;EAA4B,aAAU;EAAgB,GAAI;EAAS,CAAA;;AAG5E,SAAS,EAAmB,EAAE,GAAG,KAAoE;AACnG,QAAO,kBAAC,EAAsB,QAAvB;EAA8B,aAAU;EAAuB,GAAI;EAAS,CAAA;;AAGrF,SAAS,EAAoB,EAAE,GAAG,KAAqE;AACrG,QAAO,kBAAC,EAAsB,SAAvB;EAA+B,aAAU;EAAwB,GAAI;EAAS,CAAA;;AAGvF,SAAS,EAAoB,EAC3B,cACA,gBAAa,GACb,GAAG,KAC0D;AAC7D,QACE,kBAAC,EAAsB,QAAvB,EAAA,UACE,kBAAC,EAAsB,SAAvB;EACE,aAAU;EACE;EACZ,WAAW,EACT,0jBACA,EACD;EACD,GAAI;EACJ,CAAA,EAC2B,CAAA;;AAInC,SAAS,EAAkB,EAAE,GAAG,KAAmE;AACjG,QAAO,kBAAC,EAAsB,OAAvB;EAA6B,aAAU;EAAsB,GAAI;EAAS,CAAA;;AAGnF,SAAS,EAAiB,EACxB,cACA,UACA,aAAU,WACV,GAAG,KAIF;AACD,QACE,kBAAC,EAAsB,MAAvB;EACE,aAAU;EACV,cAAY;EACZ,gBAAc;EACd,WAAW,EACT,+mBACA,EACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,EAAyB,EAChC,cACA,aACA,YACA,GAAG,KAC+D;AAClE,QACE,kBAAC,EAAsB,cAAvB;EACE,aAAU;EACV,WAAW,EACT,gTACA,EACD;EACQ;EACT,GAAI;YAPN,CASE,kBAAC,QAAD;GAAM,WAAU;aACd,kBAAC,EAAsB,eAAvB,EAAA,UACE,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA,EACI,CAAA;GACjC,CAAA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AAC,EAAsB,YAAvB;EACE,aAAU;EACV,WAAW,EACT,ifACA,EACD;EACD,GAAI;EACJ,CAAA"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","names":[],"sources":["../../src/elements/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {\n return <MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {\n return <MenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {\n return <MenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n align = 'start',\n alignOffset = 0,\n side = 'bottom',\n sideOffset = 4,\n className,\n ...props\n}: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.Positioner\n className=\"isolate z-50 outline-none\"\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n >\n <MenuPrimitive.Popup\n data-slot=\"dropdown-menu-content\"\n className={cn(\n 'z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n {...props}\n />\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {\n return <MenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: MenuPrimitive.GroupLabel.Props & {\n inset?: boolean;\n}) {\n return (\n <MenuPrimitive.GroupLabel\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: MenuPrimitive.Item.Props & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <MenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {\n return <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: MenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean;\n}) {\n return (\n <MenuPrimitive.SubmenuTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"cn-rtl-flip ml-auto\" />\n </MenuPrimitive.SubmenuTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n align = 'start',\n alignOffset = -3,\n side = 'right',\n sideOffset = 0,\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuContent>) {\n return (\n <DropdownMenuContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n inset?: boolean;\n}) {\n return (\n <MenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n >\n <MenuPrimitive.CheckboxItemIndicator>\n <CheckIcon />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {\n return <MenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: MenuPrimitive.RadioItem.Props & {\n inset?: boolean;\n}) {\n return (\n <MenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-radio-item-indicator\"\n >\n <MenuPrimitive.RadioItemIndicator>\n <CheckIcon />\n </MenuPrimitive.RadioItemIndicator>\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props) {\n return (\n <MenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n"],"mappings":";;;;;;AAOA,SAAS,EAAa,EAAE,GAAG,KAAmC;AAC5D,QAAO,kBAAC,EAAc,MAAf;EAAoB,aAAU;EAAgB,GAAI;EAAS,CAAA;;AAGpE,SAAS,EAAmB,EAAE,GAAG,KAAqC;AACpE,QAAO,kBAAC,EAAc,QAAf;EAAsB,aAAU;EAAuB,GAAI;EAAS,CAAA;;AAG7E,SAAS,EAAoB,EAAE,GAAG,KAAsC;AACtE,QAAO,kBAAC,EAAc,SAAf;EAAuB,aAAU;EAAwB,GAAI;EAAS,CAAA;;AAG/E,SAAS,EAAoB,EAC3B,WAAQ,SACR,iBAAc,GACd,UAAO,UACP,gBAAa,GACb,cACA,GAAG,KACiH;AACpH,QACE,kBAAC,EAAc,QAAf,EAAA,UACE,kBAAC,EAAc,YAAf;EACE,WAAU;EACH;EACM;EACP;EACM;YAEZ,kBAAC,EAAc,OAAf;GACE,aAAU;GACV,WAAW,EACT,qoBACA,EACD;GACD,GAAI;GACJ,CAAA;EACuB,CAAA,EACN,CAAA;;AAI3B,SAAS,EAAkB,EAAE,GAAG,KAAoC;AAClE,QAAO,kBAAC,EAAc,OAAf;EAAqB,aAAU;EAAsB,GAAI;EAAS,CAAA;;AAG3E,SAAS,EAAkB,EACzB,cACA,UACA,GAAG,KAGF;AACD,QACE,kBAAC,EAAc,YAAf;EACE,aAAU;EACV,cAAY;EACZ,WAAW,EAAG,yEAAyE,EAAU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ACZ,WAAW,EACT,8VACA,EACD;EACD,GAAI;YAPN,CASE,kBAAC,QAAD;GACE,WAAU;GACV,aAAU;aAEV,kBAAC,EAAc,oBAAf,EAAA,UACE,kBAAC,GAAD,EAAa,CAAA,EACoB,CAAA;GAC9B,CAAA,EACN,EACuB;;;AAI9B,SAAS,EAAsB,EAAE,cAAW,GAAG,KAAwC;AACrF,QACE,kBAAC,EAAc,WAAf;EACE,aAAU;EACV,WAAW,EAAG,6BAA6B,EAAU;EACrD,GAAI;EACJ,CAAA;;AAIN,SAAS,EAAqB,EAAE,cAAW,GAAG,KAAuC;AACnF,QACE,kBAAC,QAAD;EACE,aAAU;EACV,WAAW,EACT,+GACA,EACD;EACD,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../lib/utils.cjs`),t=require(`./separator.cjs`),n=require(`./label.cjs`);let r=require(`react/jsx-runtime`),i=require(`class-variance-authority`),a=require(`react`);function o({className:t,...n}){return(0,r.jsx)(`fieldset`,{"data-slot":`field-set`,className:e.cn(`flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,t),...n})}function s({className:t,variant:n=`legend`,...i}){return(0,r.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":n,className:e.cn(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,t),...i})}function c({className:t,...n}){return(0,r.jsx)(`div`,{"data-slot":`field-group`,className:e.cn(`group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,t),...n})}var l=(0,i.cva)(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function u({className:t,orientation:n=`vertical`,...i}){return(0,r.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":n,className:e.cn(l({orientation:n}),t),...i})}function d({className:t,...n}){return(0,r.jsx)(`div`,{"data-slot":`field-content`,className:e.cn(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,t),...n})}function f({className:t,...i}){return(0,r.jsx)(n.Label,{"data-slot":`field-label`,className:e.cn(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,t),...i})}function p({className:t,...n}){return(0,r.jsx)(`div`,{"data-slot":`field-label`,className:e.cn(`flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50`,t),...n})}function m({className:t,...n}){return(0,r.jsx)(`p`,{"data-slot":`field-description`,className:e.cn(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,t),...n})}function h({children:n,className:i,...a}){return(0,r.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!n,className:e.cn(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,i),...a,children:[(0,r.jsx)(t.Separator,{className:`absolute inset-0 top-1/2`}),n&&(0,r.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-muted-foreground`,"data-slot":`field-separator-content`,children:n})]})}function g({className:t,children:n,errors:i,...o}){let s=(0,a.useMemo)(()=>{if(n)return n;if(!i?.length)return null;let e=[...new Map(i.map(e=>[e?.message,e])).values()];return e?.length===1?e[0]?.message:(0,r.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map(e=>e?.message&&(0,r.jsx)(`li`,{children:e.message},e.message))})},[n,i]);return s?(0,r.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:e.cn(`text-sm font-normal text-destructive`,t),...o,children:s}):null}exports.Field=u,exports.FieldContent=d,exports.FieldDescription=m,exports.FieldError=g,exports.FieldGroup=c,exports.FieldLabel=f,exports.FieldLegend=s,exports.FieldSeparator=h,exports.FieldSet=o,exports.FieldTitle=p;
|
|
2
|
+
//# sourceMappingURL=field.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.cjs","names":[],"sources":["../../src/elements/field.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useMemo } from 'react';\n\nimport { Label } from '@/elements/label';\nimport { Separator } from '@/elements/separator';\nimport { cn } from '@/lib/utils';\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className)}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-destructive', {\n variants: {\n orientation: {\n vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',\n horizontal:\n 'flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n responsive:\n 'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn('group/field-content flex flex-1 flex-col gap-0.5 leading-snug', className)}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5',\n 'last:mt-0 nth-last-2:-mt-1',\n '[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"relative mx-auto block w-fit bg-background px-2 text-muted-foreground\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<'div'> & {\n errors?: ({ message?: string } | undefined)[];\n}) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];\n\n if (uniqueErrors?.length === 1) {\n return uniqueErrors[0]?.message;\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {uniqueErrors.map((error) => error?.message && <li key={error.message}>{error.message}</li>)}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-sm font-normal text-destructive', className)}\n {...props}\n >\n {content}\n </div>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n};\n"],"mappings":"mTASA,SAAS,EAAS,CAAE,YAAW,GAAG,GAA2C,CAC3E,OACE,EAAA,EAAA,KAAC,WAAD,CACE,YAAU,YACV,UAAW,EAAA,GACT,mGACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAY,CACnB,YACA,UAAU,SACV,GAAG,GACiE,CACpE,OACE,EAAA,EAAA,KAAC,SAAD,CACE,YAAU,eACV,eAAc,EACd,UAAW,EAAA,GAAG,kFAAmF,EAAU,CAC3G,GAAI,EACJ,CAAA,CAIN,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GACT,uIACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,IAAM,GAAA,EAAA,EAAA,KAAoB,qEAAsE,CAC9F,SAAU,CACR,YAAa,CACX,SAAU,wCACV,WACE,iLACF,WACE,gUACH,CACF,CACD,gBAAiB,CACf,YAAa,WACd,CACF,CAAC,CAEF,SAAS,EAAM,CACb,YACA,cAAc,WACd,GAAG,GACgE,CACnE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,KAAK,QACL,YAAU,QACV,mBAAkB,EAClB,UAAW,EAAA,GAAG,EAAc,CAAE,cAAa,CAAC,CAAE,EAAU,CACxD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,gBACV,UAAW,EAAA,GAAG,gEAAiE,EAAU,CACzF,GAAI,EACJ,CAAA,CAIN,SAAS,EAAW,CAAE,YAAW,GAAG,GAA6C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AC,CAMtB,OAJK,GAKH,EAAA,EAAA,KAAC,MAAD,CACE,KAAK,QACL,YAAU,cACV,UAAW,EAAA,GAAG,uCAAwC,EAAU,CAChE,GAAI,WAEH,EACG,CAAA,CAXC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Label } from '@/elements/label';
|
|
3
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<'legend'> & {
|
|
5
|
+
variant?: 'legend' | 'label';
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const fieldVariants: (props?: ({
|
|
9
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<'div'> & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<'div'> & {
|
|
20
|
+
errors?: ({
|
|
21
|
+
message?: string;
|
|
22
|
+
} | undefined)[];
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
|