diff --git a/CHANGELOG.md b/CHANGELOG.md index 48e1ae9..40544dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,7 +111,7 @@ v2 is a full rewrite of the library's foundation. The styling stack (MUI + style - **`PageWithAuth`**: `createNavbarContext` prop removed (cascading from `Page`). - **`useNavbar()`**: `setSearchFuncion` typo corrected to `setSearchFunction`. `setSideMenuLinks` and `setSearchFunction` now have proper types (`SideMenuLink[]` and `(s: string) => void`) instead of `any`. - **`Navbar`**: `searchDropdownLabelsList` prop removed (was declared but never consumed). `IconComponent` prop now typed as `ComponentType<{ className?: string }>`. -- **`Footer`**: hard-coded hex colors replaced with design token CSS vars (`bg-cinnamon-footer-bg`, `bg-cinnamon-footer-bar`). `phoneToTel()` helper moved to `src/lib/utils.ts`. +- **`Footer`**: hard-coded hex colors replaced with design token CSS vars (`bg-cinnamon-footer-bg`, `bg-cinnamon-footer-bar`). `phoneToTel()` helper moved to `src/lib/utils.ts`. `copyrightText` is a prop again, with v1's semantics: the bottom-bar line renders when it is passed and is omitted when it is not. The rewrite had hard-coded the string, which the README already documented as configurable. - **`SideMenu`** — **BREAKING vs v1**: the component was rewritten. The public prop contract is unchanged (`links: SideMenuLink[]`, `top`, `visibility`, `setVisibility`, `linkComponent`), so v1 call sites compile as-is, but the rendering changed: the open drawer now carries an animated accent rail (see _Added_) and pulls in `motion` as a runtime dependency. Consumers that vendored their own copy of the v1 `SideMenu` styles, or relied on the exact prior DOM structure, must revalidate. New optional `activeHref` prop (see _Added_). - **`IconRenderer` → `Icon`** — **BREAKING**: the component `IconRenderer` and its `IconRendererProps` type were renamed to `Icon` / `IconProps`. `IconComponent` prop now typed as `ComponentType<{ className?: string }>` (was `any`). - **`ErrorScreen`**: `enum httpErrors` replaced with `const httpErrors as const` + type alias — no runtime JS emitted; same call-site syntax (`httpErrors.NOTFOUND_404`) preserved. Unknown error types now render a generic fallback instead of returning `null`. diff --git a/examples/nextjs15-demo/app/client-page/page.tsx b/examples/nextjs15-demo/app/client-page/page.tsx index c6c8927..49fe184 100644 --- a/examples/nextjs15-demo/app/client-page/page.tsx +++ b/examples/nextjs15-demo/app/client-page/page.tsx @@ -36,7 +36,7 @@ export default function ClientPage() { }, ], }} - footer={{}} + footer={{ copyrightText: "CIn UFPE | Todos os direitos reservados" }} >
Conteúdo renderizado no servidor para usuário autenticado.
Visível apenas para admin.
diff --git a/examples/nextjs15-demo/app/server-import-client/page.tsx b/examples/nextjs15-demo/app/server-import-client/page.tsx index b73a849..fbe76ee 100644 --- a/examples/nextjs15-demo/app/server-import-client/page.tsx +++ b/examples/nextjs15-demo/app/server-import-client/page.tsx @@ -46,7 +46,7 @@ export default function ServerImportClientPage() { - + ); } diff --git a/src/lib-components/Footer/Footer.tsx b/src/lib-components/Footer/Footer.tsx index 0fd27ff..042d92e 100644 --- a/src/lib-components/Footer/Footer.tsx +++ b/src/lib-components/Footer/Footer.tsx @@ -100,6 +100,11 @@ export interface FooterProps { linkColumns?: FooterLinkColumn[]; /** Social row under the brand block. */ socialLinks?: FooterSocialLink[]; + /** + * Line in the bottom bar, rendered after the copyright symbol and the + * current year. The line is omitted when this is absent. + */ + copyrightText?: string; /** Consuming app version, shown next to the Cinnamon version. */ appVersion?: string; /** Render the brand/support area. When false, only the bottom bar shows. */ @@ -247,6 +252,7 @@ export function Footer({ support, linkColumns, socialLinks, + copyrightText, appVersion, largeFooter = true, }: FooterProps) { @@ -422,9 +428,11 @@ export function Footer({