import { CSSProperties, ElementType, HTMLAttributes, ReactNode } from 'react';
type StyledBadgeSize = 'medium' | 'small';
/** Figma's `Parent` axis. It sets the dot's size and fill together, which is why it is not a colour. */
type StyledBadgePurpose = 'notification' | 'unread' | 'filter';
/**
* @figmaNode wXrXt5uKNNzV2DnQCgyYZH#15181-43817
* Figma "Badge". Notification count = 20px lime pill with a 1px border and Helper-Semibold 14/20;
* `dot` = 12px lime circle with a stronger 2px border. Other colors and `small` are legacy app
* extensions with no matching Figma notification variant.
*
* Pass children to decorate them — the badge anchors to their corner. Pass none and the badge,
* count or dot, becomes a flow element (for the dot, Figma `Size=Dot`, node 44267-214524), for a
* table cell or a marker in a row, and `className` then applies to the badge's own root so the
* caller can place it.
*
* `purpose` selects Figma's `Parent`: the default notification dot, or the 8px solid primary dot
* that marks something unread or a filter as active.
*/
interface BadgeProps extends Omit, 'color'> {
/** @figmaProp Badge content (the number/label) */
badgeContent?: ReactNode;
/** @figmaProp Type/colour = primary→notification badge | others = legacy app extensions */
color?: string;
/** @deprecated Notification badges always cap at 99. */
max?: number;
/** @deprecated A zero notification count is always omitted. */
showZero?: boolean;
/**
* @figmaProp Size = dot→"Dot" (12px) | standard→"Default" count badge
* With no children the badge renders in normal flow rather than anchored to a corner.
*/
variant?: 'standard' | 'dot';
/**
* @figmaProp Parent = notification→the lime ringed dot | unread/filter→an 8px solid primary dot
* `unread` and `filter` are the same mark in Figma and differ only in meaning. Dots only: a
* count badge is always the notification pill.
*/
purpose?: StyledBadgePurpose;
/** Polite live-update text. Keep this contextual and include the real, uncapped count. */
statusMessage?: string;
invisible?: boolean;
anchorOrigin?: {
vertical: 'top' | 'bottom';
horizontal: 'left' | 'right';
};
overlap?: 'rectangular' | 'circular';
component?: ElementType;
classes?: Record;
slots?: Record;
slotProps?: {
badge?: {
className?: string;
style?: CSSProperties;
};
};
sx?: unknown;
}
type StyledBadgeProps = BadgeProps & {
dataTest: string;
size?: StyledBadgeSize;
};
/**
* Native, MUI-free reimplementation of the previous `Badge` passthrough. Reproduces MUI v9 badge
* metrics/positioning via Tailwind, this library's custom `primary` green, and the `small` size.
* The established styling API `sx={{ '& .MuiBadge-badge': {...} }}` is preserved by extracting that
* slot and applying `resolveSx` to the badge span (DEC-007 slot-sx). Signature unchanged (DEC-003).
*/
export declare const StyledBadge: ({ color, dataTest, size, badgeContent, max: _max, showZero: _showZero, variant, purpose, statusMessage, invisible, anchorOrigin, children, className, sx, overlap: _overlap, classes: _classes, slots: _slots, slotProps, component: _component, tabIndex: _tabIndex, "aria-label": ariaLabel, ...props }: StyledBadgeProps) => JSX.Element;
export {};