/** @packageDocumentation * @module Inputs */ import "./QuantityNumberInput.scss"; import * as React from "react"; import type { QuantityTypeArg } from "@itwin/core-frontend"; import { Input } from "@itwin/itwinui-react"; type InputProps = React.ComponentPropsWithoutRef; /** Step function prototype for [[QuantityNumberInput]] component * @beta */ export type StepFunctionProp = number | ((direction: string) => number | undefined); /** Properties for the [[QuantityNumberInput]] component * @beta */ export interface QuantityNumberInputProps extends Omit { /** Initial magnitude in 'persistence' units. See `getPersistenceUnitByQuantityType` in [QuantityFormatter]($core-frontend). * Set to `undefined` to show placeholder text */ persistenceValue?: number; /** CSS class name for the QuantityNumberInput component container div */ containerClassName?: string; /** number or function Number.MIN_SAFE_INTEGER */ min?: number; /** number or function defaults to Number.MAX_SAFE_INTEGER */ max?: number; /** increment step value used while incrementing or decrementing (up/down buttons or arrow keys) defaults to 1. */ step?: StepFunctionProp; /** Set to true to "snap" to the closest step value while incrementing or decrementing (up/down buttons or arrow keys). */ snap?: boolean; /** Function to call when the quantity value is changed. The value returned will be in 'persistence' units. */ onChange?: (value: number) => void; /** if true up/down buttons are shown larger and side by side */ showTouchButtons?: boolean; /** Provides ability to return reference to HTMLInputElement */ ref?: React.Ref; /** Type of quantity being input. */ quantityType: QuantityTypeArg; } /** The QuantityNumberInput component accepts input for quantity values. The quantity value is shown as a single numeric value and the quantity's * "display" unit is shown next to the input control. The "display" unit is determined by the active unit system as defined by the [QuantityFormatter]($frontend). * The control also display buttons to increment and decrement the "displayed" value. The value reported by via the onChange function is in "persistence" * units that can be stored in the iModel. * @beta */ export declare const QuantityNumberInput: (props: QuantityNumberInputProps) => React.ReactNode; export {}; //# sourceMappingURL=QuantityNumberInput.d.ts.map