|
|
@ -2,8 +2,6 @@
|
|
|
|
using Connected.Utilities;
|
|
|
|
using Connected.Utilities;
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
|
|
using System.Numerics;
|
|
|
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
|
|
|
using System.Timers;
|
|
|
|
using System.Timers;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Connected.Components;
|
|
|
|
namespace Connected.Components;
|
|
|
@ -140,7 +138,20 @@ public partial class Input<T> : InputBase<T>
|
|
|
|
.AddClass($"px-1", Variant == Variant.Filled)
|
|
|
|
.AddClass($"px-1", Variant == Variant.Filled)
|
|
|
|
.AddClass($"px-2", Variant == Variant.Outlined)
|
|
|
|
.AddClass($"px-2", Variant == Variant.Outlined)
|
|
|
|
.AddClass($"px-1", Variant == Variant.Text)
|
|
|
|
.AddClass($"px-1", Variant == Variant.Text)
|
|
|
|
.AddClass(HelperContainerClassList);
|
|
|
|
.AddClass(CompiledClearButtonClassList.Build())
|
|
|
|
|
|
|
|
.AddClass(CompiledHelperClassList.Build());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected CssBuilder CompiledClearButtonClassList
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new CssBuilder()
|
|
|
|
|
|
|
|
.AddClass("me-n1", Adornment == Adornment.End && HideSpinButtons == false)
|
|
|
|
|
|
|
|
.AddClass("icon-button-edge-end", Adornment == Adornment.End && HideSpinButtons == true)
|
|
|
|
|
|
|
|
.AddClass("me-6", Adornment != Adornment.End && HideSpinButtons == false)
|
|
|
|
|
|
|
|
.AddClass("icon-button-edge-margin-end", Adornment != Adornment.End && HideSpinButtons == true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -190,17 +201,23 @@ public partial class Input<T> : InputBase<T>
|
|
|
|
protected string Classname => InputCssHelper.GetClassname(this,
|
|
|
|
protected string Classname => InputCssHelper.GetClassname(this,
|
|
|
|
() => HasNativeHtmlPlaceholder() || !string.IsNullOrEmpty(Text) || Adornment == Adornment.Start || !string.IsNullOrWhiteSpace(Placeholder));
|
|
|
|
() => HasNativeHtmlPlaceholder() || !string.IsNullOrEmpty(Text) || Adornment == Adornment.Start || !string.IsNullOrWhiteSpace(Placeholder));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected CssBuilder CompiledClassList
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new CssBuilder("input-control-helper-container")
|
|
|
|
|
|
|
|
.AddClass($"px-1", Variant == Variant.Filled)
|
|
|
|
|
|
|
|
.AddClass($"px-2", Variant == Variant.Outlined)
|
|
|
|
|
|
|
|
.AddClass($"px-1", Variant == Variant.Text)
|
|
|
|
|
|
|
|
.AddClass(CompiledClearButtonClassList.Build())
|
|
|
|
|
|
|
|
.AddClass(CompiledHelperClassList.Build());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected string InputClassname => InputCssHelper.GetInputClassname(this);
|
|
|
|
protected string InputClassname => InputCssHelper.GetInputClassname(this);
|
|
|
|
|
|
|
|
|
|
|
|
protected string AdornmentClassname => InputCssHelper.GetAdornmentClassname(this);
|
|
|
|
protected string AdornmentClassname => InputCssHelper.GetAdornmentClassname(this);
|
|
|
|
|
|
|
|
|
|
|
|
protected string ClearButtonClassname =>
|
|
|
|
|
|
|
|
new CssBuilder()
|
|
|
|
|
|
|
|
.AddClass("me-n1", Adornment == Adornment.End && HideSpinButtons == false)
|
|
|
|
|
|
|
|
.AddClass("icon-button-edge-end", Adornment == Adornment.End && HideSpinButtons == true)
|
|
|
|
|
|
|
|
.AddClass("me-6", Adornment != Adornment.End && HideSpinButtons == false)
|
|
|
|
|
|
|
|
.AddClass("icon-button-edge-margin-end", Adornment != Adornment.End && HideSpinButtons == true)
|
|
|
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Type of the input element. It should be a valid HTML5 input type.
|
|
|
|
/// Type of the input element. It should be a valid HTML5 input type.
|
|
|
|