import { ID, MaybeArray } from "../../types/index.mjs"; import { AtomProps } from "../Atom/Atom.vue.mjs"; import "../Atom/index.mjs"; import { RegistryContext } from "../../composables/createRegistry/index.mjs"; import { StandardSchemaV1 } from "../../composables/useRules/adapters/standard.mjs"; import { RuleAlias } from "../../composables/useRules/index.mjs"; import { FormValidationRule } from "../../composables/createForm/index.mjs"; import { InputState } from "../../composables/createInput/index.mjs"; import { NumberFieldContext } from "../../composables/createNumberField/index.mjs"; import { ValidateOn } from "../Input/InputRoot.vue.mjs"; import "../Input/index.mjs"; import { MaybeRefOrGetter, Ref, ShallowRef } from "vue"; //#region src/components/NumberField/NumberFieldRoot.vue.d.ts interface NumberFieldRootContext extends NumberFieldContext { /** Unique identifier */ readonly id: ID; /** Optional display label (used as aria-label on spinbutton) */ readonly label?: string; /** ID of element that labels this spinbutton */ readonly ariaLabelledby?: string; /** Form field name */ readonly name?: string; /** Associate with form by ID */ readonly form?: string; /** Whether this field is required */ readonly required?: boolean; /** ID for description element (aria-describedby) */ readonly descriptionId: string; /** ID for error element (aria-errormessage) */ readonly errorId: string; /** Registry of mounted Description sub-components */ descriptions: RegistryContext; /** Registry of mounted Error sub-components */ fieldErrors: RegistryContext; /** Whether a Description sub-component is mounted */ hasDescription: Readonly>; /** Whether an Error sub-component is mounted */ hasError: Readonly>; /** Whether this field has content */ isDirty: Readonly>; /** Whether this field is focused */ isFocused: ShallowRef; /** Whether this field is disabled */ isDisabled: Readonly>; /** Whether this field is readonly */ isReadonly: Readonly>; /** Merged validation + manual error messages */ errors: Readonly>; /** Whether the field is valid (null = unvalidated) */ isValid: Readonly>; /** Whether the field value hasn't changed since mount/reset */ isPristine: Readonly>; /** Whether async validation is in progress */ isValidating: Readonly>; /** Validate the field */ validate: () => Promise; /** Reset the field to initial state */ reset: () => void; /** Delay in ms before spin-on-hold starts */ spinDelay: number; /** Interval in ms for repeated spin */ spinRate: number; /** Whether mouse wheel adjusts value */ wheel: boolean; } interface NumberFieldRootProps extends AtomProps { /** Unique identifier (auto-generated if not provided) */ id?: ID; /** Optional display label (rendered as aria-label on the spinbutton) */ label?: string; /** ID of element that labels this spinbutton */ ariaLabelledby?: string; /** Form field name */ name?: string; /** Associate with form by ID */ form?: string; /** Whether this field is required */ required?: boolean; /** Disables this field */ disabled?: boolean | MaybeRefOrGetter; /** Makes this field readonly */ readonly?: boolean | MaybeRefOrGetter; /** Minimum value */ min?: number; /** Maximum value */ max?: number; /** Step increment (default: 1) */ step?: number; /** Leap increment for PageUp/PageDown */ leap?: number; /** Wrap around at boundaries */ wrap?: boolean; /** BCP 47 locale tag (default: 'en-US') */ locale?: string; /** Intl.NumberFormat options */ format?: Intl.NumberFormatOptions; /** Whether commit() clamps to min/max (default: true) */ clamp?: boolean; /** When typed input is written into the model (default: 'change') */ commitOn?: 'input' | 'change'; /** Validation rules */ rules?: (FormValidationRule | RuleAlias | StandardSchemaV1)[]; /** When to trigger validation */ validateOn?: ValidateOn; /** Manual error state override — forces invalid */ error?: boolean; /** Manual error messages — merged with rule-based errors */ errorMessages?: MaybeArray; /** Delay in ms before spin-on-hold starts (default: 400) */ spinDelay?: number; /** Interval in ms for repeated spin (default: 60) */ spinRate?: number; /** Whether mouse wheel adjusts value (default: false) */ wheel?: boolean; /** Namespace for context provision */ namespace?: string; /** Namespace for connecting to parent Form. Must match Form's namespace. */ formNamespace?: string; } interface NumberFieldRootSlotProps { /** Unique identifier */ id: ID; /** Current numeric value */ value: number | null; /** Formatted display string */ display: string; /** Whether the value can be incremented */ canIncrement: boolean; /** Whether the value can be decremented */ canDecrement: boolean; /** Whether this field is disabled */ isDisabled: boolean; /** Whether this field is readonly */ isReadonly: boolean; /** Whether this field is focused */ isFocused: boolean; /** Merged error messages */ errors: string[]; /** Whether the field is valid */ isValid: boolean | null; /** Whether the field value hasn't changed */ isPristine: boolean; /** Validate the field */ validate: () => Promise; /** Reset the field */ reset: () => void; /** Attributes to bind to the root element */ attrs: { 'data-state': InputState; 'data-dirty': true | undefined; 'data-focused': true | undefined; 'data-disabled': true | undefined; 'data-readonly': true | undefined; }; } declare const useNumberFieldRoot: (key: string, defaultValue?: NumberFieldRootContext | undefined) => NumberFieldRootContext, provideNumberFieldRoot: (key: string, context: NumberFieldRootContext, app?: import("vue").App) => NumberFieldRootContext; declare const _default: typeof __VLS_export; declare const __VLS_export: __VLS_WithSlots any; "update:model-value": (value: number | null) => any; }, string, import("vue").PublicProps, Readonly & Readonly<{ "onUpdate:modelValue"?: ((value: number | null) => any) | undefined; "onUpdate:model-value"?: ((value: number | null) => any) | undefined; }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, { default: (props: NumberFieldRootSlotProps) => any; }>; type __VLS_WithSlots = T & { new (): { $slots: S; }; }; //#endregion export { NumberFieldRootContext, NumberFieldRootProps, NumberFieldRootSlotProps, _default as default, provideNumberFieldRoot, useNumberFieldRoot };