@porsche-design-system/components-react
Version:
Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.
185 lines (184 loc) • 5.08 kB
TypeScript
import type { BaseProps } from '../../BaseProps';
import type { InputNumberAutoComplete, BreakpointCustomizable, InputNumberBlurEventDetail, InputNumberChangeEventDetail, InputNumberInputEventDetail, InputNumberState, Theme } from '../types';
export type PInputNumberProps = BaseProps & {
/**
* Specifies whether the input can be autofilled by the browser
*/
autoComplete?: InputNumberAutoComplete;
/**
* Displays as compact version.
*/
compact?: boolean;
/**
* Show or hide the increment/decrement stepper controls.
*/
controls?: boolean;
/**
* The description text.
*/
description?: string;
/**
* Marks the number input as disabled.
*/
disabled?: boolean;
/**
* The id of a form element the number input should be associated with.
*/
form?: string;
/**
* Show or hide label and description text. For better accessibility it is recommended to show the label.
*/
hideLabel?: BreakpointCustomizable<boolean>;
/**
* The label text.
*/
label?: string;
/**
* The max value of the number input.
*/
max?: number;
/**
* The message styled depending on validation state.
*/
message?: string;
/**
* The min value of the number input.
*/
min?: number;
/**
* The name of the number input.
*/
name: string;
/**
* Emitted when the number input has lost focus.
*/
onBlur?: (event: CustomEvent<InputNumberBlurEventDetail>) => void;
/**
* Emitted when the number input loses focus after its value was changed.
*/
onChange?: (event: CustomEvent<InputNumberChangeEventDetail>) => void;
/**
* Emitted when the value has been changed as a direct result of a user action.
*/
onInput?: (event: CustomEvent<InputNumberInputEventDetail>) => void;
/**
* The placeholder text.
*/
placeholder?: string;
/**
* Specifies whether the number input should be read-only.
*/
readOnly?: boolean;
/**
* Marks the number input as required.
*/
required?: boolean;
/**
* The validation state.
*/
state?: InputNumberState;
/**
* The granularity that the value must adhere to.
*/
step?: number;
/**
* Adapts the color depending on the theme.
*/
theme?: Theme;
/**
* The number input value.
*/
value?: string;
};
export declare const PInputNumber: import("react").ForwardRefExoticComponent<import("react").DOMAttributes<{}> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
/**
* Specifies whether the input can be autofilled by the browser
*/
autoComplete?: InputNumberAutoComplete;
/**
* Displays as compact version.
*/
compact?: boolean;
/**
* Show or hide the increment/decrement stepper controls.
*/
controls?: boolean;
/**
* The description text.
*/
description?: string;
/**
* Marks the number input as disabled.
*/
disabled?: boolean;
/**
* The id of a form element the number input should be associated with.
*/
form?: string;
/**
* Show or hide label and description text. For better accessibility it is recommended to show the label.
*/
hideLabel?: BreakpointCustomizable<boolean>;
/**
* The label text.
*/
label?: string;
/**
* The max value of the number input.
*/
max?: number;
/**
* The message styled depending on validation state.
*/
message?: string;
/**
* The min value of the number input.
*/
min?: number;
/**
* The name of the number input.
*/
name: string;
/**
* Emitted when the number input has lost focus.
*/
onBlur?: (event: CustomEvent<InputNumberBlurEventDetail>) => void;
/**
* Emitted when the number input loses focus after its value was changed.
*/
onChange?: (event: CustomEvent<InputNumberChangeEventDetail>) => void;
/**
* Emitted when the value has been changed as a direct result of a user action.
*/
onInput?: (event: CustomEvent<InputNumberInputEventDetail>) => void;
/**
* The placeholder text.
*/
placeholder?: string;
/**
* Specifies whether the number input should be read-only.
*/
readOnly?: boolean;
/**
* Marks the number input as required.
*/
required?: boolean;
/**
* The validation state.
*/
state?: InputNumberState;
/**
* The granularity that the value must adhere to.
*/
step?: number;
/**
* Adapts the color depending on the theme.
*/
theme?: Theme;
/**
* The number input value.
*/
value?: string;
} & {
children?: import("react").ReactNode | undefined;
} & import("react").RefAttributes<HTMLElement>>;