UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

57 lines 2.54 kB
import { StoreApi } from 'zustand'; import { ReactNode, ButtonHTMLAttributes, HTMLAttributes } from 'react'; interface SelectStore { open: boolean; setOpen: (open: boolean) => void; value: string; setValue: (value: string) => void; selectedLabel: ReactNode; setSelectedLabel: (label: ReactNode) => void; onValueChange?: (value: string) => void; } type SelectStoreApi = StoreApi<SelectStore>; export declare function createSelectStore(onValueChange?: (value: string) => void): SelectStoreApi; export declare const useSelectStore: (externalStore?: SelectStoreApi) => SelectStoreApi; export declare function getLabelAsNode(children: ReactNode): ReactNode; interface SelectProps { className?: string; children: ReactNode; defaultValue?: string; value?: string; onValueChange?: (value: string) => void; size?: 'small' | 'medium' | 'large' | 'extra-large'; label?: string; helperText?: string; errorMessage?: string; id?: string; } declare const Select: ({ children, defaultValue, className, value: propValue, onValueChange, size, label, helperText, errorMessage, id, }: SelectProps) => import("react/jsx-runtime").JSX.Element; declare const SelectValue: ({ placeholder, store: externalStore, }: { placeholder?: string; store?: SelectStoreApi; }) => import("react/jsx-runtime").JSX.Element; interface SelectTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> { className?: string; invalid?: boolean; variant?: 'outlined' | 'underlined' | 'rounded'; store?: SelectStoreApi; size?: 'small' | 'medium' | 'large' | 'extra-large'; selectId?: string; } declare const SelectTrigger: import("react").ForwardRefExoticComponent<SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>; interface SelectContentProps extends HTMLAttributes<HTMLDivElement> { className?: string; align?: 'start' | 'center' | 'end'; side?: 'top' | 'right' | 'bottom' | 'left'; store?: SelectStoreApi; } declare const SelectContent: import("react").ForwardRefExoticComponent<SelectContentProps & import("react").RefAttributes<HTMLDivElement>>; interface SelectItemProps extends HTMLAttributes<HTMLDivElement> { value: string; disabled?: boolean; store?: SelectStoreApi; } declare const SelectItem: import("react").ForwardRefExoticComponent<SelectItemProps & import("react").RefAttributes<HTMLDivElement>>; export default Select; export { SelectTrigger, SelectContent, SelectItem, SelectValue }; //# sourceMappingURL=Select.d.ts.map