@lion/ui
Version:
A package of extendable web components
74 lines • 2.37 kB
TypeScript
/**
* @typedef {import('./LionSteps.js').LionSteps} LionSteps
*/
/**
* `LionStep` is one of many in a LionSteps Controller
*
* @customElement lion-step
*/
export class LionStep extends LitElement {
static get properties(): {
/**
* Step status, one of: "untouched", "entered", "left", "skipped".
*/
status: {
type: StringConstructor;
reflect: boolean;
};
/**
* The funtion which us run to check if this step can be transitioned to.
* Takes lion-steps data as a first argument `myConditionFunc(data)`.
*/
condition: {
attribute: boolean;
};
/**
* Allows to invert condition function result.
*/
invertCondition: {
type: BooleanConstructor;
reflect: boolean;
attribute: string;
};
/**
* Allows transition to step only in forward direction. Skips it if transitioned back.
* May be useful if the step is only showing some messages and does data loading and
* then makes transition to next step automatically.
*/
forwardOnly: {
type: BooleanConstructor;
reflect: boolean;
attribute: string;
};
/**
* If set this step will be the initially enabled step
* There should be only ONE intial step in each steps
*/
initialStep: {
type: BooleanConstructor;
reflect: boolean;
attribute: string;
};
};
static get styles(): import("lit").CSSResult[];
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings: import("lit").WarningKind[];
status: string;
condition: (data?: Object | undefined) => boolean;
invertCondition: boolean;
forwardOnly: boolean;
initialStep: boolean;
render(): import("lit-html").TemplateResult<1>;
controller: import("./LionSteps.js").LionSteps | undefined;
enter(): void;
leave(): void;
skip(): void;
/** @param {Object} [data] */
passesCondition(data?: Object | undefined): boolean;
}
export type LionSteps = import('./LionSteps.js').LionSteps;
import { LitElement } from "lit";
//# sourceMappingURL=LionStep.d.ts.map