{"version":3,"file":"Page.cjs","names":[],"sources":["../../../src/components/Page/Page.tsx"],"sourcesContent":["/**\n * @tempest-limits props-count — a page shell is slots: eyebrow, title, description,\n * actions, toolbar, footer and children, with padded as the one behavioural switch.\n * Slots are the component.\n */\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport styles from \"./Page.module.css\";\n\nexport interface PageProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n    /** Page title rendered as `<h1>`. */\n    title?: ReactNode;\n    /** Optional subtitle / breadcrumbs slot rendered above the title. */\n    eyebrow?: ReactNode;\n    /** Optional description rendered below the title. */\n    description?: ReactNode;\n    /** Right-side actions slot in the header (buttons, menus). */\n    actions?: ReactNode;\n    /** Sticky tab bar / filter row rendered just below the header. */\n    toolbar?: ReactNode;\n    /** Footer slot rendered at the bottom of the content area. */\n    footer?: ReactNode;\n    /** Page-level padding. Default `true`. */\n    padded?: boolean;\n    children?: ReactNode;\n}\n\n/**\n * Page wrapper with header + (optional) toolbar + content + footer. Pairs\n * with `Container` when you want a max-width content well.\n *\n * @example\n * <Page title=\"Pedidos\" description=\"Acompanhe seus pedidos\" actions={<Button>Novo</Button>}>\n *     <Table {...} />\n * </Page>\n */\nexport function Page({\n    title,\n    eyebrow,\n    description,\n    actions,\n    toolbar,\n    footer,\n    padded = true,\n    className,\n    children,\n    ...props\n}: PageProps) {\n    const hasHeader = title || eyebrow || description || actions;\n    return (\n        <main className={cn(styles.page, padded && styles.padded, className)} {...props}>\n            {hasHeader && (\n                <header className={styles.header}>\n                    <div className={styles.headerText}>\n                        {eyebrow && <div className={styles.eyebrow}>{eyebrow}</div>}\n                        {title && <h1 className={styles.title}>{title}</h1>}\n                        {description && <p className={styles.description}>{description}</p>}\n                    </div>\n                    {actions && <div className={styles.actions}>{actions}</div>}\n                </header>\n            )}\n            {toolbar && <div className={styles.toolbar}>{toolbar}</div>}\n            <div className={styles.content}>{children}</div>\n            {footer && <footer className={styles.footer}>{footer}</footer>}\n        </main>\n    );\n}\n"],"mappings":"wGAoCA,SAAgB,EAAK,CACjB,QACA,UACA,cACA,UACA,UACA,SACA,SAAS,GACT,YACA,WACA,GAAG,GACO,CACV,IAAM,EAAY,GAAS,GAAW,GAAe,EACrD,OACI,EAAA,EAAA,KAAA,CAAC,OAAD,CAAM,UAAW,EAAA,GAAG,EAAA,QAAO,KAAM,GAAU,EAAA,QAAO,OAAQ,CAAS,EAAG,GAAI,EAA1E,SAAA,CACK,IACG,EAAA,EAAA,KAAA,CAAC,SAAD,CAAQ,UAAW,EAAA,QAAO,OAA1B,SAAA,EACI,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAA,QAAO,WAAvB,SAAA,CACK,IAAW,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,QAAO,QAAU,SAAA,CAAa,CAAA,EACzD,IAAS,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAA,QAAO,MAAQ,SAAA,CAAU,CAAA,EACjD,IAAe,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAW,EAAA,QAAO,YAAc,SAAA,CAAe,CAAA,CACjE,CACJ,CAAA,EAAA,IAAW,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,QAAO,QAAU,SAAA,CAAa,CAAA,CACtD,IAEX,IAAW,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,QAAO,QAAU,SAAA,CAAa,CAAA,GAC1D,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,QAAO,QAAU,UAAc,CAAA,EAC9C,IAAU,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAW,EAAA,QAAO,OAAS,SAAA,CAAe,CAAA,CAC3D,GAEd"}