import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; type $RestProps = SvelteHTMLElements["button"]; type $Props = { /** * Specify the row height. * Pass this value to the `DataTable`'s `size` prop. * When unset, the checked item mirrors the parent table's size, * falling back to `"medium"`. Accepts the same Carbon v11 aliases as * `DataTable`; a selection always writes this library's name. */ size?: "compact" | "short" | "medium" | "tall" | "xs" | "sm" | "md" | "lg" | "xl" | undefined; /** * Specify the icon to render in the trigger. * @default RowExpand */ icon?: Icon; /** * Specify the sizes to offer and their order. * @default ["compact", "short", "medium", "tall"] */ sizes?: ReadonlyArray<"compact" | "short" | "medium" | "tall">; /** * Specify a function to format the item text for a size. * @default (value) => value[0].toUpperCase() + value.slice(1) */ formatLabel?: (size: "compact" | "short" | "medium" | "tall") => string; /** * Specify the trigger's accessible name and the radio group label. * @default "Row height" */ labelText?: string; /** * Set the preferred direction the menu opens toward. * @default "bottom" */ direction?: "top" | "bottom"; /** * Set to `true` to open the menu. * @default false */ open?: boolean; [key: `data-${string}`]: unknown; }; export type ToolbarDensityProps = Omit<$RestProps, keyof $Props> & $Props; export default class ToolbarDensity extends SvelteComponentTyped< ToolbarDensityProps, { change: CustomEvent<{ size: "compact" | "short" | "medium" | "tall"; }>; close: CustomEvent; }, Record > {}