@camped-ui/command 2.1.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import { type DialogProps } from "@radix-ui/react-dialog";
|
2
|
-
import { Command as CommandPrimitive } from "cmdk";
|
3
1
|
import * as React from "react";
|
2
|
+
import { type DialogProps } from "@radix-ui/react-dialog";
|
4
3
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
5
4
|
children?: React.ReactNode;
|
6
5
|
} & React.HTMLAttributes<HTMLDivElement> & {
|
@@ -48,5 +47,5 @@ declare const CommandShortcut: {
|
|
48
47
|
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
49
48
|
displayName: string;
|
50
49
|
};
|
51
|
-
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator,
|
50
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
52
51
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
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;;6HASf,CAAA;AAIF,QAAA,MAAM,YAAY;;6HAShB,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
@@ -37,11 +37,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
37
37
|
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
|
+
const React = __importStar(require("react"));
|
41
|
+
const react_icons_1 = require("@radix-ui/react-icons");
|
42
|
+
const cmdk_1 = require("cmdk");
|
40
43
|
const dialog_1 = require("@camped-ui/dialog");
|
41
44
|
const lib_1 = require("@camped-ui/lib");
|
42
|
-
const cmdk_1 = require("cmdk");
|
43
|
-
const lucide_react_1 = require("lucide-react");
|
44
|
-
const React = __importStar(require("react"));
|
45
45
|
const Command = React.forwardRef((_a, ref) => {
|
46
46
|
var { className } = _a, props = __rest(_a, ["className"]);
|
47
47
|
return ((0, jsx_runtime_1.jsx)(cmdk_1.Command, Object.assign({ ref: ref, className: (0, lib_1.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className) }, props)));
|
@@ -50,12 +50,12 @@ exports.Command = Command;
|
|
50
50
|
Command.displayName = cmdk_1.Command.displayName;
|
51
51
|
const CommandDialog = (_a) => {
|
52
52
|
var { children } = _a, props = __rest(_a, ["children"]);
|
53
|
-
return ((0, jsx_runtime_1.jsx)(dialog_1.Dialog, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)(dialog_1.DialogContent, { className: "overflow-hidden p-0
|
53
|
+
return ((0, jsx_runtime_1.jsx)(dialog_1.Dialog, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)(dialog_1.DialogContent, { className: "overflow-hidden p-0", children: (0, jsx_runtime_1.jsx)(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", children: children }) }) })));
|
54
54
|
};
|
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)(react_icons_1.MagnifyingGlassIcon, { 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;
|
@@ -82,7 +82,7 @@ exports.CommandSeparator = CommandSeparator;
|
|
82
82
|
CommandSeparator.displayName = cmdk_1.Command.Separator.displayName;
|
83
83
|
const CommandItem = React.forwardRef((_a, ref) => {
|
84
84
|
var { className } = _a, props = __rest(_a, ["className"]);
|
85
|
-
return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Item, Object.assign({ ref: ref, className: (0, lib_1.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none
|
85
|
+
return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Item, Object.assign({ ref: ref, className: (0, lib_1.cn)("relative flex cursor-default 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", className) }, props)));
|
86
86
|
});
|
87
87
|
exports.CommandItem = CommandItem;
|
88
88
|
CommandItem.displayName = cmdk_1.Command.Item.displayName;
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,YAAY,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,6CAA8B;AAE9B,uDAA2D;AAC3D,+BAAkD;AAElD,8CAA0D;AAC1D,wCAAoC;AAEpC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAG9B,CAAC,EAAuB,EAAE,GAAG,EAAE,EAAE;QAAhC,EAAE,SAAS,OAAY,EAAP,KAAK,cAArB,aAAuB,CAAF;IAAY,OAAA,CAClC,uBAAC,cAAgB,kBACf,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,QAAE,EACX,2FAA2F,EAC3F,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