@overmap-ai/blocks 0.0.2-alpha.3 → 0.0.3-alpha.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/ButtonGroup/ButtonList.d.ts +24 -0
- package/dist/ButtonGroup/index.d.ts +2 -1
- package/dist/ButtonGroup/typings.d.ts +5 -5
- package/dist/Dialogs/Dialog/Dialog.d.ts +1 -1
- package/dist/Dialogs/Dialog/index.d.ts +1 -0
- package/dist/Dialogs/Dialog/typings.d.ts +9 -9
- package/dist/blocks.js +588 -539
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +2 -2
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { ButtonGroupProps } from ".";
|
|
3
|
+
import { ButtonProps } from "../Buttons/typings";
|
|
4
|
+
import { Responsive, Size } from "..";
|
|
5
|
+
interface ButtonListRootProps extends Pick<ButtonGroupProps, "size" | "variant" | "children"> {
|
|
6
|
+
/** @default "medium" */
|
|
7
|
+
size?: Responsive<Exclude<Size, "large">>;
|
|
8
|
+
/** @default outline */
|
|
9
|
+
variant?: Exclude<ButtonGroupProps["variant"], "solid">;
|
|
10
|
+
/** Content to display before the list but within the card */
|
|
11
|
+
before?: ReactNode;
|
|
12
|
+
/** Content to display after the list but within the card */
|
|
13
|
+
after?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/** A specialized version of `ButtonGroup` for vertical list of block-like buttons. */
|
|
17
|
+
export declare const ButtonListRoot: FC<ButtonListRootProps>;
|
|
18
|
+
interface ButtonListItemProps extends Omit<ButtonProps, "size" | "variant" | "severity" | "fluid"> {
|
|
19
|
+
}
|
|
20
|
+
export declare const ButtonList: {
|
|
21
|
+
Root: FC<ButtonListRootProps>;
|
|
22
|
+
Item: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<ButtonListItemProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -4,19 +4,19 @@ import { Severity, Size, Variant } from "../typings.ts";
|
|
|
4
4
|
import { ButtonHoverEffect } from "../Buttons";
|
|
5
5
|
export interface ButtonGroupProps extends Omit<ComponentProps<typeof Flex>, keyof MarginProps | "size" | "direction" | "asChild"> {
|
|
6
6
|
/** The direction in which the Buttons within the ButtonGroup are stacked
|
|
7
|
-
* @default
|
|
7
|
+
* @default row
|
|
8
8
|
* */
|
|
9
9
|
direction?: "column" | "row";
|
|
10
10
|
/** The size of the ButtonGroup, will be applied to all Buttons contained within the ButtonGroup
|
|
11
|
-
* @default
|
|
11
|
+
* @default medium
|
|
12
12
|
* */
|
|
13
13
|
size?: Responsive<Size>;
|
|
14
14
|
/** The variant of the ButtonGroup, will be applied to all Buttons contained within the ButtonGroup
|
|
15
|
-
* @default
|
|
15
|
+
* @default solid
|
|
16
16
|
* */
|
|
17
17
|
variant?: Variant;
|
|
18
18
|
/** The severity of the ButtonGroup, will be applied to all Buttons contained within the ButtonGroup
|
|
19
|
-
* @default
|
|
19
|
+
* @default primary
|
|
20
20
|
* */
|
|
21
21
|
severity?: Severity;
|
|
22
22
|
/** The hover effects of the ButtonGroup, will be applied to all Buttons contained within the ButtonGroup */
|
|
@@ -29,5 +29,5 @@ export interface ButtonGroupProps extends Omit<ComponentProps<typeof Flex>, keyo
|
|
|
29
29
|
/** When set to true, all Buttons will fill as much space as possible within the ButtonGroup
|
|
30
30
|
* @default false
|
|
31
31
|
* */
|
|
32
|
-
fluid
|
|
32
|
+
fluid?: boolean;
|
|
33
33
|
}
|
|
@@ -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").
|
|
7
|
+
export declare const Dialog: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<DialogProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
-
/**
|
|
12
|
-
children:
|
|
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
|
|
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. */
|