diff --git a/src/Connected.Components.Showcase/Pages/AlertShowcase.razor b/src/Connected.Components.Showcase/Pages/AlertShowcase.razor index c712272..4f4f3e3 100644 --- a/src/Connected.Components.Showcase/Pages/AlertShowcase.razor +++ b/src/Connected.Components.Showcase/Pages/AlertShowcase.razor @@ -7,7 +7,7 @@ - Default Square + Default Square Info Square Success Square Warning Square diff --git a/src/Connected.Components/Components/Alert/Alert.razor b/src/Connected.Components/Components/Alert/Alert.razor index 3507094..d74cc7b 100644 --- a/src/Connected.Components/Components/Alert/Alert.razor +++ b/src/Connected.Components/Components/Alert/Alert.razor @@ -23,7 +23,7 @@ @if (CloseGlyphVisible) {
- +
} \ No newline at end of file diff --git a/src/Connected.Components/Components/Alert/Alert.razor.cs b/src/Connected.Components/Components/Alert/Alert.razor.cs index d73010b..fd1703e 100644 --- a/src/Connected.Components/Components/Alert/Alert.razor.cs +++ b/src/Connected.Components/Components/Alert/Alert.razor.cs @@ -4,8 +4,7 @@ using Microsoft.AspNetCore.Components.Web; namespace Connected.Components; -public partial class Alert : UIComponent -{ +public partial class Alert : UIComponent{ /// /// Contains the default container classlist and the user defined classes. /// diff --git a/src/Connected.Components/Components/AppBar/AppBar.razor b/src/Connected.Components/Components/AppBar/AppBar.razor index 5f4e0fc..2626b3a 100644 --- a/src/Connected.Components/Components/AppBar/AppBar.razor +++ b/src/Connected.Components/Components/AppBar/AppBar.razor @@ -2,7 +2,7 @@ @inherits UIComponent
- + @ChildContent
diff --git a/src/Connected.Components/Components/AppBar/AppBar.razor.cs b/src/Connected.Components/Components/AppBar/AppBar.razor.cs index dd8a6d8..416b35a 100644 --- a/src/Connected.Components/Components/AppBar/AppBar.razor.cs +++ b/src/Connected.Components/Components/AppBar/AppBar.razor.cs @@ -27,11 +27,8 @@ public partial class AppBar : UIComponent get { return new CssBuilder("app-bar") - .AddClass($"appbar-dense", Dense) .AddClass($"appbar-fixed-top", Fixed && VerticalAlignment == VerticalAlignment.Top) .AddClass($"appbar-fixed-bottom", Fixed && VerticalAlignment == VerticalAlignment.Bottom) - .AddClass($"elevation-{Elevation}") - .AddClass($"theme-{Color}", Color != ThemeColor.Default) .AddClass(HeaderClassList); } } @@ -42,30 +39,6 @@ public partial class AppBar : UIComponent [Parameter] public RenderFragment? ChildContent { get; set; } - /// - /// The color of the component. It supports the theme colors. - /// - [Parameter] - public ThemeColor Color { get; set; } = ThemeColor.Default; - - /// - /// If true, compact padding will be used. - /// - [Parameter] - public bool Dense { get; set; } - - /// - /// If true, the left and right padding is removed from from the appbar. - /// - [Parameter] - public bool DisableGutters { get; set; } - - /// - /// The higher the number, the heavier the drop-shadow. 0 for no shadow. - /// - [Parameter] - public int Elevation { set; get; } = 4; - /// /// If true, appbar will be fixed. /// diff --git a/src/Connected.Components/Components/Autocomplete/Autocomplete.razor.cs b/src/Connected.Components/Components/Autocomplete/Autocomplete.razor.cs index 643db7b..9d3eea9 100644 --- a/src/Connected.Components/Components/Autocomplete/Autocomplete.razor.cs +++ b/src/Connected.Components/Components/Autocomplete/Autocomplete.razor.cs @@ -55,12 +55,12 @@ public partial class Autocomplete : InputBase, IDisposable [Parameter] public bool Dense { get; set; } /// - /// The Open Autocomplete Icon + /// The Open Autocomplete Glyph /// [Parameter] public string OpenIcon { get; set; } = Icons.Material.Filled.ArrowDropDown; /// - /// The Close Autocomplete Icon + /// The Close Autocomplete Glyph /// [Parameter] public string CloseIcon { get; set; } = Icons.Material.Filled.ArrowDropUp; diff --git a/src/Connected.Components/Components/Avatar/AvatarGroup.razor.cs b/src/Connected.Components/Components/Avatar/AvatarGroup.razor.cs index d3c338d..48e1fd4 100644 --- a/src/Connected.Components/Components/Avatar/AvatarGroup.razor.cs +++ b/src/Connected.Components/Components/Avatar/AvatarGroup.razor.cs @@ -17,7 +17,7 @@ partial class AvatarGroup : UIComponent { return new CssBuilder("avatar-group") .AddClass($"avatar-group-outlined", Outlined) - .AddClass($"avatar-group-outlined-{OutlineColor.ToDescriptionString()}", Outlined) + .AddClass($"avatar-group-outlined-{OutlineColor.ToDescription()}", Outlined) .AddClass(ClassList); } } diff --git a/src/Connected.Components/Components/Badge/Badge.razor.cs b/src/Connected.Components/Components/Badge/Badge.razor.cs index ae37399..7ee9c51 100644 --- a/src/Connected.Components/Components/Badge/Badge.razor.cs +++ b/src/Connected.Components/Components/Badge/Badge.razor.cs @@ -15,7 +15,7 @@ public partial class Badge : UIComponent .Build(); protected string WrapperClass => new CssBuilder("badge-wrapper") - .AddClass($"badge-{Origin.ToDescriptionString().Replace("-", " ")}") + .AddClass($"badge-{Origin.ToDescription().Replace("-", " ")}") .Build(); protected string BadgeClassName => @@ -23,9 +23,9 @@ public partial class Badge : UIComponent .AddClass("badge-dot", Dot) .AddClass("badge-bordered", Bordered) .AddClass("badge-icon", !string.IsNullOrEmpty(Icon) && !Dot) - .AddClass($"badge-{Origin.ToDescriptionString().Replace("-", " ")}") + .AddClass($"badge-{Origin.ToDescription().Replace("-", " ")}") .AddClass($"elevation-{Elevation.ToString()}") - .AddClass("theme-" + Color.ToDescriptionString(), Color != ThemeColor.Default) + .AddClass("theme-" + Color.ToDescription(), Color != ThemeColor.Default) .AddClass("badge-default", Color == ThemeColor.Default) .AddClass("badge-overlap", Overlap) .AddClass(BadgeClass) @@ -102,7 +102,7 @@ public partial class Badge : UIComponent public bool Bordered { get; set; } /// - /// Sets the Icon to use in the badge. + /// Sets the Glyph to use in the badge. /// [Parameter] [Category(CategoryTypes.Badge.Behavior)] diff --git a/src/Connected.Components/Components/Button/Button.razor b/src/Connected.Components/Components/Button/Button.razor index b3fc015..6453f63 100644 --- a/src/Connected.Components/Components/Button/Button.razor +++ b/src/Connected.Components/Components/Button/Button.razor @@ -1,15 +1,17 @@ @namespace Connected.Components + @using Connected.Extensions; + @inherits ButtonBase - - - @ChildContent - + + + @ChildContent + diff --git a/src/Connected.Components/Components/Button/Button.razor.cs b/src/Connected.Components/Components/Button/Button.razor.cs index 84164ad..e650ba4 100644 --- a/src/Connected.Components/Components/Button/Button.razor.cs +++ b/src/Connected.Components/Components/Button/Button.razor.cs @@ -1,6 +1,4 @@ -using Connected.Annotations; -using Connected.Extensions; -using Connected.Utilities; +using Connected.Utilities; using Microsoft.AspNetCore.Components; namespace Connected.Components; @@ -8,46 +6,36 @@ namespace Connected.Components; public partial class Button : ButtonBase { /// - /// Child content of component. + /// Contains the default container classlist and the user defined classes. /// - [Parameter] - public RenderFragment? ChildContent { get; set; } - private CssBuilder CompiledClassList { get { return new CssBuilder("button-root mud-button") .AddClass($"button-{Variant}") - .AddClass($"button-{Variant}-{Color}") - .AddClass($"button-{Variant}-size-{Size}") - .AddClass($"ripple", !CanRipple) - .AddClass($"elevation-{Elevation}") .AddClass(ClassList); } } + #region Styling properties /// - /// A space separated list of class names, added on top of the default class list. - /// - [Parameter] - public string? ClassList { get; set; } - - /// - /// The color of the component. It supports the theme colors. + /// Child content of component. /// [Parameter] - public ThemeColor Color { get; set; } = ThemeColor.Default; + public RenderFragment? ChildContent { get; set; } /// - /// The Size of the component. + /// A space separated list of class names, added on top of the default class list. /// [Parameter] - public Size Size { get; set; } = Size.Medium; + public string? ClassList { get; set; } /// /// The variant to use. /// [Parameter] public Variant Variant { get; set; } = Variant.Text; + #endregion + } diff --git a/src/Connected.Components/Components/Button/ButtonBase.cs b/src/Connected.Components/Components/Button/ButtonBase.cs index 92b75e9..83000fd 100644 --- a/src/Connected.Components/Components/Button/ButtonBase.cs +++ b/src/Connected.Components/Components/Button/ButtonBase.cs @@ -54,10 +54,16 @@ public abstract class ButtonBase : UIComponent /// /// The HTML element that will be rendered in the root by the component - /// By default, is a button + /// By default, is a button. /// protected string HtmlTag => ButtonType.ToString().ToLower(); + /// + /// Indicates whether the internal click propagation should be disabled, + /// as it is handled in the component itself. + /// + protected bool PreventOnClickPropagation => string.Compare(HtmlTag, "button", true) == 0; + protected async Task OnClick(MouseEventArgs e) { if (Disabled) diff --git a/src/Connected.Components/Components/Button/Fab.razor b/src/Connected.Components/Components/Button/Fab.razor index 5a45a55..fb8acc6 100644 --- a/src/Connected.Components/Components/Button/Fab.razor +++ b/src/Connected.Components/Components/Button/Fab.razor @@ -4,12 +4,11 @@ @using Connected.Extensions; - diff --git a/src/Connected.Components/Components/Button/Fab.razor.cs b/src/Connected.Components/Components/Button/Fab.razor.cs index 7633bc4..ce3e08c 100644 --- a/src/Connected.Components/Components/Button/Fab.razor.cs +++ b/src/Connected.Components/Components/Button/Fab.razor.cs @@ -10,9 +10,8 @@ public partial class Fab : ButtonBase protected string Classname => new CssBuilder("button-root mud-fab") .AddClass($"fab-extended", !string.IsNullOrEmpty(Label)) - .AddClass($"fab-{Color.ToDescriptionString()}") - .AddClass($"fab-size-{Size.ToDescriptionString()}") - .AddClass($"ripple", !CanRipple && !Disabled) + .AddClass($"fab-{Color.ToDescription()}") + .AddClass($"fab-size-{Size.ToDescription()}") .Build(); /// @@ -30,19 +29,19 @@ public partial class Fab : ButtonBase public Size Size { get; set; } = Size.Large; /// - /// If applied Icon will be added at the start of the component. + /// If applied Glyph will be added at the start of the component. /// [Obsolete("This property is obsolete. Use StartIcon instead.")][Parameter] public string Icon { get => StartIcon; set => StartIcon = value; } /// - /// If applied Icon will be added at the start of the component. + /// If applied Glyph will be added at the start of the component. /// [Parameter] [Category(CategoryTypes.Button.Behavior)] public string StartIcon { get; set; } /// - /// If applied Icon will be added at the end of the component. + /// If applied Glyph will be added at the end of the component. /// [Parameter] [Category(CategoryTypes.Button.Behavior)] @@ -70,7 +69,7 @@ public partial class Fab : ButtonBase public string Label { get; set; } /// - /// Title of the icon used for accessibility. + /// GlyphTitle of the icon used for accessibility. /// [Parameter] [Category(CategoryTypes.Button.Behavior)] diff --git a/src/Connected.Components/Components/Button/GlyphButton.razor b/src/Connected.Components/Components/Button/GlyphButton.razor new file mode 100644 index 0000000..76c20cd --- /dev/null +++ b/src/Connected.Components/Components/Button/GlyphButton.razor @@ -0,0 +1,27 @@ +@namespace Connected.Components + +@inherits ButtonBase + +@using Connected.Extensions; + + + @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..51990d4 --- /dev/null +++ b/src/Connected.Components/Components/Button/GlyphButton.razor.cs @@ -0,0 +1,56 @@ +using Connected.Utilities; +using Microsoft.AspNetCore.Components; + +namespace Connected.Components; + +public partial class GlyphButton : ButtonBase +{ + /// + /// Contains the default container classlist and the user defined classes. + /// + private CssBuilder CompiledClassList + { + get + { + return new CssBuilder("button-root glyph-button") + .AddClass(ClassList); + } + } + + /// + /// Child content of component, only shows if Glyph is null or Empty. + /// + [Parameter] + public RenderFragment? ChildContent { get; set; } + + #region EventCallbacks + #endregion + + #region Content placeholders + /// + /// The Glyph 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; } + #endregion + + #region Styling properties + /// + /// 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; + #endregion +} diff --git a/src/Connected.Components/Components/Button/IconButton.razor b/src/Connected.Components/Components/Button/IconButton.razor deleted file mode 100644 index 0684608..0000000 --- a/src/Connected.Components/Components/Button/IconButton.razor +++ /dev/null @@ -1,25 +0,0 @@ -@namespace Connected.Components - -@inherits ButtonBase - -@using Connected.Extensions; - - - @if (!String.IsNullOrEmpty(Icon)) - { - - - - } - else - { - @ChildContent - } - diff --git a/src/Connected.Components/Components/Button/IconButton.razor.cs b/src/Connected.Components/Components/Button/IconButton.razor.cs deleted file mode 100644 index 701c220..0000000 --- a/src/Connected.Components/Components/Button/IconButton.razor.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Connected.Annotations; -using Connected.Extensions; -using Connected.Utilities; -using Microsoft.AspNetCore.Components; - -namespace Connected.Components; - -public partial class IconButton : ButtonBase -{ - protected string Classname => - new CssBuilder("button-root mud-icon-button") - .AddClass("button", when: AsButton) - .AddClass($"{Color.ToDescriptionString()}-text hover:mud-{Color.ToDescriptionString()}-hover", !AsButton && Color != ThemeColor.Default) - .AddClass($"button-{Variant.ToDescriptionString()}", AsButton) - .AddClass($"button-{Variant.ToDescriptionString()}-{Color.ToDescriptionString()}", AsButton) - .AddClass($"button-{Variant.ToDescriptionString()}-size-{Size.ToDescriptionString()}", AsButton) - .AddClass($"ripple", !CanRipple) - .AddClass($"ripple-icon", !CanRipple && !AsButton) - .AddClass($"icon-button-size-{Size.ToDescriptionString()}", when: () => Size != Size.Medium) - .AddClass($"icon-button-edge-{Edge.ToDescriptionString()}", when: () => Edge != Edge.False) - .AddClass(AdditionalClassList) - .Build(); - - protected bool AsButton => Variant != Variant.Text; - - /// - /// The Icon that will be used in the component. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public string Icon { get; set; } - - /// - /// Title of the icon used for accessibility. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public string Title { get; set; } - - /// - /// The color of the component. It supports the theme colors. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public ThemeColor Color { get; set; } = ThemeColor.Default; - - /// - /// The Size of the component. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public Size Size { get; set; } = Size.Medium; - - /// - /// If set uses a negative margin. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public Edge Edge { get; set; } - - /// - /// Child content of component, only shows if Icon is null or Empty. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public RenderFragment ChildContent { get; set; } - - /// - /// The variant to use. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public Variant Variant { get; set; } = Variant.Text; - -} 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..9ff05a0 --- /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 EventCallbacks + /// + /// Fires whenever toggled is changed. + /// + [Parameter] + public EventCallback ToggledChanged { get; set; } + #endregion + + #region Content placeholders + /// + /// 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 properties + /// + /// 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; + #endregion + + #region Behavior properties + /// + /// If true, the button will be disabled. + /// + [Parameter] + public bool Disabled { get; set; } + + /// + /// The button toggled state. + /// + [Parameter] + public bool Toggled { get; set; } + #endregion + + 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); + } + } +} diff --git a/src/Connected.Components/Components/Button/ToggleIconButton.razor b/src/Connected.Components/Components/Button/ToggleIconButton.razor deleted file mode 100644 index 47b3efe..0000000 --- a/src/Connected.Components/Components/Button/ToggleIconButton.razor +++ /dev/null @@ -1,20 +0,0 @@ -@namespace Connected.Components - -@inherits UIComponent - -@{ - var ariaPressedValue = @Toggled ? "true" : "false"; -} - - diff --git a/src/Connected.Components/Components/Button/ToggleIconButton.razor.cs b/src/Connected.Components/Components/Button/ToggleIconButton.razor.cs deleted file mode 100644 index 02041c3..0000000 --- a/src/Connected.Components/Components/Button/ToggleIconButton.razor.cs +++ /dev/null @@ -1,119 +0,0 @@ -using Connected.Annotations; -using Microsoft.AspNetCore.Components; - -namespace Connected.Components; - -public partial class ToggleIconButton : UIComponent -{ - /// - /// The toggled value. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public bool Toggled { get; set; } - - /// - /// Fires whenever toggled is changed. - /// - [Parameter] public EventCallback ToggledChanged { get; set; } - - /// - /// The Icon that will be used in the untoggled state. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public string Icon { get; set; } - - /// - /// The Icon that will be used in the toggled state. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public string ToggledIcon { get; set; } - - /// - /// Title of the icon used for accessibility. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public string Title { get; set; } - - /// - /// Title used in toggled state, if different. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public string ToggledTitle { get; set; } - - /// - /// The color of the icon in the untoggled state. It supports the theme colors. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public ThemeColor Color { get; set; } = ThemeColor.Default; - - /// - /// The color of the icon in the toggled state. It supports the theme colors. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public ThemeColor ToggledColor { get; set; } = ThemeColor.Default; - - /// - /// The Size of the component in the untoggled state. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public Size Size { get; set; } = Size.Medium; - - /// - /// The Size of the component in the toggled state. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public Size ToggledSize { get; set; } = Size.Medium; - - /// - /// If set uses a negative margin. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public Edge Edge { get; set; } - - /// - /// If true, disables ripple effect. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public bool DisableRipple { get; set; } - - /// - /// If true, the button will be disabled. - /// - [Parameter] - [Category(CategoryTypes.Button.Behavior)] - public bool Disabled { get; set; } - - /// - /// The variant to use. - /// - [Parameter] - [Category(CategoryTypes.Button.Appearance)] - public Variant Variant { get; set; } = Variant.Text; - - public Task Toggle() - { - return SetToggledAsync(!Toggled); - } - - protected internal async Task SetToggledAsync(bool toggled) - { - if (Disabled) - return; - if (Toggled != toggled) - { - Toggled = toggled; - await ToggledChanged.InvokeAsync(Toggled); - } - } -} diff --git a/src/Connected.Components/Components/ButtonGroup/ButtonGroup.razor.cs b/src/Connected.Components/Components/ButtonGroup/ButtonGroup.razor.cs index 0b3519a..4b2a6e5 100644 --- a/src/Connected.Components/Components/ButtonGroup/ButtonGroup.razor.cs +++ b/src/Connected.Components/Components/ButtonGroup/ButtonGroup.razor.cs @@ -10,9 +10,9 @@ public partial class ButtonGroup : UIComponent protected string Classname => new CssBuilder("button-group-root") .AddClass($"button-group-override-styles", OverrideStyles) - .AddClass($"button-group-{Variant.ToDescriptionString()}") - .AddClass($"button-group-{Variant.ToDescriptionString()}-{Color.ToDescriptionString()}") - .AddClass($"button-group-{Variant.ToDescriptionString()}-size-{Size.ToDescriptionString()}") + .AddClass($"button-group-{Variant.ToDescription()}") + .AddClass($"button-group-{Variant.ToDescription()}-{Color.ToDescription()}") + .AddClass($"button-group-{Variant.ToDescription()}-size-{Size.ToDescription()}") .AddClass($"button-group-vertical", VerticalAlign) .AddClass($"button-group-horizontal", !VerticalAlign) .AddClass($"button-group-disable-elevation", DisableElevation) diff --git a/src/Connected.Components/Components/Card/CardMedia.razor.cs b/src/Connected.Components/Components/Card/CardMedia.razor.cs index 87f6ad8..3009eab 100644 --- a/src/Connected.Components/Components/Card/CardMedia.razor.cs +++ b/src/Connected.Components/Components/Card/CardMedia.razor.cs @@ -16,7 +16,7 @@ public partial class CardMedia : UIComponent .Build(); /// - /// Title of the image used for accessibility. + /// GlyphTitle of the image used for accessibility. /// [Parameter] [Category(CategoryTypes.Card.Behavior)] diff --git a/src/Connected.Components/Components/Carousel/Carousel.razor b/src/Connected.Components/Components/Carousel/Carousel.razor index ccbc0ba..63830bf 100644 --- a/src/Connected.Components/Components/Carousel/Carousel.razor +++ b/src/Connected.Components/Components/Carousel/Carousel.razor @@ -42,7 +42,7 @@ } @*Bullets*@ -
+
@if (ShowBullets) {
diff --git a/src/Connected.Components/Components/Carousel/Carousel.razor.cs b/src/Connected.Components/Components/Carousel/Carousel.razor.cs index ea7f141..5bac57e 100644 --- a/src/Connected.Components/Components/Carousel/Carousel.razor.cs +++ b/src/Connected.Components/Components/Carousel/Carousel.razor.cs @@ -10,13 +10,13 @@ public partial class Carousel : BindableItemsControlBase new CssBuilder("carousel") - .AddClass($"carousel-{(BulletsColor ?? _currentColor).ToDescriptionString()}") + .AddClass($"carousel-{(BulletsColor ?? _currentColor).ToDescription()}") .AddClass(AdditionalClassList) .Build(); protected string NavigationButtonsClassName => new CssBuilder() - .AddClass($"align-self-{ConvertPosition(ArrowsPosition).ToDescriptionString()}", !(NavigationButtonsClass ?? "").Contains("align-self-")) + .AddClass($"align-self-{ConvertPosition(ArrowsPosition).ToDescription()}", !(NavigationButtonsClass ?? "").Contains("align-self-")) .AddClass("carousel-elements-rtl", RightToLeft) .AddClass(NavigationButtonsClass) .Build(); diff --git a/src/Connected.Components/Components/Carousel/CarouselItem.razor.cs b/src/Connected.Components/Components/Carousel/CarouselItem.razor.cs index f08e450..574444d 100644 --- a/src/Connected.Components/Components/Carousel/CarouselItem.razor.cs +++ b/src/Connected.Components/Components/Carousel/CarouselItem.razor.cs @@ -9,7 +9,7 @@ public partial class CarouselItem : UIComponent, IDisposable { protected string Classname => new CssBuilder("carousel-item") - .AddClass($"carousel-item-{Color.ToDescriptionString()}") + .AddClass($"carousel-item-{Color.ToDescription()}") .AddClass("carousel-item-exit", !_disposed && Parent.LastContainer == this) .AddClass("carousel-transition-fade-in", !_disposed && Transition == Transition.Fade && Parent.SelectedContainer == this) diff --git a/src/Connected.Components/Components/Chart/Chart.razor.cs b/src/Connected.Components/Components/Chart/Chart.razor.cs index 7ce809c..e5ba7df 100644 --- a/src/Connected.Components/Components/Chart/Chart.razor.cs +++ b/src/Connected.Components/Components/Chart/Chart.razor.cs @@ -37,7 +37,7 @@ public partial class Chart : UIComponent protected string Classname => new CssBuilder("chart") - .AddClass($"chart-legend-{ConvertLegendPosition(LegendPosition).ToDescriptionString()}") + .AddClass($"chart-legend-{ConvertLegendPosition(LegendPosition).ToDescription()}") .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/CheckBox/CheckBox.razor.cs b/src/Connected.Components/Components/CheckBox/CheckBox.razor.cs index 947b825..28b7899 100644 --- a/src/Connected.Components/Components/CheckBox/CheckBox.razor.cs +++ b/src/Connected.Components/Components/CheckBox/CheckBox.razor.cs @@ -23,8 +23,8 @@ public partial class CheckBox : BooleanInput protected string CheckBoxClassname => new CssBuilder("button-root mud-icon-button") - .AddClass($"{Color.ToDescriptionString()}-text hover:mud-{Color.ToDescriptionString()}-hover", UnCheckedColor == null || (UnCheckedColor != null && BoolValue == true)) - .AddClass($"{UnCheckedColor?.ToDescriptionString()}-text hover:mud-{UnCheckedColor?.ToDescriptionString()}-hover", UnCheckedColor != null && BoolValue == false) + .AddClass($"{Color.ToDescription()}-text hover:mud-{Color.ToDescription()}-hover", UnCheckedColor == null || (UnCheckedColor != null && BoolValue == true)) + .AddClass($"{UnCheckedColor?.ToDescription()}-text hover:mud-{UnCheckedColor?.ToDescription()}-hover", UnCheckedColor != null && BoolValue == false) .AddClass($"checkbox-dense", Dense) .AddClass($"ripple mud-ripple-checkbox", !DisableRipple && !ReadOnly && !Disabled) .AddClass($"disabled", Disabled) diff --git a/src/Connected.Components/Components/Chip/Chip.razor.cs b/src/Connected.Components/Components/Chip/Chip.razor.cs index a765113..8520042 100644 --- a/src/Connected.Components/Components/Chip/Chip.razor.cs +++ b/src/Connected.Components/Components/Chip/Chip.razor.cs @@ -17,9 +17,9 @@ public partial class Chip : UIComponent, IDisposable protected string Classname => new CssBuilder("chip") - .AddClass($"chip-{GetVariant().ToDescriptionString()}") - .AddClass($"chip-size-{Size.ToDescriptionString()}") - .AddClass($"chip-color-{GetColor().ToDescriptionString()}") + .AddClass($"chip-{GetVariant().ToDescription()}") + .AddClass($"chip-size-{Size.ToDescription()}") + .AddClass($"chip-color-{GetColor().ToDescription()}") .AddClass("clickable", !ChipSet?.ReadOnly ?? OnClick.HasDelegate) .AddClass("ripple", !ChipSet?.ReadOnly ?? OnClick.HasDelegate && !DisableRipple) .AddClass("chip-label", Label) @@ -88,7 +88,7 @@ public partial class Chip : UIComponent, IDisposable public ThemeColor SelectedColor { get; set; } = ThemeColor.Inherit; /// - /// Avatar Icon, Overrides the regular Icon if set. + /// Avatar Glyph, Overrides the regular Glyph if set. /// [Parameter] [Category(CategoryTypes.Chip.Behavior)] @@ -116,7 +116,7 @@ public partial class Chip : UIComponent, IDisposable public bool Disabled { get; set; } /// - /// Sets the Icon to use. + /// Sets the Glyph to use. /// [Parameter] [Category(CategoryTypes.Chip.Behavior)] diff --git a/src/Connected.Components/Components/Container/Container.razor.cs b/src/Connected.Components/Components/Container/Container.razor.cs index 20f15ad..4427065 100644 --- a/src/Connected.Components/Components/Container/Container.razor.cs +++ b/src/Connected.Components/Components/Container/Container.razor.cs @@ -9,7 +9,7 @@ public partial class Container : UIComponent protected string Classname => new CssBuilder("container") .AddClass($"container-fixed", Fixed) - .AddClass($"container-maxwidth-{MaxWidth.ToDescriptionString()}", !Fixed) + .AddClass($"container-maxwidth-{MaxWidth.ToDescription()}", !Fixed) .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/DataGrid/DataGrid.razor b/src/Connected.Components/Components/DataGrid/DataGrid.razor index fdedc90..0f769fc 100644 --- a/src/Connected.Components/Components/DataGrid/DataGrid.razor +++ b/src/Connected.Components/Components/DataGrid/DataGrid.razor @@ -60,7 +60,7 @@ @Filter(f, null) } - + @if (ServerData != null) { @@ -273,8 +273,8 @@ - - + + diff --git a/src/Connected.Components/Components/DataGrid/FilterHeaderCell.razor b/src/Connected.Components/Components/DataGrid/FilterHeaderCell.razor index 6c5a6a6..7967798 100644 --- a/src/Connected.Components/Components/DataGrid/FilterHeaderCell.razor +++ b/src/Connected.Components/Components/DataGrid/FilterHeaderCell.razor @@ -58,7 +58,7 @@ } } - + } } diff --git a/src/Connected.Components/Components/DataGrid/HeaderCell.razor b/src/Connected.Components/Components/DataGrid/HeaderCell.razor index b9661fc..325d8be 100644 --- a/src/Connected.Components/Components/DataGrid/HeaderCell.razor +++ b/src/Connected.Components/Components/DataGrid/HeaderCell.razor @@ -113,8 +113,8 @@ else if (Column != null && !Column.Hidden) @DataGrid.Filter(Column.filterContext.FilterDefinition, Column) - - + + } diff --git a/src/Connected.Components/Components/DatePicker/DatePicker.cs b/src/Connected.Components/Components/DatePicker/DatePicker.cs index 2911ea0..0ef16e4 100644 --- a/src/Connected.Components/Components/DatePicker/DatePicker.cs +++ b/src/Connected.Components/Components/DatePicker/DatePicker.cs @@ -68,9 +68,9 @@ public class DatePicker : DatePickerBase if (day < GetMonthStart(month) || day > GetMonthEnd(month)) return b.AddClass("hidden").Build(); if ((Date?.Date == day && _selectedDate == null) || _selectedDate?.Date == day) - return b.AddClass("selected").AddClass($"theme-{Color.ToDescriptionString()}").Build(); + return b.AddClass("selected").AddClass($"theme-{Color.ToDescription()}").Build(); if (day == DateTime.Today) - return b.AddClass("current mud-button-outlined").AddClass($"button-outlined-{Color.ToDescriptionString()} mud-{Color.ToDescriptionString()}-text").Build(); + return b.AddClass("current mud-button-outlined").AddClass($"button-outlined-{Color.ToDescription()} mud-{Color.ToDescription()}-text").Build(); return b.Build(); } diff --git a/src/Connected.Components/Components/DatePicker/DatePickerBase.razor.cs b/src/Connected.Components/Components/DatePicker/DatePickerBase.razor.cs index 7c3cf51..8062746 100644 --- a/src/Connected.Components/Components/DatePicker/DatePickerBase.razor.cs +++ b/src/Connected.Components/Components/DatePicker/DatePickerBase.razor.cs @@ -497,7 +497,7 @@ public abstract partial class DatePickerBase : Picker private string GetYearClasses(int year) { if (year == GetMonthStart(0).Year) - return $"picker-year-selected mud-{Color.ToDescriptionString()}-text"; + return $"picker-year-selected mud-{Color.ToDescription()}-text"; return null; } @@ -546,7 +546,7 @@ public abstract partial class DatePickerBase : Picker private string GetMonthClasses(DateTime month) { if (GetMonthStart(0) == month) - return $"picker-month-selected mud-{Color.ToDescriptionString()}-text"; + return $"picker-month-selected mud-{Color.ToDescription()}-text"; return null; } diff --git a/src/Connected.Components/Components/DatePicker/DateRangePicker.razor.cs b/src/Connected.Components/Components/DatePicker/DateRangePicker.razor.cs index c3bc8f2..ebf569e 100644 --- a/src/Connected.Components/Components/DatePicker/DateRangePicker.razor.cs +++ b/src/Connected.Components/Components/DatePicker/DateRangePicker.razor.cs @@ -190,7 +190,7 @@ public partial class DateRangePicker : DatePickerBase .AddClass("range") .AddClass("range-start-selected") .AddClass("range-selection", _firstDate != null) - .AddClass($"theme-{Color.ToDescriptionString()}") + .AddClass($"theme-{Color.ToDescription()}") .Build(); } @@ -200,19 +200,19 @@ public partial class DateRangePicker : DatePickerBase return b.AddClass("selected") .AddClass("range") .AddClass("range-end-selected") - .AddClass($"theme-{Color.ToDescriptionString()}") + .AddClass($"theme-{Color.ToDescription()}") .Build(); } if (_firstDate == null && _dateRange != null && _dateRange.Start == _dateRange.End && _dateRange.Start == day) { - return b.AddClass("selected").AddClass($"theme-{Color.ToDescriptionString()}").Build(); + return b.AddClass("selected").AddClass($"theme-{Color.ToDescription()}").Build(); } else if (_firstDate != null && day > _firstDate) { return b.AddClass("range") .AddClass("range-selection", _secondDate == null) - .AddClass($"range-selection-{Color.ToDescriptionString()}", _firstDate != null) + .AddClass($"range-selection-{Color.ToDescription()}", _firstDate != null) .Build(); } @@ -221,8 +221,8 @@ public partial class DateRangePicker : DatePickerBase return b.AddClass("current") .AddClass("range", _firstDate != null && day > _firstDate) .AddClass("range-selection", _firstDate != null && day > _firstDate) - .AddClass($"range-selection-{Color.ToDescriptionString()}", _firstDate != null && day > _firstDate) - .AddClass($"{Color.ToDescriptionString()}-text") + .AddClass($"range-selection-{Color.ToDescription()}", _firstDate != null && day > _firstDate) + .AddClass($"{Color.ToDescription()}-text") .Build(); } diff --git a/src/Connected.Components/Components/Dialog/Dialog.razor.cs b/src/Connected.Components/Components/Dialog/Dialog.razor.cs index e704b68..fd7f3ec 100644 --- a/src/Connected.Components/Components/Dialog/Dialog.razor.cs +++ b/src/Connected.Components/Components/Dialog/Dialog.razor.cs @@ -24,7 +24,7 @@ public partial class Dialog : UIComponent [Inject] public IDialogService DialogService { get; set; } /// - /// Define the dialog title as a renderfragment (overrides Title) + /// Define the dialog title as a renderfragment (overrides GlyphTitle) /// [Parameter] [Category(CategoryTypes.Dialog.Behavior)] @@ -109,7 +109,7 @@ public partial class Dialog : UIComponent /// - /// Define the dialog title as a renderfragment (overrides Title) + /// Define the dialog title as a renderfragment (overrides GlyphTitle) /// [Parameter] [Category(CategoryTypes.Dialog.Behavior)] diff --git a/src/Connected.Components/Components/Dialog/DialogInstance.razor.cs b/src/Connected.Components/Components/Dialog/DialogInstance.razor.cs index ff6d787..cccaf94 100644 --- a/src/Connected.Components/Components/Dialog/DialogInstance.razor.cs +++ b/src/Connected.Components/Components/Dialog/DialogInstance.razor.cs @@ -191,7 +191,7 @@ public partial class DialogInstance : UIComponent, IDisposable { position = DialogPosition.Center; } - return $"dialog-{position.ToDescriptionString()}"; + return $"dialog-{position.ToDescription()}"; } private string SetMaxWidth() @@ -210,7 +210,7 @@ public partial class DialogInstance : UIComponent, IDisposable { maxWidth = MaxWidth.Small; } - return $"dialog-width-{maxWidth.ToDescriptionString()}"; + return $"dialog-width-{maxWidth.ToDescription()}"; } private bool SetFullWidth() diff --git a/src/Connected.Components/Components/Divider/Divider.razor.cs b/src/Connected.Components/Components/Divider/Divider.razor.cs index a816b55..d83927b 100644 --- a/src/Connected.Components/Components/Divider/Divider.razor.cs +++ b/src/Connected.Components/Components/Divider/Divider.razor.cs @@ -12,7 +12,7 @@ public partial class Divider : UIComponent .AddClass($"divider-flexitem", FlexItem) .AddClass($"divider-light", Light) .AddClass($"divider-vertical", Vertical) - .AddClass($"divider-{DividerType.ToDescriptionString()}", when: () => DividerType != DividerType.FullWidth) + .AddClass($"divider-{DividerType.ToDescription()}", when: () => DividerType != DividerType.FullWidth) .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/Drawer/Drawer.razor.cs b/src/Connected.Components/Components/Drawer/Drawer.razor.cs index 179ba4b..1b31040 100644 --- a/src/Connected.Components/Components/Drawer/Drawer.razor.cs +++ b/src/Connected.Components/Components/Drawer/Drawer.razor.cs @@ -28,11 +28,11 @@ public partial class Drawer : UIComponent, IDisposable, INavigationEventReceiver .AddClass($"drawer--open", Open) .AddClass($"drawer--closed", !Open) .AddClass($"drawer--initial", _initial) - .AddClass($"drawer-{Breakpoint.ToDescriptionString()}") - .AddClass($"drawer-clipped-{_clipMode.ToDescriptionString()}") - .AddClass($"theme-{Color.ToDescriptionString()}", Color != ThemeColor.Default) + .AddClass($"drawer-{Breakpoint.ToDescription()}") + .AddClass($"drawer-clipped-{_clipMode.ToDescription()}") + .AddClass($"theme-{Color.ToDescription()}", Color != ThemeColor.Default) .AddClass($"elevation-{Elevation}") - .AddClass($"drawer-{Variant.ToDescriptionString()}") + .AddClass($"drawer-{Variant.ToDescription()}") .AddClass(AdditionalClassList) .Build(); @@ -40,8 +40,8 @@ public partial class Drawer : UIComponent, IDisposable, INavigationEventReceiver new CssBuilder("drawer-overlay mud-overlay-drawer") .AddClass($"drawer-pos-{GetPosition()}") .AddClass($"drawer-overlay--open", Open) - .AddClass($"drawer-overlay-{Variant.ToDescriptionString()}") - .AddClass($"drawer-overlay-{Breakpoint.ToDescriptionString()}") + .AddClass($"drawer-overlay-{Variant.ToDescription()}") + .AddClass($"drawer-overlay-{Breakpoint.ToDescription()}") .AddClass($"drawer-overlay--initial", _initial) .Build(); @@ -385,7 +385,7 @@ public partial class Drawer : UIComponent, IDisposable, INavigationEventReceiver default: break; } - return Anchor.ToDescriptionString(); + return Anchor.ToDescription(); } diff --git a/src/Connected.Components/Components/Drawer/DrawerContainer.razor.cs b/src/Connected.Components/Components/Drawer/DrawerContainer.razor.cs index af85420..72f8fdc 100644 --- a/src/Connected.Components/Components/Drawer/DrawerContainer.razor.cs +++ b/src/Connected.Components/Components/Drawer/DrawerContainer.razor.cs @@ -53,14 +53,14 @@ public partial class DrawerContainer : UIComponent if (drawer == null) return string.Empty; - var className = $"drawer-{(drawer.Open ? "open" : "close")}-{drawer.Variant.ToDescriptionString()}"; + var className = $"drawer-{(drawer.Open ? "open" : "close")}-{drawer.Variant.ToDescription()}"; if (drawer.Variant is DrawerVariant.Responsive or DrawerVariant.Mini) { - className += $"-{drawer.Breakpoint.ToDescriptionString()}"; + className += $"-{drawer.Breakpoint.ToDescription()}"; } className += $"-{drawer.GetPosition()}"; - className += $" mud-drawer-{drawer.GetPosition()}-clipped-{drawer.ClipMode.ToDescriptionString()}"; + className += $" mud-drawer-{drawer.GetPosition()}-clipped-{drawer.ClipMode.ToDescription()}"; return className; } diff --git a/src/Connected.Components/Components/Element/Element.cs b/src/Connected.Components/Components/Element/Element.cs index 9a76014..7ed3b5b 100644 --- a/src/Connected.Components/Components/Element/Element.cs +++ b/src/Connected.Components/Components/Element/Element.cs @@ -1,5 +1,4 @@ -using Connected.Annotations; -using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Rendering; using Microsoft.AspNetCore.Components.Web; @@ -11,72 +10,97 @@ namespace Connected.Components; ///
public class Element : UIComponent { - /// - /// Child content - /// - [Parameter] - [Category(CategoryTypes.Element.Misc)] - public RenderFragment ChildContent { get; set; } + /// + /// Child content + /// + [Parameter] + public RenderFragment? ChildContent { get; set; } - /// - /// The HTML element that will be rendered in the root by the component - /// - [Parameter] - [Category(CategoryTypes.Element.Misc)] - public string HtmlTag { get; set; } = "span"; - /// - /// The ElementReference to bind to. - /// Use like @bind-Ref="myRef" - /// - [Parameter] - [Category(CategoryTypes.Element.Misc)] - public ElementReference? Ref { get; set; } + #region EventCallbacks + [Parameter] + public EventCallback RefChanged { get; set; } + #endregion - [Parameter] public EventCallback RefChanged { get; set; } + #region Content placeholders + /// + /// The Ref to bind to. + /// Usage: @bind-Ref="myRef" + /// + [Parameter] + public ElementReference? Ref { get; set; } + #endregion - /// - /// Calling StateHasChanged to refresh the component's state - /// - public void Refresh() => StateHasChanged(); + #region Styling properties + /// + /// A space separated list of class names, added on top of the default class list. + /// + [Parameter] + public string? ClassList { get; set; } + #endregion - protected override void BuildRenderTree(RenderTreeBuilder builder) - { - base.BuildRenderTree(builder); - //Open - builder.OpenElement(0, HtmlTag); + #region Behavior properties + /// + /// The HTML element that will be rendered in the root by the component + /// + [Parameter] + public string HtmlTag { get; set; } = "span"; - //splatted attributes - foreach (var attribute in CustomAttributes) - { - // checking if the value is null, we can get rid of null event handlers - // for example `@onmouseenter=@(IsOpen ? HandleEnter : null)` - // this is a powerful feature that in normal HTML elements doesn't work, because - // Blazor adds always the attribute value and creates an EventCallback - if (attribute.Value != null) - builder.AddAttribute(1, attribute.Key, attribute.Value); - } - //Class - builder.AddAttribute(2, "class", AdditionalClassList); + [Parameter] + public bool PreventOnClickPropagation { get; set; } + #endregion - // StopPropagation - // the order matters. This has to be before content is added - if (HtmlTag == "button") - builder.AddEventStopPropagationAttribute(5, "onclick", true); + /// + /// Schedules a component's state refresh + /// + public void Refresh() => StateHasChanged(); - //Reference capture - if (Ref != null) - { - builder.AddElementReferenceCapture(6, async capturedRef => - { - Ref = capturedRef; - await RefChanged.InvokeAsync(Ref.Value); - }); - } + protected override void BuildRenderTree(RenderTreeBuilder builder) + { + base.BuildRenderTree(builder); - //Content - builder.AddContent(10, ChildContent); + builder.OpenElement(0, HtmlTag); + + /* + * Handle splatted attributes + */ + foreach (var attribute in CustomAttributes) + { + /* + * Checking if the value is null, we can get rid of null event handlers, + * for example `@onmouseenter=@(IsOpen ? HandleEnter : null)`. + * This is a powerful feature that does not work in regular html elements + * because Blazor always adds the attribute value and creates an EventCallback. + * */ + if (attribute.Value is not null) + builder.AddAttribute(1, attribute.Key, attribute.Value); + } - //Close - builder.CloseElement(); - } + builder.AddAttribute(2, "class", ClassList); + + /* + * Stop onclock propagation for buttons. The order matters. + * This has to be before content is added + */ + if (PreventOnClickPropagation) + builder.AddEventStopPropagationAttribute(5, "onclick", true); + + /* + * Add reference capture propagation. + */ + if (Ref is not null) + { + builder.AddElementReferenceCapture(6, async capturedRef => + { + Ref = capturedRef; + await RefChanged.InvokeAsync(Ref.Value); + }); + } + + /* + * Render child content + */ + builder.AddContent(10, ChildContent); + + builder.CloseElement(); + } } diff --git a/src/Connected.Components/Components/Field/Field.razor.cs b/src/Connected.Components/Components/Field/Field.razor.cs index 3d1bfdb..0857a4e 100644 --- a/src/Connected.Components/Components/Field/Field.razor.cs +++ b/src/Connected.Components/Components/Field/Field.razor.cs @@ -11,9 +11,9 @@ public partial class Field : UIComponent { protected string Classname => new CssBuilder("input") - .AddClass($"input-{Variant.ToDescriptionString()}") - .AddClass($"input-adorned-{Adornment.ToDescriptionString()}", Adornment != Adornment.None) - .AddClass($"input-margin-{Margin.ToDescriptionString()}", when: () => Margin != Margin.None) + .AddClass($"input-{Variant.ToDescription()}") + .AddClass($"input-adorned-{Adornment.ToDescription()}", Adornment != Adornment.None) + .AddClass($"input-margin-{Margin.ToDescription()}", when: () => Margin != Margin.None) .AddClass("input-underline", when: () => DisableUnderLine == false && Variant != Variant.Outlined) .AddClass("shrink", when: () => !string.IsNullOrWhiteSpace(ChildContent?.ToString()) || Adornment == Adornment.Start) .AddClass("disabled", Disabled) @@ -24,14 +24,14 @@ public partial class Field : UIComponent new CssBuilder("input-slot") .AddClass("input-root") .AddClass("input-slot-nopadding", when: () => InnerPadding == false) - .AddClass($"input-root-{Variant.ToDescriptionString()}") - .AddClass($"input-adorned-{Adornment.ToDescriptionString()}", Adornment != Adornment.None) - .AddClass($"input-root-margin-{Margin.ToDescriptionString()}", when: () => Margin != Margin.None) + .AddClass($"input-root-{Variant.ToDescription()}") + .AddClass($"input-adorned-{Adornment.ToDescription()}", Adornment != Adornment.None) + .AddClass($"input-root-margin-{Margin.ToDescription()}", when: () => Margin != Margin.None) .Build(); protected string AdornmentClassname => new CssBuilder("input-adornment") - .AddClass($"input-adornment-{Adornment.ToDescriptionString()}", Adornment != Adornment.None) + .AddClass($"input-adornment-{Adornment.ToDescription()}", Adornment != Adornment.None) .AddClass($"text", !string.IsNullOrEmpty(AdornmentText)) .AddClass($"input-root-filled-shrink", Variant == Variant.Filled) .Build(); @@ -105,14 +105,14 @@ public partial class Field : UIComponent public bool Disabled { get; set; } /// - /// Icon that will be used if Adornment is set to Start or End. + /// Glyph that will be used if Adornment is set to Start or End. /// [Parameter] [Category(CategoryTypes.Field.Behavior)] public string AdornmentIcon { get; set; } /// - /// Text that will be used if Adornment is set to Start or End, the Text overrides Icon. + /// Text that will be used if Adornment is set to Start or End, the Text overrides Glyph. /// [Parameter] [Category(CategoryTypes.Field.Behavior)] @@ -133,7 +133,7 @@ public partial class Field : UIComponent public ThemeColor AdornmentColor { get; set; } = ThemeColor.Default; /// - /// Sets the Icon Size. + /// Sets the Glyph Size. /// [Parameter] [Category(CategoryTypes.Field.Appearance)] diff --git a/src/Connected.Components/Components/Grid/Grid.razor b/src/Connected.Components/Components/Grid/Grid.razor index 53c76f1..c75b787 100644 --- a/src/Connected.Components/Components/Grid/Grid.razor +++ b/src/Connected.Components/Components/Grid/Grid.razor @@ -15,7 +15,7 @@ protected string Classname => new CssBuilder("grid") .AddClass($"grid-spacing-xs-{Spacing.ToString()}") - .AddClass($"justify-{Justify.ToDescriptionString()}") + .AddClass($"justify-{Justify.ToDescription()}") .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/Icon/Icon.razor.cs b/src/Connected.Components/Components/Icon/Icon.razor.cs index 6c910cc..41f1190 100644 --- a/src/Connected.Components/Components/Icon/Icon.razor.cs +++ b/src/Connected.Components/Components/Icon/Icon.razor.cs @@ -11,20 +11,20 @@ public partial class Icon : UIComponent new CssBuilder("icon-root") .AddClass($"icon-default", Color == ThemeColor.Default) .AddClass($"svg-icon", !string.IsNullOrEmpty(Glyph) && Glyph.Trim().StartsWith(("<"))) - .AddClass($"{Color.ToDescriptionString()}-text", Color != ThemeColor.Default && Color != ThemeColor.Inherit) - .AddClass($"icon-size-{Size.ToDescriptionString()}") + .AddClass($"{Color.ToDescription()}-text", Color != ThemeColor.Default && Color != ThemeColor.Inherit) + .AddClass($"icon-size-{Size.ToDescription()}") .AddClass(AdditionalClassList) .Build(); /// - /// Icon to be used can either be svg paths for font icons. + /// Glyph to be used can either be svg paths for font icons. /// [Parameter] [Category(CategoryTypes.Icon.Behavior)] public string Glyph { get; set; } /// - /// Title of the icon used for accessibility. + /// GlyphTitle of the icon used for accessibility. /// [Parameter] [Category(CategoryTypes.Icon.Behavior)] diff --git a/src/Connected.Components/Components/Image/Image.razor.cs b/src/Connected.Components/Components/Image/Image.razor.cs index d769eb7..e9feb7d 100644 --- a/src/Connected.Components/Components/Image/Image.razor.cs +++ b/src/Connected.Components/Components/Image/Image.razor.cs @@ -14,8 +14,8 @@ public partial class Image : UIComponent protected string Classname => new CssBuilder("image") .AddClass("fluid", Fluid) - .AddClass($"object-{ObjectFit.ToDescriptionString()}") - .AddClass($"object-{ObjectPosition.ToDescriptionString()}") + .AddClass($"object-{ObjectFit.ToDescription()}") + .AddClass($"object-{ObjectPosition.ToDescription()}") .AddClass($"elevation-{Elevation}", Elevation > 0) .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/Input/Input.razor.cs b/src/Connected.Components/Components/Input/Input.razor.cs index ba66c8d..8c7962b 100644 --- a/src/Connected.Components/Components/Input/Input.razor.cs +++ b/src/Connected.Components/Components/Input/Input.razor.cs @@ -29,7 +29,7 @@ public partial class Input : InputBase internal override InputType GetInputType() => InputType; - protected string InputTypeString => InputType.ToDescriptionString(); + protected string InputTypeString => InputType.ToDescription(); protected Task OnInput(ChangeEventArgs args) { diff --git a/src/Connected.Components/Components/Input/InputBase.cs b/src/Connected.Components/Components/Input/InputBase.cs index 49e5ecf..2861883 100644 --- a/src/Connected.Components/Components/Input/InputBase.cs +++ b/src/Connected.Components/Components/Input/InputBase.cs @@ -63,14 +63,14 @@ public abstract class InputBase : FormComponent public bool HelperTextOnFocus { get; set; } /// - /// Icon that will be used if Adornment is set to Start or End. + /// Glyph that will be used if Adornment is set to Start or End. /// [Parameter] [Category(CategoryTypes.FormComponent.Behavior)] public string AdornmentIcon { get; set; } /// - /// Text that will be used if Adornment is set to Start or End, the Text overrides Icon. + /// Text that will be used if Adornment is set to Start or End, the Text overrides Glyph. /// [Parameter] [Category(CategoryTypes.FormComponent.Behavior)] @@ -105,7 +105,7 @@ public abstract class InputBase : FormComponent public string AdornmentAriaLabel { get; set; } = string.Empty; /// - /// The Icon Size. + /// The Glyph Size. /// [Parameter] [Category(CategoryTypes.FormComponent.Appearance)] diff --git a/src/Connected.Components/Components/Input/InputCssHelper.cs b/src/Connected.Components/Components/Input/InputCssHelper.cs index 6b7c411..cb5dc3c 100644 --- a/src/Connected.Components/Components/Input/InputCssHelper.cs +++ b/src/Connected.Components/Components/Input/InputCssHelper.cs @@ -7,9 +7,9 @@ internal static class InputCssHelper { public static string GetClassname(InputBase baseInput, Func shrinkWhen) => new CssBuilder("input") - .AddClass($"input-{baseInput.Variant.ToDescriptionString()}") - .AddClass($"input-adorned-{baseInput.Adornment.ToDescriptionString()}", baseInput.Adornment != Adornment.None) - .AddClass($"input-margin-{baseInput.Margin.ToDescriptionString()}", when: () => baseInput.Margin != Margin.None) + .AddClass($"input-{baseInput.Variant.ToDescription()}") + .AddClass($"input-adorned-{baseInput.Adornment.ToDescription()}", baseInput.Adornment != Adornment.None) + .AddClass($"input-margin-{baseInput.Margin.ToDescription()}", when: () => baseInput.Margin != Margin.None) .AddClass("input-underline", when: () => baseInput.DisableUnderLine == false && baseInput.Variant != Variant.Outlined) .AddClass("shrink", when: shrinkWhen) .AddClass("disabled", baseInput.Disabled) @@ -21,15 +21,15 @@ internal static class InputCssHelper public static string GetInputClassname(InputBase baseInput) => new CssBuilder("input-slot") .AddClass("input-root") - .AddClass($"input-root-{baseInput.Variant.ToDescriptionString()}") - .AddClass($"input-root-adorned-{baseInput.Adornment.ToDescriptionString()}", baseInput.Adornment != Adornment.None) - .AddClass($"input-root-margin-{baseInput.Margin.ToDescriptionString()}", when: () => baseInput.Margin != Margin.None) + .AddClass($"input-root-{baseInput.Variant.ToDescription()}") + .AddClass($"input-root-adorned-{baseInput.Adornment.ToDescription()}", baseInput.Adornment != Adornment.None) + .AddClass($"input-root-margin-{baseInput.Margin.ToDescription()}", when: () => baseInput.Margin != Margin.None) .AddClass(baseInput.AdditionalClassList) .Build(); public static string GetAdornmentClassname(InputBase baseInput) => new CssBuilder("input-adornment") - .AddClass($"input-adornment-{baseInput.Adornment.ToDescriptionString()}", baseInput.Adornment != Adornment.None) + .AddClass($"input-adornment-{baseInput.Adornment.ToDescription()}", baseInput.Adornment != Adornment.None) .AddClass($"text", !string.IsNullOrEmpty(baseInput.AdornmentText)) .AddClass($"input-root-filled-shrink", baseInput.Variant == Variant.Filled) .AddClass(baseInput.AdditionalClassList) diff --git a/src/Connected.Components/Components/Input/InputLabel.razor.cs b/src/Connected.Components/Components/Input/InputLabel.razor.cs index cd08152..1bc3cd6 100644 --- a/src/Connected.Components/Components/Input/InputLabel.razor.cs +++ b/src/Connected.Components/Components/Input/InputLabel.razor.cs @@ -9,8 +9,8 @@ public partial class InputLabel : UIComponent new Utilities.CssBuilder() .AddClass("input-label") .AddClass("input-label-animated") - .AddClass($"input-label-{Variant.ToDescriptionString()}") - .AddClass($"input-label-margin-{Margin.ToDescriptionString()}", when: () => Margin != Margin.None) + .AddClass($"input-label-{Variant.ToDescription()}") + .AddClass($"input-label-margin-{Margin.ToDescription()}", when: () => Margin != Margin.None) .AddClass($"disabled", Disabled) .AddClass("input-error", Error) .AddClass(AdditionalClassList) diff --git a/src/Connected.Components/Components/Input/RangeInput.razor.cs b/src/Connected.Components/Components/Input/RangeInput.razor.cs index 85677ed..de4ad70 100644 --- a/src/Connected.Components/Components/Input/RangeInput.razor.cs +++ b/src/Connected.Components/Components/Input/RangeInput.razor.cs @@ -38,7 +38,7 @@ public partial class RangeInput : InputBase> /// [Parameter] public string PlaceholderEnd { get; set; } - protected string InputTypeString => InputType.ToDescriptionString(); + protected string InputTypeString => InputType.ToDescription(); /// /// ChildContent of the MudInput will only be displayed if InputType.Hidden and if its not null. diff --git a/src/Connected.Components/Components/InputControl/InputControl.razor.cs b/src/Connected.Components/Components/InputControl/InputControl.razor.cs index 7d22b42..d7ce41c 100644 --- a/src/Connected.Components/Components/InputControl/InputControl.razor.cs +++ b/src/Connected.Components/Components/InputControl/InputControl.razor.cs @@ -9,7 +9,7 @@ public partial class InputControl : UIComponent protected string Classname => new CssBuilder("input-control") .AddClass("input-required", when: () => Required) - .AddClass($"input-control-margin-{Margin.ToDescriptionString()}", when: () => Margin != Margin.None) + .AddClass($"input-control-margin-{Margin.ToDescription()}", when: () => Margin != Margin.None) .AddClass("input-control-full-width", FullWidth) .AddClass("input-error", Error) .AddClass(AdditionalClassList) diff --git a/src/Connected.Components/Components/Link/Link.razor.cs b/src/Connected.Components/Components/Link/Link.razor.cs index 8ec125d..2027c40 100644 --- a/src/Connected.Components/Components/Link/Link.razor.cs +++ b/src/Connected.Components/Components/Link/Link.razor.cs @@ -10,10 +10,10 @@ public partial class Link : UIComponent { protected string Classname => new CssBuilder("typography mud-link") - .AddClass($"{Color.ToDescriptionString()}-text") - .AddClass($"link-underline-{Underline.ToDescriptionString()}") - .AddClass($"typography-{Typo.ToDescriptionString()}") - // When Href is empty, link's hover cursor is text "I beam" even when OnClick has a delegate. + .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) diff --git a/src/Connected.Components/Components/List/ListItem.razor.cs b/src/Connected.Components/Components/List/ListItem.razor.cs index eb22d95..dfb76f4 100644 --- a/src/Connected.Components/Components/List/ListItem.razor.cs +++ b/src/Connected.Components/Components/List/ListItem.razor.cs @@ -15,7 +15,7 @@ public partial class ListItem : UIComponent, IDisposable .AddClass("list-item-gutters", !DisableGutters && !(List?.DisableGutters == true)) .AddClass("list-item-clickable", List?.Clickable) .AddClass("ripple", List?.Clickable == true && !DisableRipple && !Disabled) - .AddClass($"selected-item mud-{List?.Color.ToDescriptionString()}-text mud-{List?.Color.ToDescriptionString()}-hover", _selected && !Disabled) + .AddClass($"selected-item mud-{List?.Color.ToDescription()}-text mud-{List?.Color.ToDescription()}-hover", _selected && !Disabled) .AddClass("list-item-disabled", Disabled) .AddClass(AdditionalClassList) .Build(); @@ -86,7 +86,7 @@ public partial class ListItem : UIComponent, IDisposable public bool DisableRipple { get; set; } /// - /// Icon to use if set. + /// Glyph to use if set. /// [Parameter] [Category(CategoryTypes.List.Behavior)] @@ -100,7 +100,7 @@ public partial class ListItem : UIComponent, IDisposable public ThemeColor IconColor { get; set; } = ThemeColor.Inherit; /// - /// Sets the Icon Size. + /// Sets the Glyph Size. /// [Parameter] [Category(CategoryTypes.List.Appearance)] diff --git a/src/Connected.Components/Components/Mask/Mask.razor b/src/Connected.Components/Components/Mask/Mask.razor index 80c5fa8..64d35a6 100644 --- a/src/Connected.Components/Components/Mask/Mask.razor +++ b/src/Connected.Components/Components/Mask/Mask.razor @@ -17,7 +17,7 @@ , IDisposable protected string Classname => new CssBuilder("input") - .AddClass($"input-{Variant.ToDescriptionString()}") - .AddClass($"input-adorned-{Adornment.ToDescriptionString()}", Adornment != Adornment.None) - .AddClass($"input-margin-{Margin.ToDescriptionString()}", when: () => Margin != Margin.None) + .AddClass($"input-{Variant.ToDescription()}") + .AddClass($"input-adorned-{Adornment.ToDescription()}", Adornment != Adornment.None) + .AddClass($"input-margin-{Margin.ToDescription()}", when: () => Margin != Margin.None) .AddClass("input-underline", when: () => DisableUnderLine == false && Variant != Variant.Outlined) .AddClass("shrink", when: () => !string.IsNullOrEmpty(Text) || Adornment == Adornment.Start || @@ -37,15 +37,15 @@ public partial class Mask : InputBase, IDisposable protected string InputClassname => new CssBuilder("input-slot") .AddClass("input-root") - .AddClass($"input-root-{Variant.ToDescriptionString()}") - .AddClass($"input-root-adorned-{Adornment.ToDescriptionString()}", Adornment != Adornment.None) - .AddClass($"input-root-margin-{Margin.ToDescriptionString()}", when: () => Margin != Margin.None) + .AddClass($"input-root-{Variant.ToDescription()}") + .AddClass($"input-root-adorned-{Adornment.ToDescription()}", Adornment != Adornment.None) + .AddClass($"input-root-margin-{Margin.ToDescription()}", when: () => Margin != Margin.None) .AddClass(AdditionalClassList) .Build(); protected string AdornmentClassname => new CssBuilder("input-adornment") - .AddClass($"input-adornment-{Adornment.ToDescriptionString()}", Adornment != Adornment.None) + .AddClass($"input-adornment-{Adornment.ToDescription()}", Adornment != Adornment.None) .AddClass($"text", !string.IsNullOrEmpty(AdornmentText)) .AddClass($"input-root-filled-shrink", Variant == Variant.Filled) .AddClass(AdditionalClassList) diff --git a/src/Connected.Components/Components/Menu/Menu.razor.cs b/src/Connected.Components/Components/Menu/Menu.razor.cs index 7d47627..75d40e2 100644 --- a/src/Connected.Components/Components/Menu/Menu.razor.cs +++ b/src/Connected.Components/Components/Menu/Menu.razor.cs @@ -41,7 +41,7 @@ public partial class Menu : UIComponent, IActivatable public string PopoverClass { get; set; } /// - /// Icon to use if set will turn the button into a MudIconButton. + /// Glyph to use if set will turn the button into a MudIconButton. /// [Parameter] [Category(CategoryTypes.Menu.Behavior)] @@ -55,14 +55,14 @@ public partial class Menu : UIComponent, IActivatable public ThemeColor IconColor { get; set; } = ThemeColor.Inherit; /// - /// Icon placed before the text if set. + /// Glyph placed before the text if set. /// [Parameter] [Category(CategoryTypes.Menu.Behavior)] public string StartIcon { get; set; } /// - /// Icon placed after the text if set. + /// Glyph placed after the text if set. /// [Parameter] [Category(CategoryTypes.Menu.Behavior)] diff --git a/src/Connected.Components/Components/Menu/MenuItem.razor.cs b/src/Connected.Components/Components/Menu/MenuItem.razor.cs index a3cc95e..a395135 100644 --- a/src/Connected.Components/Components/Menu/MenuItem.razor.cs +++ b/src/Connected.Components/Components/Menu/MenuItem.razor.cs @@ -31,7 +31,7 @@ public partial class MenuItem : UIComponent public string Href { get; set; } /// - /// Icon to be used for this menu entry + /// Glyph to be used for this menu entry /// [Parameter] [Category(CategoryTypes.List.Behavior)] @@ -43,7 +43,7 @@ public partial class MenuItem : UIComponent [Category(CategoryTypes.List.Appearance)] public ThemeColor IconColor { get; set; } = ThemeColor.Inherit; /// - /// The Icon Size. + /// The Glyph Size. /// [Parameter] [Category(CategoryTypes.List.Appearance)] diff --git a/src/Connected.Components/Components/MessageBox/MessageBox.razor.cs b/src/Connected.Components/Components/MessageBox/MessageBox.razor.cs index 03eaa11..28dacaf 100644 --- a/src/Connected.Components/Components/MessageBox/MessageBox.razor.cs +++ b/src/Connected.Components/Components/MessageBox/MessageBox.razor.cs @@ -18,7 +18,7 @@ public partial class MessageBox : UIComponent public string Title { get; set; } /// - /// Define the message box title as a renderfragment (overrides Title) + /// Define the message box title as a renderfragment (overrides GlyphTitle) /// [Parameter] [Category(CategoryTypes.MessageBox.Behavior)] diff --git a/src/Connected.Components/Components/NavMenu/NavGroup.razor.cs b/src/Connected.Components/Components/NavMenu/NavGroup.razor.cs index 1cb3c2a..3836446 100644 --- a/src/Connected.Components/Components/NavMenu/NavGroup.razor.cs +++ b/src/Connected.Components/Components/NavMenu/NavGroup.razor.cs @@ -34,7 +34,7 @@ public partial class NavGroup : UIComponent public string Title { get; set; } /// - /// Icon to use if set. + /// Glyph to use if set. /// [Parameter] [Category(CategoryTypes.NavMenu.Behavior)] diff --git a/src/Connected.Components/Components/NavMenu/NavLink.razor.cs b/src/Connected.Components/Components/NavMenu/NavLink.razor.cs index 25d790c..7aa3d1c 100644 --- a/src/Connected.Components/Components/NavMenu/NavLink.razor.cs +++ b/src/Connected.Components/Components/NavMenu/NavLink.razor.cs @@ -34,7 +34,7 @@ public partial class NavLink : SelectItemBase } /// - /// Icon to use if set. + /// Glyph to use if set. /// [Parameter] [Category(CategoryTypes.NavMenu.Behavior)] diff --git a/src/Connected.Components/Components/NavMenu/NavMenu.razor.cs b/src/Connected.Components/Components/NavMenu/NavMenu.razor.cs index 8e93ae6..b62ffc0 100644 --- a/src/Connected.Components/Components/NavMenu/NavMenu.razor.cs +++ b/src/Connected.Components/Components/NavMenu/NavMenu.razor.cs @@ -9,11 +9,11 @@ public partial class NavMenu : UIComponent { protected string Classname => new CssBuilder("navmenu") - .AddClass($"navmenu-{Color.ToDescriptionString()}") - .AddClass($"navmenu-margin-{Margin.ToDescriptionString()}") + .AddClass($"navmenu-{Color.ToDescription()}") + .AddClass($"navmenu-margin-{Margin.ToDescription()}") .AddClass("navmenu-dense", Dense) .AddClass("navmenu-rounded", Rounded) - .AddClass($"navmenu-bordered mud-border-{Color.ToDescriptionString()}", Bordered) + .AddClass($"navmenu-bordered mud-border-{Color.ToDescription()}", Bordered) .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/Overlay/Overlay.razor.cs b/src/Connected.Components/Components/Overlay/Overlay.razor.cs index dc2da1e..8d3286a 100644 --- a/src/Connected.Components/Components/Overlay/Overlay.razor.cs +++ b/src/Connected.Components/Components/Overlay/Overlay.razor.cs @@ -95,7 +95,7 @@ public partial class Overlay : UIComponent, IDisposable public bool LightBackground { get; set; } /// - /// Icon class names, separated by space + /// Glyph class names, separated by space /// [Parameter] [Category(CategoryTypes.Overlay.Behavior)] diff --git a/src/Connected.Components/Components/PageContentNavigation/PageContentSection.cs b/src/Connected.Components/Components/PageContentNavigation/PageContentSection.cs index 72e6b36..3dd15e3 100644 --- a/src/Connected.Components/Components/PageContentNavigation/PageContentSection.cs +++ b/src/Connected.Components/Components/PageContentNavigation/PageContentSection.cs @@ -44,7 +44,7 @@ public class PageContentSection public int Level { get; set; } /// - /// The Title of the section. This will be displayed in the navigation + /// The GlyphTitle of the section. This will be displayed in the navigation /// public string Title { get; set; } diff --git a/src/Connected.Components/Components/Pagination/Pagination.razor.cs b/src/Connected.Components/Components/Pagination/Pagination.razor.cs index a256fdf..03d7b4f 100644 --- a/src/Connected.Components/Components/Pagination/Pagination.razor.cs +++ b/src/Connected.Components/Components/Pagination/Pagination.razor.cs @@ -16,8 +16,8 @@ public partial class Pagination : UIComponent private string Classname => new CssBuilder("pagination") - .AddClass($"pagination-{Variant.ToDescriptionString()}") - .AddClass($"pagination-{Size.ToDescriptionString()}") + .AddClass($"pagination-{Variant.ToDescription()}") + .AddClass($"pagination-{Size.ToDescription()}") .AddClass("pagination-disable-elevation", DisableElevation) .AddClass("pagination-rtl", RightToLeft) .AddClass(AdditionalClassList) diff --git a/src/Connected.Components/Components/Picker/Picker.razor.cs b/src/Connected.Components/Components/Picker/Picker.razor.cs index c0b5e8a..1365d38 100644 --- a/src/Connected.Components/Components/Picker/Picker.razor.cs +++ b/src/Connected.Components/Components/Picker/Picker.razor.cs @@ -237,7 +237,7 @@ public partial class Picker : FormComponent public Orientation Orientation { get; set; } = Orientation.Portrait; /// - /// Sets the Icon Size. + /// Sets the Glyph Size. /// [Parameter] [Category(CategoryTypes.FormComponent.Appearance)] diff --git a/src/Connected.Components/Components/Picker/PickerToolbar.razor b/src/Connected.Components/Components/Picker/PickerToolbar.razor index c44136a..6b6ced2 100644 --- a/src/Connected.Components/Components/Picker/PickerToolbar.razor +++ b/src/Connected.Components/Components/Picker/PickerToolbar.razor @@ -13,7 +13,7 @@ @code { protected string Classnames => new CssBuilder("picker-toolbar") - .AddClass($"theme-{Color.ToDescriptionString()}") + .AddClass($"theme-{Color.ToDescription()}") .AddClass("picker-toolbar-landscape", Orientation == Orientation.Landscape) .AddClass(Class) .Build(); diff --git a/src/Connected.Components/Components/Popover/Popover.razor.cs b/src/Connected.Components/Components/Popover/Popover.razor.cs index 5e310a0..c2f1622 100644 --- a/src/Connected.Components/Components/Popover/Popover.razor.cs +++ b/src/Connected.Components/Components/Popover/Popover.razor.cs @@ -15,9 +15,9 @@ public partial class Popover : UIComponent, IAsyncDisposable new CssBuilder("popover") .AddClass($"popover-fixed", Fixed) .AddClass($"popover-open", Open) - .AddClass($"popover-{TransformOrigin.ToDescriptionString()}") - .AddClass($"popover-anchor-{AnchorOrigin.ToDescriptionString()}") - .AddClass($"popover-overflow-{OverflowBehavior.ToDescriptionString()}") + .AddClass($"popover-{TransformOrigin.ToDescription()}") + .AddClass($"popover-anchor-{AnchorOrigin.ToDescription()}") + .AddClass($"popover-overflow-{OverflowBehavior.ToDescription()}") .AddClass($"popover-relative-width", RelativeWidth) .AddClass($"paper", Paper) .AddClass($"paper-square", Paper && Square) diff --git a/src/Connected.Components/Components/Progress/ProgressCircular.razor.cs b/src/Connected.Components/Components/Progress/ProgressCircular.razor.cs index 5c93766..77bb5d7 100644 --- a/src/Connected.Components/Components/Progress/ProgressCircular.razor.cs +++ b/src/Connected.Components/Components/Progress/ProgressCircular.razor.cs @@ -12,8 +12,8 @@ public partial class ProgressCircular : UIComponent protected string DivClassname => new CssBuilder("progress-circular") - .AddClass($"{Color.ToDescriptionString()}-text") - .AddClass($"progress-{Size.ToDescriptionString()}") + .AddClass($"{Color.ToDescription()}-text") + .AddClass($"progress-{Size.ToDescription()}") .AddClass($"progress-indeterminate", Indeterminate) .AddClass($"progress-static", !Indeterminate) .AddClass(AdditionalClassList) diff --git a/src/Connected.Components/Components/Progress/ProgressLinear.razor.cs b/src/Connected.Components/Components/Progress/ProgressLinear.razor.cs index 40b282d..54d3784 100644 --- a/src/Connected.Components/Components/Progress/ProgressLinear.razor.cs +++ b/src/Connected.Components/Components/Progress/ProgressLinear.razor.cs @@ -15,8 +15,8 @@ public partial class ProgressLinear : UIComponent .AddClass($"progress-linear-striped", Striped) .AddClass($"progress-indeterminate", Indeterminate) .AddClass($"progress-linear-buffer", Buffer && !Indeterminate) - .AddClass($"progress-linear-{Size.ToDescriptionString()}") - .AddClass($"progress-linear-color-{Color.ToDescriptionString()}") + .AddClass($"progress-linear-{Size.ToDescription()}") + .AddClass($"progress-linear-color-{Color.ToDescription()}") .AddClass("horizontal", !Vertical) .AddClass("vertical", Vertical) .AddClass("flip-x-rtl") diff --git a/src/Connected.Components/Components/Radio/Radio.razor.cs b/src/Connected.Components/Components/Radio/Radio.razor.cs index ed36cd7..b004ea6 100644 --- a/src/Connected.Components/Components/Radio/Radio.razor.cs +++ b/src/Connected.Components/Components/Radio/Radio.razor.cs @@ -21,8 +21,8 @@ public partial class Radio : UIComponent, IDisposable protected string ButtonClassname => new CssBuilder("button-root mud-icon-button") .AddClass($"ripple mud-ripple-radio", !DisableRipple && !Disabled) - .AddClass($"{Color.ToDescriptionString()}-text hover:mud-{Color.ToDescriptionString()}-hover", UnCheckedColor == null || (UnCheckedColor != null && Checked == true)) - .AddClass($"{UnCheckedColor?.ToDescriptionString()}-text hover:mud-{UnCheckedColor?.ToDescriptionString()}-hover", UnCheckedColor != null && Checked == false) + .AddClass($"{Color.ToDescription()}-text hover:mud-{Color.ToDescription()}-hover", UnCheckedColor == null || (UnCheckedColor != null && Checked == true)) + .AddClass($"{UnCheckedColor?.ToDescription()}-text hover:mud-{UnCheckedColor?.ToDescription()}-hover", UnCheckedColor != null && Checked == false) .AddClass($"radio-dense", Dense) .AddClass($"disabled", Disabled) .AddClass($"checked", Checked) @@ -36,12 +36,12 @@ public partial class Radio : UIComponent, IDisposable protected string IconClassName => new CssBuilder("icon-root mud-svg-icon") - .AddClass($"icon-size-{Size.ToDescriptionString()}") + .AddClass($"icon-size-{Size.ToDescription()}") .Build(); protected string CheckedIconClassName => new CssBuilder("icon-root mud-svg-icon mud-radio-icon-checked") - .AddClass($"icon-size-{Size.ToDescriptionString()}") + .AddClass($"icon-size-{Size.ToDescription()}") .Build(); protected string ChildSpanClassName => diff --git a/src/Connected.Components/Components/Rating/RatingItem.razor.cs b/src/Connected.Components/Components/Rating/RatingItem.razor.cs index e734b7c..e33cca5 100644 --- a/src/Connected.Components/Components/Rating/RatingItem.razor.cs +++ b/src/Connected.Components/Components/Rating/RatingItem.razor.cs @@ -15,7 +15,7 @@ public partial class RatingItem : UIComponent .AddClass($"rating-item") .AddClass($"ripple mud-ripple-icon", !DisableRipple) .AddClass($"yellow-text.text-darken-3", Color == ThemeColor.Default) - .AddClass($"{Color.ToDescriptionString()}-text", Color != ThemeColor.Default) + .AddClass($"{Color.ToDescription()}-text", Color != ThemeColor.Default) .AddClass($"rating-item-active", IsActive) .AddClass($"disabled", Disabled) .AddClass($"readonly", ReadOnly) diff --git a/src/Connected.Components/Components/Select/Select.razor.cs b/src/Connected.Components/Components/Select/Select.razor.cs index 5d906db..f6d3039 100644 --- a/src/Connected.Components/Components/Select/Select.razor.cs +++ b/src/Connected.Components/Components/Select/Select.razor.cs @@ -171,14 +171,14 @@ public partial class Select : InputBase, ISelect, IShadowSelect } /// - /// The Open Select Icon + /// The Open Select Glyph /// [Parameter] [Category(CategoryTypes.FormComponent.Appearance)] public string OpenIcon { get; set; } = Icons.Material.Filled.ArrowDropDown; /// - /// The Close Select Icon + /// The Close Select Glyph /// [Parameter] [Category(CategoryTypes.FormComponent.Appearance)] diff --git a/src/Connected.Components/Components/Skeleton/Skeleton.razor.cs b/src/Connected.Components/Components/Skeleton/Skeleton.razor.cs index 202767b..03aa7fd 100644 --- a/src/Connected.Components/Components/Skeleton/Skeleton.razor.cs +++ b/src/Connected.Components/Components/Skeleton/Skeleton.razor.cs @@ -9,8 +9,8 @@ public partial class Skeleton : UIComponent { protected string Classname => new CssBuilder("skeleton") - .AddClass($"skeleton-{SkeletonType.ToDescriptionString()}") - .AddClass($"skeleton-{Animation.ToDescriptionString()}") + .AddClass($"skeleton-{SkeletonType.ToDescription()}") + .AddClass($"skeleton-{Animation.ToDescription()}") .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/Slider/Slider.razor.cs b/src/Connected.Components/Components/Slider/Slider.razor.cs index b408f08..c409c82 100644 --- a/src/Connected.Components/Components/Slider/Slider.razor.cs +++ b/src/Connected.Components/Components/Slider/Slider.razor.cs @@ -10,8 +10,8 @@ public partial class Slider : UIComponent { protected string Classname => new CssBuilder("slider") - .AddClass($"slider-{Size.ToDescriptionString()}") - .AddClass($"slider-{Color.ToDescriptionString()}") + .AddClass($"slider-{Size.ToDescription()}") + .AddClass($"slider-{Color.ToDescription()}") .AddClass("slider-vertical", Vertical) .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/Snackbar/SnackbarOptions.cs b/src/Connected.Components/Components/Snackbar/SnackbarOptions.cs index 0fddd94..a3d794a 100644 --- a/src/Connected.Components/Components/Snackbar/SnackbarOptions.cs +++ b/src/Connected.Components/Components/Snackbar/SnackbarOptions.cs @@ -59,7 +59,7 @@ public class SnackbarOptions : CommonSnackbarOptions { Severity = severity; - SnackbarTypeClass = $"alert-{SnackbarVariant.ToDescriptionString()}-{severity.ToDescriptionString()}"; + SnackbarTypeClass = $"alert-{SnackbarVariant.ToDescription()}-{severity.ToDescription()}"; if (SnackbarVariant != Variant.Filled) { diff --git a/src/Connected.Components/Components/Stack/Stack.razor.cs b/src/Connected.Components/Components/Stack/Stack.razor.cs index 9369855..be21297 100644 --- a/src/Connected.Components/Components/Stack/Stack.razor.cs +++ b/src/Connected.Components/Components/Stack/Stack.razor.cs @@ -14,8 +14,8 @@ public partial class Stack : UIComponent protected string Classname => new CssBuilder("d-flex") .AddClass($"flex-{(Row ? "row" : "column")}{(Reverse ? "-reverse" : string.Empty)}") - .AddClass($"justify-{Justify?.ToDescriptionString()}", Justify != null) - .AddClass($"align-{AlignItems?.ToDescriptionString()}", AlignItems != null) + .AddClass($"justify-{Justify?.ToDescription()}", Justify != null) + .AddClass($"align-{AlignItems?.ToDescription()}", AlignItems != null) .AddClass($"gap-{Spacing}") .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Components/Switch/Switch.razor.cs b/src/Connected.Components/Components/Switch/Switch.razor.cs index b6283cc..f047cbd 100644 --- a/src/Connected.Components/Components/Switch/Switch.razor.cs +++ b/src/Connected.Components/Components/Switch/Switch.razor.cs @@ -21,8 +21,8 @@ public partial class Switch : BooleanInput protected string SwitchClassname => new CssBuilder("button-root mud-icon-button mud-switch-base") .AddClass($"ripple mud-ripple-switch", !DisableRipple && !ReadOnly && !Disabled) - .AddClass($"{Color.ToDescriptionString()}-text hover:mud-{Color.ToDescriptionString()}-hover", BoolValue == true) - .AddClass($"{UnCheckedColor.ToDescriptionString()}-text hover:mud-{UnCheckedColor.ToDescriptionString()}-hover", BoolValue == false) + .AddClass($"{Color.ToDescription()}-text hover:mud-{Color.ToDescription()}-hover", BoolValue == true) + .AddClass($"{UnCheckedColor.ToDescription()}-text hover:mud-{UnCheckedColor.ToDescription()}-hover", BoolValue == false) .AddClass($"switch-disabled", Disabled) .AddClass($"readonly", ReadOnly) .AddClass($"checked", BoolValue) @@ -30,8 +30,8 @@ public partial class Switch : BooleanInput protected string TrackClassname => new CssBuilder("switch-track") - .AddClass($"{Color.ToDescriptionString()}", BoolValue == true) - .AddClass($"{UnCheckedColor.ToDescriptionString()}", BoolValue == false) + .AddClass($"{Color.ToDescription()}", BoolValue == true) + .AddClass($"{UnCheckedColor.ToDescription()}", BoolValue == false) .Build(); //Excluded because not used diff --git a/src/Connected.Components/Components/Table/TableBase.cs b/src/Connected.Components/Components/Table/TableBase.cs index 8bfce97..984efa7 100644 --- a/src/Connected.Components/Components/Table/TableBase.cs +++ b/src/Connected.Components/Components/Table/TableBase.cs @@ -331,14 +331,14 @@ public abstract class TableBase : UIComponent public string CancelEditTooltip { get; set; } /// - /// Sets the Icon of the CommitEdit Button. + /// Sets the Glyph of the CommitEdit Button. /// [Parameter] [Category(CategoryTypes.Table.Editing)] public string CommitEditIcon { get; set; } = Icons.Material.Filled.Done; /// - /// Sets the Icon of the CancelEdit Button. + /// Sets the Glyph of the CancelEdit Button. /// [Parameter] [Category(CategoryTypes.Table.Editing)] diff --git a/src/Connected.Components/Components/Table/TableSortLabel.razor.cs b/src/Connected.Components/Components/Table/TableSortLabel.razor.cs index d085726..b648ffc 100644 --- a/src/Connected.Components/Components/Table/TableSortLabel.razor.cs +++ b/src/Connected.Components/Components/Table/TableSortLabel.razor.cs @@ -27,7 +27,7 @@ public partial class TableSortLabel<[DynamicallyAccessedMembers(DynamicallyAcces public bool Enabled { get; set; } = true; /// - /// The Icon used to display sortdirection. + /// The Glyph used to display sortdirection. /// [Parameter] public string SortIcon { get; set; } = Icons.Material.Filled.ArrowUpward; diff --git a/src/Connected.Components/Components/Tabs/TabPanel.razor b/src/Connected.Components/Components/Tabs/TabPanel.razor index 299fe63..6451225 100644 --- a/src/Connected.Components/Components/Tabs/TabPanel.razor +++ b/src/Connected.Components/Components/Tabs/TabPanel.razor @@ -34,7 +34,7 @@ else public string Text { get; set; } /// - /// Icon placed before the text if set. + /// Glyph placed before the text if set. /// [Parameter] [Category(CategoryTypes.Tabs.Behavior)] diff --git a/src/Connected.Components/Components/Tabs/Tabs.razor b/src/Connected.Components/Components/Tabs/Tabs.razor index 9c1c317..cbeeb36 100644 --- a/src/Connected.Components/Components/Tabs/Tabs.razor +++ b/src/Connected.Components/Components/Tabs/Tabs.razor @@ -14,7 +14,7 @@ @if (_showScrollButtons) {
- +
}
@@ -52,7 +52,7 @@ @if (_showScrollButtons) {
- +
} @if (HeaderPosition == TabHeaderPosition.After && Header != null) diff --git a/src/Connected.Components/Components/Tabs/Tabs.razor.cs b/src/Connected.Components/Components/Tabs/Tabs.razor.cs index 8082e63..c4c7c82 100644 --- a/src/Connected.Components/Components/Tabs/Tabs.razor.cs +++ b/src/Connected.Components/Components/Tabs/Tabs.razor.cs @@ -77,14 +77,14 @@ public partial class Tabs : UIComponent, IAsyncDisposable public bool HideSlider { get; set; } /// - /// Icon to use for left pagination. + /// Glyph to use for left pagination. /// [Parameter] [Category(CategoryTypes.Tabs.Appearance)] public string PrevIcon { get; set; } = Icons.Filled.ChevronLeft; /// - /// Icon to use for right pagination. + /// Glyph to use for right pagination. /// [Parameter] [Category(CategoryTypes.Tabs.Appearance)] @@ -430,8 +430,8 @@ public partial class Tabs : UIComponent, IAsyncDisposable new CssBuilder("tabs-toolbar") .AddClass($"tabs-rounded", !ApplyEffectsToContainer && Rounded) .AddClass($"tabs-vertical", IsVerticalTabs()) - .AddClass($"tabs-toolbar-{Color.ToDescriptionString()}", Color != ThemeColor.Default) - .AddClass($"tabs-border-{ConvertPosition(Position).ToDescriptionString()}", Border) + .AddClass($"tabs-toolbar-{Color.ToDescription()}", Color != ThemeColor.Default) + .AddClass($"tabs-border-{ConvertPosition(Position).ToDescription()}", Border) .AddClass($"paper-outlined", !ApplyEffectsToContainer && Outlined) .AddClass($"elevation-{Elevation}", !ApplyEffectsToContainer && Elevation != 0) .Build(); @@ -456,7 +456,7 @@ public partial class Tabs : UIComponent, IAsyncDisposable protected string SliderClass => new CssBuilder("tab-slider") - .AddClass($"{SliderColor.ToDescriptionString()}", SliderColor != ThemeColor.Inherit) + .AddClass($"{SliderColor.ToDescription()}", SliderColor != ThemeColor.Inherit) .AddClass($"tab-slider-horizontal", Position is Position.Top or Position.Bottom) .AddClass($"tab-slider-vertical", IsVerticalTabs()) .AddClass($"tab-slider-horizontal-reverse", Position == Position.Bottom) diff --git a/src/Connected.Components/Components/TimePicker/TimePicker.razor.cs b/src/Connected.Components/Components/TimePicker/TimePicker.razor.cs index 63cc467..f231aae 100644 --- a/src/Connected.Components/Components/TimePicker/TimePicker.razor.cs +++ b/src/Connected.Components/Components/TimePicker/TimePicker.razor.cs @@ -301,24 +301,24 @@ public partial class TimePicker : Picker private string GetClockPinColor() { - return $"picker-time-clock-pin mud-{Color.ToDescriptionString()}"; + return $"picker-time-clock-pin mud-{Color.ToDescription()}"; } private string GetClockPointerColor() { if (MouseDown) - return $"picker-time-clock-pointer mud-{Color.ToDescriptionString()}"; + return $"picker-time-clock-pointer mud-{Color.ToDescription()}"; else - return $"picker-time-clock-pointer mud-picker-time-clock-pointer-animation mud-{Color.ToDescriptionString()}"; + return $"picker-time-clock-pointer mud-picker-time-clock-pointer-animation mud-{Color.ToDescription()}"; } private string GetClockPointerThumbColor() { var deg = GetDeg(); if (deg % 30 == 0) - return $"picker-time-clock-pointer-thumb mud-onclock-text mud-onclock-primary mud-{Color.ToDescriptionString()}"; + return $"picker-time-clock-pointer-thumb mud-onclock-text mud-onclock-primary mud-{Color.ToDescription()}"; else - return $"picker-time-clock-pointer-thumb mud-onclock-minute mud-{Color.ToDescriptionString()}-text"; + return $"picker-time-clock-pointer-thumb mud-onclock-minute mud-{Color.ToDescription()}-text"; } private string GetNumberColor(int value) @@ -333,11 +333,11 @@ public partial class TimePicker : Picker h = 12; } if (h == value) - return $"clock-number mud-theme-{Color.ToDescriptionString()}"; + return $"clock-number mud-theme-{Color.ToDescription()}"; } else if (_currentView == OpenTo.Minutes && _timeSet.Minute == value) { - return $"clock-number mud-theme-{Color.ToDescriptionString()}"; + return $"clock-number mud-theme-{Color.ToDescription()}"; } return $"clock-number"; } diff --git a/src/Connected.Components/Components/Timeline/Timeline.razor.cs b/src/Connected.Components/Components/Timeline/Timeline.razor.cs index ea9a295..7904741 100644 --- a/src/Connected.Components/Components/Timeline/Timeline.razor.cs +++ b/src/Connected.Components/Components/Timeline/Timeline.razor.cs @@ -50,10 +50,10 @@ public partial class Timeline : ItemsControlBase protected string Classnames => new CssBuilder("timeline") - .AddClass($"timeline-{TimelineOrientation.ToDescriptionString()}") - .AddClass($"timeline-position-{ConvertTimelinePosition().ToDescriptionString()}") + .AddClass($"timeline-{TimelineOrientation.ToDescription()}") + .AddClass($"timeline-position-{ConvertTimelinePosition().ToDescription()}") .AddClass($"timeline-reverse", Reverse && TimelinePosition == TimelinePosition.Alternate) - .AddClass($"timeline-align-{TimelineAlign.ToDescriptionString()}") + .AddClass($"timeline-align-{TimelineAlign.ToDescription()}") .AddClass($"timeline-modifiers", !DisableModifiers) .AddClass($"timeline-rtl", RightToLeft) .AddClass(AdditionalClassList) diff --git a/src/Connected.Components/Components/Timeline/TimelineItem.razor.cs b/src/Connected.Components/Components/Timeline/TimelineItem.razor.cs index ba4c143..c842ca8 100644 --- a/src/Connected.Components/Components/Timeline/TimelineItem.razor.cs +++ b/src/Connected.Components/Components/Timeline/TimelineItem.razor.cs @@ -14,26 +14,26 @@ public partial class TimelineItem : UIComponent, IDisposable { protected string Classnames => new CssBuilder("timeline-item") - .AddClass($"timeline-item-{TimelineAlign.ToDescriptionString()}") + .AddClass($"timeline-item-{TimelineAlign.ToDescription()}") .AddClass(AdditionalClassList) .Build(); protected string DotClassnames => new CssBuilder("timeline-item-dot") - .AddClass($"timeline-dot-size-{Size.ToDescriptionString()}") + .AddClass($"timeline-dot-size-{Size.ToDescription()}") .AddClass($"elevation-{Elevation.ToString()}") .Build(); protected string DotInnerClassnames => new CssBuilder("timeline-item-dot-inner") .AddClass($"timeline-dot-fill", Variant == Variant.Filled) - .AddClass($"timeline-dot-{Color.ToDescriptionString()}") + .AddClass($"timeline-dot-{Color.ToDescription()}") .Build(); [CascadingParameter] protected internal ItemsControlBase Parent { get; set; } /// - /// Dot Icon + /// Dot Glyph /// [Parameter] [Category(CategoryTypes.Timeline.Dot)] diff --git a/src/Connected.Components/Components/Tooltip/Tooltip.razor.cs b/src/Connected.Components/Components/Tooltip/Tooltip.razor.cs index 38ceb85..7e021cc 100644 --- a/src/Connected.Components/Components/Tooltip/Tooltip.razor.cs +++ b/src/Connected.Components/Components/Tooltip/Tooltip.razor.cs @@ -16,10 +16,10 @@ public partial class Tooltip : UIComponent protected string Classname => new CssBuilder("tooltip") .AddClass($"tooltip-default", Color == ThemeColor.Default) - .AddClass($"tooltip-{ConvertPlacement().ToDescriptionString()}") + .AddClass($"tooltip-{ConvertPlacement().ToDescription()}") .AddClass($"tooltip-arrow", Arrow) - .AddClass($"border-{Color.ToDescriptionString()}", Arrow && Color != ThemeColor.Default) - .AddClass($"theme-{Color.ToDescriptionString()}", Color != ThemeColor.Default) + .AddClass($"border-{Color.ToDescription()}", Arrow && Color != ThemeColor.Default) + .AddClass($"theme-{Color.ToDescription()}", Color != ThemeColor.Default) .AddClass($"d-block", TooltipContent != null) .AddClass($"d-flex", !String.IsNullOrEmpty(Text)) .Build(); diff --git a/src/Connected.Components/Components/TreeView/TreeView.razor.cs b/src/Connected.Components/Components/TreeView/TreeView.razor.cs index 07c8eb6..8473b2b 100644 --- a/src/Connected.Components/Components/TreeView/TreeView.razor.cs +++ b/src/Connected.Components/Components/TreeView/TreeView.razor.cs @@ -16,8 +16,8 @@ public partial class TreeView : UIComponent new CssBuilder("treeview") .AddClass("treeview-dense", Dense) .AddClass("treeview-hover", Hover) - .AddClass($"treeview-selected-{Color.ToDescriptionString()}") - .AddClass($"treeview-checked-{CheckBoxColor.ToDescriptionString()}") + .AddClass($"treeview-selected-{Color.ToDescription()}") + .AddClass($"treeview-checked-{CheckBoxColor.ToDescription()}") .AddClass(AdditionalClassList) .Build(); protected string Stylename => diff --git a/src/Connected.Components/Components/TreeView/TreeViewItem.razor.cs b/src/Connected.Components/Components/TreeView/TreeViewItem.razor.cs index f0c1342..24a4f9a 100644 --- a/src/Connected.Components/Components/TreeView/TreeViewItem.razor.cs +++ b/src/Connected.Components/Components/TreeView/TreeViewItem.razor.cs @@ -184,7 +184,7 @@ public partial class TreeViewItem : UIComponent } /// - /// Icon placed before the text if set. + /// Glyph placed before the text if set. /// [Parameter] [Category(CategoryTypes.TreeView.Behavior)] @@ -198,7 +198,7 @@ public partial class TreeViewItem : UIComponent public ThemeColor IconColor { get; set; } = ThemeColor.Default; /// - /// Icon placed after the text if set. + /// Glyph placed after the text if set. /// [Parameter] [Category(CategoryTypes.TreeView.Behavior)] diff --git a/src/Connected.Components/Components/Typography/TextContent.razor.cs b/src/Connected.Components/Components/Typography/TextContent.razor.cs index 3f854b3..ef9d3b4 100644 --- a/src/Connected.Components/Components/Typography/TextContent.razor.cs +++ b/src/Connected.Components/Components/Typography/TextContent.razor.cs @@ -9,10 +9,10 @@ public partial class TextContent : UIComponent { protected string Classname => new CssBuilder("typography") - .AddClass($"typography-{Typo.ToDescriptionString()}") - .AddClass($"{Color.ToDescriptionString()}-text", Color != ThemeColor.Default && Color != ThemeColor.Inherit) + .AddClass($"typography-{Typo.ToDescription()}") + .AddClass($"{Color.ToDescription()}-text", Color != ThemeColor.Default && Color != ThemeColor.Inherit) .AddClass("typography-gutterbottom", GutterBottom) - .AddClass($"typography-align-{ConvertAlign(Align).ToDescriptionString()}", Align != Align.Inherit) + .AddClass($"typography-align-{ConvertAlign(Align).ToDescription()}", Align != Align.Inherit) .AddClass("typography-display-inline", Inline) .AddClass(AdditionalClassList) .Build(); diff --git a/src/Connected.Components/Extensions/EnumExtensions.cs b/src/Connected.Components/Extensions/EnumExtensions.cs index 40e7b5a..dc37f54 100644 --- a/src/Connected.Components/Extensions/EnumExtensions.cs +++ b/src/Connected.Components/Extensions/EnumExtensions.cs @@ -4,7 +4,7 @@ namespace Connected.Extensions; public static class EnumExtensions { - public static string? ToDescriptionString(this Enum value) + public static string? ToDescription(this Enum value) { if (value is null) return null; diff --git a/src/Connected.Components/Services/Scroll/ScrollManager.cs b/src/Connected.Components/Services/Scroll/ScrollManager.cs index e6fb3c4..2c010ef 100644 --- a/src/Connected.Components/Services/Scroll/ScrollManager.cs +++ b/src/Connected.Components/Services/Scroll/ScrollManager.cs @@ -39,7 +39,7 @@ namespace Connected /// smooth or auto /// public ValueTask ScrollToAsync(string id, int left, int top, ScrollBehavior behavior) => - _jSRuntime.InvokeVoidAsync("scrollManager.scrollTo", id, left, top, behavior.ToDescriptionString()); + _jSRuntime.InvokeVoidAsync("scrollManager.scrollTo", id, left, top, behavior.ToDescription()); /// /// Scrolls the first instance of the selector into view @@ -48,7 +48,7 @@ namespace Connected /// /// public ValueTask ScrollIntoViewAsync(string selector, ScrollBehavior behavior) => - _jSRuntime.InvokeVoidAsync("scrollManager.scrollIntoView", selector, behavior.ToDescriptionString()); + _jSRuntime.InvokeVoidAsync("scrollManager.scrollIntoView", selector, behavior.ToDescription()); /// /// Scrolls to the top of the element @@ -73,7 +73,7 @@ namespace Connected /// smooth or auto /// public ValueTask ScrollToBottomAsync(string id, ScrollBehavior behavior) => - _jSRuntime.InvokeVoidAsync("scrollManager.scrollToBottom", id, behavior.ToDescriptionString()); + _jSRuntime.InvokeVoidAsync("scrollManager.scrollToBottom", id, behavior.ToDescription()); public ValueTask ScrollToYearAsync(string elementId) => _jSRuntime.InvokeVoidAsync("scrollManager.scrollToYear", elementId); diff --git a/src/Connected.Components/Styles/components/_badge.scss b/src/Connected.Components/Styles/components/_badge.scss index 819f074..e89a397 100644 --- a/src/Connected.Components/Styles/components/_badge.scss +++ b/src/Connected.Components/Styles/components/_badge.scss @@ -1,5 +1,4 @@ - -.badge-root { +.badge-root { position: relative; display: inline-block;