@codefast/ui 0.1.12 → 0.1.13
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/chunk-5JGCIAX3.cjs +2 -0
- package/dist/chunk-5JGCIAX3.cjs.map +1 -0
- package/dist/chunk-CF44244M.js +2 -0
- package/dist/chunk-CF44244M.js.map +1 -0
- package/dist/chunk-EXOTUGK5.cjs +2 -0
- package/dist/chunk-EXOTUGK5.cjs.map +1 -0
- package/dist/chunk-FIU6XBX4.js +2 -0
- package/dist/chunk-FIU6XBX4.js.map +1 -0
- package/dist/chunk-K4DIHWHX.js +2 -0
- package/dist/chunk-K4DIHWHX.js.map +1 -0
- package/dist/chunk-KH4PSDPI.js +2 -0
- package/dist/chunk-KH4PSDPI.js.map +1 -0
- package/dist/chunk-LSBI35ZE.cjs +2 -0
- package/dist/chunk-LSBI35ZE.cjs.map +1 -0
- package/dist/chunk-O4CKTS5M.cjs +2 -0
- package/dist/chunk-O4CKTS5M.cjs.map +1 -0
- package/dist/chunk-ONMU2LFX.js +2 -0
- package/dist/chunk-ONMU2LFX.js.map +1 -0
- package/dist/chunk-SL4DH4JN.cjs +2 -0
- package/dist/chunk-SL4DH4JN.cjs.map +1 -0
- package/dist/chunk-TY2YG7LH.cjs +2 -0
- package/dist/chunk-TY2YG7LH.cjs.map +1 -0
- package/dist/chunk-V2GDHPHA.js +2 -0
- package/dist/chunk-V2GDHPHA.js.map +1 -0
- package/dist/chunk-XOSPBKAU.cjs +2 -0
- package/dist/chunk-XOSPBKAU.cjs.map +1 -0
- package/dist/chunk-YGPIWXWP.js +2 -0
- package/dist/chunk-YGPIWXWP.js.map +1 -0
- package/dist/chunk-YGWCQ264.cjs +2 -0
- package/dist/chunk-YGWCQ264.cjs.map +1 -0
- package/dist/chunk-ZBAEU4QU.js +2 -0
- package/dist/chunk-ZBAEU4QU.js.map +1 -0
- package/dist/components/alert-dialog.cjs +1 -1
- package/dist/components/alert-dialog.cjs.map +1 -1
- package/dist/components/alert-dialog.d.cts +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/badge.cjs +1 -1
- package/dist/components/badge.cjs.map +1 -1
- package/dist/components/badge.d.cts +98 -4
- package/dist/components/badge.d.ts +98 -4
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.cjs +1 -1
- package/dist/components/breadcrumb.cjs.map +1 -1
- package/dist/components/breadcrumb.d.cts +1 -1
- package/dist/components/breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.cjs.map +1 -1
- package/dist/components/button.d.cts +8 -176
- package/dist/components/button.d.ts +8 -176
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.cjs.map +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.cjs +1 -1
- package/dist/components/card.cjs.map +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.cjs +1 -1
- package/dist/components/carousel.cjs.map +1 -1
- package/dist/components/carousel.d.cts +1 -0
- package/dist/components/carousel.d.ts +1 -0
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/checkbox-cards.cjs +1 -1
- package/dist/components/checkbox-cards.cjs.map +1 -1
- package/dist/components/checkbox-cards.js +1 -1
- package/dist/components/checkbox-cards.js.map +1 -1
- package/dist/components/checkbox-group.cjs +1 -1
- package/dist/components/checkbox-group.cjs.map +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.cjs.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/command.cjs +1 -1
- package/dist/components/command.cjs.map +1 -1
- package/dist/components/command.d.cts +1 -1
- package/dist/components/command.d.ts +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.cjs +1 -1
- package/dist/components/context-menu.cjs.map +1 -1
- package/dist/components/context-menu.js +1 -1
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.cjs.map +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.cjs.map +1 -1
- package/dist/components/dialog.d.cts +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.cjs.map +1 -1
- package/dist/components/drawer.d.cts +2 -4
- package/dist/components/drawer.d.ts +2 -4
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/form.cjs +1 -1
- package/dist/components/form.cjs.map +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/form.js.map +1 -1
- package/dist/components/menubar.cjs +1 -1
- package/dist/components/menubar.cjs.map +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/navigation-menu.cjs +1 -1
- package/dist/components/navigation-menu.cjs.map +1 -1
- package/dist/components/navigation-menu.d.cts +1 -4
- package/dist/components/navigation-menu.d.ts +1 -4
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.cjs.map +1 -1
- package/dist/components/number-input.d.cts +1 -2
- package/dist/components/number-input.d.ts +1 -2
- package/dist/components/number-input.js +1 -1
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/pagination.cjs +1 -1
- package/dist/components/pagination.cjs.map +1 -1
- package/dist/components/pagination.d.cts +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/radio-cards.cjs +1 -1
- package/dist/components/radio-cards.cjs.map +1 -1
- package/dist/components/radio-cards.js +1 -1
- package/dist/components/radio-cards.js.map +1 -1
- package/dist/components/radio-group.cjs.map +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/radio.cjs.map +1 -1
- package/dist/components/radio.js.map +1 -1
- package/dist/components/scroll-area.cjs +1 -1
- package/dist/components/scroll-area.cjs.map +1 -1
- package/dist/components/scroll-area.d.cts +24 -24
- package/dist/components/scroll-area.d.ts +24 -24
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.cjs.map +1 -1
- package/dist/components/select.d.cts +7 -2
- package/dist/components/select.d.ts +7 -2
- package/dist/components/select.js +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.cjs.map +1 -1
- package/dist/components/separator.d.cts +2 -2
- package/dist/components/separator.d.ts +2 -2
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.cjs +1 -1
- package/dist/components/sheet.cjs.map +1 -1
- package/dist/components/sheet.d.cts +5 -5
- package/dist/components/sheet.d.ts +5 -5
- package/dist/components/sheet.js +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/skeleton.cjs +1 -1
- package/dist/components/skeleton.cjs.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.cjs +1 -1
- package/dist/components/slider.cjs.map +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/spinner.cjs +1 -1
- package/dist/components/spinner.d.cts +2 -3
- package/dist/components/spinner.d.ts +2 -3
- package/dist/components/spinner.js +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.cjs.map +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.cjs +1 -1
- package/dist/components/table.cjs.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.cjs +1 -1
- package/dist/components/tabs.cjs.map +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.cjs.map +1 -1
- package/dist/components/text-input.d.cts +4 -148
- package/dist/components/text-input.d.ts +4 -148
- package/dist/components/text-input.js +1 -1
- package/dist/components/text-input.js.map +1 -1
- package/dist/components/textarea.cjs +1 -1
- package/dist/components/textarea.cjs.map +1 -1
- package/dist/components/textarea.d.cts +70 -1
- package/dist/components/textarea.d.ts +70 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toggle-group.cjs +1 -1
- package/dist/components/toggle-group.cjs.map +1 -1
- package/dist/components/toggle-group.d.cts +6 -4
- package/dist/components/toggle-group.d.ts +6 -4
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.cjs +1 -1
- package/dist/components/toggle.cjs.map +1 -1
- package/dist/components/toggle.d.cts +9 -78
- package/dist/components/toggle.d.ts +9 -78
- package/dist/components/toggle.js +1 -1
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.cjs +1 -1
- package/dist/components/tooltip.cjs.map +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/styles/button-variants.cjs +2 -0
- package/dist/styles/button-variants.cjs.map +1 -0
- package/dist/styles/button-variants.d.cts +169 -0
- package/dist/styles/button-variants.d.ts +169 -0
- package/dist/styles/button-variants.js +2 -0
- package/dist/styles/button-variants.js.map +1 -0
- package/dist/styles/input-variants.cjs +2 -0
- package/dist/styles/input-variants.cjs.map +1 -0
- package/dist/styles/input-variants.d.cts +206 -0
- package/dist/styles/input-variants.d.ts +206 -0
- package/dist/styles/input-variants.js +2 -0
- package/dist/styles/input-variants.js.map +1 -0
- package/dist/styles/toggle-variants.cjs +2 -0
- package/dist/styles/toggle-variants.cjs.map +1 -0
- package/dist/styles/toggle-variants.d.cts +162 -0
- package/dist/styles/toggle-variants.d.ts +162 -0
- package/dist/styles/toggle-variants.js +2 -0
- package/dist/styles/toggle-variants.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +27 -15
- package/dist/chunk-3JEWSESW.js +0 -2
- package/dist/chunk-3JEWSESW.js.map +0 -1
- package/dist/chunk-45RTVSFM.cjs +0 -2
- package/dist/chunk-45RTVSFM.cjs.map +0 -1
- package/dist/chunk-5KZCIWAV.js +0 -2
- package/dist/chunk-5KZCIWAV.js.map +0 -1
- package/dist/chunk-5ZAKR3XH.cjs +0 -2
- package/dist/chunk-5ZAKR3XH.cjs.map +0 -1
- package/dist/chunk-6ZQPOY3K.js +0 -2
- package/dist/chunk-6ZQPOY3K.js.map +0 -1
- package/dist/chunk-7RRBAIQ7.cjs +0 -2
- package/dist/chunk-7RRBAIQ7.cjs.map +0 -1
- package/dist/chunk-BRPTDZJD.cjs +0 -2
- package/dist/chunk-BRPTDZJD.cjs.map +0 -1
- package/dist/chunk-EJGO273X.cjs +0 -2
- package/dist/chunk-EJGO273X.cjs.map +0 -1
- package/dist/chunk-MTBVDSX3.cjs +0 -2
- package/dist/chunk-MTBVDSX3.cjs.map +0 -1
- package/dist/chunk-OR7UIMKG.js +0 -2
- package/dist/chunk-OR7UIMKG.js.map +0 -1
- package/dist/chunk-P5HEZNFY.js +0 -2
- package/dist/chunk-P5HEZNFY.js.map +0 -1
- package/dist/chunk-U2N42HZL.js +0 -2
- package/dist/chunk-U2N42HZL.js.map +0 -1
- package/dist/chunk-UBXOV4I5.cjs +0 -2
- package/dist/chunk-UBXOV4I5.cjs.map +0 -1
- package/dist/chunk-Y3KLZDCA.js +0 -2
- package/dist/chunk-Y3KLZDCA.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/drawer.cjs","../../src/components/drawer.tsx"],"names":["Drawer","shouldScaleBackground","props","jsx","DrawerPrimitive","DrawerTrigger","DrawerContent","children","className","forwardedRef","jsxs","cn","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","DrawerDescription","DrawerClose","size","variant","buttonVariants"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/drawer.cjs","../../src/components/drawer.tsx"],"names":["Drawer","shouldScaleBackground","props","jsx","DrawerPrimitive","DrawerTrigger","DrawerContent","children","className","forwardedRef","jsxs","cn","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","DrawerDescription","DrawerClose","size","variant","buttonVariants"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,yDAA0C,uECEzE,4BACmB,+CAWjC,SADAA,CAAAA,CAAO,CAAE,qBAAA,CAAAC,CAAAA,CAAwB,CAAA,CAAA,CAAM,GAAGC,CAAM,CAAA,CAAmC,CAC1F,OAAOC,6BAAAA,YAACC,CAAgB,IAAA,CAAhB,CAAqB,qBAAA,CAAuBH,CAAAA,CAAwB,GAAGC,CAAAA,CAAO,CACxF,CAOA,IAAMG,CAAAA,CAAgBD,YAAAA,CAAgB,OAAA,CAShCE,CAAAA,yBAAsB,CAAA,CAAA,UAAA,CAC1B,CAAC,CAAE,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAAA,CAAW,GAAGN,CAAM,CAAA,CAAGO,CAAAA,CAAAA,EAClCC,8BAAAA,YAACN,CAAgB,MAAA,CAAhB,CACC,QAAA,CAAA,CAAAD,6BAAAA,YAACC,CAAgB,OAAA,CAAhB,CAAwB,SAAA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,GAAGN,CAAAA,CACN,CACD,CAAA,CAEDa,CAAAA,CAAY,WAAA,CAAcX,YAAAA,CAAgB,KAAA,CAAM,WAAA,CAShD,IAAMY,CAAAA,CAA0B,CAAA,CAAA,UAAA,CAC9B,CAAC,CAAE,SAAA,CAAAR,CAAAA,CAAW,GAAGN,CAAM,CAAA,CAAGO,CAAAA,CAAAA,EACxBN,6BAAAA,YAACC,CAAgB,WAAA,CAAhB,CACC,GAAA,CAAKK,CAAAA,CACL,SAAA,CAAWE,iCAAAA,+BAAG,CAAiCH,CAAS,CAAA,CACvD,GAAGN,CAAAA,CACN,CAEJ,CAAA,CAEAc,CAAAA,CAAkB,WAAA,CAAcZ,YAAAA,CAAgB,WAAA,CAAY,WAAA,CAa5D,IAAMa,CAAAA,CAAoB,CAAA,CAAA,UAAA,CACxB,CAAC,CAAE,SAAA,CAAAT,CAAAA,CAAW,IAAA,CAAAU,CAAAA,CAAM,OAAA,CAAAC,CAAAA,CAAU,SAAA,CAAW,GAAGjB,CAAM,CAAA,CAAGO,CAAAA,CAAAA,EACnDN,6BAAAA,YAACC,CAAgB,KAAA,CAAhB,CAAsB,GAAA,CAAKK,CAAAA,CAAc,SAAA,CAAWW,iCAAAA,CAAiB,SAAA,CAAAZ,CAAAA,CAAW,IAAA,CAAAU,CAAAA,CAAM,OAAA,CAAAC,CAAQ,CAAC,CAAA,CAAI,GAAGjB,CAAAA,CAAO,CAElH,CAAA,CAEAe,CAAAA,CAAY,WAAA,CAAcb,YAAAA,CAAgB,KAAA,CAAM,WAAA,CAAA,sOAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/drawer.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/styles/button-variants';\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = 'DrawerContent';\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerBody\n * -------------------------------------------------------------------------- */\n\ntype DrawerBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerBody({ className, ...props }: DrawerBodyProps): React.JSX.Element {\n return <main className={cn('overflow-auto px-4 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn('mt-auto flex flex-col-reverse gap-2 p-4', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Title\n ref={forwardedRef}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseElement = React.ElementRef<typeof DrawerPrimitive.Close>;\n\ninterface DrawerCloseProps extends React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst DrawerClose = React.forwardRef<DrawerCloseElement, DrawerCloseProps>(\n ({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <DrawerPrimitive.Close ref={forwardedRef} className={buttonVariants({ className, size, variant })} {...props} />\n ),\n);\n\nDrawerClose.displayName = DrawerPrimitive.Close.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerBody,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerBodyProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
4
|
-
import { ButtonVariantsProps } from '
|
|
4
|
+
import { ButtonVariantsProps } from '../styles/button-variants.cjs';
|
|
5
5
|
import 'tailwind-variants';
|
|
6
6
|
import 'tailwind-variants/dist/config.js';
|
|
7
7
|
|
|
@@ -10,9 +10,7 @@ declare function Drawer({ shouldScaleBackground, ...props }: DrawerProps): React
|
|
|
10
10
|
type DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Trigger>;
|
|
11
11
|
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
type DrawerContentProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Content>;
|
|
13
|
-
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
14
|
-
onAnimationEnd?: (open: boolean) => void;
|
|
15
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
14
|
type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
17
15
|
declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element;
|
|
18
16
|
type DrawerBodyProps = React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
4
|
-
import { ButtonVariantsProps } from '
|
|
4
|
+
import { ButtonVariantsProps } from '../styles/button-variants.js';
|
|
5
5
|
import 'tailwind-variants';
|
|
6
6
|
import 'tailwind-variants/dist/config.js';
|
|
7
7
|
|
|
@@ -10,9 +10,7 @@ declare function Drawer({ shouldScaleBackground, ...props }: DrawerProps): React
|
|
|
10
10
|
type DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Trigger>;
|
|
11
11
|
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
type DrawerContentProps = React.ComponentPropsWithoutRef<typeof Drawer$1.Content>;
|
|
13
|
-
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
14
|
-
onAnimationEnd?: (open: boolean) => void;
|
|
15
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
14
|
type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
17
15
|
declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element;
|
|
18
16
|
type DrawerBodyProps = React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as p}from"../chunk-
|
|
1
|
+
"use client";import{a as p}from"../chunk-YGPIWXWP.js";import{a as i}from"../chunk-VRBUDJBH.js";import*as n from"react";import{Drawer as t}from"vaul";import{jsx as o,jsxs as l}from"react/jsx-runtime";function R({shouldScaleBackground:e=!0,...r}){return o(t.Root,{shouldScaleBackground:e,...r})}var u=t.Trigger,D=n.forwardRef(({children:e,className:r,...a},s)=>l(t.Portal,{children:[o(t.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),l(t.Content,{ref:s,className:i("bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...a,children:[o("div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function C({className:e,...r}){return o("div",{className:i("grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function v({className:e,...r}){return o("main",{className:i("overflow-auto px-4 py-2",e),...r})}function g({className:e,...r}){return o("div",{className:i("mt-auto flex flex-col-reverse gap-2 p-4",e),...r})}var w=n.forwardRef(({className:e,...r},a)=>o(t.Title,{ref:a,className:i("text-lg font-semibold leading-none tracking-tight",e),...r}));w.displayName=t.Title.displayName;var c=n.forwardRef(({className:e,...r},a)=>o(t.Description,{ref:a,className:i("text-muted-foreground text-sm",e),...r}));c.displayName=t.Description.displayName;var f=n.forwardRef(({className:e,size:r,variant:a="outline",...s},m)=>o(t.Close,{ref:m,className:p({className:e,size:r,variant:a}),...s}));f.displayName=t.Close.displayName;export{R as Drawer,v as DrawerBody,f as DrawerClose,D as DrawerContent,c as DrawerDescription,g as DrawerFooter,C as DrawerHeader,w as DrawerTitle,u as DrawerTrigger};
|
|
2
2
|
//# sourceMappingURL=drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/
|
|
1
|
+
{"version":3,"sources":["../../src/components/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/styles/button-variants';\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = 'DrawerContent';\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerBody\n * -------------------------------------------------------------------------- */\n\ntype DrawerBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerBody({ className, ...props }: DrawerBodyProps): React.JSX.Element {\n return <main className={cn('overflow-auto px-4 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn('mt-auto flex flex-col-reverse gap-2 p-4', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Title\n ref={forwardedRef}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseElement = React.ElementRef<typeof DrawerPrimitive.Close>;\n\ninterface DrawerCloseProps extends React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst DrawerClose = React.forwardRef<DrawerCloseElement, DrawerCloseProps>(\n ({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <DrawerPrimitive.Close ref={forwardedRef} className={buttonVariants({ className, size, variant })} {...props} />\n ),\n);\n\nDrawerClose.displayName = DrawerPrimitive.Close.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerBody,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerBodyProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":"+FAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAWjC,cAAAC,EAqBH,QAAAC,MArBG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACK,EAAgB,KAAhB,CAAqB,sBAAuBF,EA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EAAoB,aACxB,CAAC,CAAE,UAAAR,EAAW,KAAAS,EAAM,QAAAC,EAAU,UAAW,GAAGf,CAAM,EAAGM,IACnDV,EAACK,EAAgB,MAAhB,CAAsB,IAAKK,EAAc,UAAWU,EAAe,CAAE,UAAAX,EAAW,KAAAS,EAAM,QAAAC,CAAQ,CAAC,EAAI,GAAGf,EAAO,CAElH,EAEAa,EAAY,YAAcZ,EAAgB,MAAM","names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerContent","children","className","forwardedRef","cn","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","DrawerDescription","DrawerClose","size","variant","buttonVariants"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkXOSPBKAUcjs = require('../chunk-XOSPBKAU.cjs');require('../chunk-4XRBMJ5Q.cjs');exports.DropdownMenu = _chunkXOSPBKAUcjs.a; exports.DropdownMenuCheckboxItem = _chunkXOSPBKAUcjs.j; exports.DropdownMenuContent = _chunkXOSPBKAUcjs.h; exports.DropdownMenuGroup = _chunkXOSPBKAUcjs.c; exports.DropdownMenuItem = _chunkXOSPBKAUcjs.i; exports.DropdownMenuLabel = _chunkXOSPBKAUcjs.l; exports.DropdownMenuRadioGroup = _chunkXOSPBKAUcjs.e; exports.DropdownMenuRadioItem = _chunkXOSPBKAUcjs.k; exports.DropdownMenuSeparator = _chunkXOSPBKAUcjs.m; exports.DropdownMenuShortcut = _chunkXOSPBKAUcjs.n; exports.DropdownMenuSub = _chunkXOSPBKAUcjs.d; exports.DropdownMenuSubContent = _chunkXOSPBKAUcjs.g; exports.DropdownMenuSubTrigger = _chunkXOSPBKAUcjs.f; exports.DropdownMenuTrigger = _chunkXOSPBKAUcjs.b;
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-
|
|
1
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-ZBAEU4QU.js";import"../chunk-VRBUDJBH.js";export{a as DropdownMenu,j as DropdownMenuCheckboxItem,h as DropdownMenuContent,c as DropdownMenuGroup,i as DropdownMenuItem,l as DropdownMenuLabel,e as DropdownMenuRadioGroup,k as DropdownMenuRadioItem,m as DropdownMenuSeparator,n as DropdownMenuShortcut,d as DropdownMenuSub,g as DropdownMenuSubContent,f as DropdownMenuSubTrigger,b as DropdownMenuTrigger};
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.js.map
|
package/dist/components/form.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkISHID3OHcjs = require('../chunk-ISHID3OH.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkISHID3OHcjs = require('../chunk-ISHID3OH.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var a = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reacthookform = require('react-hook-form');var _reactcontext = require('@radix-ui/react-context');var _lodash = require('lodash');var _jsxruntime = require('react/jsx-runtime');var J=_reacthookform.FormProvider,y="FormField",[I,X]=_reactcontext.createContextScope.call(void 0, y),[V,M]=I(y);function F(o,r){let{id:e}=S(o,r);return{formDescriptionId:`form-item-description-${e}`,formItemId:`form-item-${e}`,formMessageId:`form-item-message-${e}`,id:e}}function k(o){let{__scopeFormField:r,...e}=o;return _jsxruntime.jsx.call(void 0, V,{name:e.name,scope:r,children:_jsxruntime.jsx.call(void 0, _reacthookform.Controller,{...e})})}var R="FormItem",[x,S]=I(R),b= exports.FormItem =a.forwardRef(({__scopeFormField:o,className:r,...e},t)=>{let s=a.useId();return _jsxruntime.jsx.call(void 0, x,{id:s,scope:o,children:_jsxruntime.jsx.call(void 0, "div",{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "space-y-2",r),...e})})});b.displayName=R;var D="FormLabel",h= exports.FormLabel =a.forwardRef(({__scopeFormField:o,...r},e)=>{let{formItemId:t}=F(l,o);return _jsxruntime.jsx.call(void 0, _chunkISHID3OHcjs.a,{ref:e,htmlFor:t,...r})});h.displayName=D;var E="FormControl",v= exports.FormControl =a.forwardRef(({__scopeFormField:o,...r},e)=>{let{formItemId:t,formDescriptionId:s,formMessageId:d}=F(l,o),{name:i}=M(E,o),{errors:n}=_reacthookform.useFormState.call(void 0, {name:i});return _jsxruntime.jsx.call(void 0, _reactslot.Slot,{ref:e,"aria-describedby":n[i]?`${s} ${d}`:s,"aria-invalid":!!n[i],id:t,...r})});v.displayName=E;var _="FormDescription",A= exports.FormDescription =a.forwardRef(({__scopeFormField:o,className:r,...e},t)=>{let{formDescriptionId:s}=F(l,o);return _jsxruntime.jsx.call(void 0, "p",{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground text-xs",r),id:s,...e})});A.displayName=_;var l="FormMessage",H= exports.FormMessage =a.forwardRef(({__scopeFormField:o,children:r,className:e,...t},s)=>{let{formMessageId:d}=F(l,o),{name:i}=M(l,o),{errors:n}=_reacthookform.useFormState.call(void 0, {name:i}),c=_lodash.result.call(void 0, n,i),P=_optionalChain([c, 'optionalAccess', _2 => _2.message])?String(c.message):r;return P?_jsxruntime.jsx.call(void 0, "p",{ref:s,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-xs",_optionalChain([c, 'optionalAccess', _3 => _3.message])?"text-destructive font-medium":"text-muted-foreground",e),id:d,...t,children:P}):null});H.displayName=l;exports.Form = J; exports.FormControl = v; exports.FormDescription = A; exports.FormField = k; exports.FormItem = b; exports.FormLabel = h; exports.FormMessage = H; exports.createFormFieldScope = X;
|
|
2
2
|
//# sourceMappingURL=form.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/form.cjs","../../src/components/form.tsx"],"names":["Form","FormProvider","FORM_FIELD_NAME","createFormFieldContext","createFormFieldScope","createContextScope","FormFieldProvider","useFormFieldContext","useFormItem","consumerName","scope","id","useFormItemContext"],"mappings":"AAAA,22BAAY,CAAC,yDAAyC,yDAA0C,uECEzE,iDACF,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/form.cjs","../../src/components/form.tsx"],"names":["Form","FormProvider","FORM_FIELD_NAME","createFormFieldContext","createFormFieldScope","createContextScope","FormFieldProvider","useFormFieldContext","useFormItem","consumerName","scope","id","useFormItemContext"],"mappings":"AAAA,22BAAY,CAAC,yDAAyC,yDAA0C,uECEzE,iDACF,gDASd,uDAEwC,gCACxB,+CA8DjB,IArDAA,CAAAA,CAAOC,2BAAAA,CAMPC,CAAAA,CAAkB,WAAA,CAIlB,CAACC,CAAAA,CAAwBC,CAAoB,CAAA,CAAIC,8CAAAA,CAAkC,CAAA,CASnF,CAACC,CAAAA,CAAmBC,CAAmB,CAAA,CAAIJ,CAAAA,CAA8CD,CAAe,CAAA,CAE9G,SAASM,CAAAA,CACPC,CAAAA,CACAC,CAAAA,CAMA,CACA,GAAM,CAAE,EAAA,CAAAC,CAAG,CAAA,CAAIC,CAAAA,CAAmBH,CAAAA,CAAcC,CAAK,CAAA,CAErD,MAAO,CACL,iBAAA,CAAmB,CAAA,sBAAA,EAAyBC,CAAE,CAAA,CAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/form.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type GlobalError,\n useFormState,\n} from 'react-hook-form';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { result } from 'lodash';\nimport { cn } from '@/lib/utils';\nimport { Label } from '@/components/label';\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\nconst FORM_FIELD_NAME = 'FormField';\n\ntype ScopedProps<P> = P & { __scopeFormField?: Scope };\n\nconst [createFormFieldContext, createFormFieldScope] = createContextScope(FORM_FIELD_NAME);\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst [FormFieldProvider, useFormFieldContext] = createFormFieldContext<FormFieldContextValue>(FORM_FIELD_NAME);\n\nfunction useFormItem(\n consumerName: string,\n scope: Scope,\n): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n} {\n const { id } = useFormItemContext(consumerName, scope);\n\n return {\n formDescriptionId: `form-item-description-${id}`,\n formItemId: `form-item-${id}`,\n formMessageId: `form-item-message-${id}`,\n id,\n };\n}\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(formFieldProps: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n const { __scopeFormField, ...props } = formFieldProps as ScopedProps<FormFieldProps<TFieldValues, TName>>;\n\n return (\n <FormFieldProvider name={props.name} scope={__scopeFormField}>\n <Controller {...props} />\n </FormFieldProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\nconst FORM_ITEM_NAME = 'FormItem';\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst [FormItemProvider, useFormItemContext] = createFormFieldContext<FormItemContextValue>(FORM_ITEM_NAME);\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(\n ({ __scopeFormField, className, ...props }: ScopedProps<FormItemProps>, forwardedRef) => {\n const id = React.useId();\n\n return (\n <FormItemProvider id={id} scope={__scopeFormField}>\n <div ref={forwardedRef} className={cn('space-y-2', className)} {...props} />\n </FormItemProvider>\n );\n },\n);\n\nFormItem.displayName = FORM_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\nconst FORM_LABEL_NAME = 'FormLabel';\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(\n ({ __scopeFormField, ...props }: ScopedProps<FormLabelProps>, forwardedRef) => {\n const { formItemId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n\n return <Label ref={forwardedRef} htmlFor={formItemId} {...props} />;\n },\n);\n\nFormLabel.displayName = FORM_LABEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\nconst FORM_CONTROL_NAME = 'FormControl';\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(\n ({ __scopeFormField, ...props }: ScopedProps<FormControlProps>, forwardedRef) => {\n const { formItemId, formDescriptionId, formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_CONTROL_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n\n return (\n <Slot\n ref={forwardedRef}\n aria-describedby={!errors[name] ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(errors[name])}\n id={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = FORM_CONTROL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\nconst FORM_DESCRIPTION_NAME = 'FormDescription';\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ __scopeFormField, className, ...props }: ScopedProps<FormDescriptionProps>, forwardedRef) => {\n const { formDescriptionId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-muted-foreground text-xs', className)}\n id={formDescriptionId}\n {...props}\n />\n );\n },\n);\n\nFormDescription.displayName = FORM_DESCRIPTION_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\nconst FORM_MESSAGE_NAME = 'FormMessage';\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ __scopeFormField, children, className, ...props }: ScopedProps<FormMessageProps>, forwardedRef) => {\n const { formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_MESSAGE_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n const error = result<GlobalError | null>(errors, name);\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-xs', error?.message ? 'text-destructive font-medium' : 'text-muted-foreground', className)}\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = FORM_MESSAGE_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createFormFieldScope,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
|
package/dist/components/form.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as
|
|
1
|
+
"use client";import{a as f}from"../chunk-YHZ3FJ6Z.js";import{a as p}from"../chunk-VRBUDJBH.js";import*as a from"react";import{Slot as T}from"@radix-ui/react-slot";import{Controller as g,FormProvider as C,useFormState as u}from"react-hook-form";import{createContextScope as L}from"@radix-ui/react-context";import{result as N}from"lodash";import{jsx as m}from"react/jsx-runtime";var J=C,y="FormField",[I,X]=L(y),[V,M]=I(y);function F(o,r){let{id:e}=S(o,r);return{formDescriptionId:`form-item-description-${e}`,formItemId:`form-item-${e}`,formMessageId:`form-item-message-${e}`,id:e}}function k(o){let{__scopeFormField:r,...e}=o;return m(V,{name:e.name,scope:r,children:m(g,{...e})})}var R="FormItem",[x,S]=I(R),b=a.forwardRef(({__scopeFormField:o,className:r,...e},t)=>{let s=a.useId();return m(x,{id:s,scope:o,children:m("div",{ref:t,className:p("space-y-2",r),...e})})});b.displayName=R;var D="FormLabel",h=a.forwardRef(({__scopeFormField:o,...r},e)=>{let{formItemId:t}=F(l,o);return m(f,{ref:e,htmlFor:t,...r})});h.displayName=D;var E="FormControl",v=a.forwardRef(({__scopeFormField:o,...r},e)=>{let{formItemId:t,formDescriptionId:s,formMessageId:d}=F(l,o),{name:i}=M(E,o),{errors:n}=u({name:i});return m(T,{ref:e,"aria-describedby":n[i]?`${s} ${d}`:s,"aria-invalid":!!n[i],id:t,...r})});v.displayName=E;var _="FormDescription",A=a.forwardRef(({__scopeFormField:o,className:r,...e},t)=>{let{formDescriptionId:s}=F(l,o);return m("p",{ref:t,className:p("text-muted-foreground text-xs",r),id:s,...e})});A.displayName=_;var l="FormMessage",H=a.forwardRef(({__scopeFormField:o,children:r,className:e,...t},s)=>{let{formMessageId:d}=F(l,o),{name:i}=M(l,o),{errors:n}=u({name:i}),c=N(n,i),P=c?.message?String(c.message):r;return P?m("p",{ref:s,className:p("text-xs",c?.message?"text-destructive font-medium":"text-muted-foreground",e),id:d,...t,children:P}):null});H.displayName=l;export{J as Form,v as FormControl,A as FormDescription,k as FormField,b as FormItem,h as FormLabel,H as FormMessage,X as createFormFieldScope};
|
|
2
2
|
//# sourceMappingURL=form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormState,\n} from 'react-hook-form';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '@/lib/utils';\nimport { Label } from '@/components/label';\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\nconst FORM_FIELD_NAME = 'FormField';\n\ntype ScopedProps<P> = P & { __scopeFormField?: Scope };\n\nconst [createFormFieldContext, createFormFieldScope] = createContextScope(FORM_FIELD_NAME);\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst [FormFieldProvider, useFormFieldContext] = createFormFieldContext<FormFieldContextValue>(FORM_FIELD_NAME);\n\nfunction useFormItem(\n consumerName: string,\n scope: Scope,\n): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n} {\n const { id } = useFormItemContext(consumerName, scope);\n\n return {\n formDescriptionId: `form-item-description-${id}`,\n formItemId: `form-item-${id}`,\n formMessageId: `form-item-message-${id}`,\n id,\n };\n}\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(formFieldProps: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n const { __scopeFormField, ...props } = formFieldProps as ScopedProps<FormFieldProps<TFieldValues, TName>>;\n\n return (\n <FormFieldProvider name={props.name} scope={__scopeFormField}>\n <Controller {...props} />\n </FormFieldProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\nconst FORM_ITEM_NAME = 'FormItem';\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst [FormItemProvider, useFormItemContext] = createFormFieldContext<FormItemContextValue>(FORM_ITEM_NAME);\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(\n ({ __scopeFormField, className, ...props }: ScopedProps<FormItemProps>, forwardedRef) => {\n const id = React.useId();\n\n return (\n <FormItemProvider id={id} scope={__scopeFormField}>\n <div ref={forwardedRef} className={cn('space-y-2', className)} {...props} />\n </FormItemProvider>\n );\n },\n);\n\nFormItem.displayName = FORM_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\nconst FORM_LABEL_NAME = 'FormLabel';\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(\n ({ __scopeFormField, className, ...props }: ScopedProps<FormLabelProps>, forwardedRef) => {\n const { formItemId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_LABEL_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n\n return (\n <Label\n ref={forwardedRef}\n className={cn(errors[name] && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormLabel.displayName = FORM_LABEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\nconst FORM_CONTROL_NAME = 'FormControl';\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(\n ({ __scopeFormField, ...props }: ScopedProps<FormControlProps>, forwardedRef) => {\n const { formItemId, formDescriptionId, formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_CONTROL_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n\n return (\n <Slot\n ref={forwardedRef}\n aria-describedby={!errors[name] ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(errors[name])}\n id={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = FORM_CONTROL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\nconst FORM_DESCRIPTION_NAME = 'FormDescription';\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ __scopeFormField, className, ...props }: ScopedProps<FormDescriptionProps>, forwardedRef) => {\n const { formDescriptionId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-muted-foreground text-xs', className)}\n id={formDescriptionId}\n {...props}\n />\n );\n },\n);\n\nFormDescription.displayName = FORM_DESCRIPTION_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\nconst FORM_MESSAGE_NAME = 'FormMessage';\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ __scopeFormField, children, className, ...props }: ScopedProps<FormMessageProps>, forwardedRef) => {\n const { formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_MESSAGE_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n const body = errors[name]?.message ? String(errors[name].message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={forwardedRef}\n className={cn(\n 'text-xs',\n errors[name]?.message ? 'text-destructive font-medium' : 'text-muted-foreground',\n className,\n )}\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = FORM_MESSAGE_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createFormFieldScope,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"],"mappings":"+FAEA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAIA,gBAAAC,EACA,gBAAAC,MACK,kBAEP,OAAS,sBAAAC,MAAsC,0BA8DzC,cAAAC,MAAA,oBArDN,IAAMC,EAAOC,EAMPC,EAAkB,YAIlB,CAACC,EAAwBC,CAAoB,EAAIC,EAAmBH,CAAe,EASnF,CAACI,EAAmBC,CAAmB,EAAIJ,EAA8CD,CAAe,EAE9G,SAASM,EACPC,EACAC,EAMA,CACA,GAAM,CAAE,GAAAC,CAAG,EAAIC,EAAmBH,EAAcC,CAAK,EAErD,MAAO,CACL,kBAAmB,yBAAyBC,CAAE,GAC9C,WAAY,aAAaA,CAAE,GAC3B,cAAe,qBAAqBA,CAAE,GACtC,GAAAA,CACF,CACF,CAOA,SAASE,EAGPC,EAAwE,CACxE,GAAM,CAAE,iBAAAC,EAAkB,GAAGC,CAAM,EAAIF,EAEvC,OACEf,EAACO,EAAA,CAAkB,KAAMU,EAAM,KAAM,MAAOD,EAC1C,SAAAhB,EAACkB,EAAA,CAAY,GAAGD,EA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AAwB,GAAGM,CAAiB,IAAIC,CAAa,GAAzDD,EAClC,eAAc,EAAQL,EAAOD,CAAI,EACjC,GAAIF,EACH,GAAGV,EACN,CAEJ,CACF,EAEAiB,EAAY,YAAcD,EAM1B,IAAMK,EAAwB,kBAKxBC,EAAwB,aAC5B,CAAC,CAAE,iBAAAvB,EAAkB,UAAAM,EAAW,GAAGL,CAAM,EAAsCM,IAAiB,CAC9F,GAAM,CAAE,kBAAAY,CAAkB,EAAI1B,EAAYmB,EAAmBZ,CAAgB,EAE7E,OACEhB,EAAC,KACC,IAAKuB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACxD,GAAIa,EACH,GAAGlB,EACN,CAEJ,CACF,EAEAsB,EAAgB,YAAcD,EAM9B,IAAMV,EAAoB,cAKpBY,EAAoB,aACxB,CAAC,CAAE,iBAAAxB,EAAkB,SAAAyB,EAAU,UAAAnB,EAAW,GAAGL,CAAM,EAAkCM,IAAiB,CACpG,GAAM,CAAE,cAAAa,CAAc,EAAI3B,EAAYmB,EAAmBZ,CAAgB,EACnE,CAAE,KAAAa,CAAK,EAAIrB,EAAoBoB,EAAmBZ,CAAgB,EAClE,CAAE,OAAAc,CAAO,EAAIC,EAAa,CAAE,KAAAF,CAAK,CAAC,EAClCa,EAAOZ,EAAOD,CAAI,GAAG,QAAU,OAAOC,EAAOD,CAAI,EAAE,OAAO,EAAIY,EAEpE,OAAKC,EAKH1C,EAAC,KACC,IAAKuB,EACL,UAAWC,EACT,UACAM,EAAOD,CAAI,GAAG,QAAU,+BAAiC,wBACzDP,CACF,EACA,GAAIc,EACH,GAAGnB,EAEH,SAAAyB,EACH,EAfO,IAiBX,CACF,EAEAF,EAAY,YAAcZ","names":["React","Slot","Controller","FormProvider","useFormState","createContextScope","jsx","Form","FormProvider","FORM_FIELD_NAME","createFormFieldContext","createFormFieldScope","createContextScope","FormFieldProvider","useFormFieldContext","useFormItem","consumerName","scope","id","useFormItemContext","FormField","formFieldProps","__scopeFormField","props","Controller","FORM_ITEM_NAME","FormItemProvider","FormItem","className","forwardedRef","cn","FORM_LABEL_NAME","FormLabel","formItemId","FORM_MESSAGE_NAME","name","errors","useFormState","Label","FORM_CONTROL_NAME","FormControl","formDescriptionId","formMessageId","Slot","FORM_DESCRIPTION_NAME","FormDescription","FormMessage","children","body"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type GlobalError,\n useFormState,\n} from 'react-hook-form';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { result } from 'lodash';\nimport { cn } from '@/lib/utils';\nimport { Label } from '@/components/label';\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\nconst FORM_FIELD_NAME = 'FormField';\n\ntype ScopedProps<P> = P & { __scopeFormField?: Scope };\n\nconst [createFormFieldContext, createFormFieldScope] = createContextScope(FORM_FIELD_NAME);\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst [FormFieldProvider, useFormFieldContext] = createFormFieldContext<FormFieldContextValue>(FORM_FIELD_NAME);\n\nfunction useFormItem(\n consumerName: string,\n scope: Scope,\n): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n} {\n const { id } = useFormItemContext(consumerName, scope);\n\n return {\n formDescriptionId: `form-item-description-${id}`,\n formItemId: `form-item-${id}`,\n formMessageId: `form-item-message-${id}`,\n id,\n };\n}\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(formFieldProps: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n const { __scopeFormField, ...props } = formFieldProps as ScopedProps<FormFieldProps<TFieldValues, TName>>;\n\n return (\n <FormFieldProvider name={props.name} scope={__scopeFormField}>\n <Controller {...props} />\n </FormFieldProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\nconst FORM_ITEM_NAME = 'FormItem';\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst [FormItemProvider, useFormItemContext] = createFormFieldContext<FormItemContextValue>(FORM_ITEM_NAME);\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(\n ({ __scopeFormField, className, ...props }: ScopedProps<FormItemProps>, forwardedRef) => {\n const id = React.useId();\n\n return (\n <FormItemProvider id={id} scope={__scopeFormField}>\n <div ref={forwardedRef} className={cn('space-y-2', className)} {...props} />\n </FormItemProvider>\n );\n },\n);\n\nFormItem.displayName = FORM_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\nconst FORM_LABEL_NAME = 'FormLabel';\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(\n ({ __scopeFormField, ...props }: ScopedProps<FormLabelProps>, forwardedRef) => {\n const { formItemId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n\n return <Label ref={forwardedRef} htmlFor={formItemId} {...props} />;\n },\n);\n\nFormLabel.displayName = FORM_LABEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\nconst FORM_CONTROL_NAME = 'FormControl';\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(\n ({ __scopeFormField, ...props }: ScopedProps<FormControlProps>, forwardedRef) => {\n const { formItemId, formDescriptionId, formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_CONTROL_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n\n return (\n <Slot\n ref={forwardedRef}\n aria-describedby={!errors[name] ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(errors[name])}\n id={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = FORM_CONTROL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\nconst FORM_DESCRIPTION_NAME = 'FormDescription';\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ __scopeFormField, className, ...props }: ScopedProps<FormDescriptionProps>, forwardedRef) => {\n const { formDescriptionId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-muted-foreground text-xs', className)}\n id={formDescriptionId}\n {...props}\n />\n );\n },\n);\n\nFormDescription.displayName = FORM_DESCRIPTION_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\nconst FORM_MESSAGE_NAME = 'FormMessage';\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ __scopeFormField, children, className, ...props }: ScopedProps<FormMessageProps>, forwardedRef) => {\n const { formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_MESSAGE_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n const error = result<GlobalError | null>(errors, name);\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-xs', error?.message ? 'text-destructive font-medium' : 'text-muted-foreground', className)}\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = FORM_MESSAGE_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createFormFieldScope,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"],"mappings":"+FAEA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAIA,gBAAAC,EAEA,gBAAAC,MACK,kBAEP,OAAS,sBAAAC,MAAsC,0BAC/C,OAAS,UAAAC,MAAc,SA8DjB,cAAAC,MAAA,oBArDN,IAAMC,EAAOC,EAMPC,EAAkB,YAIlB,CAACC,EAAwBC,CAAoB,EAAIC,EAAmBH,CAAe,EASnF,CAACI,EAAmBC,CAAmB,EAAIJ,EAA8CD,CAAe,EAE9G,SAASM,EACPC,EACAC,EAMA,CACA,GAAM,CAAE,GAAAC,CAAG,EAAIC,EAAmBH,EAAcC,CAAK,EAErD,MAAO,CACL,kBAAmB,yBAAyBC,CAAE,GAC9C,WAAY,aAAaA,CAAE,GAC3B,cAAe,qBAAqBA,CAAE,GACtC,GAAAA,CACF,CACF,CAOA,SAASE,EAGPC,EAAwE,CACxE,GAAM,CAAE,iBAAAC,EAAkB,GAAGC,CA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I,EACjC,GAAIP,EACH,GAAGV,EACN,CAEJ,CACF,EAEAc,EAAY,YAAcD,EAM1B,IAAMQ,EAAwB,kBAKxBC,EAAwB,aAC5B,CAAC,CAAE,iBAAAvB,EAAkB,UAAAM,EAAW,GAAGL,CAAM,EAAsCM,IAAiB,CAC9F,GAAM,CAAE,kBAAAS,CAAkB,EAAIvB,EAAYmB,EAAmBZ,CAAgB,EAE7E,OACEhB,EAAC,KACC,IAAKuB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACxD,GAAIU,EACH,GAAGf,EACN,CAEJ,CACF,EAEAsB,EAAgB,YAAcD,EAM9B,IAAMV,EAAoB,cAKpBY,EAAoB,aACxB,CAAC,CAAE,iBAAAxB,EAAkB,SAAAyB,EAAU,UAAAnB,EAAW,GAAGL,CAAM,EAAkCM,IAAiB,CACpG,GAAM,CAAE,cAAAU,CAAc,EAAIxB,EAAYmB,EAAmBZ,CAAgB,EACnE,CAAE,KAAAkB,CAAK,EAAI1B,EAAoBoB,EAAmBZ,CAAgB,EAClE,CAAE,OAAAmB,CAAO,EAAIC,EAAa,CAAE,KAAAF,CAAK,CAAC,EAClCQ,EAAQC,EAA2BR,EAAQD,CAAI,EAC/CU,EAAOF,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAID,EAEtD,OAAKG,EAKH5C,EAAC,KACC,IAAKuB,EACL,UAAWC,EAAG,UAAWkB,GAAO,QAAU,+BAAiC,wBAAyBpB,CAAS,EAC7G,GAAIW,EACH,GAAGhB,EAEH,SAAA2B,EACH,EAXO,IAaX,CACF,EAEAJ,EAAY,YAAcZ","names":["React","Slot","Controller","FormProvider","useFormState","createContextScope","result","jsx","Form","FormProvider","FORM_FIELD_NAME","createFormFieldContext","createFormFieldScope","createContextScope","FormFieldProvider","useFormFieldContext","useFormItem","consumerName","scope","id","useFormItemContext","FormField","formFieldProps","__scopeFormField","props","Controller","FORM_ITEM_NAME","FormItemProvider","FormItem","className","forwardedRef","cn","FORM_LABEL_NAME","FormLabel","formItemId","FORM_MESSAGE_NAME","Label","FORM_CONTROL_NAME","FormControl","formDescriptionId","formMessageId","name","errors","useFormState","Slot","FORM_DESCRIPTION_NAME","FormDescription","FormMessage","children","error","result","body"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var s = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _reactmenubar = require('@radix-ui/react-menubar'); var e = _interopRequireWildcard(_reactmenubar);var _jsxruntime = require('react/jsx-runtime');var S=e.Menu,N= exports.MenubarGroup =e.Group,E= exports.MenubarSub =e.Sub,T= exports.MenubarRadioGroup =e.RadioGroup,l= exports.Menubar =s.forwardRef(({className:t,...a},r)=>_jsxruntime.jsx.call(void 0, e.Root,{ref:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-background flex h-10 items-center space-x-1 rounded-md border p-1
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var s = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _reactmenubar = require('@radix-ui/react-menubar'); var e = _interopRequireWildcard(_reactmenubar);var _jsxruntime = require('react/jsx-runtime');var S=e.Menu,N= exports.MenubarGroup =e.Group,E= exports.MenubarSub =e.Sub,T= exports.MenubarRadioGroup =e.RadioGroup,l= exports.Menubar =s.forwardRef(({className:t,...a},r)=>_jsxruntime.jsx.call(void 0, e.Root,{ref:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-background flex h-10 items-center space-x-1 rounded-md border p-1",t),...a}));l.displayName=e.Root.displayName;var f=s.forwardRef(({className:t,...a},r)=>_jsxruntime.jsx.call(void 0, e.Trigger,{ref:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex cursor-pointer select-none items-center rounded-sm px-3 py-1 text-sm font-medium","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...a}));f.displayName=e.Trigger.displayName;var M=s.forwardRef(({children:t,className:a,inset:r,...i},u)=>_jsxruntime.jsxs.call(void 0, e.SubTrigger,{ref:u,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",r&&"pl-8",a),...i,children:[t,_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"ml-auto size-4"})]}));M.displayName=e.SubTrigger.displayName;var P=s.forwardRef(({className:t,...a},r)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.SubContent,{ref:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-1 shadow-md",t),...a})}));P.displayName=e.SubContent.displayName;var y=s.forwardRef(({className:t,align:a="start",alignOffset:r=-4,sideOffset:i=8,...u},m)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:m,align:a,alignOffset:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md",t),sideOffset:i,...u})}));y.displayName=e.Content.displayName;var R=s.forwardRef(({className:t,inset:a,...r},i)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",a&&"pl-8",t),...r}));R.displayName=e.Item.displayName;var g=s.forwardRef(({children:t,className:a,checked:r,...i},u)=>_jsxruntime.jsxs.call(void 0, e.CheckboxItem,{ref:u,checked:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",a),...i,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-4"})})}),t]}));g.displayName=e.CheckboxItem.displayName;var v=s.forwardRef(({children:t,className:a,...r},i)=>_jsxruntime.jsxs.call(void 0, e.RadioItem,{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",a),...r,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{className:"size-4 fill-current"})})}),t]}));v.displayName=e.RadioItem.displayName;var x=s.forwardRef(({className:t,inset:a,...r},i)=>_jsxruntime.jsx.call(void 0, e.Label,{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-2 py-1.5 text-sm font-semibold",a&&"pl-8",t),...r}));x.displayName=e.Label.displayName;var C=s.forwardRef(({className:t,...a},r)=>_jsxruntime.jsx.call(void 0, e.Separator,{ref:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-muted mx-2 my-1 h-px",t),...a}));C.displayName=e.Separator.displayName;function k({className:t,...a}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground ml-auto text-xs tracking-widest",t),...a})}exports.Menubar = l; exports.MenubarCheckboxItem = g; exports.MenubarContent = y; exports.MenubarGroup = N; exports.MenubarItem = R; exports.MenubarLabel = x; exports.MenubarMenu = S; exports.MenubarRadioGroup = T; exports.MenubarRadioItem = v; exports.MenubarSeparator = C; exports.MenubarShortcut = k; exports.MenubarSub = E; exports.MenubarSubContent = P; exports.MenubarSubTrigger = M; exports.MenubarTrigger = f;
|
|
2
2
|
//# sourceMappingURL=menubar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/menubar.cjs","../../src/components/menubar.tsx"],"names":["MenubarMenu","MenubarGroup","MenubarSub","MenubarRadioGroup","Menubar","className","props","forwardedRef","jsx","cn","MenubarTrigger","MenubarSubTrigger","children","inset","jsxs","ChevronRightIcon","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","CheckIcon","MenubarRadioItem","DotFilledIcon","MenubarLabel","MenubarSeparator","MenubarShortcut"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,uECE/B,mDACoC,uGACzB,+CAuChC,IA/BIA,CAAAA,CAA+B,CAAA,CAAA,IAAA,CAO/BC,CAAAA,wBAAgC,CAAA,CAAA,KAAA,CAOhCC,CAAAA,sBAA8B,CAAA,CAAA,GAAA,CAO9BC,CAAAA,6BAAqC,CAAA,CAAA,UAAA,CASrCC,CAAAA,mBAAgB,CAAA,CAAA,UAAA,CAAyC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACvFC,6BAAAA,CAAkB,CAAA,IAAA,CAAjB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,gFAAG,CAAkFJ,CAAS,CAAA,CACxG,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDF,CAAAA,CAAQ,WAAA,CAA+B,CAAA,CAAA,IAAA,CAAK,WAAA,CAS5C,IAAMM,CAAAA,CAAuB,CAAA,CAAA,UAAA,CAC3B,CAAC,CAAE,SAAA,CAAAL,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAkB,CAAA,OAAA,CAAjB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,4NACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAAA,CAEAI,CAAAA,CAAe,WAAA,CAA+B,CAAA,CAAA,OAAA,CAAQ,WAAA,CAYtD,IAAMC,CAAAA,CAA0B,CAAA,CAAA,UAAA,CAC9B,CA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AC7B,CAAC,CAAE,SAAA,CAAAvB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAkB,CAAA,SAAA,CAAjB,CAA2B,GAAA,CAAKD,CAAAA,CAAc,SAAA,CAAWE,iCAAAA,0BAAG,CAA4BJ,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAEpH,CAAA,CAEAsB,CAAAA,CAAiB,WAAA,CAA+B,CAAA,CAAA,SAAA,CAAU,WAAA,CAQ1D,SAASC,CAAAA,CAAgB,CAAE,SAAA,CAAAxB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA4C,CACzF,OAAOE,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAWC,iCAAAA,uDAAG,CAAyDJ,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAC7G,CAAA,iaAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/menubar.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport * as MenubarPrimitive from '@radix-ui/react-menubar';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\ntype MenubarMenuProps = React.ComponentProps<typeof MenubarPrimitive.Menu>;\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Group>;\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>;\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioGroup>;\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\ntype MenubarElement = React.ElementRef<typeof MenubarPrimitive.Root>;\ntype MenubarProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>;\n\nconst Menubar = React.forwardRef<MenubarElement, MenubarProps>(({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Root\n ref={forwardedRef}\n className={cn('bg-background flex h-10 items-center space-x-1 rounded-md border p-1 shadow-sm', className)}\n {...props}\n />\n));\n\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarTriggerElement = React.ElementRef<typeof MenubarPrimitive.Trigger>;\ntype MenubarTriggerProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>;\n\nconst MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Trigger\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-3 py-1 text-sm font-medium focus:outline-none',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubTriggerElement = React.ElementRef<typeof MenubarPrimitive.SubTrigger>;\n\ninterface MenubarSubTriggerProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n ),\n);\n\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubContentElement = React.ElementRef<typeof MenubarPrimitive.SubContent>;\ntype MenubarSubContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>;\n\nconst MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarContentElement = React.ElementRef<typeof MenubarPrimitive.Content>;\ntype MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>;\n\nconst MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(\n ({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={forwardedRef}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarItemElement = React.ElementRef<typeof MenubarPrimitive.Item>;\n\ninterface MenubarItemProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> {\n inset?: boolean;\n}\n\nconst MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarCheckboxItemElement = React.ElementRef<typeof MenubarPrimitive.CheckboxItem>;\ntype MenubarCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>;\n\nconst MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <MenubarPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n ),\n);\n\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioItemElement = React.ElementRef<typeof MenubarPrimitive.RadioItem>;\ntype MenubarRadioItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>;\n\nconst MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <MenubarPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n ),\n);\n\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\ntype MenubarLabelElement = React.ElementRef<typeof MenubarPrimitive.Label>;\n\ninterface MenubarLabelProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> {\n inset?: boolean;\n}\n\nconst MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Label\n ref={forwardedRef}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\ntype MenubarSeparatorElement = React.ElementRef<typeof MenubarPrimitive.Separator>;\ntype MenubarSeparatorProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>;\n\nconst MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Separator ref={forwardedRef} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\ntype MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction MenubarShortcut({ className, ...props }: MenubarShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n type MenubarProps,\n type MenubarMenuProps,\n type MenubarTriggerProps,\n type MenubarContentProps,\n type MenubarItemProps,\n type MenubarSeparatorProps,\n type MenubarLabelProps,\n type MenubarCheckboxItemProps,\n type MenubarRadioGroupProps,\n type MenubarRadioItemProps,\n type MenubarSubContentProps,\n type MenubarSubTriggerProps,\n type MenubarGroupProps,\n type MenubarSubProps,\n type MenubarShortcutProps,\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/menubar.cjs","../../src/components/menubar.tsx"],"names":["MenubarMenu","MenubarGroup","MenubarSub","MenubarRadioGroup","Menubar","className","props","forwardedRef","jsx","cn","MenubarTrigger","MenubarSubTrigger","children","inset","jsxs","ChevronRightIcon","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","CheckIcon","MenubarRadioItem","DotFilledIcon","MenubarLabel","MenubarSeparator","MenubarShortcut"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,uECE/B,mDACoC,uGACzB,+CAuChC,IA/BIA,CAAAA,CAA+B,CAAA,CAAA,IAAA,CAO/BC,CAAAA,wBAAgC,CAAA,CAAA,KAAA,CAOhCC,CAAAA,sBAA8B,CAAA,CAAA,GAAA,CAO9BC,CAAAA,6BAAqC,CAAA,CAAA,UAAA,CASrCC,CAAAA,mBAAgB,CAAA,CAAA,UAAA,CAAyC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACvFC,6BAAAA,CAAkB,CAAA,IAAA,CAAjB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,sEAAG,CAAwEJ,CAAS,CAAA,CAC9F,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDF,CAAAA,CAAQ,WAAA,CAA+B,CAAA,CAAA,IAAA,C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H,CAEJ,CAAA,CAEAa,CAAAA,CAAiB,WAAA,CAA+B,CAAA,CAAA,SAAA,CAAU,WAAA,CAY1D,IAAME,CAAAA,CAAqB,CAAA,CAAA,UAAA,CACzB,CAAC,CAAE,SAAA,CAAAtB,CAAAA,CAAW,KAAA,CAAAQ,CAAAA,CAAO,GAAGP,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC/BC,6BAAAA,CAAkB,CAAA,KAAA,CAAjB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,mCAAG,CAAqCI,CAAAA,EAAS,MAAA,CAAQR,CAAS,CAAA,CAC5E,GAAGC,CAAAA,CACN,CAEJ,CAAA,CAEAqB,CAAAA,CAAa,WAAA,CAA+B,CAAA,CAAA,KAAA,CAAM,WAAA,CASlD,IAAMC,CAAAA,CAAyB,CAAA,CAAA,UAAA,CAC7B,CAAC,CAAE,SAAA,CAAAvB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAkB,CAAA,SAAA,CAAjB,CAA2B,GAAA,CAAKD,CAAAA,CAAc,SAAA,CAAWE,iCAAAA,yBAAG,CAA2BJ,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAEnH,CAAA,CAEAsB,CAAAA,CAAiB,WAAA,CAA+B,CAAA,CAAA,SAAA,CAAU,WAAA,CAQ1D,SAASC,CAAAA,CAAgB,CAAE,SAAA,CAAAxB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA4C,CACzF,OAAOE,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAWC,iCAAAA,uDAAG,CAAyDJ,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAC7G,CAAA,iaAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/menubar.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport * as MenubarPrimitive from '@radix-ui/react-menubar';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\ntype MenubarMenuProps = React.ComponentProps<typeof MenubarPrimitive.Menu>;\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Group>;\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>;\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioGroup>;\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\ntype MenubarElement = React.ElementRef<typeof MenubarPrimitive.Root>;\ntype MenubarProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>;\n\nconst Menubar = React.forwardRef<MenubarElement, MenubarProps>(({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Root\n ref={forwardedRef}\n className={cn('bg-background flex h-10 items-center space-x-1 rounded-md border p-1', className)}\n {...props}\n />\n));\n\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarTriggerElement = React.ElementRef<typeof MenubarPrimitive.Trigger>;\ntype MenubarTriggerProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>;\n\nconst MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Trigger\n ref={forwardedRef}\n className={cn(\n 'flex cursor-pointer select-none items-center rounded-sm px-3 py-1 text-sm font-medium',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubTriggerElement = React.ElementRef<typeof MenubarPrimitive.SubTrigger>;\n\ninterface MenubarSubTriggerProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n ),\n);\n\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubContentElement = React.ElementRef<typeof MenubarPrimitive.SubContent>;\ntype MenubarSubContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>;\n\nconst MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarContentElement = React.ElementRef<typeof MenubarPrimitive.Content>;\ntype MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>;\n\nconst MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(\n ({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={forwardedRef}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarItemElement = React.ElementRef<typeof MenubarPrimitive.Item>;\n\ninterface MenubarItemProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> {\n inset?: boolean;\n}\n\nconst MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarCheckboxItemElement = React.ElementRef<typeof MenubarPrimitive.CheckboxItem>;\ntype MenubarCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>;\n\nconst MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <MenubarPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n ),\n);\n\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioItemElement = React.ElementRef<typeof MenubarPrimitive.RadioItem>;\ntype MenubarRadioItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>;\n\nconst MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <MenubarPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n ),\n);\n\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\ntype MenubarLabelElement = React.ElementRef<typeof MenubarPrimitive.Label>;\n\ninterface MenubarLabelProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> {\n inset?: boolean;\n}\n\nconst MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Label\n ref={forwardedRef}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\ntype MenubarSeparatorElement = React.ElementRef<typeof MenubarPrimitive.Separator>;\ntype MenubarSeparatorProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>;\n\nconst MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Separator ref={forwardedRef} className={cn('bg-muted mx-2 my-1 h-px', className)} {...props} />\n ),\n);\n\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\ntype MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction MenubarShortcut({ className, ...props }: MenubarShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n type MenubarProps,\n type MenubarMenuProps,\n type MenubarTriggerProps,\n type MenubarContentProps,\n type MenubarItemProps,\n type MenubarSeparatorProps,\n type MenubarLabelProps,\n type MenubarCheckboxItemProps,\n type MenubarRadioGroupProps,\n type MenubarRadioItemProps,\n type MenubarSubContentProps,\n type MenubarSubTriggerProps,\n type MenubarGroupProps,\n type MenubarSubProps,\n type MenubarShortcutProps,\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as n}from"../chunk-VRBUDJBH.js";import*as s from"react";import{CheckIcon as b,ChevronRightIcon as d,DotFilledIcon as c}from"@radix-ui/react-icons";import*as e from"@radix-ui/react-menubar";import{jsx as o,jsxs as p}from"react/jsx-runtime";var S=e.Menu,N=e.Group,E=e.Sub,T=e.RadioGroup,l=s.forwardRef(({className:t,...a},r)=>o(e.Root,{ref:r,className:n("bg-background flex h-10 items-center space-x-1 rounded-md border p-1
|
|
1
|
+
"use client";import{a as n}from"../chunk-VRBUDJBH.js";import*as s from"react";import{CheckIcon as b,ChevronRightIcon as d,DotFilledIcon as c}from"@radix-ui/react-icons";import*as e from"@radix-ui/react-menubar";import{jsx as o,jsxs as p}from"react/jsx-runtime";var S=e.Menu,N=e.Group,E=e.Sub,T=e.RadioGroup,l=s.forwardRef(({className:t,...a},r)=>o(e.Root,{ref:r,className:n("bg-background flex h-10 items-center space-x-1 rounded-md border p-1",t),...a}));l.displayName=e.Root.displayName;var f=s.forwardRef(({className:t,...a},r)=>o(e.Trigger,{ref:r,className:n("flex cursor-pointer select-none items-center rounded-sm px-3 py-1 text-sm font-medium","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...a}));f.displayName=e.Trigger.displayName;var M=s.forwardRef(({children:t,className:a,inset:r,...i},u)=>p(e.SubTrigger,{ref:u,className:n("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",r&&"pl-8",a),...i,children:[t,o(d,{className:"ml-auto size-4"})]}));M.displayName=e.SubTrigger.displayName;var P=s.forwardRef(({className:t,...a},r)=>o(e.Portal,{children:o(e.SubContent,{ref:r,className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-1 shadow-md",t),...a})}));P.displayName=e.SubContent.displayName;var y=s.forwardRef(({className:t,align:a="start",alignOffset:r=-4,sideOffset:i=8,...u},m)=>o(e.Portal,{children:o(e.Content,{ref:m,align:a,alignOffset:r,className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md",t),sideOffset:i,...u})}));y.displayName=e.Content.displayName;var R=s.forwardRef(({className:t,inset:a,...r},i)=>o(e.Item,{ref:i,className:n("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",a&&"pl-8",t),...r}));R.displayName=e.Item.displayName;var g=s.forwardRef(({children:t,className:a,checked:r,...i},u)=>p(e.CheckboxItem,{ref:u,checked:r,className:n("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",a),...i,children:[o("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:o(e.ItemIndicator,{children:o(b,{className:"size-4"})})}),t]}));g.displayName=e.CheckboxItem.displayName;var v=s.forwardRef(({children:t,className:a,...r},i)=>p(e.RadioItem,{ref:i,className:n("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",a),...r,children:[o("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:o(e.ItemIndicator,{children:o(c,{className:"size-4 fill-current"})})}),t]}));v.displayName=e.RadioItem.displayName;var x=s.forwardRef(({className:t,inset:a,...r},i)=>o(e.Label,{ref:i,className:n("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",t),...r}));x.displayName=e.Label.displayName;var C=s.forwardRef(({className:t,...a},r)=>o(e.Separator,{ref:r,className:n("bg-muted mx-2 my-1 h-px",t),...a}));C.displayName=e.Separator.displayName;function k({className:t,...a}){return o("span",{className:n("text-muted-foreground ml-auto text-xs tracking-widest",t),...a})}export{l as Menubar,g as MenubarCheckboxItem,y as MenubarContent,N as MenubarGroup,R as MenubarItem,x as MenubarLabel,S as MenubarMenu,T as MenubarRadioGroup,v as MenubarRadioItem,C as MenubarSeparator,k as MenubarShortcut,E as MenubarSub,P as MenubarSubContent,M as MenubarSubTrigger,f as MenubarTrigger};
|
|
2
2
|
//# sourceMappingURL=menubar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/menubar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport * as MenubarPrimitive from '@radix-ui/react-menubar';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\ntype MenubarMenuProps = React.ComponentProps<typeof MenubarPrimitive.Menu>;\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Group>;\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>;\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioGroup>;\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\ntype MenubarElement = React.ElementRef<typeof MenubarPrimitive.Root>;\ntype MenubarProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>;\n\nconst Menubar = React.forwardRef<MenubarElement, MenubarProps>(({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Root\n ref={forwardedRef}\n className={cn('bg-background flex h-10 items-center space-x-1 rounded-md border p-1 shadow-sm', className)}\n {...props}\n />\n));\n\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarTriggerElement = React.ElementRef<typeof MenubarPrimitive.Trigger>;\ntype MenubarTriggerProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>;\n\nconst MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Trigger\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-3 py-1 text-sm font-medium focus:outline-none',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubTriggerElement = React.ElementRef<typeof MenubarPrimitive.SubTrigger>;\n\ninterface MenubarSubTriggerProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n ),\n);\n\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubContentElement = React.ElementRef<typeof MenubarPrimitive.SubContent>;\ntype MenubarSubContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>;\n\nconst MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarContentElement = React.ElementRef<typeof MenubarPrimitive.Content>;\ntype MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>;\n\nconst MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(\n ({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={forwardedRef}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarItemElement = React.ElementRef<typeof MenubarPrimitive.Item>;\n\ninterface MenubarItemProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> {\n inset?: boolean;\n}\n\nconst MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarCheckboxItemElement = React.ElementRef<typeof MenubarPrimitive.CheckboxItem>;\ntype MenubarCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>;\n\nconst MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <MenubarPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n ),\n);\n\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioItemElement = React.ElementRef<typeof MenubarPrimitive.RadioItem>;\ntype MenubarRadioItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>;\n\nconst MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <MenubarPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n ),\n);\n\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\ntype MenubarLabelElement = React.ElementRef<typeof MenubarPrimitive.Label>;\n\ninterface MenubarLabelProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> {\n inset?: boolean;\n}\n\nconst MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Label\n ref={forwardedRef}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\ntype MenubarSeparatorElement = React.ElementRef<typeof MenubarPrimitive.Separator>;\ntype MenubarSeparatorProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>;\n\nconst MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Separator ref={forwardedRef} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\ntype MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction MenubarShortcut({ className, ...props }: MenubarShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n type MenubarProps,\n type MenubarMenuProps,\n type MenubarTriggerProps,\n type MenubarContentProps,\n type MenubarItemProps,\n type MenubarSeparatorProps,\n type MenubarLabelProps,\n type MenubarCheckboxItemProps,\n type MenubarRadioGroupProps,\n type MenubarRadioItemProps,\n type MenubarSubContentProps,\n type MenubarSubTriggerProps,\n type MenubarGroupProps,\n type MenubarSubProps,\n type MenubarShortcutProps,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,EAAW,oBAAAC,EAAkB,iBAAAC,MAAqB,wBAC3D,UAAYC,MAAsB,0BAuChC,cAAAC,EA2CE,QAAAC,MA3CF,oBA/BF,IAAMC,EAA+B,OAO/BC,EAAgC,QAOhCC,EAA8B,MAO9BC,EAAqC,aASrCC,EAAgB,aAAyC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACvFT,EAAkB,OAAjB,CACC,IAAKS,EACL,UAAWC,EAAG,iFAAkFH,CAAS,EACxG,GAAGC,EACN,CACD,EAEDF,EAAQ,YAA+B,OAAK,YAS5C,IAAMK,EAAuB,aAC3B,CAAC,CAAE,UAAAJ,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAkB,UAAjB,CACC,IAAKS,EACL,UAAWC,EACT,6NACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAG,EAAe,YAA+B,UAAQ,YAYtD,IAAMC,EAA0B,aAC9B,CAAC,CAAE,SAAAC,EAAU,UAAAN,EAAW,MAAAO,EAAO,GAAGN,CAAM,EAAGC,IACzCR,EAAkB,aAAjB,CACC,IAAKQ,EACL,UAAWC,EACT,mNACAI,GAAS,OACTP,CACF,EACC,GAAGC,EAEH,UAAAK,EACDb,EAACe,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CAEJ,EAEAH,EAAkB,YAA+B,aAAW,YAS5D,IAAMI,EAA0B,aAC9B,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IAC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AA,EAAkB,gBAAjB,CACC,SAAAA,EAAC0B,EAAA,CAAc,UAAU,sBAAsB,EACjD,EACF,EACCb,GACH,CAEJ,EAEAY,EAAiB,YAA+B,YAAU,YAY1D,IAAME,EAAqB,aACzB,CAAC,CAAE,UAAApB,EAAW,MAAAO,EAAO,GAAGN,CAAM,EAAGC,IAC/BT,EAAkB,QAAjB,CACC,IAAKS,EACL,UAAWC,EAAG,oCAAqCI,GAAS,OAAQP,CAAS,EAC5E,GAAGC,EACN,CAEJ,EAEAmB,EAAa,YAA+B,QAAM,YASlD,IAAMC,EAAyB,aAC7B,CAAC,CAAE,UAAArB,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAkB,YAAjB,CAA2B,IAAKS,EAAc,UAAWC,EAAG,2BAA4BH,CAAS,EAAI,GAAGC,EAAO,CAEpH,EAEAoB,EAAiB,YAA+B,YAAU,YAQ1D,SAASC,EAAgB,CAAE,UAAAtB,EAAW,GAAGC,CAAM,EAA4C,CACzF,OAAOR,EAAC,QAAK,UAAWU,EAAG,wDAAyDH,CAAS,EAAI,GAAGC,EAAO,CAC7G","names":["React","CheckIcon","ChevronRightIcon","DotFilledIcon","MenubarPrimitive","jsx","jsxs","MenubarMenu","MenubarGroup","MenubarSub","MenubarRadioGroup","Menubar","className","props","forwardedRef","cn","MenubarTrigger","MenubarSubTrigger","children","inset","ChevronRightIcon","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","CheckIcon","MenubarRadioItem","DotFilledIcon","MenubarLabel","MenubarSeparator","MenubarShortcut"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/menubar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport * as MenubarPrimitive from '@radix-ui/react-menubar';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\ntype MenubarMenuProps = React.ComponentProps<typeof MenubarPrimitive.Menu>;\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Group>;\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>;\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioGroup>;\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\ntype MenubarElement = React.ElementRef<typeof MenubarPrimitive.Root>;\ntype MenubarProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>;\n\nconst Menubar = React.forwardRef<MenubarElement, MenubarProps>(({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Root\n ref={forwardedRef}\n className={cn('bg-background flex h-10 items-center space-x-1 rounded-md border p-1', className)}\n {...props}\n />\n));\n\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarTriggerElement = React.ElementRef<typeof MenubarPrimitive.Trigger>;\ntype MenubarTriggerProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>;\n\nconst MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Trigger\n ref={forwardedRef}\n className={cn(\n 'flex cursor-pointer select-none items-center rounded-sm px-3 py-1 text-sm font-medium',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubTriggerElement = React.ElementRef<typeof MenubarPrimitive.SubTrigger>;\n\ninterface MenubarSubTriggerProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n ),\n);\n\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubContentElement = React.ElementRef<typeof MenubarPrimitive.SubContent>;\ntype MenubarSubContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>;\n\nconst MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarContentElement = React.ElementRef<typeof MenubarPrimitive.Content>;\ntype MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>;\n\nconst MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(\n ({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={forwardedRef}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarItemElement = React.ElementRef<typeof MenubarPrimitive.Item>;\n\ninterface MenubarItemProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> {\n inset?: boolean;\n}\n\nconst MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarCheckboxItemElement = React.ElementRef<typeof MenubarPrimitive.CheckboxItem>;\ntype MenubarCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>;\n\nconst MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <MenubarPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n ),\n);\n\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioItemElement = React.ElementRef<typeof MenubarPrimitive.RadioItem>;\ntype MenubarRadioItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>;\n\nconst MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <MenubarPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n ),\n);\n\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\ntype MenubarLabelElement = React.ElementRef<typeof MenubarPrimitive.Label>;\n\ninterface MenubarLabelProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> {\n inset?: boolean;\n}\n\nconst MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Label\n ref={forwardedRef}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\ntype MenubarSeparatorElement = React.ElementRef<typeof MenubarPrimitive.Separator>;\ntype MenubarSeparatorProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>;\n\nconst MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Separator ref={forwardedRef} className={cn('bg-muted mx-2 my-1 h-px', className)} {...props} />\n ),\n);\n\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\ntype MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction MenubarShortcut({ className, ...props }: MenubarShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n type MenubarProps,\n type MenubarMenuProps,\n type MenubarTriggerProps,\n type MenubarContentProps,\n type MenubarItemProps,\n type MenubarSeparatorProps,\n type MenubarLabelProps,\n type MenubarCheckboxItemProps,\n type MenubarRadioGroupProps,\n type MenubarRadioItemProps,\n type MenubarSubContentProps,\n type MenubarSubTriggerProps,\n type MenubarGroupProps,\n type MenubarSubProps,\n type MenubarShortcutProps,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,EAAW,oBAAAC,EAAkB,iBAAAC,MAAqB,wBAC3D,UAAYC,MAAsB,0BAuChC,cAAAC,EA6CE,QAAAC,MA7CF,oBA/BF,IAAMC,EAA+B,OAO/BC,EAAgC,QAOhCC,EAA8B,MAO9BC,EAAqC,aASrCC,EAAgB,aAAyC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACvFT,EAAkB,OAAjB,CACC,IAAKS,EACL,UAAWC,EAAG,uEAAwEH,CAAS,EAC9F,GAAGC,EACN,CACD,EAEDF,EAAQ,YAA+B,OAAK,YAS5C,IAAMK,EAAuB,aAC3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AAyDH,CAAS,EAAI,GAAGC,EAAO,CAC7G","names":["React","CheckIcon","ChevronRightIcon","DotFilledIcon","MenubarPrimitive","jsx","jsxs","MenubarMenu","MenubarGroup","MenubarSub","MenubarRadioGroup","Menubar","className","props","forwardedRef","cn","MenubarTrigger","MenubarSubTrigger","children","inset","ChevronRightIcon","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","CheckIcon","MenubarRadioItem","DotFilledIcon","MenubarLabel","MenubarSeparator","MenubarShortcut"]}
|