Skip to content

Commit

Permalink
5.1.0 (#75)
Browse files Browse the repository at this point in the history
* #64 Rows parameter to TextField

* #29 maxlength

* Add .editorconfig (#73)

* add editorconfig as global solution item

* make CA1304 an error

* use invariant culture everywhere

* use spacing of two in xml files

* 5.1.0 release

Co-authored-by: Bruno Zell <[email protected]>
  • Loading branch information
skclusive and BrunoZell authored Nov 21, 2020
1 parent ebb708c commit f8ae0d6
Show file tree
Hide file tree
Showing 67 changed files with 360 additions and 194 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is the top-most EditorConfig file
root = true

[*]
charset = utf-8-bom
indent_style = space
end_of_line = crlf
insert_final_newline = false
trim_trailing_whitespace = true
indent_size = 4

[*.{xml,csproj}]
indent_size = 2
insert_final_newline = true

[*.{cs,razor}]
dotnet_diagnostic.CA1304.severity = error
5 changes: 3 additions & 2 deletions AppBar/src/AppBar.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.AppBar</AssemblyName>
<PackageId>Skclusive.Material.AppBar</PackageId>
<RootNamespace>Skclusive.Material.AppBar</RootNamespace>
Expand Down
5 changes: 3 additions & 2 deletions Avatar/src/Avatar.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Avatar</AssemblyName>
<PackageId>Skclusive.Material.Avatar</PackageId>
<RootNamespace>Skclusive.Material.Avatar</RootNamespace>
Expand Down
5 changes: 3 additions & 2 deletions Badge/src/Badge.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Badge</AssemblyName>
<PackageId>Skclusive.Material.Badge</PackageId>
<RootNamespace>Skclusive.Material.Badge</RootNamespace>
Expand Down
5 changes: 3 additions & 2 deletions Baseline/src/Baseline.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Baseline</AssemblyName>
<PackageId>Skclusive.Material.Baseline</PackageId>
<RootNamespace>Skclusive.Material.Baseline</RootNamespace>
Expand Down
5 changes: 3 additions & 2 deletions Button/src/Button.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Button</AssemblyName>
<PackageId>Skclusive.Material.Button</PackageId>
<RootNamespace>Skclusive.Material.Button</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion Button/src/ButtonBase/ButtonBase.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public ButtonBase() : base("ButtonBase")

protected bool LastDisabled { set; get; }

protected string _Type => _Component == "button" ? Type.ToString().ToLower() : null;
protected string _Type => _Component == "button" ? Type.ToString().ToLowerInvariant() : null;

protected bool Navigation => !string.IsNullOrWhiteSpace(Href) && _Component == "a";

Expand Down
8 changes: 3 additions & 5 deletions Button/src/Ripple/Ripple.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;

namespace Skclusive.Material.Button
{
Expand Down Expand Up @@ -51,7 +52,7 @@ public Ripple() : base("Ripple")
public int Timeout { set; get; }

[Parameter]
public EventCallback<IReference> OnExited { set; get; }
public Func<IReference, Task> OnExited { set; get; }

/// <summary>
/// <c>class</c> applied on the child element.
Expand Down Expand Up @@ -141,10 +142,7 @@ protected override void OnParametersSet()
{
Leaving = true;

if (OnExited.HasDelegate)
{
RunTimeout(() => OnExited.InvokeAsync(Reference.Empty), Timeout);
}
RunTimeout(() => OnExited?.Invoke(Reference.Empty), Timeout);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Button/src/TouchRipple/TouchRipple.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private RenderFragment<ITransitionItemContext> CreateRipple(bool pulsate, double
builder.OpenRegion(context.Key);
builder.OpenComponent<Ripple>(context.Key + 1);
builder.AddAttribute(context.Key + 2, "In", context.In);
builder.AddAttribute(context.Key + 3, "OnExited", EventCallback.Factory.Create(this, context.OnExited));
builder.AddAttribute(context.Key + 3, "OnExited", context.OnExited);
builder.AddAttribute(context.Key + 4, "Timeout", DURATION);
builder.AddAttribute(context.Key + 5, "Pulsate", pulsate);
builder.AddAttribute(context.Key + 6, "RippleX", rippleX);
Expand Down
5 changes: 3 additions & 2 deletions Card/src/Card.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Card</AssemblyName>
<PackageId>Skclusive.Material.Card</PackageId>
<RootNamespace>Skclusive.Material.Card</RootNamespace>
Expand Down
9 changes: 5 additions & 4 deletions Chip/src/Chip.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Chip</AssemblyName>
<PackageId>Skclusive.Material.Chip</PackageId>
<RootNamespace>Skclusive.Material.Chip</RootNamespace>
Expand All @@ -16,11 +17,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Skclusive.Script.DomHelpers" Version="5.0.0" />
<PackageReference Include="Skclusive.Script.DomHelpers" Version="5.1.0" />
</ItemGroup>

<!-- <ItemGroup>
<ProjectReference Include="..\..\..\Skclusive.Script.DomHelpers\src\DomHelpers.csproj" Version="5.0.0" />
<ProjectReference Include="..\..\..\Skclusive.Script.DomHelpers\src\DomHelpers.csproj" Version="5.1.0" />
</ItemGroup> -->

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions Container/src/Container.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Container</AssemblyName>
<PackageId>Skclusive.Material.Container</PackageId>
<RootNamespace>Skclusive.Material.Container</RootNamespace>
Expand Down
9 changes: 5 additions & 4 deletions Core/src/Core.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Core</AssemblyName>
<PackageId>Skclusive.Material.Core</PackageId>
<RootNamespace>Skclusive.Material.Core</RootNamespace>
Expand All @@ -16,10 +17,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Skclusive.Core.Component" Version="5.0.0" />
<PackageReference Include="Skclusive.Core.Component" Version="5.1.0" />
</ItemGroup>

<!-- <ItemGroup>
<ProjectReference Include="..\..\..\Skclusive.Core.Component\src\Component.csproj" Version="5.0.0" />
<ProjectReference Include="..\..\..\Skclusive.Core.Component\src\Component.csproj" Version="5.1.0" />
</ItemGroup> -->
</Project>
5 changes: 3 additions & 2 deletions Dialog/src/Dialog.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Dialog</AssemblyName>
<PackageId>Skclusive.Material.Dialog</PackageId>
<RootNamespace>Skclusive.Material.Dialog</RootNamespace>
Expand Down
28 changes: 14 additions & 14 deletions Dialog/src/Dialog/Dialog.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,37 +134,37 @@ public Dialog() : base("Dialog")
/// Transition <c>OnEnter</c> callback.
/// </summary>
[Parameter]
public EventCallback<(IReference, bool)> OnEnter { set; get; }
public Func<(IReference, bool), Task> OnEnter { set; get; }

/// <summary>
/// Transition <c>OnEntering</c> callback.
/// </summary>
[Parameter]
public EventCallback<(IReference, bool)> OnEntering { set; get; }
public Func<(IReference, bool), Task> OnEntering { set; get; }

/// <summary>
/// Transition <c>OnEntered</c> callback.
/// </summary>
[Parameter]
public EventCallback<(IReference, bool)> OnEntered { set; get; }
public Func<(IReference, bool), Task> OnEntered { set; get; }

/// <summary>
/// Transition <c>OnExit</c> callback.
/// </summary>
[Parameter]
public EventCallback<IReference> OnExit { set; get; }
public Func<IReference, Task> OnExit { set; get; }

/// <summary>
/// Transition <c>OnExiting</c> callback.
/// </summary>
[Parameter]
public EventCallback<IReference> OnExiting { set; get; }
public Func<IReference, Task> OnExiting { set; get; }

/// <summary>
/// Transition <c>OnExited</c> callback.
/// </summary>
[Parameter]
public EventCallback<IReference> OnExited { set; get; }
public Func<IReference, Task> OnExited { set; get; }

/// <summary>
/// Callback fired when the dialog is getting closed.
Expand Down Expand Up @@ -211,16 +211,16 @@ public Dialog() : base("Dialog")
public Func<(IReference, bool), Task> CreateOnEnter(Func<(IReference, bool), Task> onEnter)
{
return async ((IReference reference, bool appearing) args) => {
await onEnter?.Invoke(args);
await OnEnter.InvokeAsync(args);
await (onEnter?.Invoke(args) ?? Task.CompletedTask);
await (OnEnter?.Invoke(args) ?? Task.CompletedTask);
};
}

public Func<IReference, Task> CreateOnExited(Func<IReference, Task> onExited)
{
return async (IReference reference) => {
await onExited?.Invoke(reference);
await OnExited.InvokeAsync(reference);
await (onExited?.Invoke(reference) ?? Task.CompletedTask);
await (OnExited?.Invoke(reference) ?? Task.CompletedTask);
};
}

Expand Down Expand Up @@ -330,22 +330,22 @@ protected void HandleEscapeKeyDown()

protected Task HandleEnteringAsync((IReference, bool) args)
{
return OnEntering.InvokeAsync(args);
return OnEntering?.Invoke(args) ?? Task.CompletedTask;
}

protected Task HandleEnteredAsync((IReference, bool) args)
{
return OnEntered.InvokeAsync(args);
return OnEntered?.Invoke(args) ?? Task.CompletedTask;
}

protected Task HandleExitAsync(IReference refback)
{
return OnExit.InvokeAsync(refback);
return OnExit?.Invoke(refback) ?? Task.CompletedTask;
}

protected Task HandleExitingAsync(IReference refback)
{
return OnExiting.InvokeAsync(refback);
return OnExiting?.Invoke(refback) ?? Task.CompletedTask;
}
}
}
5 changes: 3 additions & 2 deletions Divider/src/Divider.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Divider</AssemblyName>
<PackageId>Skclusive.Material.Divider</PackageId>
<RootNamespace>Skclusive.Material.Divider</RootNamespace>
Expand Down
5 changes: 3 additions & 2 deletions Drawer/src/Drawer.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Drawer</AssemblyName>
<PackageId>Skclusive.Material.Drawer</PackageId>
<RootNamespace>Skclusive.Material.Drawer</RootNamespace>
Expand Down
1 change: 1 addition & 0 deletions Drawer/src/Drawer/Drawer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ else if (Variant == DrawerVariant.Persistent)
<Slide
Placement="@Placement"
In="@Open"
MountOnEnter
TransitionDuration="@TransitionDuration"
AppearTimeout="@AppearTimeout"
EnterTimeout="@EnterTimeout"
Expand Down
5 changes: 3 additions & 2 deletions Form/src/Form.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Form</AssemblyName>
<PackageId>Skclusive.Material.Form</PackageId>
<RootNamespace>Skclusive.Material.Form</RootNamespace>
Expand Down
5 changes: 3 additions & 2 deletions Grid/src/Grid.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Grid</AssemblyName>
<PackageId>Skclusive.Material.Grid</PackageId>
<RootNamespace>Skclusive.Material.Grid</RootNamespace>
Expand Down
5 changes: 3 additions & 2 deletions Hidden/src/Hidden.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Skclusive.Material.Hidden</AssemblyName>
<PackageId>Skclusive.Material.Hidden</PackageId>
<RootNamespace>Skclusive.Material.Hidden</RootNamespace>
Expand Down
Loading

0 comments on commit f8ae0d6

Please sign in to comment.