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:
@@ -1,4 +1,5 @@
|
|||||||
@* Components/BrandBar.razor *@
|
@* Components/BrandBar.razor *@
|
||||||
|
@namespace ZB.MOM.WW.Theme
|
||||||
<div class="brand">
|
<div class="brand">
|
||||||
@if (Logo is not null) { @Logo }
|
@if (Logo is not null) { @Logo }
|
||||||
else { <span class="mark">▮</span> }
|
else { <span class="mark">▮</span> }
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@* Components/NavRailItem.razor *@
|
@* Components/NavRailItem.razor *@
|
||||||
|
@namespace ZB.MOM.WW.Theme
|
||||||
<NavLink class="rail-link" href="@Href" Match="@Match" ActiveClass="active">
|
<NavLink class="rail-link" href="@Href" Match="@Match" ActiveClass="active">
|
||||||
@if (Icon is not null) { <span class="rail-ico">@Icon</span> }
|
@if (Icon is not null) { <span class="rail-ico">@Icon</span> }
|
||||||
@Text
|
@Text
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
@* Components/NavRailSection.razor — CSS-only collapsible (no JS, works in static SSR).
|
@* Components/NavRailSection.razor — CSS-only collapsible (no JS, works in static SSR).
|
||||||
Apps that want cookie-persisted expand state keep their own interactive NavSection. *@
|
Apps that want cookie-persisted expand state keep their own interactive NavSection. *@
|
||||||
|
@namespace ZB.MOM.WW.Theme
|
||||||
<details class="rail-section" open="@Expanded">
|
<details class="rail-section" open="@Expanded">
|
||||||
<summary class="rail-eyebrow-toggle"><span class="rail-eyebrow-label">@Title</span></summary>
|
<summary class="rail-eyebrow-toggle"><span class="rail-eyebrow-label">@Title</span></summary>
|
||||||
<div class="rail-section-body">@ChildContent</div>
|
<div class="rail-section-body">@ChildContent</div>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@* Components/StatusPill.razor *@
|
@* Components/StatusPill.razor *@
|
||||||
|
@namespace ZB.MOM.WW.Theme
|
||||||
<span class="chip @ChipClass">@ChildContent</span>
|
<span class="chip @ChipClass">@ChildContent</span>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
@namespace ZB.MOM.WW.Theme
|
||||||
@using Microsoft.AspNetCore.Components
|
@using Microsoft.AspNetCore.Components
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
@using ZB.MOM.WW.Theme
|
@using ZB.MOM.WW.Theme
|
||||||
@using ZB.MOM.WW.Theme.Components
|
|
||||||
|
|||||||
@@ -2,4 +2,3 @@ global using Bunit;
|
|||||||
global using Xunit;
|
global using Xunit;
|
||||||
global using Microsoft.AspNetCore.Components;
|
global using Microsoft.AspNetCore.Components;
|
||||||
global using ZB.MOM.WW.Theme;
|
global using ZB.MOM.WW.Theme;
|
||||||
global using ZB.MOM.WW.Theme.Components;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user