@overmap-ai/blocks 1.0.34-command-menu.4 → 1.0.34-small-improvements.0
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/CheckedIndicator/CheckedIndicator.d.ts +2 -2
- package/dist/Menu/CheckboxItemIndicator/CheckboxItemIndicator.d.ts +1 -1
- package/dist/Menu/SelectAll/SelectAllIndicator.d.ts +3 -0
- package/dist/Menu/SelectAll/context.d.ts +6 -0
- package/dist/Menu/SelectAll/index.d.ts +1 -0
- package/dist/Menu/SelectedIndicator/SelectedIndicator.d.ts +1 -1
- package/dist/Menu/SelectedIndicator/context.d.ts +6 -2
- package/dist/Menu/cva.d.ts +3 -0
- package/dist/Menu/index.d.ts +3 -2
- package/dist/Menu/typings.d.ts +9 -3
- package/dist/Menu/utils.d.ts +1 -7
- package/dist/SelectContext/Provider.d.ts +14 -0
- package/dist/SelectContext/context.d.ts +3 -13
- package/dist/SelectContext/index.d.ts +2 -2
- package/dist/SelectContext/typings.d.ts +8 -16
- package/dist/blocks.js +194 -829
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +195 -828
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/utils.d.ts +7 -2
- package/package.json +1 -4
- package/dist/CommandMenu/CheckboxIndicator.d.ts +0 -6
- package/dist/CommandMenu/CheckboxItem.d.ts +0 -7
- package/dist/CommandMenu/Content.d.ts +0 -7
- package/dist/CommandMenu/Empty.d.ts +0 -5
- package/dist/CommandMenu/Group.d.ts +0 -5
- package/dist/CommandMenu/Input.d.ts +0 -5
- package/dist/CommandMenu/Item.d.ts +0 -6
- package/dist/CommandMenu/List.d.ts +0 -5
- package/dist/CommandMenu/MultiSelectGroup.d.ts +0 -5
- package/dist/CommandMenu/MultiSelectItem.d.ts +0 -5
- package/dist/CommandMenu/Overlay.d.ts +0 -5
- package/dist/CommandMenu/Page.d.ts +0 -5
- package/dist/CommandMenu/PageTriggerItem.d.ts +0 -5
- package/dist/CommandMenu/Pages.d.ts +0 -7
- package/dist/CommandMenu/RadioGroup.d.ts +0 -4
- package/dist/CommandMenu/RadioItem.d.ts +0 -5
- package/dist/CommandMenu/Root.d.ts +0 -5
- package/dist/CommandMenu/SelectAllItem.d.ts +0 -4
- package/dist/CommandMenu/SelectedIndicator.d.ts +0 -5
- package/dist/CommandMenu/Separator.d.ts +0 -6
- package/dist/CommandMenu/Trigger.d.ts +0 -5
- package/dist/CommandMenu/context.d.ts +0 -22
- package/dist/CommandMenu/cva.d.ts +0 -25
- package/dist/CommandMenu/index.d.ts +0 -46
- package/dist/CommandMenu/typings.d.ts +0 -10
- package/dist/CommandMenu/utils.d.ts +0 -4
- package/dist/SelectContext/MultiSelectProvider.d.ts +0 -3
- package/dist/SelectContext/SingleSelectProvider.d.ts +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface CheckedIndicatorProps
|
|
1
|
+
import { FC, PropsWithChildren } from "react";
|
|
2
|
+
export interface CheckedIndicatorProps {
|
|
3
3
|
children: PropsWithChildren["children"] | ((indeterminate: boolean) => PropsWithChildren["children"]);
|
|
4
4
|
}
|
|
5
5
|
export declare const CheckedIndicator: FC<CheckedIndicatorProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { MenuCheckboxIndicatorProps } from "../typings";
|
|
3
|
-
export declare const MenuCheckboxItemIndicator: import("react").ForwardRefExoticComponent<
|
|
3
|
+
export declare const MenuCheckboxItemIndicator: import("react").ForwardRefExoticComponent<MenuCheckboxIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
interface ISelectedIndicatorContext {
|
|
3
|
+
selected: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const SelectedIndicatorContext: import("react").Context<ISelectedIndicatorContext>;
|
|
6
|
+
export declare const useSelectedIndicatorContext: () => ISelectedIndicatorContext;
|
|
7
|
+
export {};
|
package/dist/Menu/cva.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export declare const menuItem: (props?: ({
|
|
|
5
5
|
export declare const menuSeparator: (props?: ({
|
|
6
6
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const menuSelectedIndicator: (props?: ({
|
|
9
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
11
|
export declare const menuContent: (props?: ({
|
|
9
12
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
13
|
radius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
|
package/dist/Menu/index.d.ts
CHANGED
|
@@ -44,10 +44,11 @@ export declare const Menu: {
|
|
|
44
44
|
MultiSelectItem: import("react").NamedExoticComponent<import("./typings").MenuSelectItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
45
45
|
SelectAllItem: import("react").ForwardRefExoticComponent<import("./typings").SelectAllItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
46
|
CheckboxItem: import("react").ForwardRefExoticComponent<import("./typings").MenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
47
|
+
SelectAllIndicator: import("react").ForwardRefExoticComponent<import("./typings").SelectAllIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
47
48
|
SelectedIndicator: import("react").ForwardRefExoticComponent<{
|
|
48
49
|
children?: import("react").ReactNode;
|
|
49
|
-
} & import("react").RefAttributes<
|
|
50
|
-
CheckboxItemIndicator: import("react").ForwardRefExoticComponent<
|
|
50
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
|
+
CheckboxItemIndicator: import("react").ForwardRefExoticComponent<import("./typings").MenuCheckboxIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
51
52
|
InputRoot: import("react").NamedExoticComponent<import("./typings").MenuInputRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
53
|
InputField: import("react").NamedExoticComponent<Omit<import("./typings").MenuInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
53
54
|
InputSlot: import("react").NamedExoticComponent<import("./typings").MenuInputSlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/Menu/typings.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type { VariantProps } from "class-variance-authority";
|
|
|
4
4
|
import { ComponentProps, PropsWithChildren, PropsWithoutRef, ReactElement, ReactNode } from "react";
|
|
5
5
|
import type { CheckedIndicatorProps } from "../CheckedIndicator";
|
|
6
6
|
import type { ComponentRadius } from "../Provider";
|
|
7
|
-
import type { MultiSelectProps, SingleSelectProps } from "../SelectContext/typings";
|
|
8
7
|
import type { AccentColorProps } from "../typings";
|
|
9
8
|
import { menuItem } from "./cva";
|
|
10
9
|
type MenuItemVariants = VariantProps<typeof menuItem>;
|
|
@@ -44,8 +43,11 @@ export interface MenuVirtualTriggerProps {
|
|
|
44
43
|
}
|
|
45
44
|
export interface MenuGroupProps extends PropsWithoutRef<ComponentProps<"div">> {
|
|
46
45
|
}
|
|
47
|
-
export
|
|
48
|
-
|
|
46
|
+
export interface MenuSelectGroupProps extends MenuGroupProps {
|
|
47
|
+
value: string | null;
|
|
48
|
+
onValueChange: (value: string | null) => void;
|
|
49
|
+
}
|
|
50
|
+
export interface MenuMultiSelectGroupProps extends MenuGroupProps {
|
|
49
51
|
values: string[];
|
|
50
52
|
onValuesChange: (values: string[]) => void;
|
|
51
53
|
}
|
|
@@ -64,6 +66,7 @@ export interface MenuSelectItemProps extends MenuItemProps {
|
|
|
64
66
|
value: string;
|
|
65
67
|
}
|
|
66
68
|
export interface SelectAllItemProps extends Omit<MenuItemProps, "children"> {
|
|
69
|
+
allValues: string[];
|
|
67
70
|
children: ReactNode | ((meta: {
|
|
68
71
|
active: boolean;
|
|
69
72
|
selected: boolean | "indeterminate";
|
|
@@ -108,6 +111,9 @@ export interface MenuInputRootProps extends PropsWithoutRef<ComponentProps<"div"
|
|
|
108
111
|
}
|
|
109
112
|
export interface MenuInputSlotProps extends PropsWithoutRef<ComponentProps<"div">> {
|
|
110
113
|
}
|
|
114
|
+
export interface SelectAllIndicatorProps extends Omit<PropsWithoutRef<ComponentProps<"span">>, "children"> {
|
|
115
|
+
children: ReactNode | ((indeterminate: boolean) => ReactNode);
|
|
116
|
+
}
|
|
111
117
|
export interface MenuCheckboxIndicatorProps extends Omit<PropsWithoutRef<ComponentProps<"span">>, "children">, CheckedIndicatorProps {
|
|
112
118
|
}
|
|
113
119
|
export interface MenuScrollProps extends PropsWithoutRef<ComponentProps<"div">> {
|
package/dist/Menu/utils.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { MenuAlignment, MenuSide } from "./typings";
|
|
1
|
+
import { MenuAlignment, MenuSide } from "./typings";
|
|
3
2
|
export declare const computeOffsets: (side: MenuSide, alignment: MenuAlignment) => {
|
|
4
3
|
mainAxis: number;
|
|
5
4
|
crossAxis: number;
|
|
6
5
|
};
|
|
7
|
-
export declare function getSelectedState(selected: boolean): "selected" | "unselected";
|
|
8
|
-
export declare function getCheckedState(checked: CheckedState): "checked" | "indeterminate" | "unchecked";
|
|
9
|
-
export declare function getActiveState(active: boolean): "active" | "inactive";
|
|
10
|
-
export declare function getBooleanState(value: boolean): "true" | "false";
|
|
11
|
-
export declare function getOpenState(open: boolean): "open" | "closed";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
type SelectContextProviderProps = PropsWithChildren & ({
|
|
3
|
+
type: "single";
|
|
4
|
+
defaultValue?: string | null;
|
|
5
|
+
value?: string | null;
|
|
6
|
+
onValueChange?: (value: string | null) => void;
|
|
7
|
+
} | {
|
|
8
|
+
type: "multi";
|
|
9
|
+
defaultValues?: string[];
|
|
10
|
+
values?: string[];
|
|
11
|
+
onValuesChange?: (values: string[]) => void;
|
|
12
|
+
});
|
|
13
|
+
export declare const SelectContextProvider: import("react").MemoExoticComponent<(props: SelectContextProviderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
export {};
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
selected: (value: string) => boolean;
|
|
5
|
-
}
|
|
2
|
+
import { MultiSelectContext, SingleSelectContext } from "./typings";
|
|
3
|
+
export type ISelectContext = SingleSelectContext | MultiSelectContext;
|
|
6
4
|
export declare const SelectContext: import("react").Context<ISelectContext>;
|
|
7
|
-
export
|
|
8
|
-
selectValue: (value: string) => void;
|
|
9
|
-
selected: (value: string) => boolean;
|
|
10
|
-
registerValue: (value: string) => () => void;
|
|
11
|
-
allSelected: boolean;
|
|
12
|
-
someSelected: boolean;
|
|
13
|
-
toggleSelectAll: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare const MultiSelectContext: import("react").Context<IMultiSelectContext>;
|
|
5
|
+
export declare function useSelectContext<Type = SingleSelectContext | MultiSelectContext>(): Type;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./context";
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
2
|
+
export * from "./Provider";
|
|
3
|
+
export * from "./typings";
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value
|
|
1
|
+
export type SingleSelectContext = {
|
|
2
|
+
type: "single";
|
|
3
|
+
value: string | null;
|
|
4
|
+
handleValueChange: (value: string | null) => void;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}) | (SingleSelectNotRequiredProps & {
|
|
11
|
-
required: false;
|
|
12
|
-
});
|
|
13
|
-
export type MultiSelectProps = {
|
|
14
|
-
onValuesChange?: (value: string[]) => void;
|
|
15
|
-
defaultValues?: string[];
|
|
16
|
-
values?: string[];
|
|
6
|
+
export type MultiSelectContext = {
|
|
7
|
+
type: "multi";
|
|
8
|
+
values: string[];
|
|
9
|
+
handleValuesChange: (value: string[]) => void;
|
|
17
10
|
};
|
|
18
|
-
export {};
|