UNPKG

@lion/ui

Version:

A package of extendable web components

151 lines 5.11 kB
declare const LionInputStepper_base: typeof LionInput & import("@open-wc/dedupe-mixin").Constructor<import("../../localize/types/LocalizeMixinTypes.js").LocalizeMixinHost> & Pick<typeof import("../../localize/types/LocalizeMixinTypes.js").LocalizeMixinHost, "prototype" | "localizeNamespaces" | "waitForLocalizeNamespaces"> & Pick<typeof import("lit").LitElement, typeof Symbol.metadata | "prototype" | "_$litElement$" | "enabledWarnings" | "enableWarning" | "disableWarning" | "addInitializer" | "_initializers" | "elementProperties" | "properties" | "elementStyles" | "styles" | "observedAttributes" | "createProperty" | "getPropertyOptions" | "shadowRootOptions">; /** * @typedef {import('lit').RenderOptions} RenderOptions */ /** * `LionInputStepper` is a class for custom input-stepper element (`<lion-input-stepper>` web component). * * @customElement lion-input-stepper */ export class LionInputStepper extends LionInputStepper_base { static get styles(): (import("lit").CSSResultOrNative | import("lit").CSSResultArray)[]; /** @type {any} */ static get properties(): any; static localizeNamespaces: import("../../localize/types/LocalizeMixinTypes.js").NamespaceObject[]; /** * @returns {number} */ get currentValue(): number; /** @param {string} modelValue */ parser: typeof parseNumber; formatter: typeof formatNumber; min: number; max: number; /** * The aria-valuetext attribute defines the human-readable text alternative of aria-valuenow. * @type {{[key: number]: string}} */ valueTextMapping: { [key: number]: string; }; step: number; values: { max: number; min: number; step: number; }; /** * Increment the value based on given step or default step value is 1 * @private */ private __increment; /** * Decrement the value based on given step or default step value is 1 * @private */ private __decrement; /** * @protected * @param {Event} ev */ protected _onEnterButton(ev: Event): void; /** * Redispatch leave event on host when catching leave event * on the incrementor and decrementor button. * * This redispatched leave event will be caught by * InteractionStateMixin to set "touched" state to true. * * Interacting with the buttons is "user interactions" * the same way as focusing + blurring the field (native input) * * @protected * @param {Event} ev */ protected _onLeaveButton(ev: Event): void; connectedCallback(): void; disconnectedCallback(): void; get slots(): { prefix: () => Element | null; suffix: () => Element | null; input: () => HTMLInputElement; }; /** * Set aria labels and apply validators * @private */ private __setDefaultValidators; /** * Update values on keyboard arrow up and down event * @param {KeyboardEvent} ev - keyboard event * @private */ private __keyDownHandler; /** * Toggle disabled state for the buttons * @private */ private __toggleSpinnerButtonsState; /** * @protected */ protected _updateAriaAttributes(): void; __valueText: string | undefined; /** * Get slotted element * @param {String} slotName - slot name * @returns {HTMLButtonElement|Object} * @private */ private __getSlot; /** * Get the increment button node * @returns {Element|null} * @private */ private __getIncrementButtonNode; /** * Get the decrement button node * @returns {Element|null} * @private */ private __getDecrementButtonNode; /** * Toggle +/- buttons on change * @override * @protected */ protected override _onChange(): void; /** * Get the decrementor button sign template * @returns {String|import('lit').TemplateResult} * @protected */ protected _decrementorSignTemplate(): string | import('lit').TemplateResult; /** * Get the incrementor button sign template * @returns {String|import('lit').TemplateResult} * @protected */ protected _incrementorSignTemplate(): string | import('lit').TemplateResult; /** * Get the increment button template * @returns {import('lit').TemplateResult} * @protected */ protected _decrementorTemplate(): import('lit').TemplateResult; /** * Get the decrement button template * @returns {import('lit').TemplateResult} * @protected */ protected _incrementorTemplate(): import('lit').TemplateResult; /** @protected */ protected _inputGroupTemplate(): import("lit-html").TemplateResult<1>; } export type RenderOptions = import('lit').RenderOptions; import { LionInput } from "../../../exports/input.js"; import { parseNumber } from "../../../exports/localize-no-side-effects.js"; import { formatNumber } from "../../../exports/localize-no-side-effects.js"; export {}; //# sourceMappingURL=LionInputStepper.d.ts.map