@sap-ux/ui-components
Version:
SAP UI Components Library
61 lines • 2.26 kB
TypeScript
import React from 'react';
import type { ITextFieldProps } from '@fluentui/react';
import type { UIMessagesExtendedProps } from '../../helper/ValidationMessage/index.js';
export type { ITextField, ITextFieldProps } from '@fluentui/react';
export type UITextInputProps = ITextFieldProps & UIMessagesExtendedProps;
export declare const COMMON_INPUT_STYLES: {
borderRadius: string;
};
export type InputRenderProps = React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>;
/**
* UITextInput component
* based on https://developer.microsoft.com/en-us/fluentui#/controls/web/textfield
*
* @exports
* @class UITextInput
* @extends {React.Component<ITextFieldProps, {}>}
*/
export declare class UITextInput extends React.Component<UITextInputProps> {
/**
* Initializes component properties.
*
* @param {UITextInputProps} props
*/
constructor(props: UITextInputProps);
/**
* Method returns value for CSS property "border" for focus state.
*
* @param {InputValidationMessageInfo} messageInfo
* @returns {string} Value for CSS "border" property.
*/
private getFocusBorder;
/**
* Method returns styles for text field.
*
* @param {ITextFieldStyleProps} props Component properties.
* @returns {Partial<ITextFieldStyles>} Styles to apply for text field.
*/
private readonly getStyles;
/**
* Method to extend HTML input element.
* Custom rendering is used to use "readonly" attribute instead of "disabled" to make disabled field focusable.
*
* @param {InputRenderProps} [props] Input props.
* @param {(props?: InputRenderProps) => JSX.Element | null} [defaultRender] Default renderer.
* @returns {JSX.Element | null} Input element to render.
*/
private onRenderDisabledInput;
/**
* Method to render HTML input element.
*
* @param {InputRenderProps} [props] Input props.
* @param {(props?: InputRenderProps) => JSX.Element | null} [defaultRender] Default renderer.
* @returns {JSX.Element | null} Input element to render.
*/
private onRenderInput;
/**
* @returns {JSX.Element}
*/
render(): JSX.Element;
}
//# sourceMappingURL=UITextInput.d.ts.map