import { type IClearable } from '../../../Behaviors/Clearable'; import { type IInvalidable } from '../../../Behaviors/Invalidable'; import { type ISlottable } from '../../../Behaviors/Slottable'; import { InputBaseElement } from '../Abstracts/InputBase'; import type { IDurationBoxElementProps } from './IDurationBoxElementProps'; declare const DurationBoxElement_base: (abstract new (...args: Array) => import("../../../Behaviors/Themeable").IThemeableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Slottable").ISlottableProps & ISlottable) & (abstract new (...args: Array) => import("../../../Behaviors/Clearable").IClearableProps & import("../../../Behaviors/Clearable").IClearableEvents & IClearable) & (abstract new (...args: Array) => import("../../../Behaviors/Appearanceable").IAppearanceableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Disableable").IDisableableProps) & (abstract new (...args: Array) => IInvalidable & import("../../../Behaviors/Invalidable").IInvalidableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Valueable").IValueableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Variantable").IVariantableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Labelable").ILabelableProps) & typeof InputBaseElement & import("../../../Behaviors/Themeable").IThemeableCtor; /** * Duration Box - A specialized input control for entering duration values in HH:MM:SS format. * * @description * The Duration Box component provides a user-friendly interface for inputting duration values * using three separate numeric segments for hours, minutes, and seconds. The component stores * the value as total seconds (number) and handles the conversion between the segmented display * and the numeric value internally. It supports keyboard navigation between segments, automatic * zero-padding on blur, validation of numeric input, and clearing. Ideal for time tracking, * scheduling, and any scenario requiring duration input. * * @name Duration Box * @element mosaik-durationbox * @category Inputs * * @slot prefix - Content placed before the input segments. * @slot suffix - Content placed after the input segments. * * @csspart clear - The clear button part. * @csspart focusRing - The focus ring indicator. * @csspart hours-segment segment - The hours-segment segment part. * @csspart inner - The inner container wrapper. * @csspart label - The floating label element. * @csspart minutes-segment segment - The minutes-segment segment part. * @csspart prefix - The prefix content container. * @csspart seconds-segment segment - The seconds-segment segment part. * @csspart segments - The container for the hour, minute, second segments. * @csspart separator - The colon separator between segments. * @csspart suffix - The suffix content container. * * @cssprop {String} --duration-box-background-color - The box background color CSS custom property. * @cssprop {String} --duration-box-border-color - The box border color CSS custom property. * @cssprop {String} --duration-box-border-radius - The box border radius CSS custom property. * @cssprop {String} --duration-box-border-style - The box border style CSS custom property. * @cssprop {String} --duration-box-border-width - The box border width CSS custom property. * @cssprop {String} --duration-box-font-family - The box font family CSS custom property. * @cssprop {String} --duration-box-font-letter-spacing - The box font letter spacing CSS custom property. * @cssprop {String} --duration-box-font-line-height - The box font line height CSS custom property. * @cssprop {String} --duration-box-font-size - The box font size CSS custom property. * @cssprop {String} --duration-box-font-text-decoration - The box font text decoration CSS custom property. * @cssprop {String} --duration-box-font-text-transform - The box font text transform CSS custom property. * @cssprop {String} --duration-box-font-weight - The box font weight CSS custom property. * @cssprop {String} --duration-box-foreground-color - The box foreground color CSS custom property. * @cssprop {String} --duration-box-gap - The box gap CSS custom property. * @cssprop {String} --duration-box-height - The box height CSS custom property. * @cssprop {String} --duration-box-padding-bottom - The box padding bottom CSS custom property. * @cssprop {String} --duration-box-padding-left - The box padding left CSS custom property. * @cssprop {String} --duration-box-padding-right - The box padding right CSS custom property. * @cssprop {String} --duration-box-padding-top - The box padding top CSS custom property. * @cssprop {String} --duration-box-shadow - The box shadow CSS custom property. * @cssprop {String} --duration-box-shadow-blur - The box shadow blur CSS custom property. * @cssprop {String} --duration-box-shadow-color - The box shadow color CSS custom property. * @cssprop {String} --duration-box-shadow-offset-x - The box shadow offset x CSS custom property. * @cssprop {String} --duration-box-shadow-offset-y - The box shadow offset y CSS custom property. * @cssprop {String} --duration-box-shadow-spread - The box shadow spread CSS custom property. * @cssprop {String} --duration-box-transition-duration - The box transition duration CSS custom property. * @cssprop {String} --duration-box-transition-mode - The box transition mode CSS custom property. * @cssprop {String} --duration-box-transition-property - The box transition property CSS custom property. * @cssprop {String} --duration-box-translate - The box translate CSS custom property. * * @fires cleared {ClearedEvent} - Fired when the value is cleared. * @fires change {PropertyChangedEvent} - Emitted when the value changes. * @fires input {PropertyChangedEvent} - Emitted when the value changes. * @fires focus - Emitted when the element receives focus. * @fires blur - Emitted when the element loses focus. * * @dependency mosaik-button - Used for the clear button. * @dependency mosaik-focus-ring - Used for focus indication. * * @example * Duration input for a time tracking application: * ```html * * ``` * * @example * Required duration field in a task creation form: * ```html * * ``` * * @public */ export declare class DurationBoxElement extends DurationBoxElement_base implements IDurationBoxElementProps, IInvalidable, IClearable, ISlottable { private _hoursInputElement; private _minutesInputElement; private _secondsInputElement; private _value; private _readonly; private _required; private _autofocus; private _name; private _placeholder; private _hours; private _minutes; private _seconds; /** * @public */ constructor(); /** * Returns the `is` property. * The `is` property represents natural name of this element. * * @public * @static * @readonly */ static get is(): string; /** * Gets or sets the `value` property. * The value is stored as total seconds. * * @public * @attr * @override */ get value(): number | null; set value(value: number | null); /** * Gets or sets the `readonly` property. * * @public * @attr */ get readonly(): boolean; set readonly(value: boolean); /** * Gets or sets the `required` property. * * @public * @attr */ get required(): boolean; set required(value: boolean); /** * Gets or sets the `autofocus` property. * * @public * @attr * @override */ get autofocus(): boolean; set autofocus(value: boolean); /** * Gets or sets the `name` property. * * @public * @attr */ get name(): string; set name(value: string); /** * Gets or sets the `placeholder` property. * * @public * @attr */ get placeholder(): string; set placeholder(value: string); /** * Gets the hours segment value. * * @public * @readonly */ get hours(): string; /** * Gets the minutes segment value. * * @public * @readonly */ get minutes(): string; /** * Gets the seconds segment value. * * @public * @readonly */ get seconds(): string; /** * Determines whether the element has a prefix or not. * * @private * @readonly * @attr */ get hasPrefix(): boolean; /** * Determines whether the element has a suffix or not. * * @private * @readonly * @attr */ get hasSuffix(): boolean; /** * Determines whether the element has a label or not. * * @private * @readonly * @attr */ get hasLabel(): boolean; /** * @public * @override */ focus(): void; /** * @public * @override */ blur(): void; /** * Clears the value of the element but not the validation. * * @public * @override */ clear(force?: boolean): boolean; /** * Resets the value, all kinds of validation and errors. * * @public * @override */ reset(): void; /** * Checks the validity of the element and returns `true` if it is valid; otherwise, `false`. * * @public * @override */ checkValidity(): boolean; /** * Handles the input event on a segment. * * @private * @hidden * @template */ onSegmentInput(segment: 'hours' | 'minutes' | 'seconds', event: InputEvent): void; /** * Handles the change event on a segment. * * @private * @hidden * @template */ onSegmentChange(segment: 'hours' | 'minutes' | 'seconds', event: Event): void; /** * Handles the focus event on a segment. Selects all text. * * @private * @hidden * @template */ onSegmentFocus(event: FocusEvent): void; /** * Handles the blur event on a segment. Pads values with zeros. * * @private * @hidden * @template */ onSegmentBlur(segment: 'hours' | 'minutes' | 'seconds', event: FocusEvent): void; /** * Handles keydown events for Tab navigation between segments. * * @private * @hidden * @template */ onSegmentKeyDown(segment: 'hours' | 'minutes' | 'seconds', event: KeyboardEvent): void; /** * @protected * @override */ protected onApplyTemplate(): void; private syncSegmentsFromValue; private updateValueFromSegments; } /** * @public */ export declare namespace DurationBoxElement { type Props = IDurationBoxElementProps; } /** * @public */ declare global { interface HTMLElementTagNameMap { 'mosaik-durationbox': DurationBoxElement; } } export {}; //# sourceMappingURL=DurationBoxElement.d.ts.map