UNPKG

@furystack/shades-common-components

Version:

Common UI components for FuryStack Shades

85 lines 2.18 kB
import type { PartialElement } from '@furystack/shades'; import type { Palette } from '../../services/theme-provider-service.js'; import type { ComponentSize } from '../component-size.js'; export type InputNumberProps = { /** * The current numeric value */ value?: number; /** * Minimum allowed value */ min?: number; /** * Maximum allowed value */ max?: number; /** * Step increment for +/- buttons and keyboard arrows * @default 1 */ step?: number; /** * Number of decimal places to display */ precision?: number; /** * Callback when the value changes */ onValueChange?: (value: number | undefined) => void; /** * Custom formatter to display the value in the input */ formatter?: (value: number | undefined) => string; /** * Custom parser to convert the displayed text back to a number */ parser?: (displayValue: string) => number | undefined; /** * An optional label title element or string */ labelTitle?: JSX.Element | string; /** * Optional props for the label element */ labelProps?: PartialElement<HTMLLabelElement>; /** * The variant of the input */ variant?: 'contained' | 'outlined'; /** * The color of the input */ color?: keyof Palette; /** * Whether the input is disabled */ disabled?: boolean; /** * Whether the input is read-only */ readOnly?: boolean; /** * The name attribute for form integration */ name?: string; /** * The size of the input. * @default 'medium' */ size?: ComponentSize; /** * Helper text displayed below the input */ helperText?: string; /** * Placeholder text */ placeholder?: string; }; export declare const InputNumber: (props: InputNumberProps & Omit<Partial<HTMLElement>, "style"> & { style?: Partial<CSSStyleDeclaration>; } & { ref?: import("@furystack/shades").RefObject<Element>; }, children?: import("@furystack/shades").ChildrenList) => JSX.Element; //# sourceMappingURL=input-number.d.ts.map