import type { Component, Snippet } from 'svelte'; import type { ValidationContext, ValidationResult } from '../../utils/validation'; export type NumberSpinnerValidator = (context: ValidationContext) => ValidationResult; export type Props = { /** Generated internally for the label association and Sitevision setup. */ id?: never; /** Field label, a string or Svelte snippet. */ label: string | Snippet; /** Configuration key and HTML name attribute. */ name?: string; /** Description shown below the field, a string or Svelte snippet. */ description?: string | Snippet; /** Minimum value for the spinner. */ min?: number; /** Maximum value for the spinner. */ max?: number; /** Increment used by the spinner controls. */ step?: number; /** Disables the field. */ disabled?: boolean; /** Prevents editing while keeping the field focusable. */ readonly?: boolean; /** Shows or hides the spinner without destroying it. */ show?: boolean; /** Suffix displayed after the value, as text or singular/plural forms. */ suffix?: string | [string, string]; /** Number of decimal places handled by the Sitevision spinner. */ decimals?: number; /** Numeric field value. */ value?: number; /** CSS class added to the form-group wrapper. */ class?: string; /** Callback for the jQuery input event with the updated numeric value. */ onInput?: ( value: number, event: JQuery.TriggeredEvent, ) => void | Promise; /** Callback for the jQuery change event with the updated numeric value. */ onChange?: ( value: number, event: JQuery.TriggeredEvent, ) => void | Promise; /** Custom validator. */ validate?: NumberSpinnerValidator; /** Content rendered after the spinner and validation message. */ children?: Snippet; }; /** * Wrapper for Sitevision [number spinner](https://developer.sitevision.se/docs/webapps/configuration/sitevision-components) component. * See [Readme](https://docs.soleil.se/packages/config-svelte/components/numberspinner/). */ declare const NumberSpinner: Component; export default NumberSpinner;