@overmap-ai/blocks 0.0.2 → 0.0.3

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.
@@ -3,7 +3,7 @@ import { Button as RadixButton, MarginProps, Responsive } from "@radix-ui/themes
3
3
  import { Severity, Size, Variant } from "../typings.ts";
4
4
  export type RadixButtonProps = React.ComponentProps<typeof RadixButton>;
5
5
  export type ButtonHoverEffect = "spin90Clockwise" | "spin180Clockwise" | "spin360Clockwise";
6
- export interface ButtonProps extends Omit<RadixButtonProps, "size" | "color" | "variant" | keyof MarginProps> {
6
+ export interface ButtonProps extends Omit<RadixButtonProps, "size" | "variant" | keyof MarginProps> {
7
7
  children: RadixButtonProps["children"];
8
8
  /** @default false */
9
9
  fluid?: boolean;
@@ -4,4 +4,4 @@ import { DialogProps } from "./typings";
4
4
  * Display or collect information in a modal. Unlike the `AlertDialog`, the `Dialog`'s can be nested
5
5
  * and close when clicking outside of the dialog content.
6
6
  */
7
- export declare const Dialog: import("react").NamedExoticComponent<DialogProps>;
7
+ export declare const Dialog: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<DialogProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
@@ -1 +1,2 @@
1
1
  export * from "./Dialog";
2
+ export * from "./typings";
@@ -1,4 +1,4 @@
1
- import { DialogTrigger, DialogContent } from "@radix-ui/themes";
1
+ import { DialogContent } from "@radix-ui/themes";
2
2
  import { CloseDialog } from "../typings";
3
3
  import { ReactNode } from "react";
4
4
  export interface CloseDialogOptions {
@@ -7,21 +7,21 @@ export interface CloseDialogOptions {
7
7
  }
8
8
  export type CloseDialogWithOptions = (options?: CloseDialogOptions) => void;
9
9
  type RadixDialogContentProps = React.ComponentProps<typeof DialogContent>;
10
- export interface DialogProps {
11
- /** Use the `Trigger` to open the dialog by wrapping it around a button */
12
- children: (Trigger: typeof DialogTrigger) => ReactNode;
10
+ export interface DialogProps extends Omit<RadixDialogContentProps, "content"> {
11
+ /** The button triggering the dialog to open. */
12
+ children: ReactNode;
13
13
  /** The content of the dialog, which is rendered below the description.
14
14
  * Should include buttons to close the dialog.
15
15
  */
16
16
  content: (close: CloseDialogWithOptions) => ReactNode;
17
+ /** Should the dialog be opened by default when the page is first rendered.
18
+ * @default false
19
+ */
20
+ defaultOpen?: boolean;
17
21
  /** The title of the Dialog should only be a few words */
18
22
  title: string;
19
23
  /** The description of the Dialog should explain what is happening and possible ramifications. */
20
- description: string;
21
- /** Changes the padding of the dialog content
22
- * @default 3
23
- */
24
- size?: RadixDialogContentProps["size"];
24
+ description?: string;
25
25
  /** Called with the dialog opens. Unlike `onCloseInterrupt`, it does not interrupt the dialog opening */
26
26
  onOpen?: () => void;
27
27
  /** Interrupts the close process; use the provided `confirmClose` callback to continue the close process. */