import { Temporal } from "@trackunit/date-and-time-utils"; import { CommonProps, Refable, type Styleable } from "@trackunit/react-components"; export interface PlainDateCellProps extends CommonProps, Refable, Styleable { /** * The PlainDate to render. * If not provided, the component will not render. */ date?: Temporal.PlainDate; /** * If true, the component will render the time since the date. * This is rendered on a separate line. * * @default true */ withDaysSince?: boolean; /** * The locale to use for the date. * See the formatDateUtil function for more information. */ locale?: string; } /** * PlainDateCell renders a `Temporal.PlainDate` inside a table cell as a formatted date string. * By default it also shows the number of days since the date on a second line (e.g., "15 days ago"). * Returns `null` when no date is provided. * * ### When to use * Use PlainDateCell for date columns in tables where you work with `Temporal.PlainDate` values — * for example, "Last Service Date" or "Created On" columns. * * ### When not to use * Do not use PlainDateCell for `Date` objects or ISO strings — use the `DateTime` component instead. * * @example Date column with days-since indicator * ```tsx * import { PlainDateCell } from "@trackunit/react-table-base-components"; * import { Temporal } from "@trackunit/date-and-time-utils"; * * const cell = ({ row }) => ( * * ); * ``` * @param {PlainDateCellProps} props - The props for the PlainDateCell component * @returns {ReactElement} PlainDateCell component */ export declare const PlainDateCell: ({ locale, date, withDaysSince, className, "data-testid": dataTestId, ref, style, }: PlainDateCellProps) => import("react/jsx-runtime").JSX.Element | null; export interface DaysSinceProps extends Pick { date: Temporal.PlainDate; }