@overmap-ai/blocks 1.0.27 → 1.0.28

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.
Files changed (73) hide show
  1. package/dist/Buttons/index.d.ts +1 -1
  2. package/dist/Buttons/typings.d.ts +7 -5
  3. package/dist/CollapsibleTree/CollapsibleTree.d.ts +5 -0
  4. package/dist/CollapsibleTree/context.d.ts +14 -0
  5. package/dist/CollapsibleTree/index.d.ts +2 -0
  6. package/dist/CollapsibleTree/typings.d.ts +71 -0
  7. package/dist/DialogMenu/Provider.d.ts +6 -0
  8. package/dist/DialogMenu/components/DialogCommandMenu.d.ts +6 -0
  9. package/dist/DialogMenu/components/DialogMultiSelectMenu.d.ts +6 -0
  10. package/dist/DialogMenu/components/DialogSelectMenu.d.ts +7 -0
  11. package/dist/DialogMenu/components/index.d.ts +3 -0
  12. package/dist/DialogMenu/constants.d.ts +3 -0
  13. package/dist/DialogMenu/content/Content.d.ts +8 -0
  14. package/dist/DialogMenu/content/SubContent.d.ts +5 -0
  15. package/dist/DialogMenu/content/index.d.ts +2 -0
  16. package/dist/DialogMenu/context.d.ts +14 -0
  17. package/dist/DialogMenu/groups/Group.d.ts +3 -0
  18. package/dist/DialogMenu/groups/MultiSelectGroup.d.ts +3 -0
  19. package/dist/DialogMenu/groups/SelectGroup.d.ts +3 -0
  20. package/dist/DialogMenu/groups/index.d.ts +3 -0
  21. package/dist/DialogMenu/index.d.ts +20 -0
  22. package/dist/DialogMenu/items/Item.d.ts +3 -0
  23. package/dist/DialogMenu/items/MultiSelectItem.d.ts +3 -0
  24. package/dist/DialogMenu/items/SelectItem.d.ts +3 -0
  25. package/dist/DialogMenu/items/Separator.d.ts +4 -0
  26. package/dist/DialogMenu/items/SubTrigger.d.ts +3 -0
  27. package/dist/DialogMenu/items/index.d.ts +5 -0
  28. package/dist/DialogMenu/root/Root.d.ts +6 -0
  29. package/dist/DialogMenu/root/index.d.ts +1 -0
  30. package/dist/DialogMenu/typings.d.ts +59 -0
  31. package/dist/Dialogs/BaseDialog/BaseDialog.d.ts +3 -0
  32. package/dist/Dialogs/BaseDialog/index.d.ts +2 -0
  33. package/dist/Dialogs/BaseDialog/typings.d.ts +31 -0
  34. package/dist/Dialogs/Dialog/typings.d.ts +2 -7
  35. package/dist/Dialogs/Dialog/utils.d.ts +1 -1
  36. package/dist/Dialogs/Overlay/Overlay.d.ts +7 -0
  37. package/dist/Dialogs/Overlay/index.d.ts +1 -0
  38. package/dist/Dialogs/index.d.ts +2 -0
  39. package/dist/Dialogs/typings.d.ts +5 -0
  40. package/dist/DownloadButtonUtility/DownloadButtonUtility.d.ts +7 -0
  41. package/dist/DownloadButtonUtility/index.d.ts +1 -0
  42. package/dist/Layout/SlideOutOverlay.d.ts +2 -2
  43. package/dist/Layout/index.d.ts +1 -1
  44. package/dist/OvermapInputItem/OvermapInputItem.d.ts +6 -0
  45. package/dist/OvermapInputItem/index.d.ts +2 -0
  46. package/dist/OvermapInputItem/typings.d.ts +4 -0
  47. package/dist/OvermapItem/OvermapItem.d.ts +5 -0
  48. package/dist/OvermapItem/constants.d.ts +2 -0
  49. package/dist/OvermapItem/index.d.ts +2 -0
  50. package/dist/OvermapItem/typings.d.ts +24 -0
  51. package/dist/OvermapItemGroup/OvermapItemGroup.d.ts +3 -0
  52. package/dist/OvermapItemGroup/context.d.ts +9 -0
  53. package/dist/OvermapItemGroup/index.d.ts +3 -0
  54. package/dist/OvermapItemGroup/typings.d.ts +7 -0
  55. package/dist/RiIcon/RiIcon.d.ts +7 -0
  56. package/dist/RiIcon/index.d.ts +1 -0
  57. package/dist/SelectContext/Provider.d.ts +14 -0
  58. package/dist/SelectContext/context.d.ts +5 -0
  59. package/dist/SelectContext/index.d.ts +3 -0
  60. package/dist/SelectContext/typings.d.ts +10 -0
  61. package/dist/Table/typings.d.ts +1 -0
  62. package/dist/ToggleButton/ToggleButton.d.ts +8 -0
  63. package/dist/ToggleButton/index.d.ts +1 -0
  64. package/dist/blocks.js +1012 -164
  65. package/dist/blocks.js.map +1 -1
  66. package/dist/blocks.umd.cjs +1013 -169
  67. package/dist/blocks.umd.cjs.map +1 -1
  68. package/dist/constants.d.ts +1 -0
  69. package/dist/index.d.ts +9 -1
  70. package/dist/style.css +100 -28
  71. package/dist/typings.d.ts +4 -0
  72. package/dist/utils.d.ts +10 -4
  73. package/package.json +8 -3
