@camped-ui/command 0.0.5 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/index.tsx +27 -27
package/package.json
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "@camped-ui/command",
|
3
|
-
"version": "
|
3
|
+
"version": "1.0.3",
|
4
4
|
"main": "src/index.tsx",
|
5
5
|
"scripts": {
|
6
6
|
"publish-package": "npm publish --access public",
|
7
7
|
"build": "rimraf dist && tsc"
|
8
8
|
},
|
9
9
|
"dependencies": {
|
10
|
-
"@camped-ui/lib": "
|
10
|
+
"@camped-ui/lib": "1.0.3",
|
11
11
|
"@radix-ui/react-dialog": "^1.0.2",
|
12
12
|
"cmdk": "^0.2.0",
|
13
13
|
"lucide-react": "0.105.0-alpha.4",
|
14
|
-
"@camped-ui/dialog": "
|
14
|
+
"@camped-ui/dialog": "1.0.3"
|
15
15
|
},
|
16
16
|
"publishConfig": {
|
17
17
|
"registry": "https://registry.npmjs.org/",
|
package/src/index.tsx
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
"use client"
|
1
|
+
"use client";
|
2
2
|
|
3
|
-
import * as React from "react"
|
4
|
-
import { type DialogProps } from "@radix-ui/react-dialog"
|
5
|
-
import { Command as CommandPrimitive } from "cmdk"
|
6
|
-
import { Search } from "lucide-react"
|
3
|
+
import * as React from "react";
|
4
|
+
import { type DialogProps } from "@radix-ui/react-dialog";
|
5
|
+
import { Command as CommandPrimitive } from "cmdk";
|
6
|
+
import { Search } from "lucide-react";
|
7
7
|
|
8
|
-
import { cn } from "
|
9
|
-
import { Dialog, DialogContent } from "@camped-ui/dialog"
|
8
|
+
import { cn } from "../../lib";
|
9
|
+
import { Dialog, DialogContent } from "@camped-ui/dialog";
|
10
10
|
|
11
11
|
const Command = React.forwardRef<
|
12
12
|
React.ElementRef<typeof CommandPrimitive>,
|
@@ -20,8 +20,8 @@ const Command = React.forwardRef<
|
|
20
20
|
)}
|
21
21
|
{...props}
|
22
22
|
/>
|
23
|
-
))
|
24
|
-
Command.displayName = CommandPrimitive.displayName
|
23
|
+
));
|
24
|
+
Command.displayName = CommandPrimitive.displayName;
|
25
25
|
|
26
26
|
interface CommandDialogProps extends DialogProps {}
|
27
27
|
|
@@ -34,8 +34,8 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
|
|
34
34
|
</Command>
|
35
35
|
</DialogContent>
|
36
36
|
</Dialog>
|
37
|
-
)
|
38
|
-
}
|
37
|
+
);
|
38
|
+
};
|
39
39
|
|
40
40
|
const CommandInput = React.forwardRef<
|
41
41
|
React.ElementRef<typeof CommandPrimitive.Input>,
|
@@ -52,9 +52,9 @@ const CommandInput = React.forwardRef<
|
|
52
52
|
{...props}
|
53
53
|
/>
|
54
54
|
</div>
|
55
|
-
))
|
55
|
+
));
|
56
56
|
|
57
|
-
CommandInput.displayName = CommandPrimitive.Input.displayName
|
57
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
58
58
|
|
59
59
|
const CommandList = React.forwardRef<
|
60
60
|
React.ElementRef<typeof CommandPrimitive.List>,
|
@@ -65,9 +65,9 @@ const CommandList = React.forwardRef<
|
|
65
65
|
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
|
66
66
|
{...props}
|
67
67
|
/>
|
68
|
-
))
|
68
|
+
));
|
69
69
|
|
70
|
-
CommandList.displayName = CommandPrimitive.List.displayName
|
70
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
71
71
|
|
72
72
|
const CommandEmpty = React.forwardRef<
|
73
73
|
React.ElementRef<typeof CommandPrimitive.Empty>,
|
@@ -78,9 +78,9 @@ const CommandEmpty = React.forwardRef<
|
|
78
78
|
className="py-6 text-center text-sm"
|
79
79
|
{...props}
|
80
80
|
/>
|
81
|
-
))
|
81
|
+
));
|
82
82
|
|
83
|
-
CommandEmpty.displayName = CommandPrimitive.Empty.displayName
|
83
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
84
84
|
|
85
85
|
const CommandGroup = React.forwardRef<
|
86
86
|
React.ElementRef<typeof CommandPrimitive.Group>,
|
@@ -94,9 +94,9 @@ const CommandGroup = React.forwardRef<
|
|
94
94
|
)}
|
95
95
|
{...props}
|
96
96
|
/>
|
97
|
-
))
|
97
|
+
));
|
98
98
|
|
99
|
-
CommandGroup.displayName = CommandPrimitive.Group.displayName
|
99
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
100
100
|
|
101
101
|
const CommandSeparator = React.forwardRef<
|
102
102
|
React.ElementRef<typeof CommandPrimitive.Separator>,
|
@@ -107,8 +107,8 @@ const CommandSeparator = React.forwardRef<
|
|
107
107
|
className={cn("-mx-1 h-px bg-border", className)}
|
108
108
|
{...props}
|
109
109
|
/>
|
110
|
-
))
|
111
|
-
CommandSeparator.displayName = CommandPrimitive.Separator.displayName
|
110
|
+
));
|
111
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
112
112
|
|
113
113
|
const CommandItem = React.forwardRef<
|
114
114
|
React.ElementRef<typeof CommandPrimitive.Item>,
|
@@ -122,9 +122,9 @@ const CommandItem = React.forwardRef<
|
|
122
122
|
)}
|
123
123
|
{...props}
|
124
124
|
/>
|
125
|
-
))
|
125
|
+
));
|
126
126
|
|
127
|
-
CommandItem.displayName = CommandPrimitive.Item.displayName
|
127
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
128
128
|
|
129
129
|
const CommandShortcut = ({
|
130
130
|
className,
|
@@ -138,9 +138,9 @@ const CommandShortcut = ({
|
|
138
138
|
)}
|
139
139
|
{...props}
|
140
140
|
/>
|
141
|
-
)
|
142
|
-
}
|
143
|
-
CommandShortcut.displayName = "CommandShortcut"
|
141
|
+
);
|
142
|
+
};
|
143
|
+
CommandShortcut.displayName = "CommandShortcut";
|
144
144
|
|
145
145
|
export {
|
146
146
|
Command,
|
@@ -152,4 +152,4 @@ export {
|
|
152
152
|
CommandItem,
|
153
153
|
CommandShortcut,
|
154
154
|
CommandSeparator,
|
155
|
-
}
|
155
|
+
};
|