import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; type $RestProps = SvelteHTMLElements["table"]; type $Props = { /** * Set the size of the table. * Accepts the same Carbon v11 aliases as `DataTable`. */ size?: "compact" | "short" | "medium" | "tall" | "xs" | "sm" | "md" | "lg" | "xl" | undefined; /** * Set to `true` to use zebra styles * @default false */ zebra?: boolean; /** * Set to `true` to use static width * @default false */ useStaticWidth?: boolean; /** * Set to `true` for the sortable variant * @default false */ sortable?: boolean; /** * Set to `true` to enable a sticky header * @default false */ stickyHeader?: boolean; /** * Set to `true` to use a fixed table layout, typically when headers specify an explicit `width`/`minWidth`. * @default false */ fixedLayout?: boolean; /** * Set the style attribute on the `table` element. */ tableStyle?: string | undefined; /** * Set the style attribute on the outer `section` element when `stickyHeader` is `true`. */ containerStyle?: string | undefined; /** * Obtain a reference to the section HTML element. Only set when `stickyHeader` is true. * @default null */ ref?: null | HTMLElement; /** * Id of an element that labels the table (e.g. `DataTable`'s title heading). * Internal: set directly by `DataTable`. Standalone compositions * (`TableContainer` wrapping `Table`) get this from context instead. */ labelledBy?: string | undefined; /** * Id of an element that describes the table (e.g. `DataTable`'s description text). * Internal: set directly by `DataTable`. Standalone compositions * (`TableContainer` wrapping `Table`) get this from context instead. */ describedBy?: string | undefined; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type TableProps = Omit<$RestProps, keyof $Props> & $Props; export default class Table extends SvelteComponentTyped< TableProps, Record, { default: Record } > {}