{"version":3,"file":"DescriptionList.cjs","names":[],"sources":["../../../src/components/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\nimport { Fragment } from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport styles from \"./DescriptionList.module.css\";\n\nexport interface DescriptionListItem {\n    /** The key/label rendered inside a `<dt>`. */\n    term: ReactNode;\n    /** The value rendered inside a `<dd>`. */\n    description: ReactNode;\n}\n\nexport interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {\n    /** Term/description pairs rendered as `<dt>`/`<dd>` rows. */\n    items: DescriptionListItem[];\n}\n\n/**\n * Renders a semantic `<dl>` of term/description pairs with minimal\n * token-based key/value styling.\n *\n * @param items - The term/description pairs to render.\n * @returns The rendered description list.\n */\nexport function DescriptionList({ items, className, ...props }: DescriptionListProps) {\n    return (\n        <dl className={cn(styles.list, className)} {...props}>\n            {items.map((item, index) => (\n                <Fragment key={index}>\n                    <dt className={styles.term}>{item.term}</dt>\n                    <dd className={styles.description}>{item.description}</dd>\n                </Fragment>\n            ))}\n        </dl>\n    );\n}\n"],"mappings":"sIAwBA,SAAgB,EAAgB,CAAE,QAAO,YAAW,GAAG,GAA+B,CAClF,OACI,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAA,GAAG,EAAA,QAAO,KAAM,CAAS,EAAG,GAAI,EAC1C,SAAA,EAAM,KAAK,EAAM,KACd,EAAA,EAAA,KAAA,CAAC,EAAA,SAAD,CAAA,SAAA,EACI,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAA,QAAO,KAAO,SAAA,EAAK,IAAS,CAAA,GAC3C,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAA,QAAO,YAAc,SAAA,EAAK,WAAgB,CAAA,CACnD,CAAA,EAHK,CAGL,CACb,CACD,CAAA,CAEZ"}