@overmap-ai/blocks 0.0.4 → 0.0.6

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 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.
@@ -1,2 +1,9 @@
1
1
  import { ButtonHoverEffect } from "./typings.ts";
2
+ import { KeyboardEvent } from "react";
2
3
  export declare const hoverEffectClassNameMapping: Record<ButtonHoverEffect, string | undefined>;
4
+ /** Passing this to a `div` will make it behave like a `button`. However, it will **NOT** support the disabled state. */
5
+ export declare const divButtonProps: {
6
+ role: string;
7
+ tabIndex: number;
8
+ onKeyDown: (e: KeyboardEvent<HTMLDivElement>) => void;
9
+ };
@@ -1,3 +1,4 @@
1
1
  export { default as Button } from "./Button.tsx";
2
2
  export { default as IconButton } from "./IconButton.tsx";
3
3
  export type { ButtonHoverEffect } from "./typings.ts";
4
+ export { divButtonProps } from "./constants.ts";
@@ -1 +1,7 @@
1
1
  export declare const useAlertDialog: () => import("./typings").AlertDialogContextType;
2
+ interface useDiscardAlertDialogProps {
3
+ onDiscard: () => void;
4
+ onCancel?: () => void;
5
+ }
6
+ export declare const useDiscardAlertDialog: () => (props: useDiscardAlertDialogProps) => void;
7
+ export {};
@@ -18,6 +18,7 @@ export interface MultiSelectProps {
18
18
  radius?: RadixTriggerProps["radius"];
19
19
  /** @default primary */
20
20
  severity?: Severity;
21
+ className?: string;
21
22
  }
22
23
  /**
23
24
  * `MultiSelect` does not support being used as an uncontrolled component,
@@ -1,4 +1,6 @@
1
1
  import { FC } from "react";
2
- import { ToastContextProviderProps } from "./typings";
2
+ import { ToastContextProviderProps, ToastProps } from "./typings";
3
+ /** this is a hack to allow toasts to be shown outside of components where hooks cannot be used */
4
+ export declare let unsafeShowToast: ((toastProps: ToastProps) => void) | undefined;
3
5
  /** Toasts will be displayed in the top-right handle corner of the screen */
4
6
  export declare const ToastProvider: FC<ToastContextProviderProps>;