@c-rex/ui 0.0.9 → 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 (61) hide show
  1. package/dist/alert.cjs +1 -1
  2. package/dist/alert.cjs.map +1 -1
  3. package/dist/alert.js +1 -1
  4. package/dist/alert.js.map +1 -1
  5. package/dist/breadcrumb.cjs +1 -1
  6. package/dist/breadcrumb.cjs.map +1 -1
  7. package/dist/breadcrumb.js +1 -1
  8. package/dist/breadcrumb.js.map +1 -1
  9. package/dist/button.cjs +1 -1
  10. package/dist/button.cjs.map +1 -1
  11. package/dist/button.d.cts +1 -1
  12. package/dist/button.d.ts +1 -1
  13. package/dist/button.js +1 -1
  14. package/dist/button.js.map +1 -1
  15. package/dist/command.cjs +1 -1
  16. package/dist/command.cjs.map +1 -1
  17. package/dist/command.d.cts +7 -7
  18. package/dist/command.d.ts +7 -7
  19. package/dist/command.js +1 -1
  20. package/dist/command.js.map +1 -1
  21. package/dist/dialog.cjs +1 -1
  22. package/dist/dialog.cjs.map +1 -1
  23. package/dist/dialog.js +1 -1
  24. package/dist/dialog.js.map +1 -1
  25. package/dist/input.cjs +1 -1
  26. package/dist/input.cjs.map +1 -1
  27. package/dist/input.js +1 -1
  28. package/dist/input.js.map +1 -1
  29. package/dist/popover.cjs +1 -1
  30. package/dist/popover.cjs.map +1 -1
  31. package/dist/popover.js +1 -1
  32. package/dist/popover.js.map +1 -1
  33. package/dist/select.cjs +1 -1
  34. package/dist/select.cjs.map +1 -1
  35. package/dist/select.js +1 -1
  36. package/dist/select.js.map +1 -1
  37. package/dist/separator.cjs +1 -1
  38. package/dist/separator.cjs.map +1 -1
  39. package/dist/separator.js +1 -1
  40. package/dist/separator.js.map +1 -1
  41. package/dist/sheet.cjs +1 -1
  42. package/dist/sheet.cjs.map +1 -1
  43. package/dist/sheet.js +1 -1
  44. package/dist/sheet.js.map +1 -1
  45. package/dist/sidebar.cjs +1 -1
  46. package/dist/sidebar.cjs.map +1 -1
  47. package/dist/sidebar.js +1 -1
  48. package/dist/sidebar.js.map +1 -1
  49. package/dist/skeleton.cjs +1 -1
  50. package/dist/skeleton.cjs.map +1 -1
  51. package/dist/skeleton.js +1 -1
  52. package/dist/skeleton.js.map +1 -1
  53. package/dist/table.cjs +1 -1
  54. package/dist/table.cjs.map +1 -1
  55. package/dist/table.js +1 -1
  56. package/dist/table.js.map +1 -1
  57. package/dist/tooltip.cjs +1 -1
  58. package/dist/tooltip.cjs.map +1 -1
  59. package/dist/tooltip.js +1 -1
  60. package/dist/tooltip.js.map +1 -1
  61. package/package.json +1 -1
@@ -8,7 +8,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
8
8
  ref?: React.Ref<HTMLDivElement>;
9
9
  } & {
10
10
  asChild?: boolean;
11
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
11
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
12
12
  label?: string;
13
13
  shouldFilter?: boolean;
14
14
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -24,7 +24,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
24
24
  ref?: React.Ref<HTMLInputElement>;
25
25
  } & {
26
26
  asChild?: boolean;
27
- }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
27
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
28
28
  value?: string;
29
29
  onValueChange?: (search: string) => void;
30
30
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -34,7 +34,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
34
34
  ref?: React.Ref<HTMLDivElement>;
35
35
  } & {
36
36
  asChild?: boolean;
37
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
37
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
38
38
  label?: string;
39
39
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
40
40
  declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
@@ -43,14 +43,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
43
43
  ref?: React.Ref<HTMLDivElement>;
44
44
  } & {
45
45
  asChild?: boolean;
46
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
46
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
47
47
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
48
48
  children?: React.ReactNode;
49
49
  } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
50
50
  ref?: React.Ref<HTMLDivElement>;
51
51
  } & {
52
52
  asChild?: boolean;
53
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
53
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
54
54
  heading?: React.ReactNode;
55
55
  value?: string;
56
56
  forceMount?: boolean;
@@ -59,7 +59,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
59
59
  ref?: React.Ref<HTMLDivElement>;
60
60
  } & {
61
61
  asChild?: boolean;
62
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
62
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
63
63
  alwaysRender?: boolean;
64
64
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
65
65
  declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
@@ -68,7 +68,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
68
68
  ref?: React.Ref<HTMLDivElement>;
69
69
  } & {
70
70
  asChild?: boolean;
71
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
71
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "value" | "disabled"> & {
72
72
  disabled?: boolean;
73
73
  onSelect?: (value: string) => void;
74
74
  value?: string;
package/dist/command.d.ts CHANGED
@@ -8,7 +8,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
8
8
  ref?: React.Ref<HTMLDivElement>;
9
9
  } & {
10
10
  asChild?: boolean;
11
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
11
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
12
12
  label?: string;
13
13
  shouldFilter?: boolean;
14
14
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -24,7 +24,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
24
24
  ref?: React.Ref<HTMLInputElement>;
25
25
  } & {
26
26
  asChild?: boolean;
27
- }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
27
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
28
28
  value?: string;
29
29
  onValueChange?: (search: string) => void;
30
30
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -34,7 +34,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
34
34
  ref?: React.Ref<HTMLDivElement>;
35
35
  } & {
36
36
  asChild?: boolean;
37
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
37
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
38
38
  label?: string;
39
39
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
40
40
  declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
@@ -43,14 +43,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
43
43
  ref?: React.Ref<HTMLDivElement>;
44
44
  } & {
45
45
  asChild?: boolean;
46
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
46
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
47
47
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
48
48
  children?: React.ReactNode;
49
49
  } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
50
50
  ref?: React.Ref<HTMLDivElement>;
