@codefast/ui 0.2.46-canary.3 → 0.2.46-canary.4
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/CHANGELOG.md +13 -0
- package/dist/cjs/components/accordion.cjs +2 -97
- package/dist/cjs/components/accordion.cjs.map +1 -0
- package/dist/cjs/components/alert-dialog.cjs +2 -155
- package/dist/cjs/components/alert-dialog.cjs.map +1 -0
- package/dist/cjs/components/alert.cjs +2 -81
- package/dist/cjs/components/alert.cjs.map +1 -0
- package/dist/cjs/components/aspect-ratio.cjs +2 -43
- package/dist/cjs/components/aspect-ratio.cjs.map +1 -0
- package/dist/cjs/components/avatar.cjs +2 -65
- package/dist/cjs/components/avatar.cjs.map +1 -0
- package/dist/cjs/components/badge.cjs +2 -66
- package/dist/cjs/components/badge.cjs.map +1 -0
- package/dist/cjs/components/blockquote.cjs +2 -44
- package/dist/cjs/components/blockquote.cjs.map +1 -0
- package/dist/cjs/components/box.cjs +2 -44
- package/dist/cjs/components/box.cjs.map +1 -0
- package/dist/cjs/components/breadcrumb.cjs +2 -125
- package/dist/cjs/components/breadcrumb.cjs.map +1 -0
- package/dist/cjs/components/button.cjs +2 -83
- package/dist/cjs/components/button.cjs.map +1 -0
- package/dist/cjs/components/calendar.cjs +2 -165
- package/dist/cjs/components/calendar.cjs.map +1 -0
- package/dist/cjs/components/card.cjs +2 -105
- package/dist/cjs/components/card.cjs.map +1 -0
- package/dist/cjs/components/carousel.cjs +2 -206
- package/dist/cjs/components/carousel.cjs.map +1 -0
- package/dist/cjs/components/chart.cjs +2 -242
- package/dist/cjs/components/chart.cjs.map +1 -0
- package/dist/cjs/components/checkbox-cards.cjs +2 -69
- package/dist/cjs/components/checkbox-cards.cjs.map +1 -0
- package/dist/cjs/components/checkbox-group.cjs +2 -63
- package/dist/cjs/components/checkbox-group.cjs.map +1 -0
- package/dist/cjs/components/checkbox.cjs +2 -53
- package/dist/cjs/components/checkbox.cjs.map +1 -0
- package/dist/cjs/components/code.cjs +2 -44
- package/dist/cjs/components/code.cjs.map +1 -0
- package/dist/cjs/components/collapsible.cjs +2 -61
- package/dist/cjs/components/collapsible.cjs.map +1 -0
- package/dist/cjs/components/command.cjs +2 -167
- package/dist/cjs/components/command.cjs.map +1 -0
- package/dist/cjs/components/container.cjs +2 -46
- package/dist/cjs/components/container.cjs.map +1 -0
- package/dist/cjs/components/context-menu.cjs +2 -218
- package/dist/cjs/components/context-menu.cjs.map +1 -0
- package/dist/cjs/components/dialog.cjs +2 -164
- package/dist/cjs/components/dialog.cjs.map +1 -0
- package/dist/cjs/components/drawer.cjs +2 -143
- package/dist/cjs/components/drawer.cjs.map +1 -0
- package/dist/cjs/components/dropdown-menu.cjs +2 -219
- package/dist/cjs/components/dropdown-menu.cjs.map +1 -0
- package/dist/cjs/components/em.cjs +2 -44
- package/dist/cjs/components/em.cjs.map +1 -0
- package/dist/cjs/components/form.cjs +2 -151
- package/dist/cjs/components/form.cjs.map +1 -0
- package/dist/cjs/components/heading.cjs +2 -44
- package/dist/cjs/components/heading.cjs.map +1 -0
- package/dist/cjs/components/hover-card.cjs +2 -77
- package/dist/cjs/components/hover-card.cjs.map +1 -0
- package/dist/cjs/components/inline.cjs +2 -44
- package/dist/cjs/components/inline.cjs.map +1 -0
- package/dist/cjs/components/input-date.cjs +1 -18
- package/dist/cjs/components/input-number.cjs +2 -109
- package/dist/cjs/components/input-number.cjs.map +1 -0
- package/dist/cjs/components/input-otp.cjs +2 -102
- package/dist/cjs/components/input-otp.cjs.map +1 -0
- package/dist/cjs/components/input-password.cjs +2 -88
- package/dist/cjs/components/input-password.cjs.map +1 -0
- package/dist/cjs/components/input-search.cjs +2 -94
- package/dist/cjs/components/input-search.cjs.map +1 -0
- package/dist/cjs/components/input-time.cjs +1 -18
- package/dist/cjs/components/input.cjs +2 -73
- package/dist/cjs/components/input.cjs.map +1 -0
- package/dist/cjs/components/kbd.cjs +2 -46
- package/dist/cjs/components/kbd.cjs.map +1 -0
- package/dist/cjs/components/label.cjs +2 -45
- package/dist/cjs/components/label.cjs.map +1 -0
- package/dist/cjs/components/menubar.cjs +2 -232
- package/dist/cjs/components/menubar.cjs.map +1 -0
- package/dist/cjs/components/navigation-menu.cjs +2 -146
- package/dist/cjs/components/navigation-menu.cjs.map +1 -0
- package/dist/cjs/components/pagination.cjs +2 -139
- package/dist/cjs/components/pagination.cjs.map +1 -0
- package/dist/cjs/components/popover.cjs +2 -86
- package/dist/cjs/components/popover.cjs.map +1 -0
- package/dist/cjs/components/pre.cjs +2 -44
- package/dist/cjs/components/pre.cjs.map +1 -0
- package/dist/cjs/components/progress-circle.cjs +2 -181
- package/dist/cjs/components/progress-circle.cjs.map +1 -0
- package/dist/cjs/components/progress.cjs +2 -52
- package/dist/cjs/components/progress.cjs.map +1 -0
- package/dist/cjs/components/quote.cjs +2 -44
- package/dist/cjs/components/quote.cjs.map +1 -0
- package/dist/cjs/components/radio-cards.cjs +2 -66
- package/dist/cjs/components/radio-cards.cjs.map +1 -0
- package/dist/cjs/components/radio-group.cjs +2 -59
- package/dist/cjs/components/radio-group.cjs.map +1 -0
- package/dist/cjs/components/radio.cjs +2 -47
- package/dist/cjs/components/radio.cjs.map +1 -0
- package/dist/cjs/components/resizable.cjs +2 -71
- package/dist/cjs/components/resizable.cjs.map +1 -0
- package/dist/cjs/components/scroll-area.cjs +2 -137
- package/dist/cjs/components/scroll-area.cjs.map +1 -0
- package/dist/cjs/components/section.cjs +2 -44
- package/dist/cjs/components/section.cjs.map +1 -0
- package/dist/cjs/components/select.cjs +2 -180
- package/dist/cjs/components/select.cjs.map +1 -0
- package/dist/cjs/components/separator.cjs +2 -79
- package/dist/cjs/components/separator.cjs.map +1 -0
- package/dist/cjs/components/sheet.cjs +2 -181
- package/dist/cjs/components/sheet.cjs.map +1 -0
- package/dist/cjs/components/sidebar.cjs +2 -504
- package/dist/cjs/components/sidebar.cjs.map +1 -0
- package/dist/cjs/components/skeleton.cjs +2 -44
- package/dist/cjs/components/skeleton.cjs.map +1 -0
- package/dist/cjs/components/slider.cjs +2 -79
- package/dist/cjs/components/slider.cjs.map +1 -0
- package/dist/cjs/components/sonner.cjs +2 -57
- package/dist/cjs/components/sonner.cjs.map +1 -0
- package/dist/cjs/components/spinner.cjs +2 -75
- package/dist/cjs/components/spinner.cjs.map +1 -0
- package/dist/cjs/components/strong.cjs +2 -44
- package/dist/cjs/components/strong.cjs.map +1 -0
- package/dist/cjs/components/switch.cjs +2 -49
- package/dist/cjs/components/switch.cjs.map +1 -0
- package/dist/cjs/components/table.cjs +2 -118
- package/dist/cjs/components/table.cjs.map +1 -0
- package/dist/cjs/components/tabs.cjs +2 -74
- package/dist/cjs/components/tabs.cjs.map +1 -0
- package/dist/cjs/components/text.cjs +2 -44
- package/dist/cjs/components/text.cjs.map +1 -0
- package/dist/cjs/components/textarea.cjs +2 -44
- package/dist/cjs/components/textarea.cjs.map +1 -0
- package/dist/cjs/components/toggle-group.cjs +2 -90
- package/dist/cjs/components/toggle-group.cjs.map +1 -0
- package/dist/cjs/components/toggle.cjs +2 -75
- package/dist/cjs/components/toggle.cjs.map +1 -0
- package/dist/cjs/components/tooltip.cjs +2 -87
- package/dist/cjs/components/tooltip.cjs.map +1 -0
- package/dist/cjs/index.cjs +1 -681
- package/dist/cjs/lib/logger.cjs +2 -128
- package/dist/cjs/lib/logger.cjs.map +1 -0
- package/dist/cjs/lib/utils.cjs +2 -44
- package/dist/cjs/lib/utils.cjs.map +1 -0
- package/dist/esm/components/accordion.js +2 -51
- package/dist/esm/components/accordion.js.map +1 -0
- package/dist/esm/components/alert-dialog.js +2 -94
- package/dist/esm/components/alert-dialog.js.map +1 -0
- package/dist/esm/components/alert.js +2 -41
- package/dist/esm/components/alert.js.map +1 -0
- package/dist/esm/components/aspect-ratio.js +2 -9
- package/dist/esm/components/aspect-ratio.js.map +1 -0
- package/dist/esm/components/avatar.js +2 -25
- package/dist/esm/components/avatar.js.map +1 -0
- package/dist/esm/components/badge.js +2 -29
- package/dist/esm/components/badge.js.map +1 -0
- package/dist/esm/components/blockquote.js +2 -10
- package/dist/esm/components/blockquote.js.map +1 -0
- package/dist/esm/components/box.js +2 -10
- package/dist/esm/components/box.js.map +1 -0
- package/dist/esm/components/breadcrumb.js +2 -73
- package/dist/esm/components/breadcrumb.js.map +1 -0
- package/dist/esm/components/button.js +2 -46
- package/dist/esm/components/button.js.map +1 -0
- package/dist/esm/components/calendar.js +2 -125
- package/dist/esm/components/calendar.js.map +1 -0
- package/dist/esm/components/card.js +2 -53
- package/dist/esm/components/card.js.map +1 -0
- package/dist/esm/components/carousel.js +2 -147
- package/dist/esm/components/carousel.js.map +1 -0
- package/dist/esm/components/chart.js +2 -190
- package/dist/esm/components/chart.js.map +1 -0
- package/dist/esm/components/checkbox-cards.js +2 -32
- package/dist/esm/components/checkbox-cards.js.map +1 -0
- package/dist/esm/components/checkbox-group.js +2 -26
- package/dist/esm/components/checkbox-group.js.map +1 -0
- package/dist/esm/components/checkbox.js +2 -19
- package/dist/esm/components/checkbox.js.map +1 -0
- package/dist/esm/components/code.js +2 -10
- package/dist/esm/components/code.js.map +1 -0
- package/dist/esm/components/collapsible.js +2 -21
- package/dist/esm/components/collapsible.js.map +1 -0
- package/dist/esm/components/command.js +2 -106
- package/dist/esm/components/command.js.map +1 -0
- package/dist/esm/components/container.js +2 -12
- package/dist/esm/components/container.js.map +1 -0
- package/dist/esm/components/context-menu.js +2 -142
- package/dist/esm/components/context-menu.js.map +1 -0
- package/dist/esm/components/dialog.js +2 -106
- package/dist/esm/components/dialog.js.map +1 -0
- package/dist/esm/components/drawer.js +2 -85
- package/dist/esm/components/drawer.js.map +1 -0
- package/dist/esm/components/dropdown-menu.js +2 -143
- package/dist/esm/components/dropdown-menu.js.map +1 -0
- package/dist/esm/components/em.js +2 -10
- package/dist/esm/components/em.js.map +1 -0
- package/dist/esm/components/form.js +2 -96
- package/dist/esm/components/form.js.map +1 -0
- package/dist/esm/components/heading.js +2 -10
- package/dist/esm/components/heading.js.map +1 -0
- package/dist/esm/components/hover-card.js +2 -34
- package/dist/esm/components/hover-card.js.map +1 -0
- package/dist/esm/components/inline.js +2 -10
- package/dist/esm/components/inline.js.map +1 -0
- package/dist/esm/components/input-number.js +2 -72
- package/dist/esm/components/input-number.js.map +1 -0
- package/dist/esm/components/input-otp.js +2 -53
- package/dist/esm/components/input-otp.js.map +1 -0
- package/dist/esm/components/input-password.js +2 -51
- package/dist/esm/components/input-password.js.map +1 -0
- package/dist/esm/components/input-search.js +2 -57
- package/dist/esm/components/input-search.js.map +1 -0
- package/dist/esm/components/input.js +2 -33
- package/dist/esm/components/input.js.map +1 -0
- package/dist/esm/components/kbd.js +2 -12
- package/dist/esm/components/kbd.js.map +1 -0
- package/dist/esm/components/label.js +2 -11
- package/dist/esm/components/label.js.map +1 -0
- package/dist/esm/components/menubar.js +2 -153
- package/dist/esm/components/menubar.js.map +1 -0
- package/dist/esm/components/navigation-menu.js +2 -94
- package/dist/esm/components/navigation-menu.js.map +1 -0
- package/dist/esm/components/pagination.js +2 -87
- package/dist/esm/components/pagination.js.map +1 -0
- package/dist/esm/components/popover.js +2 -40
- package/dist/esm/components/popover.js.map +1 -0
- package/dist/esm/components/pre.js +2 -10
- package/dist/esm/components/pre.js.map +1 -0
- package/dist/esm/components/progress-circle.js +2 -147
- package/dist/esm/components/progress-circle.js.map +1 -0
- package/dist/esm/components/progress.js +2 -18
- package/dist/esm/components/progress.js.map +1 -0
- package/dist/esm/components/quote.js +2 -10
- package/dist/esm/components/quote.js.map +1 -0
- package/dist/esm/components/radio-cards.js +2 -29
- package/dist/esm/components/radio-cards.js.map +1 -0
- package/dist/esm/components/radio-group.js +2 -22
- package/dist/esm/components/radio-group.js.map +1 -0
- package/dist/esm/components/radio.js +2 -13
- package/dist/esm/components/radio.js.map +1 -0
- package/dist/esm/components/resizable.js +2 -31
- package/dist/esm/components/resizable.js.map +1 -0
- package/dist/esm/components/scroll-area.js +2 -100
- package/dist/esm/components/scroll-area.js.map +1 -0
- package/dist/esm/components/section.js +2 -10
- package/dist/esm/components/section.js.map +1 -0
- package/dist/esm/components/select.js +2 -119
- package/dist/esm/components/select.js.map +1 -0
- package/dist/esm/components/separator.js +2 -42
- package/dist/esm/components/separator.js.map +1 -0
- package/dist/esm/components/sheet.js +2 -123
- package/dist/esm/components/sheet.js.map +1 -0
- package/dist/esm/components/sidebar.js +2 -401
- package/dist/esm/components/sidebar.js.map +1 -0
- package/dist/esm/components/skeleton.js +2 -10
- package/dist/esm/components/skeleton.js.map +1 -0
- package/dist/esm/components/slider.js +2 -45
- package/dist/esm/components/slider.js.map +1 -0
- package/dist/esm/components/sonner.js +2 -19
- package/dist/esm/components/sonner.js.map +1 -0
- package/dist/esm/components/spinner.js +2 -41
- package/dist/esm/components/spinner.js.map +1 -0
- package/dist/esm/components/strong.js +2 -10
- package/dist/esm/components/strong.js.map +1 -0
- package/dist/esm/components/switch.js +2 -15
- package/dist/esm/components/switch.js.map +1 -0
- package/dist/esm/components/table.js +2 -63
- package/dist/esm/components/table.js.map +1 -0
- package/dist/esm/components/tabs.js +2 -31
- package/dist/esm/components/tabs.js.map +1 -0
- package/dist/esm/components/text.js +2 -10
- package/dist/esm/components/text.js.map +1 -0
- package/dist/esm/components/textarea.js +2 -10
- package/dist/esm/components/textarea.js.map +1 -0
- package/dist/esm/components/toggle-group.js +2 -53
- package/dist/esm/components/toggle-group.js.map +1 -0
- package/dist/esm/components/toggle.js +2 -38
- package/dist/esm/components/toggle.js.map +1 -0
- package/dist/esm/components/tooltip.js +2 -44
- package/dist/esm/components/tooltip.js.map +1 -0
- package/dist/esm/index.js +1 -70
- package/dist/esm/lib/logger.js +2 -81
- package/dist/esm/lib/logger.js.map +1 -0
- package/dist/esm/lib/utils.js +2 -8
- package/dist/esm/lib/utils.js.map +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/command.js","sources":["webpack://@codefast/ui/./src/components/command.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { SearchIcon } from \"lucide-react\";\n\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"@/components/dialog\";\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Command\n * -------------------------------------------------------------------------- */\n\nfunction Command({ className, ...props }: ComponentProps<typeof CommandPrimitive>): JSX.Element {\n return (\n <CommandPrimitive\n className={cn(\n \"bg-popover text-popover-foreground outline-hidden flex flex-col overflow-hidden rounded-[inherit]\",\n className,\n )}\n data-slot=\"command\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\nfunction CommandDialog({ children, ...props }: ComponentProps<typeof Dialog>): JSX.Element {\n return (\n <Dialog data-slot=\"command-dialog\" {...props}>\n <DialogContent className=\"rounded-t-lg sm:rounded-lg\" data-slot=\"command-dialog-content\">\n <VisuallyHidden>\n <DialogTitle>Search command</DialogTitle>\n <DialogDescription>Use the search bar to find and select the desired command.</DialogDescription>\n </VisuallyHidden>\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandInput\n * -------------------------------------------------------------------------- */\n\nfunction CommandInput({ className, ...props }: ComponentProps<typeof CommandPrimitive.Input>): JSX.Element {\n return (\n <div className=\"flex items-center gap-2 border-b px-3\" cmdk-input-wrapper=\"\" data-slot=\"command-input-wrapper\">\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n className={cn(\n \"placeholder:text-muted-foreground outline-hidden flex h-10 w-full text-base disabled:opacity-50 md:text-sm\",\n className,\n )}\n data-slot=\"command-input\"\n {...props}\n />\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandList\n * -------------------------------------------------------------------------- */\n\nfunction CommandList({ className, ...props }: ComponentProps<typeof CommandPrimitive.List>): JSX.Element {\n return (\n <CommandPrimitive.List\n className={cn(\"max-h-75 overflow-y-auto overflow-x-hidden\", className)}\n data-slot=\"command-list\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandEmpty\n * -------------------------------------------------------------------------- */\n\nfunction CommandEmpty({ className, ...props }: ComponentProps<typeof CommandPrimitive.Empty>): JSX.Element {\n return (\n <CommandPrimitive.Empty\n className={cn(\"py-6 text-center text-sm\", className)}\n data-slot=\"command-empty\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandGroup\n * -------------------------------------------------------------------------- */\n\nfunction CommandGroup({ className, ...props }: ComponentProps<typeof CommandPrimitive.Group>): JSX.Element {\n return (\n <CommandPrimitive.Group\n className={cn(\n \"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium\",\n className,\n )}\n data-slot=\"command-group\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandSeparator\n * -------------------------------------------------------------------------- */\n\nfunction CommandSeparator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): JSX.Element {\n return (\n <CommandPrimitive.Separator\n className={cn(\"bg-border -mx-1 h-px\", className)}\n data-slot=\"command-separator\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandItem\n * -------------------------------------------------------------------------- */\n\nfunction CommandItem({ className, ...props }: ComponentProps<typeof CommandPrimitive.Item>): JSX.Element {\n return (\n <CommandPrimitive.Item\n className={cn(\n \"aria-selected:bg-accent aria-selected:text-accent-foreground outline-hidden group/command-item [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"command-item\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandLoading\n * -------------------------------------------------------------------------- */\n\nfunction CommandLoading({ className, ...props }: ComponentProps<typeof CommandPrimitive.Loading>): JSX.Element {\n return (\n <CommandPrimitive.Loading\n className={cn(\"flex justify-center p-2\", className)}\n data-slot=\"command-loading\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\nfunction CommandShortcut({ className, ...props }: ComponentProps<\"span\">): JSX.Element {\n return (\n <span\n className={cn(\"text-muted-foreground ml-auto text-xs tracking-widest\", className)}\n data-slot=\"command-shortcut\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandLoading,\n CommandSeparator,\n CommandShortcut,\n};\n"],"names":["Command","className","props","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","VisuallyHidden","DialogTitle","DialogDescription","CommandInput","SearchIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"],"mappings":";4MAeA,SAASA,EAAQ,CAAEC,UAAAA,CAAS,CAAE,GAAGC,EAAgD,EAC/E,MACE,UAACC,EAAAA,OAAgBA,CAAAA,CACf,UAAWC,GAAAA,EAAAA,EAAAA,EACT,oGACAH,GAEF,YAAU,UACT,GAAGC,CAAK,EAGf,CAMA,SAASG,EAAc,CAAEC,SAAAA,CAAQ,CAAE,GAAGJ,EAAsC,EAC1E,MACE,UAACK,EAAAA,MAAMA,CAAAA,CAAC,YAAU,iBAAkB,GAAGL,CAAK,C,SAC1C,WAACM,EAAAA,aAAaA,CAAAA,CAAC,UAAU,6BAA6B,YAAU,yB,UAC9D,WAACC,EAAAA,cAAcA,CAAAA,C,UACb,UAACC,EAAAA,WAAWA,CAAAA,C,SAAC,gB,GACb,UAACC,EAAAA,iBAAiBA,CAAAA,C,SAAC,4D,MAErB,UAACX,EAAAA,CAAQ,UAAU,4L,SAChBM,C,OAKX,CAMA,SAASM,EAAa,CAAEX,UAAAA,CAAS,CAAE,GAAGC,EAAsD,EAC1F,MACE,WAAC,OAAI,UAAU,wCAAwC,qBAAmB,GAAG,YAAU,wB,UACrF,UAACW,EAAAA,UAAUA,CAAAA,CAAC,UAAU,4B,GACtB,UAACV,EAAAA,OAAAA,CAAAA,KAAsB,EACrB,UAAWC,GAAAA,EAAAA,EAAAA,EACT,6GACAH,GAEF,YAAU,gBACT,GAAGC,CAAK,KAIjB,CAMA,SAASY,EAAY,CAAEb,UAAAA,CAAS,CAAE,GAAGC,EAAqD,EACxF,MACE,UAACC,EAAAA,OAAAA,CAAAA,IAAqB,EACpB,UAAWC,GAAAA,EAAAA,EAAAA,EAAG,6CAA8CH,GAC5D,YAAU,eACT,GAAGC,CAAK,EAGf,CAMA,SAASa,EAAa,CAAEd,UAAAA,CAAS,CAAE,GAAGC,EAAsD,EAC1F,MACE,UAACC,EAAAA,OAAAA,CAAAA,KAAsB,EACrB,UAAWC,GAAAA,EAAAA,EAAAA,EAAG,2BAA4BH,GAC1C,YAAU,gBACT,GAAGC,CAAK,EAGf,CAMA,SAASc,EAAa,CAAEf,UAAAA,CAAS,CAAE,GAAGC,EAAsD,EAC1F,MACE,UAACC,EAAAA,OAAAA,CAAAA,KAAsB,EACrB,UAAWC,GAAAA,EAAAA,EAAAA,EACT,yNACAH,GAEF,YAAU,gBACT,GAAGC,CAAK,EAGf,CAMA,SAASe,EAAiB,CAAEhB,UAAAA,CAAS,CAAE,GAAGC,EAA0D,EAClG,MACE,UAACC,EAAAA,OAAAA,CAAAA,SAA0B,EACzB,UAAWC,GAAAA,EAAAA,EAAAA,EAAG,uBAAwBH,GACtC,YAAU,oBACT,GAAGC,CAAK,EAGf,CAMA,SAASgB,EAAY,CAAEjB,UAAAA,CAAS,CAAE,GAAGC,EAAqD,EACxF,MACE,UAACC,EAAAA,OAAAA,CAAAA,IAAqB,EACpB,UAAWC,GAAAA,EAAAA,EAAAA,EACT,iUACAH,GAEF,YAAU,eACT,GAAGC,CAAK,EAGf,CAMA,SAASiB,EAAe,CAAElB,UAAAA,CAAS,CAAE,GAAGC,EAAwD,EAC9F,MACE,UAACC,EAAAA,OAAAA,CAAAA,OAAwB,EACvB,UAAWC,GAAAA,EAAAA,EAAAA,EAAG,0BAA2BH,GACzC,YAAU,kBACT,GAAGC,CAAK,EAGf,CAMA,SAASkB,EAAgB,CAAEnB,UAAAA,CAAS,CAAE,GAAGC,EAA+B,EACtE,MACE,UAAC,QACC,UAAWE,GAAAA,EAAAA,EAAAA,EAAG,wDAAyDH,GACvE,YAAU,mBACT,GAAGC,CAAK,EAGf,Q"}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
4
|
-
function Container({ asChild, className, ...props }) {
|
|
5
|
-
const Component = asChild ? __WEBPACK_EXTERNAL_MODULE__radix_ui_react_slot_85c2da36__.Slot : "div";
|
|
6
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Component, {
|
|
7
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("container", className),
|
|
8
|
-
"data-slot": "container",
|
|
9
|
-
...props
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
export { Container };
|
|
1
|
+
import*as t from"react/jsx-runtime";import*as r from"@radix-ui/react-slot";import*as o from"../lib/utils.js";function a({asChild:a,className:i,...n}){let s=a?r.Slot:"div";return(0,t.jsx)(s,{className:(0,o.cn)("container",i),"data-slot":"container",...n})}export{a as Container};
|
|
2
|
+
//# sourceMappingURL=container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/container.js","sources":["webpack://@codefast/ui/./src/components/container.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Container\n * -------------------------------------------------------------------------- */\n\nfunction Container({\n asChild,\n className,\n ...props\n}: ComponentProps<\"div\"> & {\n asChild?: boolean;\n}): JSX.Element {\n const Component = asChild ? Slot : \"div\";\n\n return <Component className={cn(\"container\", className)} data-slot=\"container\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Container };\n"],"names":["Container","asChild","className","props","Component","Slot","cn"],"mappings":"6GAUA,SAASA,EAAU,CACjBC,QAAAA,CAAO,CACPC,UAAAA,CAAS,CACT,GAAGC,EAGJ,EACC,IAAMC,EAAYH,EAAUI,EAAAA,IAAIA,CAAG,MAEnC,MAAO,UAACD,EAAAA,CAAU,UAAWE,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,YAAaJ,GAAY,YAAU,YAAa,GAAGC,CAAK,A,EAC1F,Q"}
|
|
@@ -1,142 +1,2 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
5
|
-
function ContextMenu({ ...props }) {
|
|
6
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Root, {
|
|
7
|
-
"data-slot": "context-menu",
|
|
8
|
-
...props
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
function ContextMenuTrigger({ ...props }) {
|
|
12
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Trigger, {
|
|
13
|
-
"data-slot": "context-menu-trigger",
|
|
14
|
-
...props
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function ContextMenuGroup({ ...props }) {
|
|
18
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Group, {
|
|
19
|
-
"data-slot": "context-menu-group",
|
|
20
|
-
...props
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
function ContextMenuSub({ ...props }) {
|
|
24
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Sub, {
|
|
25
|
-
"data-slot": "context-menu-sub",
|
|
26
|
-
...props
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function ContextMenuRadioGroup({ ...props }) {
|
|
30
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.RadioGroup, {
|
|
31
|
-
"data-slot": "context-menu-radio-group",
|
|
32
|
-
...props
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function ContextMenuSubTrigger({ children, className, inset, ...props }) {
|
|
36
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.SubTrigger, {
|
|
37
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0", className),
|
|
38
|
-
"data-inset": inset,
|
|
39
|
-
"data-slot": "context-menu-sub-trigger",
|
|
40
|
-
...props,
|
|
41
|
-
children: [
|
|
42
|
-
children,
|
|
43
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.ChevronRightIcon, {
|
|
44
|
-
className: "ml-auto size-4"
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function ContextMenuSubContent({ className, ...props }) {
|
|
50
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Portal, {
|
|
51
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.SubContent, {
|
|
52
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg", className),
|
|
53
|
-
"data-slot": "context-menu-sub-content",
|
|
54
|
-
...props
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function ContextMenuContent({ className, ...props }) {
|
|
59
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Portal, {
|
|
60
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Content, {
|
|
61
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-lg border p-1 shadow-lg", className),
|
|
62
|
-
"data-slot": "context-menu-content",
|
|
63
|
-
...props
|
|
64
|
-
})
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function ContextMenuItem({ className, inset, variant, ...props }) {
|
|
68
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Item, {
|
|
69
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/context-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0", className),
|
|
70
|
-
"data-inset": inset,
|
|
71
|
-
"data-slot": "context-menu-item",
|
|
72
|
-
"data-variant": variant,
|
|
73
|
-
...props
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function ContextMenuCheckboxItem({ checked, children, className, ...props }) {
|
|
77
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.CheckboxItem, {
|
|
78
|
-
checked: checked,
|
|
79
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0", className),
|
|
80
|
-
"data-slot": "context-menu-checkbox-item",
|
|
81
|
-
...props,
|
|
82
|
-
children: [
|
|
83
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
84
|
-
className: "absolute left-2 flex items-center justify-center",
|
|
85
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.ItemIndicator, {
|
|
86
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.CheckIcon, {
|
|
87
|
-
className: "size-4"
|
|
88
|
-
})
|
|
89
|
-
})
|
|
90
|
-
}),
|
|
91
|
-
children
|
|
92
|
-
]
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function ContextMenuRadioItem({ children, className, ...props }) {
|
|
96
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.RadioItem, {
|
|
97
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0", className),
|
|
98
|
-
"data-slot": "context-menu-radio-item",
|
|
99
|
-
...props,
|
|
100
|
-
children: [
|
|
101
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
102
|
-
className: "absolute left-2 flex items-center justify-center",
|
|
103
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.ItemIndicator, {
|
|
104
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.DotIcon, {
|
|
105
|
-
className: "size-4 fill-current"
|
|
106
|
-
})
|
|
107
|
-
})
|
|
108
|
-
}),
|
|
109
|
-
children
|
|
110
|
-
]
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function ContextMenuLabel({ className, inset, ...props }) {
|
|
114
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Label, {
|
|
115
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold", className),
|
|
116
|
-
"data-inset": inset,
|
|
117
|
-
"data-slot": "context-menu-label",
|
|
118
|
-
...props
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
function ContextMenuSeparator({ className, ...props }) {
|
|
122
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Separator, {
|
|
123
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-border mx-2 my-1 h-px", className),
|
|
124
|
-
"data-slot": "context-menu-separator",
|
|
125
|
-
...props
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function ContextMenuShortcut({ className, ...props }) {
|
|
129
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
130
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-muted-foreground group-data-[variant=destructive]/context-menu-item:text-destructive/80 ml-auto text-xs tracking-widest", className),
|
|
131
|
-
"data-slot": "context-menu-shortcut",
|
|
132
|
-
...props
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
function ContextMenuArrow({ className, ...props }) {
|
|
136
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Arrow, {
|
|
137
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("fill-popover", className),
|
|
138
|
-
"data-slot": "context-menu-arrow",
|
|
139
|
-
...props
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
export { ContextMenu, ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
1
|
+
import*as t from"react/jsx-runtime";import*as e from"@radix-ui/react-context-menu";import*as a from"lucide-react";import*as n from"../lib/utils.js";function o({...a}){return(0,t.jsx)(e.Root,{"data-slot":"context-menu",...a})}function s({...a}){return(0,t.jsx)(e.Trigger,{"data-slot":"context-menu-trigger",...a})}function r({...a}){return(0,t.jsx)(e.Group,{"data-slot":"context-menu-group",...a})}function i({...a}){return(0,t.jsx)(e.Sub,{"data-slot":"context-menu-sub",...a})}function d({...a}){return(0,t.jsx)(e.RadioGroup,{"data-slot":"context-menu-radio-group",...a})}function c({children:o,className:s,inset:r,...i}){return(0,t.jsxs)(e.SubTrigger,{className:(0,n.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",s),"data-inset":r,"data-slot":"context-menu-sub-trigger",...i,children:[o,(0,t.jsx)(a.ChevronRightIcon,{className:"ml-auto size-4"})]})}function u({className:a,...o}){return(0,t.jsx)(e.Portal,{children:(0,t.jsx)(e.SubContent,{className:(0,n.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg",a),"data-slot":"context-menu-sub-content",...o})})}function l({className:a,...o}){return(0,t.jsx)(e.Portal,{children:(0,t.jsx)(e.Content,{className:(0,n.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-lg border p-1 shadow-lg",a),"data-slot":"context-menu-content",...o})})}function m({className:a,inset:o,variant:s,...r}){return(0,t.jsx)(e.Item,{className:(0,n.cn)("focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/context-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",a),"data-inset":o,"data-slot":"context-menu-item","data-variant":s,...r})}function x({checked:o,children:s,className:r,...i}){return(0,t.jsxs)(e.CheckboxItem,{checked:o,className:(0,n.cn)("focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",r),"data-slot":"context-menu-checkbox-item",...i,children:[(0,t.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,t.jsx)(e.ItemIndicator,{children:(0,t.jsx)(a.CheckIcon,{className:"size-4"})})}),s]})}function p({children:o,className:s,...r}){return(0,t.jsxs)(e.RadioItem,{className:(0,n.cn)("focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",s),"data-slot":"context-menu-radio-item",...r,children:[(0,t.jsx)("span",{className:"absolute left-2 flex items-center justify-center",children:(0,t.jsx)(e.ItemIndicator,{children:(0,t.jsx)(a.DotIcon,{className:"size-4 fill-current"})})}),o]})}function f({className:a,inset:o,...s}){return(0,t.jsx)(e.Label,{className:(0,n.cn)("data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold",a),"data-inset":o,"data-slot":"context-menu-label",...s})}function g({className:a,...o}){return(0,t.jsx)(e.Separator,{className:(0,n.cn)("bg-border mx-2 my-1 h-px",a),"data-slot":"context-menu-separator",...o})}function b({className:e,...a}){return(0,t.jsx)("span",{className:(0,n.cn)("text-muted-foreground group-data-[variant=destructive]/context-menu-item:text-destructive/80 ml-auto text-xs tracking-widest",e),"data-slot":"context-menu-shortcut",...a})}function h({className:a,...o}){return(0,t.jsx)(e.Arrow,{className:(0,n.cn)("fill-popover",a),"data-slot":"context-menu-arrow",...o})}export{o as ContextMenu,h as ContextMenuArrow,x as ContextMenuCheckboxItem,l as ContextMenuContent,r as ContextMenuGroup,m as ContextMenuItem,f as ContextMenuLabel,d as ContextMenuRadioGroup,p as ContextMenuRadioItem,g as ContextMenuSeparator,b as ContextMenuShortcut,i as ContextMenuSub,u as ContextMenuSubContent,c as ContextMenuSubTrigger,s as ContextMenuTrigger};
|
|
2
|
+
//# sourceMappingURL=context-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/context-menu.js","sources":["webpack://@codefast/ui/./src/components/context-menu.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from \"react\";\n\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { CheckIcon, ChevronRightIcon, DotIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenu({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Root>): JSX.Element {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuTrigger({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Trigger>): JSX.Element {\n return <ContextMenuPrimitive.Trigger data-slot=\"context-menu-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Group>): JSX.Element {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSub({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Sub>): JSX.Element {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuRadioGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): JSX.Element {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSubTrigger({\n children,\n className,\n inset,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.SubTrigger\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-inset:pl-8 outline-hidden flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"context-menu-sub-trigger\"\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSubContent({\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.SubContent>): JSX.Element {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"context-menu-sub-content\"\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuContent({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Content>): JSX.Element {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-lg border p-1 shadow-lg\",\n className,\n )}\n data-slot=\"context-menu-content\"\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuItem({\n className,\n inset,\n variant,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.Item\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-inset:pl-8 outline-hidden group/context-menu-item data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-inset={inset}\n data-slot=\"context-menu-item\"\n data-variant={variant}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuCheckboxItem({\n checked,\n children,\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): JSX.Element {\n return (\n <ContextMenuPrimitive.CheckboxItem\n checked={checked}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"context-menu-checkbox-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuRadioItem({\n children,\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.RadioItem>): JSX.Element {\n return (\n <ContextMenuPrimitive.RadioItem\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground outline-hidden group/context-menu-item relative flex cursor-default select-none items-center gap-x-2 rounded-sm py-1.5 pl-8 pr-2 text-sm aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"context-menu-radio-item\"\n {...props}\n >\n <span className=\"absolute left-2 flex items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}): JSX.Element {\n return (\n <ContextMenuPrimitive.Label\n className={cn(\"data-inset:pl-8 flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold\", className)}\n data-inset={inset}\n data-slot=\"context-menu-label\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuSeparator({\n className,\n ...props\n}: ComponentProps<typeof ContextMenuPrimitive.Separator>): JSX.Element {\n return (\n <ContextMenuPrimitive.Separator\n className={cn(\"bg-border mx-2 my-1 h-px\", className)}\n data-slot=\"context-menu-separator\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuShortcut({ className, ...props }: ComponentProps<\"span\">): JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground group-data-[variant=destructive]/context-menu-item:text-destructive/80 ml-auto text-xs tracking-widest\",\n className,\n )}\n data-slot=\"context-menu-shortcut\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuArrow({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Arrow>): JSX.Element {\n return (\n <ContextMenuPrimitive.Arrow className={cn(\"fill-popover\", className)} data-slot=\"context-menu-arrow\" {...props} />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuArrow,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n"],"names":["ContextMenu","props","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","cn","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","variant","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"oJAWA,SAASA,EAAY,CAAE,GAAGC,EAAyD,EACjF,MAAO,UAACC,EAAAA,IAAyB,EAAC,YAAU,eAAgB,GAAGD,CAAK,A,EACtE,CAMA,SAASE,EAAmB,CAAE,GAAGF,EAA4D,EAC3F,MAAO,UAACC,EAAAA,OAA4B,EAAC,YAAU,uBAAwB,GAAGD,CAAK,A,EACjF,CAMA,SAASG,EAAiB,CAAE,GAAGH,EAA0D,EACvF,MAAO,UAACC,EAAAA,KAA0B,EAAC,YAAU,qBAAsB,GAAGD,CAAK,A,EAC7E,CAMA,SAASI,EAAe,CAAE,GAAGJ,EAAwD,EACnF,MAAO,UAACC,EAAAA,GAAwB,EAAC,YAAU,mBAAoB,GAAGD,CAAK,A,EACzE,CAMA,SAASK,EAAsB,CAAE,GAAGL,EAA+D,EACjG,MAAO,UAACC,EAAAA,UAA+B,EAAC,YAAU,2BAA4B,GAAGD,CAAK,A,EACxF,CAMA,SAASM,EAAsB,CAC7BC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACL,GAAGT,EAGJ,EACC,MACE,WAACC,EAAAA,UAA+B,EAC9B,UAAWS,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,6RACAF,GAEF,aAAYC,EACZ,YAAU,2BACT,GAAGT,CAAK,C,UAERO,EACD,UAACI,EAAAA,gBAAgBA,CAAAA,CAAC,UAAU,gB,KAGlC,CAMA,SAASC,EAAsB,CAC7BJ,UAAAA,CAAS,CACT,GAAGR,EACoD,EACvD,MACE,UAACC,EAAAA,MAA2B,E,SAC1B,UAACA,EAAAA,UAA+B,EAC9B,UAAWS,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,otBACAF,GAEF,YAAU,2BACT,GAAGR,CAAK,A,IAIjB,CAMA,SAASa,EAAmB,CAAEL,UAAAA,CAAS,CAAE,GAAGR,EAA4D,EACtG,MACE,UAACC,EAAAA,MAA2B,E,SAC1B,UAACA,EAAAA,OAA4B,EAC3B,UAAWS,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,6YACAF,GAEF,YAAU,uBACT,GAAGR,CAAK,A,IAIjB,CAMA,SAASc,EAAgB,CACvBN,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACLM,QAAAA,CAAO,CACP,GAAGf,EAIJ,EACC,MACE,UAACC,EAAAA,IAAyB,EACxB,UAAWS,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,0iBACAF,GAEF,aAAYC,EACZ,YAAU,oBACV,eAAcM,EACb,GAAGf,CAAK,A,EAGf,CAMA,SAASgB,EAAwB,CAC/BC,QAAAA,CAAO,CACPV,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACT,GAAGR,EACsD,EACzD,MACE,WAACC,EAAAA,YAAiC,EAChC,QAASgB,EACT,UAAWP,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,uQACAF,GAEF,YAAU,6BACT,GAAGR,CAAK,C,UAET,UAAC,QAAK,UAAU,mD,SACd,UAACC,EAAAA,aAAkC,E,SACjC,UAACiB,EAAAA,SAASA,CAAAA,CAAC,UAAU,Q,OAGxBX,E,EAGP,CAMA,SAASY,EAAqB,CAC5BZ,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACT,GAAGR,EACmD,EACtD,MACE,WAACC,EAAAA,SAA8B,EAC7B,UAAWS,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,uQACAF,GAEF,YAAU,0BACT,GAAGR,CAAK,C,UAET,UAAC,QAAK,UAAU,mD,SACd,UAACC,EAAAA,aAAkC,E,SACjC,UAACmB,EAAAA,OAAOA,CAAAA,CAAC,UAAU,qB,OAGtBb,E,EAGP,CAMA,SAASc,EAAiB,CACxBb,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACL,GAAGT,EAGJ,EACC,MACE,UAACC,EAAAA,KAA0B,EACzB,UAAWS,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,8EAA+EF,GAC7F,aAAYC,EACZ,YAAU,qBACT,GAAGT,CAAK,A,EAGf,CAMA,SAASsB,EAAqB,CAC5Bd,UAAAA,CAAS,CACT,GAAGR,EACmD,EACtD,MACE,UAACC,EAAAA,SAA8B,EAC7B,UAAWS,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,2BAA4BF,GAC1C,YAAU,yBACT,GAAGR,CAAK,A,EAGf,CAMA,SAASuB,EAAoB,CAAEf,UAAAA,CAAS,CAAE,GAAGR,EAA+B,EAC1E,MACE,UAAC,QACC,UAAWU,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,+HACAF,GAEF,YAAU,wBACT,GAAGR,CAAK,A,EAGf,CAMA,SAASwB,EAAiB,CAAEhB,UAAAA,CAAS,CAAE,GAAGR,EAA0D,EAClG,MACE,UAACC,EAAAA,KAA0B,EAAC,UAAWS,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,eAAgBF,GAAY,YAAU,qBAAsB,GAAGR,CAAK,A,EAElH,Q"}
|
|
@@ -1,106 +1,2 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__ from "./button.js";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
6
|
-
function Dialog({ ...props }) {
|
|
7
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Root, {
|
|
8
|
-
"data-slot": "dialog",
|
|
9
|
-
...props
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function DialogTrigger({ ...props }) {
|
|
13
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Trigger, {
|
|
14
|
-
"data-slot": "dialog-trigger",
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function DialogContent({ children, className, classNames, ...props }) {
|
|
19
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Portal, {
|
|
20
|
-
children: [
|
|
21
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Overlay, {
|
|
22
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-popover-overlay data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50", classNames?.overlay),
|
|
23
|
-
"data-slot": "dialog-overlay"
|
|
24
|
-
}),
|
|
25
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Content, {
|
|
26
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("data-[state=open]:animate-in max-sm:data-[state=open]:animation-duration-500 max-sm:data-[state=open]:slide-in-from-bottom sm:data-[state=open]:fade-in-0 sm:data-[state=open]:zoom-in-95 data-[state=closed]:animate-out max-sm:data-[state=closed]:animation-duration-500 max-sm:data-[state=closed]:slide-out-to-bottom sm:data-[state=closed]:fade-out-0 sm:data-[state=closed]:zoom-out-95 fixed inset-0 z-50 grid grid-rows-[1fr_auto] justify-items-center overflow-auto sm:grid-rows-[1fr_auto_3fr] sm:p-4", classNames?.wrapper),
|
|
27
|
-
"data-slot": "dialog-content-wrapper",
|
|
28
|
-
...props,
|
|
29
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
30
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-popover text-popover-foreground relative row-start-2 flex w-full flex-col rounded-t-2xl border shadow-lg sm:max-w-lg sm:rounded-2xl", classNames?.content, className),
|
|
31
|
-
"data-slot": "dialog-content",
|
|
32
|
-
children: [
|
|
33
|
-
children,
|
|
34
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Close, {
|
|
35
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__.buttonVariants)({
|
|
36
|
-
className: [
|
|
37
|
-
"absolute right-2.5 top-2.5 size-7",
|
|
38
|
-
classNames?.close
|
|
39
|
-
],
|
|
40
|
-
size: "icon",
|
|
41
|
-
variant: "ghost"
|
|
42
|
-
}),
|
|
43
|
-
"data-slot": "dialog-close",
|
|
44
|
-
children: [
|
|
45
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.XIcon, {
|
|
46
|
-
className: "size-4"
|
|
47
|
-
}),
|
|
48
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
49
|
-
className: "sr-only",
|
|
50
|
-
children: "Close"
|
|
51
|
-
})
|
|
52
|
-
]
|
|
53
|
-
})
|
|
54
|
-
]
|
|
55
|
-
})
|
|
56
|
-
})
|
|
57
|
-
]
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function DialogHeader({ className, ...props }) {
|
|
61
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("header", {
|
|
62
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex shrink-0 flex-col gap-1.5 px-6 pb-2 pt-6 text-center sm:text-left", className),
|
|
63
|
-
"data-slot": "dialog-header",
|
|
64
|
-
...props
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function DialogBody({ className, ...props }) {
|
|
68
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("main", {
|
|
69
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("overflow-auto px-6 py-2", className),
|
|
70
|
-
"data-slot": "dialog-body",
|
|
71
|
-
...props
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function DialogFooter({ className, ...props }) {
|
|
75
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("footer", {
|
|
76
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-2 sm:flex-row sm:justify-end", className),
|
|
77
|
-
"data-slot": "dialog-footer",
|
|
78
|
-
...props
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function DialogTitle({ className, ...props }) {
|
|
82
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Title, {
|
|
83
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-lg font-semibold leading-none tracking-tight", className),
|
|
84
|
-
"data-slot": "dialog-title",
|
|
85
|
-
...props
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function DialogDescription({ className, ...props }) {
|
|
89
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Description, {
|
|
90
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-muted-foreground text-sm", className),
|
|
91
|
-
"data-slot": "dialog-description",
|
|
92
|
-
...props
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function DialogClose({ className, size, variant = "outline", ...props }) {
|
|
96
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_dialog_6b867f3d__.Close, {
|
|
97
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__.buttonVariants)({
|
|
98
|
-
className,
|
|
99
|
-
size,
|
|
100
|
-
variant
|
|
101
|
-
}),
|
|
102
|
-
"data-slot": "dialog-close",
|
|
103
|
-
...props
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
|
|
1
|
+
import*as t from"react/jsx-runtime";import*as a from"@radix-ui/react-dialog";import*as o from"lucide-react";import*as e from"./button.js";import*as s from"../lib/utils.js";function i({...o}){return(0,t.jsx)(a.Root,{"data-slot":"dialog",...o})}function l({...o}){return(0,t.jsx)(a.Trigger,{"data-slot":"dialog-trigger",...o})}function n({children:i,className:l,classNames:n,...r}){return(0,t.jsxs)(a.Portal,{children:[(0,t.jsx)(a.Overlay,{className:(0,s.cn)("bg-popover-overlay data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50",n?.overlay),"data-slot":"dialog-overlay"}),(0,t.jsx)(a.Content,{className:(0,s.cn)("data-[state=open]:animate-in max-sm:data-[state=open]:animation-duration-500 max-sm:data-[state=open]:slide-in-from-bottom sm:data-[state=open]:fade-in-0 sm:data-[state=open]:zoom-in-95 data-[state=closed]:animate-out max-sm:data-[state=closed]:animation-duration-500 max-sm:data-[state=closed]:slide-out-to-bottom sm:data-[state=closed]:fade-out-0 sm:data-[state=closed]:zoom-out-95 fixed inset-0 z-50 grid grid-rows-[1fr_auto] justify-items-center overflow-auto sm:grid-rows-[1fr_auto_3fr] sm:p-4",n?.wrapper),"data-slot":"dialog-content-wrapper",...r,children:(0,t.jsxs)("div",{className:(0,s.cn)("bg-popover text-popover-foreground relative row-start-2 flex w-full flex-col rounded-t-2xl border shadow-lg sm:max-w-lg sm:rounded-2xl",n?.content,l),"data-slot":"dialog-content",children:[i,(0,t.jsxs)(a.Close,{className:(0,e.buttonVariants)({className:["absolute right-2.5 top-2.5 size-7",n?.close],size:"icon",variant:"ghost"}),"data-slot":"dialog-close",children:[(0,t.jsx)(o.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})})]})}function r({className:a,...o}){return(0,t.jsx)("header",{className:(0,s.cn)("flex shrink-0 flex-col gap-1.5 px-6 pb-2 pt-6 text-center sm:text-left",a),"data-slot":"dialog-header",...o})}function d({className:a,...o}){return(0,t.jsx)("main",{className:(0,s.cn)("overflow-auto px-6 py-2",a),"data-slot":"dialog-body",...o})}function c({className:a,...o}){return(0,t.jsx)("footer",{className:(0,s.cn)("flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-2 sm:flex-row sm:justify-end",a),"data-slot":"dialog-footer",...o})}function m({className:o,...e}){return(0,t.jsx)(a.Title,{className:(0,s.cn)("text-lg font-semibold leading-none tracking-tight",o),"data-slot":"dialog-title",...e})}function u({className:o,...e}){return(0,t.jsx)(a.Description,{className:(0,s.cn)("text-muted-foreground text-sm",o),"data-slot":"dialog-description",...e})}function g({className:o,size:s,variant:i="outline",...l}){return(0,t.jsx)(a.Close,{className:(0,e.buttonVariants)({className:o,size:s,variant:i}),"data-slot":"dialog-close",...l})}export{i as Dialog,d as DialogBody,g as DialogClose,n as DialogContent,u as DialogDescription,c as DialogFooter,r as DialogHeader,m as DialogTitle,l as DialogTrigger};
|
|
2
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/dialog.js","sources":["webpack://@codefast/ui/./src/components/dialog.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from \"react\";\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { XIcon } from \"lucide-react\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { buttonVariants } from \"@/components/button\";\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\nfunction Dialog({ ...props }: ComponentProps<typeof DialogPrimitive.Root>): JSX.Element {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DialogTrigger({ ...props }: ComponentProps<typeof DialogPrimitive.Trigger>): JSX.Element {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\nfunction DialogContent({\n children,\n className,\n classNames,\n ...props\n}: ComponentProps<typeof DialogPrimitive.Content> & {\n classNames?: {\n close?: string;\n content?: string;\n overlay?: string;\n wrapper?: string;\n };\n}): JSX.Element {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n className={cn(\n \"bg-popover-overlay data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50\",\n classNames?.overlay,\n )}\n data-slot=\"dialog-overlay\"\n />\n <DialogPrimitive.Content\n className={cn(\n \"data-[state=open]:animate-in max-sm:data-[state=open]:animation-duration-500 max-sm:data-[state=open]:slide-in-from-bottom sm:data-[state=open]:fade-in-0 sm:data-[state=open]:zoom-in-95 data-[state=closed]:animate-out max-sm:data-[state=closed]:animation-duration-500 max-sm:data-[state=closed]:slide-out-to-bottom sm:data-[state=closed]:fade-out-0 sm:data-[state=closed]:zoom-out-95 fixed inset-0 z-50 grid grid-rows-[1fr_auto] justify-items-center overflow-auto sm:grid-rows-[1fr_auto_3fr] sm:p-4\",\n classNames?.wrapper,\n )}\n data-slot=\"dialog-content-wrapper\"\n {...props}\n >\n <div\n className={cn(\n \"bg-popover text-popover-foreground relative row-start-2 flex w-full flex-col rounded-t-2xl border shadow-lg sm:max-w-lg sm:rounded-2xl\",\n classNames?.content,\n className,\n )}\n data-slot=\"dialog-content\"\n >\n {children}\n <DialogPrimitive.Close\n className={buttonVariants({\n className: [\"absolute right-2.5 top-2.5 size-7\", classNames?.close],\n size: \"icon\",\n variant: \"ghost\",\n })}\n data-slot=\"dialog-close\"\n >\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </div>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\nfunction DialogHeader({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return (\n <header\n className={cn(\"flex shrink-0 flex-col gap-1.5 px-6 pb-2 pt-6 text-center sm:text-left\", className)}\n data-slot=\"dialog-header\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\nfunction DialogBody({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <main className={cn(\"overflow-auto px-6 py-2\", className)} data-slot=\"dialog-body\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\nfunction DialogFooter({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return (\n <footer\n className={cn(\"flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-2 sm:flex-row sm:justify-end\", className)}\n data-slot=\"dialog-footer\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\nfunction DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>): JSX.Element {\n return (\n <DialogPrimitive.Title\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n data-slot=\"dialog-title\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\nfunction DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>): JSX.Element {\n return (\n <DialogPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"dialog-description\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\nfunction DialogClose({\n className,\n size,\n variant = \"outline\",\n ...props\n}: Omit<ComponentProps<typeof DialogPrimitive.Close>, \"ref\"> & {\n size?: VariantProps<typeof buttonVariants>[\"size\"];\n variant?: VariantProps<typeof buttonVariants>[\"variant\"];\n}): JSX.Element {\n return (\n <DialogPrimitive.Close\n className={buttonVariants({ className, size, variant })}\n data-slot=\"dialog-close\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogContent","children","className","classNames","cn","buttonVariants","XIcon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription","DialogClose","size","variant"],"mappings":"4KAcA,SAASA,EAAO,CAAE,GAAGC,EAAoD,EACvE,MAAO,UAACC,EAAAA,IAAoB,EAAC,YAAU,SAAU,GAAGD,CAAK,A,EAC3D,CAMA,SAASE,EAAc,CAAE,GAAGF,EAAuD,EACjF,MAAO,UAACC,EAAAA,OAAuB,EAAC,YAAU,iBAAkB,GAAGD,CAAK,A,EACtE,CAMA,SAASG,EAAc,CACrBC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,WAAAA,CAAU,CACV,GAAGN,EAQJ,EACC,MACE,WAACC,EAAAA,MAAsB,E,UACrB,UAACA,EAAAA,OAAuB,EACtB,UAAWM,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,+GACAD,GAAY,SAEd,YAAU,gB,GAEZ,UAACL,EAAAA,OAAuB,EACtB,UAAWM,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,qfACAD,GAAY,SAEd,YAAU,yBACT,GAAGN,CAAK,C,SAET,WAAC,OACC,UAAWO,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EACT,yIACAD,GAAY,QACZD,GAEF,YAAU,iB,UAETD,EACD,WAACH,EAAAA,KAAqB,EACpB,UAAWO,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,EAAe,CACxB,UAAW,CAAC,oCAAqCF,GAAY,MAAM,CACnE,KAAM,OACN,QAAS,OACX,GACA,YAAU,e,UAEV,UAACG,EAAAA,KAAKA,CAAAA,CAAC,UAAU,Q,GACjB,UAAC,QAAK,UAAU,U,SAAU,O,aAMtC,CAMA,SAASC,EAAa,CAAEL,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MACE,UAAC,UACC,UAAWO,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,yEAA0EF,GACxF,YAAU,gBACT,GAAGL,CAAK,A,EAGf,CAMA,SAASW,EAAW,CAAEN,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAChE,MAAO,UAAC,QAAK,UAAWO,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,0BAA2BF,GAAY,YAAU,cAAe,GAAGL,CAAK,A,EACrG,CAMA,SAASY,EAAa,CAAEP,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MACE,UAAC,UACC,UAAWO,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,iFAAkFF,GAChG,YAAU,gBACT,GAAGL,CAAK,A,EAGf,CAMA,SAASa,EAAY,CAAER,UAAAA,CAAS,CAAE,GAAGL,EAAqD,EACxF,MACE,UAACC,EAAAA,KAAqB,EACpB,UAAWM,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,oDAAqDF,GACnE,YAAU,eACT,GAAGL,CAAK,A,EAGf,CAMA,SAASc,EAAkB,CAAET,UAAAA,CAAS,CAAE,GAAGL,EAA2D,EACpG,MACE,UAACC,EAAAA,WAA2B,EAC1B,UAAWM,AAAAA,GAAAA,EAAAA,EAAAA,AAAAA,EAAG,gCAAiCF,GAC/C,YAAU,qBACT,GAAGL,CAAK,A,EAGf,CAMA,SAASe,EAAY,CACnBV,UAAAA,CAAS,CACTW,KAAAA,CAAI,CACJC,QAAAA,EAAU,SAAS,CACnB,GAAGjB,EAIJ,EACC,MACE,UAACC,EAAAA,KAAqB,EACpB,UAAWO,AAAAA,GAAAA,EAAAA,cAAAA,AAAAA,EAAe,CAAEH,UAAAA,EAAWW,KAAAA,EAAMC,QAAAA,CAAQ,GACrD,YAAU,eACT,GAAGjB,CAAK,A,EAGf,Q"}
|
|
@@ -1,86 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__ from "./button.js";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__ from "../lib/utils.js";
|
|
6
|
-
function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
7
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_vaul__.Drawer.Root, {
|
|
8
|
-
"data-slot": "drawer",
|
|
9
|
-
shouldScaleBackground: shouldScaleBackground,
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
function DrawerTrigger({ ...props }) {
|
|
14
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_vaul__.Drawer.Trigger, {
|
|
15
|
-
"data-slot": "drawer-trigger",
|
|
16
|
-
...props
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function DrawerContent({ children, className, classNames, ...props }) {
|
|
20
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_vaul__.Drawer.Portal, {
|
|
21
|
-
children: [
|
|
22
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_vaul__.Drawer.Overlay, {
|
|
23
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-popover-overlay fixed inset-0 z-50", classNames?.overlay),
|
|
24
|
-
"data-slot": "drawer-overlay"
|
|
25
|
-
}),
|
|
26
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_vaul__.Drawer.Content, {
|
|
27
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("group/drawer-content bg-background fixed z-50 flex h-auto flex-col data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=bottom]:rounded-t-2xl data-[vaul-drawer-direction=top]:rounded-b-2xl data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm", classNames?.content, className),
|
|
28
|
-
"data-slot": "drawer-content",
|
|
29
|
-
...props,
|
|
30
|
-
children: [
|
|
31
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
32
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("bg-muted mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block", classNames?.handle)
|
|
33
|
-
}),
|
|
34
|
-
children
|
|
35
|
-
]
|
|
36
|
-
})
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function DrawerHeader({ className, ...props }) {
|
|
41
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
42
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("flex flex-col gap-1.5 p-4", className),
|
|
43
|
-
"data-slot": "drawer-header",
|
|
44
|
-
...props
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function DrawerBody({ className, ...props }) {
|
|
48
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("main", {
|
|
49
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("overflow-auto px-4 py-2", className),
|
|
50
|
-
"data-slot": "drawer-body",
|
|
51
|
-
...props
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function DrawerFooter({ className, ...props }) {
|
|
55
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
56
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("mt-auto flex flex-col gap-2 p-4", className),
|
|
57
|
-
"data-slot": "drawer-footer",
|
|
58
|
-
...props
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function DrawerTitle({ className, ...props }) {
|
|
62
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_vaul__.Drawer.Title, {
|
|
63
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-foreground font-semibold", className),
|
|
64
|
-
"data-slot": "drawer-title",
|
|
65
|
-
...props
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
function DrawerDescription({ className, ...props }) {
|
|
69
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_vaul__.Drawer.Description, {
|
|
70
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_5e4c9133__.cn)("text-muted-foreground text-sm", className),
|
|
71
|
-
"data-slot": "drawer-description",
|
|
72
|
-
...props
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function DrawerClose({ className, size, variant = "outline", ...props }) {
|
|
76
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_vaul__.Drawer.Close, {
|
|
77
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__.buttonVariants)({
|
|
78
|
-
className,
|
|
79
|
-
size,
|
|
80
|
-
variant
|
|
81
|
-
}),
|
|
82
|
-
"data-slot": "drawer-close",
|
|
83
|
-
...props
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger };
|
|
2
|
+
import*as r from"react/jsx-runtime";import*as a from"vaul";import*as t from"./button.js";import*as e from"../lib/utils.js";function o({shouldScaleBackground:t=!0,...e}){return(0,r.jsx)(a.Drawer.Root,{"data-slot":"drawer",shouldScaleBackground:t,...e})}function d({...t}){return(0,r.jsx)(a.Drawer.Trigger,{"data-slot":"drawer-trigger",...t})}function n({children:t,className:o,classNames:d,...n}){return(0,r.jsxs)(a.Drawer.Portal,{children:[(0,r.jsx)(a.Drawer.Overlay,{className:(0,e.cn)("bg-popover-overlay fixed inset-0 z-50",d?.overlay),"data-slot":"drawer-overlay"}),(0,r.jsxs)(a.Drawer.Content,{className:(0,e.cn)("group/drawer-content bg-background fixed z-50 flex h-auto flex-col data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=bottom]:rounded-t-2xl data-[vaul-drawer-direction=top]:rounded-b-2xl data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",d?.content,o),"data-slot":"drawer-content",...n,children:[(0,r.jsx)("div",{className:(0,e.cn)("bg-muted mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block",d?.handle)}),t]})]})}function i({className:a,...t}){return(0,r.jsx)("div",{className:(0,e.cn)("flex flex-col gap-1.5 p-4",a),"data-slot":"drawer-header",...t})}function l({className:a,...t}){return(0,r.jsx)("main",{className:(0,e.cn)("overflow-auto px-4 py-2",a),"data-slot":"drawer-body",...t})}function s({className:a,...t}){return(0,r.jsx)("div",{className:(0,e.cn)("mt-auto flex flex-col gap-2 p-4",a),"data-slot":"drawer-footer",...t})}function c({className:t,...o}){return(0,r.jsx)(a.Drawer.Title,{className:(0,e.cn)("text-foreground font-semibold",t),"data-slot":"drawer-title",...o})}function u({className:t,...o}){return(0,r.jsx)(a.Drawer.Description,{className:(0,e.cn)("text-muted-foreground text-sm",t),"data-slot":"drawer-description",...o})}function w({className:e,size:o,variant:d="outline",...n}){return(0,r.jsx)(a.Drawer.Close,{className:(0,t.buttonVariants)({className:e,size:o,variant:d}),"data-slot":"drawer-close",...n})}export{o as Drawer,l as DrawerBody,w as DrawerClose,n as DrawerContent,u as DrawerDescription,s as DrawerFooter,i as DrawerHeader,c as DrawerTitle,d as DrawerTrigger};
|
|
3
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/drawer.js","sources":["webpack://@codefast/ui/./src/components/drawer.tsx"],"sourcesContent":["\n\nimport type { ComponentProps, JSX } from \"react\";\n\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport type { VariantProps } from \"@/lib/utils\";\n\nimport { buttonVariants } from \"@/components/button\";\nimport { cn } from \"@/lib/utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: ComponentProps<typeof DrawerPrimitive.Root>): JSX.Element {\n return <DrawerPrimitive.Root data-slot=\"drawer\" shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\nfunction DrawerTrigger({ ...props }: ComponentProps<typeof DrawerPrimitive.Trigger>): JSX.Element {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\nfunction DrawerContent({\n children,\n className,\n classNames,\n ...props\n}: ComponentProps<typeof DrawerPrimitive.Content> & {\n classNames?: {\n content?: string;\n handle?: string;\n overlay?: string;\n };\n}): JSX.Element {\n return (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay\n className={cn(\"bg-popover-overlay fixed inset-0 z-50\", classNames?.overlay)}\n data-slot=\"drawer-overlay\"\n />\n <DrawerPrimitive.Content\n className={cn(\n \"group/drawer-content bg-background fixed z-50 flex h-auto flex-col data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=bottom]:rounded-t-2xl data-[vaul-drawer-direction=top]:rounded-b-2xl data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm\",\n classNames?.content,\n className,\n )}\n data-slot=\"drawer-content\"\n {...props}\n >\n <div\n className={cn(\n \"bg-muted mx-auto mt-4 hidden h-1.5 w-12 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\",\n classNames?.handle,\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\nfunction DrawerHeader({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <div className={cn(\"flex flex-col gap-1.5 p-4\", className)} data-slot=\"drawer-header\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerBody\n * -------------------------------------------------------------------------- */\n\nfunction DrawerBody({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <main className={cn(\"overflow-auto px-4 py-2\", className)} data-slot=\"drawer-body\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\nfunction DrawerFooter({ className, ...props }: ComponentProps<\"div\">): JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} data-slot=\"drawer-footer\" {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\nfunction DrawerTitle({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Title>): JSX.Element {\n return (\n <DrawerPrimitive.Title\n className={cn(\"text-foreground font-semibold\", className)}\n data-slot=\"drawer-title\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\nfunction DrawerDescription({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Description>): JSX.Element {\n return (\n <DrawerPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"drawer-description\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\nfunction DrawerClose({\n className,\n size,\n variant = \"outline\",\n ...props\n}: ComponentProps<typeof DrawerPrimitive.Close> & {\n size?: VariantProps<typeof buttonVariants>[\"size\"];\n variant?: VariantProps<typeof buttonVariants>[\"variant\"];\n}): JSX.Element {\n return (\n <DrawerPrimitive.Close\n className={buttonVariants({ className, size, variant })}\n data-slot=\"drawer-close\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n};\n"],"names":["Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerContent","children","className","classNames","cn","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","DrawerDescription","DrawerClose","size","variant","buttonVariants"],"mappings":";2HAeA,SAASA,EAAO,CAAEC,sBAAAA,EAAwB,EAAI,CAAE,GAAGC,EAAoD,EACrG,MAAO,UAACC,EAAAA,MAAAA,CAAAA,IAAoB,EAAC,YAAU,SAAS,sBAAuBF,EAAwB,GAAGC,CAAK,EACzG,CAMA,SAASE,EAAc,CAAE,GAAGF,EAAuD,EACjF,MAAO,UAACC,EAAAA,MAAAA,CAAAA,OAAuB,EAAC,YAAU,iBAAkB,GAAGD,CAAK,EACtE,CAMA,SAASG,EAAc,CACrBC,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACTC,WAAAA,CAAU,CACV,GAAGN,EAOJ,EACC,MACE,WAACC,EAAAA,MAAAA,CAAAA,MAAsB,E,UACrB,UAACA,EAAAA,MAAAA,CAAAA,OAAuB,EACtB,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,wCAAyCD,GAAY,SACnE,YAAU,gB,GAEZ,WAACL,EAAAA,MAAAA,CAAAA,OAAuB,EACtB,UAAWM,GAAAA,EAAAA,EAAAA,EACT,81BACAD,GAAY,QACZD,GAEF,YAAU,iBACT,GAAGL,CAAK,C,UAET,UAAC,OACC,UAAWO,GAAAA,EAAAA,EAAAA,EACT,+HACAD,GAAY,O,GAGfF,E,KAIT,CAMA,SAASI,EAAa,CAAEH,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MAAO,UAAC,OAAI,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,4BAA6BF,GAAY,YAAU,gBAAiB,GAAGL,CAAK,EACxG,CAMA,SAASS,EAAW,CAAEJ,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAChE,MAAO,UAAC,QAAK,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,0BAA2BF,GAAY,YAAU,cAAe,GAAGL,CAAK,EACrG,CAMA,SAASU,EAAa,CAAEL,UAAAA,CAAS,CAAE,GAAGL,EAA8B,EAClE,MAAO,UAAC,OAAI,UAAWO,GAAAA,EAAAA,EAAAA,EAAG,kCAAmCF,GAAY,YAAU,gBAAiB,GAAGL,CAAK,EAC9G,CAMA,SAASW,EAAY,CAAEN,UAAAA,CAAS,CAAE,GAAGL,EAAqD,EACxF,MACE,UAACC,EAAAA,MAAAA,CAAAA,KAAqB,EACpB,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,gCAAiCF,GAC/C,YAAU,eACT,GAAGL,CAAK,EAGf,CAMA,SAASY,EAAkB,CAAEP,UAAAA,CAAS,CAAE,GAAGL,EAA2D,EACpG,MACE,UAACC,EAAAA,MAAAA,CAAAA,WAA2B,EAC1B,UAAWM,GAAAA,EAAAA,EAAAA,EAAG,gCAAiCF,GAC/C,YAAU,qBACT,GAAGL,CAAK,EAGf,CAMA,SAASa,EAAY,CACnBR,UAAAA,CAAS,CACTS,KAAAA,CAAI,CACJC,QAAAA,EAAU,SAAS,CACnB,GAAGf,EAIJ,EACC,MACE,UAACC,EAAAA,MAAAA,CAAAA,KAAqB,EACpB,UAAWe,GAAAA,EAAAA,cAAAA,EAAe,CAAEX,UAAAA,EAAWS,KAAAA,EAAMC,QAAAA,CAAQ,GACrD,YAAU,eACT,GAAGf,CAAK,EAGf,Q"}
|