@c-rex/ui 0.0.8 → 0.0.9

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.
Files changed (106) hide show
  1. package/dist/alert.cjs +2 -0
  2. package/dist/alert.cjs.map +1 -0
  3. package/dist/alert.d.cts +11 -0
  4. package/dist/alert.d.ts +11 -0
  5. package/dist/alert.js +2 -0
  6. package/dist/alert.js.map +1 -0
  7. package/dist/breadcrumb.cjs +2 -0
  8. package/dist/breadcrumb.cjs.map +1 -0
  9. package/dist/breadcrumb.d.cts +22 -0
  10. package/dist/breadcrumb.d.ts +22 -0
  11. package/dist/breadcrumb.js +2 -0
  12. package/dist/breadcrumb.js.map +1 -0
  13. package/dist/button.cjs +2 -0
  14. package/dist/button.cjs.map +1 -0
  15. package/dist/button.d.cts +15 -0
  16. package/dist/button.d.ts +15 -0
  17. package/dist/button.js +2 -0
  18. package/dist/button.js.map +1 -0
  19. package/dist/command.cjs +2 -0
  20. package/dist/command.cjs.map +1 -0
  21. package/dist/command.d.cts +83 -0
  22. package/dist/command.d.ts +83 -0
  23. package/dist/command.js +2 -0
  24. package/dist/command.js.map +1 -0
  25. package/dist/dialog.cjs +2 -0
  26. package/dist/dialog.cjs.map +1 -0
  27. package/dist/dialog.d.cts +22 -0
  28. package/dist/dialog.d.ts +22 -0
  29. package/dist/dialog.js +2 -0
  30. package/dist/dialog.js.map +1 -0
  31. package/dist/hooks/use-mobile.cjs +2 -0
  32. package/dist/hooks/use-mobile.cjs.map +1 -0
  33. package/dist/hooks/use-mobile.d.cts +3 -0
  34. package/dist/hooks/use-mobile.d.ts +3 -0
  35. package/dist/hooks/use-mobile.js +2 -0
  36. package/dist/hooks/use-mobile.js.map +1 -0
  37. package/dist/input.cjs +2 -0
  38. package/dist/input.cjs.map +1 -0
  39. package/dist/input.d.cts +5 -0
  40. package/dist/input.d.ts +5 -0
  41. package/dist/input.js +2 -0
  42. package/dist/input.js.map +1 -0
  43. package/dist/popover.cjs +2 -0
  44. package/dist/popover.cjs.map +1 -0
  45. package/dist/popover.d.cts +9 -0
  46. package/dist/popover.d.ts +9 -0
  47. package/dist/popover.js +2 -0
  48. package/dist/popover.js.map +1 -0
  49. package/dist/select.cjs +2 -0
  50. package/dist/select.cjs.map +1 -0
  51. package/dist/select.d.cts +15 -0
  52. package/dist/select.d.ts +15 -0
  53. package/dist/select.js +2 -0
  54. package/dist/select.js.map +1 -0
  55. package/dist/separator.cjs +2 -0
  56. package/dist/separator.cjs.map +1 -0
  57. package/dist/separator.d.cts +6 -0
  58. package/dist/separator.d.ts +6 -0
  59. package/dist/separator.js +2 -0
  60. package/dist/separator.js.map +1 -0
  61. package/dist/sheet.cjs +2 -0
  62. package/dist/sheet.cjs.map +1 -0
  63. package/dist/sheet.d.cts +29 -0
  64. package/dist/sheet.d.ts +29 -0
  65. package/dist/sheet.js +2 -0
  66. package/dist/sheet.js.map +1 -0
  67. package/dist/sidebar.cjs +2 -0
  68. package/dist/sidebar.cjs.map +1 -0
  69. package/dist/sidebar.d.cts +72 -0
  70. package/dist/sidebar.d.ts +72 -0
  71. package/dist/sidebar.js +2 -0
  72. package/dist/sidebar.js.map +1 -0
  73. package/dist/skeleton.cjs +2 -0
  74. package/dist/skeleton.cjs.map +1 -0
  75. package/dist/skeleton.d.cts +5 -0
  76. package/dist/skeleton.d.ts +5 -0
  77. package/dist/skeleton.js +2 -0
  78. package/dist/skeleton.js.map +1 -0
  79. package/dist/table.cjs +2 -0
  80. package/dist/table.cjs.map +1 -0
  81. package/dist/table.d.cts +12 -0
  82. package/dist/table.d.ts +12 -0
  83. package/dist/table.js +2 -0
  84. package/dist/table.js.map +1 -0
  85. package/dist/tooltip.cjs +2 -0
  86. package/dist/tooltip.cjs.map +1 -0
  87. package/dist/tooltip.d.cts +9 -0
  88. package/dist/tooltip.d.ts +9 -0
  89. package/dist/tooltip.js +2 -0
  90. package/dist/tooltip.js.map +1 -0
  91. package/package.json +114 -97
  92. package/src/alert.tsx +0 -58
  93. package/src/breadcrumb.tsx +0 -115
  94. package/src/button.tsx +0 -66
  95. package/src/command.tsx +0 -151
  96. package/src/dialog.tsx +0 -122
  97. package/src/hooks/use-mobile.tsx +0 -19
  98. package/src/input.tsx +0 -22
  99. package/src/popover.tsx +0 -31
  100. package/src/select.tsx +0 -157
  101. package/src/separator.tsx +0 -29
  102. package/src/sheet.tsx +0 -140
  103. package/src/sidebar.tsx +0 -785
  104. package/src/skeleton.tsx +0 -15
  105. package/src/table.tsx +0 -120
  106. package/src/tooltip.tsx +0 -30
