Skip to content

Commit

Permalink
feat(components): add XML summaries to all publicly visible members (#…
Browse files Browse the repository at this point in the history
…162)

* chore: .editorconfig

* feat(components): add missing summaries

* refactor(components): adjust LabelPlacement namespace

* refactor(radio): update `Color` param summary to point the correct default value

* test: update `_Imports`
  • Loading branch information
desmondinho authored Jan 31, 2025
1 parent f511176 commit 234ef56
Show file tree
Hide file tree
Showing 61 changed files with 2,400 additions and 1,814 deletions.
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ insert_final_newline = false

#### .NET Code Actions ####

dotnet_diagnostic.IDE0130.severity = silent

# Type members
dotnet_hide_advanced_members = false
dotnet_member_insertion_location = with_other_members_of_the_same_kind
Expand Down Expand Up @@ -217,7 +219,7 @@ dotnet_naming_rule.property_should_be_pascal_case.severity = warning
dotnet_naming_rule.property_should_be_pascal_case.symbols = property
dotnet_naming_rule.property_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.private_or_internal_field_should_be_camel_case_prefixed_with__.severity = warning
dotnet_naming_rule.private_or_internal_field_should_be_camel_case_prefixed_with__.severity = silent
dotnet_naming_rule.private_or_internal_field_should_be_camel_case_prefixed_with__.symbols = private_or_internal_field
dotnet_naming_rule.private_or_internal_field_should_be_camel_case_prefixed_with__.style = camel_case_prefixed_with__

Expand Down
29 changes: 12 additions & 17 deletions src/LumexUI/Common/Attributes/CompositionComponentAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
using System.Diagnostics.CodeAnalysis;
// Copyright (c) LumexUI 2024
// LumexUI licenses this file to you under the MIT license
// See the license here https://github.com/LumexUI/lumexui/blob/main/LICENSE

using System.Diagnostics.CodeAnalysis;

namespace LumexUI.Common;

/// <summary>
/// Specifies that a class is a composition component and defines the type of the aggregator component.
/// Specifies that a class is a composition component and associates it with an aggregator type.
/// </summary>
/// <remarks>
/// This attribute is used to indicate that the decorated class is part of a composition and is aggregated by a specific type.
/// </remarks>
[AttributeUsage( AttributeTargets.Class )]
[ExcludeFromCodeCoverage]
public class CompositionComponentAttribute : Attribute
[AttributeUsage( AttributeTargets.Class )]
public class CompositionComponentAttribute( Type aggregatorType ) : Attribute
{
/// <summary>
/// Gets the type of the aggregator component.
/// </summary>
public Type AggregatorType { get; }

/// <summary>
/// Initializes a new instance of the <see cref="CompositionComponentAttribute"/> class with the specified aggregator type.
/// </summary>
/// <param name="aggregatorType">The type of the aggregator component.</param>
public CompositionComponentAttribute( Type aggregatorType )
{
AggregatorType = aggregatorType;
}
/// <summary>
/// Gets the aggregator type associated with the composition component.
/// </summary>
public Type AggregatorType { get; } = aggregatorType;
}
25 changes: 20 additions & 5 deletions src/LumexUI/Common/Enums/AccordionVariant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,28 @@

namespace LumexUI.Common;

/// <summary>
/// Specifies the visual variants for the <see cref="LumexAccordion"/>.
/// </summary>
public enum AccordionVariant
{
Light,
/// <summary>
/// A variant without any styling.
/// </summary>
Light,

Shadow,
/// <summary>
/// A variant with a shadow effect.
/// </summary>
Shadow,

Bordered,
/// <summary>
/// A variant with a visible border around the accordion.
/// </summary>
Bordered,

Splitted
}
/// <summary>
/// A variant where sections are visually separated.
/// </summary>
Splitted
}
28 changes: 14 additions & 14 deletions src/LumexUI/Common/Enums/Align.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
namespace LumexUI.Common;

/// <summary>
/// Specifies the alignment options.
/// Specifies alignment options of a component.
/// </summary>
public enum Align
{
/// <summary>
/// Aligns the content to the start.
/// </summary>
Start,
/// <summary>
/// Alignment to the start.
/// </summary>
Start,

/// <summary>
/// Aligns the content to the center.
/// </summary>
Center,
/// <summary>
/// Alignment to the center.
/// </summary>
Center,

/// <summary>
/// Aligns the content to the end.
/// </summary>
End
}
/// <summary>
/// Alignment to the end.
/// </summary>
End
}
16 changes: 14 additions & 2 deletions src/LumexUI/Common/Enums/ButtonType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@

namespace LumexUI.Common;

