@overmap-ai/blocks 0.0.1-alpha.51 → 0.0.1
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/README.md +3 -3
- package/dist/Toast/Toast.d.ts +1 -4
- package/dist/Toast/ToastContext.d.ts +3 -3
- package/dist/Toast/ToastProvider.d.ts +4 -0
- package/dist/Toast/index.d.ts +4 -3
- package/dist/Toast/typings.d.ts +27 -27
- package/dist/blocks.js +474 -501
- 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/dist/utils.d.ts +0 -2
- package/package.json +83 -83
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# overmap-ai blocks
|
|
2
|
-
|
|
3
|
-
Contains basic components used by overmap-ai libraries.
|
|
1
|
+
# overmap-ai blocks
|
|
2
|
+
|
|
3
|
+
Contains basic components used by overmap-ai libraries.
|
package/dist/Toast/Toast.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import
|
|
3
|
-
import { ToastProps, ToastProviderProps } from "./typings.ts";
|
|
4
|
-
export declare const ToastProvider: FC<ToastProviderProps>;
|
|
2
|
+
import { ToastProps } from "./typings";
|
|
5
3
|
export declare const Toast: FC<ToastProps>;
|
|
6
|
-
export declare const ToastViewport: FC<RadixToast.ToastViewportProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { IToastContext
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IToastContext } from "./typings";
|
|
3
3
|
export declare const ToastContext: import("react").Context<IToastContext>;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const useToast: () => IToastContext;
|
package/dist/Toast/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from "./Toast
|
|
2
|
-
export * from "./ToastContext
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./Toast";
|
|
2
|
+
export * from "./ToastContext";
|
|
3
|
+
export * from "./ToastProvider";
|
|
4
|
+
export * from "./typings";
|
package/dist/Toast/typings.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from "react";
|
|
2
|
-
import
|
|
2
|
+
import { ToastProps as RadixToastProps, ToastProviderProps, ToastViewportProps } from "@radix-ui/react-toast";
|
|
3
3
|
import { Callout } from "@radix-ui/themes";
|
|
4
4
|
import { Severity } from "../typings.ts";
|
|
5
|
-
export interface ToastProviderProps {
|
|
6
|
-
/** a global duration that will be applied to each Toast rendered within the provider*/
|
|
7
|
-
duration?: RadixToast.ToastProviderProps["duration"];
|
|
8
|
-
/** label for each toast. Used to help screen reader users associate the interruption with a toast. */
|
|
9
|
-
label?: RadixToast.ToastProviderProps["label"];
|
|
10
|
-
children?: RadixToast.ToastProviderProps["children"];
|
|
11
|
-
}
|
|
12
5
|
export interface ToastProps {
|
|
13
6
|
size?: ComponentProps<typeof Callout.Root>["size"];
|
|
14
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* to indicate the severity of each Toast
|
|
9
|
+
* @default "primary"
|
|
10
|
+
*/
|
|
15
11
|
severity?: Severity;
|
|
16
12
|
/** the title of the Toast*/
|
|
17
13
|
title: string;
|
|
18
14
|
/** description of the Toast located underneath the title*/
|
|
19
15
|
description: string;
|
|
20
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* the icon located to the left of the Toast
|
|
18
|
+
* @default "an 'i' in a circle"
|
|
19
|
+
*/
|
|
21
20
|
icon?: ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
/**
|
|
22
|
+
* duration that the specific instance of Toast is visible for (in milliseconds)
|
|
23
|
+
* @default 5000
|
|
24
|
+
*/
|
|
25
|
+
duration?: RadixToastProps["duration"];
|
|
26
26
|
/** a callback that will trigger when the Toast is closed */
|
|
27
27
|
onClose?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Control the sensitivity of the toast for screen readers.
|
|
30
|
+
* For toasts that are the result of a user action, choose `foreground`.
|
|
31
|
+
* Toasts generated from background tasks (ex: Update available) should use `background`.
|
|
32
|
+
* @default "foreground"
|
|
33
|
+
*/
|
|
34
|
+
sensitivity?: RadixToastProps["type"];
|
|
28
35
|
}
|
|
29
|
-
export interface ToastContextProviderProps extends ToastProviderProps, Omit<
|
|
30
|
-
/** a class that will be applied to the ol element responsible for listing the Toasts */
|
|
31
|
-
viewportClass?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface SimpleToastMessage {
|
|
34
|
-
title: string;
|
|
35
|
-
description: string;
|
|
36
|
-
type?: RadixToast.ToastProps["type"];
|
|
37
|
-
duration?: number;
|
|
36
|
+
export interface ToastContextProviderProps extends ToastProviderProps, Omit<ToastViewportProps, "label" | "asChild"> {
|
|
38
37
|
}
|
|
38
|
+
export type SimpleToastProps = Omit<ToastProps, "severity">;
|
|
39
39
|
export interface IToastContext {
|
|
40
40
|
showToast: (toastMessage: ToastProps) => void;
|
|
41
|
-
showPrimary: (simpleMessage:
|
|
42
|
-
showSuccess: (simpleMessage:
|
|
43
|
-
showInfo: (simpleMessage:
|
|
44
|
-
showError: (simpleMessage:
|
|
41
|
+
showPrimary: (simpleMessage: SimpleToastProps) => void;
|
|
42
|
+
showSuccess: (simpleMessage: SimpleToastProps) => void;
|
|
43
|
+
showInfo: (simpleMessage: SimpleToastProps) => void;
|
|
44
|
+
showError: (simpleMessage: SimpleToastProps) => void;
|
|
45
45
|
}
|