51
51
  } & {
52
52
  asChild?: boolean;
53
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
53
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
54
54
  heading?: React.ReactNode;
55
55
  value?: string;
56
56
  forceMount?: boolean;
@@ -59,7 +59,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
59
59
  ref?: React.Ref<HTMLDivElement>;
60
60
  } & {
61
61
  asChild?: boolean;
62
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
62
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
63
63
  alwaysRender?: boolean;
64
64
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
65
65
  declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
@@ -68,7 +68,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
68
68
  ref?: React.Ref<HTMLDivElement>;
69
69
  } & {
70
70
  asChild?: boolean;
71
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
71
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "value" | "disabled"> & {
72
72
  disabled?: boolean;
73
73
  onSelect?: (value: string) => void;
74
74
  value?: string;
package/dist/command.js CHANGED
@@ -1,2 +1,2 @@
1
- import*as n from"react";import{Command as i}from"cmdk";import{Search as N}from"lucide-react";import{cn as s}from"@c-rex/utils";import*as l from"react";import*as a from"@radix-ui/react-dialog";import{X as R}from"lucide-react";import{cn as d}from"@c-rex/utils";import{jsx as r,jsxs as p}from"react/jsx-runtime";var f=a.Root;var v=a.Portal;var g=l.forwardRef(({className:e,...t},o)=>r(a.Overlay,{ref:o,className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));g.displayName=a.Overlay.displayName;var c=l.forwardRef(({className:e,children:t,...o},y)=>p(v,{children:[r(g,{}),p(a.Content,{ref:y,className:d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,p(a.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r(R,{className:"h-4 w-4"}),r("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=a.Content.displayName;var P=({className:e,...t})=>r("div",{className:d("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});P.displayName="DialogHeader";var C=({className:e,...t})=>r("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});C.displayName="DialogFooter";var D=l.forwardRef(({className:e,...t},o)=>r(a.Title,{ref:o,className:d("text-lg font-semibold leading-none tracking-tight",e),...t}));D.displayName=a.Title.displayName;var x=l.forwardRef(({className:e,...t},o)=>r(a.Description,{ref:o,className:d("text-sm text-muted-foreground",e),...t}));x.displayName=a.Description.displayName;import{jsx as m,jsxs as L}from"react/jsx-runtime";var u=n.forwardRef(({className:e,...t},o)=>m(i,{ref:o,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));u.displayName=i.displayName;var A=({children:e,...t})=>m(f,{...t,children:m(c,{className:"overflow-hidden p-0",children:m(u,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),h=n.forwardRef(({className:e,...t},o)=>L("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m(N,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m(i.Input,{ref:o,className:s("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));h.displayName=i.Input.displayName;var w=n.forwardRef(({className:e,...t},o)=>m(i.List,{ref:o,className:s("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));w.displayName=i.List.displayName;var k=n.forwardRef((e,t)=>m(i.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));k.displayName=i.Empty.displayName;var _=n.forwardRef(({className:e,...t},o)=>m(i.Group,{ref:o,className:s("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));_.displayName=i.Group.displayName;var b=n.forwardRef(({className:e,...t},o)=>m(i.Separator,{ref:o,className:s("-mx-1 h-px bg-border",e),...t}));b.displayName=i.Separator.displayName;var E=n.forwardRef(({className:e,...t},o)=>m(i.Item,{ref:o,className:s("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));E.displayName=i.Item.displayName;var T=({className:e,...t})=>m("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});T.displayName="CommandShortcut";export{u as Command,A as CommandDialog,k as CommandEmpty,_ as CommandGroup,h as CommandInput,E as CommandItem,w as CommandList,b as CommandSeparator,T as CommandShortcut};
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
2
  //# sourceMappingURL=command.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/command.tsx","../src/dialog.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":"AAAA,UAAYA,MAAW,QAEvB,OAAS,WAAWC,MAAwB,OAC5C,OAAS,UAAAC,MAAc,eAEvB,OAAS,MAAAC,MAAU,eCHnB,UAAYC,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,KAAAC,MAAS,eAElB,OAAS,MAAAC,MAAU,eAcf,cAAAC,EA0BQ,QAAAC,MA1BR,oBAZJ,IAAMC,EAAyB,OAI/B,IAAMC,EAA+B,SAIrC,IAAMC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBC,EAAiB,UAAhB,CACG,IAAKD,EACL,UAAWE,EACP,0JACAJ,CACJ,EACC,GAAGC,EACR,CACH,EACDF,EAAc,YAA8B,UAAQ,YAEpD,IAAMM,EAAsB,aAG1B,CAAC,CAAE,UAAAL,EAAW,SAAAM,EAAU,GAAGL,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,EAAoB,aAGxB,CAAC,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,KAAjB,CACG,IAAKD,EACL,UAAWE,EACP,0TACAJ,CACJ,EACC,GAAGC,EACR,CACH,EAEDc,EAAY,YAAcZ,EAAiB,KAAK,YAEhD,IAAMa,EAAkB,CAAC,CACrB,UAAAhB,EACA,GAAGC,CACP,IAEQJ,EAAC,QACG,UAAWO,EACP,wDACAJ,CACJ,EACC,GAAGC,EACR,EAGRe,EAAgB,YAAc","names":["React","CommandPrimitive","Search","cn","React","DialogPrimitive","X","cn","jsx","jsxs","Dialog","DialogPortal","DialogOverlay","className","props","ref","jsx","cn","DialogContent","children","jsxs","DialogPortal","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription","jsx","jsxs","Command","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"]}
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,QAEvB,OAAS,WAAWC,MAAwB,OAC5C,OAAS,UAAAC,MAAc,eCHvB,OAAS,QAAAC,MAA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M,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"]}
package/dist/dialog.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var R=Object.create;var m=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var T=(e,t)=>{for(var i in t)m(e,i,{get:t[i],enumerable:!0})},c=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of x(t))!b.call(e,s)&&s!==i&&m(e,s,{get:()=>t[s],enumerable:!(n=N(t,s))||n.enumerable});return e};var g=(e,t,i)=>(i=e!=null?R(C(e)):{},c(t||!e||!e.__esModule?m(i,"default",{value:e,enumerable:!0}):i,e)),h=e=>c(m({},"__esModule",{value:!0}),e);var O={};T(O,{Dialog:()=>w,DialogClose:()=>H,DialogContent:()=>D,DialogDescription:()=>y,DialogFooter:()=>P,DialogHeader:()=>v,DialogOverlay:()=>d,DialogPortal:()=>p,DialogTitle:()=>u,DialogTrigger:()=>E});module.exports=h(O);var r=g(require("react"),1),a=g(require("@radix-ui/react-dialog"),1),f=require("lucide-react"),l=require("@c-rex/utils"),o=require("react/jsx-runtime"),w=a.Root,E=a.Trigger,p=a.Portal,H=a.Close,d=r.forwardRef(({className:e,...t},i)=>(0,o.jsx)(a.Overlay,{ref:i,className:(0,l.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));d.displayName=a.Overlay.displayName;var D=r.forwardRef(({className:e,children:t,...i},n)=>(0,o.jsxs)(p,{children:[(0,o.jsx)(d,{}),(0,o.jsxs)(a.Content,{ref:n,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...i,children:[t,(0,o.jsxs)(a.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,o.jsx)(f.X,{className:"h-4 w-4"}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));D.displayName=a.Content.displayName;var v=({className:e,...t})=>(0,o.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});v.displayName="DialogHeader";var P=({className:e,...t})=>(0,o.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});P.displayName="DialogFooter";var u=r.forwardRef(({className:e,...t},i)=>(0,o.jsx)(a.Title,{ref:i,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));u.displayName=a.Title.displayName;var y=r.forwardRef(({className:e,...t},i)=>(0,o.jsx)(a.Description,{ref:i,className:(0,l.cn)("text-sm text-muted-foreground",e),...t}));y.displayName=a.Description.displayName;0&&(module.exports={Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger});
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
2
  //# sourceMappingURL=dialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":"ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,gBAAAC,EAAA,kBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAZ,GAEA,IAAAa,EAAuB,sBACvBC,EAAiC,uCACjCC,EAAkB,wBAElBC,EAAmB,wBAcfC,EAAA,6BAZEf,EAAyB,OAEzBS,EAAgC,UAEhCF,EAA+B,SAE/BN,EAA8B,QAE9BK,EAAsB,aAG1B,CAAC,CAAE,UAAAU,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAiB,UAAhB,CACG,IAAKA,EACL,aAAW,MACP,0JACAF,CACJ,EACC,GAAGC,EACR,CACH,EACDX,EAAc,YAA8B,UAAQ,YAEpD,IAAMJ,EAAsB,aAG1B,CAAC,CAAE,UAAAc,EAAW,SAAAG,EAAU,GAAGF,CAAM,EAAGC,OAClC,QAACX,EAAA,CACG,oBAACD,EAAA,EAAc,KACf,QAAiB,UAAhB,CACG,IAAKY,EACL,aAAW,MACP,8fACAF,CACJ,EACC,GAAGC,EAEH,UAAAE,KACD,QAAiB,QAAhB,CAAsB,UAAU,gRAC7B,oBAAC,KAAE,UAAU,UAAU,KACvB,OAAC,QAAK,UAAU,UAAU,iBAAK,GACnC,GACJ,GACJ,CACH,EACDjB,EAAc,YAA8B,UAAQ,YAEpD,IAAMG,EAAe,CAAC,CAClB,UAAAW,EACA,GAAGC,CACP,OACI,OAAC,OACG,aAAW,MACP,qDACAD,CACJ,EACC,GAAGC,EACR,EAEJZ,EAAa,YAAc,eAE3B,IAAMD,EAAe,CAAC,CAClB,UAAAY,EACA,GAAGC,CACP,OACI,OAAC,OACG,aAAW,MACP,gEACAD,CACJ,EACC,GAAGC,EACR,EAEJb,EAAa,YAAc,eAE3B,IAAMI,EAAoB,aAGxB,CAAC,CAAE,UAAAQ,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAiB,QAAhB,CACG,IAAKA,EACL,aAAW,MACP,oDACAF,CACJ,EACC,GAAGC,EACR,CACH,EACDT,EAAY,YAA8B,QAAM,YAEhD,IAAML,EAA0B,aAG9B,CAAC,CAAE,UAAAa,EAAW,GAAGC,CAAM,EAAGC,OACxB,OAAiB,cAAhB,CACG,IAAKA,EACL,aAAW,MAAG,gCAAiCF,CAAS,EACvD,GAAGC,EACR,CACH,EACDd,EAAkB,YAA8B,cAAY","names":["dialog_exports","__export","Dialog","DialogClose","DialogContent","DialogDescription","DialogFooter","DialogHeader","DialogOverlay","DialogPortal","DialogTitle","DialogTrigger","__toCommonJS","React","DialogPrimitive","import_lucide_react","import_utils","import_jsx_runtime","className","props","ref","children"]}
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,KAAMC,EAAsB,CACxC,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC/B,CDeI,IAAA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ACH,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"]}
package/dist/dialog.js CHANGED
@@ -1,2 +1,2 @@
1
- "use client";import*as s from"react";import*as e from"@radix-ui/react-dialog";import{X as d}from"lucide-react";import{cn as l}from"@c-rex/utils";import{jsx as i,jsxs as r}from"react/jsx-runtime";var y=e.Root,R=e.Trigger,c=e.Portal,N=e.Close,n=s.forwardRef(({className:t,...a},o)=>i(e.Overlay,{ref:o,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a}));n.displayName=e.Overlay.displayName;var g=s.forwardRef(({className:t,children:a,...o},m)=>r(c,{children:[i(n,{}),r(e.Content,{ref:m,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...o,children:[a,r(e.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i(d,{className:"h-4 w-4"}),i("span",{className:"sr-only",children:"Close"})]})]})]}));g.displayName=e.Content.displayName;var f=({className:t,...a})=>i("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",t),...a});f.displayName="DialogHeader";var p=({className:t,...a})=>i("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});p.displayName="DialogFooter";var D=s.forwardRef(({className:t,...a},o)=>i(e.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",t),...a}));D.displayName=e.Title.displayName;var v=s.forwardRef(({className:t,...a},o)=>i(e.Description,{ref:o,className:l("text-sm text-muted-foreground",t),...a}));v.displayName=e.Description.displayName;export{y as Dialog,N as DialogClose,g as DialogContent,v as DialogDescription,p as DialogFooter,f as DialogHeader,n as DialogOverlay,c as DialogPortal,D as DialogTitle,R as DialogTrigger};
1
+ "use client";import*as s from"react";import*as e from"@radix-ui/react-dialog";import{X as f}from"lucide-react";import{clsx as c}from"clsx";import{twMerge as d}from"tailwind-merge";function r(...t){return d(c(t))}import{jsx as o,jsxs as n}from"react/jsx-runtime";var k=e.Root,H=e.Trigger,p=e.Portal,L=e.Close,l=s.forwardRef(({className:t,...a},i)=>o(e.Overlay,{ref:i,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",t),...a}));l.displayName=e.Overlay.displayName;var g=s.forwardRef(({className:t,children:a,...i},m)=>n(p,{children:[o(l,{}),n(e.Content,{ref:m,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",t),...i,children:[a,n(e.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o(f,{className:"h-4 w-4"}),o("span",{className:"sr-only",children:"Close"})]})]})]}));g.displayName=e.Content.displayName;var u=({className:t,...a})=>o("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",t),...a});u.displayName="DialogHeader";var D=({className:t,...a})=>o("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});D.displayName="DialogFooter";var y=s.forwardRef(({className:t,...a},i)=>o(e.Title,{ref:i,className:r("text-lg font-semibold leading-none tracking-tight",t),...a}));y.displayName=e.Title.displayName;var P=s.forwardRef(({className:t,...a},i)=>o(e.Description,{ref:i,className:r("text-sm text-muted-foreground",t),...a}));P.displayName=e.Description.displayName;export{k as Dialog,L as DialogClose,g as DialogContent,P as DialogDescription,D as DialogFooter,u as DialogHeader,l as DialogOverlay,p as DialogPortal,y as DialogTitle,H as DialogTrigger};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":"aAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,KAAAC,MAAS,eAElB,OAAS,MAAAC,MAAU,eAcf,cAAAC,EA0BQ,QAAAC,MA1BR,oBAZJ,IAAMC,EAAyB,OAEzBC,EAAgC,UAEhCC,EAA+B,SAE/BC,EAA8B,QAE9BC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,UAAhB,CACG,IAAKS,EACL,UAAWV,EACP,0JACAQ,CACJ,EACC,GAAGC,EACR,CACH,EACDF,EAAc,YAA8B,UAAQ,YAEpD,IAAMI,EAAsB,aAG1B,CAAC,CAAE,UAAAH,EAAW,SAAAI,EAAU,GAAGH,CAAM,EAAGC,IAClCR,EAACG,EAAA,CACG,UAAAJ,EAACM,EAAA,EAAc,EACfL,EAAiB,UAAhB,CACG,IAAKQ,EACL,UAAWV,EACP,8fACAQ,CACJ,EACC,GAAGC,EAEH,UAAAG,EACDV,EAAiB,QAAhB,CAAsB,UAAU,gRAC7B,UAAAD,EAACF,EAAA,CAAE,UAAU,UAAU,EACvBE,EAAC,QAAK,UAAU,UAAU,iBAAK,GACnC,GACJ,GACJ,CACH,EACDU,EAAc,YAA8B,UAAQ,YAEpD,IAAME,EAAe,CAAC,CAClB,UAAAL,EACA,GAAGC,CACP,IACIR,EAAC,OACG,UAAWD,EACP,qDACAQ,CACJ,EACC,GAAGC,EACR,EAEJI,EAAa,YAAc,eAE3B,IAAMC,EAAe,CAAC,CAClB,UAAAN,EACA,GAAGC,CACP,IACIR,EAAC,OACG,UAAWD,EACP,gEACAQ,CACJ,EACC,GAAGC,EACR,EAEJK,EAAa,YAAc,eAE3B,IAAMC,EAAoB,aAGxB,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,QAAhB,CACG,IAAKS,EACL,UAAWV,EACP,oDACAQ,CACJ,EACC,GAAGC,EACR,CACH,EACDM,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACxBT,EAAiB,cAAhB,CACG,IAAKS,EACL,UAAWV,EAAG,gCAAiCQ,CAAS,EACvD,GAAGC,EACR,CACH,EACDO,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","X","cn","jsx","jsxs","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","props","ref","DialogContent","children","DialogHeader","DialogFooter","DialogTitle","DialogDescription"]}
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":"aAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,KAAAC,MAAS,eCJlB,OAAS,QAAAC,MAA6B,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CACxC,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC/B,CDeI,cAAAC,EA0BQ,QAAAC,MA1BR,oBAZJ,IAAMC,EA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,GAAGC,EACR,CACH,EACDS,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","X","clsx","twMerge","cn","inputs","jsx","jsxs","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","props","ref","cn","DialogContent","children","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription"]}
package/dist/input.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var f=Object.create;var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},s=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of m(t))!b.call(e,r)&&r!==o&&i(e,r,{get:()=>t[r],enumerable:!(n=u(t,r))||n.enumerable});return e};var x=(e,t,o)=>(o=e!=null?f(c(e)):{},s(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),w=e=>s(i({},"__esModule",{value:!0}),e);var y={};g(y,{Input:()=>d});module.exports=w(y);var l=x(require("react"),1),a=require("@c-rex/utils"),p=require("react/jsx-runtime"),d=l.forwardRef(({className:e,type:t,...o},n)=>(0,p.jsx)("input",{type:t,className:(0,a.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...o}));d.displayName="Input";0&&(module.exports={Input});
1
+ "use strict";var f=Object.create;var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var h=(e,r)=>{for(var t in r)a(e,t,{get:r[t],enumerable:!0})},s=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of g(r))!y.call(e,o)&&o!==t&&a(e,o,{get:()=>r[o],enumerable:!(n=d(r,o))||n.enumerable});return e};var b=(e,r,t)=>(t=e!=null?f(x(e)):{},s(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),P=e=>s(a({},"__esModule",{value:!0}),e);var w={};h(w,{Input:()=>u});module.exports=P(w);var p=b(require("react"),1);var i=require("clsx"),m=require("tailwind-merge");function l(...e){return(0,m.twMerge)((0,i.clsx)(e))}var c=require("react/jsx-runtime"),u=p.forwardRef(({className:e,type:r,...t},n)=>(0,c.jsx)("input",{type:r,className:l("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));u.displayName="Input";0&&(module.exports={Input});
2
2
  //# sourceMappingURL=input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,sBAEvBC,EAAmB,wBAKPC,EAAA,6BAHNJ,EAAc,aAChB,CAAC,CAAE,UAAAK,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAGC,OAExB,OAAC,SACG,KAAMF,EACN,aAAW,MACP,0WACAD,CACJ,EACA,IAAKG,EACJ,GAAGD,EACR,CAGZ,EACAP,EAAM,YAAc","names":["input_exports","__export","Input","__toCommonJS","React","import_utils","import_jsx_runtime","className","type","props","ref"]}
1
+ {"version":3,"sources":["../src/input.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","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,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,sBCAvB,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CACxC,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC/B,CDEY,IAAAC,EAAA,6BAHNC,EAAc,aAChB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAGC,OAExB,OAAC,SACG,KAAMF,EACN,UAAWG,EACP,0WACAJ,CACJ,EACA,IAAKG,EACJ,GAAGD,EACR,CAGZ,EACAH,EAAM,YAAc","names":["input_exports","__export","Input","__toCommonJS","React","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","Input","className","type","props","ref","cn"]}
package/dist/input.js CHANGED
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{cn as i}from"@c-rex/utils";import{jsx as l}from"react/jsx-runtime";var s=e.forwardRef(({className:t,type:o,...r},n)=>l("input",{type:o,className:i("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...r}));s.displayName="Input";export{s as Input};
1
+ import*as t from"react";import{clsx as s}from"clsx";import{twMerge as i}from"tailwind-merge";function r(...e){return i(s(e))}import{jsx as l}from"react/jsx-runtime";var m=t.forwardRef(({className:e,type:o,...n},a)=>l("input",{type:o,className:r("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...n}));m.displayName="Input";export{m as Input};
2
2
  //# sourceMappingURL=input.js.map
package/dist/input.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"mappings":"AAAA,UAAYA,MAAW,QAEvB,OAAS,MAAAC,MAAU,eAKP,cAAAC,MAAA,oBAHZ,IAAMC,EAAc,aAChB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAGC,IAExBL,EAAC,SACG,KAAMG,EACN,UAAWJ,EACP,0WACAG,CACJ,EACA,IAAKG,EACJ,GAAGD,EACR,CAGZ,EACAH,EAAM,YAAc","names":["React","cn","jsx","Input","className","type","props","ref"]}
1
+ {"version":3,"sources":["../src/input.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","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,QCAvB,OAAS,QAAAC,MAA6B,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CACxC,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC/B,CDEY,cAAAC,MAAA,oBAHZ,IAAMC,EAAc,aAChB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAGC,IAExBL,EAAC,SACG,KAAMG,EACN,UAAWG,EACP,0WACAJ,CACJ,EACA,IAAKG,EACJ,GAAGD,EACR,CAGZ,EACAH,EAAM,YAAc","names":["React","clsx","twMerge","cn","inputs","jsx","Input","className","type","props","ref","cn"]}
package/dist/popover.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var f=Object.create;var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var h=(o,e)=>{for(var i in e)n(o,i,{get:e[i],enumerable:!0})},p=(o,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!R.call(o,r)&&r!==i&&n(o,r,{get:()=>e[r],enumerable:!(a=l(e,r))||a.enumerable});return o};var m=(o,e,i)=>(i=o!=null?f(g(o)):{},p(e||!o||!o.__esModule?n(i,"default",{value:o,enumerable:!0}):i,o)),u=o=>p(n({},"__esModule",{value:!0}),o);var w={};h(w,{Popover:()=>C,PopoverAnchor:()=>y,PopoverContent:()=>v,PopoverTrigger:()=>b});module.exports=u(w);var s=m(require("react"),1),t=m(require("@radix-ui/react-popover"),1),P=require("@c-rex/utils"),d=require("react/jsx-runtime"),C=t.Root,b=t.Trigger,y=t.Anchor,v=s.forwardRef(({className:o,align:e="center",sideOffset:i=4,...a},r)=>(0,d.jsx)(t.Portal,{children:(0,d.jsx)(t.Content,{ref:r,align:e,sideOffset:i,className:(0,P.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...a})}));v.displayName=t.Content.displayName;0&&(module.exports={Popover,PopoverAnchor,PopoverContent,PopoverTrigger});
1
+ "use strict";var v=Object.create;var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var C=(e,o)=>{for(var r in o)i(e,r,{get:o[r],enumerable:!0})},m=(e,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of g(o))!y.call(e,a)&&a!==r&&i(e,a,{get:()=>o[a],enumerable:!(n=u(o,a))||n.enumerable});return e};var p=(e,o,r)=>(r=e!=null?v(h(e)):{},m(o||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),R=e=>m(i({},"__esModule",{value:!0}),e);var b={};C(b,{Popover:()=>x,PopoverAnchor:()=>T,PopoverContent:()=>l,PopoverTrigger:()=>w});module.exports=R(b);var P=p(require("react"),1),t=p(require("@radix-ui/react-popover"),1);var d=require("clsx"),c=require("tailwind-merge");function f(...e){return(0,c.twMerge)((0,d.clsx)(e))}var s=require("react/jsx-runtime"),x=t.Root,w=t.Trigger,T=t.Anchor,l=P.forwardRef(({className:e,align:o="center",sideOffset:r=4,...n},a)=>(0,s.jsx)(t.Portal,{children:(0,s.jsx)(t.Content,{ref:a,align:o,sideOffset:r,className:f("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));l.displayName=t.Content.displayName;0&&(module.exports={Popover,PopoverAnchor,PopoverContent,PopoverTrigger});
2
2
  //# sourceMappingURL=popover.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/popover.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,kBAAAC,EAAA,mBAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAN,GAAA,IAAAO,EAAuB,sBACvBC,EAAkC,wCAElCC,EAAmB,wBAaXC,EAAA,6BAXFR,EAA2B,OAE3BG,EAAkC,UAElCF,EAAiC,SAEjCC,EAAuB,aAG3B,CAAC,CAAE,UAAAO,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,OAC1D,OAAkB,SAAjB,CACG,mBAAkB,UAAjB,CACG,IAAKA,EACL,MAAOH,EACP,WAAYC,EACZ,aAAW,MACP,6aACAF,CACJ,EACC,GAAGG,EACR,EACJ,CACH,EACDV,EAAe,YAA+B,UAAQ","names":["popover_exports","__export","Popover","PopoverAnchor","PopoverContent","PopoverTrigger","__toCommonJS","React","PopoverPrimitive","import_utils","import_jsx_runtime","className","align","sideOffset","props","ref"]}
1
+ {"version":3,"sources":["../src/popover.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n","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,aAAAE,EAAA,kBAAAC,EAAA,mBAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAN,GAAA,IAAAO,EAAuB,sBACvBC,EAAkC,wCCDlC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CACxC,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC/B,CDWQ,IAAAC,EAAA,6BAXFC,EAA2B,OAE3BC,EAAkC,UAElCC,EAAiC,SAEjCC,EAAuB,aAG3B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,OAC1D,OAAkB,SAAjB,CACG,mBAAkB,UAAjB,CACG,IAAKA,EACL,MAAOH,EACP,WAAYC,EACZ,UAAWG,EACP,6aACAL,CACJ,EACC,GAAGG,EACR,EACJ,CACH,EACDJ,EAAe,YAA+B,UAAQ","names":["popover_exports","__export","Popover","PopoverAnchor","PopoverContent","PopoverTrigger","__toCommonJS","React","PopoverPrimitive","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","Popover","PopoverTrigger","PopoverAnchor","PopoverContent","className","align","sideOffset","props","ref","cn"]}
package/dist/popover.js CHANGED
@@ -1,2 +1,2 @@
1
- import*as t from"react";import*as o from"@radix-ui/react-popover";import{cn as p}from"@c-rex/utils";import{jsx as e}from"react/jsx-runtime";var P=o.Root,v=o.Trigger,f=o.Anchor,m=t.forwardRef(({className:i,align:r="center",sideOffset:a=4,...n},d)=>e(o.Portal,{children:e(o.Content,{ref:d,align:r,sideOffset:a,className:p("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i),...n})}));m.displayName=o.Content.displayName;export{P as Popover,f as PopoverAnchor,m as PopoverContent,v as PopoverTrigger};
1
+ import*as a from"react";import*as e from"@radix-ui/react-popover";import{clsx as p}from"clsx";import{twMerge as d}from"tailwind-merge";function t(...o){return d(p(o))}import{jsx as r}from"react/jsx-runtime";var x=e.Root,w=e.Trigger,T=e.Anchor,c=a.forwardRef(({className:o,align:n="center",sideOffset:i=4,...s},m)=>r(e.Portal,{children:r(e.Content,{ref:m,align:n,sideOffset:i,className:t("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...s})}));c.displayName=e.Content.displayName;export{x as Popover,T as PopoverAnchor,c as PopoverContent,w as PopoverTrigger};
2
2
  //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/popover.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,UAAYC,MAAsB,0BAElC,OAAS,MAAAC,MAAU,eAaX,cAAAC,MAAA,oBAXR,IAAMC,EAA2B,OAE3BC,EAAkC,UAElCC,EAAiC,SAEjCC,EAAuB,aAG3B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DT,EAAkB,SAAjB,CACG,SAAAA,EAAkB,UAAjB,CACG,IAAKS,EACL,MAAOH,EACP,WAAYC,EACZ,UAAWR,EACP,6aACAM,CACJ,EACC,GAAGG,EACR,EACJ,CACH,EACDJ,EAAe,YAA+B,UAAQ","names":["React","PopoverPrimitive","cn","jsx","Popover","PopoverTrigger","PopoverAnchor","PopoverContent","className","align","sideOffset","props","ref"]}
1
+ {"version":3,"sources":["../src/popover.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n","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,UAAYC,MAAsB,0BCDlC,OAAS,QAAAC,MAA6B,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CACxC,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC/B,CDWQ,cAAAC,MAAA,oBAXR,IAAMC,EAA2B,OAE3BC,EAAkC,UAElCC,EAAiC,SAEjCC,EAAuB,aAG3B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAM,EAAGC,IAC1DT,EAAkB,SAAjB,CACG,SAAAA,EAAkB,UAAjB,CACG,IAAKS,EACL,MAAOH,EACP,WAAYC,EACZ,UAAWG,EACP,6aACAL,CACJ,EACC,GAAGG,EACR,EACJ,CACH,EACDJ,EAAe,YAA+B,UAAQ","names":["React","PopoverPrimitive","clsx","twMerge","cn","inputs","jsx","Popover","PopoverTrigger","PopoverAnchor","PopoverContent","className","align","sideOffset","props","ref","cn"]}
package/dist/select.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var w=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var x=(t,i)=>{for(var o in i)s(t,o,{get:i[o],enumerable:!0})},f=(t,i,o,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let m of h(i))!b.call(t,m)&&m!==o&&s(t,m,{get:()=>i[m],enumerable:!(l=g(i,m))||l.enumerable});return t};var S=(t,i,o)=>(o=t!=null?w(N(t)):{},f(i||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),C=t=>f(s({},"__esModule",{value:!0}),t);var D={};x(D,{Select:()=>I,SelectContent:()=>v,SelectGroup:()=>B,SelectItem:()=>R,SelectLabel:()=>P,SelectScrollDownButton:()=>d,SelectScrollUpButton:()=>p,SelectSeparator:()=>y,SelectTrigger:()=>u,SelectValue:()=>T});module.exports=C(D);var c=S(require("react"),1),e=S(require("@radix-ui/react-select"),1),n=require("lucide-react"),a=require("@c-rex/utils"),r=require("react/jsx-runtime"),I=e.Root,B=e.Group,T=e.Value,u=c.forwardRef(({className:t,children:i,...o},l)=>(0,r.jsxs)(e.Trigger,{ref:l,className:(0,a.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[i,(0,r.jsx)(e.Icon,{asChild:!0,children:(0,r.jsx)(n.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));u.displayName=e.Trigger.displayName;var p=c.forwardRef(({className:t,...i},o)=>(0,r.jsx)(e.ScrollUpButton,{ref:o,className:(0,a.cn)("flex cursor-default items-center justify-center py-1",t),...i,children:(0,r.jsx)(n.ChevronUp,{className:"h-4 w-4"})}));p.displayName=e.ScrollUpButton.displayName;var d=c.forwardRef(({className:t,...i},o)=>(0,r.jsx)(e.ScrollDownButton,{ref:o,className:(0,a.cn)("flex cursor-default items-center justify-center py-1",t),...i,children:(0,r.jsx)(n.ChevronDown,{className:"h-4 w-4"})}));d.displayName=e.ScrollDownButton.displayName;var v=c.forwardRef(({className:t,children:i,position:o="popper",...l},m)=>(0,r.jsx)(e.Portal,{children:(0,r.jsxs)(e.Content,{ref:m,className:(0,a.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...l,children:[(0,r.jsx)(p,{}),(0,r.jsx)(e.Viewport,{className:(0,a.cn)("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),(0,r.jsx)(d,{})]})}));v.displayName=e.Content.displayName;var P=c.forwardRef(({className:t,...i},o)=>(0,r.jsx)(e.Label,{ref:o,className:(0,a.cn)("px-2 py-1.5 text-sm font-semibold",t),...i}));P.displayName=e.Label.displayName;var R=c.forwardRef(({className:t,children:i,...o},l)=>(0,r.jsxs)(e.Item,{ref:l,className:(0,a.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...o,children:[(0,r.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(e.ItemIndicator,{children:(0,r.jsx)(n.Check,{className:"h-4 w-4"})})}),(0,r.jsx)(e.ItemText,{children:i})]}));R.displayName=e.Item.displayName;var y=c.forwardRef(({className:t,...i},o)=>(0,r.jsx)(e.Separator,{ref:o,className:(0,a.cn)("-mx-1 my-1 h-px bg-muted",t),...i}));y.displayName=e.Separator.displayName;0&&(module.exports={Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue});
1
+ "use strict";var w=Object.create;var s=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var I=(t,r)=>{for(var i in r)s(t,i,{get:r[i],enumerable:!0})},f=(t,r,i,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of N(r))!b.call(t,n)&&n!==i&&s(t,n,{get:()=>r[n],enumerable:!(l=x(r,n))||l.enumerable});return t};var u=(t,r,i)=>(i=t!=null?w(C(t)):{},f(r||!t||!t.__esModule?s(i,"default",{value:t,enumerable:!0}):i,t)),B=t=>f(s({},"__esModule",{value:!0}),t);var W={};I(W,{Select:()=>T,SelectContent:()=>y,SelectGroup:()=>U,SelectItem:()=>h,SelectLabel:()=>R,SelectScrollDownButton:()=>d,SelectScrollUpButton:()=>p,SelectSeparator:()=>g,SelectTrigger:()=>v,SelectValue:()=>E});module.exports=B(W);var c=u(require("react"),1),e=u(require("@radix-ui/react-select"),1),m=require("lucide-react");var S=require("clsx"),P=require("tailwind-merge");function a(...t){return(0,P.twMerge)((0,S.clsx)(t))}var o=require("react/jsx-runtime"),T=e.Root,U=e.Group,E=e.Value,v=c.forwardRef(({className:t,children:r,...i},l)=>(0,o.jsxs)(e.Trigger,{ref:l,className:a("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...i,children:[r,(0,o.jsx)(e.Icon,{asChild:!0,children:(0,o.jsx)(m.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));v.displayName=e.Trigger.displayName;var p=c.forwardRef(({className:t,...r},i)=>(0,o.jsx)(e.ScrollUpButton,{ref:i,className:a("flex cursor-default items-center justify-center py-1",t),...r,children:(0,o.jsx)(m.ChevronUp,{className:"h-4 w-4"})}));p.displayName=e.ScrollUpButton.displayName;var d=c.forwardRef(({className:t,...r},i)=>(0,o.jsx)(e.ScrollDownButton,{ref:i,className:a("flex cursor-default items-center justify-center py-1",t),...r,children:(0,o.jsx)(m.ChevronDown,{className:"h-4 w-4"})}));d.displayName=e.ScrollDownButton.displayName;var y=c.forwardRef(({className:t,children:r,position:i="popper",...l},n)=>(0,o.jsx)(e.Portal,{children:(0,o.jsxs)(e.Content,{ref:n,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:i,...l,children:[(0,o.jsx)(p,{}),(0,o.jsx)(e.Viewport,{className:a("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,o.jsx)(d,{})]})}));y.displayName=e.Content.displayName;var R=c.forwardRef(({className:t,...r},i)=>(0,o.jsx)(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",t),...r}));R.displayName=e.Label.displayName;var h=c.forwardRef(({className:t,children:r,...i},l)=>(0,o.jsxs)(e.Item,{ref:l,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...i,children:[(0,o.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,o.jsx)(e.ItemIndicator,{children:(0,o.jsx)(m.Check,{className:"h-4 w-4"})})}),(0,o.jsx)(e.ItemText,{children:r})]}));h.displayName=e.Item.displayName;var g=c.forwardRef(({className:t,...r},i)=>(0,o.jsx)(e.Separator,{ref:i,className:a("-mx-1 my-1 h-px bg-muted",t),...r}));g.displayName=e.Separator.displayName;0&&(module.exports={Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue});
2
2
  //# sourceMappingURL=select.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/select.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"],"mappings":"0j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,UACb,kIACAJ,CACJ,EACA,SAAUI,EACT,GAAGF,EAEJ,oBAACZ,EAAA,EAAqB,KACtB,OAAiB,WAAhB,CACG,aAAW,MACP,MACAc,IAAa,UACb,yFACJ,EAEC,SAAAH,EACL,KACA,OAACZ,EAAA,EAAuB,GAC5B,EACJ,CACH,EACDJ,EAAc,YAA8B,UAAQ,YAEpD,IAAMG,EAAoB,aAGxB,CAAC,CAAE,UAAAY,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAiB,QAAhB,CACG,IAAKA,EACL,aAAW,MAAG,oCAAqCH,CAAS,EAC3D,GAAGE,EACR,CACH,EACDd,EAAY,YAA8B,QAAM,YAEhD,IAAMD,EAAmB,aAGvB,CAAC,CAAE,UAAAa,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,OAClC,QAAiB,OAAhB,CACG,IAAKA,EACL,aAAW,MACP,4NACAH,CACJ,EACC,GAAGE,EAEJ,oBAAC,QAAK,UAAU,gEACZ,mBAAiB,gBAAhB,CACG,mBAAC,SAAM,UAAU,UAAU,EAC/B,EACJ,KACA,OAAiB,WAAhB,CAA0B,SAAAD,EAAS,GACxC,CACH,EACDd,EAAW,YAA8B,OAAK,YAE9C,IAAMI,EAAwB,aAG5B,CAAC,CAAE,UAAAS,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAiB,YAAhB,CACG,IAAKA,EACL,aAAW,MAAG,2BAA4BH,CAAS,EAClD,GAAGE,EACR,CACH,EACDX,EAAgB,YAA8B,YAAU","names":["select_exports","__export","Select","SelectContent","SelectGroup","SelectItem","SelectLabel","SelectScrollDownButton","SelectScrollUpButton","SelectSeparator","SelectTrigger","SelectValue","__toCommonJS","React","SelectPrimitive","import_lucide_react","import_utils","import_jsx_runtime","className","children","props","ref","position"]}
1
+ {"version":3,"sources":["../src/select.tsx","../../utils/src/classMerge.ts"],"sourcesContent":["import * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\n\nimport { cn } from \"@c-rex/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n","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,kBAAAC,EAAA,gBAAAC,EAAA,eAAAC,EAAA,gBAAAC,EAAA,2BAAAC,EAAA,yBAAAC,EAAA,oBAAAC,EAAA,kBAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAZ,GAAA,IAAAa,EAAuB,sBACvBC,EAAiC,uCACjCC,EAA8C,wBCF9C,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CACxC,SAAO,cAAQ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AAME,EAAoB,aAGxB,CAAC,CAAE,UAAAT,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAiB,QAAhB,CACG,IAAKA,EACL,UAAWC,EAAG,oCAAqCJ,CAAS,EAC3D,GAAGE,EACR,CACH,EACDO,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAAmB,aAGvB,CAAC,CAAE,UAAAV,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,OAClC,QAAiB,OAAhB,CACG,IAAKA,EACL,UAAWC,EACP,4NACAJ,CACJ,EACC,GAAGE,EAEJ,oBAAC,QAAK,UAAU,gEACZ,mBAAiB,gBAAhB,CACG,mBAAC,SAAM,UAAU,UAAU,EAC/B,EACJ,KACA,OAAiB,WAAhB,CAA0B,SAAAD,EAAS,GACxC,CACH,EACDS,EAAW,YAA8B,OAAK,YAE9C,IAAMC,EAAwB,aAG5B,CAAC,CAAE,UAAAX,EAAW,GAAGE,CAAM,EAAGC,OACxB,OAAiB,YAAhB,CACG,IAAKA,EACL,UAAWC,EAAG,2BAA4BJ,CAAS,EAClD,GAAGE,EACR,CACH,EACDS,EAAgB,YAA8B,YAAU","names":["select_exports","__export","Select","SelectContent","SelectGroup","SelectItem","SelectLabel","SelectScrollDownButton","SelectScrollUpButton","SelectSeparator","SelectTrigger","SelectValue","__toCommonJS","React","SelectPrimitive","import_lucide_react","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","Select","SelectGroup","SelectValue","SelectTrigger","className","children","props","ref","cn","SelectScrollUpButton","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","SelectSeparator"]}
package/dist/select.js CHANGED
@@ -1,2 +1,2 @@
1
- import*as l from"react";import*as e from"@radix-ui/react-select";import{Check as f,ChevronDown as n,ChevronUp as S}from"lucide-react";import{cn as a}from"@c-rex/utils";import{jsx as t,jsxs as m}from"react/jsx-runtime";var h=e.Root,N=e.Group,b=e.Value,u=l.forwardRef(({className:o,children:r,...i},c)=>m(e.Trigger,{ref:c,className:a("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",o),...i,children:[r,t(e.Icon,{asChild:!0,children:t(n,{className:"h-4 w-4 opacity-50"})})]}));u.displayName=e.Trigger.displayName;var s=l.forwardRef(({className:o,...r},i)=>t(e.ScrollUpButton,{ref:i,className:a("flex cursor-default items-center justify-center py-1",o),...r,children:t(S,{className:"h-4 w-4"})}));s.displayName=e.ScrollUpButton.displayName;var p=l.forwardRef(({className:o,...r},i)=>t(e.ScrollDownButton,{ref:i,className:a("flex cursor-default items-center justify-center py-1",o),...r,children:t(n,{className:"h-4 w-4"})}));p.displayName=e.ScrollDownButton.displayName;var v=l.forwardRef(({className:o,children:r,position:i="popper",...c},d)=>t(e.Portal,{children:m(e.Content,{ref:d,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",o),position:i,...c,children:[t(s,{}),t(e.Viewport,{className:a("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),t(p,{})]})}));v.displayName=e.Content.displayName;var P=l.forwardRef(({className:o,...r},i)=>t(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",o),...r}));P.displayName=e.Label.displayName;var R=l.forwardRef(({className:o,children:r,...i},c)=>m(e.Item,{ref:c,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),...i,children:[t("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:t(e.ItemIndicator,{children:t(f,{className:"h-4 w-4"})})}),t(e.ItemText,{children:r})]}));R.displayName=e.Item.displayName;var y=l.forwardRef(({className:o,...r},i)=>t(e.Separator,{ref:i,className:a("-mx-1 my-1 h-px bg-muted",o),...r}));y.displayName=e.Separator.displayName;export{h as Select,v as SelectContent,N as SelectGroup,R as SelectItem,P as SelectLabel,p as SelectScrollDownButton,s as SelectScrollUpButton,y as SelectSeparator,u as SelectTrigger,b as SelectValue};
1
+ import*as l from"react";import*as e from"@radix-ui/react-select";import{Check as S,ChevronDown as m,ChevronUp as P}from"lucide-react";import{clsx as f}from"clsx";import{twMerge as u}from"tailwind-merge";function a(...r){return u(f(r))}import{jsx as t,jsxs as n}from"react/jsx-runtime";var D=e.Root,L=e.Group,V=e.Value,v=l.forwardRef(({className:r,children:o,...i},c)=>n(e.Trigger,{ref:c,className:a("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...i,children:[o,t(e.Icon,{asChild:!0,children:t(m,{className:"h-4 w-4 opacity-50"})})]}));v.displayName=e.Trigger.displayName;var s=l.forwardRef(({className:r,...o},i)=>t(e.ScrollUpButton,{ref:i,className:a("flex cursor-default items-center justify-center py-1",r),...o,children:t(P,{className:"h-4 w-4"})}));s.displayName=e.ScrollUpButton.displayName;var p=l.forwardRef(({className:r,...o},i)=>t(e.ScrollDownButton,{ref:i,className:a("flex cursor-default items-center justify-center py-1",r),...o,children:t(m,{className:"h-4 w-4"})}));p.displayName=e.ScrollDownButton.displayName;var y=l.forwardRef(({className:r,children:o,position:i="popper",...c},d)=>t(e.Portal,{children:n(e.Content,{ref:d,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:i,...c,children:[t(s,{}),t(e.Viewport,{className:a("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),t(p,{})]})}));y.displayName=e.Content.displayName;var R=l.forwardRef(({className:r,...o},i)=>t(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",r),...o}));R.displayName=e.Label.displayName;var h=l.forwardRef(({className:r,children:o,...i},c)=>n(e.Item,{ref:c,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...i,children:[t("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:t(e.ItemIndicator,{children:t(S,{className:"h-4 w-4"})})}),t(e.ItemText,{children:o})]}));h.displayName=e.Item.displayName;var g=l.forwardRef(({className:r,...o},i)=>t(e.Separator,{ref:i,className:a("-mx-1 my-1 h-px bg-muted",r),...o}));g.displayName=e.Separator.displayName;export{D as Select,y as SelectContent,L as SelectGroup,h as SelectItem,R as SelectLabel,p as SelectScrollDownButton,s as SelectScrollUpButton,g as SelectSeparator,v as SelectTrigger,V as SelectValue};
2
2
  //# sourceMappingURL=select.js.map