@overmap-ai/blocks 0.0.1-alpha.44 → 0.0.1-alpha.45

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.
@@ -0,0 +1,27 @@
1
+ import { Select } from "@radix-ui/themes";
2
+ import { ComponentProps, FC } from "react";
3
+ import { Severity, Size } from "../typings";
4
+ import { MultiSelectOption } from "./MultiSelectItem";
5
+ type RadixTriggerProps = ComponentProps<typeof Select.Trigger>;
6
+ export interface MultiSelectProps {
7
+ value: string[];
8
+ onValueChange: (value: string[]) => void;
9
+ options: MultiSelectOption[];
10
+ disabled?: boolean;
11
+ /** @default medium */
12
+ size?: Size;
13
+ name?: string;
14
+ placeholder?: string;
15
+ id?: string;
16
+ /** @default surface */
17
+ variant?: Exclude<RadixTriggerProps["variant"], "classic">;
18
+ radius?: RadixTriggerProps["radius"];
19
+ /** @default primary */
20
+ severity?: Severity;
21
+ }
22
+ /**
23
+ * `MultiSelect` does not support being used as an uncontrolled component,
24
+ * hence `onValueChange` and `value` are required.
25
+ */
26
+ export declare const MultiSelect: FC<MultiSelectProps>;
27
+ export {};
@@ -0,0 +1,14 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { SizeMapping } from "../constants";
3
+ import { Size } from "../typings";
4
+ import { Responsive } from "@radix-ui/themes";
5
+ export interface MultiSelectOption {
6
+ label: ReactNode;
7
+ value: string;
8
+ }
9
+ interface MultiSelectItemProps extends MultiSelectOption {
10
+ checked: boolean;
11
+ size?: Responsive<(typeof SizeMapping)[Size]>;
12
+ }
13
+ export declare const MultiSelectItem: FC<MultiSelectItemProps>;
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./MultiSelect";