@loadsmart/miranda-wc
Version:
Miranda Web Components component library
91 lines (90 loc) • 2.41 kB
TypeScript
import { Component } from '../component';
import type { TagProps } from './tag';
import '../close-button';
import '../text';
export type ActionableTagVariant = 'default' | 'accent';
export interface ActionableTagProps extends Pick<TagProps, 'size' | 'isSkeleton'> {
variant?: ActionableTagVariant;
selectable?: boolean;
selected?: boolean;
removable?: boolean;
disabled?: boolean;
onremove?: (event: CustomEvent) => void;
onchange?: GlobalEventHandlers['onchange'];
}
export declare class ActionableTag extends Component implements ActionableTagProps {
#private;
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[][];
static get properties(): {
variant: {
type: StringConstructor;
};
size: {
type: StringConstructor;
};
selectable: {
type: BooleanConstructor;
reflect: boolean;
};
selected: {
type: BooleanConstructor;
reflect: boolean;
};
removable: {
type: BooleanConstructor;
reflect: boolean;
};
disabled: {
type: BooleanConstructor;
reflect: boolean;
};
isSkeleton: {
type: BooleanConstructor;
attribute: string;
};
};
/**
* Tag variant.
*/
variant: ActionableTagProps['variant'];
/**
* Tag size.
*/
size: ActionableTagProps['size'];
/**
* Should the tag be clickable?
*/
selectable: ActionableTagProps['selectable'];
/**
* Is the tag selected?
*/
selected: ActionableTagProps['selected'];
/**
* Should it show the remove button?
*/
removable: ActionableTagProps['removable'];
/**
* Is the tag and/or the close button disabled?
*/
disabled: ActionableTagProps['disabled'];
/**
* Tag skeleton loader.
*/
isSkeleton: ActionableTagProps['isSkeleton'];
/**
* Event handler for removing the tag.
*/
onremove: ActionableTagProps['onremove'];
static define(): void;
constructor();
/**
* Which HTML tag should be used to render this element.
*/
private get tag();
render(): import("lit-html").TemplateResult;
}
declare global {
interface HTMLElementTagNameMap {
'm-actionable-tag': ActionableTag;
}
}