import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6; export type CarbonSectionContext = import("svelte/store").Readable; /** * Section component that provides heading level context to nested `Heading` components. * * The section automatically increments the heading level for nested sections, * ensuring proper semantic heading hierarchy. Heading levels are capped at `h6`. */ type $RestProps = SvelteHTMLElements["section"]; type $Props = { /** * Specify the heading level the section should start at. * When omitted, the level is one more than the parent section (1 at the top). * When nested, child sections automatically increment from this level. * Levels are capped at 6 (h6). * @example * ```svelte *
* Starts at Heading 5 *
* Heading 6 *
*
* ``` */ level?: SectionLevel | undefined; /** * Specify the HTML tag name to render instead of the default `section` element. * Useful when you need to use a different semantic element while maintaining * the heading level context functionality. * @example * ```svelte *
* Heading 1 *
* ``` * * @example * ```svelte *
* Article Heading *
* ``` * @default "section" */ tag?: keyof HTMLElementTagNameMap; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type SectionProps = Omit<$RestProps, keyof $Props> & $Props; export default class Section extends SvelteComponentTyped< SectionProps, Record, { default: Record } > {}