@overmap-ai/blocks 0.0.1-alpha.46 → 0.0.1-alpha.49

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,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from "../Buttons/typings";
3
- export type ButtonContextType = Pick<ButtonProps, "variant" | "size" | "severity" | "hoverEffects">;
3
+ export type ButtonContextType = Pick<ButtonProps, "variant" | "size" | "severity" | "hoverEffects" | "fluid">;
4
4
  export declare const ButtonGroupContext: import("react").Context<ButtonContextType>;
5
5
  export declare const useButtonGroupContext: () => ButtonContextType;
@@ -2,7 +2,7 @@ import { Flex, MarginProps, Responsive } from "@radix-ui/themes";
2
2
  import { ComponentProps } from "react";
3
3
  import { Severity, Size, Variant } from "../typings.ts";
4
4
  import { ButtonHoverEffect } from "../Buttons";
5
- export interface ButtonGroupProps extends Omit<ComponentProps<typeof Flex>, keyof MarginProps | "size" | "direction"> {
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
7
  * @default "row"
8
8
  * */
@@ -26,4 +26,8 @@ export interface ButtonGroupProps extends Omit<ComponentProps<typeof Flex>, keyo
26
26
  * @default false
27
27
  * */
28
28
  merged?: boolean;
29
+ /** When set to true, all Buttons will fill as much space as possible within the ButtonGroup
30
+ * @default false
31
+ * */
32
+ fluid: boolean;
29
33
  }
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
2
  import { ButtonProps } from "./typings.ts";
3
- interface IconButtonProps extends Omit<ButtonProps, "fluid"> {
3
+ interface IconButtonProps extends ButtonProps {
4
4
  "aria-label": string;
5
5
  }
6
6
  /** The `IconButton` is a `Button` variant specifically designed for single icons. */
@@ -3,9 +3,9 @@ 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" | keyof MarginProps> {
7
- leftIcon?: React.ReactNode;
8
- rightIcon?: React.ReactNode;
6
+ export interface InputProps extends Omit<TextFieldInputProps, "size" | "color" | "radius" | keyof MarginProps> {
7
+ leftSlot?: React.ReactNode;
8
+ rightSlot?: React.ReactNode;
9
9
  size?: Responsive<Size>;
10
10
  severity?: Exclude<Severity, "success" | "info">;
11
11
  showInputLength?: boolean;
@@ -1,10 +1,10 @@
1
- import { ComponentProps } from "react";
1
+ import { ComponentProps, ReactNode } from "react";
2
2
  import { Responsive, Select as RadixSelect } from "@radix-ui/themes";
3
3
  import { Severity, Size, Variant } from "../typings.ts";
4
4
  type RadixSelectItemProps = ComponentProps<typeof RadixSelect.Item>;
5
5
  type RadixSelectContentProps = ComponentProps<typeof RadixSelect.Content>;
6
6
  export interface SelectItemProps extends Omit<RadixSelectItemProps, "asChild" | "textValue"> {
7
- label: string;
7
+ itemContent: ReactNode;
8
8
  }
9
9
  export interface SelectProps extends Omit<ComponentProps<typeof RadixSelect.Root>, "dir" | "open" | "onOpenChange" | "size"> {
10
10
  className?: string;
@@ -15,7 +15,8 @@ export interface SelectProps extends Omit<ComponentProps<typeof RadixSelect.Root
15
15
  id?: string;
16
16
  side?: RadixSelectContentProps["side"];
17
17
  items?: SelectItemProps[];
18
- severity?: Exclude<Severity, "success">;
18
+ severity?: Severity;
19
+ itemSeverity?: Severity;
19
20
  variant?: Extract<Variant, "surface" | "ghost" | "soft">;
20
21
  }
21
22
  export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { SwitchProps } from "./typings.ts";
3
+ /** The Switch Component is a user interface element that allows users to toggle between two states, typically
4
+ * representing "on" and "off" or "enabled" and "disabled". It is commonly used for settings, preferences, or any
5
+ * binary options. This Switch component is a wrapper around the Radix-ui Switch component found here https://www.radix-ui.com/themes/docs/components/switch
6
+ */
7
+ export declare const Switch: FC<SwitchProps>;
@@ -0,0 +1,2 @@
1
+ export * from "./Switch";
2
+ export * from "./typings.ts";
@@ -0,0 +1,13 @@
1
+ import { ComponentProps, ReactElement, ReactNode } from "react";
2
+ import { MarginProps, Switch as RadixSwitch } from "@radix-ui/themes";
3
+ import { Severity } from "../typings.ts";
4
+ interface SwitchIconProps {
5
+ checked: ReactNode;
6
+ unchecked: ReactNode;
7
+ }
8
+ export interface SwitchProps extends Omit<ComponentProps<typeof RadixSwitch>, "radius" | "color" | "asChild" | keyof MarginProps> {
9
+ severity?: Severity;
10
+ /** an icon or icons to be rendered within the Switch thumb on checked and unchecked states */
11
+ icon?: ReactElement | SwitchIconProps;
12
+ }
13
+ export {};
@@ -1,17 +1,7 @@
1
- import { ComponentProps } from "react";
2
1
  import { ToggleGroupItemProps as RadixToggleGroupItemProps, ToggleGroupSingleProps as RadixToggleGroupSingleProps } from "@radix-ui/react-toggle-group";
3
- import { Severity } from "../typings.ts";
4
- import { Flex } from "@radix-ui/themes";
5
- import { ButtonProps } from "../Buttons/typings.ts";
2
+ import { ButtonGroupProps } from "../ButtonGroup";
6
3
  export interface ToggleGroupItemProps extends Omit<RadixToggleGroupItemProps, "asChild"> {
7
4
  }
8
- interface GeneralToggleGroupProps {
5
+ export interface ToggleGroupSingleProps extends Omit<RadixToggleGroupSingleProps, "dir" | "orientation">, Omit<ButtonGroupProps, "children" | "defaultValue" | "variant"> {
9
6
  items: ToggleGroupItemProps[];
10
- merged?: boolean;
11
- severity?: Severity;
12
- gap?: ComponentProps<typeof Flex>["gap"];
13
- size?: ButtonProps["size"];
14
7
  }
15
- export interface ToggleGroupSingleProps extends Omit<RadixToggleGroupSingleProps, "dir">, GeneralToggleGroupProps {
16
- }
17
- export {};