Compare commits
No commits in common. "ed15c8f24dfa4fdc99aecdb06f8eaa842973f119" and "38d5bd01499f182bf5612a032d61c6de16619eb6" have entirely different histories.
ed15c8f24d
...
38d5bd0149
@ -42,5 +42,13 @@
|
||||
<ProjectReference Include="..\connected.components\Connected.Components.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyPackages" AfterTargets="Pack">
|
||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||
</Target>
|
||||
|
||||
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages">
|
||||
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
|
||||
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
|
||||
</Target>
|
||||
</Project>
|
||||
|
@ -96,10 +96,6 @@ public partial class Button
|
||||
[Parameter]
|
||||
public string Style { get; set; } = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
/// <summary>
|
||||
/// Button click event.
|
||||
/// Options: any MouseEventCallback event
|
||||
@ -107,9 +103,13 @@ public partial class Button
|
||||
[Parameter]
|
||||
public EventCallback<MouseEventArgs> OnClick { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
protected async Task Click(MouseEventArgs e)
|
||||
{
|
||||
await OnClick.InvokeAsync(e);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -146,4 +146,5 @@ public partial class Button
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
|
||||
<div style="width:@WidthString; height:@HeightString; overflow:hidden">
|
||||
<svg viewBox="0 0 24 24" style="fill:@Color;" class="@GlyphClassList" @onclick="@OnClick">
|
||||
<br/>
|
||||
<svg height="@Height" width="@Width" style="fill:@Color;" class="@GlyphClassList" @onclick="@OnClick">
|
||||
@((MarkupString)SVG)
|
||||
</svg>
|
||||
</div>
|
||||
</svg>
|
@ -13,27 +13,11 @@ namespace Connected.Components
|
||||
public string Color { get; set; } = "#000000";
|
||||
|
||||
[Parameter]
|
||||
public int Width { get; set; } = 24;
|
||||
public int Width { get; set; } = 25;
|
||||
[Parameter]
|
||||
public int Height { get; set; } = 24;
|
||||
public int Height { get; set; } = 25;
|
||||
|
||||
private string WidthString
|
||||
{
|
||||
get
|
||||
{
|
||||
return Width.ToString() + "px";
|
||||
}
|
||||
}
|
||||
|
||||
private string HeightString
|
||||
{
|
||||
get
|
||||
{
|
||||
return Width.ToString() + "px";
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
[Parameter]
|
||||
public string Class { get; set; } = string.Empty;
|
||||
|
||||
private string GlyphClassList
|
||||
@ -48,7 +32,7 @@ namespace Connected.Components
|
||||
|
||||
[Parameter]
|
||||
/// <summary>
|
||||
/// Glyph click event.
|
||||
/// Button click event.
|
||||
/// </summary>
|
||||
public EventCallback<MouseEventArgs> Click { get; set; }
|
||||
protected async Task OnClick(MouseEventArgs e)
|
||||
|
@ -11,12 +11,10 @@
|
||||
disabled="@Disabled"
|
||||
readonly="@Readonly"
|
||||
@onmousewheel="@OnMouseWheel"
|
||||
@onwheel="@OnMouseWheel"
|
||||
@oninput=@ChangeValueAsync
|
||||
@bind-value="@Value"
|
||||
@bind-value="@_value"
|
||||
@attributes="@InputAttributes">
|
||||
</input>
|
||||
|
||||
|
||||
<span class="highlight"></span>
|
||||
<span class="bar"></span>
|
@ -3,10 +3,9 @@ using Connected.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using System.Numerics;
|
||||
using static Connected.Colors;
|
||||
|
||||
namespace Connected.Components;
|
||||
public partial class NumberInput<NumberType>:InputBase where NumberType : INumber<NumberType>
|
||||
public partial class InputNumber<NumberType>:InputBase where NumberType : INumber<NumberType>
|
||||
{
|
||||
private double _step =1;
|
||||
[Parameter]
|
||||
@ -41,7 +40,7 @@ public partial class NumberInput<NumberType>:InputBase where NumberType : INumbe
|
||||
}
|
||||
protected async Task OnMouseWheel(WheelEventArgs obj)
|
||||
{
|
||||
if (DisableMouseWheel==false)
|
||||
if (!DisableMouseWheel)
|
||||
{
|
||||
if (!obj.ShiftKey || Disabled || Readonly)
|
||||
return;
|
||||
@ -56,12 +55,19 @@ public partial class NumberInput<NumberType>:InputBase where NumberType : INumbe
|
||||
}
|
||||
}
|
||||
|
||||
private NumberType _value;
|
||||
|
||||
[Parameter]
|
||||
public NumberType Value
|
||||
{
|
||||
get;
|
||||
set;
|
||||
get
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_value = AdjustDecimalPlaces(value);
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
@ -75,13 +81,13 @@ public partial class NumberInput<NumberType>:InputBase where NumberType : INumbe
|
||||
{
|
||||
if (args.Value is not null)
|
||||
{
|
||||
NumberType value = (NumberType)Convert.ChangeType(args.Value, typeof(NumberType));
|
||||
if (value.ToString().Length <= 0)
|
||||
{
|
||||
NumberType value = (NumberType)Convert.ChangeType(args.Value, typeof(NumberType));
|
||||
if (value.ToString().Length <= 0)
|
||||
{
|
||||
|
||||
value = (NumberType)Convert.ChangeType(0, typeof(NumberType));
|
||||
}
|
||||
await ValueChanged.InvokeAsync((NumberType)Convert.ChangeType(AdjustDecimalPlaces(value), typeof(NumberType)));
|
||||
value = (NumberType)Convert.ChangeType(0, typeof(NumberType));
|
||||
}
|
||||
await ValueChanged.InvokeAsync((NumberType)Convert.ChangeType(AdjustDecimalPlaces(value), typeof(NumberType)));
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@
|
||||
}
|
||||
<span class="input-glyph-wraper">
|
||||
<span class="input-glyph">
|
||||
@if (Clearable && !string.IsNullOrEmpty(Value))
|
||||
@if (Clearable && Value.ToString().Length>0)
|
||||
{
|
||||
<span class="input-glyph button" @onclick="Clear">
|
||||
<Glyph SVG="@Icons.Material.Rounded.Dangerous" />
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Connected.Components;
|
||||
public partial class TextInput: InputBase
|
||||
public partial class InputText: InputBase
|
||||
{
|
||||
|
||||
[Parameter]
|
||||
@ -31,7 +31,7 @@ public partial class TextInput: InputBase
|
||||
|
||||
|
||||
[Parameter]
|
||||
public string Value { get; set; } = string.Empty;
|
||||
public string Value { get; set; }
|
||||
|
||||
private string inputType
|
||||
{
|
||||
@ -42,6 +42,7 @@ public partial class TextInput: InputBase
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> ValueChanged { get; set; }
|
||||
|
@ -20,6 +20,13 @@
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="compilerconfig.json" />
|
||||
<None Include="ComponentsN\ToggleButton.razor" />
|
||||
<None Include="ComponentsN\Button.razor" />
|
||||
<None Include="ComponentsN\Glyph.razor" />
|
||||
<None Include="ComponentsN\Link.razor" />
|
||||
<None Include="ComponentsN\InputDate.razor" />
|
||||
<None Include="ComponentsN\InputNumber.razor" />
|
||||
<None Include="ComponentsN\InputText.razor" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -32,6 +39,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Interfaces\" />
|
||||
<Folder Include="Services\" />
|
||||
<Folder Include="wwwroot\" />
|
||||
<None Include="..\..\LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
@ -76,11 +86,19 @@
|
||||
<Delete Files="./Styles/Connected.Components.min.css" />
|
||||
</Target>
|
||||
|
||||
<!--Dont Include in build output-->
|
||||
<ItemGroup>
|
||||
<Content Remove="compilerconfig.json" />
|
||||
<Content Remove="excubowebcompiler.json" />
|
||||
<Content Remove="wwwroot/DoNotRemove.txt" />
|
||||
<!--macOS hidden file (causes problems with dotnet pack)-->
|
||||
<Content Remove="**/*/.DS_Store" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Watch Include="**/*.scss" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Watch Remove="Styles\Connected.Components.scss" />
|
||||
</ItemGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user