@cerberus-design/react
Version:
The Cerberus Design React component library.
64 lines (63 loc) • 5.64 kB
text/typescript
import { Select, ListCollection, SelectClearTriggerProps as ArkSelectClearTrigger, SelectContentProps as ArkSelectContentProps, SelectControlProps as ArkSelectControlProps, SelectHiddenSelectProps as ArkSelectHiddenSelectProps, SelectIndicatorProps as ArkSelectIndicatorProps, SelectItemGroupLabelProps as ArkSelectItemGroupLabelProps, SelectItemGroupProps as ArkSelectItemGroupProps, SelectItemIndicatorProps as ArkSelectItemIndicatorProps, SelectItemProps as ArkSelectItemProps, SelectItemTextProps as ArkSelectItemTextProps, SelectLabelProps as ArkSelectLabelProps, SelectPositionerProps as ArkSelectPositionerProps, SelectRootProps as ArkSelectRootProps, SelectTriggerProps as ArkSelectTriggerProps, SelectValueChangeDetails, SelectValueTextProps as ArkSelectValueTextProps } from '@ark-ui/react/select';
import { SelectVariantProps } from 'styled-system/recipes';
import { CerberusPrimitiveProps } from '../../system/index';
import { SelectCollectionItem } from './select';
import { ForwardRefExoticComponent, RefAttributes } from 'react';
export type SelectRootProps = CerberusPrimitiveProps<ArkSelectRootProps<SelectCollectionItem> & SelectVariantProps>;
export declare const SelectRoot: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Omit<Select.RootProps<unknown>, never> & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectLabelProps = CerberusPrimitiveProps<ArkSelectLabelProps>;
export declare const SelectLabel: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Select.LabelProps & RefAttributes<HTMLLabelElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectControlProps = CerberusPrimitiveProps<ArkSelectControlProps>;
export declare const SelectControl: {
(props: CerberusPrimitiveProps<Select.ControlProps & RefAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export type SelectTriggerProps = CerberusPrimitiveProps<ArkSelectTriggerProps>;
export declare const SelectTrigger: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Select.TriggerProps & RefAttributes<HTMLButtonElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectValueTextProps = CerberusPrimitiveProps<ArkSelectValueTextProps>;
export declare const SelectValueText: {
(props: CerberusPrimitiveProps<Select.ValueTextProps & RefAttributes<HTMLSpanElement>>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export type SelectIndicatorProps = CerberusPrimitiveProps<ArkSelectIndicatorProps>;
export declare const SelectIndicator: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Select.IndicatorProps & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectClearTriggerProps = CerberusPrimitiveProps<ArkSelectClearTrigger>;
export declare const SelectClearTrigger: {
(props: CerberusPrimitiveProps<Select.ClearTriggerProps & RefAttributes<HTMLButtonElement>>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export type SelectPositionerProps = CerberusPrimitiveProps<ArkSelectPositionerProps>;
export declare const SelectPositioner: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Select.PositionerProps & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectContentProps = CerberusPrimitiveProps<ArkSelectContentProps & SelectVariantProps>;
export declare const SelectContent: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Select.ContentProps & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectItemGroupProps = CerberusPrimitiveProps<ArkSelectItemGroupProps>;
export declare const SelectItemGroup: {
(props: CerberusPrimitiveProps<Select.ItemGroupProps & RefAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export type SelectItemGroupLabelProps = CerberusPrimitiveProps<ArkSelectItemGroupLabelProps>;
export declare const SelectItemGroupLabel: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Select.ItemGroupLabelProps & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectItemProps = CerberusPrimitiveProps<ArkSelectItemProps>;
export declare const SelectItem: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Select.ItemProps & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectItemTextProps = CerberusPrimitiveProps<ArkSelectItemTextProps>;
export declare const SelectItemText: {
(props: CerberusPrimitiveProps<Select.ItemTextProps & RefAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export type SelectItemIndicatorProps = CerberusPrimitiveProps<ArkSelectItemIndicatorProps>;
export declare const SelectItemIndicator: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<Select.ItemIndicatorProps & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
export type SelectHiddenSelectProps = CerberusPrimitiveProps<ArkSelectHiddenSelectProps>;
export declare const SelectHiddenSelect: {
(props: CerberusPrimitiveProps<Select.HiddenSelectProps & RefAttributes<HTMLSelectElement>>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
/**
* A helper function to create a SelectCollection object.
* @param collection - An array of SelectCollectionItem objects that matches
* the following shape:
* ```ts
* [{ label: 'Hades', value: 'hades', disabled?: true }]
* ```
*/
export declare function createSelectCollection(collection: SelectCollectionItem[]): ListCollection<SelectCollectionItem>;
export type { SelectValueChangeDetails, ListCollection };