Skip to content

Commit

Permalink
Merge branch 'main' into regex-validator-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ModernMAK authored Sep 26, 2024
2 parents 0342440 + 8e187a7 commit 78c5a01
Show file tree
Hide file tree
Showing 545 changed files with 9,450 additions and 57 deletions.
22 changes: 14 additions & 8 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
<PackageVersion Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="8.0.6" />
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="8.0.6" />
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.4" />
<PackageVersion Include="Microsoft.Build" Version="17.9.5" />
Expand Down Expand Up @@ -75,17 +75,20 @@
<PackageVersion Include="Microsoft.Identity.Web" Version="2.17.5" />
<PackageVersion Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.3.8" />
<PackageVersion Include="Microsoft.Kiota.Serialization.Json" Version="1.2.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.7.1" />
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
<PackageVersion Include="MSTest.TestAdapter" Version="2.1.0" />
<PackageVersion Include="MSTest.TestFramework" Version="2.1.0" />
<PackageVersion Include="NATS.Client.JetStream" Version="2.2.1" />
<PackageVersion Include="NATS.Client.KeyValueStore" Version="2.2.1" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.2.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="NUnit" Version="4.2.2" />
<PackageVersion Include="NUnit.Analyzers" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="OpenIddict.Client" Version="5.4.0" />
<PackageVersion Include="OpenIddict.Client.AspNetCore" Version="5.4.0" />
<PackageVersion Include="OpenIddict.Client.SystemNetHttp" Version="5.4.0" />
Expand All @@ -105,7 +108,10 @@
<PackageVersion Include="protobuf-net.Grpc.ClientFactory" Version="1.1.1" />
<PackageVersion Include="ProtoBuf.Grpc" Version="1.0.170" />
<PackageVersion Include="PureBlazor.Components" Version="0.9.2" />
<PackageVersion Include="PureBlazor.Extensions" Version="0.10.0" />
<PackageVersion Include="PureBlazor.Extensions.AspNetCore" Version="0.10.0" />
<PackageVersion Include="RestSharp" Version="110.2.0" />
<PackageVersion Include="SendGrid.Extensions.DependencyInjection" Version="1.0.1" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageVersion Include="Serilog.Enrichers.Environment" Version="2.3.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.0" />
Expand Down
126 changes: 105 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,105 @@
MIT License

Copyright (c) 2022 PureBlazor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# Functional Source License, Version 1.1, Apache 2.0 Future License

## Abbreviation

FSL-1.1-Apache-2.0

## Notice

Copyright 2024 CodeFrog, Inc. dba PureBlazor

## Terms and Conditions

### Licensor ("We")

The party offering the Software under these Terms and Conditions.

### The Software

The "Software" is each version of the software that we make available under
these Terms and Conditions, as indicated by our inclusion of these Terms and
Conditions with the Software.

### License Grant

Subject to your compliance with this License Grant and the Patents,
Redistribution and Trademark clauses below, we hereby grant you the right to
use, copy, modify, create derivative works, publicly perform, publicly display
and redistribute the Software for any Permitted Purpose identified below.

### Permitted Purpose

A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
means making the Software available to others in a commercial product or
service that:

1. substitutes for the Software;

2. substitutes for any other product or service we offer using the Software
that exists as of the date we make the Software available; or

3. offers the same or substantially similar functionality as the Software.

Permitted Purposes specifically include using the Software:

1. for your internal use and access;

2. for non-commercial education;

3. for non-commercial research; and

4. in connection with professional services that you provide to a licensee
using the Software in accordance with these Terms and Conditions.

### Patents

To the extent your use for a Permitted Purpose would necessarily infringe our
patents, the license grant above includes a license under our patents. If you
make a claim against any party that the Software infringes or contributes to
the infringement of any patent, then your patent license to the Software ends
immediately.

### Redistribution

The Terms and Conditions apply to all copies, modifications and derivatives of
the Software.

If you redistribute any copies, modifications or derivatives of the Software,
you must include a copy of or a link to these Terms and Conditions and not
remove any copyright notices provided in or with the Software.

### Disclaimer

THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.

IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.

### Trademarks

Except for displaying the License Details and identifying us as the origin of
the Software, you have no right under these Terms and Conditions to use our
trademarks, trade names, service marks or product names.

## Grant of Future License

We hereby irrevocably grant you an additional license to use the Software under
the Apache License, Version 2.0 that is effective on the second anniversary of
the date we make the Software available. On or after that date, you may use the
Software under the Apache License, Version 2.0, in which case the following
will apply:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
3 changes: 3 additions & 0 deletions push-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

