Current section

Files

Jump to
noora types web-components.d.ts
Raw

types/web-components.d.ts

// Generated by scripts/generate-web-components.js. Do not edit directly.
/**
* Labels an item with compact status or categorization information.
*
* @element noora-badge
* @slot - The visible label.
* @slot icon - An icon displayed before the label. It takes precedence over dot.
* @csspart badge - The badge container.
* @csspart icon - The icon or dot container.
* @csspart label - The visible label.
*/
export class NooraBadge extends HTMLElement {
/** Controls whether the badge uses a solid or light fill. */
appearance: "fill" | "light-fill";
/** Controls the semantic color. Disabled badges ignore this value. */
color: "neutral" | "destructive" | "warning" | "attention" | "success" | "information" | "focus" | "primary" | "secondary";
/** Controls the badge dimensions and text size. */
size: "small" | "large";
/** Uses the disabled presentation regardless of color. */
disabled: boolean;
/** Displays a dot before the label when the icon slot is empty. */
dot: boolean;
/** Hides the label and displays only the icon slot. */
iconOnly: boolean;
/** Provides fallback text when the default slot is empty. */
label: string;
}
export function registerNooraBadge(): void;
/**
* Triggers an action, submits a form, or navigates to another location.
*
* @element noora-button
* @slot - The visible label, or the complete content when icon-only is present.
* @slot icon-left - An icon displayed before the label.
* @slot icon-right - An icon displayed after the label.
* @csspart control - The native link or button control.
*/
export class NooraButton extends HTMLElement {
/** Focuses the button when the page loads. */
autofocus: boolean;
/** Prevents activation and form submission. */
disabled: boolean;
/** Downloads the linked resource, optionally using this value as the filename. */
download: string | undefined;
/** Associates the button with a form by element identifier. */
formId: string | undefined;
/** Overrides the associated form action for this submit button. */
formAction: string | undefined;
/** Overrides the associated form encoding type for this submit button. */
formEnctype: string | undefined;
/** Overrides the associated form method for this submit button. */
formMethod: string | undefined;
/** Skips validation when this button submits its associated form. */
formNoValidate: boolean;
/** Overrides where the associated form response is displayed. */
formTarget: string | undefined;
/** Renders the control as a link to this location. */
href: string;
/** Uses the default slot as the entire button content. An accessible label is required. */
iconOnly: boolean;
/** Provides fallback text when the default slot is empty. */
label: string;
/** Sets the form field name submitted with the button value. */
name: string;
/** Sets the relationship between the current page and a linked resource. */
rel: string | undefined;
/** Controls the button dimensions and text size. */
size: "small" | "medium" | "large";
/** Controls where a linked resource is opened. */
target: string | undefined;
/** Controls native button behavior when href is absent. */
type: "button" | "reset" | "submit";
/** Sets the form value submitted with the button name. */
value: string;
/** Controls the visual emphasis and semantic intent. */
variant: "primary" | "secondary" | "destructive";
/** The native link or button rendered inside the component. */
readonly control: HTMLAnchorElement | HTMLButtonElement | null;
/** The form associated with the button, if one exists. */
readonly form: HTMLFormElement | null;
}
export function registerNooraButton(): void;
declare global {
interface HTMLElementTagNameMap {
"noora-badge": NooraBadge;
"noora-button": NooraButton;
}
}