@overmap-ai/blocks 1.0.23 → 1.0.25-component-forms.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/Checkbox/typings.d.ts +2 -0
- package/dist/Layout/Container.d.ts +5 -0
- package/dist/Layout/Root.d.ts +23 -0
- package/dist/Layout/SlideOut.d.ts +26 -0
- package/dist/Layout/SlideOutOverlay.d.ts +9 -0
- package/dist/Layout/SlideOutTrigger.d.ts +6 -0
- package/dist/Layout/index.d.ts +15 -0
- package/dist/SlideOut/SlideOutV2.d.ts +41 -0
- package/dist/SlideOut/index.d.ts +1 -1
- package/dist/SlideOutV3/SlideOutV3.d.ts +45 -0
- package/dist/SlideOutV3/index.d.ts +1 -0
- package/dist/SlideOutV3/utils.d.ts +14 -0
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/blocks.js +627 -231
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +622 -227
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/style.css +99 -50
- package/dist/typings.d.ts +5 -0
- package/package.json +2 -1
- package/dist/SlideOut/SlideOut.d.ts +0 -40
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode, ReactElement } from "react";
|
|
2
2
|
import { Checkbox as RadixCheckbox } from "@radix-ui/themes";
|
|
3
|
+
import { FlexProps } from "../Flex";
|
|
3
4
|
export type RadixCheckboxProps = React.ComponentProps<typeof RadixCheckbox>;
|
|
4
5
|
export type CheckboxValue = boolean | "indeterminate";
|
|
5
6
|
export interface CheckboxProps extends RadixCheckboxProps {
|
|
@@ -8,6 +9,7 @@ export interface CheckboxProps extends RadixCheckboxProps {
|
|
|
8
9
|
label?: ReactNode;
|
|
9
10
|
doesLabelCheck?: boolean;
|
|
10
11
|
alwaysShow?: boolean;
|
|
12
|
+
checkboxPosition?: FlexProps["align"];
|
|
11
13
|
}
|
|
12
14
|
export interface SelectAllCheckboxProps extends Omit<CheckboxProps, "checked"> {
|
|
13
15
|
children: Array<ReactElement<CheckboxProps>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Flex } from "@radix-ui/themes";
|
|
3
|
+
export interface ContainerProps extends ComponentProps<typeof Flex> {
|
|
4
|
+
}
|
|
5
|
+
export declare const Container: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<ContainerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Dispatch, PropsWithChildren, SetStateAction } from "react";
|
|
2
|
+
interface ILayoutContent {
|
|
3
|
+
small: boolean;
|
|
4
|
+
hideLayout: boolean;
|
|
5
|
+
/** controlled value for open state of LeftSlideOut Component. */
|
|
6
|
+
showLeftSlideOut: boolean;
|
|
7
|
+
setShowLeftSlideOut: Dispatch<SetStateAction<boolean>>;
|
|
8
|
+
/** controlled value for open state of RightSlideOut Component. */
|
|
9
|
+
showRightSlideOut: boolean;
|
|
10
|
+
setShowRightSlideOut: Dispatch<SetStateAction<boolean>>;
|
|
11
|
+
}
|
|
12
|
+
export declare const LayoutContext: import("react").Context<ILayoutContent>;
|
|
13
|
+
export interface RootProps extends PropsWithChildren {
|
|
14
|
+
/** TODO: DOCUMENT THIS HEAVILY
|
|
15
|
+
* @default false */
|
|
16
|
+
small?: boolean;
|
|
17
|
+
/** controls if all Layout Components should be hidden
|
|
18
|
+
* @default false */
|
|
19
|
+
hideLayout?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** */
|
|
22
|
+
export declare const Root: import("react").MemoExoticComponent<(props: RootProps) => import("react/jsx-runtime").JSX.Element>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SlideOutV2Props } from "../SlideOut";
|
|
3
|
+
import { SlideOutV3Props } from "../SlideOutV3";
|
|
4
|
+
interface SlideOutProps extends Omit<SlideOutV3Props, "open" | "initialWidth"> {
|
|
5
|
+
/** controls if the SlideOut is initially open once mounted when NOT in smallMode.
|
|
6
|
+
* NOTE: changing the value of this will cause the SlideOut to open/close after mounting NOT in smallMode depending on
|
|
7
|
+
* its passed in value.
|
|
8
|
+
* @default false */
|
|
9
|
+
defaultOpen?: {
|
|
10
|
+
small?: boolean;
|
|
11
|
+
large?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/** optional prop to control the open state of the SlideOut */
|
|
14
|
+
open?: SlideOutV2Props["open"];
|
|
15
|
+
/** optional prop to control the initialWidth of the SlideOut
|
|
16
|
+
* @default "30%" */
|
|
17
|
+
initialWidth?: SlideOutV2Props["initialWidth"];
|
|
18
|
+
}
|
|
19
|
+
/** Type used for both Layout.LeftSlideOut and Layout.RightSlideOut */
|
|
20
|
+
export interface LayoutSlideOutProps extends Omit<SlideOutProps, "side"> {
|
|
21
|
+
}
|
|
22
|
+
/** TODO: Document */
|
|
23
|
+
export declare const LeftSlideOut: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<LayoutSlideOutProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
24
|
+
/** TODO: Document */
|
|
25
|
+
export declare const RightSlideOut: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<LayoutSlideOutProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PropsWithClassNameAndStyle } from "../typings.ts";
|
|
3
|
+
import { SlideOutV3Props } from "../SlideOutV3";
|
|
4
|
+
export interface OverlayProps extends PropsWithClassNameAndStyle {
|
|
5
|
+
active?: boolean;
|
|
6
|
+
side: SlideOutV3Props["side"];
|
|
7
|
+
smallModeOnly?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const SlideOutOverlay: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<OverlayProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { SlideOutV3Props } from "../SlideOutV3";
|
|
3
|
+
export interface SlideOutTriggerProps extends PropsWithChildren {
|
|
4
|
+
side: SlideOutV3Props["side"];
|
|
5
|
+
}
|
|
6
|
+
export declare const SlideOutTrigger: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<SlideOutTriggerProps & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Layout: {
|
|
3
|
+
Root: import("react").MemoExoticComponent<(props: import("./Root").RootProps) => import("react/jsx-runtime").JSX.Element>;
|
|
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>>>;
|
|
6
|
+
LeftSlideOut: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOut").LayoutSlideOutProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
7
|
+
RightSlideOut: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOut").LayoutSlideOutProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
8
|
+
SlideOutTrigger: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SlideOutTrigger").SlideOutTriggerProps & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
9
|
+
};
|
|
10
|
+
export * from "./hooks";
|
|
11
|
+
export type * from "./Root";
|
|
12
|
+
export type * from "./Container";
|
|
13
|
+
export type * from "./SlideOutOverlay";
|
|
14
|
+
export type * from "./SlideOut";
|
|
15
|
+
export type * from "./SlideOutTrigger";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { FocusOutsideEvent, PointerDownOutsideEvent } from "@radix-ui/react-dismissable-layer";
|
|
3
|
+
import { PropsWithClassNameAndStyle } from "../typings.ts";
|
|
4
|
+
export type DismissibleEventTypes = PointerDownOutsideEvent | FocusOutsideEvent | KeyboardEvent;
|
|
5
|
+
export interface SlideOutV2Props extends PropsWithChildren, PropsWithClassNameAndStyle {
|
|
6
|
+
/** The controlled open state of the SlideOut */
|
|
7
|
+
open: boolean;
|
|
8
|
+
/** prop used to specify if the SlideOut is in modal mode or not. If in modal mode, onDismiss prop should be passed
|
|
9
|
+
* to the SlideOut component as well.
|
|
10
|
+
* @default false */
|
|
11
|
+
modal?: boolean;
|
|
12
|
+
/** The side the SlideOut should position on and "slide-in" from */
|
|
13
|
+
side: "left" | "right";
|
|
14
|
+
/** prop to control if the SlideOut can be resized by the user
|
|
15
|
+
* @default true
|
|
16
|
+
* */
|
|
17
|
+
resizeable?: boolean;
|
|
18
|
+
/** prop used to control the positioning of the SlideOut. When absolute, the SlideOut will overlay other
|
|
19
|
+
* content within its parent container. When relative, the SlideOut exists with and pushes other content within
|
|
20
|
+
* its parent container.
|
|
21
|
+
* @default "relative"
|
|
22
|
+
* */
|
|
23
|
+
position?: "relative" | "absolute";
|
|
24
|
+
/** prop used to specify the initialWidth of the SlideOut, can be expressed in any valid CSS size unit */
|
|
25
|
+
initialWidth: number | string;
|
|
26
|
+
/** prop used to specify the minimum width of the SlideOut can be expressed in any valid CSS size unit */
|
|
27
|
+
minWidth?: number | string;
|
|
28
|
+
/** prop used to specify the maximum width of the SlideOut can be expressed in any valid CSS size unit */
|
|
29
|
+
maxWidth?: number | string;
|
|
30
|
+
/** callback fired when the SlideOut should be dismissed (closed) when in modal mode. The type of event resulting in
|
|
31
|
+
* the SlideOut dismissal is passed with the callback. */
|
|
32
|
+
onDismiss?: (event: DismissibleEventTypes) => void;
|
|
33
|
+
/** callback fired when the SlideOut has finished sliding out (closing) */
|
|
34
|
+
onClosed?: () => void;
|
|
35
|
+
/** callback fired when the SlideOut starts sliding in (opening) */
|
|
36
|
+
onOpening?: () => void;
|
|
37
|
+
}
|
|
38
|
+
/** The SlideOut component is a UI element that allows you to create a slide-in/slide-out effect for content within
|
|
39
|
+
* your application. It provides a smooth transition animation for revealing and hiding content.
|
|
40
|
+
* @deprecated */
|
|
41
|
+
export declare const SlideOutV2: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<SlideOutV2Props & import("react").RefAttributes<HTMLDivElement>>>;
|
package/dist/SlideOut/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./SlideOutV2";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from "react";
|
|
2
|
+
import { PropsWithClassNameAndStyle } from "../typings.ts";
|
|
3
|
+
export interface SlideOutV3Props extends PropsWithChildren, PropsWithClassNameAndStyle {
|
|
4
|
+
/** The controlled open state of the SlideOut */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** specifies if the SlideOut is in modal mode or not.
|
|
7
|
+
* If in modal mode, onDismiss prop should be passed
|
|
8
|
+
* to the SlideOut component as well.
|
|
9
|
+
* @default false */
|
|
10
|
+
modal?: boolean;
|
|
11
|
+
/** The side the SlideOut should position on and "slide-in" from */
|
|
12
|
+
side: "left" | "right";
|
|
13
|
+
/** controls if the SlideOut can be resized by the user
|
|
14
|
+
* @default true
|
|
15
|
+
* */
|
|
16
|
+
resizeable?: boolean;
|
|
17
|
+
/** controls the positioning of the SlideOut.
|
|
18
|
+
* When absolute, the SlideOut will overlay other
|
|
19
|
+
* content within its parent container.
|
|
20
|
+
* When relative, the SlideOut exists with and pushes other content within
|
|
21
|
+
* its parent container.
|
|
22
|
+
* @default "relative"
|
|
23
|
+
* */
|
|
24
|
+
position?: "relative" | "absolute";
|
|
25
|
+
/** sets the initialWidth of the SlideOut, can be expressed in any valid CSS size unit */
|
|
26
|
+
initialWidth: number | string;
|
|
27
|
+
/** sets the minimum width of the SlideOut can be expressed in any valid CSS size unit */
|
|
28
|
+
minWidth?: number | string;
|
|
29
|
+
/** sets the maximum width of the SlideOut can be expressed in any valid CSS size unit */
|
|
30
|
+
maxWidth?: number | string;
|
|
31
|
+
/** callback fired when the SlideOut should be dismissed (closed) when in modal mode. The type of event resulting in
|
|
32
|
+
* the SlideOut dismissal is passed with the callback. */
|
|
33
|
+
onDismiss?: () => void;
|
|
34
|
+
/** callback fired when the SlideOut has finished sliding out (closing) */
|
|
35
|
+
onClosed?: () => void;
|
|
36
|
+
/** callback fired when the SlideOut starts sliding in (opening) */
|
|
37
|
+
onOpening?: () => void;
|
|
38
|
+
/** overlay to be rendered when the SlideOut is open*/
|
|
39
|
+
overlayComponent?: ReactNode;
|
|
40
|
+
/** content to be rendered within the SlideOut */
|
|
41
|
+
content: ReactNode;
|
|
42
|
+
}
|
|
43
|
+
/** The SlideOut component is a UI element that allows you to create a slide-in/slide-out effect for content within
|
|
44
|
+
* your application. It provides a smooth transition animation for revealing and hiding content. */
|
|
45
|
+
export declare const SlideOutV3: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<SlideOutV3Props & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SlideOutV3";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type PointerDownOutsideEvent = CustomEvent<{
|
|
2
|
+
originalEvent: PointerEvent;
|
|
3
|
+
}>;
|
|
4
|
+
/**
|
|
5
|
+
* Listens for `pointerdown` outside a React subtree. We use `pointerdown` rather than `pointerup`
|
|
6
|
+
* to mimic layer-dismissing behavior present in OS.
|
|
7
|
+
* Returns props to pass to the node we want to check for outside events.
|
|
8
|
+
*/
|
|
9
|
+
export declare function usePointerDownOutside(onPointerDownOutside?: (event: PointerDownOutsideEvent) => void, ownerElement?: HTMLElement | undefined): {
|
|
10
|
+
onPointerDownCapture: () => boolean;
|
|
11
|
+
};
|
|
12
|
+
/** custom hook used for creating a ref to a callback */
|
|
13
|
+
export declare function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T;
|
|
14
|
+
export {};
|
package/dist/Toolbar/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Toolbar } from "./Toolbar";
|