import { MaybeArray } from "../../types/index.mjs"; import { AtomProps } from "../Atom/Atom.vue.mjs"; import "../Atom/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 { TimeHourCycle, TimePeriod, TimePickerContext } from "../../composables/createTimePicker/index.mjs"; import { ValidateOn } from "../Input/InputRoot.vue.mjs"; import "../Input/index.mjs"; import { Ref } from "vue"; //#region src/components/TimePicker/TimePickerRoot.vue.d.ts interface TimePickerRootProps extends AtomProps { /** Namespace shared with the field components. */ namespace?: string; /** Ignore every edit, show the value as given, and never emit. @default false */ disabled?: boolean; /** Ignore every edit, show the value as given, and never emit. @default false */ readonly?: boolean; /** `h12` shows 1–12 and a meridiem. `h23` shows 0–23. @default 'h23' */ hourCycle?: TimeHourCycle; /** Show the second field and include seconds in the value. @default false */ seconds?: boolean; /** Hour interval. The hour moves on its multiples. @default 1 */ hourStep?: number; /** Minute interval. The minute moves on its multiples. @default 1 */ minuteStep?: number; /** Second interval. The second moves on its multiples. @default 1 */ secondStep?: number; /** Inclusive lower bound, `HH:mm` or `HH:mm:ss`. */ min?: string | null; /** Inclusive upper bound, `HH:mm` or `HH:mm:ss`. */ max?: string | null; /** Set it to submit the displayed time with a form. */ name?: string; /** Id of the form the hidden input belongs to, when it sits outside it. */ form?: string; /** Fail validation while a field is still empty. Root reads it once, at setup. */ required?: boolean; /** Validation rules. Each receives the model value. Root reads them once, at setup. */ rules?: (FormValidationRule | RuleAlias | StandardSchemaV1)[]; /** When to validate. Focus moving between the fields is not a blur. Input is an edit, a value from outside, or the picker normalizing a value that has a validity, from a validation or from `error` / `errorMessages`. The picker reads a late-accepting parent's answer as a value from outside. @default 'blur' */ validateOn?: ValidateOn; /** Force the invalid state, whatever the rules say. @default false */ error?: boolean; /** Error messages that come before the ones the rules produce. */ errorMessages?: MaybeArray; /** Namespace of the parent Form to register with. @default 'v0:form' */ formNamespace?: string; /** Id of the group element. */ id?: string; /** Accessible name for the group. Falls back to the locale catalog. */ ariaLabel?: string; /** Id of the element that labels the group. Replaces `ariaLabel`. */ ariaLabelledby?: string; /** Id of the element that describes the group. */ ariaDescribedby?: string; } interface TimePickerRootSlotProps { /** The time the fields show, as a 24-hour string, or `null` while a field is empty. */ value: string | null; /** Display hour. `0`–`23` in `h23`, `1`–`12` in `h12`. */ hour: number | null; /** Minute, `0`–`59`. */ minute: number | null; /** Second, or `null` when seconds are off or unset. */ second: number | null; /** Meridiem, or `null` in `h23`. */ period: TimePeriod | null; /** Resolved hour cycle. */ hourCycle: TimeHourCycle; /** Whether seconds are part of the value. */ seconds: boolean; /** Whether the picker is disabled. It then ignores edits. */ isDisabled: boolean; /** Whether the picker is readonly. It then ignores edits. */ isReadonly: boolean; /** Whether one of the fields has focus. Always false while disabled. */ isFocused: boolean; /** Error messages: the manual ones, then the ones the rules produced. */ errors: string[]; /** Whether the value is valid, or `null` before the first validation. */ isValid: boolean | null; /** Whether the value is still the initial one. Normalizing it does not count as a change. */ isPristine: boolean; /** Run the rules against the model value. */ validate: () => Promise; /** Put the initial value back, drop a partly entered time, and clear the validation state. Does not emit while disabled or readonly. */ reset: () => void; /** Clear every field. The value becomes `null`. Does nothing while disabled or readonly. */ clear: () => void; /** Attributes for the group element. */ attrs: { 'id': string; 'role': 'group'; 'aria-label': string | undefined; 'aria-labelledby': string | undefined; 'aria-describedby': string | undefined; 'aria-disabled': boolean | undefined; 'disabled': true | undefined; 'data-state': InputState; 'data-dirty': true | undefined; 'data-focused': true | undefined; 'data-disabled': true | undefined; 'data-readonly': true | undefined; 'data-complete': true | undefined; 'onFocusin': () => void; 'onFocusout': (event: FocusEvent) => void; }; } interface TimePickerRootContext extends TimePickerContext { /** Id of the group element; each field derives its own id from it. */ readonly id: string; /** Form field name. Root renders the hidden input while it has a value. */ readonly name: Readonly>; /** Id of the form the hidden input belongs to. */ readonly form: Readonly>; } declare const useTimePickerRoot: (key: string, defaultValue?: TimePickerRootContext | undefined) => TimePickerRootContext, provideTimePickerRoot: (key: string, context: TimePickerRootContext, app?: import("vue").App) => TimePickerRootContext; declare const _default: typeof __VLS_export; declare const __VLS_export: __VLS_WithSlots any; "update:model-value": (value: string | null) => any; }, string, import("vue").PublicProps, Readonly & Readonly<{ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined; "onUpdate:model-value"?: ((value: string | null) => any) | undefined; }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, { default: (props: TimePickerRootSlotProps) => any; }>; type __VLS_WithSlots = T & { new (): { $slots: S; }; }; //#endregion export { TimePickerRootContext, TimePickerRootProps, TimePickerRootSlotProps, _default as default, provideTimePickerRoot, useTimePickerRoot };