Skip to content

Commit

Permalink
Target .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorchasewhite committed Nov 20, 2023
1 parent b655ff3 commit f67f0ab
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand All @@ -10,8 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.13" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
}
}

<h3>Accordions</h3>
<small class="text-muted">Bootstrap-styled</small>
<VerticalAccordion Items="@_items.Select(i => ($"{i} Heading", $"{i} Content, Content, Content"))"></VerticalAccordion>

<hr class="border:none; border-top:1px solid; margin:1em 15%;" />

<PaginatorSection/>
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>BlazingApple is a collection of business objects and corresponding components to speed application development. BlazingApple.Components provides a set of core components to easily create beautiful applications</Description>
<Authors>Taylor White</Authors>
<Company>BlazingApple</Company>
<Copyright>2022</Copyright>
<RepositoryUrl>https://github.com/BlazingApple/Components</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>0.6.0</AssemblyVersion>
<FileVersion>0.6.0</FileVersion>
<Version>0.6.0</Version>
<PackageReleaseNotes>0.6.0 - Change GetEnumDisplayName to ToDisplayName</PackageReleaseNotes>
<AssemblyVersion>2.5.4</AssemblyVersion>
<FileVersion>2.5.5</FileVersion>
<Version>2.5.5</Version>
<PackageReleaseNotes>2.5.5 - Target .NET 8</PackageReleaseNotes>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@if(Parent is not null && Data.HasValue)
{
<div class="accordion-item">
<h2 class="accordion-header" id="heading-@id">
<button class="accordion-button" type="button" @onclick="() => _isVisible = !_isVisible" aria-expanded="@_isVisible" aria-controls="collapse-@id">
@Data.Value.Heading
</button>
</h2>

<div id="collapse-@id" class="accordion-collapse collapse @(_isVisible ? "show": "")" aria-labelledby="heading-@id" data-bs-parent="#@Parent.Id">
<div class="accordion-body">
@Data.Value.Content
</div>
</div>
</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace BlazingApple.Components.Accordion;

/// <summary>Accordion section</summary>
public partial class AccordionSection : ComponentBase
{
private bool _isVisible;
private readonly Guid id = Guid.NewGuid();

/// <summary>Accordion parent.</summary>
[CascadingParameter]
[Parameter]
public VerticalAccordion? Parent { get; set; }

/// <summary>Data to pass to the accordion section.</summary>
[Parameter]
public (string Heading, string Content)? Data { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>BlazingApple is a collection of business objects and corresponding components to speed application development. BlazingApple.Components provides a set of core components to easily create beautiful applications</Description>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Authors>Taylor White</Authors>
Expand All @@ -10,10 +10,10 @@
<RepositoryUrl>https://github.com/BlazingApple/Components</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>2.5.4</AssemblyVersion>
<FileVersion>2.5.4</FileVersion>
<Version>2.5.4</Version>
<PackageReleaseNotes>2.5.4 - Update packages.</PackageReleaseNotes>
<AssemblyVersion>2.5.5</AssemblyVersion>
<FileVersion>2.5.5</FileVersion>
<Version>2.5.5</Version>
<PackageReleaseNotes>2.5.5 - Target .NET 8</PackageReleaseNotes>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -32,16 +32,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BlazingApple.Components.Shared" Version="0.6.0" />
<PackageReference Include="BlazingApple.Components.Shared" Version="2.5.5" />
<PackageReference Include="BlazingApple.FontAwesome" Version="0.4.0" />
<PackageReference Include="Blazored.Toast" Version="4.1.0" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.13" PrivateAssets="all" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Syncfusion.Blazor" Version="20.4.0.38" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.9.4">
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@using BlazingApple.Components.Accordion
@if (Items is not null)
{
<CascadingValue Value="this">
<div class="accordion" id="@Id">
@foreach((string Heading, string Content) item in Items)
{
<AccordionSection Data="item" />
}
</div>
</CascadingValue>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace BlazingApple.Components;

/// <summary>Bootstrap styled accordion, vertical layout.</summary>
public partial class VerticalAccordion : ComponentBase
{
/// <summary>Id in the dom.</summary>
public Guid Id { get; set; } = Guid.NewGuid();

/// <summary>The data to render</summary>
[Parameter]
public IEnumerable<(string Heading, string Content)>? Items { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -11,12 +11,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Moq.AutoMock" Version="3.3.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq.AutoMock" Version="3.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="3.1.0">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit f67f0ab

Please sign in to comment.