@@ -0,0 +1,2 @@
1
+ import*as n from"react";import{Command as i}from"cmdk";import{Search as N}from"lucide-react";import{cn as s}from"@c-rex/utils";import*as l from"react";import*as a from"@radix-ui/react-dialog";import{X as R}from"lucide-react";import{cn as d}from"@c-rex/utils";import{jsx as r,jsxs as p}from"react/jsx-runtime";var f=a.Root;var v=a.Portal;var g=l.forwardRef(({className:e,...t},o)=>r(a.Overlay,{ref:o,className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));g.displayName=a.Overlay.displayName;var c=l.forwardRef(({className:e,children:t,...o},y)=>p(v,{children:[r(g,{}),p(a.Content,{ref:y,className:d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,p(a.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r(R,{className:"h-4 w-4"}),r("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=a.Content.displayName;var P=({className:e,...t})=>r("div",{className:d("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});P.displayName="DialogHeader";var C=({className:e,...t})=>r("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});C.displayName="DialogFooter";var D=l.forwardRef(({className:e,...t},o)=>r(a.Title,{ref:o,className:d("text-lg font-semibold leading-none tracking-tight",e),...t}));D.displayName=a.Title.displayName;var x=l.forwardRef(({className:e,...t},o)=>r(a.Description,{ref:o,className:d("text-sm text-muted-foreground",e),...t}));x.displayName=a.Description.displayName;import{jsx as m,jsxs as L}from"react/jsx-runtime";var u=n.forwardRef(({className:e,...t},o)=>m(i,{ref:o,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));u.displayName=i.displayName;var A=({children:e,...t})=>m(f,{...t,children:m(c,{className:"overflow-hidden p-0",children:m(u,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),h=n.forwardRef(({className:e,...t},o)=>L("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m(N,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m(i.Input,{ref:o,className:s("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));h.displayName=i.Input.displayName;var w=n.forwardRef(({className:e,...t},o)=>m(i.List,{ref:o,className:s("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));w.displayName=i.List.displayName;var k=n.forwardRef((e,t)=>m(i.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));k.displayName=i.Empty.displayName;var _=n.forwardRef(({className:e,...t},o)=>m(i.Group,{ref:o,className:s("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));_.displayName=i.Group.displayName;var b=n.forwardRef(({className:e,...t},o)=>m(i.Separator,{ref:o,className:s("-mx-1 h-px bg-border",e),...t}));b.displayName=i.Separator.displayName;var E=n.forwardRef(({className:e,...t},o)=>m(i.Item,{ref:o,className:s("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));E.displayName=i.Item.displayName;var T=({className:e,...t})=>m("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});T.displayName="CommandShortcut";export{u as Command,A as CommandDialog,k as CommandEmpty,_ as CommandGroup,h as CommandInput,E as CommandItem,w as CommandList,b as CommandSeparator,T as CommandShortcut};
2
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/command.tsx","../src/dialog.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":"AAAA,UAAYA,MAAW,QAEvB,OAAS,WAAWC,MAAwB,OAC5C,OAAS,UAAAC,MAAc,eAEvB,OAAS,MAAAC,MAAU,eCHnB,UAAYC,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,KAAAC,MAAS,eAElB,OAAS,MAAAC,MAAU,eAcf,cAAAC,EA0BQ,QAAAC,MA1BR,oBAZJ,IAAMC,EAAyB,OAI/B,IAAMC,EAA+B,SAIrC,IAAMC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBC,EAAiB,UAAhB,CACG,IAAKD,EACL,UAAWE,EACP,0JACAJ,CACJ,EACC,GAAGC,EACR,CACH,EACDF,EAAc,YAA8B,UAAQ,YAEpD,IAAMM,EAAsB,aAG1B,CAAC,CAAE,UAAAL,EAAW,SAAAM,EAAU,GAAGL,CAAM,EAAGC,IAClCK,EAACC,EAAA,CACG,UAAAL,EAACJ,EAAA,EAAc,EACfQ,EAAiB,UAAhB,CACG,IAAKL,EACL,UAAWE,EACP,8fACAJ,CACJ,EACC,GAAGC,EAEH,UAAAK,EACDC,EAAiB,QAAhB,CAAsB,UAAU,gRAC7B,UAAAJ,EAACM,EAAA,CAAE,UAAU,UAAU,EACvBN,EAAC,QAAK,UAAU,UAAU,iBAAK,GACnC,GACJ,GACJ,CACH,EACDE,EAAc,YAA8B,UAAQ,YAEpD,IAAMK,EAAe,CAAC,CAClB,UAAAV,EACA,GAAGC,CACP,IACIE,EAAC,OACG,UAAWC,EACP,qDACAJ,CACJ,EACC,GAAGC,EACR,EAEJS,EAAa,YAAc,eAE3B,IAAMC,EAAe,CAAC,CAClB,UAAAX,EACA,GAAGC,CACP,IACIE,EAAC,OACG,UAAWC,EACP,gEACAJ,CACJ,EACC,GAAGC,EACR,EAEJU,EAAa,YAAc,eAE3B,IAAMC,EAAoB,aAGxB,CAAC,CAAE,UAAAZ,EAAW,GAAGC,CAAM,EAAGC,IACxBC,EAAiB,QAAhB,CACG,IAAKD,EACL,UAAWE,EACP,oDACAJ,CACJ,EACC,GAAGC,EACR,CACH,EACDW,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACxBC,EAAiB,cAAhB,CACG,IAAKD,EACL,UAAWE,EAAG,gCAAiCJ,CAAS,EACvD,GAAGC,EACR,CACH,EACDY,EAAkB,YAA8B,cAAY,YDhGxD,cAAAC,EA2BA,QAAAC,MA3BA,oBAJJ,IAAMC,EAAgB,aAGpB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAA,CACG,IAAKD,EACL,UAAWE,EACP,4FACAJ,CACJ,EACC,GAAGC,EACR,CACH,EACDF,EAAQ,YAAcI,EAAiB,YAEvC,IAAME,EAAgB,CAAC,CAAE,SAAAC,EAAU,GAAGL,CAAM,IAEpCJ,EAACU,EAAA,CAAQ,GAAGN,EACR,SAAAJ,EAACW,EAAA,CAAc,UAAU,sBACrB,SAAAX,EAACE,EAAA,CAAQ,UAAU,8WACd,SAAAO,EACL,EACJ,EACJ,EAIFG,EAAqB,aAGzB,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBJ,EAAC,OAAI,UAAU,kCAAkC,qBAAmB,GAChE,UAAAD,EAACa,EAAA,CAAO,UAAU,mCAAmC,EACrDb,EAACM,EAAiB,MAAjB,CACG,IAAKD,EACL,UAAWE,EACP,yJACAJ,CACJ,EACC,GAAGC,EACR,GACJ,CACH,EAEDQ,EAAa,YAAcN,EAAiB,MAAM,YAElD,IAAMQ,EAAoB,aAGxB,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,KAAjB,CACG,IAAKD,EACL,UAAWE,EAAG,kDAAmDJ,CAAS,EACzE,GAAGC,EACR,CACH,EAEDU,EAAY,YAAcR,EAAiB,KAAK,YAEhD,IAAMS,EAAqB,aAGzB,CAACX,EAAOC,IACNL,EAACM,EAAiB,MAAjB,CACG,IAAKD,EACL,UAAU,2BACT,GAAGD,EACR,CACH,EAEDW,EAAa,YAAcT,EAAiB,MAAM,YAElD,IAAMU,EAAqB,aAGzB,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,MAAjB,CACG,IAAKD,EACL,UAAWE,EACP,yNACAJ,CACJ,EACC,GAAGC,EACR,CACH,EAEDY,EAAa,YAAcV,EAAiB,MAAM,YAElD,IAAMW,EAAyB,aAG7B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,UAAjB,CACG,IAAKD,EACL,UAAWE,EAAG,uBAAwBJ,CAAS,EAC9C,GAAGC,EACR,CACH,EACDa,EAAiB,YAAcX,EAAiB,UAAU,YAE1D,IAAMY,EAAoB,aAGxB,CAAC,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,KAAjB,CACG,IAAKD,EACL,UAAWE,EACP,0TACAJ,CACJ,EACC,GAAGC,EACR,CACH,EAEDc,EAAY,YAAcZ,EAAiB,KAAK,YAEhD,IAAMa,EAAkB,CAAC,CACrB,UAAAhB,EACA,GAAGC,CACP,IAEQJ,EAAC,QACG,UAAWO,EACP,wDACAJ,CACJ,EACC,GAAGC,EACR,EAGRe,EAAgB,YAAc","names":["React","CommandPrimitive","Search","cn","React","DialogPrimitive","X","cn","jsx","jsxs","Dialog","DialogPortal","DialogOverlay","className","props","ref","jsx","cn","DialogContent","children","jsxs","DialogPortal","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription","jsx","jsxs","Command","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"]}
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";var R=Object.create;var m=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var T=(e,t)=>{for(var i in t)m(e,i,{get:t[i],enumerable:!0})},c=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of x(t))!b.call(e,s)&&s!==i&&m(e,s,{get:()=>t[s],enumerable:!(n=N(t,s))||n.enumerable});return e};var g=(e,t,i)=>(i=e!=null?R(C(e)):{},c(t||!e||!e.__esModule?m(i,"default",{value:e,enumerable:!0}):i,e)),h=e=>c(m({},"__esModule",{value:!0}),e);var O={};T(O,{Dialog:()=>w,DialogClose:()=>H,DialogContent:()=>D,DialogDescription:()=>y,DialogFooter:()=>P,DialogHeader:()=>v,DialogOverlay:()=>d,DialogPortal:()=>p,DialogTitle:()=>u,DialogTrigger:()=>E});module.exports=h(O);var r=g(require("react"),1),a=g(require("@radix-ui/react-dialog"),1),f=require("lucide-react"),l=require("@c-rex/utils"),o=require("react/jsx-runtime"),w=a.Root,E=a.Trigger,p=a.Portal,H=a.Close,d=r.forwardRef(({className:e,...t},i)=>(0,o.jsx)(a.Overlay,{ref:i,className:(0,l.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));d.displayName=a.Overlay.displayName;var D=r.forwardRef(({className:e,children:t,...i},n)=>(0,o.jsxs)(p,{children:[(0,o.jsx)(d,{}),(0,o.jsxs)(a.Content,{ref:n,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...i,children:[t,(0,o.jsxs)(a.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,o.jsx)(f.X,{className:"h-4 w-4"}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));D.displayName=a.Content.displayName;var v=({className:e,...t})=>(0,o.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});v.displayName="DialogHeader";var P=({className:e,...t})=>(0,o.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});P.displayName="DialogFooter";var u=r.forwardRef(({className:e,...t},i)=>(0,o.jsx)(a.Title,{ref:i,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));u.displayName=a.Title.displayName;var y=r.forwardRef(({className:e,...t},i)=>(0,o.jsx)(a.Description,{ref:i,className:(0,l.cn)("text-sm text-muted-foreground",e),...t}));y.displayName=a.Description.displayName;0&&(module.exports={Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger});
2
+ //# sourceMappingURL=dialog.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":"ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,gBAAAC,EAAA,kBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAZ,GAEA,IAAAa,EAAuB,sBACvBC,EAAiC,uCACjCC,EAAkB,wBAElBC,EAAmB,wBAcfC,EAAA,6BAZEf,EAAyB,OAEzBS,EAAgC,UAEhCF,EAA+B,SAE/BN,EAA8B,QAE9BK,EAAsB,aAG1B,CAAC,CAAE,UAAAU,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAiB,UAAhB,CACG,IAAKA,EACL,aAAW,MACP,0JACAF,CACJ,EACC,GAAGC,EACR,CACH,EACDX,EAAc,YAA8B,UAAQ,YAEpD,IAAMJ,EAAsB,aAG1B,CAAC,CAAE,UAAAc,EAAW,SAAAG,EAAU,GAAGF,CAAM,EAAGC,OAClC,QAACX,EAAA,CACG,oBAACD,EAAA,EAAc,KACf,QAAiB,UAAhB,CACG,IAAKY,EACL,aAAW,MACP,8fACAF,CACJ,EACC,GAAGC,EAEH,UAAAE,KACD,QAAiB,QAAhB,CAAsB,UAAU,gRAC7B,oBAAC,KAAE,UAAU,UAAU,KACvB,OAAC,QAAK,UAAU,UAAU,iBAAK,GACnC,GACJ,GACJ,CACH,EACDjB,EAAc,YAA8B,UAAQ,YAEpD,IAAMG,EAAe,CAAC,CAClB,UAAAW,EACA,GAAGC,CACP,OACI,OAAC,OACG,aAAW,MACP,qDACAD,CACJ,EACC,GAAGC,EACR,EAEJZ,EAAa,YAAc,eAE3B,IAAMD,EAAe,CAAC,CAClB,UAAAY,EACA,GAAGC,CACP,OACI,OAAC,OACG,aAAW,MACP,gEACAD,CACJ,EACC,GAAGC,EACR,EAEJb,EAAa,YAAc,eAE3B,IAAMI,EAAoB,aAGxB,CAAC,CAAE,UAAAQ,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAiB,QAAhB,CACG,IAAKA,EACL,aAAW,MACP,oDACAF,CACJ,EACC,GAAGC,EACR,CACH,EACDT,EAAY,YAA8B,QAAM,YAEhD,IAAML,EAA0B,aAG9B,CAAC,CAAE,UAAAa,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAiB,cAAhB,CACG,IAAKA,EACL,aAAW,MAAG,gCAAiCF,CAAS,EACvD,GAAGC,EACR,CACH,EACDd,EAAkB,YAA8B,cAAY","names":["dialog_exports","__export","Dialog","DialogClose","DialogContent","DialogDescription","DialogFooter","DialogHeader","DialogOverlay","DialogPortal","DialogTitle","DialogTrigger","__toCommonJS","React","DialogPrimitive","import_lucide_react","import_utils","import_jsx_runtime","className","props","ref","children"]}
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+
5
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
6
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
8
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const DialogHeader: {
12
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const DialogFooter: {
16
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
17
+ displayName: string;
18
+ };
19
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
20
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
21
+
22
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+
5
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
6
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
8
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const DialogHeader: {
12
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const DialogFooter: {
16
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
17
+ displayName: string;
18
+ };
19
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
20
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
21
+
22
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
package/dist/dialog.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";import*as s from"react";import*as e from"@radix-ui/react-dialog";import{X as d}from"lucide-react";import{cn as l}from"@c-rex/utils";import{jsx as i,jsxs as r}from"react/jsx-runtime";var y=e.Root,R=e.Trigger,c=e.Portal,N=e.Close,n=s.forwardRef(({className:t,...a},o)=>i(e.Overlay,{ref:o,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a}));n.displayName=e.Overlay.displayName;var g=s.forwardRef(({className:t,children:a,...o},m)=>r(c,{children:[i(n,{}),r(e.Content,{ref:m,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...o,children:[a,r(e.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i(d,{className:"h-4 w-4"}),i("span",{className:"sr-only",children:"Close"})]})]})]}));g.displayName=e.Content.displayName;var f=({className:t,...a})=>i("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",t),...a});f.displayName="DialogHeader";var p=({className:t,...a})=>i("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});p.displayName="DialogFooter";var D=s.forwardRef(({className:t,...a},o)=>i(e.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",t),...a}));D.displayName=e.Title.displayName;var v=s.forwardRef(({className:t,...a},o)=>i(e.Description,{ref:o,className:l("text-sm text-muted-foreground",t),...a}));v.displayName=e.Description.displayName;export{y as Dialog,N as DialogClose,g as DialogContent,v as DialogDescription,p as DialogFooter,f as DialogHeader,n as DialogOverlay,c as DialogPortal,D as DialogTitle,R as DialogTrigger};
2
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":"aAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,KAAAC,MAAS,eAElB,OAAS,MAAAC,MAAU,eAcf,cAAAC,EA0BQ,QAAAC,MA1BR,oBAZJ,IAAMC,EAAyB,OAEzBC,EAAgC,UAEhCC,EAA+B,SAE/BC,EAA8B,QAE9BC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,UAAhB,CACG,IAAKS,EACL,UAAWV,EACP,0JACAQ,CACJ,EACC,GAAGC,EACR,CACH,EACDF,EAAc,YAA8B,UAAQ,YAEpD,IAAMI,EAAsB,aAG1B,CAAC,CAAE,UAAAH,EAAW,SAAAI,EAAU,GAAGH,CAAM,EAAGC,IAClCR,EAACG,EAAA,CACG,UAAAJ,EAACM,EAAA,EAAc,EACfL,EAAiB,UAAhB,CACG,IAAKQ,EACL,UAAWV,EACP,8fACAQ,CACJ,EACC,GAAGC,EAEH,UAAAG,EACDV,EAAiB,QAAhB,CAAsB,UAAU,gRAC7B,UAAAD,EAACF,EAAA,CAAE,UAAU,UAAU,EACvBE,EAAC,QAAK,UAAU,UAAU,iBAAK,GACnC,GACJ,GACJ,CACH,EACDU,EAAc,YAA8B,UAAQ,YAEpD,IAAME,EAAe,CAAC,CAClB,UAAAL,EACA,GAAGC,CACP,IACIR,EAAC,OACG,UAAWD,EACP,qDACAQ,CACJ,EACC,GAAGC,EACR,EAEJI,EAAa,YAAc,eAE3B,IAAMC,EAAe,CAAC,CAClB,UAAAN,EACA,GAAGC,CACP,IACIR,EAAC,OACG,UAAWD,EACP,gEACAQ,CACJ,EACC,GAAGC,EACR,EAEJK,EAAa,YAAc,eAE3B,IAAMC,EAAoB,aAGxB,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,QAAhB,CACG,IAAKS,EACL,UAAWV,EACP,oDACAQ,CACJ,EACC,GAAGC,EACR,CACH,EACDM,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,cAAhB,CACG,IAAKS,EACL,UAAWV,EAAG,gCAAiCQ,CAAS,EACvD,GAAGC,EACR,CACH,EACDO,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","X","cn","jsx","jsxs","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","props","ref","DialogContent","children","DialogHeader","DialogFooter","DialogTitle","DialogDescription"]}
@@ -0,0 +1,2 @@
1
+ "use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var h=(n,e)=>{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},w=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of c(e))!u.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(i=a(e,o))||i.enumerable});return n};var f=n=>w(s({},"__esModule",{value:!0}),n);var l={};h(l,{useIsMobile:()=>m});module.exports=f(l);var d=require("react"),r=768;function m(){let[n,e]=(0,d.useState)(void 0);return(0,d.useEffect)(()=>{let t=window.matchMedia(`(max-width: ${r-1}px)`),i=()=>{e(window.innerWidth<r)};return t.addEventListener("change",i),e(window.innerWidth<r),()=>t.removeEventListener("change",i)},[]),!!n}0&&(module.exports={useIsMobile});
2
+ //# sourceMappingURL=use-mobile.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/use-mobile.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = useState<boolean | undefined>(undefined);\n\n useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAoC,iBAE9BC,EAAoB,IAEnB,SAASH,GAAc,CAC5B,GAAM,CAACI,EAAUC,CAAW,KAAI,YAA8B,MAAS,EAEvE,sBAAU,IAAM,CACd,IAAMC,EAAM,OAAO,WAAW,eAAeH,EAAoB,CAAC,KAAK,EACjEI,EAAW,IAAM,CACrBF,EAAY,OAAO,WAAaF,CAAiB,CACnD,EACA,OAAAG,EAAI,iBAAiB,SAAUC,CAAQ,EACvCF,EAAY,OAAO,WAAaF,CAAiB,EAC1C,IAAMG,EAAI,oBAAoB,SAAUC,CAAQ,CACzD,EAAG,CAAC,CAAC,EAEE,CAAC,CAACH,CACX","names":["use_mobile_exports","__export","useIsMobile","__toCommonJS","import_react","MOBILE_BREAKPOINT","isMobile","setIsMobile","mql","onChange"]}
@@ -0,0 +1,3 @@
1
+ declare function useIsMobile(): boolean;
2
+
3
+ export { useIsMobile };
@@ -0,0 +1,3 @@
1
+ declare function useIsMobile(): boolean;
2
+
3
+ export { useIsMobile };
@@ -0,0 +1,2 @@
1
+ import{useEffect as d,useState as s}from"react";var e=768;function a(){let[o,n]=s(void 0);return d(()=>{let t=window.matchMedia(`(max-width: ${e-1}px)`),i=()=>{n(window.innerWidth<e)};return t.addEventListener("change",i),n(window.innerWidth<e),()=>t.removeEventListener("change",i)},[]),!!o}export{a as useIsMobile};
2
+ //# sourceMappingURL=use-mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/use-mobile.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = useState<boolean | undefined>(undefined);\n\n useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"],"mappings":"AAAA,OAAS,aAAAA,EAAW,YAAAC,MAAgB,QAEpC,IAAMC,EAAoB,IAEnB,SAASC,GAAc,CAC5B,GAAM,CAACC,EAAUC,CAAW,EAAIJ,EAA8B,MAAS,EAEvE,OAAAD,EAAU,IAAM,CACd,IAAMM,EAAM,OAAO,WAAW,eAAeJ,EAAoB,CAAC,KAAK,EACjEK,EAAW,IAAM,CACrBF,EAAY,OAAO,WAAaH,CAAiB,CACnD,EACA,OAAAI,EAAI,iBAAiB,SAAUC,CAAQ,EACvCF,EAAY,OAAO,WAAaH,CAAiB,EAC1C,IAAMI,EAAI,oBAAoB,SAAUC,CAAQ,CACzD,EAAG,CAAC,CAAC,EAEE,CAAC,CAACH,CACX","names":["useEffect","useState","MOBILE_BREAKPOINT","useIsMobile","isMobile","setIsMobile","mql","onChange"]}
package/dist/input.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";var f=Object.create;var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},s=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of m(t))!b.call(e,r)&&r!==o&&i(e,r,{get:()=>t[r],enumerable:!(n=u(t,r))||n.enumerable});return e};var x=(e,t,o)=>(o=e!=null?f(c(e)):{},s(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),w=e=>s(i({},"__esModule",{value:!0}),e);var y={};g(y,{Input:()=>d});module.exports=w(y);var l=x(require("react"),1),a=require("@c-rex/utils"),p=require("react/jsx-runtime"),d=l.forwardRef(({className:e,type:t,...o},n)=>(0,p.jsx)("input",{type:t,className:(0,a.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...o}));d.displayName="Input";0&&(module.exports={Input});
2
+ //# sourceMappingURL=input.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,sBAEvBC,EAAmB,wBAKPC,EAAA,6BAHNJ,EAAc,aAChB,CAAC,CAAE,UAAAK,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAGC,OAExB,OAAC,SACG,KAAMF,EACN,aAAW,MACP,0WACAD,CACJ,EACA,IAAKG,EACJ,GAAGD,EACR,CAGZ,EACAP,EAAM,YAAc","names":["input_exports","__export","Input","__toCommonJS","React","import_utils","import_jsx_runtime","className","type","props","ref"]}
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+
3
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
4
+
5
+ export { Input };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+
3
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
4
+
5
+ export { Input };
package/dist/input.js ADDED
@@ -0,0 +1,2 @@
1
+ import*as e from"react";import{cn as i}from"@c-rex/utils";import{jsx as l}from"react/jsx-runtime";var s=e.forwardRef(({className:t,type:o,...r},n)=>l("input",{type:o,className:i("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...r}));s.displayName="Input";export{s as Input};
2
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"mappings":"AAAA,UAAYA,MAAW,QAEvB,OAAS,MAAAC,MAAU,eAKP,cAAAC,MAAA,oBAHZ,IAAMC,EAAc,aAChB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAGC,IAExBL,EAAC,SACG,KAAMG,EACN,UAAWJ,EACP,0WACAG,CACJ,EACA,IAAKG,EACJ,GAAGD,EACR,CAGZ,EACAH,EAAM,YAAc","names":["React","cn","jsx","Input","className","type","props","ref"]}
@@ -0,0 +1,2 @@
1
+ "use strict";var f=Object.create;var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var h=(o,e)=>{for(var i in e)n(o,i,{get:e[i],enumerable:!0})},p=(o,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!R.call(o,r)&&r!==i&&n(o,r,{get:()=>e[r],enumerable:!(a=l(e,r))||a.enumerable});return o};var m=(o,e,i)=>(i=o!=null?f(g(o)):{},p(e||!o||!o.__esModule?n(i,"default",{value:o,enumerable:!0}):i,o)),u=o=>p(n({},"__esModule",{value:!0}),o);var w={};h(w,{Popover:()=>C,PopoverAnchor:()=>y,PopoverContent:()=>v,PopoverTrigger:()=>b});module.exports=u(w);var s=m(require("react"),1),t=m(require("@radix-ui/react-popover"),1),P=require("@c-rex/utils"),d=require("react/jsx-runtime"),C=t.Root,b=t.Trigger,y=t.Anchor,v=s.forwardRef(({className:o,align:e="center",sideOffset:i=4,...a},r)=>(0,d.jsx)(t.Portal,{children:(0,d.jsx)(t.Content,{ref:r,align:e,sideOffset:i,className:(0,P.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...a})}));v.displayName=t.Content.displayName;0&&(module.exports={Popover,PopoverAnchor,PopoverContent,PopoverTrigger});
2
+ //# sourceMappingURL=popover.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/popover.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,kBAAAC,EAAA,mBAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAN,GAAA,IAAAO,EAAuB,sBACvBC,EAAkC,wCAElCC,EAAmB,wBAaXC,EAAA,6BAXFR,EAA2B,OAE3BG,EAAkC,UAElCF,EAAiC,SAEjCC,EAAuB,aAG3B,CAAC,CAAE,UAAAO,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,OAC1D,OAAkB,SAAjB,CACG,mBAAkB,UAAjB,CACG,IAAKA,EACL,MAAOH,EACP,WAAYC,EACZ,aAAW,MACP,6aACAF,CACJ,EACC,GAAGG,EACR,EACJ,CACH,EACDV,EAAe,YAA+B,UAAQ","names":["popover_exports","__export","Popover","PopoverAnchor","PopoverContent","PopoverTrigger","__toCommonJS","React","PopoverPrimitive","import_utils","import_jsx_runtime","className","align","sideOffset","props","ref"]}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+
4
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
5
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
7
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+
9
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+
4
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
5
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
7
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+
9
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
@@ -0,0 +1,2 @@
1
+ import*as t from"react";import*as o from"@radix-ui/react-popover";import{cn as p}from"@c-rex/utils";import{jsx as e}from"react/jsx-runtime";var P=o.Root,v=o.Trigger,f=o.Anchor,m=t.forwardRef(({className:i,align:r="center",sideOffset:a=4,...n},d)=>e(o.Portal,{children:e(o.Content,{ref:d,align:r,sideOffset:a,className:p("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i),...n})}));m.displayName=o.Content.displayName;export{P as Popover,f as PopoverAnchor,m as PopoverContent,v as PopoverTrigger};
2
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/popover.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,UAAYC,MAAsB,0BAElC,OAAS,MAAAC,MAAU,eAaX,cAAAC,MAAA,oBAXR,IAAMC,EAA2B,OAE3BC,EAAkC,UAElCC,EAAiC,SAEjCC,EAAuB,aAG3B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DT,EAAkB,SAAjB,CACG,SAAAA,EAAkB,UAAjB,CACG,IAAKS,EACL,MAAOH,EACP,WAAYC,EACZ,UAAWR,EACP,6aACAM,CACJ,EACC,GAAGG,EACR,EACJ,CACH,EACDJ,EAAe,YAA+B,UAAQ","names":["React","PopoverPrimitive","cn","jsx","Popover","PopoverTrigger","PopoverAnchor","PopoverContent","className","align","sideOffset","props","ref"]}
@@ -0,0 +1,2 @@
1
+ "use strict";var w=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var x=(t,i)=>{for(var o in i)s(t,o,{get:i[o],enumerable:!0})},f=(t,i,o,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let m of h(i))!b.call(t,m)&&m!==o&&s(t,m,{get:()=>i[m],enumerable:!(l=g(i,m))||l.enumerable});return t};var S=(t,i,o)=>(o=t!=null?w(N(t)):{},f(i||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),C=t=>f(s({},"__esModule",{value:!0}),t);var D={};x(D,{Select:()=>I,SelectContent:()=>v,SelectGroup:()=>B,SelectItem:()=>R,SelectLabel:()=>P,SelectScrollDownButton:()=>d,SelectScrollUpButton:()=>p,SelectSeparator:()=>y,SelectTrigger:()=>u,SelectValue:()=>T});module.exports=C(D);var c=S(require("react"),1),e=S(require("@radix-ui/react-select"),1),n=require("lucide-react"),a=require("@c-rex/utils"),r=require("react/jsx-runtime"),I=e.Root,B=e.Group,T=e.Value,u=c.forwardRef(({className:t,children:i,...o},l)=>(0,r.jsxs)(e.Trigger,{ref:l,className:(0,a.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[i,(0,r.jsx)(e.Icon,{asChild:!0,children:(0,r.jsx)(n.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));u.displayName=e.Trigger.displayName;var p=c.forwardRef(({className:t,...i},o)=>(0,r.jsx)(e.ScrollUpButton,{ref:o,className:(0,a.cn)("flex cursor-default items-center justify-center py-1",t),...i,children:(0,r.jsx)(n.ChevronUp,{className:"h-4 w-4"})}));p.displayName=e.ScrollUpButton.displayName;var d=c.forwardRef(({className:t,...i},o)=>(0,r.jsx)(e.ScrollDownButton,{ref:o,className:(0,a.cn)("flex cursor-default items-center justify-center py-1",t),...i,children:(0,r.jsx)(n.ChevronDown,{className:"h-4 w-4"})}));d.displayName=e.ScrollDownButton.displayName;var v=c.forwardRef(({className:t,children:i,position:o="popper",...l},m)=>(0,r.jsx)(e.Portal,{children:(0,r.jsxs)(e.Content,{ref:m,className:(0,a.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...l,children:[(0,r.jsx)(p,{}),(0,r.jsx)(e.Viewport,{className:(0,a.cn)("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),(0,r.jsx)(d,{})]})}));v.displayName=e.Content.displayName;var P=c.forwardRef(({className:t,...i},o)=>(0,r.jsx)(e.Label,{ref:o,className:(0,a.cn)("px-2 py-1.5 text-sm font-semibold",t),...i}));P.displayName=e.Label.displayName;var R=c.forwardRef(({className:t,children:i,...o},l)=>(0,r.jsxs)(e.Item,{ref:l,className:(0,a.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[(0,r.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(e.ItemIndicator,{children:(0,r.jsx)(n.Check,{className:"h-4 w-4"})})}),(0,r.jsx)(e.ItemText,{children:i})]}));R.displayName=e.Item.displayName;var y=c.forwardRef(({className:t,...i},o)=>(0,r.jsx)(e.Separator,{ref:o,className:(0,a.cn)("-mx-1 my-1 h-px bg-muted",t),...i}));y.displayName=e.Separator.displayName;0&&(module.exports={Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue});
2
+ //# sourceMappingURL=select.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/select.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,kBAAAC,EAAA,gBAAAC,EAAA,eAAAC,EAAA,gBAAAC,EAAA,2BAAAC,EAAA,yBAAAC,EAAA,oBAAAC,EAAA,kBAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAZ,GAAA,IAAAa,EAAuB,sBACvBC,EAAiC,uCACjCC,EAA8C,wBAE9CC,EAAmB,wBAYfC,EAAA,6BAVEf,EAAyB,OAEzBE,EAA8B,QAE9BO,EAA8B,QAE9BD,EAAsB,aAG1B,CAAC,CAAE,UAAAQ,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,OAClC,QAAiB,UAAhB,CACG,IAAKA,EACL,aAAW,MACP,iUACAH,CACJ,EACC,GAAGE,EAEH,UAAAD,KACD,OAAiB,OAAhB,CAAqB,QAAO,GACzB,mBAAC,eAAY,UAAU,qBAAqB,EAChD,GACJ,CACH,EACDT,EAAc,YAA8B,UAAQ,YAEpD,IAAMF,EAA6B,aAGjC,CAAC,CAAE,UAAAU,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAiB,iBAAhB,CACG,IAAKA,EACL,aAAW,MACP,uDACAH,CACJ,EACC,GAAGE,EAEJ,mBAAC,aAAU,UAAU,UAAU,EACnC,CACH,EACDZ,EAAqB,YAA8B,iBAAe,YAElE,IAAMD,EAA+B,aAGnC,CAAC,CAAE,UAAAW,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAiB,mBAAhB,CACG,IAAKA,EACL,aAAW,MACP,uDACAH,CACJ,EACC,GAAGE,EAEJ,mBAAC,eAAY,UAAU,UAAU,EACrC,CACH,EACDb,EAAuB,YACH,mBAAiB,YAErC,IAAMJ,EAAsB,aAG1B,CAAC,CAAE,UAAAe,EAAW,SAAAC,EAAU,SAAAG,EAAW,SAAU,GAAGF,CAAM,EAAGC,OACvD,OAAiB,SAAhB,CACG,oBAAiB,UAAhB,CACG,IAAKA,EACL,aAAW,MACP,scACAC,IAAa,UACb,kIACAJ,CACJ,EACA,SAAUI,EACT,GAAGF,EAEJ,oBAACZ,EAAA,EAAqB,KACtB,OAAiB,WAAhB,CACG,aAAW,MACP,MACAc,IAAa,UACb,yFACJ,EAEC,SAAAH,EACL,KACA,OAACZ,EAAA,EAAuB,GAC5B,EACJ,CACH,EACDJ,EAAc,YAA8B,UAAQ,YAEpD,IAAMG,EAAoB,aAGxB,CAAC,CAAE,UAAAY,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAiB,QAAhB,CACG,IAAKA,EACL,aAAW,MAAG,oCAAqCH,CAAS,EAC3D,GAAGE,EACR,CACH,EACDd,EAAY,YAA8B,QAAM,YAEhD,IAAMD,EAAmB,aAGvB,CAAC,CAAE,UAAAa,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,OAClC,QAAiB,OAAhB,CACG,IAAKA,EACL,aAAW,MACP,4NACAH,CACJ,EACC,GAAGE,EAEJ,oBAAC,QAAK,UAAU,gEACZ,mBAAiB,gBAAhB,CACG,mBAAC,SAAM,UAAU,UAAU,EAC/B,EACJ,KACA,OAAiB,WAAhB,CAA0B,SAAAD,EAAS,GACxC,CACH,EACDd,EAAW,YAA8B,OAAK,YAE9C,IAAMI,EAAwB,aAG5B,CAAC,CAAE,UAAAS,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAiB,YAAhB,CACG,IAAKA,EACL,aAAW,MAAG,2BAA4BH,CAAS,EAClD,GAAGE,EACR,CACH,EACDX,EAAgB,YAA8B,YAAU","names":["select_exports","__export","Select","SelectContent","SelectGroup","SelectItem","SelectLabel","SelectScrollDownButton","SelectScrollUpButton","SelectSeparator","SelectTrigger","SelectValue","__toCommonJS","React","SelectPrimitive","import_lucide_react","import_utils","import_jsx_runtime","className","children","props","ref","position"]}
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
+
4
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
5
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
7
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
+
4
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
5
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
7
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
package/dist/select.js ADDED
@@ -0,0 +1,2 @@
1
+ import*as l from"react";import*as e from"@radix-ui/react-select";import{Check as f,ChevronDown as n,ChevronUp as S}from"lucide-react";import{cn as a}from"@c-rex/utils";import{jsx as t,jsxs as m}from"react/jsx-runtime";var h=e.Root,N=e.Group,b=e.Value,u=l.forwardRef(({className:o,children:r,...i},c)=>m(e.Trigger,{ref:c,className:a("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",o),...i,children:[r,t(e.Icon,{asChild:!0,children:t(n,{className:"h-4 w-4 opacity-50"})})]}));u.displayName=e.Trigger.displayName;var s=l.forwardRef(({className:o,...r},i)=>t(e.ScrollUpButton,{ref:i,className:a("flex cursor-default items-center justify-center py-1",o),...r,children:t(S,{className:"h-4 w-4"})}));s.displayName=e.ScrollUpButton.displayName;var p=l.forwardRef(({className:o,...r},i)=>t(e.ScrollDownButton,{ref:i,className:a("flex cursor-default items-center justify-center py-1",o),...r,children:t(n,{className:"h-4 w-4"})}));p.displayName=e.ScrollDownButton.displayName;var v=l.forwardRef(({className:o,children:r,position:i="popper",...c},d)=>t(e.Portal,{children:m(e.Content,{ref:d,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",o),position:i,...c,children:[t(s,{}),t(e.Viewport,{className:a("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),t(p,{})]})}));v.displayName=e.Content.displayName;var P=l.forwardRef(({className:o,...r},i)=>t(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",o),...r}));P.displayName=e.Label.displayName;var R=l.forwardRef(({className:o,children:r,...i},c)=>m(e.Item,{ref:c,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),...i,children:[t("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:t(e.ItemIndicator,{children:t(f,{className:"h-4 w-4"})})}),t(e.ItemText,{children:r})]}));R.displayName=e.Item.displayName;var y=l.forwardRef(({className:o,...r},i)=>t(e.Separator,{ref:i,className:a("-mx-1 my-1 h-px bg-muted",o),...r}));y.displayName=e.Separator.displayName;export{h as Select,v as SelectContent,N as SelectGroup,R as SelectItem,P as SelectLabel,p as SelectScrollDownButton,s as SelectScrollUpButton,y as SelectSeparator,u as SelectTrigger,b as SelectValue};
2
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/select.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,SAAAC,EAAO,eAAAC,EAAa,aAAAC,MAAiB,eAE9C,OAAS,MAAAC,MAAU,eAYf,OAUQ,OAAAC,EAVR,QAAAC,MAAA,oBAVJ,IAAMC,EAAyB,OAEzBC,EAA8B,QAE9BC,EAA8B,QAE9BC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAClCR,EAAiB,UAAhB,CACG,IAAKQ,EACL,UAAWV,EACP,iUACAO,CACJ,EACC,GAAGE,EAEH,UAAAD,EACDP,EAAiB,OAAhB,CAAqB,QAAO,GACzB,SAAAA,EAACH,EAAA,CAAY,UAAU,qBAAqB,EAChD,GACJ,CACH,EACDQ,EAAc,YAA8B,UAAQ,YAEpD,IAAMK,EAA6B,aAGjC,CAAC,CAAE,UAAAJ,EAAW,GAAGE,CAAM,EAAGC,IACxBT,EAAiB,iBAAhB,CACG,IAAKS,EACL,UAAWV,EACP,uDACAO,CACJ,EACC,GAAGE,EAEJ,SAAAR,EAACF,EAAA,CAAU,UAAU,UAAU,EACnC,CACH,EACDY,EAAqB,YAA8B,iBAAe,YAElE,IAAMC,EAA+B,aAGnC,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACxBT,EAAiB,mBAAhB,CACG,IAAKS,EACL,UAAWV,EACP,uDACAO,CACJ,EACC,GAAGE,EAEJ,SAAAR,EAACH,EAAA,CAAY,UAAU,UAAU,EACrC,CACH,EACDc,EAAuB,YACH,mBAAiB,YAErC,IAAMC,EAAsB,aAG1B,CAAC,CAAE,UAAAN,EAAW,SAAAC,EAAU,SAAAM,EAAW,SAAU,GAAGL,CAAM,EAAGC,IACvDT,EAAiB,SAAhB,CACG,SAAAC,EAAiB,UAAhB,CACG,IAAKQ,EACL,UAAWV,EACP,scACAc,IAAa,UACb,kIACAP,CACJ,EACA,SAAUO,EACT,GAAGL,EAEJ,UAAAR,EAACU,EAAA,EAAqB,EACtBV,EAAiB,WAAhB,CACG,UAAWD,EACP,MACAc,IAAa,UACb,yFACJ,EAEC,SAAAN,EACL,EACAP,EAACW,EAAA,EAAuB,GAC5B,EACJ,CACH,EACDC,EAAc,YAA8B,UAAQ,YAEpD,IAAME,EAAoB,aAGxB,CAAC,CAAE,UAAAR,EAAW,GAAGE,CAAM,EAAGC,IACxBT,EAAiB,QAAhB,CACG,IAAKS,EACL,UAAWV,EAAG,oCAAqCO,CAAS,EAC3D,GAAGE,EACR,CACH,EACDM,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAAmB,aAGvB,CAAC,CAAE,UAAAT,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAClCR,EAAiB,OAAhB,CACG,IAAKQ,EACL,UAAWV,EACP,4NACAO,CACJ,EACC,GAAGE,EAEJ,UAAAR,EAAC,QAAK,UAAU,gEACZ,SAAAA,EAAiB,gBAAhB,CACG,SAAAA,EAACJ,EAAA,CAAM,UAAU,UAAU,EAC/B,EACJ,EACAI,EAAiB,WAAhB,CAA0B,SAAAO,EAAS,GACxC,CACH,EACDQ,EAAW,YAA8B,OAAK,YAE9C,IAAMC,EAAwB,aAG5B,CAAC,CAAE,UAAAV,EAAW,GAAGE,CAAM,EAAGC,IACxBT,EAAiB,YAAhB,CACG,IAAKS,EACL,UAAWV,EAAG,2BAA4BO,CAAS,EAClD,GAAGE,EACR,CACH,EACDQ,EAAgB,YAA8B,YAAU","names":["React","SelectPrimitive","Check","ChevronDown","ChevronUp","cn","jsx","jsxs","Select","SelectGroup","SelectValue","SelectTrigger","className","children","props","ref","SelectScrollUpButton","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","SelectSeparator"]}
@@ -0,0 +1,2 @@
1
+ "use strict";var n=Object.create;var i=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var d=(o,r)=>{for(var t in r)i(o,t,{get:r[t],enumerable:!0})},m=(o,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of v(r))!S.call(o,e)&&e!==t&&i(o,e,{get:()=>r[e],enumerable:!(a=h(r,e))||a.enumerable});return o};var f=(o,r,t)=>(t=o!=null?n(P(o)):{},m(r||!o||!o.__esModule?i(t,"default",{value:o,enumerable:!0}):t,o)),y=o=>m(i({},"__esModule",{value:!0}),o);var u={};d(u,{Separator:()=>s});module.exports=y(u);var R=f(require("react"),1),p=f(require("@radix-ui/react-separator"),1),l=require("@c-rex/utils"),c=require("react/jsx-runtime"),s=R.forwardRef(({className:o,orientation:r="horizontal",decorative:t=!0,...a},e)=>(0,c.jsx)(p.Root,{ref:e,decorative:t,orientation:r,className:(0,l.cn)("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",o),...a}));s.displayName=p.Root.displayName;0&&(module.exports={Separator});
2
+ //# sourceMappingURL=separator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/separator.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref,\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className,\n )}\n {...props}\n />\n ),\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,sBACvBC,EAAoC,0CAEpCC,EAAmB,wBAUXC,EAAA,6BARFL,EAAkB,aAIpB,CACI,CAAE,UAAAM,EAAW,YAAAC,EAAc,aAAc,WAAAC,EAAa,GAAM,GAAGC,CAAM,EACrEC,OAEA,OAAoB,OAAnB,CACG,IAAKA,EACL,WAAYF,EACZ,YAAaD,EACb,aAAW,MACP,qBACAA,IAAgB,aAAe,iBAAmB,iBAClDD,CACJ,EACC,GAAGG,EACR,CAER,EACAT,EAAU,YAAiC,OAAK","names":["separator_exports","__export","Separator","__toCommonJS","React","SeparatorPrimitive","import_utils","import_jsx_runtime","className","orientation","decorative","props","ref"]}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+
4
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+
6
+ export { Separator };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+
4
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+
6
+ export { Separator };
@@ -0,0 +1,2 @@
1
+ import*as t from"react";import*as o from"@radix-ui/react-separator";import{cn as m}from"@c-rex/utils";import{jsx as R}from"react/jsx-runtime";var f=t.forwardRef(({className:e,orientation:r="horizontal",decorative:a=!0,...i},p)=>R(o.Root,{ref:p,decorative:a,orientation:r,className:m("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));f.displayName=o.Root.displayName;export{f as Separator};
2
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/separator.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref,\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className,\n )}\n {...props}\n />\n ),\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,UAAYC,MAAwB,4BAEpC,OAAS,MAAAC,MAAU,eAUX,cAAAC,MAAA,oBARR,IAAMC,EAAkB,aAIpB,CACI,CAAE,UAAAC,EAAW,YAAAC,EAAc,aAAc,WAAAC,EAAa,GAAM,GAAGC,CAAM,EACrEC,IAEAN,EAAoB,OAAnB,CACG,IAAKM,EACL,WAAYF,EACZ,YAAaD,EACb,UAAWJ,EACP,qBACAI,IAAgB,aAAe,iBAAmB,iBAClDD,CACJ,EACC,GAAGG,EACR,CAER,EACAJ,EAAU,YAAiC,OAAK","names":["React","SeparatorPrimitive","cn","jsx","Separator","className","orientation","decorative","props","ref"]}
package/dist/sheet.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";var g=Object.create;var l=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var a in t)l(e,a,{get:t[a],enumerable:!0})},f=(e,t,a,m)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of x(t))!C.call(e,s)&&s!==a&&l(e,s,{get:()=>t[s],enumerable:!(m=b(t,s))||m.enumerable});return e};var c=(e,t,a)=>(a=e!=null?g(N(e)):{},f(t||!e||!e.__esModule?l(a,"default",{value:e,enumerable:!0}):a,e)),T=e=>f(l({},"__esModule",{value:!0}),e);var V={};w(V,{Sheet:()=>D,SheetClose:()=>H,SheetContent:()=>v,SheetDescription:()=>R,SheetFooter:()=>y,SheetHeader:()=>P,SheetOverlay:()=>d,SheetPortal:()=>S,SheetTitle:()=>u,SheetTrigger:()=>E});module.exports=T(V);var n=c(require("react"),1),i=c(require("@radix-ui/react-dialog"),1),p=require("class-variance-authority"),h=require("lucide-react"),r=require("@c-rex/utils"),o=require("react/jsx-runtime"),D=i.Root,E=i.Trigger,H=i.Close,S=i.Portal,d=n.forwardRef(({className:e,...t},a)=>(0,o.jsx)(i.Overlay,{className:(0,r.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));d.displayName=i.Overlay.displayName;var O=(0,p.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),v=n.forwardRef(({side:e="right",className:t,children:a,...m},s)=>(0,o.jsxs)(S,{children:[(0,o.jsx)(d,{}),(0,o.jsxs)(i.Content,{ref:s,className:(0,r.cn)(O({side:e}),t),...m,children:[(0,o.jsxs)(i.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,o.jsx)(h.X,{className:"h-4 w-4"}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));v.displayName=i.Content.displayName;var P=({className:e,...t})=>(0,o.jsx)("div",{className:(0,r.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...t});P.displayName="SheetHeader";var y=({className:e,...t})=>(0,o.jsx)("div",{className:(0,r.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});y.displayName="SheetFooter";var u=n.forwardRef(({className:e,...t},a)=>(0,o.jsx)(i.Title,{ref:a,className:(0,r.cn)("text-lg font-semibold text-foreground",e),...t}));u.displayName=i.Title.displayName;var R=n.forwardRef(({className:e,...t},a)=>(0,o.jsx)(i.Description,{ref:a,className:(0,r.cn)("text-sm text-muted-foreground",e),...t}));R.displayName=i.Description.displayName;0&&(module.exports={Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger});
2
+ //# sourceMappingURL=sheet.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/sheet.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n },\n);\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> { }\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n {children}\n </SheetPrimitive.Content>\n </SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-foreground\", className)}\n {...props}\n />\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n"],"mappings":"ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,eAAAC,EAAA,iBAAAC,EAAA,qBAAAC,EAAA,gBAAAC,EAAA,gBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,eAAAC,EAAA,iBAAAC,IAAA,eAAAC,EAAAZ,GAEA,IAAAa,EAAuB,sBACvBC,EAAgC,uCAChCC,EAAuC,oCACvCC,EAAkB,wBAElBC,EAAmB,wBAcfC,EAAA,6BAZEhB,EAAuB,OAEvBS,EAA8B,UAE9BR,EAA4B,QAE5BM,EAA6B,SAE7BD,EAAqB,aAGzB,CAAC,CAAE,UAAAW,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAgB,UAAf,CACG,aAAW,MACP,0JACAF,CACJ,EACC,GAAGC,EACJ,IAAKC,EACT,CACH,EACDb,EAAa,YAA6B,UAAQ,YAElD,IAAMc,KAAgB,OAClB,mMACA,CACI,SAAU,CACN,KAAM,CACF,IAAK,oGACL,OACI,6GACJ,KAAM,gIACN,MACI,kIACR,CACJ,EACA,gBAAiB,CACb,KAAM,OACV,CACJ,CACJ,EAMMlB,EAAqB,aAGzB,CAAC,CAAE,KAAAmB,EAAO,QAAS,UAAAJ,EAAW,SAAAK,EAAU,GAAGJ,CAAM,EAAGC,OAClD,QAACZ,EAAA,CACG,oBAACD,EAAA,EAAa,KACd,QAAgB,UAAf,CACG,IAAKa,EACL,aAAW,MAAGC,EAAc,CAAE,KAAAC,CAAK,CAAC,EAAGJ,CAAS,EAC/C,GAAGC,EAEJ,qBAAgB,QAAf,CAAqB,UAAU,2OAC5B,oBAAC,KAAE,UAAU,UAAU,KACvB,OAAC,QAAK,UAAU,UAAU,iBAAK,GACnC,EACCI,GACL,GACJ,CACH,EACDpB,EAAa,YAA6B,UAAQ,YAElD,IAAMG,EAAc,CAAC,CACjB,UAAAY,EACA,GAAGC,CACP,OACI,OAAC,OACG,aAAW,MACP,mDACAD,CACJ,EACC,GAAGC,EACR,EAEJb,EAAY,YAAc,cAE1B,IAAMD,EAAc,CAAC,CACjB,UAAAa,EACA,GAAGC,CACP,OACI,OAAC,OACG,aAAW,MACP,gEACAD,CACJ,EACC,GAAGC,EACR,EAEJd,EAAY,YAAc,cAE1B,IAAMI,EAAmB,aAGvB,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAgB,QAAf,CACG,IAAKA,EACL,aAAW,MAAG,wCAAyCF,CAAS,EAC/D,GAAGC,EACR,CACH,EACDV,EAAW,YAA6B,QAAM,YAE9C,IAAML,EAAyB,aAG7B,CAAC,CAAE,UAAAc,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAgB,cAAf,CACG,IAAKA,EACL,aAAW,MAAG,gCAAiCF,CAAS,EACvD,GAAGC,EACR,CACH,EACDf,EAAiB,YAA6B,cAAY","names":["sheet_exports","__export","Sheet","SheetClose","SheetContent","SheetDescription","SheetFooter","SheetHeader","SheetOverlay","SheetPortal","SheetTitle","SheetTrigger","__toCommonJS","React","SheetPrimitive","import_class_variance_authority","import_lucide_react","import_utils","import_jsx_runtime","className","props","ref","sheetVariants","side","children"]}
@@ -0,0 +1,29 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
3
+ import * as React from 'react';
4
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
5
+ import { VariantProps } from 'class-variance-authority';
6
+
7
+ declare const Sheet: React.FC<DialogPrimitive.DialogProps>;
8
+ declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const SheetPortal: React.FC<DialogPrimitive.DialogPortalProps>;
11
+ declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const sheetVariants: (props?: ({
13
+ side?: "top" | "right" | "bottom" | "left" | null | undefined;
14
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
15
+ interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
16
+ }
17
+ declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
18
+ declare const SheetHeader: {
19
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
20
+ displayName: string;
21
+ };
22
+ declare const SheetFooter: {
23
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
24
+ displayName: string;
25
+ };
26
+ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
27
+ declare const SheetDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
28
+
29
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
@@ -0,0 +1,29 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
3
+ import * as React from 'react';
4
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
5
+ import { VariantProps } from 'class-variance-authority';
6
+
7
+ declare const Sheet: React.FC<DialogPrimitive.DialogProps>;
8
+ declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const SheetPortal: React.FC<DialogPrimitive.DialogPortalProps>;
11
+ declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const sheetVariants: (props?: ({
13
+ side?: "top" | "right" | "bottom" | "left" | null | undefined;
14
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
15
+ interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
16
+ }
17
+ declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
18
+ declare const SheetHeader: {
19
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
20
+ displayName: string;
21
+ };
22
+ declare const SheetFooter: {
23
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
24
+ displayName: string;
25
+ };
26
+ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
27
+ declare const SheetDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
28
+
29
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
package/dist/sheet.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";import*as r from"react";import*as e from"@radix-ui/react-dialog";import{cva as f}from"class-variance-authority";import{X as c}from"lucide-react";import{cn as s}from"@c-rex/utils";import{jsx as a,jsxs as n}from"react/jsx-runtime";var x=e.Root,N=e.Trigger,C=e.Close,p=e.Portal,m=r.forwardRef(({className:t,...i},o)=>a(e.Overlay,{className:s("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...i,ref:o}));m.displayName=e.Overlay.displayName;var h=f("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),S=r.forwardRef(({side:t="right",className:i,children:o,...l},d)=>n(p,{children:[a(m,{}),n(e.Content,{ref:d,className:s(h({side:t}),i),...l,children:[n(e.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a(c,{className:"h-4 w-4"}),a("span",{className:"sr-only",children:"Close"})]}),o]})]}));S.displayName=e.Content.displayName;var v=({className:t,...i})=>a("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",t),...i});v.displayName="SheetHeader";var P=({className:t,...i})=>a("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...i});P.displayName="SheetFooter";var y=r.forwardRef(({className:t,...i},o)=>a(e.Title,{ref:o,className:s("text-lg font-semibold text-foreground",t),...i}));y.displayName=e.Title.displayName;var u=r.forwardRef(({className:t,...i},o)=>a(e.Description,{ref:o,className:s("text-sm text-muted-foreground",t),...i}));u.displayName=e.Description.displayName;export{x as Sheet,C as SheetClose,S as SheetContent,u as SheetDescription,P as SheetFooter,v as SheetHeader,m as SheetOverlay,p as SheetPortal,y as SheetTitle,N as SheetTrigger};
2
+ //# sourceMappingURL=sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/sheet.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n },\n);\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> { }\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n {children}\n </SheetPrimitive.Content>\n </SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-foreground\", className)}\n {...props}\n />\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n"],"mappings":"aAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,yBAChC,OAAS,OAAAC,MAA8B,2BACvC,OAAS,KAAAC,MAAS,eAElB,OAAS,MAAAC,MAAU,eAcf,cAAAC,EA6CQ,QAAAC,MA7CR,oBAZJ,IAAMC,EAAuB,OAEvBC,EAA8B,UAE9BC,EAA4B,QAE5BC,EAA6B,SAE7BC,EAAqB,aAGzB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAgB,UAAf,CACG,UAAWD,EACP,0JACAQ,CACJ,EACC,GAAGC,EACJ,IAAKC,EACT,CACH,EACDH,EAAa,YAA6B,UAAQ,YAElD,IAAMI,EAAgBb,EAClB,mMACA,CACI,SAAU,CACN,KAAM,CACF,IAAK,oGACL,OACI,6GACJ,KAAM,gIACN,MACI,kIACR,CACJ,EACA,gBAAiB,CACb,KAAM,OACV,CACJ,CACJ,EAMMc,EAAqB,aAGzB,CAAC,CAAE,KAAAC,EAAO,QAAS,UAAAL,EAAW,SAAAM,EAAU,GAAGL,CAAM,EAAGC,IAClDR,EAACI,EAAA,CACG,UAAAL,EAACM,EAAA,EAAa,EACdL,EAAgB,UAAf,CACG,IAAKQ,EACL,UAAWV,EAAGW,EAAc,CAAE,KAAAE,CAAK,CAAC,EAAGL,CAAS,EAC/C,GAAGC,EAEJ,UAAAP,EAAgB,QAAf,CAAqB,UAAU,2OAC5B,UAAAD,EAACF,EAAA,CAAE,UAAU,UAAU,EACvBE,EAAC,QAAK,UAAU,UAAU,iBAAK,GACnC,EACCa,GACL,GACJ,CACH,EACDF,EAAa,YAA6B,UAAQ,YAElD,IAAMG,EAAc,CAAC,CACjB,UAAAP,EACA,GAAGC,CACP,IACIR,EAAC,OACG,UAAWD,EACP,mDACAQ,CACJ,EACC,GAAGC,EACR,EAEJM,EAAY,YAAc,cAE1B,IAAMC,EAAc,CAAC,CACjB,UAAAR,EACA,GAAGC,CACP,IACIR,EAAC,OACG,UAAWD,EACP,gEACAQ,CACJ,EACC,GAAGC,EACR,EAEJO,EAAY,YAAc,cAE1B,IAAMC,EAAmB,aAGvB,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAgB,QAAf,CACG,IAAKS,EACL,UAAWV,EAAG,wCAAyCQ,CAAS,EAC/D,GAAGC,EACR,CACH,EACDQ,EAAW,YAA6B,QAAM,YAE9C,IAAMC,EAAyB,aAG7B,CAAC,CAAE,UAAAV,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAgB,cAAf,CACG,IAAKS,EACL,UAAWV,EAAG,gCAAiCQ,CAAS,EACvD,GAAGC,EACR,CACH,EACDS,EAAiB,YAA6B,cAAY","names":["React","SheetPrimitive","cva","X","cn","jsx","jsxs","Sheet","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","className","props","ref","sheetVariants","SheetContent","side","children","SheetHeader","SheetFooter","SheetTitle","SheetDescription"]}