import { AllowedIcons, DensitySizes } from "../../foundation"; import { RefAttributes, RefCallback } from "react"; import { CommonInputProps, HelperText, Label, Validity } from "./textFields/shared.js"; export declare function isClickableIcon(icon: AllowedIcons | ClickableIcon): icon is ClickableIcon; export interface ClickableIcon { icon: AllowedIcons; title: string; onClick: () => void; } export interface TextInputProps extends CommonInputProps, Validity, HelperText, Label { /** * Density of the field * @default default */ density?: DensitySizes; /** * Icon displayed before the field. Hidden for screen readers. */ leadingIcon?: AllowedIcons | ClickableIcon; /** * Icon displayed after the field. Hidden for screen readers. */ trailingIcon?: AllowedIcons | ClickableIcon; /** * Short text displayed before the field. Hidden for screen readers. */ prefix?: string; /** * Short text displayed after the field. Hidden for screen readers. */ suffix?: string; /** * className for the wrapper element, e.g. for used with styled(TextField) */ className?: string; /** * Whether space should be reserved for text even when there is no current validation message or helper text. * This helps avoid layout changes if messages are conditional, but leads to a less tight layout. */ reserveSpaceForMessage?: boolean; } export interface SelectBaseInputProps extends RefAttributes, CommonInputProps, Validity, HelperText, Label { /** * Density of the field * @default default */ density?: DensitySizes; /** * Icon displayed before the field. Hidden for screen readers. */ leadingIcon?: AllowedIcons; /** * className for the wrapper element, e.g. for used with styled(TextField) */ className?: string; /** * onChange prop for setting value to selected options */ onChange: (value: TVal) => void; } export declare function useInputFieldLogic({ label, density: _density, validity, id, leadingIcon, trailingIcon, disabled, density, className, }: TextInputProps): { wrapperProps: { preInputWidth: string; postInputWidth: string; validity: import("../../index.js").InputFieldValidity<{ errorMsgRequired: true; }>; disabled: boolean | undefined; density: DensitySizes | undefined; className: string | undefined; }; contentProps: { validity: import("../../index.js").InputFieldValidity<{ errorMsgRequired: true; }>; prefixRef: RefCallback; suffixRef: RefCallback; inputId: string; labelId: string; helperId: string; }; commonInputProps: { "aria-describedby": string; id: string; placeholder: string; "aria-invalid"?: boolean | undefined; "aria-errormessage"?: string | undefined; }; }; export declare function useSelectInputLogic({ label, density: _density, validity, id, leadingIcon, disabled, density, className, }: SelectBaseInputProps): { wrapperProps: { preInputWidth: string; postInputWidth: string; validity: import("../../index.js").InputFieldValidity<{ errorMsgRequired: true; }>; disabled: boolean | undefined; density: DensitySizes | undefined; className: string | undefined; }; contentProps: { validity: import("../../index.js").InputFieldValidity<{ errorMsgRequired: true; }>; inputId: string; labelId: string; helperId: string; }; commonInputProps: { "aria-describedby": string; id: string; placeholder: string; "aria-invalid"?: boolean | undefined; "aria-errormessage"?: string | undefined; }; }; export declare function getInputFieldProps({ label, density, prefix, suffix, leadingIcon, trailingIcon, helperText, reserveSpaceForMessage, ...inputProps }: T & TextInputProps): { extraInformation: { label: string; density: DensitySizes | undefined; prefix: string | undefined; suffix: string | undefined; leadingIcon: AllowedIcons | ClickableIcon | undefined; trailingIcon: AllowedIcons | ClickableIcon | undefined; helperText: string | undefined; reserveSpaceForMessage: boolean | undefined; }; inputProps: Omit; }; export declare function getSelectInputProps({ label, density, leadingIcon, helperText, ...selectProps }: SelectBaseInputProps): { extraInformation: { label: string; density: DensitySizes | undefined; leadingIcon: AllowedIcons | undefined; helperText: string | undefined; }; selectProps: { /** * className for the wrapper element, e.g. for used with styled(TextField) */ className?: string; /** * onChange prop for setting value to selected options */ onChange: (value: T) => void; ref?: import("react").Ref | undefined; key?: import("react").Key | null | undefined; value?: T | undefined; id?: string; disabled?: boolean; validity?: import("../../index.js").InputFieldValidity<{ errorMsgRequired: true; }> | undefined; }; }; //# sourceMappingURL=shared.d.ts.map