@c-rex/ui 0.0.8 → 0.0.10

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
package/dist/alert.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";var v=Object.create;var n=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var T=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},c=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of x(t))!P.call(e,a)&&a!==r&&n(e,a,{get:()=>t[a],enumerable:!(o=y(t,a))||o.enumerable});return e};var R=(e,t,r)=>(r=e!=null?v(h(e)):{},c(t||!e||!e.__esModule?n(r,"default",{value:e,enumerable:!0}):r,e)),b=e=>c(n({},"__esModule",{value:!0}),e);var H={};T(H,{Alert:()=>u,AlertDescription:()=>g,AlertTitle:()=>f});module.exports=b(H);var i=R(require("react"),1),p=require("class-variance-authority");var m=require("clsx"),d=require("tailwind-merge");function s(...e){return(0,d.twMerge)((0,m.clsx)(e))}var l=require("react/jsx-runtime"),w=(0,p.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),u=i.forwardRef(({className:e,variant:t,...r},o)=>(0,l.jsx)("div",{ref:o,role:"alert",className:s(w({variant:t}),e),...r}));u.displayName="Alert";var f=i.forwardRef(({className:e,...t},r)=>(0,l.jsx)("h5",{ref:r,className:s("mb-1 font-medium leading-none tracking-tight",e),...t}));f.displayName="AlertTitle";var g=i.forwardRef(({className:e,...t},r)=>(0,l.jsx)("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));g.displayName="AlertDescription";0&&(module.exports={Alert,AlertDescription,AlertTitle});
2
+ //# sourceMappingURL=alert.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/alert.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@c-rex/utils\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,qBAAAC,EAAA,eAAAC,IAAA,eAAAC,EAAAL,GAAA,IAAAM,EAAuB,sBACvBC,EAAuC,oCCDvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CACxC,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC/B,CDmBI,IAAAC,EAAA,6BApBEC,KAAgB,OAClB,0KACA,CACI,SAAU,CACN,QAAS,CACL,QAAS,gCACT,YACI,yFACR,CACJ,EACA,gBAAiB,CACb,QAAS,SACb,CACJ,CACJ,EAEMC,EAAc,aAGlB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAGC,OACjC,OAAC,OACG,IAAKA,EACL,KAAK,QACL,UAAWC,EAAGN,EAAc,CAAE,QAAAG,CAAQ,CAAC,EAAGD,CAAS,EAClD,GAAGE,EACR,CACH,EACDH,EAAM,YAAc,QAEpB,IAAMM,EAAmB,aAGvB,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAC,MACG,IAAKA,EACL,UAAWC,EAAG,+CAAgDJ,CAAS,EACtE,GAAGE,EACR,CACH,EACDG,EAAW,YAAc,aAEzB,IAAMC,EAAyB,aAG7B,CAAC,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAC,OACG,IAAKA,EACL,UAAWC,EAAG,gCAAiCJ,CAAS,EACvD,GAAGE,EACR,CACH,EACDI,EAAiB,YAAc","names":["alert_exports","__export","Alert","AlertDescription","AlertTitle","__toCommonJS","React","import_class_variance_authority","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","alertVariants","Alert","className","variant","props","ref","cn","AlertTitle","AlertDescription"]}
@@ -0,0 +1,11 @@
1
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
6
+ variant?: "default" | "destructive" | null | undefined;
7
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
9
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
10
+
11
+ export { Alert, AlertDescription, AlertTitle };
@@ -0,0 +1,11 @@
1
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
6
+ variant?: "default" | "destructive" | null | undefined;
7
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
9
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
10
+
11
+ export { Alert, AlertDescription, AlertTitle };
package/dist/alert.js ADDED
@@ -0,0 +1,2 @@
1
+ import*as o from"react";import{cva as c}from"class-variance-authority";import{clsx as i}from"clsx";import{twMerge as l}from"tailwind-merge";function a(...e){return l(i(e))}import{jsx as n}from"react/jsx-runtime";var m=c("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),d=o.forwardRef(({className:e,variant:t,...r},s)=>n("div",{ref:s,role:"alert",className:a(m({variant:t}),e),...r}));d.displayName="Alert";var p=o.forwardRef(({className:e,...t},r)=>n("h5",{ref:r,className:a("mb-1 font-medium leading-none tracking-tight",e),...t}));p.displayName="AlertTitle";var u=o.forwardRef(({className:e,...t},r)=>n("div",{ref:r,className:a("text-sm [&_p]:leading-relaxed",e),...t}));u.displayName="AlertDescription";export{d as Alert,u as AlertDescription,p as AlertTitle};
2
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/alert.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@c-rex/utils\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,OAAAC,MAA8B,2BCDvC,OAAS,QAAAC,MAA6B,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CACxC,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC/B,CDmBI,cAAAC,MAAA,oBApBJ,IAAMC,EAAgBC,EAClB,0KACA,CACI,SAAU,CACN,QAAS,CACL,QAAS,gCACT,YACI,yFACR,CACJ,EACA,gBAAiB,CACb,QAAS,SACb,CACJ,CACJ,EAEMC,EAAc,aAGlB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IACjCP,EAAC,OACG,IAAKO,EACL,KAAK,QACL,UAAWC,EAAGP,EAAc,CAAE,QAAAI,CAAQ,CAAC,EAAGD,CAAS,EAClD,GAAGE,EACR,CACH,EACDH,EAAM,YAAc,QAEpB,IAAMM,EAAmB,aAGvB,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IACxBP,EAAC,MACG,IAAKO,EACL,UAAWC,EAAG,+CAAgDJ,CAAS,EACtE,GAAGE,EACR,CACH,EACDG,EAAW,YAAc,aAEzB,IAAMC,EAAyB,aAG7B,CAAC,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAGC,IACxBP,EAAC,OACG,IAAKO,EACL,UAAWC,EAAG,gCAAiCJ,CAAS,EACvD,GAAGE,EACR,CACH,EACDI,EAAiB,YAAc","names":["React","cva","clsx","twMerge","cn","inputs","jsx","alertVariants","cva","Alert","className","variant","props","ref","cn","AlertTitle","AlertDescription"]}
@@ -0,0 +1,2 @@
1
+ "use strict";var P=Object.create;var c=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var L=(e,r)=>{for(var a in r)c(e,a,{get:r[a],enumerable:!0})},p=(e,r,a,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of w(r))!B.call(e,n)&&n!==a&&c(e,n,{get:()=>r[n],enumerable:!(m=x(r,n))||m.enumerable});return e};var v=(e,r,a)=>(a=e!=null?P(N(e)):{},p(r||!e||!e.__esModule?c(a,"default",{value:e,enumerable:!0}):a,e)),E=e=>p(c({},"__esModule",{value:!0}),e);var T={};L(T,{Breadcrumb:()=>f,BreadcrumbEllipsis:()=>C,BreadcrumbItem:()=>h,BreadcrumbLink:()=>b,BreadcrumbList:()=>R,BreadcrumbPage:()=>g,BreadcrumbSeparator:()=>y});module.exports=E(T);var s=v(require("react"),1),u=require("@radix-ui/react-slot"),i=require("lucide-react");var l=require("clsx"),d=require("tailwind-merge");function o(...e){return(0,d.twMerge)((0,l.clsx)(e))}var t=require("react/jsx-runtime"),f=s.forwardRef(({...e},r)=>(0,t.jsx)("nav",{ref:r,"aria-label":"breadcrumb",...e}));f.displayName="Breadcrumb";var R=s.forwardRef(({className:e,...r},a)=>(0,t.jsx)("ol",{ref:a,className:o("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...r}));R.displayName="BreadcrumbList";var h=s.forwardRef(({className:e,...r},a)=>(0,t.jsx)("li",{ref:a,className:o("inline-flex items-center gap-1.5",e),...r}));h.displayName="BreadcrumbItem";var b=s.forwardRef(({asChild:e,className:r,...a},m)=>(0,t.jsx)(e?u.Slot:"a",{ref:m,className:o("transition-colors hover:text-foreground",r),...a}));b.displayName="BreadcrumbLink";var g=s.forwardRef(({className:e,...r},a)=>(0,t.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:o("font-normal text-foreground",e),...r}));g.displayName="BreadcrumbPage";var y=({children:e,className:r,...a})=>(0,t.jsx)("li",{role:"presentation","aria-hidden":"true",className:o("[&>svg]:w-3.5 [&>svg]:h-3.5",r),...a,children:e??(0,t.jsx)(i.ChevronRight,{})});y.displayName="BreadcrumbSeparator";var C=({className:e,...r})=>(0,t.jsxs)("span",{role:"presentation","aria-hidden":"true",className:o("flex h-9 w-9 items-center justify-center",e),...r,children:[(0,t.jsx)(i.MoreHorizontal,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"More"})]});C.displayName="BreadcrumbElipssis";0&&(module.exports={Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator});
2
+ //# sourceMappingURL=breadcrumb.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/breadcrumb.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode;\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className,\n )}\n {...props}\n />\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean;\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n );\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\";\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,uBAAAC,EAAA,mBAAAC,EAAA,mBAAAC,EAAA,mBAAAC,EAAA,mBAAAC,EAAA,wBAAAC,IAAA,eAAAC,EAAAT,GAAA,IAAAU,EAAuB,sBACvBC,EAAqB,gCACrBC,EAA6C,wBCF7C,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CACxC,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC/B,CDMyB,IAAAC,EAAA,6BALnBC,EAAmB,aAKvB,CAAC,CAAE,GAAGC,CAAM,EAAGC,OAAQ,OAAC,OAAI,IAAKA,EAAK,aAAW,aAAc,GAAGD,EAAO,CAAE,EAC7ED,EAAW,YAAc,aAEzB,IAAMG,EAAuB,aAG3B,CAAC,CAAE,UAAAC,EAAW,GAAGH,CAAM,EAAGC,OACxB,OAAC,MACG,IAAKA,EACL,UAAWG,EACP,2FACAD,CACJ,EACC,GAAGH,EACR,CACH,EACDE,EAAe,YAAc,iBAE7B,IAAMG,EAAuB,aAG3B,CAAC,CAAE,UAAAF,EAAW,GAAGH,CAAM,EAAGC,OACxB,OAAC,MACG,IAAKA,EACL,UAAWG,EAAG,mCAAoCD,CAAS,EAC1D,GAAGH,EACR,CACH,EACDK,EAAe,YAAc,iBAE7B,IAAMC,EAAuB,aAK3B,CAAC,CAAE,QAAAC,EAAS,UAAAJ,EAAW,GAAGH,CAAM,EAAGC,OAI7B,OAHSM,EAAU,OAAO,IAGzB,CACG,IAAKN,EACL,UAAWG,EAAG,0CAA2CD,CAAS,EACjE,GAAGH,EACR,CAEP,EACDM,EAAe,YAAc,iBAE7B,IAAME,EAAuB,aAG3B,CAAC,CAAE,UAAAL,EAAW,GAAGH,CAAM,EAAGC,OACxB,OAAC,QACG,IAAKA,EACL,KAAK,OACL,gBAAc,OACd,eAAa,OACb,UAAWG,EAAG,8BAA+BD,CAAS,EACrD,GAAGH,EACR,CACH,EACDQ,EAAe,YAAc,iBAE7B,IAAMC,EAAsB,CAAC,CACzB,SAAAC,EACA,UAAAP,EACA,GAAGH,CACP,OACI,OAAC,MACG,KAAK,eACL,cAAY,OACZ,UAAWI,EAAG,8BAA+BD,CAAS,EACrD,GAAGH,EAEH,SAAAU,MAAY,OAAC,iBAAa,EAC/B,EAEJD,EAAoB,YAAc,sBAElC,IAAME,EAAqB,CAAC,CACxB,UAAAR,EACA,GAAGH,CACP,OACI,QAAC,QACG,KAAK,eACL,cAAY,OACZ,UAAWI,EAAG,2CAA4CD,CAAS,EAClE,GAAGH,EAEJ,oBAAC,kBAAe,UAAU,UAAU,KACpC,OAAC,QAAK,UAAU,UAAU,gBAAI,GAClC,EAEJW,EAAmB,YAAc","names":["breadcrumb_exports","__export","Breadcrumb","BreadcrumbEllipsis","BreadcrumbItem","BreadcrumbLink","BreadcrumbList","BreadcrumbPage","BreadcrumbSeparator","__toCommonJS","React","import_react_slot","import_lucide_react","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","Breadcrumb","props","ref","BreadcrumbList","className","cn","BreadcrumbItem","BreadcrumbLink","asChild","BreadcrumbPage","BreadcrumbSeparator","children","BreadcrumbEllipsis"]}
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
5
+ separator?: React.ReactNode;
6
+ } & React.RefAttributes<HTMLElement>>;
7
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
8
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
9
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
10
+ asChild?: boolean;
11
+ } & React.RefAttributes<HTMLAnchorElement>>;
12
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
13
+ declare const BreadcrumbSeparator: {
14
+ ({ children, className, ...props }: React.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const BreadcrumbEllipsis: {
18
+ ({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
19
+ displayName: string;
20
+ };
21
+
22
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
5
+ separator?: React.ReactNode;
6
+ } & React.RefAttributes<HTMLElement>>;
7
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
8
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
9
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
10
+ asChild?: boolean;
11
+ } & React.RefAttributes<HTMLAnchorElement>>;
12
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
13
+ declare const BreadcrumbSeparator: {
14
+ ({ children, className, ...props }: React.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const BreadcrumbEllipsis: {
18
+ ({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
19
+ displayName: string;
20
+ };
21
+
22
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -0,0 +1,2 @@
1
+ import*as n from"react";import{Slot as i}from"@radix-ui/react-slot";import{ChevronRight as p,MoreHorizontal as l}from"lucide-react";import{clsx as m}from"clsx";import{twMerge as c}from"tailwind-merge";function o(...e){return c(m(e))}import{jsx as t,jsxs as y}from"react/jsx-runtime";var d=n.forwardRef(({...e},r)=>t("nav",{ref:r,"aria-label":"breadcrumb",...e}));d.displayName="Breadcrumb";var u=n.forwardRef(({className:e,...r},a)=>t("ol",{ref:a,className:o("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...r}));u.displayName="BreadcrumbList";var f=n.forwardRef(({className:e,...r},a)=>t("li",{ref:a,className:o("inline-flex items-center gap-1.5",e),...r}));f.displayName="BreadcrumbItem";var R=n.forwardRef(({asChild:e,className:r,...a},s)=>t(e?i:"a",{ref:s,className:o("transition-colors hover:text-foreground",r),...a}));R.displayName="BreadcrumbLink";var h=n.forwardRef(({className:e,...r},a)=>t("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:o("font-normal text-foreground",e),...r}));h.displayName="BreadcrumbPage";var b=({children:e,className:r,...a})=>t("li",{role:"presentation","aria-hidden":"true",className:o("[&>svg]:w-3.5 [&>svg]:h-3.5",r),...a,children:e??t(p,{})});b.displayName="BreadcrumbSeparator";var g=({className:e,...r})=>y("span",{role:"presentation","aria-hidden":"true",className:o("flex h-9 w-9 items-center justify-center",e),...r,children:[t(l,{className:"h-4 w-4"}),t("span",{className:"sr-only",children:"More"})]});g.displayName="BreadcrumbElipssis";export{d as Breadcrumb,g as BreadcrumbEllipsis,f as BreadcrumbItem,R as BreadcrumbLink,u as BreadcrumbList,h as BreadcrumbPage,b as BreadcrumbSeparator};
2
+ //# sourceMappingURL=breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/breadcrumb.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode;\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className,\n )}\n {...props}\n />\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean;\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n );\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\";\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\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AAc,iBAE7B,IAAMC,EAAsB,CAAC,CACzB,SAAAC,EACA,UAAAR,EACA,GAAGH,CACP,IACIH,EAAC,MACG,KAAK,eACL,cAAY,OACZ,UAAWO,EAAG,8BAA+BD,CAAS,EACrD,GAAGH,EAEH,SAAAW,GAAYd,EAACe,EAAA,EAAa,EAC/B,EAEJF,EAAoB,YAAc,sBAElC,IAAMG,EAAqB,CAAC,CACxB,UAAAV,EACA,GAAGH,CACP,IACIF,EAAC,QACG,KAAK,eACL,cAAY,OACZ,UAAWM,EAAG,2CAA4CD,CAAS,EAClE,GAAGH,EAEJ,UAAAH,EAACiB,EAAA,CAAe,UAAU,UAAU,EACpCjB,EAAC,QAAK,UAAU,UAAU,gBAAI,GAClC,EAEJgB,EAAmB,YAAc","names":["React","Slot","ChevronRight","MoreHorizontal","clsx","twMerge","cn","inputs","jsx","jsxs","Breadcrumb","props","ref","BreadcrumbList","className","cn","BreadcrumbItem","BreadcrumbLink","asChild","Slot","BreadcrumbPage","BreadcrumbSeparator","children","ChevronRight","BreadcrumbEllipsis","MoreHorizontal"]}
@@ -0,0 +1,2 @@
1
+ "use strict";var x=Object.create;var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var r in t)a(e,r,{get:t[r],enumerable:!0})},s=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of b(t))!P.call(e,o)&&o!==r&&a(e,o,{get:()=>t[o],enumerable:!(n=y(t,o))||n.enumerable});return e};var B=(e,t,r)=>(r=e!=null?x(w(e)):{},s(t||!e||!e.__esModule?a(r,"default",{value:e,enumerable:!0}):r,e)),R=e=>s(a({},"__esModule",{value:!0}),e);var T={};C(T,{Button:()=>f,buttonVariants:()=>p});module.exports=R(T);var c=B(require("react"),1),l=require("@radix-ui/react-slot"),m=require("class-variance-authority");var i=require("clsx"),d=require("tailwind-merge");function u(...e){return(0,d.twMerge)((0,i.clsx)(e))}var g=require("react/jsx-runtime"),p=(0,m.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"},rounded:{default:"rounded-md",sm:"rounded-sm",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"}},defaultVariants:{variant:"default",size:"default",rounded:"default"}}),f=c.forwardRef(({className:e,variant:t,size:r,rounded:n,asChild:o=!1,...h},v)=>(0,g.jsx)(o?l.Slot:"button",{className:u(p({variant:t,size:r,rounded:n,className:e})),ref:v,...h}));f.displayName="Button";0&&(module.exports={Button,buttonVariants});
2
+ //# sourceMappingURL=button.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/button.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n rounded: {\n default: \"rounded-md\",\n sm: \"rounded-sm\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n \"2xl\": \"rounded-2xl\",\n full: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n rounded: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, rounded, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, rounded, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAuB,sBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CACxC,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC/B,CDkDY,IAAAC,EAAA,6BAjDNC,KAAiB,OACnB,wSACA,CACI,SAAU,CACN,QAAS,CACL,QACI,gEACJ,YACI,+EACJ,QACI,2FACJ,UACI,yEACJ,MAAO,+CACP,KAAM,iDACV,EACA,KAAM,CACF,QAAS,gBACT,GAAI,8BACJ,GAAI,uBACJ,KAAM,SACV,EACA,QAAS,CACL,QAAS,aACT,GAAI,aACJ,GAAI,aACJ,GAAI,aACJ,MAAO,cACP,KAAM,cACV,CACJ,EACA,gBAAiB,CACb,QAAS,UACT,KAAM,UACN,QAAS,SACb,CACJ,CACJ,EAQMC,EAAe,aACjB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAS,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAG3D,OAFSF,EAAU,OAAO,SAEzB,CACG,UAAWG,EAAGT,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,CAAC,EACnE,IAAKM,EACJ,GAAGD,EACR,CAGZ,EACAN,EAAO,YAAc","names":["button_exports","__export","Button","buttonVariants","__toCommonJS","React","import_react_slot","import_class_variance_authority","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","buttonVariants","Button","className","variant","size","rounded","asChild","props","ref","cn"]}
@@ -0,0 +1,15 @@
1
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const buttonVariants: (props?: ({
6
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
7
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
8
+ rounded?: "default" | "sm" | "lg" | "xl" | "2xl" | "full" | null | undefined;
9
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
10
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
11
+ asChild?: boolean;
12
+ }
13
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
14
+
15
+ export { Button, type ButtonProps, buttonVariants };
@@ -0,0 +1,15 @@
1
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const buttonVariants: (props?: ({
6
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
7
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
8
+ rounded?: "default" | "sm" | "lg" | "xl" | "2xl" | "full" | null | undefined;
9
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
10
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
11
+ asChild?: boolean;
12
+ }
13
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
14
+
15
+ export { Button, type ButtonProps, buttonVariants };
package/dist/button.js ADDED
@@ -0,0 +1,2 @@
1
+ import*as r from"react";import{Slot as l}from"@radix-ui/react-slot";import{cva as m}from"class-variance-authority";import{clsx as u}from"clsx";import{twMerge as c}from"tailwind-merge";function t(...e){return c(u(e))}import{jsx as g}from"react/jsx-runtime";var p=m("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"},rounded:{default:"rounded-md",sm:"rounded-sm",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"}},defaultVariants:{variant:"default",size:"default",rounded:"default"}}),f=r.forwardRef(({className:e,variant:o,size:n,rounded:a,asChild:s=!1,...i},d)=>g(s?l:"button",{className:t(p({variant:o,size:n,rounded:a,className:e})),ref:d,...i}));f.displayName="Button";export{f as Button,p as buttonVariants};
2
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/button.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n rounded: {\n default: \"rounded-md\",\n sm: \"rounded-sm\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n \"2xl\": \"rounded-2xl\",\n full: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n rounded: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, rounded, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, rounded, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BCFvC,OAAS,QAAAC,MAA6B,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CACxC,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC/B,CDkDY,cAAAC,MAAA,oBAjDZ,IAAMC,EAAiBC,EACnB,wSACA,CACI,SAAU,CACN,QAAS,CACL,QACI,gEACJ,YACI,+EACJ,QACI,2FACJ,UACI,yEACJ,MAAO,+CACP,KAAM,iDACV,EACA,KAAM,CACF,QAAS,gBACT,GAAI,8BACJ,GAAI,uBACJ,KAAM,SACV,EACA,QAAS,CACL,QAAS,aACT,GAAI,aACJ,GAAI,aACJ,GAAI,aACJ,MAAO,cACP,KAAM,cACV,CACJ,EACA,gBAAiB,CACb,QAAS,UACT,KAAM,UACN,QAAS,SACb,CACJ,CACJ,EAQMC,EAAe,aACjB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAS,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAG3DV,EAFSQ,EAAUG,EAAO,SAEzB,CACG,UAAWC,EAAGX,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,QAAAC,EAAS,UAAAH,CAAU,CAAC,CAAC,EACnE,IAAKM,EACJ,GAAGD,EACR,CAGZ,EACAN,EAAO,YAAc","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","rounded","asChild","props","ref","Slot","cn"]}
@@ -0,0 +1,2 @@
1
+ "use strict";var T=Object.create;var c=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var O=(e,t)=>{for(var o in t)c(e,o,{get:t[o],enumerable:!0})},y=(e,t,o,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let d of S(t))!W.call(e,d)&&d!==o&&c(e,d,{get:()=>t[d],enumerable:!(p=I(t,d))||p.enumerable});return e};var f=(e,t,o)=>(o=e!=null?T(L(e)):{},y(t||!e||!e.__esModule?c(o,"default",{value:e,enumerable:!0}):o,e)),H=e=>y(c({},"__esModule",{value:!0}),e);var q={};O(q,{Command:()=>u,CommandDialog:()=>$,CommandEmpty:()=>w,CommandGroup:()=>k,CommandInput:()=>D,CommandItem:()=>_,CommandList:()=>N,CommandSeparator:()=>b,CommandShortcut:()=>E});module.exports=H(q);var s=f(require("react"),1),m=require("cmdk"),h=require("lucide-react");var R=require("clsx"),v=require("tailwind-merge");function i(...e){return(0,v.twMerge)((0,R.clsx)(e))}var l=f(require("react"),1),a=f(require("@radix-ui/react-dialog"),1),P=require("lucide-react");var n=require("react/jsx-runtime"),C=a.Root;var M=a.Portal;var x=l.forwardRef(({className:e,...t},o)=>(0,n.jsx)(a.Overlay,{ref:o,className:i("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}));x.displayName=a.Overlay.displayName;var g=l.forwardRef(({className:e,children:t,...o},p)=>(0,n.jsxs)(M,{children:[(0,n.jsx)(x,{}),(0,n.jsxs)(a.Content,{ref:p,className:i("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,(0,n.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,n.jsx)(P.X,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));g.displayName=a.Content.displayName;var z=({className:e,...t})=>(0,n.jsx)("div",{className:i("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});z.displayName="DialogHeader";var G=({className:e,...t})=>(0,n.jsx)("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});G.displayName="DialogFooter";var Q=l.forwardRef(({className:e,...t},o)=>(0,n.jsx)(a.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));Q.displayName=a.Title.displayName;var U=l.forwardRef(({className:e,...t},o)=>(0,n.jsx)(a.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));U.displayName=a.Description.displayName;var r=require("react/jsx-runtime"),u=s.forwardRef(({className:e,...t},o)=>(0,r.jsx)(m.Command,{ref:o,className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));u.displayName=m.Command.displayName;var $=({children:e,...t})=>(0,r.jsx)(C,{...t,children:(0,r.jsx)(g,{className:"overflow-hidden p-0",children:(0,r.jsx)(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})})}),D=s.forwardRef(({className:e,...t},o)=>(0,r.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,r.jsx)(h.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,r.jsx)(m.Command.Input,{ref:o,className:i("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})]}));D.displayName=m.Command.Input.displayName;var N=s.forwardRef(({className:e,...t},o)=>(0,r.jsx)(m.Command.List,{ref:o,className:i("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));N.displayName=m.Command.List.displayName;var w=s.forwardRef((e,t)=>(0,r.jsx)(m.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));w.displayName=m.Command.Empty.displayName;var k=s.forwardRef(({className:e,...t},o)=>(0,r.jsx)(m.Command.Group,{ref:o,className:i("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}));k.displayName=m.Command.Group.displayName;var b=s.forwardRef(({className:e,...t},o)=>(0,r.jsx)(m.Command.Separator,{ref:o,className:i("-mx-1 h-px bg-border",e),...t}));b.displayName=m.Command.Separator.displayName;var _=s.forwardRef(({className:e,...t},o)=>(0,r.jsx)(m.Command.Item,{ref:o,className:i("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}));_.displayName=m.Command.Item.displayName;var E=({className:e,...t})=>(0,r.jsx)("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});E.displayName="CommandShortcut";0&&(module.exports={Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut});
2
+ //# sourceMappingURL=command.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/command.tsx","../../utils/src/classMerge.ts","../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","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\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":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,gBAAAC,EAAA,qBAAAC,EAAA,oBAAAC,IAAA,eAAAC,EAAAX,GAAA,IAAAY,EAAuB,sBAEvBC,EAA4C,gBAC5CC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,EAAa,YAAc,EAAAR,QAAiB,MAAM,YAElD,IAAMS,EAAqB,aAGzB,CAAC,CAAE,UAAAZ,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAC,EAAAC,QAAiB,MAAjB,CACG,IAAKD,EACL,UAAWE,EACP,yNACAJ,CACJ,EACC,GAAGC,EACR,CACH,EAEDW,EAAa,YAAc,EAAAT,QAAiB,MAAM,YAElD,IAAMU,EAAyB,aAG7B,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAC,EAAAC,QAAiB,UAAjB,CACG,IAAKD,EACL,UAAWE,EAAG,uBAAwBJ,CAAS,EAC9C,GAAGC,EACR,CACH,EACDY,EAAiB,YAAc,EAAAV,QAAiB,UAAU,YAE1D,IAAMW,EAAoB,aAGxB,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAC,EAAAC,QAAiB,KAAjB,CACG,IAAKD,EACL,UAAWE,EACP,0TACAJ,CACJ,EACC,GAAGC,EACR,CACH,EAEDa,EAAY,YAAc,EAAAX,QAAiB,KAAK,YAEhD,IAAMY,EAAkB,CAAC,CACrB,UAAAf,EACA,GAAGC,CACP,OAEQ,OAAC,QACG,UAAWG,EACP,wDACAJ,CACJ,EACC,GAAGC,EACR,EAGRc,EAAgB,YAAc","names":["command_exports","__export","Command","CommandDialog","CommandEmpty","CommandGroup","CommandInput","CommandItem","CommandList","CommandSeparator","CommandShortcut","__toCommonJS","React","import_cmdk","import_lucide_react","import_clsx","import_tailwind_merge","cn","inputs","React","DialogPrimitive","import_lucide_react","import_jsx_runtime","Dialog","DialogPortal","DialogOverlay","className","props","ref","cn","DialogContent","children","DialogPortal","DialogHeader","DialogFooter","DialogTitle","DialogDescription","import_jsx_runtime","Command","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"]}
@@ -0,0 +1,83 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { DialogProps } from '@radix-ui/react-dialog';
4
+
5
+ declare const Command: React.ForwardRefExoticComponent<Omit<{
6
+ children?: React.ReactNode;
7
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
8
+ ref?: React.Ref<HTMLDivElement>;
9
+ } & {
10
+ asChild?: boolean;
11
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
12
+ label?: string;
13
+ shouldFilter?: boolean;
14
+ filter?: (value: string, search: string, keywords?: string[]) => number;
15
+ defaultValue?: string;
16
+ value?: string;
17
+ onValueChange?: (value: string) => void;
18
+ loop?: boolean;
19
+ disablePointerSelection?: boolean;
20
+ vimBindings?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
+ declare const CommandDialog: ({ children, ...props }: DialogProps) => react_jsx_runtime.JSX.Element;
23
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
24
+ ref?: React.Ref<HTMLInputElement>;
25
+ } & {
26
+ asChild?: boolean;
27
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
28
+ value?: string;
29
+ onValueChange?: (search: string) => void;
30
+ } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
31
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
32
+ children?: React.ReactNode;
33
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
34
+ ref?: React.Ref<HTMLDivElement>;
35
+ } & {
36
+ asChild?: boolean;
37
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
38
+ label?: string;
39
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
40
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
41
+ children?: React.ReactNode;
42
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
43
+ ref?: React.Ref<HTMLDivElement>;
44
+ } & {
45
+ asChild?: boolean;
46
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
47
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
48
+ children?: React.ReactNode;
49
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
50
+ ref?: React.Ref<HTMLDivElement>;
51
+ } & {
52
+ asChild?: boolean;
53
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
54
+ heading?: React.ReactNode;
55
+ value?: string;
56
+ forceMount?: boolean;
57
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
59
+ ref?: React.Ref<HTMLDivElement>;
60
+ } & {
61
+ asChild?: boolean;
62
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
63
+ alwaysRender?: boolean;
64
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
65
+ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
66
+ children?: React.ReactNode;
67
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
68
+ ref?: React.Ref<HTMLDivElement>;
69
+ } & {
70
+ asChild?: boolean;
71
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "value" | "disabled"> & {
72
+ disabled?: boolean;
73
+ onSelect?: (value: string) => void;
74
+ value?: string;
75
+ keywords?: string[];
76
+ forceMount?: boolean;
77
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
78
+ declare const CommandShortcut: {
79
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
80
+ displayName: string;
81
+ };
82
+
83
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -0,0 +1,83 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { DialogProps } from '@radix-ui/react-dialog';
4
+
5
+ declare const Command: React.ForwardRefExoticComponent<Omit<{
6
+ children?: React.ReactNode;
7
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
8
+ ref?: React.Ref<HTMLDivElement>;
9
+ } & {
10
+ asChild?: boolean;
11
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
12
+ label?: string;
13
+ shouldFilter?: boolean;
14
+ filter?: (value: string, search: string, keywords?: string[]) => number;
15
+ defaultValue?: string;
16
+ value?: string;
17
+ onValueChange?: (value: string) => void;
18
+ loop?: boolean;
19
+ disablePointerSelection?: boolean;
20
+ vimBindings?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
+ declare const CommandDialog: ({ children, ...props }: DialogProps) => react_jsx_runtime.JSX.Element;
23
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
24
+ ref?: React.Ref<HTMLInputElement>;
25
+ } & {
26
+ asChild?: boolean;
27
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
28
+ value?: string;
29
+ onValueChange?: (search: string) => void;
30
+ } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
31
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
32
+ children?: React.ReactNode;
33
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
34
+ ref?: React.Ref<HTMLDivElement>;
35
+ } & {
36
+ asChild?: boolean;
37
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
38
+ label?: string;
39
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
40
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
41
+ children?: React.ReactNode;
42
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
43
+ ref?: React.Ref<HTMLDivElement>;
44
+ } & {
45
+ asChild?: boolean;
46
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
47
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
48
+ children?: React.ReactNode;
49
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
50
+ ref?: React.Ref<HTMLDivElement>;
51
+ } & {
52
+ asChild?: boolean;
53
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
54
+ heading?: React.ReactNode;
55
+ value?: string;
56
+ forceMount?: boolean;
57
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
59
+ ref?: React.Ref<HTMLDivElement>;
60
+ } & {
61
+ asChild?: boolean;
62
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
63
+ alwaysRender?: boolean;
64
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
65
+ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
66
+ children?: React.ReactNode;
67
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
68
+ ref?: React.Ref<HTMLDivElement>;
69
+ } & {
70
+ asChild?: boolean;
71
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "value" | "disabled"> & {
72
+ disabled?: boolean;
73
+ onSelect?: (value: string) => void;
74
+ value?: string;
75
+ keywords?: string[];
76
+ forceMount?: boolean;
77
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
78
+ declare const CommandShortcut: {
79
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
80
+ displayName: string;
81
+ };
82
+
83
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -0,0 +1,2 @@
1
+ import*as s from"react";import{Command as r}from"cmdk";import{Search as N}from"lucide-react";import{clsx as y}from"clsx";import{twMerge as R}from"tailwind-merge";function i(...e){return R(y(e))}import*as d from"react";import*as a from"@radix-ui/react-dialog";import{X as v}from"lucide-react";import{jsx as n,jsxs as l}from"react/jsx-runtime";var c=a.Root;var P=a.Portal;var f=d.forwardRef(({className:e,...t},o)=>n(a.Overlay,{ref:o,className:i("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}));f.displayName=a.Overlay.displayName;var p=d.forwardRef(({className:e,children:t,...o},u)=>l(P,{children:[n(f,{}),l(a.Content,{ref:u,className:i("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,l(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:[n(v,{className:"h-4 w-4"}),n("span",{className:"sr-only",children:"Close"})]})]})]}));p.displayName=a.Content.displayName;var C=({className:e,...t})=>n("div",{className:i("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});C.displayName="DialogHeader";var x=({className:e,...t})=>n("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});x.displayName="DialogFooter";var h=d.forwardRef(({className:e,...t},o)=>n(a.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));h.displayName=a.Title.displayName;var D=d.forwardRef(({className:e,...t},o)=>n(a.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));D.displayName=a.Description.displayName;import{jsx as m,jsxs as S}from"react/jsx-runtime";var g=s.forwardRef(({className:e,...t},o)=>m(r,{ref:o,className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));g.displayName=r.displayName;var J=({children:e,...t})=>m(c,{...t,children:m(p,{className:"overflow-hidden p-0",children:m(g,{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})})}),w=s.forwardRef(({className:e,...t},o)=>S("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(r.Input,{ref:o,className:i("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})]}));w.displayName=r.Input.displayName;var k=s.forwardRef(({className:e,...t},o)=>m(r.List,{ref:o,className:i("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));k.displayName=r.List.displayName;var b=s.forwardRef((e,t)=>m(r.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));b.displayName=r.Empty.displayName;var _=s.forwardRef(({className:e,...t},o)=>m(r.Group,{ref:o,className:i("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=r.Group.displayName;var E=s.forwardRef(({className:e,...t},o)=>m(r.Separator,{ref:o,className:i("-mx-1 h-px bg-border",e),...t}));E.displayName=r.Separator.displayName;var T=s.forwardRef(({className:e,...t},o)=>m(r.Item,{ref:o,className:i("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}));T.displayName=r.Item.displayName;var I=({className:e,...t})=>m("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});I.displayName="CommandShortcut";export{g as Command,J as CommandDialog,b as CommandEmpty,_ as CommandGroup,w as CommandInput,T as CommandItem,k as CommandList,E as CommandSeparator,I as CommandShortcut};
2
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/command.tsx","../../utils/src/classMerge.ts","../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","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\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,QAEv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,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","clsx","twMerge","cn","inputs","React","DialogPrimitive","X","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 C=Object.create;var m=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var o in t)m(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of N(t))!T.call(e,s)&&s!==o&&m(e,s,{get:()=>t[s],enumerable:!(l=h(t,s))||l.enumerable});return e};var f=(e,t,o)=>(o=e!=null?C(w(e)):{},d(t||!e||!e.__esModule?m(o,"default",{value:e,enumerable:!0}):o,e)),O=e=>d(m({},"__esModule",{value:!0}),e);var L={};b(L,{Dialog:()=>E,DialogClose:()=>H,DialogContent:()=>y,DialogDescription:()=>x,DialogFooter:()=>v,DialogHeader:()=>P,DialogOverlay:()=>c,DialogPortal:()=>D,DialogTitle:()=>R,DialogTrigger:()=>k});module.exports=O(L);var n=f(require("react"),1),a=f(require("@radix-ui/react-dialog"),1),u=require("lucide-react");var p=require("clsx"),g=require("tailwind-merge");function r(...e){return(0,g.twMerge)((0,p.clsx)(e))}var i=require("react/jsx-runtime"),E=a.Root,k=a.Trigger,D=a.Portal,H=a.Close,c=n.forwardRef(({className:e,...t},o)=>(0,i.jsx)(a.Overlay,{ref:o,className:r("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}));c.displayName=a.Overlay.displayName;var y=n.forwardRef(({className:e,children:t,...o},l)=>(0,i.jsxs)(D,{children:[(0,i.jsx)(c,{}),(0,i.jsxs)(a.Content,{ref:l,className:r("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,(0,i.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,i.jsx)(u.X,{className:"h-4 w-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=a.Content.displayName;var P=({className:e,...t})=>(0,i.jsx)("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});P.displayName="DialogHeader";var v=({className:e,...t})=>(0,i.jsx)("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});v.displayName="DialogFooter";var R=n.forwardRef(({className:e,...t},o)=>(0,i.jsx)(a.Title,{ref:o,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));R.displayName=a.Title.displayName;var x=n.forwardRef(({className:e,...t},o)=>(0,i.jsx)(a.Description,{ref:o,className:r("text-sm text-muted-foreground",e),...t}));x.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","../../utils/src/classMerge.ts"],"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","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\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,wBCJlB,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KA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hB,CACG,IAAKA,EACL,UAAWC,EAAG,gCAAiCH,CAAS,EACvD,GAAGC,EACR,CACH,EACDQ,EAAkB,YAA8B,cAAY","names":["dialog_exports","__export","Dialog","DialogClose","DialogContent","DialogDescription","DialogFooter","DialogHeader","DialogOverlay","DialogPortal","DialogTitle","DialogTrigger","__toCommonJS","React","DialogPrimitive","import_lucide_react","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","props","ref","cn","DialogContent","children","DialogHeader","DialogFooter","DialogTitle","DialogDescription"]}
@@ -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 };