dotnet nuget push **\*.nupkg --source $HOME/code/nuget
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<WarningsAsErrors>Nullable</WarningsAsErrors>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>PureBlazor Icons</Title>
<Version>0.32</Version>
<Version>0.32.8</Version>
<PackageId>PureBlazor.Components.Icons</PackageId>
<Description>Blazor Icons</Description>
<PackageProjectUrl>https://pureblazor.com</PackageProjectUrl>
Expand Down
2 changes: 2 additions & 0 deletions src/Pure.Blazor.Components.Icons/PureIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ private static string BuildMarkup(PureIcons icon)
PureIcons.IconClock => "<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\" />",
PureIcons.PencilSquare => "<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10\" />",
PureIcons.XMark => "<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" />",
PureIcons.IconMinus => "<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M5 12h14\" />",
PureIcons.IconCamera => "<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6.827 6.175A2.31 2.31 0 0 1 5.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 0 0-1.134-.175 2.31 2.31 0 0 1-1.64-1.055l-.822-1.316a2.192 2.192 0 0 0-1.736-1.039 48.774 48.774 0 0 0-5.232 0 2.192 2.192 0 0 0-1.736 1.039l-.821 1.316Z\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 12.75a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM18.75 10.5h.008v.008h-.008V10.5Z\" />",
_ => ""
};

Expand Down
4 changes: 3 additions & 1 deletion src/Pure.Blazor.Components.Icons/PureIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ public enum PureIcons
IconPlay,
IconClock,
PencilSquare,
XMark
XMark,
IconMinus,
IconCamera
}
2 changes: 2 additions & 0 deletions src/Pure.Blazor.Components/Buttons/ButtonStyles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ internal class ButtonStyles
private const string SmallButton = "px-3 py-1.5 text-xs";
private const string MediumButton = "px-3.5 py-1.5 text-sm";
private const string LargeButton = "px-4 py-3 text-lg";
private const string ExtraLargeButton = "px-4 py-3 text-lg w-full";

private const string PrimaryButton =
$"{BaseAccentColors.Brand} hover:bg-brand-900 shadow-brand-950/90 border-transparent font-medium";
Expand Down Expand Up @@ -56,6 +57,7 @@ internal class ButtonStyles