@@ -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";
@@ -6,11 +6,7 @@ export interface Shortcut {
6
6
  action: () => void;
7
7
  disabled?: boolean;
8
8
  }
9
- export type RadixButtonProps = React.ComponentProps<typeof RadixButton>;
10
- export type ButtonHoverEffect = "spin90Clockwise" | "spin180Clockwise" | "spin360Clockwise";
11
- export interface ButtonProps extends Omit<RadixButtonProps, "size" | "variant" | "loading" | keyof MarginProps> {
12
- children: RadixButtonProps["children"];
13
- /** @default false */
9
+ export interface ButtonStyleProps {
14
10
  fluid?: boolean;
15
11
  /** @default solid */
16
12
  variant?: Variant;
@@ -18,6 +14,12 @@ export interface ButtonProps extends Omit<RadixButtonProps, "size" | "variant" |
18
14
  severity?: Severity;
19
15
  size?: Responsive<Size>;
20
16
  hoverEffects?: ButtonHoverEffect[];
17
+ highContrast?: boolean;
18
+ }
19
+ export type RadixButtonProps = React.ComponentProps<typeof RadixButton>;
20
+ export type ButtonHoverEffect = "spin90Clockwise" | "spin180Clockwise" | "spin360Clockwise";
21
+ export interface ButtonProps extends Omit<RadixButtonProps, "size" | "variant" | "loading" | keyof MarginProps>, ButtonStyleProps {
22
+ children: RadixButtonProps["children"];
21
23
  shortcut?: Shortcut;
22
24
  loading?: boolean;
23
25
  }
@@ -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,2 @@
1
+ export * from "./CollapsibleTree";
2
+ export * from "./typings";
@@ -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,3 @@
1
+ export * from "./DialogCommandMenu";
2
+ export * from "./DialogSelectMenu";
3
+ export * from "./DialogMultiSelectMenu";
@@ -0,0 +1,3 @@
1
+ import { OvermapItemSizes } from "../OvermapItem";
2
+ export declare const DEFAULT_DIALOG_MENU_SIZE: OvermapItemSizes;
3
+ export declare const DEFAULT_SELECTED_INDICATOR: import("react/jsx-runtime").JSX.Element;
@@ -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,2 @@
1
+ export { Content } from "./Content";
2
+ export * from "./SubContent";
@@ -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 { DialogGroupProps } from "../typings";
3
+ export declare const Group: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogGroupProps & import("react").RefAttributes<HTMLDivElement>>>;
@@ -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,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogSelectGroupProps } from "../typings";
3
+ export declare const SelectGroup: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogSelectGroupProps & import("react").RefAttributes<HTMLDivElement>>>;
@@ -0,0 +1,3 @@
1
+ export * from "./Group";
2
+ export * from "./SelectGroup";
3
+ export * from "./MultiSelectGroup";
@@ -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 { DialogItemProps } from "../typings";
3
+ export declare const Item: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogItemProps & import("react").RefAttributes<HTMLDivElement>>>;
@@ -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,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogSelectItemProps } from "../typings";
3
+ export declare const SelectItem: 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,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogSubTriggerProps } from "../typings";
3
+ export declare const SubTrigger: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DialogSubTriggerProps & import("react").RefAttributes<HTMLDivElement>>>;
@@ -0,0 +1,5 @@
1
+ export * from "./Item";
2
+ export * from "./SelectItem";
3
+ export * from "./MultiSelectItem";
4
+ export * from "./SubTrigger";
5
+ export * from "./Separator";
@@ -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 {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { BaseDialogProps } from "./typings";
3
+ export declare const BaseDialog: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<BaseDialogProps & import("react").RefAttributes<HTMLDivElement>>>;
@@ -0,0 +1,2 @@
1
+ export * from "./BaseDialog";
2
+ export * from "./typings";
@@ -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,11 +1,6 @@
1
+ import React, { ReactNode } from "react";
1
2
  import { DialogContent } from "@radix-ui/themes";
2
- import { CloseDialog } from "../typings";
3
- import { ReactNode } from "react";
4
- export interface CloseDialogOptions {
5
- /** Bypass the `onCloseInterrupt` and force the dialog to close */
6
- force?: boolean;
7
- }
8
- export type CloseDialogWithOptions = (options?: CloseDialogOptions) => void;
3
+ import { CloseDialog, CloseDialogWithOptions } from "../typings";
9
4
  type RadixDialogContentProps = React.ComponentProps<typeof DialogContent>;
10
5
  export interface DialogProps extends Omit<RadixDialogContentProps, "content" | "children"> {
11
6
  /** The content of the dialog, which is rendered below the description.
@@ -1,4 +1,4 @@
1
- import { CloseDialogOptions, CloseDialogWithOptions } from "./typings.ts";
1
+ import { CloseDialogOptions, CloseDialogWithOptions } from "../typings";
2
2
  /** This custom hook is used as a utility for wrapping a general callback in callback that accepts a close function for the
3
3
  * Blocks dialog component. Sometimes a side effect callback needs to be run upon the closure of a Dialog. This provides
4
4
  * a hook to wrap a callback with the returned close function passed to the Dialog Content. This allows the closure of
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { BaseDialogProps } from "../BaseDialog";
3
+ export interface OverlayProps extends BaseDialogProps {
4
+ }
5
+ /** The Overlay component is a versatile UI element designed to provide a layer above the existing content.
6
+ * It serves various purposes such as modals, popovers, tooltips, or any other temporary or context-based UI overlay.*/
7
+ export declare const Overlay: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<OverlayProps & import("react").RefAttributes<HTMLDivElement>>>;
@@ -0,0 +1 @@
1
+ export * from "./Overlay";
@@ -1,2 +1,4 @@
1
1
  export * from "./Dialog/";
2
2
  export * from "./AlertDialog/";
3
+ export * from "./Overlay";
4
+ export * from "./typings";
@@ -1,2 +1,7 @@
1
1
  /** Triggers the dialog to close */
2
2
  export type CloseDialog = () => void;
3
+ export interface CloseDialogOptions {
4
+ /** Bypass the `onCloseInterrupt` and force the dialog to close */
5
+ force?: boolean;
6
+ }
7
+ export type CloseDialogWithOptions = (options?: CloseDialogOptions) => void;
@@ -0,0 +1,7 @@
1
+ import { ReactElement } from "react";
2
+ interface DownloadButtonUtilityProps {
3
+ children: ReactElement;
4
+ file: File;
5
+ }
6
+ export declare const DownloadButtonUtility: import("react").MemoExoticComponent<(props: DownloadButtonUtilityProps) => import("react/jsx-runtime").JSX.Element>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./DownloadButtonUtility";
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { PropsWithClassNameAndStyle } from "../typings";
3
3
  import { SlideOutV3Props } from "../SlideOutV3";
4
- export interface OverlayProps extends PropsWithClassNameAndStyle {
4
+ export interface LayoutOverlayProps extends PropsWithClassNameAndStyle {
5
5
  active?: boolean;
6
6
  side: SlideOutV3Props["side"];
7
7
  smallModeOnly?: boolean;
8
8
  }
9
- export declare const SlideOutOverlay: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<OverlayProps & import("react").RefAttributes<HTMLDivElement>>>;
9
+ export declare const SlideOutOverlay: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<LayoutOverlayProps & import("react").RefAttributes<HTMLDivElement>>>;
@@ -2,7 +2,7 @@
2
2
  export declare const Layout: {
3
3
  Root: import("react").MemoExoticComponent<(props: import("./Root").RootProps) => import("react/jsx-runtime").JSX.Element>;
4
4
  Container: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("./Container").ContainerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
5
- SlideOutOverlay: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOutOverlay").OverlayProps & import("react").RefAttributes<HTMLDivElement>>>;
5
+ SlideOutOverlay: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOutOverlay").LayoutOverlayProps & import("react").RefAttributes<HTMLDivElement>>>;
6
6
  LeftSlideOut: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOut").LayoutSlideOutProps & import("react").RefAttributes<HTMLDivElement>>>;
7
7
  RightSlideOut: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOut").LayoutSlideOutProps & import("react").RefAttributes<HTMLDivElement>>>;
8
8
  SlideOutTrigger: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOutTrigger").SlideOutTriggerProps & import("react").RefAttributes<HTMLButtonElement>>>;
@@ -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>>>;
@@ -0,0 +1,2 @@
1
+ export * from "./OvermapInputItem";
2
+ export * from "./typings";
@@ -0,0 +1,4 @@
1
+ import { HTMLProps } from "react";
2
+ import { OvermapItemProps } from "../OvermapItem";
3
+ export interface OvermapInputItemProps extends Pick<OvermapItemProps, "size" | "leftSlot" | "rightSlot">, Omit<HTMLProps<HTMLInputElement>, "size"> {
4
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { OvermapItemProps } from "./typings";
3
+ /** The OvermapItem component is supposed to be used as a Base Component to layout content in an item-like format. It
4
+ * supports responsive sizing and slot props to insert content to the left and right of its children. */
5
+ export declare const OvermapItem: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<OvermapItemProps & import("react").RefAttributes<HTMLDivElement>>>;
@@ -0,0 +1,2 @@
1
+ import { OvermapItemSizes, SizeDependableProps } from "./typings";
2
+ export declare const OvermapItemSizeDependantProps: Record<OvermapItemSizes, SizeDependableProps>;
@@ -0,0 +1,2 @@
1
+ export * from "./OvermapItem";
2
+ export * from "./typings";
@@ -0,0 +1,24 @@
1
+ import { HTMLProps, ReactNode, ComponentProps } from "react";
2
+ import { Flex } from "@radix-ui/themes";
3
+ import { OvermapResponsive } from "../typings";
4
+ type FlexProps = ComponentProps<typeof Flex>;
5
+ export interface SizeDependableProps {
6
+ gap: FlexProps["gap"];
7
+ px: FlexProps["px"];
8
+ height: FlexProps["height"];
9
+ fontSize: string;
10
+ }
11
+ export type OvermapItemSizes = "1" | "2" | "3" | "4" | "5";
12
+ export interface OvermapItemProps extends Omit<HTMLProps<HTMLDivElement>, "ref" | "width" | "height" | "wrap" | "size"> {
13
+ /** content to be rendered on the left of any children */
14
+ leftSlot?: ReactNode;
15
+ /** content to be rendered on the right of any children */
16
+ rightSlot?: ReactNode;
17
+ /** supports five different sizes, changing the overall proportions of the OvermapItem including font size. */
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;
23
+ }
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,3 @@
1
+ export { useOvermapItemGroupContext } from "./context";
2
+ export * from "./typings";
3
+ export * from "./OvermapItemGroup";
@@ -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
+ }
@@ -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";