refactor(theme): unify components into ZB.MOM.WW.Theme namespace

Add @namespace ZB.MOM.WW.Theme to each component .razor file so the
Razor compiler places all four components in the flat ZB.MOM.WW.Theme
namespace rather than ZB.MOM.WW.Theme.Components. Remove the now-
redundant global using ZB.MOM.WW.Theme.Components from both _Imports
files. Also add @namespace ZB.MOM.WW.Theme to the root _Imports.razor.
Consumers need only @using ZB.MOM.WW.Theme. All 14 tests green.
This commit is contained in:
Joseph Doherty
2026-06-01 04:53:12 -04:00
parent a74ad7008d
commit 75e58085d1
6 changed files with 5 additions and 2 deletions
@@ -1,4 +1,5 @@
@* Components/BrandBar.razor *@
@namespace ZB.MOM.WW.Theme
<div class="brand">
@if (Logo is not null) { @Logo }
else { <span class="mark">&#9646;</span> }
@@ -1,4 +1,5 @@
@* Components/NavRailItem.razor *@
@namespace ZB.MOM.WW.Theme
<NavLink class="rail-link" href="@Href" Match="@Match" ActiveClass="active">
@if (Icon is not null) { <span class="rail-ico">@Icon</span> }
@Text
@@ -1,5 +1,6 @@
@* Components/NavRailSection.razor — CSS-only collapsible (no JS, works in static SSR).
Apps that want cookie-persisted expand state keep their own interactive NavSection. *@
@namespace ZB.MOM.WW.Theme
<details class="rail-section" open="@Expanded">
<summary class="rail-eyebrow-toggle"><span class="rail-eyebrow-label">@Title</span></summary>
<div class="rail-section-body">@ChildContent</div>
@@ -1,4 +1,5 @@
@* Components/StatusPill.razor *@
@namespace ZB.MOM.WW.Theme
<span class="chip @ChipClass">@ChildContent</span>
@code {
@@ -1,5 +1,5 @@
@namespace ZB.MOM.WW.Theme
@using Microsoft.AspNetCore.Components
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using ZB.MOM.WW.Theme
@using ZB.MOM.WW.Theme.Components
@@ -2,4 +2,3 @@ global using Bunit;
global using Xunit;
global using Microsoft.AspNetCore.Components;
global using ZB.MOM.WW.Theme;
global using ZB.MOM.WW.Theme.Components;