/** * The `auro-counter` element provides a flexible counter interface with increment and decrement buttons, supporting optional sub-labels and disabled states. * @customElement auro-counter * * @slot default - Main label content for the counter. * @slot ariaLabel.minus - Accessible label for the decrement button. * @slot ariaLabel.plus - Accessible label for the increment button. * @slot helpText - Help text content for the counter. * @slot description - Descriptive content for the counter. */ export class AuroCounter extends LitElement { static get shadowRootOptions(): { delegatesFocus: boolean; clonable?: boolean; customElementRegistry?: CustomElementRegistry; mode: ShadowRootMode; serializable?: boolean; slotAssignment?: SlotAssignmentMode; }; /** * Defines reactive properties for the component. * @returns {Object} Property configuration. */ static get properties(): any; /** * Registers the custom element with the browser. * @param {string} [name="auro-counter"] - The name of the element that you want to register. * @example * AuroCounter.register("custom-counter") // registers */ static register(name?: string): void; static get styles(): import("lit").CSSResult[]; _initializeDefaults(): void; appearance: string; defaultSlot: any; disabled: boolean; disableMax: boolean; disableMin: boolean; max: number; min: number; onDark: boolean; validity: any; value: number; /** * @private */ private validation; /** * Dynamically generated icon tag for counter buttons. * @private * @type {string} */ private iconTag; /** * @private */ private helpTextTag; /** * @private */ private runtimeUtils; /** * Increments the counter value by 1. If a value is provided, it increments by that amount. * @method increment * @param {number} [value] - The amount to increment by. * @returns {void} */ increment(value?: number): void; /** * Decrements the value of the counter by 1. If a value is provided, it decrements by that amount. * @method decrement * @param {number} [value] - The amount to decrement by. * @returns {void} */ decrement(value?: number): void; /** * Initializes the value of the counter. * If the current value is undefined, it sets the value to the minimum value. * @private */ private initValue; /** * Determines if the increment button should be disabled based on the current value and extrema. * * @param {number} extrema - The extreme value (either min or max) to compare against the current value. * @returns {boolean} - Returns true if the increment button should be disabled, otherwise false. * @private */ private isIncrementDisabled; /** * Validates value. * @param {boolean} [force=false] - Whether to force validation. */ validate(force?: boolean): void; /** * Handles the keydown event for the counter component. * @param {KeyboardEvent} event - The keyboard event object. * @returns {void} * @private */ private handleKeyDown; firstUpdated(): void; /** * Sets an attribute that matches the default tag name if the tag name is not the default. * @param {string} tagName - The tag name to set as an attribute. * @private */ private setTagAttribute; /** * Handles the change event for the default slot. * Updates the defaultSlot property with the trimmed text content of the first assigned node. * * @param {Event} event - The event object representing the slot change event. * @private */ private onDefaultSlotChange; updated(changedProperties: any): void; /** * Returns HTML for the help text and error message. * @private * @returns {html} - Returns HTML for the help text and error message. */ private renderHelpText; render(): import("lit-html").TemplateResult; } import { LitElement } from "lit";