import "./status.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; import { type ColorName } from "./color_tokens"; import { type IconName } from "./icon"; import { type BrandName } from "./brand_mark"; /** Inside the label's line box, so a branded status is as tall as a dotted one. */ export declare const STATUS_BRAND_SIZE = 14; /** An option's own mark (a channel `brand` or a kit `icon`), drawn in the dot's place wherever the option * is, so chip, filter and record entry read one kind by one shape. */ export type OptionMark = { kind: "brand"; name: BrandName; } | { kind: "icon"; name: IconName; }; /** Typed against this kit's names: a name this build cannot draw (from a newer platform) is nothing, and * the dot returns. */ export declare function asOptionMark(value: unknown): OptionMark | undefined; /** One option from a query cell (`readSelect`) or list (`useFieldOptions`) in `@lotics/app-runtime/sdk`. * `key` is only a React key; an absent or unknown `color` degrades to neutral. */ export interface OptionValue { key?: string; label: string; color?: string | null; /** Drawn in the dot's place when it names a mark this kit draws ({@link asOptionMark}), else the dot. */ mark?: { kind: string; name: string; } | null; } /** The width of a dotted `Status`'s mark alone, in px: the dot, a channel's brand or an icon. */ export declare function statusMarkWidth(mark: OptionMark | undefined): number; /** * What a dotted `Status` of one option draws at `sm`, in px: its mark — the dot, a channel's brand or an icon — * the gap, and its word at the label's weight. Measured where the anatomy is, so a column of options is seated * at its whole ink: a brand is wider than a dot, and a budget that took it for one cut "YouTube" to "YouTu…". */ export declare function statusInk(option: OptionValue): number; /** {@link OptionValue} with the key promised: a field's own options are keyed, a cell's value may carry * only a label. */ export interface FieldOption extends OptionValue { key: T; } export interface StatusProps extends StyleProps { label?: string; color?: ColorName; /** {@link OptionMark} in the dot's place (before the word on `tonal`). The option's, never the call * site's, or one option is marked two ways. */ mark?: OptionMark; /** A stored select value resolved, painted in the option's colour: one option, an array (a mark each) or * empty (nothing). Supersedes `label` and `color`. The row is the element either way. Feed a * `useFieldOptions` option or `byKey(readSelect(cell)[0]?.key)`. */ option?: OptionValue | OptionValue[] | null; /** * Default `dot`: * - "dot": a coloured dot + label — the everyday indicator for legends, cells and secondary status. * - "tonal": a filled pill, heavy — one status kind per view (a register's primary status column, or a * multi-select fact whose chips answer one field). Never a list of choices or a second kind. * In a table cell pass `style={{ alignSelf: "flex-start" }}`: a cell stretches its child, and * `flex-start` means top in a row parent, so it cannot default here. */ variant?: "tonal" | "dot"; /** `sm` (default) is a register cell; `xs` folds onto a supporting line at its rung and ink, the dot * still the option's colour. */ size?: "sm" | "xs"; /** `live` breathes the dot — at a glance, the only difference between a running and a paused automation; * `settled` rests. */ activity?: "live" | "settled"; tooltip?: string; userSelect?: "none" | "auto"; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** A status a record wears — lifecycle, risk, quality — read at a glance; keep the vocabulary scarce so * colour always means state. A type, category, attribute or count is inline text. */ export declare function Status({ label, color, mark, option, variant, size, activity, tooltip, userSelect, testID, render, ref, ...props }: StatusProps): React.JSX.Element | null;