@overmap-ai/blocks 0.0.9-alpha.6 → 0.0.9
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/Dialogs/AlertDialog/typings.d.ts +2 -2
- package/dist/Dialogs/Dialog/typings.d.ts +17 -13
- package/dist/DropdownMenu/typings.d.ts +1 -0
- package/dist/Popover/typings.d.ts +7 -5
- package/dist/blocks.js +308 -296
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +2 -2
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -19,11 +19,11 @@ export interface AlertDialogStandardContent {
|
|
|
19
19
|
/** Textual content of the action button
|
|
20
20
|
* @default Confirm
|
|
21
21
|
*/
|
|
22
|
-
actionText?:
|
|
22
|
+
actionText?: ReactNode;
|
|
23
23
|
/** Textual content of the cancel button
|
|
24
24
|
* @default Cancel
|
|
25
25
|
*/
|
|
26
|
-
cancelText?:
|
|
26
|
+
cancelText?: ReactNode;
|
|
27
27
|
/**
|
|
28
28
|
* The severity (color) of the action button.
|
|
29
29
|
* @default primary
|
|
@@ -7,33 +7,37 @@ 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 extends Omit<RadixDialogContentProps, "content"> {
|
|
11
|
-
/** The button triggering the dialog to open. */
|
|
12
|
-
children: ReactNode;
|
|
10
|
+
export interface DialogProps extends Omit<RadixDialogContentProps, "content" | "children"> {
|
|
13
11
|
/** The content of the dialog, which is rendered below the description.
|
|
14
12
|
* Should include buttons to close the dialog.
|
|
15
13
|
*/
|
|
16
14
|
content: (close: CloseDialogWithOptions) => ReactNode;
|
|
15
|
+
/** The title of the Dialog should only be a few words */
|
|
16
|
+
title: string;
|
|
17
|
+
/** The description of the Dialog should explain what is happening and possible ramifications. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** The button triggering the dialog to open. */
|
|
20
|
+
children?: ReactNode;
|
|
17
21
|
/** Should the dialog be opened by default when the page is first rendered.
|
|
18
22
|
* @default false
|
|
19
23
|
*/
|
|
20
24
|
defaultOpen?: boolean;
|
|
25
|
+
/** Called when the dialog opens. Unlike `onCloseInterrupt`, it does not interrupt the dialog opening */
|
|
26
|
+
onOpen?: () => void;
|
|
27
|
+
/** Interrupts the close process; use the provided `confirmClose` callback to continue the close process. */
|
|
28
|
+
onCloseInterrupt?: (confirmClose: CloseDialog) => void;
|
|
29
|
+
/** Called when the dialog closes. If used in conjunction with `onCloseInterrupt`,
|
|
30
|
+
* the `onClose` callback executes when the `confirmClose` callback is called. */
|
|
31
|
+
onClose?: () => void;
|
|
21
32
|
/** Manually control the open state
|
|
22
|
-
* @deprecated Use `defaultOpen` and `Trigger`
|
|
33
|
+
* @deprecated Use `defaultOpen` and `Trigger` when possible as they are more
|
|
34
|
+
* accessible and correctly handle focus when the dialog is closed.
|
|
23
35
|
*/
|
|
24
36
|
open?: boolean;
|
|
25
37
|
/** Manually control the open state changes.
|
|
26
|
-
* @deprecated Use `onOpen` and `onCloseInterrupt`
|
|
38
|
+
* @deprecated Use `onOpen` and `onCloseInterrupt` when possible.
|
|
27
39
|
*/
|
|
28
40
|
onOpenChange?: (open: boolean) => void;
|
|
29
|
-
/** The title of the Dialog should only be a few words */
|
|
30
|
-
title: string;
|
|
31
|
-
/** The description of the Dialog should explain what is happening and possible ramifications. */
|
|
32
|
-
description?: string;
|
|
33
|
-
/** Called with the dialog opens. Unlike `onCloseInterrupt`, it does not interrupt the dialog opening */
|
|
34
|
-
onOpen?: () => void;
|
|
35
|
-
/** Interrupts the close process; use the provided `confirmClose` callback to continue the close process. */
|
|
36
|
-
onCloseInterrupt?: (confirmClose: CloseDialog) => void;
|
|
37
41
|
}
|
|
38
42
|
export interface DialogContentProps extends Pick<DialogProps, "title" | "description" | "content"> {
|
|
39
43
|
closeDialog: CloseDialogWithOptions;
|
|
@@ -31,6 +31,7 @@ export interface DropdownMenuProps extends Omit<ComponentProps<typeof RadixDropd
|
|
|
31
31
|
severity?: Severity;
|
|
32
32
|
trigger: ReactNode;
|
|
33
33
|
label?: ReactNode;
|
|
34
|
+
disabled?: boolean;
|
|
34
35
|
}
|
|
35
36
|
export interface DropdownSubMenuProps extends Omit<ComponentProps<typeof RadixDropdownMenu.SubContent>, "asChild" | "color"> {
|
|
36
37
|
defaultOpen?: RadixDropdownMenuSubProps["defaultOpen"];
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
1
|
+
import React, { ReactElement, ReactNode } from "react";
|
|
2
2
|
import { Popover as RadixPopover } from "@radix-ui/themes";
|
|
3
3
|
type RadixPopoverRootProps = React.ComponentProps<typeof RadixPopover.Root>;
|
|
4
4
|
type RadixPopoverContentProps = React.ComponentProps<typeof RadixPopover.Content>;
|
|
5
5
|
export interface PopoverProps extends Omit<RadixPopoverContentProps, "children" | "content"> {
|
|
6
|
-
/**
|
|
6
|
+
/** trigger will represent the content contained within the popover,
|
|
7
7
|
it is using the RenderProps pattern to pass a 'Close' tag which
|
|
8
8
|
can be used to wrap any components in to close the popover on click of those said components*/
|
|
9
|
-
|
|
10
|
-
/** The
|
|
11
|
-
children: ReactNode;
|
|
9
|
+
trigger: ReactElement;
|
|
10
|
+
/** The content of the popover */
|
|
11
|
+
children: (Close: typeof RadixPopover.Close) => ReactNode;
|
|
12
12
|
/** determines if popover should default to open on render */
|
|
13
13
|
defaultOpen?: RadixPopoverRootProps["defaultOpen"];
|
|
14
14
|
/** if true disables interaction with other elements until popover is closed*/
|
|
15
15
|
modal?: RadixPopoverRootProps["modal"];
|
|
16
|
+
open?: RadixPopoverRootProps["open"];
|
|
17
|
+
onOpenChange?: RadixPopoverRootProps["onOpenChange"];
|
|
16
18
|
}
|
|
17
19
|
export {};
|