import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; /** * The gap scale maps to the following `@carbon/layout` values: * - 1 --> 0.125rem * - 2 --> 0.25rem * - 3 --> 0.5rem * - 4 --> 0.75rem * - 5 --> 1rem * - 6 --> 1.5rem * - 7 --> 2rem * - 8 --> 2.5rem * - 9 --> 3rem * - 10 --> 4rem * - 11 --> 5rem * - 12 --> 6rem * - 13 --> 10rem */ export type DescriptionListScale = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13; type $RestProps = SvelteHTMLElements["dl"]; type $Props = { /** * Specify whether each term/detail pair stacks (term above detail), * sits side by side (term beside detail), or is a summary line with the * detail right-aligned in tabular figures, as in an order total. Mark a * summary's last item `total` to rule it off. * @default "vertical" */ layout?: "vertical" | "horizontal" | "summary"; /** * Specify the gap between items. * The scale maps to Carbon layout values. * Alternatively, specify a custom value (e.g., "22px" or "1.5rem"). * Custom values *must* be a string. * @default 5 */ gap?: DescriptionListScale | string; /** * Specify the number of columns to lay items out in. * @default 1 */ columns?: number; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type DescriptionListProps = Omit<$RestProps, keyof $Props> & $Props; export default class DescriptionList extends SvelteComponentTyped< DescriptionListProps, Record, { default: Record } > {}