@ui-machines/tags-input
Version:
Core logic for the tags-input widget implemented as a state machine
26 lines (25 loc) • 1.14 kB
TypeScript
import { MachineContext as Ctx } from "./tags-input.types";
export declare const dom: {
getDoc: (ctx: Ctx) => Document;
getRootId: (ctx: Ctx) => string;
getInputId: (ctx: Ctx) => string;
getEditInputId: (ctx: Ctx) => string;
getClearButtonId: (ctx: Ctx) => string;
getHiddenInputId: (ctx: Ctx) => string;
getTagId: (ctx: Ctx, id: string | number) => string;
getTagDeleteBtnId: (ctx: Ctx, id: string | number) => string;
getTagInputId: (ctx: Ctx, id: string | number) => string;
getRootEl: (ctx: Ctx) => HTMLElement;
getInputEl: (ctx: Ctx) => HTMLInputElement;
getEditInputEl: (ctx: Ctx) => HTMLInputElement;
getTag: (ctx: Ctx, id: string) => HTMLElement;
getElements: (ctx: Ctx) => HTMLElement[];
getClosestFormEl: (ctx: Ctx) => HTMLFormElement;
getIndexOfId: (ctx: Ctx, id: string) => number;
isInputFocused: (ctx: Ctx) => boolean;
getFirstEl: (ctx: Ctx) => HTMLElement;
getLastEl: (ctx: Ctx) => HTMLElement;
getPrevEl: (ctx: Ctx, id: string) => HTMLElement;
getNextEl: (ctx: Ctx, id: string) => HTMLElement;
getFocusedTagValue: (ctx: Ctx) => string;
};