@kopexa/command 0.0.0-canary-20250719104813

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/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @kopexa/command
2
+
3
+ A Quick description of the component
4
+
5
+ > This is an internal utility, not intended for public usage.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ yarn add @kopexa/command
11
+ # or
12
+ npm i @kopexa/command
13
+ ```
14
+
15
+ ## Contribution
16
+
17
+ Yes please! See the
18
+ [contributing guidelines](https://github.com/kopexa-grc/sight/blob/master/CONTRIBUTING.md)
19
+ for details.
20
+
21
+ ## License
22
+
23
+ This project is licensed under the terms of the
24
+ [MIT license](https://github.com/kopexa-grc/sight/blob/master/LICENSE).
@@ -0,0 +1,123 @@
1
+ "use client";
2
+ var __defProp = Object.defineProperty;
3
+ var __export = (target, all) => {
4
+ for (var name in all)
5
+ __defProp(target, name, { get: all[name], enumerable: true });
6
+ };
7
+
8
+ // src/command.tsx
9
+ import { SearchIcon } from "@kopexa/icons";
10
+ import { command } from "@kopexa/theme";
11
+ import { Command as CommandPrimitive } from "cmdk";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ function CommandRoot(props) {
14
+ const { className, ...restProps } = props;
15
+ const styles = command();
16
+ return /* @__PURE__ */ jsx(
17
+ CommandPrimitive,
18
+ {
19
+ "data-slot": "command",
20
+ className: styles.root({ className }),
21
+ ...restProps
22
+ }
23
+ );
24
+ }
25
+ function CommandInput(props) {
26
+ const { className, ...restProps } = props;
27
+ const styles = command();
28
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "command-input-wrapper", className: styles.inputWrapper(), children: [
29
+ /* @__PURE__ */ jsx(SearchIcon, { className: styles.inputIcon() }),
30
+ /* @__PURE__ */ jsx(
31
+ CommandPrimitive.Input,
32
+ {
33
+ "data-slot": "command-input",
34
+ className: styles.input({ className }),
35
+ ...restProps
36
+ }
37
+ )
38
+ ] });
39
+ }
40
+ function CommandList(props) {
41
+ const { className, ...restProps } = props;
42
+ const styles = command();
43
+ return /* @__PURE__ */ jsx(
44
+ CommandPrimitive.List,
45
+ {
46
+ "data-slot": "command-list",
47
+ className: styles.list({ className }),
48
+ ...restProps
49
+ }
50
+ );
51
+ }
52
+ function CommandEmpty(props) {
53
+ const { className, ...restProps } = props;
54
+ const styles = command();
55
+ return /* @__PURE__ */ jsx(
56
+ CommandPrimitive.Empty,
57
+ {
58
+ "data-slot": "command-empty",
59
+ className: styles.empty({ className }),
60
+ ...restProps
61
+ }
62
+ );
63
+ }
64
+ function CommandGroup(props) {
65
+ const { className, ...restProps } = props;
66
+ const styles = command();
67
+ return /* @__PURE__ */ jsx(
68
+ CommandPrimitive.Group,
69
+ {
70
+ "data-slot": "command-group",
71
+ className: styles.group({ className }),
72
+ ...restProps
73
+ }
74
+ );
75
+ }
76
+ function CommandSeparator(props) {
77
+ const { className, ...restProps } = props;
78
+ const styles = command();
79
+ return /* @__PURE__ */ jsx(
80
+ CommandPrimitive.Separator,
81
+ {
82
+ "data-slot": "command-separator",
83
+ className: styles.separator({ className }),
84
+ ...restProps
85
+ }
86
+ );
87
+ }
88
+ function CommandItem(props) {
89
+ const { className, ...restProps } = props;
90
+ const styles = command();
91
+ return /* @__PURE__ */ jsx(
92
+ CommandPrimitive.Item,
93
+ {
94
+ "data-slot": "command-item",
95
+ className: styles.item({ className }),
96
+ ...restProps
97
+ }
98
+ );
99
+ }
100
+ function CommandShortcut(props) {
101
+ const { className, ...restProps } = props;
102
+ const styles = command();
103
+ return /* @__PURE__ */ jsx(
104
+ "span",
105
+ {
106
+ "data-slot": "command-shortcut",
107
+ className: styles.shortcut({ className }),
108
+ ...restProps
109
+ }
110
+ );
111
+ }
112
+
113
+ export {
114
+ __export,
115
+ CommandRoot,
116
+ CommandInput,
117
+ CommandList,
118
+ CommandEmpty,
119
+ CommandGroup,
120
+ CommandSeparator,
121
+ CommandItem,
122
+ CommandShortcut
123
+ };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import {
3
+ CommandEmpty,
4
+ CommandGroup,
5
+ CommandInput,
6
+ CommandItem,
7
+ CommandList,
8
+ CommandRoot,
9
+ CommandSeparator,
10
+ CommandShortcut,
11
+ __export
12
+ } from "./chunk-7JHTPQ5B.mjs";
13
+
14
+ // src/namespace.ts
15
+ var namespace_exports = {};
16
+ __export(namespace_exports, {
17
+ Empty: () => CommandEmpty,
18
+ Group: () => CommandGroup,
19
+ Input: () => CommandInput,
20
+ Item: () => CommandItem,
21
+ List: () => CommandList,
22
+ Root: () => CommandRoot,
23
+ Separator: () => CommandSeparator,
24
+ Shortcut: () => CommandShortcut
25
+ });
26
+
27
+ export {
28
+ namespace_exports
29
+ };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Command } from 'cmdk';
3
+ import { ComponentProps } from 'react';
4
+
5
+ type CommandRootProps = ComponentProps<typeof Command>;
6
+ declare function CommandRoot(props: CommandRootProps): react_jsx_runtime.JSX.Element;
7
+ type CommandInputProps = ComponentProps<typeof Command.Input>;
8
+ declare function CommandInput(props: CommandInputProps): react_jsx_runtime.JSX.Element;
9
+ type CommandListProps = ComponentProps<typeof Command.List>;
10
+ declare function CommandList(props: CommandListProps): react_jsx_runtime.JSX.Element;
11
+ type CommandEmptyProps = ComponentProps<typeof Command.Empty>;
12
+ declare function CommandEmpty(props: CommandEmptyProps): react_jsx_runtime.JSX.Element;
13
+ type CommandGroupProps = ComponentProps<typeof Command.Group>;
14
+ declare function CommandGroup(props: CommandGroupProps): react_jsx_runtime.JSX.Element;
15
+ type CommandSeparatorProps = ComponentProps<typeof Command.Separator>;
16
+ declare function CommandSeparator(props: CommandSeparatorProps): react_jsx_runtime.JSX.Element;
17
+ type CommandItemProps = ComponentProps<typeof Command.Item>;
18
+ declare function CommandItem(props: CommandItemProps): react_jsx_runtime.JSX.Element;
19
+ type CommandShortcutProps = ComponentProps<"span">;
20
+ declare function CommandShortcut(props: CommandShortcutProps): react_jsx_runtime.JSX.Element;
21
+
22
+ export { CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandRoot, type CommandRootProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Command } from 'cmdk';
3
+ import { ComponentProps } from 'react';
4
+
5
+ type CommandRootProps = ComponentProps<typeof Command>;
6
+ declare function CommandRoot(props: CommandRootProps): react_jsx_runtime.JSX.Element;
7
+ type CommandInputProps = ComponentProps<typeof Command.Input>;
8
+ declare function CommandInput(props: CommandInputProps): react_jsx_runtime.JSX.Element;
9
+ type CommandListProps = ComponentProps<typeof Command.List>;
10
+ declare function CommandList(props: CommandListProps): react_jsx_runtime.JSX.Element;
11
+ type CommandEmptyProps = ComponentProps<typeof Command.Empty>;
12
+ declare function CommandEmpty(props: CommandEmptyProps): react_jsx_runtime.JSX.Element;
13
+ type CommandGroupProps = ComponentProps<typeof Command.Group>;
14
+ declare function CommandGroup(props: CommandGroupProps): react_jsx_runtime.JSX.Element;
15
+ type CommandSeparatorProps = ComponentProps<typeof Command.Separator>;
16
+ declare function CommandSeparator(props: CommandSeparatorProps): react_jsx_runtime.JSX.Element;
17
+ type CommandItemProps = ComponentProps<typeof Command.Item>;
18
+ declare function CommandItem(props: CommandItemProps): react_jsx_runtime.JSX.Element;
19
+ type CommandShortcutProps = ComponentProps<"span">;
20
+ declare function CommandShortcut(props: CommandShortcutProps): react_jsx_runtime.JSX.Element;
21
+
22
+ export { CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandRoot, type CommandRootProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps };
@@ -0,0 +1,147 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/command.tsx
22
+ var command_exports = {};
23
+ __export(command_exports, {
24
+ CommandEmpty: () => CommandEmpty,
25
+ CommandGroup: () => CommandGroup,
26
+ CommandInput: () => CommandInput,
27
+ CommandItem: () => CommandItem,
28
+ CommandList: () => CommandList,
29
+ CommandRoot: () => CommandRoot,
30
+ CommandSeparator: () => CommandSeparator,
31
+ CommandShortcut: () => CommandShortcut
32
+ });
33
+ module.exports = __toCommonJS(command_exports);
34
+ var import_icons = require("@kopexa/icons");
35
+ var import_theme = require("@kopexa/theme");
36
+ var import_cmdk = require("cmdk");
37
+ var import_jsx_runtime = require("react/jsx-runtime");
38
+ function CommandRoot(props) {
39
+ const { className, ...restProps } = props;
40
+ const styles = (0, import_theme.command)();
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
+ import_cmdk.Command,
43
+ {
44
+ "data-slot": "command",
45
+ className: styles.root({ className }),
46
+ ...restProps
47
+ }
48
+ );
49
+ }
50
+ function CommandInput(props) {
51
+ const { className, ...restProps } = props;
52
+ const styles = (0, import_theme.command)();
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { "data-slot": "command-input-wrapper", className: styles.inputWrapper(), children: [
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SearchIcon, { className: styles.inputIcon() }),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
+ import_cmdk.Command.Input,
57
+ {
58
+ "data-slot": "command-input",
59
+ className: styles.input({ className }),
60
+ ...restProps
61
+ }
62
+ )
63
+ ] });
64
+ }
65
+ function CommandList(props) {
66
+ const { className, ...restProps } = props;
67
+ const styles = (0, import_theme.command)();
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ import_cmdk.Command.List,
70
+ {
71
+ "data-slot": "command-list",
72
+ className: styles.list({ className }),
73
+ ...restProps
74
+ }
75
+ );
76
+ }
77
+ function CommandEmpty(props) {
78
+ const { className, ...restProps } = props;
79
+ const styles = (0, import_theme.command)();
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ import_cmdk.Command.Empty,
82
+ {
83
+ "data-slot": "command-empty",
84
+ className: styles.empty({ className }),
85
+ ...restProps
86
+ }
87
+ );
88
+ }
89
+ function CommandGroup(props) {
90
+ const { className, ...restProps } = props;
91
+ const styles = (0, import_theme.command)();
92
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ import_cmdk.Command.Group,
94
+ {
95
+ "data-slot": "command-group",
96
+ className: styles.group({ className }),
97
+ ...restProps
98
+ }
99
+ );
100
+ }
101
+ function CommandSeparator(props) {
102
+ const { className, ...restProps } = props;
103
+ const styles = (0, import_theme.command)();
104
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
+ import_cmdk.Command.Separator,
106
+ {
107
+ "data-slot": "command-separator",
108
+ className: styles.separator({ className }),
109
+ ...restProps
110
+ }
111
+ );
112
+ }
113
+ function CommandItem(props) {
114
+ const { className, ...restProps } = props;
115
+ const styles = (0, import_theme.command)();
116
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
117
+ import_cmdk.Command.Item,
118
+ {
119
+ "data-slot": "command-item",
120
+ className: styles.item({ className }),
121
+ ...restProps
122
+ }
123
+ );
124
+ }
125
+ function CommandShortcut(props) {
126
+ const { className, ...restProps } = props;
127
+ const styles = (0, import_theme.command)();
128
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
129
+ "span",
130
+ {
131
+ "data-slot": "command-shortcut",
132
+ className: styles.shortcut({ className }),
133
+ ...restProps
134
+ }
135
+ );
136
+ }
137
+ // Annotate the CommonJS export names for ESM import in node:
138
+ 0 && (module.exports = {
139
+ CommandEmpty,
140
+ CommandGroup,
141
+ CommandInput,
142
+ CommandItem,
143
+ CommandList,
144
+ CommandRoot,
145
+ CommandSeparator,
146
+ CommandShortcut
147
+ });
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import {
3
+ CommandEmpty,
4
+ CommandGroup,
5
+ CommandInput,
6
+ CommandItem,
7
+ CommandList,
8
+ CommandRoot,
9
+ CommandSeparator,
10
+ CommandShortcut
11
+ } from "./chunk-7JHTPQ5B.mjs";
12
+ export {
13
+ CommandEmpty,
14
+ CommandGroup,
15
+ CommandInput,
16
+ CommandItem,
17
+ CommandList,
18
+ CommandRoot,
19
+ CommandSeparator,
20
+ CommandShortcut
21
+ };
@@ -0,0 +1,5 @@
1
+ export { n as Command } from './namespace.mjs';
2
+ import './command.mjs';
3
+ import 'react/jsx-runtime';
4
+ import 'cmdk';
5
+ import 'react';
@@ -0,0 +1,5 @@
1
+ export { n as Command } from './namespace.js';
2
+ import './command.js';
3
+ import 'react/jsx-runtime';
4
+ import 'cmdk';
5
+ import 'react';
package/dist/index.js ADDED
@@ -0,0 +1,148 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ Command: () => namespace_exports
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/namespace.ts
29
+ var namespace_exports = {};
30
+ __export(namespace_exports, {
31
+ Empty: () => CommandEmpty,
32
+ Group: () => CommandGroup,
33
+ Input: () => CommandInput,
34
+ Item: () => CommandItem,
35
+ List: () => CommandList,
36
+ Root: () => CommandRoot,
37
+ Separator: () => CommandSeparator,
38
+ Shortcut: () => CommandShortcut
39
+ });
40
+
41
+ // src/command.tsx
42
+ var import_icons = require("@kopexa/icons");
43
+ var import_theme = require("@kopexa/theme");
44
+ var import_cmdk = require("cmdk");
45
+ var import_jsx_runtime = require("react/jsx-runtime");
46
+ function CommandRoot(props) {
47
+ const { className, ...restProps } = props;
48
+ const styles = (0, import_theme.command)();
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
+ import_cmdk.Command,
51
+ {
52
+ "data-slot": "command",
53
+ className: styles.root({ className }),
54
+ ...restProps
55
+ }
56
+ );
57
+ }
58
+ function CommandInput(props) {
59
+ const { className, ...restProps } = props;
60
+ const styles = (0, import_theme.command)();
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { "data-slot": "command-input-wrapper", className: styles.inputWrapper(), children: [
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SearchIcon, { className: styles.inputIcon() }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
+ import_cmdk.Command.Input,
65
+ {
66
+ "data-slot": "command-input",
67
+ className: styles.input({ className }),
68
+ ...restProps
69
+ }
70
+ )
71
+ ] });
72
+ }
73
+ function CommandList(props) {
74
+ const { className, ...restProps } = props;
75
+ const styles = (0, import_theme.command)();
76
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
+ import_cmdk.Command.List,
78
+ {
79
+ "data-slot": "command-list",
80
+ className: styles.list({ className }),
81
+ ...restProps
82
+ }
83
+ );
84
+ }
85
+ function CommandEmpty(props) {
86
+ const { className, ...restProps } = props;
87
+ const styles = (0, import_theme.command)();
88
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
+ import_cmdk.Command.Empty,
90
+ {
91
+ "data-slot": "command-empty",
92
+ className: styles.empty({ className }),
93
+ ...restProps
94
+ }
95
+ );
96
+ }
97
+ function CommandGroup(props) {
98
+ const { className, ...restProps } = props;
99
+ const styles = (0, import_theme.command)();
100
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
101
+ import_cmdk.Command.Group,
102
+ {
103
+ "data-slot": "command-group",
104
+ className: styles.group({ className }),
105
+ ...restProps
106
+ }
107
+ );
108
+ }
109
+ function CommandSeparator(props) {
110
+ const { className, ...restProps } = props;
111
+ const styles = (0, import_theme.command)();
112
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
113
+ import_cmdk.Command.Separator,
114
+ {
115
+ "data-slot": "command-separator",
116
+ className: styles.separator({ className }),
117
+ ...restProps
118
+ }
119
+ );
120
+ }
121
+ function CommandItem(props) {
122
+ const { className, ...restProps } = props;
123
+ const styles = (0, import_theme.command)();
124
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
+ import_cmdk.Command.Item,
126
+ {
127
+ "data-slot": "command-item",
128
+ className: styles.item({ className }),
129
+ ...restProps
130
+ }
131
+ );
132
+ }
133
+ function CommandShortcut(props) {
134
+ const { className, ...restProps } = props;
135
+ const styles = (0, import_theme.command)();
136
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
137
+ "span",
138
+ {
139
+ "data-slot": "command-shortcut",
140
+ className: styles.shortcut({ className }),
141
+ ...restProps
142
+ }
143
+ );
144
+ }
145
+ // Annotate the CommonJS export names for ESM import in node:
146
+ 0 && (module.exports = {
147
+ Command
148
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import {
3
+ namespace_exports
4
+ } from "./chunk-JGIYTKFT.mjs";
5
+ import "./chunk-7JHTPQ5B.mjs";
6
+ export {
7
+ namespace_exports as Command
8
+ };
@@ -0,0 +1,10 @@
1
+ import { CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandListProps, CommandRoot, CommandRootProps, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps } from './command.mjs';
2
+ import 'react/jsx-runtime';
3
+ import 'cmdk';
4
+ import 'react';
5
+
6
+ declare namespace namespace {
7
+ export { CommandEmpty as Empty, CommandEmptyProps as EmptyProps, CommandGroup as Group, CommandGroupProps as GroupProps, CommandInput as Input, CommandInputProps as InputProps, CommandItem as Item, CommandItemProps as ItemProps, CommandList as List, CommandListProps as ListProps, CommandRoot as Root, CommandRootProps as RootProps, CommandSeparator as Separator, CommandSeparatorProps as SeparatorProps, CommandShortcut as Shortcut, CommandShortcutProps as ShortcutProps };
8
+ }
9
+
10
+ export { CommandEmpty as Empty, CommandEmptyProps as EmptyProps, CommandGroup as Group, CommandGroupProps as GroupProps, CommandInput as Input, CommandInputProps as InputProps, CommandItem as Item, CommandItemProps as ItemProps, CommandList as List, CommandListProps as ListProps, CommandRoot as Root, CommandRootProps as RootProps, CommandSeparator as Separator, CommandSeparatorProps as SeparatorProps, CommandShortcut as Shortcut, CommandShortcutProps as ShortcutProps, namespace as n };
@@ -0,0 +1,10 @@
1
+ import { CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandListProps, CommandRoot, CommandRootProps, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps } from './command.js';
2
+ import 'react/jsx-runtime';
3
+ import 'cmdk';
4
+ import 'react';
5
+
6
+ declare namespace namespace {
7
+ export { CommandEmpty as Empty, CommandEmptyProps as EmptyProps, CommandGroup as Group, CommandGroupProps as GroupProps, CommandInput as Input, CommandInputProps as InputProps, CommandItem as Item, CommandItemProps as ItemProps, CommandList as List, CommandListProps as ListProps, CommandRoot as Root, CommandRootProps as RootProps, CommandSeparator as Separator, CommandSeparatorProps as SeparatorProps, CommandShortcut as Shortcut, CommandShortcutProps as ShortcutProps };
8
+ }
9
+
10
+ export { CommandEmpty as Empty, CommandEmptyProps as EmptyProps, CommandGroup as Group, CommandGroupProps as GroupProps, CommandInput as Input, CommandInputProps as InputProps, CommandItem as Item, CommandItemProps as ItemProps, CommandList as List, CommandListProps as ListProps, CommandRoot as Root, CommandRootProps as RootProps, CommandSeparator as Separator, CommandSeparatorProps as SeparatorProps, CommandShortcut as Shortcut, CommandShortcutProps as ShortcutProps, namespace as n };
@@ -0,0 +1,149 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/namespace.ts
22
+ var namespace_exports = {};
23
+ __export(namespace_exports, {
24
+ Empty: () => CommandEmpty,
25
+ Group: () => CommandGroup,
26
+ Input: () => CommandInput,
27
+ Item: () => CommandItem,
28
+ List: () => CommandList,
29
+ Root: () => CommandRoot,
30
+ Separator: () => CommandSeparator,
31
+ Shortcut: () => CommandShortcut
32
+ });
33
+ module.exports = __toCommonJS(namespace_exports);
34
+
35
+ // src/command.tsx
36
+ var import_icons = require("@kopexa/icons");
37
+ var import_theme = require("@kopexa/theme");
38
+ var import_cmdk = require("cmdk");
39
+ var import_jsx_runtime = require("react/jsx-runtime");
40
+ function CommandRoot(props) {
41
+ const { className, ...restProps } = props;
42
+ const styles = (0, import_theme.command)();
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ import_cmdk.Command,
45
+ {
46
+ "data-slot": "command",
47
+ className: styles.root({ className }),
48
+ ...restProps
49
+ }
50
+ );
51
+ }
52
+ function CommandInput(props) {
53
+ const { className, ...restProps } = props;
54
+ const styles = (0, import_theme.command)();
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { "data-slot": "command-input-wrapper", className: styles.inputWrapper(), children: [
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SearchIcon, { className: styles.inputIcon() }),
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
58
+ import_cmdk.Command.Input,
59
+ {
60
+ "data-slot": "command-input",
61
+ className: styles.input({ className }),
62
+ ...restProps
63
+ }
64
+ )
65
+ ] });
66
+ }
67
+ function CommandList(props) {
68
+ const { className, ...restProps } = props;
69
+ const styles = (0, import_theme.command)();
70
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ import_cmdk.Command.List,
72
+ {
73
+ "data-slot": "command-list",
74
+ className: styles.list({ className }),
75
+ ...restProps
76
+ }
77
+ );
78
+ }
79
+ function CommandEmpty(props) {
80
+ const { className, ...restProps } = props;
81
+ const styles = (0, import_theme.command)();
82
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
83
+ import_cmdk.Command.Empty,
84
+ {
85
+ "data-slot": "command-empty",
86
+ className: styles.empty({ className }),
87
+ ...restProps
88
+ }
89
+ );
90
+ }
91
+ function CommandGroup(props) {
92
+ const { className, ...restProps } = props;
93
+ const styles = (0, import_theme.command)();
94
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
95
+ import_cmdk.Command.Group,
96
+ {
97
+ "data-slot": "command-group",
98
+ className: styles.group({ className }),
99
+ ...restProps
100
+ }
101
+ );
102
+ }
103
+ function CommandSeparator(props) {
104
+ const { className, ...restProps } = props;
105
+ const styles = (0, import_theme.command)();
106
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
107
+ import_cmdk.Command.Separator,
108
+ {
109
+ "data-slot": "command-separator",
110
+ className: styles.separator({ className }),
111
+ ...restProps
112
+ }
113
+ );
114
+ }
115
+ function CommandItem(props) {
116
+ const { className, ...restProps } = props;
117
+ const styles = (0, import_theme.command)();
118
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
119
+ import_cmdk.Command.Item,
120
+ {
121
+ "data-slot": "command-item",
122
+ className: styles.item({ className }),
123
+ ...restProps
124
+ }
125
+ );
126
+ }
127
+ function CommandShortcut(props) {
128
+ const { className, ...restProps } = props;
129
+ const styles = (0, import_theme.command)();
130
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
131
+ "span",
132
+ {
133
+ "data-slot": "command-shortcut",
134
+ className: styles.shortcut({ className }),
135
+ ...restProps
136
+ }
137
+ );
138
+ }
139
+ // Annotate the CommonJS export names for ESM import in node:
140
+ 0 && (module.exports = {
141
+ Empty,
142
+ Group,
143
+ Input,
144
+ Item,
145
+ List,
146
+ Root,
147
+ Separator,
148
+ Shortcut
149
+ });
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import "./chunk-JGIYTKFT.mjs";
3
+ import {
4
+ CommandEmpty,
5
+ CommandGroup,
6
+ CommandInput,
7
+ CommandItem,
8
+ CommandList,
9
+ CommandRoot,
10
+ CommandSeparator,
11
+ CommandShortcut
12
+ } from "./chunk-7JHTPQ5B.mjs";
13
+ export {
14
+ CommandEmpty as Empty,
15
+ CommandGroup as Group,
16
+ CommandInput as Input,
17
+ CommandItem as Item,
18
+ CommandList as List,
19
+ CommandRoot as Root,
20
+ CommandSeparator as Separator,
21
+ CommandShortcut as Shortcut
22
+ };
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@kopexa/command",
3
+ "version": "0.0.0-canary-20250719104813",
4
+ "description": "Fast, composable command menu",
5
+ "keywords": [
6
+ "command"
7
+ ],
8
+ "author": "Kopexa <hello@kopexa.com>",
9
+ "homepage": "https://kopexa.com",
10
+ "license": "MIT",
11
+ "main": "dist/index.js",
12
+ "sideEffects": false,
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/kopexa-grc/sight.git",
22
+ "directory": "packages/components/command"
23
+ },
24
+ "bugs": {
25
+ "url": "https://github.com/kopexa-grc/sight/issues"
26
+ },
27
+ "peerDependencies": {
28
+ "motion": ">=12.23.6",
29
+ "react": ">=19.0.0-rc.0",
30
+ "react-dom": ">=19.0.0-rc.0",
31
+ "@kopexa/theme": "1.1.0"
32
+ },
33
+ "dependencies": {
34
+ "cmdk": "^1.1.1",
35
+ "@kopexa/react-utils": "2.0.0",
36
+ "@kopexa/shared-utils": "1.1.0",
37
+ "@kopexa/icons": "4.0.2"
38
+ },
39
+ "clean-package": "../../../clean-package.config.json",
40
+ "module": "dist/index.mjs",
41
+ "types": "dist/index.d.ts",
42
+ "exports": {
43
+ ".": {
44
+ "types": "./dist/index.d.ts",
45
+ "import": "./dist/index.mjs",
46
+ "require": "./dist/index.js"
47
+ },
48
+ "./package.json": "./package.json"
49
+ },
50
+ "scripts": {
51
+ "build": "tsup src --dts",
52
+ "build:fast": "tsup src",
53
+ "dev": "pnpm build:fast --watch",
54
+ "clean": "rimraf dist .turbo",
55
+ "typecheck": "tsc --noEmit"
56
+ }
57
+ }