diff --git a/src/Connected.Components/Components/Button/GlyphButton.razor b/src/Connected.Components/Components/Button/GlyphButton.razor
new file mode 100644
index 0000000..60ef2a8
--- /dev/null
+++ b/src/Connected.Components/Components/Button/GlyphButton.razor
@@ -0,0 +1,27 @@
+@namespace Connected.Components
+
+@inherits ButtonBase
+
+@using Connected.Components;
+
+
+ @if (!String.IsNullOrEmpty(Glyph))
+ {
+
+
+
+ }
+ else
+ {
+
+ @ChildContent
+
+ }
+
diff --git a/src/Connected.Components/Components/Button/GlyphButton.razor.cs b/src/Connected.Components/Components/Button/GlyphButton.razor.cs
new file mode 100644
index 0000000..bff5752
--- /dev/null
+++ b/src/Connected.Components/Components/Button/GlyphButton.razor.cs
@@ -0,0 +1,54 @@
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+
+namespace Connected.Components;
+
+public partial class GlyphButton : ButtonBase
+{
+ #region Content
+ ///
+ /// The Icon that will be used in the component.
+ ///
+ [Parameter]
+ public string? Glyph { get; set; }
+
+ ///
+ /// GlyphTitle of the icon used for accessibility.
+ ///
+ [Parameter]
+ public string? GlyphTitle { get; set; }
+
+ ///
+ /// Child content of component, only shows if Glyph is null or Empty.
+ ///
+ [Parameter]
+ public RenderFragment? ChildContent { get; set; }
+
+ #endregion
+
+ #region Styling
+ ///
+ /// A space separated list of class names, added on top of the default class list.
+ ///
+ [Parameter]
+ public string? ClassList { get; set; }
+
+ ///
+ /// The variant to use.
+ ///
+ [Parameter]
+ public Variant Variant { get; set; } = Variant.Text;
+
+ ///
+ /// Contains the default container classlist and the user defined classes.
+ ///
+ private CssBuilder CompiledClassList
+ {
+ get
+ {
+ return new CssBuilder("button-root glyph-button")
+ .AddClass(ClassList);
+ }
+ }
+ #endregion
+}
diff --git a/src/Connected.Components/Components/Button/ToggleGlyphButton.razor b/src/Connected.Components/Components/Button/ToggleGlyphButton.razor
new file mode 100644
index 0000000..545c071
--- /dev/null
+++ b/src/Connected.Components/Components/Button/ToggleGlyphButton.razor
@@ -0,0 +1,13 @@
+@namespace Connected.Components
+
+@inherits UIComponent
+
+
diff --git a/src/Connected.Components/Components/Button/ToggleGlyphButton.razor.cs b/src/Connected.Components/Components/Button/ToggleGlyphButton.razor.cs
new file mode 100644
index 0000000..d441950
--- /dev/null
+++ b/src/Connected.Components/Components/Button/ToggleGlyphButton.razor.cs
@@ -0,0 +1,89 @@
+using Microsoft.AspNetCore.Components;
+
+namespace Connected.Components;
+
+public partial class ToggleGlyphButton : UIComponent
+{
+ #region Events
+ ///
+ /// Fires whenever toggled is changed.
+ ///
+ [Parameter]
+ public EventCallback
ToggledChanged { get; set; }
+
+ public async Task Toggle()
+ {
+ await SetToggledAsync(!Toggled);
+ }
+
+ protected internal async Task SetToggledAsync(bool toggled)
+ {
+ if (Disabled)
+ return;
+
+ if (Toggled != toggled)
+ {
+ Toggled = toggled;
+
+ if (!ToggledChanged.HasDelegate)
+ return;
+
+ await ToggledChanged.InvokeAsync(Toggled);
+ }
+ }
+
+ #endregion
+
+ #region Content
+ ///
+ /// The glyph that will be used in the untoggled state.
+ ///
+ [Parameter]
+ public string? Glyph { get; set; }
+
+ ///
+ /// GlyphTitle of the icon used for accessibility.
+ ///
+ [Parameter]
+ public string? GlyphTitle { get; set; }
+
+ ///
+ /// The glyph that will be used in the toggled state.
+ ///
+ [Parameter]
+ public string? ToggledGlyph { get; set; }
+
+ ///
+ /// GlyphTitle used in toggled state, if different.
+ ///
+ [Parameter]
+ public string? ToggledGlyphTitle { get; set; }
+ #endregion
+
+ #region Styling
+ ///
+ /// A space separated list of class names, added on top of the default class list.
+ ///
+ [Parameter]
+ public string? ClassList { get; set; }
+
+ ///
+ /// The variant to use.
+ ///
+ [Parameter]
+ public Variant Variant { get; set; } = Variant.Text;
+
+ ///
+ /// If true, the button will be disabled.
+ ///
+ [Parameter]
+ public bool Disabled { get; set; }
+
+ ///
+ /// The button toggled state.
+ ///
+ [Parameter]
+ public bool Toggled { get; set; }
+
+ #endregion
+}
diff --git a/src/Connected.Components/Components/Link/Link_old.razor b/src/Connected.Components/Components/Link/Link_old.razor
new file mode 100644
index 0000000..5793864
--- /dev/null
+++ b/src/Connected.Components/Components/Link/Link_old.razor
@@ -0,0 +1,6 @@
+@namespace Connected.Components
+@inherits UIComponent
+
+
+ @ChildContent
+
\ No newline at end of file
diff --git a/src/Connected.Components/Components/Link/Link_old.razor.cs b/src/Connected.Components/Components/Link/Link_old.razor.cs
new file mode 100644
index 0000000..efc4f9b
--- /dev/null
+++ b/src/Connected.Components/Components/Link/Link_old.razor.cs
@@ -0,0 +1,99 @@
+using Connected.Annotations;
+using Connected.Extensions;
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
+
+namespace Connected.Components;
+
+public partial class Link_old : UIComponent
+{
+
+ #region Events
+ ///
+ /// Link click event.
+ ///
+ [Parameter] public EventCallback OnClick { get; set; }
+
+ protected async Task OnClickHandler(MouseEventArgs ev)
+ {
+ if (Disabled) return;
+ await OnClick.InvokeAsync(ev);
+ }
+ #endregion
+
+ #region Content
+ private Dictionary Attributes
+ {
+ get => Disabled ? CustomAttributes : new Dictionary(CustomAttributes)
+ {
+ { "href", Href },
+ { "target", Target }
+ };
+ }
+ ///
+ /// The URL, which is the actual link.
+ ///
+ [Parameter]
+ [Category(CategoryTypes.Link.Behavior)]
+ public string Href { get; set; }
+
+ ///
+ /// The target attribute specifies where to open the link, if Link is specified. Possible values: _blank | _self | _parent | _top | framename
+ ///
+ [Parameter]
+ [Category(CategoryTypes.Link.Behavior)]
+ public string Target { get; set; }
+ #endregion
+
+ #region Styling
+ protected string Classname =>
+ new CssBuilder("typography mud-link")
+ .AddClass($"{Color.ToDescription()}-text")
+ .AddClass($"link-underline-{Underline.ToDescription()}")
+ .AddClass($"typography-{Typo.ToDescription()}")
+ // When Href is empty, link's hover cursor is text "I beam" even when Clicked has a delegate.
+ // To change this for more expected look change hover cursor to a pointer:
+ .AddClass("cursor-pointer", Href == default && OnClick.HasDelegate && !Disabled)
+ .AddClass($"link-disabled", Disabled)
+ .AddClass(AdditionalClassList)
+ .Build();
+
+ ///
+ /// Child content of component.
+ ///
+ [Parameter]
+ [Category(CategoryTypes.Link.Behavior)]
+ public RenderFragment ChildContent { get; set; }
+
+ ///
+ /// The color of the component. It supports the theme colors.
+ ///
+ [Parameter]
+ [Category(CategoryTypes.Link.Appearance)]
+ public ThemeColor Color { get; set; } = ThemeColor.Primary;
+
+ ///
+ /// Typography variant to use.
+ ///
+ [Parameter]
+ [Category(CategoryTypes.Link.Appearance)]
+ public Typo Typo { get; set; } = Typo.body1;
+
+ ///
+ /// Controls when the link should have an underline.
+ ///
+ [Parameter]
+ [Category(CategoryTypes.Link.Appearance)]
+ public Underline Underline { get; set; } = Underline.Hover;
+
+ ///
+ /// If true, the navlink will be disabled.
+ ///
+ [Parameter]
+ [Category(CategoryTypes.Link.Behavior)]
+ public bool Disabled { get; set; }
+
+ #endregion
+
+}
diff --git a/src/Connected.Components/ComponentsN/Alert.razor b/src/Connected.Components/ComponentsN/Alert.razor
new file mode 100644
index 0000000..3c52893
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Alert.razor
@@ -0,0 +1,26 @@
+@if (Closed == false)
+{
+
+
+
+ @if (ShowGlyph)
+ {
+
+
+
+ }
+
+
+ @ChildContent
+ @Text
+
+
+
+ @if (ShowCloseButton)
+ {
+
+
+
+ }
+
+}
diff --git a/src/Connected.Components/ComponentsN/Alert.razor.cs b/src/Connected.Components/ComponentsN/Alert.razor.cs
new file mode 100644
index 0000000..897c386
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Alert.razor.cs
@@ -0,0 +1,90 @@
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+
+namespace Connected.ComponentsN;
+public partial class Alert
+{
+ [Parameter]
+ public bool ShowGlyph { get; set; } = true;
+ private string Glyph { get; set; } = string.Empty;
+
+ [Parameter]
+ public bool ShowCloseButton { get; set; } = false;
+
+ private string CloseButton { get; set; } = Icons.Material.Outlined.Close;
+
+ [Parameter]
+ public bool Closed { get; set; } = false;
+
+ [Parameter, EditorRequired]
+ public string Text { get; set; } = string.Empty;
+
+ [Parameter]
+ public Severity Severity { get; set;} = Severity.Normal;
+
+ protected override async Task OnParametersSetAsync()
+ {
+ switch (Severity)
+ {
+ case Severity.Normal:
+ {
+ Glyph = Icons.Material.Outlined.EventNote;
+ break;
+ }
+ case Severity.Info:
+ {
+ Glyph = Icons.Material.Outlined.Info;
+ break;
+ }
+ case Severity.Success:
+ {
+ Glyph = Icons.Custom.Uncategorized.AlertSuccess;
+ break;
+ }
+ case Severity.Warning:
+ {
+ Glyph = Icons.Material.Outlined.ReportProblem;
+ break;
+ }
+ case Severity.Error:
+ {
+ Glyph = Icons.Material.Filled.ErrorOutline;
+ break;
+ }
+ default:
+ {
+ Glyph = Icons.Material.Outlined.EventNote;
+ break;
+ }
+ }
+ await base.OnParametersSetAsync();
+ }
+
+ ///
+ /// Child content of the component.
+ ///
+ [Parameter]
+ public RenderFragment? ChildContent { get; set; }
+
+ private void OnCloseClick()
+ {
+ Closed = true;
+ StateHasChanged();
+ }
+
+ [Parameter]
+ public string ClassList { get; set; } = string.Empty;
+ ///
+ /// Contains the default container classlist and the user defined classes.
+ ///
+ private string CompiledClassList
+ {
+ get
+ {
+ return new CssBuilder("alert")
+ .AddClass($"alert-text-{Severity}")
+ .AddClass(ClassList)
+ .Build();
+ }
+ }
+}
diff --git a/src/Connected.Components/ComponentsN/Button.razor b/src/Connected.Components/ComponentsN/Button.razor
new file mode 100644
index 0000000..f4c882b
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Button.razor
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/src/Connected.Components/ComponentsN/Button.razor.cs b/src/Connected.Components/ComponentsN/Button.razor.cs
new file mode 100644
index 0000000..2136c90
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Button.razor.cs
@@ -0,0 +1,92 @@
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
+
+namespace Connected.ComponentsN;
+public partial class Button
+{
+ ///
+ /// Text shown inside the button
+ ///
+ [Parameter]
+ public string Text { get; set; } = string.Empty;
+
+ [Parameter]
+ ///
+ /// Button click event.
+ ///
+ public EventCallback Click { get; set; }
+ protected async Task OnClick(MouseEventArgs e)
+ {
+ await Click.InvokeAsync(e);
+
+ }
+ ///
+ /// Disabled or enabled property of the button. Default: false
+ ///
+ [Parameter]
+ public bool Disabled { get; set; } = false;
+
+ ///
+ /// Glyph for the button.
+ /// Default: string.Empty
+ ///
+ [Parameter]
+ public string Glyph { get; set; } = string.Empty;
+
+ ///
+ /// Position of the glyph relative to button Text parameter. Default: GlyphPosition.LEFT (Possible options: GlyphPosition.LEFT, GlyphPosition.TOP, GlyphPosition.RIGHT, GlyphPosition.BOTTOM)
+ /// If Glyph parameter is empty this parameter is ignored
+ ///
+ [Parameter]
+ public Position GlyphPosition { get; set; } = Position.Left;
+
+ ///
+ /// HEX value of the color for the glyph custom color. Default: black (#000000)
+ /// If Glyph parameter is empty this parameter is ignored
+ ///
+ [Parameter]
+ public string GlyphColor { get; set; } = "#000000";
+
+ [Parameter]
+ public string Class { get; set; } = string.Empty;
+
+ private string ButtonClassList
+ {
+ get
+ {
+ return new CssBuilder()
+ .AddClass(Class)
+ .Build();
+ }
+ }
+
+ [Parameter]
+ public string Style { get; set; } = string.Empty;
+
+ private string ButtonStyleList
+ {
+ get
+ {
+ return new StyleBuilder()
+ .AddStyle(Style)
+ .Build();
+ }
+ }
+
+ ///
+ /// When mouse is over the component
+ ///
+ ///
+ public async Task HoverOn()
+ {
+ }
+
+ ///
+ /// When mouse is away from component
+ ///
+ ///
+ public async Task HoverOff()
+ {
+ }
+}
diff --git a/src/Connected.Components/ComponentsN/Glyph.razor b/src/Connected.Components/ComponentsN/Glyph.razor
new file mode 100644
index 0000000..78c061c
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Glyph.razor
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/src/Connected.Components/ComponentsN/Glyph.razor.cs b/src/Connected.Components/ComponentsN/Glyph.razor.cs
new file mode 100644
index 0000000..aafbee9
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Glyph.razor.cs
@@ -0,0 +1,44 @@
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
+
+namespace Connected.ComponentsN
+{
+ public partial class Glyph
+ {
+ [Parameter]
+ public string SVG { get; set; } = string.Empty;
+
+ [Parameter]
+ public string Color { get; set; } = "#000000";
+
+ [Parameter]
+ public int Width { get; set; } = 30;
+ [Parameter]
+ public int Height { get; set; } = 30;
+
+ [Parameter]
+ public string Class { get; set; } = string.Empty;
+
+ private string GlyphClassList
+ {
+ get
+ {
+ return new CssBuilder()
+ .AddClass(Class)
+ .Build();
+ }
+ }
+
+ [Parameter]
+ ///
+ /// Button click event.
+ ///
+ public EventCallback Click { get; set; }
+ protected async Task OnClick(MouseEventArgs e)
+ {
+ await Click.InvokeAsync(e);
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Connected.Components/ComponentsN/ISelect.cs b/src/Connected.Components/ComponentsN/ISelect.cs
new file mode 100644
index 0000000..0f458ed
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/ISelect.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Connected.ComponentsN;
+internal interface ISelect
+{
+ public object FilterItems();
+}
diff --git a/src/Connected.Components/ComponentsN/InputDate.razor b/src/Connected.Components/ComponentsN/InputDate.razor
new file mode 100644
index 0000000..7c66b20
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/InputDate.razor
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/src/Connected.Components/ComponentsN/InputDate.razor.cs b/src/Connected.Components/ComponentsN/InputDate.razor.cs
new file mode 100644
index 0000000..aac0ae2
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/InputDate.razor.cs
@@ -0,0 +1,63 @@
+
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+
+namespace Connected.ComponentsN;
+public partial class InputDate
+{
+ #region parameters
+ ///
+ /// Class
+ ///
+ [Parameter]
+ public string Class { get; set; }
+
+ private string FixedInputClassList
+ {
+ get
+ {
+ return new CssBuilder()
+ .AddClass(Class)
+ .Build();
+ }
+ }
+ private InputType InputType { get; set; } = InputType.Date;
+
+ ///
+ /// Show clear button.
+ ///
+ [Parameter]
+ public bool ShowClearButton { get; set; } = false;
+
+ [Parameter]
+ public string ErrorText { get; set; } = string.Empty;
+
+ [Parameter]
+ public string Label { get; set; } = string.Empty;
+
+ [Parameter]
+ public string Format { get; set; } = "DD.MM.YYYY";
+
+ #endregion
+
+ #region Variables
+ private string _clearIcon = Icons.Material.Filled.Clear;
+
+ #endregion
+
+ [Parameter]
+ public DateTime Value { get; set; }
+
+ [Parameter]
+ public EventCallback ValueChanged { get; set; }
+
+ private async Task ChangeValueAsync(ChangeEventArgs args)
+ {
+ DateTime value = DateTime.Parse(args.Value.ToString());
+ await ValueChanged.InvokeAsync(value);
+ }
+
+ #region Lifecycle
+
+ #endregion
+}
diff --git a/src/Connected.Components/ComponentsN/InputNumber.razor b/src/Connected.Components/ComponentsN/InputNumber.razor
new file mode 100644
index 0000000..107439b
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/InputNumber.razor
@@ -0,0 +1,10 @@
+@typeparam Type
+
+
+
+
\ No newline at end of file
diff --git a/src/Connected.Components/ComponentsN/InputNumber.razor.cs b/src/Connected.Components/ComponentsN/InputNumber.razor.cs
new file mode 100644
index 0000000..44f5740
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/InputNumber.razor.cs
@@ -0,0 +1,77 @@
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+
+namespace Connected.ComponentsN;
+public partial class InputNumber
+{
+ #region parameters
+ ///
+ /// Class
+ ///
+ [Parameter]
+ public string Class { get; set; }
+
+ private string InputFieldClassList
+ {
+ get
+ {
+ return new CssBuilder()
+ .AddClass(Class)
+ .Build();
+ }
+ }
+
+ ///
+ /// Type of the input element. It should be a valid HTML5 input type.
+ ///
+ private InputType InputType { get; set; } = InputType.Number;
+
+ ///
+ /// Show clear button.
+ ///
+ [Parameter]
+ public bool ShowClearButton { get; set; } = false;
+
+ ///
+ /// The show input character counter
+ ///
+ [Parameter]
+ public bool ShowCharacterCounter { get; set; }
+
+ [Parameter]
+ public string ErrorText { get; set; } = string.Empty;
+
+ [Parameter]
+ public string Label { get; set; } = string.Empty;
+
+ ///
+ /// Step of Numeric field up/down. Only used when InputType.Number is used
+ ///
+ [Parameter]
+ public double Step { get; set; } = 1;
+
+ #endregion
+
+ #region Variables
+ private string _clearIcon = Icons.Material.Filled.Clear;
+
+ #endregion
+
+ [Parameter]
+ public Type Value { get; set; }
+
+ [Parameter]
+ public EventCallback ValueChanged { get; set; }
+
+ private async Task ChangeValueAsync(ChangeEventArgs args)
+ {
+ Type param = (Type)Convert.ChangeType(args.Value, typeof(Type));
+
+
+ await ValueChanged.InvokeAsync(param);
+ }
+
+ #region Lifecycle
+
+ #endregion
+}
diff --git a/src/Connected.Components/ComponentsN/InputText.razor b/src/Connected.Components/ComponentsN/InputText.razor
new file mode 100644
index 0000000..b3ce9f2
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/InputText.razor
@@ -0,0 +1,27 @@
+
+ @if (NumOfLines > 1)
+ {
+
+ } else
+ {
+
+ }
+
\ No newline at end of file
diff --git a/src/Connected.Components/ComponentsN/InputText.razor.cs b/src/Connected.Components/ComponentsN/InputText.razor.cs
new file mode 100644
index 0000000..2e89a6c
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/InputText.razor.cs
@@ -0,0 +1,124 @@
+
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+
+namespace Connected.ComponentsN;
+public partial class InputText
+{
+ #region parameters
+ ///
+ /// Class
+ ///
+ [Parameter]
+ public string Class { get; set; }
+
+ private string InputFieldClassList
+ {
+ get
+ {
+ return new CssBuilder()
+ .AddClass(Class)
+ .Build();
+ }
+ }
+
+ private InputType InputType { get; set; } = InputType.Text;
+
+ [Parameter]
+ public bool IsPasswordField { get; set; } = false;
+
+ ///
+ /// Show clear button.
+ ///
+ [Parameter]
+ public bool Clearable { get; set; } = false;
+
+ ///
+ /// Required property
+ ///
+ [Parameter]
+ public bool Required { get; set; } = false;
+
+ ///
+ /// Show clear button.
+ ///
+ [Parameter]
+ public bool Disabled { get; set; } = false;
+
+ ///
+ /// Show clear button.
+ ///
+ [Parameter]
+ public bool Readonly { get; set; } = false;
+
+ ///
+ /// The show input character counter
+ ///
+ [Parameter]
+ public bool ShowCharCounter { get; set; }
+
+ [Parameter]
+ public string ErrorText { get; set; } = string.Empty;
+
+ [Parameter]
+ public string Label { get; set; } = string.Empty;
+
+ [Parameter]
+ public string Placeholder { get; set; } = string.Empty;
+
+
+ ///
+ /// If more than 1, we have a textarea with defined number of lines
+ ///
+ [Parameter]
+ public int NumOfLines
+ {
+ get
+ {
+ return _numberOfLines;
+ }
+ set
+ {
+ if (value < 1)
+ {
+ _numberOfLines = 1;
+ }
+ else
+ {
+ _numberOfLines = value;
+ }
+ }
+ }
+ private int _numberOfLines = 1;
+
+ #endregion
+
+ #region Variables
+ private string _clearIcon = Icons.Material.Filled.Clear;
+
+ #endregion
+
+ [Parameter]
+ public string Value { get; set; }
+
+ [Parameter]
+ public EventCallback ValueChanged { get; set; }
+
+ private async Task ChangeValueAsync(ChangeEventArgs args)
+ {
+
+ await ValueChanged.InvokeAsync(args.Value.ToString());
+ }
+
+ #region Lifecycle
+
+ protected async Task OnParametersSetAsync()
+ {
+ if (IsPasswordField) InputType = InputType.Password;
+
+
+ await base.OnParametersSetAsync();
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/src/Connected.Components/ComponentsN/Link.razor b/src/Connected.Components/ComponentsN/Link.razor
new file mode 100644
index 0000000..deea63d
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Link.razor
@@ -0,0 +1,7 @@
+
+ @Text
+
diff --git a/src/Connected.Components/ComponentsN/Link.razor.cs b/src/Connected.Components/ComponentsN/Link.razor.cs
new file mode 100644
index 0000000..ad73986
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Link.razor.cs
@@ -0,0 +1,49 @@
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+
+namespace Connected.ComponentsN;
+public partial class Link
+{
+ [Parameter, EditorRequired]
+ public string Url { get; set; } = string.Empty;
+
+ [Parameter, EditorRequired]
+ public string Text { get; set; } = string.Empty;
+
+ [Parameter, EditorRequired]
+ public string Target { get; set; } = "_self";
+
+ [Parameter]
+ public string Class { get; set; } = string.Empty;
+
+ private string LinkClassList
+ {
+ get
+ {
+ return new CssBuilder()
+ .AddClass(Class)
+ .Build();
+ }
+ }
+
+ [Parameter]
+ public string Style { get; set; } = string.Empty;
+
+ private string LinkStyleList
+ {
+ get
+ {
+ return new StyleBuilder()
+ .AddStyle(Style)
+ .Build();
+ }
+ }
+
+ protected override async Task OnParametersSetAsync()
+ {
+ if (string.IsNullOrEmpty(Text)) Text = Url;
+ await base.OnParametersSetAsync();
+ }
+}
+
+
diff --git a/src/Connected.Components/ComponentsN/Select.razor b/src/Connected.Components/ComponentsN/Select.razor
new file mode 100644
index 0000000..c4c3e62
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Select.razor
@@ -0,0 +1,33 @@
+@typeparam ValueType
+
+
+
+
+ @if (SearchFieldEnabled)
+ {
+ //search field
+ }
+
+ @foreach (SelectItem item in Items)
+ {
+
+ }
+
+
+ @if (_pagination()>1)
+ {
+ //pagination
+ }
+
diff --git a/src/Connected.Components/ComponentsN/Select.razor.cs b/src/Connected.Components/ComponentsN/Select.razor.cs
new file mode 100644
index 0000000..7480c9c
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/Select.razor.cs
@@ -0,0 +1,63 @@
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+namespace Connected.ComponentsN;
+public partial class Select
+{
+
+ [Parameter]
+ public bool SearchFieldEnabled { get; set; } = false;
+
+ [Parameter]
+ public int MaxVisibleItems { get; set; } = 7;
+
+ [Parameter]
+ public List> Items
+ {
+ get{
+ if (FilterText.Length > 0)
+ {
+ return _items.Where(i => i.Value.ToString().Contains(FilterText) || i.Text.ToString().Contains(FilterText)).ToList();
+ }
+ return _items;
+ }
+ set {
+ _items= value;
+ }
+ }
+
+ private List> _items = new List>();
+
+ private int ItemsCount => Items.Count();
+
+
+ [Parameter]
+ public int SelectedIndex { get; set; } = 0;
+
+ [Parameter]
+ public string FilterText { get; set; } = string.Empty;
+
+ private int _pagination()
+ {
+ int result = 0;
+ if (MaxVisibleItems
+ /// Contains the default container classlist and the user defined classes.
+ ///
+ private string CompiledClassList
+ {
+ get
+ {
+ return new CssBuilder()
+ .AddClass(ClassList)
+ .Build();
+ }
+ }
+}
diff --git a/src/Connected.Components/ComponentsN/SelectItem.razor b/src/Connected.Components/ComponentsN/SelectItem.razor
new file mode 100644
index 0000000..c13d41f
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/SelectItem.razor
@@ -0,0 +1,5 @@
+@typeparam ValueType
+
+
+ @Text
+
diff --git a/src/Connected.Components/ComponentsN/SelectItem.razor.cs b/src/Connected.Components/ComponentsN/SelectItem.razor.cs
new file mode 100644
index 0000000..1d9a2ed
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/SelectItem.razor.cs
@@ -0,0 +1,20 @@
+using Microsoft.AspNetCore.Components;
+
+namespace Connected.ComponentsN;
+public partial class SelectItem
+{
+ [Parameter, EditorRequired]
+ public ValueType Value { get; set; }
+ [Parameter]
+ public string Text { get; set; } = string.Empty;
+
+ protected override async Task OnParametersSetAsync()
+ {
+ if (string.IsNullOrEmpty(Text)) {
+
+ if (Value is not null)
+ Text = Value.ToString();
+ }
+ await base.OnParametersSetAsync();
+ }
+}
diff --git a/src/Connected.Components/ComponentsN/ToggleButton.razor b/src/Connected.Components/ComponentsN/ToggleButton.razor
new file mode 100644
index 0000000..8cb11a4
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/ToggleButton.razor
@@ -0,0 +1,5 @@
+@using Connected.ComponentsN
+
+
\ No newline at end of file
diff --git a/src/Connected.Components/ComponentsN/ToggleButton.razor.cs b/src/Connected.Components/ComponentsN/ToggleButton.razor.cs
new file mode 100644
index 0000000..d7ccbcf
--- /dev/null
+++ b/src/Connected.Components/ComponentsN/ToggleButton.razor.cs
@@ -0,0 +1,148 @@
+using Connected.Utilities;
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
+
+namespace Connected.ComponentsN;
+public partial class ToggleButton
+{
+ ///
+ /// Define state of ToggleButton: Default: false
+ ///
+ [Parameter]
+ public bool Toggled { get; set; } = false;
+
+ private void Toggle()
+ {
+ Toggled=!Toggled;
+ StateHasChanged();
+ }
+
+ #region Text content
+ ///
+ /// default Text shown inside the button
+ ///
+ [Parameter]
+ public string Text { get; set; } = string.Empty;
+ ///
+ /// Text of toggled button shown inside the button
+ ///
+ [Parameter]
+ public string ToggleText { get; set; } = string.Empty;
+
+ private string TextToShow()
+ {
+ if (Toggled) return ToggleText;
+ return Text;
+ }
+
+ #endregion
+
+ #region Glyph
+ ///
+ /// Glyph for the button.
+ /// Default: string.Empty
+ ///
+ [Parameter]
+ public string Glyph { get; set; } = string.Empty;
+
+ ///
+ /// Glyph for the button.
+ /// Default: string.Empty
+ ///
+ [Parameter]
+ public string ToggleGlyph { get; set; } = string.Empty;
+
+ private string GlyphToShow()
+ {
+ if (Toggled) return ToggleGlyph;
+ return Glyph;
+ }
+
+ ///
+ /// Position of the glyph relative to button Text parameter. Default: Position.Left (Possible options: Top,Bottom,Center,Left,Right,Start,End)
+ /// If Glyph parameter is empty this parameter is ignored
+ ///
+ [Parameter]
+ public Position GlyphPosition { get; set; } = Position.Left;
+
+ ///
+ /// HEX value of the color for the glyph custom color. Default: black (#000000)
+ /// If Glyph parameter is empty this parameter is ignored
+ ///
+ [Parameter]
+ public string GlyphColor { get; set; } = "#000000";
+
+ ///
+ /// HEX value of the color for the glyph custom color. Default: black (#000000)
+ /// If Glyph parameter is empty this parameter is ignored
+ ///
+ [Parameter]
+ public string ToggleGlyphColor { get; set; } = "#000000";
+
+ private string GlyphColorToUse()
+ {
+ if (Toggled) return ToggleGlyphColor;
+ return GlyphColor;
+ }
+
+ #endregion
+
+
+ [Parameter]
+ ///
+ /// Button click event.
+ ///
+ public EventCallback Click { get; set; }
+ protected async Task OnClick(MouseEventArgs e)
+ {
+ await Click.InvokeAsync(e);
+ }
+
+ ///
+ /// Disabled or enabled property of the button. Default: false
+ ///
+ [Parameter]
+ public bool Disabled { get; set; } = false;
+
+ [Parameter]
+ public string Class { get; set; } = string.Empty;
+
+ private string ButtonClassList
+ {
+ get
+ {
+ return new CssBuilder()
+ .AddClass(Class)
+ .Build();
+ }
+ }
+
+ [Parameter]
+ public string Style { get; set; } = string.Empty;
+
+ private string ButtonStyleList
+ {
+ get
+ {
+ return new StyleBuilder()
+ .AddStyle(Style)
+ .Build();
+ }
+ }
+
+ ///
+ /// When mouse is over the component
+ ///
+ ///
+ public async Task HoverOn()
+ {
+ }
+
+ ///
+ /// When mouse is away from component
+ ///
+ ///
+ public async Task HoverOff()
+ {
+ }
+}
diff --git a/src/Connected.Components/Connected.Components.csproj b/src/Connected.Components/Connected.Components.csproj
index 54aabe4..00911ab 100644
--- a/src/Connected.Components/Connected.Components.csproj
+++ b/src/Connected.Components/Connected.Components.csproj
@@ -17,6 +17,13 @@
+
+
+
+
+
+
+
diff --git a/src/Connected.Components/Enums/LinkTarget.cs b/src/Connected.Components/Enums/LinkTarget.cs
new file mode 100644
index 0000000..ff00801
--- /dev/null
+++ b/src/Connected.Components/Enums/LinkTarget.cs
@@ -0,0 +1,9 @@
+namespace Connected.Enums;
+
+public enum LinkTarget
+{
+ _blank, //Opens the linked document in a new window or tab
+ _self, // Opens the linked document in the same frame as it was clicked(this is default)
+ _parent, // Opens the linked document in the parent frame
+ _top // Opens the linked document in the full body of the window
+}