@controlkit/command-menu
Advanced tools
+50
-27
| import { jsx, jsxs } from 'react/jsx-runtime'; | ||
| import { forwardRef } from 'react'; | ||
| import * as stylex from '@stylexjs/stylex'; | ||
| import { Command as Command$1 } from 'cmdk'; | ||
| import { forwardRef } from 'react'; | ||
| import * as DialogPrimitive from '@radix-ui/react-dialog'; | ||
@@ -225,3 +225,8 @@ | ||
| }); | ||
| const Command = forwardRef(({ className, extend, ...props }, ref) => /* @__PURE__ */ jsx( | ||
| const Command = ({ | ||
| className, | ||
| extend, | ||
| ref, | ||
| ...props | ||
| }) => /* @__PURE__ */ jsx( | ||
| Command$1, | ||
@@ -234,21 +239,16 @@ { | ||
| } | ||
| )); | ||
| ); | ||
| Command.displayName = Command$1.displayName; | ||
| const CommandDialog = ({ | ||
| children, | ||
| extend, | ||
| ...props | ||
| }) => { | ||
| const CommandDialog = ({ children, extend, ...props }) => { | ||
| return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [ | ||
| /* @__PURE__ */ jsx(DialogTitle, { extend: styles.dialog_title, children: "Command Menu Palette" }), | ||
| /* @__PURE__ */ jsx( | ||
| DialogContent, | ||
| { | ||
| ...stylex.props(styles.dialog_content), | ||
| children: /* @__PURE__ */ jsx(Command, { ...stylex.props(extend), children }) | ||
| } | ||
| ) | ||
| /* @__PURE__ */ jsx(DialogContent, { ...stylex.props(styles.dialog_content), children: /* @__PURE__ */ jsx(Command, { ...stylex.props(extend), children }) }) | ||
| ] }); | ||
| }; | ||
| const CommandInput = forwardRef(({ className, extend, ...props }, ref) => /* @__PURE__ */ jsx( | ||
| const CommandInput = ({ | ||
| className, | ||
| extend, | ||
| ref, | ||
| ...props | ||
| }) => /* @__PURE__ */ jsx( | ||
| "div", | ||
@@ -268,5 +268,10 @@ { | ||
| } | ||
| )); | ||
| ); | ||
| CommandInput.displayName = Command$1.Input.displayName; | ||
| const CommandList = forwardRef(({ className, extend, ...props }, ref) => /* @__PURE__ */ jsx( | ||
| const CommandList = ({ | ||
| className, | ||
| extend, | ||
| ref, | ||
| ...props | ||
| }) => /* @__PURE__ */ jsx( | ||
| Command$1.List, | ||
@@ -279,5 +284,8 @@ { | ||
| } | ||
| )); | ||
| ); | ||
| CommandList.displayName = Command$1.List.displayName; | ||
| const CommandEmpty = forwardRef((props, ref) => /* @__PURE__ */ jsx( | ||
| const CommandEmpty = ({ | ||
| ref, | ||
| ...props | ||
| }) => /* @__PURE__ */ jsx( | ||
| Command$1.Empty, | ||
@@ -289,5 +297,10 @@ { | ||
| } | ||
| )); | ||
| ); | ||
| CommandEmpty.displayName = Command$1.Empty.displayName; | ||
| const CommandGroup = forwardRef(({ className, extend, ...props }, ref) => /* @__PURE__ */ jsx( | ||
| const CommandGroup = ({ | ||
| className, | ||
| extend, | ||
| ref, | ||
| ...props | ||
| }) => /* @__PURE__ */ jsx( | ||
| Command$1.Group, | ||
@@ -300,5 +313,10 @@ { | ||
| } | ||
| )); | ||
| ); | ||
| CommandGroup.displayName = Command$1.Group.displayName; | ||
| const CommandSeparator = forwardRef(({ className, extend, ...props }, ref) => /* @__PURE__ */ jsx( | ||
| const CommandSeparator = ({ | ||
| className, | ||
| extend, | ||
| ref, | ||
| ...props | ||
| }) => /* @__PURE__ */ jsx( | ||
| Command$1.Separator, | ||
@@ -311,5 +329,10 @@ { | ||
| } | ||
| )); | ||
| ); | ||
| CommandSeparator.displayName = Command$1.Separator.displayName; | ||
| const CommandItem = forwardRef(({ className, extend, ...props }, ref) => /* @__PURE__ */ jsx( | ||
| const CommandItem = ({ | ||
| className, | ||
| extend, | ||
| ref, | ||
| ...props | ||
| }) => /* @__PURE__ */ jsx( | ||
| Command$1.Item, | ||
@@ -322,3 +345,3 @@ { | ||
| } | ||
| )); | ||
| ); | ||
| CommandItem.displayName = Command$1.Item.displayName; | ||
@@ -325,0 +348,0 @@ const CommandShortcut = ({ |
+30
-73
@@ -1,3 +0,4 @@ | ||
| import { HTMLAttributes } from 'react'; | ||
| import { ComponentProps, HTMLAttributes } from 'react'; | ||
| import { DialogProps } from '@radix-ui/react-dialog'; | ||
| import { Command as CommandPrimitive } from 'cmdk'; | ||
@@ -8,77 +9,33 @@ import * as stylex from "@stylexjs/stylex"; | ||
| }; | ||
| declare const Command: import('react').ForwardRefExoticComponent<Omit<{ | ||
| children?: React.ReactNode; | ||
| } & Pick<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & { | ||
| ref?: React.Ref<HTMLDivElement>; | ||
| } & { | ||
| asChild?: boolean; | ||
| }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild"> & { | ||
| label?: string; | ||
| shouldFilter?: boolean; | ||
| filter?: (value: string, search: string, keywords?: string[]) => number; | ||
| defaultValue?: string; | ||
| value?: string; | ||
| onValueChange?: (value: string) => void; | ||
| loop?: boolean; | ||
| disablePointerSelection?: boolean; | ||
| vimBindings?: boolean; | ||
| } & import('react').RefAttributes<HTMLDivElement>, "ref"> & ExtendProps & import('react').RefAttributes<HTMLDivElement>>; | ||
| declare const Command: { | ||
| ({ className, extend, ref, ...props }: ComponentProps<typeof CommandPrimitive> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string | undefined; | ||
| }; | ||
| interface CommandDialogProps extends DialogProps { | ||
| } | ||
| declare const CommandDialog: ({ children, extend, ...props }: CommandDialogProps & ExtendProps) => import("react/jsx-runtime").JSX.Element; | ||
| declare const CommandInput: import('react').ForwardRefExoticComponent<Omit<Omit<Pick<Pick<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import('react').InputHTMLAttributes<HTMLInputElement>> & { | ||
| ref?: React.Ref<HTMLInputElement>; | ||
| } & { | ||
| asChild?: boolean; | ||
| }, "key" | "asChild" | keyof import('react').InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & { | ||
| value?: string; | ||
| onValueChange?: (search: string) => void; | ||
| } & import('react').RefAttributes<HTMLInputElement>, "ref"> & ExtendProps & import('react').RefAttributes<HTMLInputElement>>; | ||
| declare const CommandList: import('react').ForwardRefExoticComponent<Omit<{ | ||
| children?: React.ReactNode; | ||
| } & Pick<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & { | ||
| ref?: React.Ref<HTMLDivElement>; | ||
| } & { | ||
| asChild?: boolean; | ||
| }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild"> & { | ||
| label?: string; | ||
| } & import('react').RefAttributes<HTMLDivElement>, "ref"> & ExtendProps & import('react').RefAttributes<HTMLDivElement>>; | ||
| declare const CommandEmpty: import('react').ForwardRefExoticComponent<Omit<{ | ||
| children?: React.ReactNode; | ||
| } & Pick<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & { | ||
| ref?: React.Ref<HTMLDivElement>; | ||
| } & { | ||
| asChild?: boolean; | ||
| }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & ExtendProps & import('react').RefAttributes<HTMLDivElement>>; | ||
| declare const CommandGroup: import('react').ForwardRefExoticComponent<Omit<{ | ||
| children?: React.ReactNode; | ||
| } & Omit<Pick<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & { | ||
| ref?: React.Ref<HTMLDivElement>; | ||
| } & { | ||
| asChild?: boolean; | ||
| }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & { | ||
| heading?: React.ReactNode; | ||
| value?: string; | ||
| forceMount?: boolean; | ||
| } & import('react').RefAttributes<HTMLDivElement>, "ref"> & ExtendProps & import('react').RefAttributes<HTMLDivElement>>; | ||
| declare const CommandSeparator: import('react').ForwardRefExoticComponent<Omit<Pick<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & { | ||
| ref?: React.Ref<HTMLDivElement>; | ||
| } & { | ||
| asChild?: boolean; | ||
| }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild"> & { | ||
| alwaysRender?: boolean; | ||
| } & import('react').RefAttributes<HTMLDivElement>, "ref"> & ExtendProps & import('react').RefAttributes<HTMLDivElement>>; | ||
| declare const CommandItem: import('react').ForwardRefExoticComponent<Omit<{ | ||
| children?: React.ReactNode; | ||
| } & Omit<Pick<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & { | ||
| ref?: React.Ref<HTMLDivElement>; | ||
| } & { | ||
| asChild?: boolean; | ||
| }, "key" | keyof HTMLAttributes<HTMLDivElement> | "asChild">, "disabled" | "onSelect" | "value"> & { | ||
| disabled?: boolean; | ||
| onSelect?: (value: string) => void; | ||
| value?: string; | ||
| keywords?: string[]; | ||
| forceMount?: boolean; | ||
| } & import('react').RefAttributes<HTMLDivElement>, "ref"> & ExtendProps & import('react').RefAttributes<HTMLDivElement>>; | ||
| declare const CommandInput: { | ||
| ({ className, extend, ref, ...props }: ComponentProps<typeof CommandPrimitive.Input> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string | undefined; | ||
| }; | ||
| declare const CommandList: { | ||
| ({ className, extend, ref, ...props }: ComponentProps<typeof CommandPrimitive.List> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string | undefined; | ||
| }; | ||
| declare const CommandEmpty: { | ||
| ({ ref, ...props }: ComponentProps<typeof CommandPrimitive.Empty> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string | undefined; | ||
| }; | ||
| declare const CommandGroup: { | ||
| ({ className, extend, ref, ...props }: ComponentProps<typeof CommandPrimitive.Group> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string | undefined; | ||
| }; | ||
| declare const CommandSeparator: { | ||
| ({ className, extend, ref, ...props }: ComponentProps<typeof CommandPrimitive.Separator> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string | undefined; | ||
| }; | ||
| declare const CommandItem: { | ||
| ({ className, extend, ref, ...props }: ComponentProps<typeof CommandPrimitive.Item> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string | undefined; | ||
| }; | ||
| declare const CommandShortcut: { | ||
@@ -85,0 +42,0 @@ ({ className, extend, ...props }: HTMLAttributes<HTMLSpanElement> & ExtendProps): import("react/jsx-runtime").JSX.Element; |
+2
-2
| { | ||
| "name": "@controlkit/command-menu", | ||
| "version": "0.3.0", | ||
| "version": "0.3.1", | ||
| "type": "module", | ||
@@ -34,3 +34,3 @@ "module": "dist/index.js", | ||
| "eslint-plugin-react-refresh": "^0.4.7", | ||
| "typescript": "^5.2.2", | ||
| "typescript": "5.7.3", | ||
| "vite": "6.2.0", | ||
@@ -37,0 +37,0 @@ "vite-plugin-dts": "^3.9.1" |
13171
-17.57%396
-5.04%