UNPKG

@lion/ui

Version:

A package of extendable web components

62 lines 2.9 kB
declare const LionButton_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("../../core/types/DisabledWithTabIndexMixinTypes.js").DisabledWithTabIndexHost> & Pick<typeof import("../../core/types/DisabledWithTabIndexMixinTypes.js").DisabledWithTabIndexHost, "prototype"> & import("@open-wc/dedupe-mixin").Constructor<import("../../core/types/DisabledMixinTypes.js").DisabledHost> & Pick<typeof import("../../core/types/DisabledMixinTypes.js").DisabledHost, "prototype"> & Pick<typeof LitElement, typeof Symbol.metadata | "prototype" | "_$litElement$" | "enabledWarnings" | "enableWarning" | "disableWarning" | "addInitializer" | "_initializers" | "elementProperties" | "properties" | "elementStyles" | "styles" | "observedAttributes" | "createProperty" | "getPropertyOptions" | "shadowRootOptions">; /** * @typedef {import('lit').TemplateResult} TemplateResult */ /** * Use LionButton (or LionButtonReset|LionButtonSubmit) when there is a need to extend HTMLButtonElement. * It allows to create complex shadow DOM for buttons needing this. Think of: * - a material Design button that needs a JS controlled ripple * - a LionSelectRich invoker that needs a complex shadow DOM structure * (for styling/maintainability purposes) * - a specialized button (for instance a primary button or icon button in a Design System) that * needs a simple api: `<my-button>text</my-button>` is always better than * `<button class="my-button"><div class="my-button__container">text</div><button>` * * In other cases, whenever you can, still use native HTMLButtonElement (`<button>`). * * Note that LionButton is meant for buttons with type="button". It's cleaner and more * lightweight than LionButtonReset and LionButtonSubmit, which should only be considered when native * `<form>` support is needed: * - When type="reset|submit" should be supported, use LionButtonReset. * - When implicit form submission should be supported on top, use LionButtonSubmit. * * @customElement lion-button */ export class LionButton extends LionButton_base { static get properties(): { active: { type: BooleanConstructor; reflect: boolean; }; type: { type: StringConstructor; reflect: boolean; }; }; static get styles(): import("lit").CSSResult[]; render(): import("lit-html").TemplateResult<1>; type: string; active: boolean; /** * @private */ private __setupEvents; /** * @private */ private __mousedownHandler; /** * @param {KeyboardEvent} event * @private */ private __keydownHandler; /** * @param {KeyboardEvent} event * @private */ private __keyupHandler; } export type TemplateResult = import('lit').TemplateResult; import { LitElement } from "lit"; export {}; //# sourceMappingURL=LionButton.d.ts.map