@overmap-ai/blocks 1.0.33 → 1.0.34-command-menu.1
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/dist/CommandMenu/CheckboxIndicator.d.ts +7 -0
- package/dist/CommandMenu/CheckboxItem.d.ts +7 -0
- package/dist/CommandMenu/Content.d.ts +7 -0
- package/dist/CommandMenu/Empty.d.ts +5 -0
- package/dist/CommandMenu/Group.d.ts +5 -0
- package/dist/CommandMenu/Input.d.ts +5 -0
- package/dist/CommandMenu/Item.d.ts +6 -0
- package/dist/CommandMenu/List.d.ts +5 -0
- package/dist/CommandMenu/MultiSelectGroup.d.ts +7 -0
- package/dist/CommandMenu/MultiSelectItem.d.ts +5 -0
- package/dist/CommandMenu/Overlay.d.ts +5 -0
- package/dist/CommandMenu/Page.d.ts +5 -0
- package/dist/CommandMenu/PageTriggerItem.d.ts +5 -0
- package/dist/CommandMenu/Pages.d.ts +7 -0
- package/dist/CommandMenu/RadioGroup.d.ts +7 -0
- package/dist/CommandMenu/RadioItem.d.ts +5 -0
- package/dist/CommandMenu/Root.d.ts +5 -0
- package/dist/CommandMenu/SelectAllItem.d.ts +4 -0
- package/dist/CommandMenu/SelectedIndicator.d.ts +6 -0
- package/dist/CommandMenu/Separator.d.ts +6 -0
- package/dist/CommandMenu/Trigger.d.ts +5 -0
- package/dist/CommandMenu/context.d.ts +34 -0
- package/dist/CommandMenu/cva.d.ts +25 -0
- package/dist/CommandMenu/index.d.ts +46 -0
- package/dist/CommandMenu/typings.d.ts +10 -0
- package/dist/CommandMenu/utils.d.ts +4 -0
- package/dist/blocks.js +619 -20
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +618 -21
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/utils.d.ts +1 -6
- package/package.json +2 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
import type { CheckedState } from "./typings";
|
|
3
|
+
export interface CommandMenuCheckboxIndicatorProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
4
|
+
alwaysRender?: boolean;
|
|
5
|
+
children: ReactNode | ((checked: CheckedState) => ReactNode);
|
|
6
|
+
}
|
|
7
|
+
export declare const CommandMenuCheckboxIndicator: (props: CommandMenuCheckboxIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommandMenuItemProps } from "./Item";
|
|
2
|
+
import type { CheckedState } from "./typings";
|
|
3
|
+
export interface CommandMenuCheckboxItemProps extends CommandMenuItemProps {
|
|
4
|
+
checked: CheckedState;
|
|
5
|
+
onCheckedChange: (checked: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const CommandMenuCheckboxItem: (props: CommandMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DialogContentProps, DialogPortalProps } from "@radix-ui/react-dialog";
|
|
2
|
+
import { CommandRoot } from "cmdk";
|
|
3
|
+
import { ComponentPropsWithRef } from "react";
|
|
4
|
+
import type { CommandMenuVariantProps } from "./typings";
|
|
5
|
+
export interface CommandMenuContentProps extends ComponentPropsWithRef<typeof CommandRoot>, Pick<DialogContentProps, "forceMount" | "onOpenAutoFocus" | "onCloseAutoFocus" | "onEscapeKeyDown" | "onPointerDownOutside" | "onInteractOutside">, Pick<DialogPortalProps, "container">, CommandMenuVariantProps {
|
|
6
|
+
}
|
|
7
|
+
export declare const CommandMenuContent: import("react").NamedExoticComponent<CommandMenuContentProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CommandEmpty } from "cmdk";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
export interface CommandMenuEmptyProps extends ComponentPropsWithRef<typeof CommandEmpty> {
|
|
4
|
+
}
|
|
5
|
+
export declare const CommandMenuEmpty: import("react").NamedExoticComponent<CommandMenuEmptyProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CommandGroup } from "cmdk";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
export interface CommandMenuGroupProps extends ComponentPropsWithRef<typeof CommandGroup> {
|
|
4
|
+
}
|
|
5
|
+
export declare const CommandMenuGroup: import("react").NamedExoticComponent<CommandMenuGroupProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CommandInput } from "cmdk";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
export interface CommandMenuInputProps extends ComponentPropsWithRef<typeof CommandInput> {
|
|
4
|
+
}
|
|
5
|
+
export declare const CommandMenuInput: import("react").NamedExoticComponent<CommandMenuInputProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommandItem } from "cmdk";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
export interface CommandMenuItemProps extends ComponentPropsWithRef<typeof CommandItem> {
|
|
4
|
+
closeOnSelect?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const CommandMenuItem: import("react").NamedExoticComponent<CommandMenuItemProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CommandList } from "cmdk";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
export interface CommandMenuListProps extends ComponentPropsWithRef<typeof CommandList> {
|
|
4
|
+
}
|
|
5
|
+
export declare const CommandMenuList: import("react").NamedExoticComponent<CommandMenuListProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommandMenuGroupProps } from "./Group";
|
|
2
|
+
export interface CommandMenuMultiSelectGroupProps extends CommandMenuGroupProps {
|
|
3
|
+
defaultValues?: string[];
|
|
4
|
+
values?: string[];
|
|
5
|
+
onValuesChange?: (values: string[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const CommandMenuMultiSelectGroup: (props: CommandMenuMultiSelectGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CommandMenuItemProps } from "./Item";
|
|
2
|
+
export interface CommandMenuMultiSelectItemProps extends CommandMenuItemProps {
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const CommandMenuMultiSelectItem: (props: CommandMenuMultiSelectItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DialogOverlayProps, DialogPortalProps } from "@radix-ui/react-dialog";
|
|
3
|
+
export interface CommandMenuOverlayProps extends DialogOverlayProps, Pick<DialogPortalProps, "container"> {
|
|
4
|
+
}
|
|
5
|
+
export declare const CommandMenuOverlay: import("react").NamedExoticComponent<CommandMenuOverlayProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CommandMenuItemProps } from "./Item";
|
|
2
|
+
export interface CommandMenuPageTriggerItemProps extends CommandMenuItemProps {
|
|
3
|
+
page: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const CommandMenuPageTriggerItem: (props: CommandMenuPageTriggerItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export interface CommandMenuPagesProps extends PropsWithChildren {
|
|
3
|
+
defaultPage?: string;
|
|
4
|
+
page?: string;
|
|
5
|
+
onPageChange?: (page: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const CommandMenuPages: (props: CommandMenuPagesProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommandMenuGroupProps } from "./Group";
|
|
2
|
+
export interface CommandMenuRadioGroupProps extends Omit<CommandMenuGroupProps, "defaultValue" | "value"> {
|
|
3
|
+
defaultValue?: string | null;
|
|
4
|
+
value?: string | null;
|
|
5
|
+
onValueChange?: (value: string | null) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const CommandMenuRadioGroup: (props: CommandMenuRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export interface CommandMenuSelectedIndicatorProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
3
|
+
alwaysRender?: boolean;
|
|
4
|
+
children: ReactNode | ((selected: boolean) => ReactNode);
|
|
5
|
+
}
|
|
6
|
+
export declare const CommandMenuSelectedIndicator: (props: CommandMenuSelectedIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommandSeparator } from "cmdk";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
export interface CommandMenuSeparatorProps extends ComponentPropsWithRef<typeof CommandSeparator> {
|
|
4
|
+
spacing?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const CommandMenuSeparator: import("react").NamedExoticComponent<CommandMenuSeparatorProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DialogTriggerProps } from "@radix-ui/react-dialog";
|
|
3
|
+
export interface CommandMenuTriggerProps extends DialogTriggerProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const CommandMenuTrigger: import("react").NamedExoticComponent<CommandMenuTriggerProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import type { ComponentRadius } from "../Provider";
|
|
3
|
+
import type { CheckedState, CommandMenuSize, CommandMenuVariant } from "./typings";
|
|
4
|
+
interface ICommandMenuContext {
|
|
5
|
+
size: CommandMenuSize;
|
|
6
|
+
variant: CommandMenuVariant;
|
|
7
|
+
radius: ComponentRadius;
|
|
8
|
+
}
|
|
9
|
+
export declare const CommandMenuContext: import("react").Context<ICommandMenuContext>;
|
|
10
|
+
export interface ISelectContext {
|
|
11
|
+
selectValue: (value: string) => void;
|
|
12
|
+
selected: (value: string) => boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const SelectContext: import("react").Context<ISelectContext>;
|
|
15
|
+
export interface IMultiSelectGroupContext {
|
|
16
|
+
itemValueMapping: Map<string, string>;
|
|
17
|
+
setItemValueMapping: Dispatch<SetStateAction<Map<string, string>>>;
|
|
18
|
+
values: string[];
|
|
19
|
+
setValues: (values: string[]) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const MultiSelectGroupContext: import("react").Context<IMultiSelectGroupContext>;
|
|
22
|
+
export declare const SelectedIndicatorContext: import("react").Context<boolean>;
|
|
23
|
+
export declare const CheckboxIndicatorContext: import("react").Context<CheckedState>;
|
|
24
|
+
export interface IMenuPagesContext {
|
|
25
|
+
page: string;
|
|
26
|
+
setPage: (page: string) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const CommandMenuPageContext: import("react").Context<IMenuPagesContext>;
|
|
29
|
+
export interface ICommandMenuDialogContext {
|
|
30
|
+
open: boolean;
|
|
31
|
+
setOpen: (open: boolean) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const CommandMenuDialogContext: import("react").Context<ICommandMenuDialogContext>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const commandMenuContentCva: (props?: ({
|
|
2
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const commandMenuOverlayCva: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
|
+
export declare const commandMenuListCva: (props?: ({
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const commandMenuInputCva: (props?: ({
|
|
9
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
export declare const commandMenuSeparatorCva: (props?: ({
|
|
12
|
+
spacing?: boolean | null | undefined;
|
|
13
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export declare const commandMenuItemCva: (props?: ({
|
|
16
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
17
|
+
variant?: "solid" | "soft" | null | undefined;
|
|
18
|
+
radius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
|
|
19
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
+
export declare const commandMenuEmptyCva: (props?: ({
|
|
21
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
22
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
23
|
+
export declare const commandMenuGroupCva: (props?: ({
|
|
24
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
25
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export * from "./CheckboxIndicator";
|
|
3
|
+
export * from "./CheckboxItem";
|
|
4
|
+
export * from "./Content";
|
|
5
|
+
export * from "./Empty";
|
|
6
|
+
export * from "./Group";
|
|
7
|
+
export * from "./Input";
|
|
8
|
+
export * from "./Item";
|
|
9
|
+
export * from "./List";
|
|
10
|
+
export * from "./MultiSelectGroup";
|
|
11
|
+
export * from "./MultiSelectItem";
|
|
12
|
+
export * from "./Overlay";
|
|
13
|
+
export * from "./Page";
|
|
14
|
+
export * from "./Pages";
|
|
15
|
+
export * from "./PageTriggerItem";
|
|
16
|
+
export * from "./RadioGroup";
|
|
17
|
+
export * from "./RadioItem";
|
|
18
|
+
export * from "./Root";
|
|
19
|
+
export * from "./SelectAllItem";
|
|
20
|
+
export * from "./SelectedIndicator";
|
|
21
|
+
export * from "./Separator";
|
|
22
|
+
export * from "./Trigger";
|
|
23
|
+
export * from "./typings";
|
|
24
|
+
export declare const CommandMenu: {
|
|
25
|
+
Root: import("react").NamedExoticComponent<import("./Root").CommandMenuRootProps>;
|
|
26
|
+
Overlay: import("react").NamedExoticComponent<import("./Overlay").CommandMenuOverlayProps>;
|
|
27
|
+
Content: import("react").NamedExoticComponent<import("./Content").CommandMenuContentProps>;
|
|
28
|
+
Trigger: import("react").NamedExoticComponent<import("./Trigger").CommandMenuTriggerProps>;
|
|
29
|
+
Input: import("react").NamedExoticComponent<import("./Input").CommandMenuInputProps>;
|
|
30
|
+
List: import("react").NamedExoticComponent<import("./List").CommandMenuListProps>;
|
|
31
|
+
Group: import("react").NamedExoticComponent<import("./Group").CommandMenuGroupProps>;
|
|
32
|
+
Item: import("react").NamedExoticComponent<import("./Item").CommandMenuItemProps>;
|
|
33
|
+
Separator: import("react").NamedExoticComponent<import("./Separator").CommandMenuSeparatorProps>;
|
|
34
|
+
Empty: import("react").NamedExoticComponent<import("./Empty").CommandMenuEmptyProps>;
|
|
35
|
+
MultiSelectGroup: (props: import("./MultiSelectGroup").CommandMenuMultiSelectGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
MultiSelectItem: (props: import("./MultiSelectItem").CommandMenuMultiSelectItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
SelectAllItem: (props: import("./SelectAllItem").CommandMenuSelectAllItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
SelectedIndicator: (props: import("./SelectedIndicator").CommandMenuSelectedIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
39
|
+
RadioGroup: (props: import("./RadioGroup").CommandMenuRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
RadioItem: (props: import("./RadioItem").CommandMenuRadioItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
CheckboxItem: (props: import("./CheckboxItem").CommandMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
CheckboxIndicator: (props: import("./CheckboxIndicator").CommandMenuCheckboxIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
+
Pages: (props: import("./Pages").CommandMenuPagesProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
Page: (props: import("./Page").CommandMenuPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
PageTriggerItem: (props: import("./PageTriggerItem").CommandMenuPageTriggerItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentRadius } from "../Provider";
|
|
2
|
+
import type { AccentColorProps } from "../typings";
|
|
3
|
+
export type CommandMenuVariant = "soft" | "solid";
|
|
4
|
+
export type CommandMenuSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
|
+
export interface CommandMenuVariantProps extends AccentColorProps {
|
|
6
|
+
variant?: CommandMenuVariant;
|
|
7
|
+
size?: CommandMenuSize;
|
|
8
|
+
radius?: ComponentRadius;
|
|
9
|
+
}
|
|
10
|
+
export type CheckedState = boolean | "indeterminate";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CheckedState } from "./typings";
|
|
2
|
+
export declare function getSelectedState(selected: boolean): "selected" | "unselected";
|
|
3
|
+
export declare function getCheckedState(checked: CheckedState): "checked" | "indeterminate" | "unchecked";
|
|
4
|
+
export declare function getActiveState(active: boolean): "active" | "inactive";
|