import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; export { FAVORITE_HOVER_GROUP } from '../ui/favorite-toggle-button.js'; import { InlineInputEdit, InlineSelectEdit } from '../ui/inline-edit.js'; import { StatusBadgeSemanticSize } from '../ui/status-badge.js'; import { StatusBadgeTone } from '../../lib/status-badge-tints.js'; import '../ui/input.js'; import 'class-variance-authority/types'; import 'class-variance-authority'; /** Missing-value cell. Renders the word, not a glyph, so sighted and * screen-reader users read the same thing. Pass `label` when the column can * name what is missing ("No date", "No files"). */ declare function EmptyCell({ label }: { label?: string; }): react_jsx_runtime.JSX.Element; /** * Text editor sized for a DataTable cell. It stops row activation while the * value is edited and keeps Enter and Escape local to the editor. */ declare function InlineInputCell(props: React.ComponentProps): react_jsx_runtime.JSX.Element; /** * Select editor sized for a DataTable cell. The draft is explicit: choosing an * option does not commit it until Save is activated. */ declare function InlineSelectCell(props: React.ComponentProps): react_jsx_runtime.JSX.Element; /** * Right-aligned plain numeric cell. Use for counts where the grid benefits * from column-aligned digits (attempts, downloads, file size N). */ declare function NumericCell({ value, fractionDigits, className, }: { value: number | null | undefined; fractionDigits?: number; className?: string; }): react_jsx_runtime.JSX.Element; /** * Currency cell — right-aligned, `tabular-nums`. `Intl.NumberFormat` honors * locale + currency; defaults to USD because the product is US-first. */ declare function CurrencyCell({ value, currency, locale, maximumFractionDigits, }: { value: number | null | undefined; currency?: string; locale?: string; maximumFractionDigits?: number; }): react_jsx_runtime.JSX.Element; type ProgressTone = "auto" | "success" | "warning" | "danger" | "info"; /** * Progress bar — track + filled fill + numeric label. Auto-tones in thirds: * <34% destructive, <67% warning, ≥67% success. Pass an explicit `tone` to * override (e.g. "info" for non-judgmental quantity bars). */ declare function ProgressCell({ value, max, tone, label, className, }: { value: number | null | undefined; max?: number; tone?: ProgressTone; /** Right-side label. Defaults to `${pct}%`. Pass `false` to hide. */ label?: React.ReactNode | false; className?: string; }): react_jsx_runtime.JSX.Element; type SignalTone = "success" | "warning" | "danger" | "info" | "neutral"; /** * Three-bar signal indicator — same metaphor as Wi-Fi / cellular bars. Use * for ordinal scales (low/medium/high; easy/medium/hard). Color is *paired* * with bar count so the cell still communicates on monochrome + forced-colors. */ declare function SignalBarsCell({ level, max, tone, label, }: { /** 1-indexed level. */ level: number; /** Total number of bars. Default 3. */ max?: number; tone?: SignalTone; /** Accessible name; also used as the `Tip` content. */ label: string; }): react_jsx_runtime.JSX.Element; interface PersonStub { name: string; initials: string; } /** * Face rail — list of people with a `+N more` overflow chip. Each face gets a * `Tip` of the person's name; the overflow chip's tip lists the hidden names. * Uses non-overlapping avatars (gap, not negative margin) per Exxat DS rule. */ declare function PeopleAvatarRailCell({ people, visibleMax, size, emptyLabel, }: { people: PersonStub[] | undefined; /** How many faces to show before `+N`. Default 3. */ visibleMax?: number; size?: "sm" | "md"; emptyLabel?: string; }): react_jsx_runtime.JSX.Element; /** * Subtle dot for unread/new table rows — pair with `row.isNew` + * `bg-dt-new-row-bg`. * * In a table row the dot is the **only** signal that the row is new, which * makes it informational rather than decorative: the swatch stays `aria-hidden` * and a sibling `sr-only` string carries the meaning, so a screen reader hears * "New" where a sighted user sees the dot (WCAG 1.4.1 / 1.1.1). * * Pass `label` to say something more specific ("Unread", "Added today"), or * `label={null}` when the surrounding context already establishes newness (a * "What's new" card, where every row is new and repeating it is just noise). */ /** * Reserved gutter for a leading row marker (`TableNewRowDot`). * * Two jobs. It reserves its width even when empty, so titles stay aligned down * the column instead of unmarked rows sliding left. And it is exactly one * `text-sm` line box tall, so `items-center` centers the marker on the middle of * the title's **first** line rather than on the whole (possibly wrapped) block. * * The height is derived from the type tokens rather than hard-coded to 20px: * `--text-sm` is `max(14px, 0.875rem)`, so the line box grows when the root font * is scaled up, and a fixed height would drift off-center exactly for the users * who scale text. */ declare function TableRowMarkerGutter({ children, className, }: { children?: React.ReactNode; className?: string; }): react_jsx_runtime.JSX.Element; declare function TableNewRowDot({ tone, label, className, }: { tone?: "info" | "danger"; /** Screen-reader text. `null` when the context already says "new". */ label?: string | null; className?: string; }): react_jsx_runtime.JSX.Element; /** * Name/title column with an inline favorite star — the "identity + favorite" * pattern used by every hub with a favoritable primary column (question * bank, course forms, course reports, …). One shared composition so hubs * don't each re-derive the hover-reveal star, gap, and text treatment * (`exxat-reuse-before-custom.mdc`). Star is trailing (after the text) — * keep new call sites consistent rather than flipping the icon to lead. * * Row-state markers (`TableNewRowDot`) go in `leading`, not `badge`: a status * marker in front of the title is scannable down the column edge, while a * trailing one drifts with each title's length. */ declare function FavoriteNameCell({ label, isFavorite, onToggleFavorite, subtitle, interactive, leading, badge, }: { label: string; isFavorite: boolean; onToggleFavorite: () => void; /** Secondary line under the label (mono ID, meta, etc.). */ subtitle?: React.ReactNode; /** Render `label` as a link-styled button (row opens its own detail view) instead of plain text. */ interactive?: boolean; /** * Row-state marker before the title, e.g. ``. * * Pass `null` (not `undefined`) for rows without a marker: the gutter is * reserved whenever this prop is present at all, so titles stay aligned down * the column instead of the unmarked ones sliding left. */ leading?: React.ReactNode; /** Trailing badge/chip after the label. Row state belongs in `leading`. */ badge?: React.ReactNode; }): react_jsx_runtime.JSX.Element; /** One selectable state in an actionable `StatusCell` menu. */ interface StatusCellOption { /** Stable key handed back to `onChange`. */ value: string; label: string; /** FA glyph without the family prefix, e.g. `"fa-circle-check"`. */ icon?: string; tone?: StatusBadgeTone; /** Escape hatch for hub-specific tints (`lib/list-status-badges.ts`). */ tintClassName?: string; disabled?: boolean; } /** * Workflow status — the canonical renderer for any column with * `cellKind: "status"`. Wraps `StatusBadge` so tone, size, and glyph stay * identical across hubs instead of each one re-deriving them. * * Pass `options` **and** `onChange` to make it actionable: the badge becomes a * menu trigger that advances the record in place, which is the whole point of a * status column. Omit either one and it renders the static badge, so a user who * cannot change status never sees an affordance that does nothing. Callers gate * on their own permission check rather than the cell reaching for one, keeping * authorization in a single place. * * The trigger clears the 24px target floor (`min-h-6`), paints its focus ring * inside the clipped cell, and stops row-click propagation so changing status * never also opens the record. */ declare function StatusCell({ label, icon, tone, tintClassName, size, value, options, onChange, changeLabel, align, }: { label: string; /** FA glyph without the family prefix, e.g. `"fa-circle-check"`. */ icon?: string; tone?: StatusBadgeTone; tintClassName?: string; size?: StatusBadgeSemanticSize; /** Current option key. Defaults to `label` when the two are the same. */ value?: string; /** Selectable states. With `onChange`, turns the badge into a menu trigger. */ options?: StatusCellOption[]; onChange?: (next: string) => void; /** Accessible name and tooltip for the trigger. Must describe the action. */ changeLabel?: string; align?: "start" | "center" | "end"; }): react_jsx_runtime.JSX.Element; /** * Outlined pill with a leading FA icon — the "Type" pattern. Use for * single-select categorical fields where color isn't carrying meaning * (otherwise reach for `StatusCell`). */ declare function PillCell({ label, icon, iconClassName, className, }: { label: React.ReactNode; /** FA glyph name without the family prefix, e.g. `"fa-list-check"`. */ icon?: string; iconClassName?: string; className?: string; }): react_jsx_runtime.JSX.Element; /** * Tag list with `+N` overflow. Use for free-form keyword tags (`#tag`). For * categorical pills, see `PillCell`; for status, see `StatusCell`. */ declare function TagListCell({ tags, visibleMax, formatLabel, }: { tags: string[] | undefined; visibleMax?: number; formatLabel?: (tag: string) => string; }): react_jsx_runtime.JSX.Element; /** * Star rating — N of `max` FA stars + numeric value. Color (amber) + glyph * change (solid vs. light) pair so the cell still reads on monochrome / * forced-colors modes (WCAG 1.4.1). */ declare function RatingCell({ value, max, showValue, }: { value: number | null | undefined; max?: number; showValue?: boolean; }): react_jsx_runtime.JSX.Element; /** * Inline toggle — `ToggleSwitch` for a boolean lifecycle field (Published, * Active, Enabled). The callback receives the *next* checked state; the cell * stops row click propagation so toggling never opens the row. */ declare function BooleanToggleCell({ checked, onChange, labelOn, labelOff, disabled, }: { checked: boolean; onChange: (next: boolean) => void; labelOn?: string; labelOff?: string; disabled?: boolean; }): react_jsx_runtime.JSX.Element; /** * Attachment indicator — paperclip + count chip; "No files" when zero. A * focusable `Tip` exposes the count for screen-reader users; the chip is * non-interactive — wire `onClick` from the column def if you need a popover. */ declare function AttachmentCountCell({ count, }: { count: number | null | undefined; }): react_jsx_runtime.JSX.Element; /** * External link — truncated host label + `fa-arrow-up-right-from-square` mark. * Opens in a new tab with `noopener`; full URL surfaces in the `Tip`. The link * stops row click propagation so it never collides with the row's `onClick`. */ declare function ExternalLinkCell({ url, label, className, }: { url: string | null | undefined; /** Override the host-only label (e.g. "View source"). */ label?: React.ReactNode; className?: string; }): react_jsx_runtime.JSX.Element; /** * Relative time — "3 hours ago" / "2 days ago" with a `Tip` exposing the * absolute timestamp on hover/focus. The visible label is the relative form * so scanning readers see recency at a glance. */ declare function RelativeTimeCell({ iso, now, }: { iso: string | null | undefined; /** Override "now" for deterministic snapshots. */ now?: number; }): react_jsx_runtime.JSX.Element; interface RowActionDef { label: string; /** FA glyph name without the family prefix, e.g. `"fa-pen-to-square"`. */ icon: string; onSelect: (row: TRow) => void; /** Render as the destructive variant — separator + red label. */ variant?: "destructive"; /** Optional menu-item keyboard shortcut hint (e.g. `"⌘E"`). */ shortcut?: string; /** Disable the item without hiding it. */ disabled?: boolean; } /** * Row overflow `⋯` menu — generic across hubs. Pass the row and an array of * `{ label, icon, onSelect, variant?, shortcut? }`; destructive items * automatically gain a separator above. The trigger keeps an `aria-label` so * the button is named for screen readers. */ declare function RowActionsCell({ row, actions, triggerLabel, align, }: { row: TRow; actions: RowActionDef[]; /** Both the `Tip` content and the `aria-label` fallback. */ triggerLabel?: string; align?: "start" | "center" | "end"; }): react_jsx_runtime.JSX.Element; export { AttachmentCountCell, BooleanToggleCell, CurrencyCell, EmptyCell, ExternalLinkCell, FavoriteNameCell, InlineInputCell, InlineSelectCell, NumericCell, PeopleAvatarRailCell, type PersonStub, PillCell, ProgressCell, type ProgressTone, RatingCell, RelativeTimeCell, type RowActionDef, RowActionsCell, SignalBarsCell, type SignalTone, StatusCell, type StatusCellOption, TableNewRowDot, TableRowMarkerGutter, TagListCell };