@overmap-ai/blocks 1.0.27-custom-table-component.4 → 1.0.27-custom-table-component.6
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 +3 -3
- package/dist/Breadcrumb/context.d.ts +1 -1
- package/dist/Buttons/index.d.ts +1 -1
- package/dist/Buttons/typings.d.ts +1 -0
- package/dist/CollapsibleTree/CollapsibleTree.d.ts +5 -0
- package/dist/CollapsibleTree/context.d.ts +14 -0
- package/dist/CollapsibleTree/index.d.ts +2 -0
- package/dist/CollapsibleTree/typings.d.ts +71 -0
- package/dist/DialogMenu/Provider.d.ts +6 -0
- package/dist/DialogMenu/components/DialogCommandMenu.d.ts +6 -0
- package/dist/DialogMenu/components/DialogMultiSelectMenu.d.ts +6 -0
- package/dist/DialogMenu/components/DialogSelectMenu.d.ts +7 -0
- package/dist/DialogMenu/components/index.d.ts +3 -0
- package/dist/DialogMenu/constants.d.ts +3 -0
- package/dist/DialogMenu/content/Content.d.ts +8 -0
- package/dist/DialogMenu/content/SubContent.d.ts +5 -0
- package/dist/DialogMenu/content/index.d.ts +2 -0
- package/dist/DialogMenu/context.d.ts +14 -0
- package/dist/DialogMenu/groups/Group.d.ts +3 -0
- package/dist/DialogMenu/groups/MultiSelectGroup.d.ts +3 -0
- package/dist/DialogMenu/groups/SelectGroup.d.ts +3 -0
- package/dist/DialogMenu/groups/index.d.ts +3 -0
- package/dist/DialogMenu/index.d.ts +20 -0
- package/dist/DialogMenu/items/Item.d.ts +3 -0
- package/dist/DialogMenu/items/MultiSelectItem.d.ts +3 -0
- package/dist/DialogMenu/items/SelectItem.d.ts +3 -0
- package/dist/DialogMenu/items/Separator.d.ts +4 -0
- package/dist/DialogMenu/items/SubTrigger.d.ts +3 -0
- package/dist/DialogMenu/items/index.d.ts +5 -0
- package/dist/DialogMenu/root/Root.d.ts +6 -0
- package/dist/DialogMenu/root/index.d.ts +1 -0
- package/dist/DialogMenu/typings.d.ts +59 -0
- package/dist/Dialogs/AlertDialog/typings.d.ts +1 -1
- package/dist/Dialogs/BaseDialog/BaseDialog.d.ts +3 -0
- package/dist/Dialogs/BaseDialog/index.d.ts +2 -0
- package/dist/Dialogs/BaseDialog/typings.d.ts +31 -0
- package/dist/Dialogs/Overlay/Overlay.d.ts +3 -30
- package/dist/OvermapInputItem/OvermapInputItem.d.ts +6 -0
- package/dist/OvermapInputItem/index.d.ts +2 -0
- package/dist/OvermapInputItem/typings.d.ts +4 -0
- package/dist/OvermapItem/typings.d.ts +4 -0
- package/dist/OvermapItemGroup/OvermapItemGroup.d.ts +3 -0
- package/dist/OvermapItemGroup/context.d.ts +9 -0
- package/dist/OvermapItemGroup/index.d.ts +3 -0
- package/dist/OvermapItemGroup/typings.d.ts +7 -0
- package/dist/Pagination/PaginationControls.d.ts +2 -2
- package/dist/Pagination/hooks.d.ts +1 -1
- package/dist/RiIcon/RiIcon.d.ts +7 -0
- package/dist/RiIcon/index.d.ts +1 -0
- package/dist/Select/Select.d.ts +1 -1
- package/dist/Select/typings.d.ts +1 -1
- package/dist/SelectContext/Provider.d.ts +14 -0
- package/dist/SelectContext/context.d.ts +5 -0
- package/dist/SelectContext/index.d.ts +3 -0
- package/dist/SelectContext/typings.d.ts +10 -0
- package/dist/Table/index.d.ts +1 -1
- package/dist/blocks.js +2056 -1395
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +2049 -1386
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/style.css +134 -61
- package/package.json +108 -105
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# overmap-ai blocks
|
|
2
|
-
|
|
3
|
-
Contains basic components used by overmap-ai libraries.
|
|
1
|
+
# overmap-ai blocks
|
|
2
|
+
|
|
3
|
+
Contains basic components used by overmap-ai libraries.
|
package/dist/Buttons/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as Button } from "./Button";
|
|
2
2
|
export { default as IconButton } from "./IconButton";
|
|
3
|
-
export type { ButtonHoverEffect } from "./typings";
|
|
3
|
+
export type { ButtonHoverEffect, ButtonProps, ButtonStyleProps } from "./typings";
|
|
4
4
|
export { divButtonProps } from "./constants";
|
|
@@ -14,6 +14,7 @@ export interface ButtonStyleProps {
|
|
|
14
14
|
severity?: Severity;
|
|
15
15
|
size?: Responsive<Size>;
|
|
16
16
|
hoverEffects?: ButtonHoverEffect[];
|
|
17
|
+
highContrast?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export type RadixButtonProps = React.ComponentProps<typeof RadixButton>;
|
|
19
20
|
export type ButtonHoverEffect = "spin90Clockwise" | "spin180Clockwise" | "spin360Clockwise";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CollapsibleTreeProps } from "./typings";
|
|
2
|
+
/** The Collapsible Tree Component is a reusable UI element that displays hierarchical data in a tree structure.
|
|
3
|
+
* Nodes in the tree can be expanded or collapsed to show or hide their children, allowing for an intuitive and
|
|
4
|
+
* space-efficient way to navigate complex data structures.*/
|
|
5
|
+
export declare const CollapsibleTree: <TMeta>(props: CollapsibleTreeProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentProps, CSSProperties } from "react";
|
|
2
|
+
import { Flex } from "@radix-ui/themes";
|
|
3
|
+
import { NodeCallbacks, NodeRenderer } from "./typings";
|
|
4
|
+
interface ICollapsibleTreeContext<TMeta> extends NodeCallbacks<TMeta> {
|
|
5
|
+
nodeClassName?: string;
|
|
6
|
+
nodeStyles?: CSSProperties;
|
|
7
|
+
nodeGap: ComponentProps<typeof Flex>["gap"];
|
|
8
|
+
levelGap: ComponentProps<typeof Flex>["pl"];
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
nodeRenderer: NodeRenderer<TMeta>;
|
|
11
|
+
}
|
|
12
|
+
export declare const CollapsibleTreeContext: import("react").Context<ICollapsibleTreeContext<never>>;
|
|
13
|
+
export declare function useCollapsibleTreeContext<TMeta>(): ICollapsibleTreeContext<TMeta>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ComponentProps, CSSProperties } from "react";
|
|
2
|
+
import { CollapsibleProps } from "@radix-ui/react-collapsible";
|
|
3
|
+
import { Flex } from "@radix-ui/themes";
|
|
4
|
+
import { PropsWithClassNameAndStyle } from "../typings";
|
|
5
|
+
import { OvermapItemProps } from "../OvermapItem";
|
|
6
|
+
import { OvermapItemGroupProps } from "../OvermapItemGroup";
|
|
7
|
+
export type NodeEventHandler<TMeta> = (meta: TMeta) => void;
|
|
8
|
+
export interface NodeCallbacks<TMeta> {
|
|
9
|
+
/** callback fired when a specific TreeNode is clicked, regardless of the current open state of the specific
|
|
10
|
+
* TreeNode collapsible. */
|
|
11
|
+
onNodeClick?: NodeEventHandler<TMeta>;
|
|
12
|
+
/** callback fired when a specific TreeNode collapsible is opened. */
|
|
13
|
+
onNodeOpen?: NodeEventHandler<TMeta>;
|
|
14
|
+
/** callback fired when a specific TreeNode collapsible is closed. */
|
|
15
|
+
onNodeClose?: NodeEventHandler<TMeta>;
|
|
16
|
+
}
|
|
17
|
+
export type NodeRenderer<TMeta> = (args: {
|
|
18
|
+
/** passing any meta information defined for the given node*/
|
|
19
|
+
meta: TMeta;
|
|
20
|
+
/** a function to toggle the open state of the TreeNode, useful to define what content with the TreeNode is responsible
|
|
21
|
+
* for triggering the opening and closing of the TreeNode collapsible. */
|
|
22
|
+
toggleOpen: () => void;
|
|
23
|
+
/** the current open state of the TreeNode collapsible, useful for changing rendered content within the TreeNode
|
|
24
|
+
* based on its open state. */
|
|
25
|
+
open: boolean;
|
|
26
|
+
/** the current disabled state of the TreeNode, useful for changing rendered content or functionality based on if the
|
|
27
|
+
* TreeNode is disabled or not. */
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
}) => {
|
|
30
|
+
children: OvermapItemProps["children"];
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
leftSlot?: OvermapItemProps["leftSlot"];
|
|
34
|
+
rightSlot?: OvermapItemProps["rightSlot"];
|
|
35
|
+
};
|
|
36
|
+
export interface TreeNodeProps<TMeta> extends Pick<CollapsibleProps, "disabled"> {
|
|
37
|
+
/** list of TreeNodes to be rendered within the current TreeNode collapsible */
|
|
38
|
+
nodes?: TreeNodeProps<TMeta>[];
|
|
39
|
+
/** any meta-information that should be attached to a given TreeNode uses the TMeta type to specifically type
|
|
40
|
+
* the structure of this meta-data. */
|
|
41
|
+
meta: TMeta;
|
|
42
|
+
}
|
|
43
|
+
export interface CollapsibleTreeProps<TMeta> extends PropsWithClassNameAndStyle, Pick<OvermapItemGroupProps, "size">, NodeCallbacks<TMeta> {
|
|
44
|
+
/** the TreeNode structure that should be rendered within the CollapsibleTree */
|
|
45
|
+
nodes: TreeNodeProps<TMeta>[];
|
|
46
|
+
/** the vertical gap between each TreeNode in the CollapsibleTree.
|
|
47
|
+
* @default "0"
|
|
48
|
+
* */
|
|
49
|
+
nodeGap?: ComponentProps<typeof Flex>["gap"];
|
|
50
|
+
/** the left inset between each TreeNode level in the CollapsibleTree.
|
|
51
|
+
* @default "2"
|
|
52
|
+
* */
|
|
53
|
+
levelGap?: ComponentProps<typeof Flex>["pl"];
|
|
54
|
+
/** disables all TreeNodes in the CollapsibleTree.
|
|
55
|
+
* @default false
|
|
56
|
+
* */
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/** A className that will be applied to every TreeNode. Useful if all the TreeNodes are required to look
|
|
59
|
+
* the same stylistically. */
|
|
60
|
+
nodeClassName?: string;
|
|
61
|
+
/** styles that will be applied to every TreeNode. Useful if there are styles that need to be applied to all
|
|
62
|
+
* for stylistic consistency TreeNodes. */
|
|
63
|
+
nodeStyles?: CSSProperties;
|
|
64
|
+
/** a callback used to determine the content rendered within a TreeNode. The callback is passed with the following arguments,
|
|
65
|
+
* @param meta - TreeNodes meta object.
|
|
66
|
+
* @param toggleOpen - function to toggle the open state of a TreeNode.
|
|
67
|
+
* @param open - the current open state of the TreeNode collapsible.
|
|
68
|
+
* @param disabled - the current disabled state of the TreeNode collapsible.
|
|
69
|
+
* */
|
|
70
|
+
nodeRenderer: NodeRenderer<TMeta>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { IDialogMenuContext } from "./context";
|
|
3
|
+
interface DialogMenuContextProviderProps extends Pick<IDialogMenuContext, "size" | "closeOnSelect" | "close" | "selectedIndicator">, PropsWithChildren {
|
|
4
|
+
}
|
|
5
|
+
export declare const DialogMenuContextProvider: import("react").MemoExoticComponent<(props: DialogMenuContextProviderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogCommandMenuProps } from "../typings";
|
|
3
|
+
/** The Dialog Command Menu component is a flexible UI element designed to present a list of command options within a
|
|
4
|
+
* dialog overlay. This component enhances user interaction by providing a structured and accessible way to execute
|
|
5
|
+
* commands or actions from a centralized menu. */
|
|
6
|
+
export declare const DialogCommandMenu: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogCommandMenuProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogMultiSelectMenuProps } from "../typings";
|
|
3
|
+
/** The Dialog Multi Select Menu component is a versatile UI element that enables users to select multiple options from
|
|
4
|
+
* a list within a dialog overlay. This component enhances user interaction by providing a clear and accessible way to
|
|
5
|
+
* make multiple selections in contexts such as forms, filters, and settings. */
|
|
6
|
+
export declare const DialogMultiSelectMenu: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogMultiSelectMenuProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogSelectMenuProps } from "../typings";
|
|
3
|
+
/** The Dialog Select Menu component is a user interface element that provides a dropdown single selection menu within a dialog
|
|
4
|
+
* overlay. It allows users to choose an option from a predefined list, offering an enhanced user experience through a
|
|
5
|
+
* modal dialog. This component is particularly useful in forms and settings where space is limited, and a clean,
|
|
6
|
+
* accessible selection method is needed. */
|
|
7
|
+
export declare const DialogSelectMenu: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogSelectMenuProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogMenuContentProps } from "../typings";
|
|
3
|
+
export declare const ContentImpl: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogMenuContentProps & {
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
} & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
|
+
export declare const Content: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogMenuContentProps & {
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogMenuSubContentProps } from "../typings";
|
|
3
|
+
export declare const SubContent: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogMenuSubContentProps & {
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
} & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OvermapItemProps } from "../OvermapItem";
|
|
3
|
+
import { CloseDialogWithOptions } from "../Dialogs";
|
|
4
|
+
import { DialogSelectItemProps } from "./typings";
|
|
5
|
+
export interface IDialogMenuContext {
|
|
6
|
+
size: OvermapItemProps["size"];
|
|
7
|
+
closeOnSelect: boolean;
|
|
8
|
+
close: CloseDialogWithOptions;
|
|
9
|
+
subContentId: string | null;
|
|
10
|
+
setSubContentId: (subContent: string | null) => void;
|
|
11
|
+
selectedIndicator?: DialogSelectItemProps["selectedIndicator"];
|
|
12
|
+
}
|
|
13
|
+
export declare const DialogMenuContext: import("react").Context<IDialogMenuContext>;
|
|
14
|
+
export declare const useDialogMenuContext: () => IDialogMenuContext;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogMultiSelectGroupProps } from "../typings";
|
|
3
|
+
export declare const MultiSelectGroup: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogMultiSelectGroupProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const DialogMenu: {
|
|
3
|
+
Root: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogMenuProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
4
|
+
Item: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogItemProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
5
|
+
SelectItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogSelectItemProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
|
+
MultiSelectItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogSelectItemProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
7
|
+
Separator: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("..").SeparatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
8
|
+
Content: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogMenuContentProps & {
|
|
9
|
+
children?: import("react").ReactNode;
|
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>>>;
|
|
11
|
+
Group: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogGroupProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
12
|
+
SelectGroup: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogSelectGroupProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
13
|
+
MultiSelectGroup: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogMultiSelectGroupProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
14
|
+
SubTrigger: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogSubTriggerProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
15
|
+
SubContent: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./typings").DialogMenuSubContentProps & {
|
|
16
|
+
children?: import("react").ReactNode;
|
|
17
|
+
} & import("react").RefAttributes<HTMLDivElement>>>;
|
|
18
|
+
};
|
|
19
|
+
export * from "./components";
|
|
20
|
+
export * from "./typings";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogSelectItemProps } from "../typings";
|
|
3
|
+
export declare const MultiSelectItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogSelectItemProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SeparatorProps } from "../../Separator";
|
|
3
|
+
/** A separator component to be used within Dialog Menus. */
|
|
4
|
+
export declare const Separator: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogMenuProps } from "../typings";
|
|
3
|
+
/** The Dialog Menu component is a flexible and customizable UI element that allows users to trigger a dialog containing
|
|
4
|
+
* a menu of items. This component is designed to enhance user interaction by providing a structured and accessible
|
|
5
|
+
* way to present multiple items/choices/options within a dialog overlay.*/
|
|
6
|
+
export declare const Root: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogMenuProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Root";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { OvermapItemProps } from "../OvermapItem";
|
|
2
|
+
import { PropsWithChildren, ReactNode } from "react";
|
|
3
|
+
import { BaseDialogProps } from "../Dialogs/BaseDialog";
|
|
4
|
+
import { OvermapItemGroupProps } from "../OvermapItemGroup";
|
|
5
|
+
import { OvermapInputItemProps } from "../OvermapInputItem";
|
|
6
|
+
export interface DialogItemProps extends OvermapItemProps {
|
|
7
|
+
closeOnSelect?: boolean;
|
|
8
|
+
onSelect?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface DialogSelectItemProps extends DialogItemProps {
|
|
11
|
+
value: string;
|
|
12
|
+
selectedIndicator?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export interface DialogSubTriggerProps extends DialogItemProps {
|
|
15
|
+
subContentId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DialogGroupProps extends PropsWithChildren {
|
|
18
|
+
size?: OvermapItemGroupProps["size"];
|
|
19
|
+
grid?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface DialogSelectGroupProps extends DialogGroupProps {
|
|
22
|
+
value: string | null;
|
|
23
|
+
onValueChange: (value: string | null) => void;
|
|
24
|
+
}
|
|
25
|
+
export interface DialogMultiSelectGroupProps extends DialogGroupProps {
|
|
26
|
+
values: string[];
|
|
27
|
+
onValuesChange: (values: string[]) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface DialogMenuContentProps extends FilterProps {
|
|
30
|
+
topSlot?: ReactNode;
|
|
31
|
+
bottomSlot?: ReactNode;
|
|
32
|
+
numberOfItems: number;
|
|
33
|
+
}
|
|
34
|
+
export interface DialogMenuSubContentProps extends DialogMenuContentProps {
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
37
|
+
export interface DialogMenuProps extends Omit<BaseDialogProps, "content"> {
|
|
38
|
+
size?: OvermapItemProps["size"];
|
|
39
|
+
closeOnSelect?: boolean;
|
|
40
|
+
content: ReactNode;
|
|
41
|
+
selectedIndicator?: DialogSelectItemProps["selectedIndicator"];
|
|
42
|
+
}
|
|
43
|
+
export interface DialogCommandMenuProps extends Omit<DialogMenuProps, "content" | "selectedIndicator">, Omit<DialogGroupProps, "children" | "size">, Omit<DialogMenuContentProps, "numberOfItems"> {
|
|
44
|
+
items: DialogItemProps[];
|
|
45
|
+
}
|
|
46
|
+
export interface DialogSelectMenuProps extends Omit<DialogMenuProps, "content">, Omit<DialogSelectGroupProps, "children" | "size">, Omit<DialogMenuContentProps, "numberOfItems"> {
|
|
47
|
+
items: DialogSelectItemProps[];
|
|
48
|
+
}
|
|
49
|
+
export interface DialogMultiSelectMenuProps extends Omit<DialogMenuProps, "content">, Omit<DialogMultiSelectGroupProps, "children" | "size">, Omit<DialogMenuContentProps, "numberOfItems"> {
|
|
50
|
+
items: DialogSelectItemProps[];
|
|
51
|
+
}
|
|
52
|
+
interface FilterProps {
|
|
53
|
+
filterValue?: string;
|
|
54
|
+
onFilterValueChange?: (filterValue: string) => void;
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
leftFilterSlot?: OvermapInputItemProps["leftSlot"];
|
|
57
|
+
rightFilterSlot?: OvermapInputItemProps["rightSlot"];
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AlertDialog } from "@radix-ui/themes";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { CloseDialog } from "../typings";
|
|
4
|
-
import { Severity } from "../../typings
|
|
4
|
+
import { Severity } from "../../typings";
|
|
5
5
|
interface AlertDialogBaseProps {
|
|
6
6
|
open: boolean;
|
|
7
7
|
setOpen: (open: boolean) => void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement, ReactNode } from "react";
|
|
2
|
+
import * as RadixDialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { CloseDialog, CloseDialogWithOptions } from "../typings";
|
|
4
|
+
export interface BaseDialogProps {
|
|
5
|
+
/** The content to be displayed within the Overlay. A prop pattern with a passed close function that can be used to
|
|
6
|
+
* close the Overlay from the components rendering the content. pass {force: true} to the close function to avoid
|
|
7
|
+
* the onInterruptClose process when using in an uncontrolled state. NOTE: when controlling the open state of the overlay,
|
|
8
|
+
* the close function will have no effect on the open state of the Overlay */
|
|
9
|
+
content: (close: CloseDialogWithOptions) => ReactNode;
|
|
10
|
+
/** the element that should act as a trigger for opening the Overlay */
|
|
11
|
+
children?: ReactElement;
|
|
12
|
+
/** the initial open state of the Overlay */
|
|
13
|
+
defaultOpen?: RadixDialogPrimitive.DialogProps["defaultOpen"];
|
|
14
|
+
/** callback that is fired upon closing of the Overlay calls the close function to continue the closing process.
|
|
15
|
+
* If the close function is not called, the Overlay will not be closed */
|
|
16
|
+
onInterruptClose?: (close: CloseDialog) => void;
|
|
17
|
+
/** callback fired when the Overlay is being closed, if onInterruptClose is specified, it fires if the closing process
|
|
18
|
+
* is continued by calling the close function within the callback passed to onInterruptClose.
|
|
19
|
+
* */
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
open?: boolean;
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: CSSProperties;
|
|
25
|
+
/** when true, renders an unstyled overlay filling the Overlays parent container */
|
|
26
|
+
overlay?: boolean;
|
|
27
|
+
/** className to be applied to the overlay component */
|
|
28
|
+
overlayClass?: string;
|
|
29
|
+
/** style object to be applied to the overlay component */
|
|
30
|
+
overlayStyle?: CSSProperties;
|
|
31
|
+
}
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export interface OverlayProps {
|
|
5
|
-
/** The content to be displayed within the Overlay. A prop pattern with a passed close function that can be used to
|
|
6
|
-
* close the Overlay from the components rendering the content. pass {force: true} to the close function to avoid
|
|
7
|
-
* the onInterruptClose process when using in an uncontrolled state. NOTE: when controlling the open state of the overlay,
|
|
8
|
-
* the close function will have no effect on the open state of the Overlay */
|
|
9
|
-
content: (close: CloseDialogWithOptions) => ReactNode;
|
|
10
|
-
/** the element that should act as a trigger for opening the Overlay */
|
|
11
|
-
children?: ReactElement;
|
|
12
|
-
/** the initial open state of the Overlay */
|
|
13
|
-
defaultOpen?: RadixDialogPrimitive.DialogProps["defaultOpen"];
|
|
14
|
-
/** callback that is fired upon closing of the Overlay calls the close function to continue the closing process.
|
|
15
|
-
* If the close function is not called, the Overlay will not be closed */
|
|
16
|
-
onInterruptClose?: (close: CloseDialog) => void;
|
|
17
|
-
/** callback fired when the Overlay is being closed, if onInterruptClose is specified, it fires if the closing process
|
|
18
|
-
* is continued by calling the close function within the callback passed to onInterruptClose.
|
|
19
|
-
* */
|
|
20
|
-
onClose?: () => void;
|
|
21
|
-
open?: boolean;
|
|
22
|
-
onOpenChange?: (open: boolean) => void;
|
|
23
|
-
className?: string;
|
|
24
|
-
style?: CSSProperties;
|
|
25
|
-
/** when true, renders an unstyled overlay filling the Overlays parent container */
|
|
26
|
-
overlay?: boolean;
|
|
27
|
-
/** className to be applied to the overlay component */
|
|
28
|
-
overlayClass?: string;
|
|
29
|
-
/** style object to be applied to the overlay component */
|
|
30
|
-
overlayStyle?: CSSProperties;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseDialogProps } from "../BaseDialog";
|
|
3
|
+
export interface OverlayProps extends BaseDialogProps {
|
|
31
4
|
}
|
|
32
5
|
/** The Overlay component is a versatile UI element designed to provide a layer above the existing content.
|
|
33
6
|
* It serves various purposes such as modals, popovers, tooltips, or any other temporary or context-based UI overlay.*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OvermapInputItemProps } from "./typings";
|
|
3
|
+
/** The OvermapInputItem component is used as a Base Component to provide an input-based element that follows the
|
|
4
|
+
* OvermapItem layout, in an item-like format. It supports responsive sizing and slot props to insert content to the
|
|
5
|
+
* left and right of its input field. */
|
|
6
|
+
export declare const OvermapInputItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<OvermapInputItemProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>>;
|
|
@@ -16,5 +16,9 @@ export interface OvermapItemProps extends Omit<HTMLProps<HTMLDivElement>, "ref"
|
|
|
16
16
|
rightSlot?: ReactNode;
|
|
17
17
|
/** supports five different sizes, changing the overall proportions of the OvermapItem including font size. */
|
|
18
18
|
size?: OvermapResponsive<OvermapItemSizes>;
|
|
19
|
+
/** displays the item in a "compact" mode.
|
|
20
|
+
* leftSlot and rightSlot won't be visible, and the width and height are the same
|
|
21
|
+
* based on the "size" prop. */
|
|
22
|
+
compact?: boolean;
|
|
19
23
|
}
|
|
20
24
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OvermapItemGroupProps } from "./typings";
|
|
3
|
+
export declare const OvermapItemGroup: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<OvermapItemGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OvermapItemProps } from "../OvermapItem";
|
|
3
|
+
interface OvermapItemGroupContext {
|
|
4
|
+
size: OvermapItemProps["size"];
|
|
5
|
+
compact: OvermapItemProps["compact"];
|
|
6
|
+
}
|
|
7
|
+
export declare const OvermapItemGroupContext: import("react").Context<OvermapItemGroupContext>;
|
|
8
|
+
export declare const useOvermapItemGroupContext: () => OvermapItemGroupContext;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Grid } from "@radix-ui/themes";
|
|
3
|
+
import { OvermapItemProps } from "../OvermapItem";
|
|
4
|
+
export interface OvermapItemGroupProps extends ComponentProps<typeof Grid> {
|
|
5
|
+
size?: OvermapItemProps["size"];
|
|
6
|
+
compact?: OvermapItemProps["compact"];
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PaginationStatus } from "./typings
|
|
3
|
-
import { Size } from "../typings
|
|
2
|
+
import { PaginationStatus } from "./typings";
|
|
3
|
+
import { Size } from "../typings";
|
|
4
4
|
type PaginationControlsProps = Pick<PaginationStatus<unknown>, "currentPage" | "setCurrentPage" | "visiblePages"> & {
|
|
5
5
|
size: Size;
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PaginationStatus } from "./typings
|
|
1
|
+
import { PaginationStatus } from "./typings";
|
|
2
2
|
export declare const usePagination: <TItem>(items: TItem[], itemsPerPage: number, maxVisiblePages: number) => PaginationStatus<TItem>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconBaseProps } from "react-icons";
|
|
3
|
+
interface RemixIconProps extends IconBaseProps {
|
|
4
|
+
icon: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const RiIcon: import("react").MemoExoticComponent<(props: RemixIconProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RiIcon";
|
package/dist/Select/Select.d.ts
CHANGED
package/dist/Select/typings.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import { Responsive, Select as RadixSelect } from "@radix-ui/themes";
|
|
3
|
-
import { Severity, Size, Variant } from "../typings
|
|
3
|
+
import { Severity, Size, Variant } from "../typings";
|
|
4
4
|
type RadixSelectItemProps = ComponentProps<typeof RadixSelect.Item>;
|
|
5
5
|
type RadixSelectContentProps = ComponentProps<typeof RadixSelect.Content>;
|
|
6
6
|
export interface SelectItemProps extends Omit<RadixSelectItemProps, "asChild" | "textValue"> {
|
|
@@ -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 {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MultiSelectContext, SingleSelectContext } from "./typings";
|
|
3
|
+
export type ISelectContext = SingleSelectContext | MultiSelectContext;
|
|
4
|
+
export declare const SelectContext: import("react").Context<ISelectContext>;
|
|
5
|
+
export declare function useSelectContext<Type = SingleSelectContext | MultiSelectContext>(): Type;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type SingleSelectContext = {
|
|
2
|
+
type: "single";
|
|
3
|
+
value: string | null;
|
|
4
|
+
handleValueChange: (value: string | null) => void;
|
|
5
|
+
};
|
|
6
|
+
export type MultiSelectContext = {
|
|
7
|
+
type: "multi";
|
|
8
|
+
values: string[];
|
|
9
|
+
handleValuesChange: (value: string[]) => void;
|
|
10
|
+
};
|
package/dist/Table/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./Table";
|
|
2
|
-
export * from "./typings
|
|
2
|
+
export * from "./typings";
|