public static readonly Dictionary<PureSize, string> Sizes = new()
{
{ PureSize.ExtraLarge, ExtraLargeButton },
{ PureSize.Large, LargeButton },
{ PureSize.Small, SmallButton },
{ PureSize.Medium, MediumButton },
Expand Down
14 changes: 14 additions & 0 deletions src/Pure.Blazor.Components/Common/DefaultTheme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ public DefaultTheme()
nameof(PureButton),
new(ButtonStyles.Base) { Variants = ButtonStyles.Variants, Sizes = ButtonStyles.Sizes }
},
{
nameof(PureInput),
new("peer block border-1 focus:ring focus:ring-inset ring-brand-700 bg-gray-50 text-gray-800 rounded")
{
Sizes = new Dictionary<PureSize, string>
{
{ PureSize.ExtraSmall, "text-xs px-1 py-0.5" },
{ PureSize.Small, "text-sm px-1 py-0.5" },
{ PureSize.Medium, "text-sm px-2 py-1" },
{ PureSize.Large, "text-md px-2.5 py-1.5" },
{ PureSize.ExtraLarge, "text-lg px-3 py-2" }
}
}
},
{
nameof(PureTabButton), new("sm:w-auto sm:justify-start inline-flex items-center font-medium")
{
Expand Down
22 changes: 2 additions & 20 deletions src/Pure.Blazor.Components/Essentials/Header1.razor
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
@inherits PureComponent
<div class="flex flex-col md:flex-row justify-between items-center gap-4 sm:gap-0">
<h1 id="@Id" class="text-2xl sm:text-3xl font-extrabold leading-6 subpixel-antialiased text-gray-800 tracking-wide @Styles">@ChildContent</h1>
@if (Suffix is not null)
{
@Suffix
}
</div>
@if (!string.IsNullOrWhiteSpace(Subtitle))
{
<p class="mt-2 text-sm text-gray-800">@Subtitle</p>
<hr class="my-4 border-gray-200"/>
}
else
{
<hr class="mt-2 mb-4 border-gray-200"/>
}
<h1 id="@Id" class="text-2xl sm:text-3xl font-extrabold leading-6 subpixel-antialiased text-gray-800 tracking-wide @Styles">@ChildContent</h1>

@code {

@code {
[Parameter] public string Id { get; set; } = string.Empty;

[Parameter] public string? Subtitle { get; set; }
[Parameter] public RenderFragment? Suffix { get; set; }
}
25 changes: 25 additions & 0 deletions src/Pure.Blazor.Components/Essentials/PageHeader.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@inherits PureComponent
<div class="flex flex-col md:flex-row justify-between items-center gap-4 sm:gap-0">
<Header1 Id="@Id">@ChildContent</Header1>
@if (Suffix is not null)
{
@Suffix
}
</div>
@if (!string.IsNullOrWhiteSpace(Subtitle))
{
<p class="mt-2 text-sm text-gray-800">@Subtitle</p>
<hr class="my-4 border-gray-200"/>
}
else
{
<hr class="mt-2 mb-4 border-gray-200"/>
}

@code {

[Parameter] public string Id { get; set; } = string.Empty;

[Parameter] public string? Subtitle { get; set; }
[Parameter] public RenderFragment? Suffix { get; set; }
}
2 changes: 1 addition & 1 deletion src/Pure.Blazor.Components/Forms/PureInput.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<InputText id="@Id"
@ref="InputRef"
@bind-Value="@TextValue"
class="@($"{ApplyStyle(baseCss)} {(HasError ? errorBorder : defaultBorder)}")"
class="@($"{ApplyStyle($"{Css.Base} {Css.Size(Size)}")} {(HasError ? errorBorder : defaultBorder)}")"
type="@GetInputType()"
autocomplete="@GetAutoComplete()"
placeholder="@Placeholder"
Expand Down
5 changes: 1 addition & 4 deletions src/Pure.Blazor.Components/Forms/PureInput.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ public partial class PureInput
private InputText? InputRef { get; set; } = null!;
private readonly List<IEntryValidator> validators = new();

private string baseCss =
"peer block px-2 py-1 border-1 focus:outline focus:outline-2 focus:outline-offset-2 outline-brand-700 bg-gray-50 text-gray-800 rounded";

private string defaultBorder = "border-gray-200";
private string errorBorder = "border-red-600";
private string? errorMessage;
Expand All @@ -29,7 +26,7 @@ private string? TextValue
// the suffix needs different margins depending on labels and helper text
private string suffixCss => GetSuffixCss();

public PureSize Size { get; set; }
[Parameter] public PureSize Size { get; set; } = PureSize.Medium;

[CascadingParameter] public PureForm? FormControl { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion src/Pure.Blazor.Components/Pure.Blazor.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<Title>PureBlazor Components</Title>
<Version>0.32</Version>
<Version>0.32.8</Version>
<PackageId>PureBlazor.Components</PackageId>
<Description>Blazor UI components for .NET Blazor with an optional headless mode.</Description>
<PackageProjectUrl>https://pureblazor.com</PackageProjectUrl>
Expand Down
12 changes: 12 additions & 0 deletions src/PureBlazor.Components.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pure.Blazor.Components.Icon
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pure.Blazor.Components.Primitives", "Pure.Blazor.Components.Primitives\Pure.Blazor.Components.Primitives.csproj", "{1BAEB487-2B41-4899-B37C-A3404FB57040}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PureBlazor.com", "..\website\PureBlazor.com\PureBlazor.com\PureBlazor.com.csproj", "{5E4774D8-449C-4E78-8D55-2BC3B2B33F83}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PureBlazor.com.Client", "..\website\PureBlazor.com\PureBlazor.com.Client\PureBlazor.com.Client.csproj", "{B3104461-D457-4D51-9F45-C64AE673012F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -39,6 +43,14 @@ Global
{1BAEB487-2B41-4899-B37C-A3404FB57040}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BAEB487-2B41-4899-B37C-A3404FB57040}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1BAEB487-2B41-4899-B37C-A3404FB57040}.Release|Any CPU.Build.0 = Release|Any CPU
{5E4774D8-449C-4E78-8D55-2BC3B2B33F83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E4774D8-449C-4E78-8D55-2BC3B2B33F83}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E4774D8-449C-4E78-8D55-2BC3B2B33F83}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E4774D8-449C-4E78-8D55-2BC3B2B33F83}.Release|Any CPU.Build.0 = Release|Any CPU
{B3104461-D457-4D51-9F45-C64AE673012F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B3104461-D457-4D51-9F45-C64AE673012F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B3104461-D457-4D51-9F45-C64AE673012F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B3104461-D457-4D51-9F45-C64AE673012F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading

0 comments on commit 78c5a01

Please sign in to comment.