/// import * as react from 'react'; import { RefObject, InputHTMLAttributes, ReactNode, HTMLAttributes } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { I as InputTexts, C as ClassName, c as IDropdownPosition } from '../types-8627c32c.js'; import { SingleValue, MultiValue, FormatOptionLabelMeta, MenuPlacement, MenuPosition, PropsValue, OptionsOrGroups, GroupBase, StylesConfig } from 'react-select'; import { B as ButtonProps } from '../Button.interface-21de3beb.js'; import 'url'; declare const useDropdown: (dropdownMenuRef: RefObject, menuTriggerRef: RefObject, defaultOpen?: boolean) => { isOpen: boolean; setIsOpen: react.Dispatch>; }; interface ToggleProps extends Omit, Omit, "size" | "onChange">, ClassName { size?: "sm" | "md"; disabled?: boolean; checked: boolean; defaultChecked?: boolean; onChange?: (checked: boolean) => void; } type DropdownValueOptions = SingleValue | MultiValue; interface IOptionContentClassNames { contentWrapper?: string; leftIcon?: string; label?: string; } interface IDropdownOption { id: string; value: string; label: string; supportingText?: string; leftIcon?: ReactNode; rightIcon?: ReactNode; caption?: string; onSelect?: (value?: IDropdownOption) => void; toggleProps?: Pick; optionContentClassNames?: IOptionContentClassNames; areAllMultiValuesShown?: boolean; } interface IOptionContentProps { option: IDropdownOption; variant: OptionVariants; isFocused?: boolean; isSelected?: boolean; onSelect?: (value?: IDropdownOption) => void; id?: string; formatOptionLabel?: (data: IDropdownOption, formatOptionLabelMeta: FormatOptionLabelMeta) => ReactNode; } type OptionVariants = "default" | "person" | "toggle" | "checkbox-left" | "checkbox-right"; interface IOptionLabelProps extends Pick { isPersonVariant?: boolean; iconClassName?: string; labelClassName?: string; } interface IOptionProps extends ClassName { option: IDropdownOption; optionVariant?: OptionVariants; isSelected?: boolean; onSelect?: (item: IDropdownOption) => void; id?: string; } interface IContainerProps extends HTMLAttributes { isOpen: boolean; variant?: "default" | "multiSection"; } declare const DropdownComponents: { Container: react.ForwardRefExoticComponent>; Option: ({ option, optionVariant, className, onSelect, isSelected, id, }: IOptionProps) => react_jsx_runtime.JSX.Element; OptionContent: ({ option, variant, isFocused, isSelected, onSelect, id, formatOptionLabel, }: IOptionContentProps) => react_jsx_runtime.JSX.Element; OptionLabel: ({ leftIcon, label, supportingText, isPersonVariant, labelClassName, iconClassName, }: IOptionLabelProps) => react_jsx_runtime.JSX.Element; }; interface IMenuDropdownProps extends ClassName, Omit { dropdownRef: RefObject; triggerButtonRef: RefObject; onSelect: (items: IDropdownOption | IDropdownOption[] | undefined) => void; triggerButtonProps?: Partial; fixToRight?: boolean; } interface IUserData { avatarUrl?: string; avatarAltText?: string; email: string; firstName: string; lastName?: string; } interface IMenuTriggerProps { onClick(e: React.MouseEvent): void; triggerButtonProps?: Partial; } interface IOptionsListProps extends ClassName { options: IDropdownOption[]; optionVariant?: OptionVariants; selectedItems?: IDropdownOption | IDropdownOption[]; onSelect?: (item: IDropdownOption) => void; isMulti?: boolean; } interface IExtraActionProps { actionDetails: IDropdownOption; onClick?: (value?: IDropdownOption) => void; } interface IDropdownProps extends Omit, IOptionsListProps { user?: IUserData; extraActionProps?: IExtraActionProps; position?: IDropdownPosition; dropdownClassName?: string; } declare const MenuDropdownComponents: { OptionsList: ({ optionVariant, options, selectedItems, onSelect, }: IOptionsListProps) => react_jsx_runtime.JSX.Element; MenuUserEntry: ({ user }: { user: IUserData; }) => react_jsx_runtime.JSX.Element; MenuTrigger: react.ForwardRefExoticComponent>; Dropdown: react.ForwardRefExoticComponent>; }; declare const MenuDropdown: ({ isMulti, selectedItems, onSelect, extraActionProps, dropdownRef, triggerButtonRef, className, dropdownClassName, triggerButtonProps, fixToRight, ...dropdownProps }: IMenuDropdownProps) => react_jsx_runtime.JSX.Element; interface ISingleSelectDropdownProps { onSelect: (items: SingleValue) => void; } interface IMultiSelectDropdownProps { onSelect: (items: MultiValue) => void; } interface ICommonSelectDropdownProps extends InputTexts, ISelectDropdownStateManagerProps, ISelectProps { id: string; isMulti?: boolean; options: OptionsOrGroups>; variant?: OptionVariants; hideSelectedOptions?: boolean; placeholderText?: string; disabled?: boolean; instanceId?: string; isClearable?: boolean; isLoading?: boolean; isSearchable?: boolean; noOptionsMessage?: ReactNode; formatGroupLabel?: (data: GroupBase) => ReactNode; customStylesOverrides?: () => StylesConfig>; onInputChange?: (inputValue: string) => void; prefixIcon?: ReactNode; areAllMultiValuesShown?: boolean; } type ISelectDropdownProps = ICommonSelectDropdownProps & (ISingleSelectDropdownProps | IMultiSelectDropdownProps); interface ISelectDropdownStateManagerProps { defaultInputValue?: string; defaultMenuIsOpen?: boolean; defaultValue?: null | IDropdownOption | ReadonlyArray; } interface ISelectProps { form?: string; autoFocus?: boolean; backspaceRemovesValue?: boolean; blurInputOnSelect?: boolean; closeMenuOnSelect?: boolean; closeMenuOnScroll?: boolean; controlShouldRenderValue?: boolean; delimiter?: string; escapeClearsValue?: boolean; inputId?: string; isRtl?: boolean; minMenuHeight?: number; maxMenuHeight?: number; menuPlacement?: MenuPlacement; menuPosition?: MenuPosition; menuPortalTarget?: HTMLElement | null; menuShouldScrollIntoView?: boolean; name?: string; openMenuOnFocus?: boolean; openMenuOnClick?: boolean; pageSize?: number; tabIndex?: number; tabSelectsValue?: boolean; required?: boolean; inputValue?: string; value?: PropsValue | undefined; filterOption?: (option: { label: string; value: string; data: IDropdownOption; }, inputValue: string) => boolean; getOptionLabel?: (option: IDropdownOption) => string; getOptionValue?: (option: IDropdownOption) => string; formatOptionLabel?: (data: IDropdownOption, formatOptionLabelMeta: FormatOptionLabelMeta) => ReactNode; loadingMessage?: (obj: { inputValue: string; }) => ReactNode; onKeyDown?: React.KeyboardEventHandler; onMenuScrollToTop?: (event: WheelEvent | TouchEvent) => void; onMenuScrollToBottom?: (event: WheelEvent | TouchEvent) => void; } declare const SelectDropdown: react.ForwardRefExoticComponent>; declare const useClearSelect: (ref?: RefObject) => { ref: react.MutableRefObject; clearValue: () => void; }; interface IAsyncSelectProps extends Omit { id: string; cacheOptions?: boolean; loadingMessage?: ReactNode; defaultOptions?: OptionsOrGroups> | boolean; loadOptions?: (inputValue: string, callback: (options: OptionsOrGroups>) => void) => void | Promise; } declare const AsyncSelect: react.ForwardRefExoticComponent>; type ICreatableSelectProps = ISelectDropdownProps & { id: string; createLabel?: string; createOptionPosition?: "first" | "last"; isValidNewOption?: (inputValue: string) => boolean; onCreateOption?(inputValue: string): void; allowCreateWhileLoading?: boolean; formatCreateLabel?: (inputValue: string) => ReactNode; }; declare const CreatableSelect: react.ForwardRefExoticComponent>; declare const useCreatableSelect: (defaultOptions: OptionsOrGroups>, isMulti?: boolean, delay?: number) => { onCreateOption: (dropdownOptionElements: IDropdownOption) => void; selectedItems: DropdownValueOptions | undefined; setSelectedItems: react.Dispatch>; options: OptionsOrGroups>; setOptions: react.Dispatch>>>; isLoading: boolean; setIsLoading: react.Dispatch>; }; export { AsyncSelect, CreatableSelect, DropdownComponents, DropdownValueOptions, IAsyncSelectProps, IContainerProps, ICreatableSelectProps, IDropdownOption, IDropdownProps, IMenuDropdownProps, IMenuTriggerProps, IOptionContentProps, IOptionProps, IOptionsListProps, ISelectDropdownProps, ISelectProps, MenuDropdown, MenuDropdownComponents, SelectDropdown, useClearSelect, useCreatableSelect, useDropdown };