Cleanup, progress #5
@ -42,13 +42,5 @@
 | 
			
		||||
    <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,6 +96,10 @@ public partial class Button
 | 
			
		||||
	[Parameter]
 | 
			
		||||
	public string Style { get; set; } = string.Empty;
 | 
			
		||||
 | 
			
		||||
	#endregion
 | 
			
		||||
 | 
			
		||||
	#region Events
 | 
			
		||||
 | 
			
		||||
	/// <summary>
 | 
			
		||||
	/// Button click event.
 | 
			
		||||
	/// Options: any MouseEventCallback event
 | 
			
		||||
@ -103,13 +107,9 @@ 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,5 +146,4 @@ public partial class Button
 | 
			
		||||
 | 
			
		||||
	#endregion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,6 @@
 | 
			
		||||
<br/>
 | 
			
		||||
<svg height="@Height" width="@Width" style="fill:@Color;" class="@GlyphClassList" @onclick="@OnClick">
 | 
			
		||||
 | 
			
		||||
<div style="width:@WidthString; height:@HeightString; overflow:hidden">
 | 
			
		||||
<svg viewBox="0 0 24 24" style="fill:@Color;" class="@GlyphClassList" @onclick="@OnClick">
 | 
			
		||||
    @((MarkupString)SVG)
 | 
			
		||||
</svg>
 | 
			
		||||
</div>
 | 
			
		||||
@ -13,9 +13,25 @@ namespace Connected.Components
 | 
			
		||||
        public string Color { get; set; } = "#000000";
 | 
			
		||||
 | 
			
		||||
        [Parameter]
 | 
			
		||||
        public int Width { get; set; } = 25;
 | 
			
		||||
        public int Width { get; set; } = 24;
 | 
			
		||||
        [Parameter]
 | 
			
		||||
        public int Height { get; set; } = 25;
 | 
			
		||||
        public int Height { get; set; } = 24;
 | 
			
		||||
 | 
			
		||||
		  private string WidthString
 | 
			
		||||
			{
 | 
			
		||||
				get
 | 
			
		||||
				{
 | 
			
		||||
					return Width.ToString() + "px";
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		private string HeightString
 | 
			
		||||
		{
 | 
			
		||||
			get
 | 
			
		||||
			{
 | 
			
		||||
				return Width.ToString() + "px";
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		[Parameter]
 | 
			
		||||
			public string Class { get; set; } = string.Empty;
 | 
			
		||||
@ -32,7 +48,7 @@ namespace Connected.Components
 | 
			
		||||
 | 
			
		||||
		[Parameter]
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// Button click event.
 | 
			
		||||
		/// Glyph click event.
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		public EventCallback<MouseEventArgs> Click { get; set; }
 | 
			
		||||
		protected async Task OnClick(MouseEventArgs e)
 | 
			
		||||
 | 
			
		||||
@ -11,11 +11,13 @@
 | 
			
		||||
           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>
 | 
			
		||||
    @if (IsLabel)
 | 
			
		||||
@ -3,9 +3,10 @@ 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 InputNumber<NumberType>:InputBase where NumberType : INumber<NumberType>
 | 
			
		||||
public partial class NumberInput<NumberType>:InputBase where NumberType : INumber<NumberType>
 | 
			
		||||
{
 | 
			
		||||
	private double _step =1;
 | 
			
		||||
	[Parameter]
 | 
			
		||||
@ -40,7 +41,7 @@ public partial class InputNumber<NumberType>:InputBase where NumberType : INumbe
 | 
			
		||||
	}
 | 
			
		||||
	protected async Task OnMouseWheel(WheelEventArgs obj)
 | 
			
		||||
	{
 | 
			
		||||
		if (!DisableMouseWheel)
 | 
			
		||||
		if (DisableMouseWheel==false)
 | 
			
		||||
		{
 | 
			
		||||
			if (!obj.ShiftKey || Disabled || Readonly)
 | 
			
		||||
				return;
 | 
			
		||||
@ -55,19 +56,12 @@ public partial class InputNumber<NumberType>:InputBase where NumberType : INumbe
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	private NumberType _value;
 | 
			
		||||
 | 
			
		||||
	[Parameter]
 | 
			
		||||
	public NumberType Value
 | 
			
		||||
	{
 | 
			
		||||
		get
 | 
			
		||||
		{
 | 
			
		||||
			return _value;
 | 
			
		||||
		}
 | 
			
		||||
		set
 | 
			
		||||
		{
 | 
			
		||||
			_value = AdjustDecimalPlaces(value);
 | 
			
		||||
		}
 | 
			
		||||
		get;
 | 
			
		||||
		set;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[Parameter]
 | 
			
		||||
@ -41,7 +41,7 @@
 | 
			
		||||
    }
 | 
			
		||||
    <span class="input-glyph-wraper">
 | 
			
		||||
        <span class="input-glyph">
 | 
			
		||||
            @if (Clearable && Value.ToString().Length>0)
 | 
			
		||||
            @if (Clearable && !string.IsNullOrEmpty(Value))
 | 
			
		||||
            {
 | 
			
		||||
                <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 InputText: InputBase
 | 
			
		||||
public partial class TextInput: InputBase
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
	[Parameter]
 | 
			
		||||
@ -31,7 +31,7 @@ public partial class InputText: InputBase
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	[Parameter]
 | 
			
		||||
   public string Value { get; set; }
 | 
			
		||||
	public string Value { get; set; } = string.Empty;
 | 
			
		||||
 | 
			
		||||
	private string inputType
 | 
			
		||||
	{
 | 
			
		||||
@ -42,7 +42,6 @@ public partial class InputText: InputBase
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    [Parameter]
 | 
			
		||||
    public EventCallback<string> ValueChanged { get; set; }
 | 
			
		||||
 | 
			
		||||
@ -20,13 +20,6 @@
 | 
			
		||||
 | 
			
		||||
	<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>
 | 
			
		||||
@ -39,9 +32,6 @@
 | 
			
		||||
	</ItemGroup>
 | 
			
		||||
 | 
			
		||||
	<ItemGroup>
 | 
			
		||||
	  <Folder Include="Interfaces\" />
 | 
			
		||||
	  <Folder Include="Services\" />
 | 
			
		||||
	  <Folder Include="wwwroot\" />
 | 
			
		||||
		<None Include="..\..\LICENSE">
 | 
			
		||||
			<Pack>True</Pack>
 | 
			
		||||
			<PackagePath>\</PackagePath>
 | 
			
		||||
@ -86,19 +76,11 @@
 | 
			
		||||
		<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