/// <summary>
/// Specifies the type of the <see cref="LumexButton"/>.
/// </summary>
public enum ButtonType
{
/// <summary>
/// A standard button with no default behavior.
/// </summary>
Button,

Submit,
/// <summary>
/// A button that submits form data.
/// </summary>
Submit,

Reset
/// <summary>
/// A button that resets all form fields to their initial values.
/// </summary>
Reset
}
20 changes: 9 additions & 11 deletions src/LumexUI/Common/Enums/InputBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
namespace LumexUI.Common;

/// <summary>
/// Specifies when the input component updates its value and triggers validation.
/// Specifies the behavior of an input field when handling user input.
/// </summary>
public enum InputBehavior
{
/// <summary>
/// Updates the value and triggers validation
/// on each input event (e.g., when the user types in the input field).
/// </summary>
OnInput,
/// <summary>
/// Triggers the input event as the user types.
/// </summary>
OnInput,

/// <summary>
/// Updates the value and triggers validation
/// on change events (e.g., when the input field loses focus or the user presses enter).
/// </summary>
OnChange
/// <summary>
/// Triggers the input event only when the field loses focus or the value changes.
/// </summary>
OnChange
}
96 changes: 48 additions & 48 deletions src/LumexUI/Common/Enums/InputType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,55 @@
namespace LumexUI.Common;

/// <summary>
/// Specifies the different types of input elements.
/// Specifies the type of the <see cref="LumexTextbox"/>.
/// </summary>
public enum InputType
{
/// <summary>
/// A text input field.
/// </summary>
[Description( "text" )]
Text,

/// <summary>
/// A password input field.
/// </summary>
[Description( "password" )]
Password,

/// <summary>
/// An email input field.
/// </summary>
[Description( "email" )]
Email,

/// <summary>
/// A hidden input field.
/// </summary>
[Description( "hidden" )]
Hidden,

/// <summary>
/// A search input field.
/// </summary>
[Description( "search" )]
Search,

/// <summary>
/// A telephone input field.
/// </summary>
[Description( "tel" )]
Telephone,

/// <summary>
/// A URL input field.
/// </summary>
[Description( "url" )]
Url,

/// <summary>
/// A color input field.
/// </summary>
[Description( "color" )]
Color
/// <summary>
/// A single-line text input field.
/// </summary>
[Description( "text" )]
Text,

/// <summary>
/// A password input field that masks the entered characters.
/// </summary>
[Description( "password" )]
Password,

/// <summary>
/// An input field for email addresses with built-in validation.
/// </summary>
[Description( "email" )]
Email,

/// <summary>
/// A hidden input field that is not visible to the user.
/// </summary>
[Description( "hidden" )]
Hidden,

/// <summary>
/// A search input field optimized for search queries.
/// </summary>
[Description( "search" )]
Search,

/// <summary>
/// An input field for telephone numbers.
/// </summary>
[Description( "tel" )]
Telephone,

/// <summary>
/// An input field for entering a URL.
/// </summary>
[Description( "url" )]
Url,

/// <summary>
/// An input field for selecting a color.
/// </summary>
[Description( "color" )]
Color
}
29 changes: 15 additions & 14 deletions src/LumexUI/Common/Enums/InputVariant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@
namespace LumexUI.Common;

/// <summary>
/// Specifies the different variants for an input component.
/// Specifies the visual variants for input field components,
/// such as <see cref="LumexTextbox"/>, <see cref="LumexSelect{TValue}"/>, and others.
/// </summary>
public enum InputVariant
{
/// <summary>
/// A flat variant input.
/// </summary>
Flat,
/// <summary>
/// A variant with a subtle background.
/// </summary>
Flat,

/// <summary>
/// An outlined variant input.
/// </summary>
Outlined,
/// <summary>
/// A variant with an outlined border.
/// </summary>
Outlined,

/// <summary>
/// An underlined variant input.
/// </summary>
Underlined
}
/// <summary>
/// A variant with an underline.
/// </summary>
Underlined
}
25 changes: 15 additions & 10 deletions src/LumexUI/Common/Enums/LabelPlacement.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
namespace LumexUI;
// Copyright (c) LumexUI 2024
// LumexUI licenses this file to you under the MIT license
// See the license here https://github.com/LumexUI/lumexui/blob/main/LICENSE

namespace LumexUI.Common;

/// <summary>
/// Specifies the placement options for the label of an input component.
/// Specifies the placement options for label in input field components,
/// such as <see cref="LumexTextbox"/>, <see cref="LumexSelect{TValue}"/> and others.
/// </summary>
public enum LabelPlacement
{
/// <summary>
/// Places the label inside the input component.
/// </summary>
Inside,
/// <summary>
/// The label is placed inside the input field.
/// </summary>
Inside,

/// <summary>
/// Places the label outside the input component.
/// </summary>
Outside
/// <summary>
/// The label is placed outside the input field.
/// </summary>
Outside
}
Loading

0 comments on commit 234ef56

Please sign in to comment.