@overmap-ai/blocks 1.0.6-master.1 → 1.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 +3 -3
- package/dist/Dialogs/Dialog/index.d.ts +0 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts +17 -5
- package/dist/DropdownMenu/index.d.ts +0 -2
- package/dist/DropdownSelect/DropdownSelect.d.ts +57 -5
- package/dist/DropdownSelect/index.d.ts +1 -1
- package/dist/Separator/typings.d.ts +1 -2
- package/dist/blocks.js +251 -522
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +247 -515
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/style.css +59 -59
- package/dist/utils.d.ts +1 -12
- package/package.json +98 -102
- package/dist/BaseMenuGroups/BaseItemGroup/BaseItemGroup.d.ts +0 -3
- package/dist/BaseMenuGroups/BaseItemGroup/index.d.ts +0 -2
- package/dist/BaseMenuGroups/BaseItemGroup/typings.d.ts +0 -11
- package/dist/BaseMenuGroups/BaseMenuComponents.d.ts +0 -11
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/BaseMultiSelectGroup.d.ts +0 -3
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/index.d.ts +0 -2
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/typings.d.ts +0 -16
- package/dist/BaseMenuGroups/BaseSelectGroup/BaseSelectGroup.d.ts +0 -3
- package/dist/BaseMenuGroups/BaseSelectGroup/index.d.ts +0 -2
- package/dist/BaseMenuGroups/BaseSelectGroup/typings.d.ts +0 -16
- package/dist/BaseMenuGroups/BaseSubMenuGroup/BaseSubMenuGroup.d.ts +0 -3
- package/dist/BaseMenuGroups/BaseSubMenuGroup/index.d.ts +0 -2
- package/dist/BaseMenuGroups/BaseSubMenuGroup/typings.d.ts +0 -14
- package/dist/BaseMenuGroups/index.d.ts +0 -5
- package/dist/BaseMenuGroups/typings.d.ts +0 -37
- package/dist/BaseMenuGroups/utils.d.ts +0 -5
- package/dist/Dialogs/Dialog/utils.d.ts +0 -7
- package/dist/DropdownItemMenu/DropdownItemMenu.d.ts +0 -9
- package/dist/DropdownItemMenu/index.d.ts +0 -2
- package/dist/DropdownMenu/DropdownMenuGroups.d.ts +0 -18
- package/dist/DropdownMultiSelect/DropdownMultiSelect.d.ts +0 -6
- package/dist/DropdownMultiSelect/index.d.ts +0 -2
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,8 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
5
|
-
|
|
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
|
+
}
|
|
6
18
|
/** The DropdownMenu component is a user interface element that provides a list of options for the user to choose from.
|
|
7
19
|
* It is commonly used in web applications to present a set of related choices in a compact and organized manner.
|
|
8
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 */
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
export { DropdownMenu } from "./DropdownMenu";
|
|
2
2
|
export type { DropdownMenuProps, DropdownMenuItemProps } from "./DropdownMenu";
|
|
3
|
-
export * from "./DropdownMenuGroups";
|
|
4
|
-
export type { DropdownMenuItemGroupProps, DropdownMenuItemGroupItemProps, DropdownMenuSelectGroupProps, DropdownMenuSelectGroupItemProps, DropdownMenuMultiSelectGroupProps, DropdownMenuMultiSelectGroupItemProps, DropdownMenuSubMenuGroupProps, DropdownMenuSubMenuGroupItemProps, } from "./DropdownMenuGroups.tsx";
|
|
@@ -1,6 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
5
|
-
|
|
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 DropdownSelectIconProps {
|
|
5
|
+
leftInputIcon?: ReactNode;
|
|
6
|
+
rightInputIcon?: ReactNode;
|
|
7
|
+
selectedItemIcon?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface DropdownSelectItemProps {
|
|
10
|
+
/** the content to rendered for the dropdown select item */
|
|
11
|
+
content: ReactNode;
|
|
12
|
+
value: string;
|
|
13
|
+
/** the disabled state of the dropdown select item
|
|
14
|
+
* @default false
|
|
15
|
+
* */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type DropdownSelectProps = {
|
|
19
|
+
/** currently selected value of the dropdown select*/
|
|
20
|
+
value: string | undefined;
|
|
21
|
+
/** callback fired when an item in the dropdown select is clicked*/
|
|
22
|
+
onValueChange: (value: string | undefined) => void;
|
|
23
|
+
/** a ReactElement representing the trigger for the dropdown select, must be clickable*/
|
|
24
|
+
trigger: ReactElement;
|
|
25
|
+
/** the selectable items to be displayed in the dropdown select */
|
|
26
|
+
items: DropdownSelectItemProps[];
|
|
27
|
+
/** the disabled state of the dropdown select
|
|
28
|
+
* @default false
|
|
29
|
+
* */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** placeholder for the user input contained within the dropdown select */
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
/** determines if the dropdown select should close after selecting an item
|
|
34
|
+
* @default true
|
|
35
|
+
* */
|
|
36
|
+
closeOnSelect?: boolean;
|
|
37
|
+
/** a set of icons to be fill the different icon spots within the dropdown select */
|
|
38
|
+
icons?: DropdownSelectIconProps;
|
|
39
|
+
/** determines on which side of the trigger the dropdown select renders on, if open space
|
|
40
|
+
* @default "bottom"
|
|
41
|
+
* */
|
|
42
|
+
side?: ComponentProps<typeof RadixDropdownMenu.Content>["side"];
|
|
43
|
+
/** severity of the dropdown select
|
|
44
|
+
* @default "info"
|
|
45
|
+
* */
|
|
46
|
+
severity?: Severity;
|
|
47
|
+
} & ({
|
|
48
|
+
/** the current value in the user input contained within the dropdown select */
|
|
49
|
+
filterValue: undefined;
|
|
50
|
+
/** callback fired when an item in the dropdown select is clicked*/
|
|
51
|
+
onFilterValueChange: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
/** the current value in the user input contained within the dropdown select */
|
|
54
|
+
filterValue: string;
|
|
55
|
+
/** callback fired when an item in the dropdown select is clicked*/
|
|
56
|
+
onFilterValueChange: (value: string) => void;
|
|
57
|
+
});
|
|
6
58
|
export declare const DropdownSelect: FC<DropdownSelectProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { DropdownSelect } from "./DropdownSelect";
|
|
2
|
-
export type { DropdownSelectProps, DropdownSelectItemProps } from "./DropdownSelect";
|
|
2
|
+
export type { DropdownSelectProps, DropdownSelectItemProps, DropdownSelectIconProps } from "./DropdownSelect";
|
|
@@ -11,10 +11,9 @@ export interface SeparatorProps extends Omit<ComponentProps<typeof RadixSeparato
|
|
|
11
11
|
/** the weight of the text
|
|
12
12
|
* @default "light"
|
|
13
13
|
* */
|
|
14
|
-
|
|
14
|
+
weight?: ComponentProps<typeof Text>["weight"];
|
|
15
15
|
/** severity of the separator
|
|
16
16
|
* @default "info"
|
|
17
17
|
* */
|
|
18
18
|
severity?: Severity;
|
|
19
|
-
weight?: "light" | "medium" | "bold" | "full";
|
|
20
19
|
}
|