@camped-ui/command 3.0.0 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +40 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -2,45 +2,77 @@ import * as React from "react";
|
|
2
2
|
import { type DialogProps } from "@radix-ui/react-dialog";
|
3
3
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
4
4
|
children?: React.ReactNode;
|
5
|
-
} & React.HTMLAttributes<HTMLDivElement
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
7
|
+
} & {
|
8
|
+
asChild?: boolean;
|
9
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
6
10
|
label?: string;
|
7
11
|
shouldFilter?: boolean;
|
8
|
-
filter?: (value: string, search: string) => number;
|
12
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
9
13
|
defaultValue?: string;
|
10
14
|
value?: string;
|
11
15
|
onValueChange?: (value: string) => void;
|
12
16
|
loop?: boolean;
|
17
|
+
disablePointerSelection?: boolean;
|
13
18
|
vimBindings?: boolean;
|
14
19
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
15
20
|
interface CommandDialogProps extends DialogProps {
|
16
21
|
}
|
17
22
|
declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => import("react/jsx-runtime").JSX.Element;
|
18
|
-
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
23
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
24
|
+
ref?: React.Ref<HTMLInputElement>;
|
25
|
+
} & {
|
26
|
+
asChild?: boolean;
|
27
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & {
|
19
28
|
value?: string;
|
20
29
|
onValueChange?: (search: string) => void;
|
21
30
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
22
31
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
23
32
|
children?: React.ReactNode;
|
24
|
-
} & React.
|
33
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
34
|
+
ref?: React.Ref<HTMLDivElement>;
|
35
|
+
} & {
|
36
|
+
asChild?: boolean;
|
37
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
38
|
+
label?: string;
|
39
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
25
40
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
26
41
|
children?: React.ReactNode;
|
27
|
-
} & React.
|
42
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
43
|
+
ref?: React.Ref<HTMLDivElement>;
|
44
|
+
} & {
|
45
|
+
asChild?: boolean;
|
46
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
28
47
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
29
48
|
children?: React.ReactNode;
|
30
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "
|
49
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
50
|
+
ref?: React.Ref<HTMLDivElement>;
|
51
|
+
} & {
|
52
|
+
asChild?: boolean;
|
53
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
|
31
54
|
heading?: React.ReactNode;
|
32
55
|
value?: string;
|
33
56
|
forceMount?: boolean;
|
34
57
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
35
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement
|
58
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
59
|
+
ref?: React.Ref<HTMLDivElement>;
|
60
|
+
} & {
|
61
|
+
asChild?: boolean;
|
62
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
36
63
|
alwaysRender?: boolean;
|
37
64
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
38
65
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
39
66
|
children?: React.ReactNode;
|
40
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "
|
67
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
68
|
+
ref?: React.Ref<HTMLDivElement>;
|
69
|
+
} & {
|
70
|
+
asChild?: boolean;
|
71
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "value" | "disabled"> & {
|
41
72
|
disabled?: boolean;
|
42
73
|
onSelect?: (value: string) => void;
|
43
74
|
value?: string;
|
75
|
+
keywords?: string[];
|
44
76
|
forceMount?: boolean;
|
45
77
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
46
78
|
declare const CommandShortcut: {
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAOzD,QAAA,MAAM,OAAO
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAOzD,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;sFAYX,CAAA;AAGF,UAAU,kBAAmB,SAAQ,WAAW;CAAG;AAEnD,QAAA,MAAM,aAAa,2BAA4B,kBAAkB,4CAUhE,CAAA;AAED,QAAA,MAAM,YAAY;;;;;;;0FAehB,CAAA;AAIF,QAAA,MAAM,WAAW;;;;;;;;sFASf,CAAA;AAIF,QAAA,MAAM,YAAY;;;;;;uJAShB,CAAA;AAIF,QAAA,MAAM,YAAY;;;;;;;;;;sFAYhB,CAAA;AAIF,QAAA,MAAM,gBAAgB;;;;;;sFASpB,CAAA;AAGF,QAAA,MAAM,WAAW;;;;;;;;;;;;sFAYf,CAAA;AAIF,QAAA,MAAM,eAAe;8BAGlB,MAAM,cAAc,CAAC,eAAe,CAAC;;CAUvC,CAAA;AAGD,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,CAAA"}
|
package/dist/index.js
CHANGED
@@ -38,7 +38,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.CommandSeparator = exports.CommandShortcut = exports.CommandItem = exports.CommandGroup = exports.CommandEmpty = exports.CommandList = exports.CommandInput = exports.CommandDialog = exports.Command = void 0;
|
39
39
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
40
40
|
const React = __importStar(require("react"));
|
41
|
-
const
|
41
|
+
const lucide_react_1 = require("lucide-react");
|
42
42
|
const cmdk_1 = require("cmdk");
|
43
43
|
const dialog_1 = require("@camped-ui/dialog");
|
44
44
|
const lib_1 = require("@camped-ui/lib");
|
@@ -55,7 +55,7 @@ const CommandDialog = (_a) => {
|
|
55
55
|
exports.CommandDialog = CommandDialog;
|
56
56
|
const CommandInput = React.forwardRef((_a, ref) => {
|
57
57
|
var { className } = _a, props = __rest(_a, ["className"]);
|
58
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [(0, jsx_runtime_1.jsx)(
|
58
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), (0, jsx_runtime_1.jsx)(cmdk_1.Command.Input, Object.assign({ ref: ref, className: (0, lib_1.cn)("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", className) }, props))] }));
|
59
59
|
});
|
60
60
|
exports.CommandInput = CommandInput;
|
61
61
|
CommandInput.displayName = cmdk_1.Command.Input.displayName;
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,6CAA8B;AAE9B
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index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dist/index.js",
|
5
5
|
"scripts": {
|
6
6
|
"publish-package": "npm publish --access public",
|
@@ -9,7 +9,7 @@
|
|
9
9
|
},
|
10
10
|
"dependencies": {
|
11
11
|
"@radix-ui/react-dialog": "^1.0.2",
|
12
|
-
"cmdk": "
|
12
|
+
"cmdk": "1.0.0",
|
13
13
|
"@camped-ui/dialog": "2.0.2"
|
14
14
|
},
|
15
15
|
"peerDependencies": {
|