/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { LitElement, TemplateResult } from 'lit'; import { BadgeStatus, BadgeSize, BadgeColor, RibbonPlacement } from './badge.types.js'; declare const NrBadgeElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & typeof LitElement; /** * # Badge Component * * Small numerical value or status descriptor for UI elements. * Badge normally appears in proximity to notifications or user avatars with * eye-catching appeal, typically displaying unread messages count. * * ## Features * - Count badge with overflow support * - Dot badge for simple indicators * - Status badge with predefined states * - Ribbon badge for decorative labels * - Customizable colors (preset and custom) * - Offset positioning * - Show zero option * - Theme-aware styling * * ## Usage * ```html * * * * * * * * * * * * * * * *
Card content
*
* * * * ``` * * @element nr-badge * * @slot - Content to wrap with badge (avatar, icon, etc.) * * @cssproperty --nuraly-badge-text-font-size - Font size of badge text * @cssproperty --nuraly-badge-text-font-weight - Font weight of badge text * @cssproperty --nuraly-badge-indicator-height - Height of badge indicator * @cssproperty --nuraly-badge-indicator-height-sm - Height of small badge * @cssproperty --nuraly-badge-indicator-z-index - Z-index of badge * @cssproperty --nuraly-badge-dot-size - Size of dot badge * @cssproperty --nuraly-badge-status-size - Size of status indicator */ export declare class NrBadgeElement extends NrBadgeElement_base { static styles: import("lit").CSSResult; /** * Number to show in badge */ count?: number; /** * Whether to display a dot instead of count */ dot: boolean; /** * Max count to show (shows count+ when exceeded) */ overflowCount: number; /** * Whether to show badge when count is zero */ showZero: boolean; /** * Set offset of the badge dot [x, y] */ offset?: [number, number]; /** * Badge color (preset or custom hex/rgb) */ color?: BadgeColor | string; /** * Badge size */ size: BadgeSize; /** * Set Badge as a status dot */ status?: BadgeStatus; /** * Status text to display */ text?: string; /** * Title to show on hover */ badgeTitle?: string; /** * Ribbon text (enables ribbon mode) */ ribbon?: string; /** * Ribbon placement */ ribbonPlacement: RibbonPlacement; /** * Get the display count text */ private getDisplayCount; /** * Check if badge should be hidden */ private shouldHideBadge; /** * Get custom color style */ private getCustomColorStyle; /** * Get offset style */ private getOffsetStyle; /** * Render status badge */ private renderStatusBadge; /** * Render ribbon badge */ private renderRibbonBadge; /** * Render count/dot badge */ private renderCountBadge; render(): TemplateResult<1 | 2>; } declare global { interface HTMLElementTagNameMap { 'nr-badge': NrBadgeElement; } } export {}; //# sourceMappingURL=badge.component.d.ts.map