@overmap-ai/blocks 0.0.12-alpha.2 → 1.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.
@@ -1,12 +1,21 @@
1
- import { FC } from "react";
2
- import { DropdownMenuItemGroupProps, DropdownMenuItemProps, DropdownMenuProps, DropdownSubMenuProps } from "./typings.ts";
1
+ import { DropdownMenu as RadixDropdownMenu } from "@radix-ui/themes";
2
+ import { ComponentProps, FC, ReactElement, ReactNode } from "react";
3
+ import { Severity } from "../typings.ts";
4
+ export interface DropdownMenuItemProps extends Omit<ComponentProps<typeof RadixDropdownMenu.Item>, "textValue" | "asChild" | "children" | "color" | "content"> {
5
+ content: ReactNode;
6
+ closeOnSelect?: boolean;
7
+ separator?: boolean;
8
+ }
9
+ export interface DropdownMenuProps extends Omit<ComponentProps<typeof RadixDropdownMenu.Content>, "asChild" | "color" | "children"> {
10
+ severity?: Severity;
11
+ disabled?: boolean;
12
+ label?: string;
13
+ trigger: ReactElement;
14
+ items: DropdownMenuItemProps[];
15
+ modal?: boolean;
16
+ closeOnSelect?: boolean;
17
+ }
3
18
  /** The DropdownMenu component is a user interface element that provides a list of options for the user to choose from.
4
19
  * It is commonly used in web applications to present a set of related choices in a compact and organized manner.
5
20
  * This DropdownMenu component is a wrapper around the Radix-UI DropdownMenu component that can be found here https://www.radix-ui.com/themes/docs/components/dropdown-menu */
6
- export declare const Root: FC<DropdownMenuProps>;
7
- export declare const DropdownMenu: {
8
- Root: FC<DropdownMenuProps>;
9
- ItemGroup: FC<DropdownMenuItemGroupProps>;
10
- Item: FC<DropdownMenuItemProps>;
11
- SubMenu: FC<DropdownSubMenuProps>;
12
- };
21
+ export declare const DropdownMenu: FC<DropdownMenuProps>;
@@ -1,2 +1,2 @@
1
1
  export { DropdownMenu } from "./DropdownMenu";
2
- export * from "./typings.ts";
2
+ export type { DropdownMenuProps, DropdownMenuItemProps } from "./DropdownMenu";
@@ -0,0 +1,17 @@
1
+ import { ComponentProps, ReactElement } from "react";
2
+ import { Theme } from "@radix-ui/themes";
3
+ import { Severity } from "../typings.ts";
4
+ interface IconColorUtilityProps {
5
+ children: ReactElement;
6
+ }
7
+ interface IconColorUtilitySeverityProps extends IconColorUtilityProps {
8
+ severity: Severity;
9
+ color?: undefined;
10
+ }
11
+ interface IconColorUtilityColorProps extends IconColorUtilityProps {
12
+ color: Exclude<ComponentProps<typeof Theme>["accentColor"], undefined>;
13
+ severity?: undefined;
14
+ }
15
+ /** This component is used to provide Icons color based on Severity or a Radix theme accentColor */
16
+ export declare const IconColorUtility: import("react").NamedExoticComponent<IconColorUtilitySeverityProps | IconColorUtilityColorProps>;
17
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./IconColorUtility";
@@ -3,11 +3,12 @@ import { Responsive, TextField as RadixTextField } from "@radix-ui/themes";
3
3
  import { Severity, Size } from "../typings.ts";
4
4
  import { MarginProps } from "@radix-ui/themes";
5
5
  type TextFieldInputProps = React.ComponentProps<typeof RadixTextField.Input>;
6
- export interface InputProps extends Omit<TextFieldInputProps, "size" | "color" | "radius" | keyof MarginProps> {
6
+ export interface InputProps extends Omit<TextFieldInputProps, "size" | "color" | "radius" | "variant" | keyof MarginProps> {
7
7
  leftSlot?: React.ReactNode;
8
8
  rightSlot?: React.ReactNode;
9
9
  size?: Responsive<Size>;
10
- severity?: Exclude<Severity, "success" | "info">;
10
+ severity?: Severity;
11
11
  showInputLength?: boolean;
12
+ variant?: TextFieldInputProps["variant"] | "ghost";
12
13
  }
13
14
  export {};
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps } from "react";
2
2
  import { TextArea as RadixTextArea, MarginProps } from "@radix-ui/themes";
3
3
  import { Severity } from "../typings.ts";
4
- export interface TextAreaProps extends Omit<ComponentProps<typeof RadixTextArea>, keyof MarginProps | "color"> {
4
+ export interface TextAreaProps extends Omit<ComponentProps<typeof RadixTextArea>, keyof MarginProps | "color" | "variant"> {
5
5
  /** used to set the severity of the TextArea, supports all 5 global severities
6
6
  * @default "primary"
7
7
  * */
@@ -12,4 +12,5 @@ export interface TextAreaProps extends Omit<ComponentProps<typeof RadixTextArea>
12
12
  showInputLength?: boolean;
13
13
  resize: "vertical" | "horizontal" | "both";
14
14
  inputLengthTemplate?: string;
15
+ variant?: ComponentProps<typeof RadixTextArea>["variant"] | "ghost";
15
16
  }
@@ -47,4 +47,5 @@ export interface IToastContext {
47
47
  showSuccess: (simpleMessage: SimpleToastProps) => void;
48
48
  showInfo: (simpleMessage: SimpleToastProps) => void;
49
49
  showError: (simpleMessage: SimpleToastProps) => void;
50
+ showWarning: (simpleMessage: SimpleToastProps) => void;
50
51
  }