{"version":3,"file":"Divider.cjs","names":[],"sources":["../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport styles from \"./Divider.module.css\";\n\nexport type DividerOrientation = \"horizontal\" | \"vertical\";\nexport type DividerVariant = \"solid\" | \"dashed\";\nexport type DividerAlign = \"start\" | \"center\" | \"end\";\n\nexport interface DividerProps extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n    orientation?: DividerOrientation;\n    variant?: DividerVariant;\n    /** Optional label rendered inside the divider (horizontal only). */\n    label?: ReactNode;\n    /** Label horizontal position (only when `label` provided). Defaults to `center`. */\n    align?: DividerAlign;\n}\n\n/**\n * Horizontal or vertical visual separator. When `label` is provided in\n * horizontal mode the divider splits and centers the label between two lines.\n */\nexport function Divider({\n    orientation = \"horizontal\",\n    variant = \"solid\",\n    label,\n    align = \"center\",\n    className,\n    ...props\n}: DividerProps) {\n    if (orientation === \"vertical\") {\n        return (\n            <span\n                role=\"separator\"\n                aria-orientation=\"vertical\"\n                className={cn(\n                    styles.divider,\n                    styles.vertical,\n                    variant === \"dashed\" && styles.dashed,\n                    className,\n                )}\n                {...props}\n            />\n        );\n    }\n\n    if (!label) {\n        return (\n            <hr\n                className={cn(\n                    styles.divider,\n                    styles.horizontal,\n                    styles.bare,\n                    variant === \"dashed\" && styles.dashed,\n                    className,\n                )}\n            />\n        );\n    }\n\n    return (\n        <div\n            role=\"separator\"\n            aria-orientation=\"horizontal\"\n            className={cn(\n                styles.divider,\n                styles.horizontal,\n                variant === \"dashed\" && styles.dashed,\n                align === \"start\" && styles.alignStart,\n                align === \"end\" && styles.alignEnd,\n                className,\n            )}\n            {...props}\n        >\n            {label}\n        </div>\n    );\n}\n"],"mappings":"2GAqBA,SAAgB,EAAQ,CACpB,cAAc,aACd,UAAU,QACV,QACA,QAAQ,SACR,YACA,GAAG,GACU,CA+Bb,OA9BI,IAAgB,YAEZ,EAAA,EAAA,IAAA,CAAC,OAAD,CACI,KAAK,YACL,mBAAiB,WACjB,UAAW,EAAA,GACP,EAAA,QAAO,QACP,EAAA,QAAO,SACP,IAAY,UAAY,EAAA,QAAO,OAC/B,CACJ,EACA,GAAI,CACP,CAAA,EAIJ,GAeD,EAAA,EAAA,IAAA,CAAC,MAAD,CACI,KAAK,YACL,mBAAiB,aACjB,UAAW,EAAA,GACP,EAAA,QAAO,QACP,EAAA,QAAO,WACP,IAAY,UAAY,EAAA,QAAO,OAC/B,IAAU,SAAW,EAAA,QAAO,WAC5B,IAAU,OAAS,EAAA,QAAO,SAC1B,CACJ,EACA,GAAI,EAEH,SAAA,CACA,CAAA,GA3BD,EAAA,EAAA,IAAA,CAAC,KAAD,CACI,UAAW,EAAA,GACP,EAAA,QAAO,QACP,EAAA,QAAO,WACP,EAAA,QAAO,KACP,IAAY,UAAY,EAAA,QAAO,OAC/B,CACJ,CACH,CAAA,CAqBb"}