@airplane/views
Version:
A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.
73 lines (72 loc) • 3.82 kB
TypeScript
/// <reference types="react" />
import type { ParamValues } from "airplane/api";
import { DefaultParams } from "../../client";
import { MultiSelectTValue } from "../../state/components/multiselect/reducer";
import { MultiSelectComponentProps, MultiSelectItem, MultiSelectProps } from "./MultiSelect.types";
export declare const MultiSelect: {
<TParams extends ParamValues | undefined = DefaultParams, TOutput = any>(props: MultiSelectProps<TParams, TOutput>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
/**
* Presentational multiselect component.
*/
export declare const MultiSelectComponent: import("react").ForwardRefExoticComponent<{
id?: string | undefined;
defaultValue?: MultiSelectTValue | undefined;
value?: MultiSelectTValue | undefined;
label?: import("react").ReactNode;
placeholder?: string | undefined;
description?: import("react").ReactNode;
nothingFound?: import("react").ReactNode;
onChange?: ((value: string[]) => void) | undefined;
filter?: ((value: string, selected: boolean, item: MultiSelectItem) => boolean) | undefined;
size?: import("@mantine/core").MantineSize | undefined;
defaultDisabled?: boolean | undefined;
searchable?: boolean | undefined;
clearable?: boolean | undefined;
loading?: boolean | undefined;
data: (string | number | MultiSelectItem)[];
radius?: import("@mantine/core").MantineSize | undefined;
error?: import("react").ReactNode;
initiallyOpened?: boolean | undefined;
ItemComponent?: import("react").FunctionComponent<any> | undefined;
itemComponent?: import("react").FunctionComponent<any> | undefined;
disabled?: boolean | undefined;
autoFocus?: boolean | undefined;
withinPortal?: boolean | undefined;
unstyled?: boolean | undefined;
maxSelectedValues?: number | undefined;
maxDropdownHeight?: number | undefined;
sx?: import("@mantine/core").CSSObject | undefined;
} & import("../layout/layout.types").CommonLayoutProps & import("../styling.types").CommonStylingProps & import("react").RefAttributes<HTMLInputElement>>;
export declare const MultiSelectComponentWithoutRef: ({ loading, data, value, defaultValue, filter, withinPortal, innerRef, unstyled, ItemComponent, itemComponent, disabled, className, style, width, height, grow, ...restProps }: {
id?: string | undefined;
defaultValue?: MultiSelectTValue | undefined;
value?: MultiSelectTValue | undefined;
label?: import("react").ReactNode;
placeholder?: string | undefined;
description?: import("react").ReactNode;
nothingFound?: import("react").ReactNode;
onChange?: ((value: string[]) => void) | undefined;
filter?: ((value: string, selected: boolean, item: MultiSelectItem) => boolean) | undefined;
size?: import("@mantine/core").MantineSize | undefined;
defaultDisabled?: boolean | undefined;
searchable?: boolean | undefined;
clearable?: boolean | undefined;
loading?: boolean | undefined;
data: (string | number | MultiSelectItem)[];
radius?: import("@mantine/core").MantineSize | undefined;
error?: import("react").ReactNode;
initiallyOpened?: boolean | undefined;
ItemComponent?: import("react").FunctionComponent<any> | undefined;
itemComponent?: import("react").FunctionComponent<any> | undefined;
disabled?: boolean | undefined;
autoFocus?: boolean | undefined;
withinPortal?: boolean | undefined;
unstyled?: boolean | undefined;
maxSelectedValues?: number | undefined;
maxDropdownHeight?: number | undefined;
sx?: import("@mantine/core").CSSObject | undefined;
} & import("../layout/layout.types").CommonLayoutProps & import("../styling.types").CommonStylingProps & {
innerRef: React.Ref<HTMLInputElement>;
}) => import("react/jsx-runtime").JSX.Element;