From f03c876a7dacfa9a0f631bd7efc7b91ceedf409f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Can=20Karag=C3=B6z?= Date: Tue, 17 Nov 2026 10:43:32 +0300 Subject: [PATCH 1/4] Support .NET 11 & Update 9.14.0 --- ...eam.MudBlazor.Extensions.Benchmarks.csproj | 2 +- ...am.MudBlazor.Extensions.Docs.Server.csproj | 2 +- ...Beam.MudBlazor.Extensions.Docs.Wasm.csproj | 6 +- .../wwwroot/CodeBeam.MudBlazor.Extensions.xml | 220 ++++++++++- .../CodeBeam.MudBlazor.Extensions.Docs.csproj | 6 +- .../Shared/MainLayout.razor | 3 +- .../CodeBeam.MudBlazor.Extensions.Code.csproj | 6 +- ...Beam.MudBlazor.Extensions.CsvMapper.csproj | 4 +- .../CodeBeam.MudBlazor.Extensions.Qr.csproj | 6 +- .../CodeBeam.MudBlazor.Extensions.csproj | 6 +- .../Components/FontPicker/MudFontPicker.razor | 62 ++- .../FontPicker/MudFontPicker.razor.cs | 372 +++++++++++++----- .../Components/Page/MudPage.razor.cs | 9 +- ...dBlazor.Extensions.UnitTests.Viewer.csproj | 6 +- .../SelectExtended/StepperTest1.razor | 6 +- ...Beam.MudBlazor.Extensions.UnitTests.csproj | 4 +- .../Components/RenderTests.cs | 2 +- .../Components/SelectExtendedTests.cs | 10 +- 18 files changed, 571 insertions(+), 161 deletions(-) diff --git a/benchmarks/CodeBeam.MudBlazor.Extensions.Benchmarks/CodeBeam.MudBlazor.Extensions.Benchmarks.csproj b/benchmarks/CodeBeam.MudBlazor.Extensions.Benchmarks/CodeBeam.MudBlazor.Extensions.Benchmarks.csproj index a05ca6ce..1a4b502d 100644 --- a/benchmarks/CodeBeam.MudBlazor.Extensions.Benchmarks/CodeBeam.MudBlazor.Extensions.Benchmarks.csproj +++ b/benchmarks/CodeBeam.MudBlazor.Extensions.Benchmarks/CodeBeam.MudBlazor.Extensions.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 enable enable false diff --git a/docs/CodeBeam.MudBlazor.Extensions.Docs.Server/CodeBeam.MudBlazor.Extensions.Docs.Server.csproj b/docs/CodeBeam.MudBlazor.Extensions.Docs.Server/CodeBeam.MudBlazor.Extensions.Docs.Server.csproj index da9df78f..ba3e67fd 100644 --- a/docs/CodeBeam.MudBlazor.Extensions.Docs.Server/CodeBeam.MudBlazor.Extensions.Docs.Server.csproj +++ b/docs/CodeBeam.MudBlazor.Extensions.Docs.Server/CodeBeam.MudBlazor.Extensions.Docs.Server.csproj @@ -1,7 +1,7 @@  - net10.0 + net11.0 enable enable MudExtensions.Docs.Server diff --git a/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/CodeBeam.MudBlazor.Extensions.Docs.Wasm.csproj b/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/CodeBeam.MudBlazor.Extensions.Docs.Wasm.csproj index 68dc3144..b942c728 100644 --- a/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/CodeBeam.MudBlazor.Extensions.Docs.Wasm.csproj +++ b/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/CodeBeam.MudBlazor.Extensions.Docs.Wasm.csproj @@ -1,15 +1,15 @@  - net10.0 + net11.0 enable enable MudExtensions.Docs.Wasm - - + + diff --git a/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml b/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml index 80e23972..4fa423a1 100644 --- a/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml +++ b/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml @@ -2351,53 +2351,233 @@ - + A font picker based on MudAutocomplete. - Selected font. + The selected font. + + + + + Occurs when the selected font changes. - Fonts will show in popover. Default is Google latin font list. + The available fonts. - The css import url for adding custom fonts. Default is google font url. Ex. 'https://font.something.com' + The root URL used to import fonts. - If true, the input's label and text always use the theme font instead of font picker's value. + Uses the theme font for the input text. - + - Fires on font changed. + The label displayed for the input. - + - Import selected font automatically. + The placeholder text displayed when the input is empty. - - - + - Clears selected font. + Additional CSS classes applied to the autocomplete popover. - - + - + The visual variant of the input. + + + + + The spacing around the input. + + + + + Reduces the vertical spacing of the input when enabled. + + + + + Requires a value to be selected. + + + + + The validation message displayed when a required value is missing. + + + + + Prevents user interaction when enabled. + + + + + Prevents the user from modifying the selected value. + + + + + Expands the input to fill the available width. + + + + + Automatically focuses the input after its initial render. + + + + + Updates the input value immediately as the user types. + + + + + Displays the input underline when enabled. + + + + + Helper text displayed below the input. + + + + + Displays helper text only while the input has focus. + + + + + Displays a character counter when specified. + + + + + The maximum number of characters allowed in the input. + + + + + The maximum number of suggestions displayed in the dropdown. + + + + + The minimum number of characters required before searching. + + + + + The delay, in milliseconds, before searching after the input changes. + + + + + The position of the input adornment. + + + + + The accessible label for the input adornment. + + + + + The color of the input adornment. + + + + + The icon displayed in the input adornment. + + + + + The text displayed in the input adornment. + + + + + The size of the adornment icon. + + + + + Occurs when the input adornment is clicked. + + + + + Selects the current input text when the input is activated. + + + + + Resets the selected value when the input text is cleared. + + + + + Displays a button for clearing the selected value. + + + + + Selects the highlighted suggestion when the Tab key is pressed. + + + + + Performs validation only after the input value has been modified. + + + + + Indicates whether the input is in an error state. + + + + + The ID of the element containing the validation error message. + + + + + The validation error message displayed below the input. + + + + + The origin point used to anchor the autocomplete popover. + + + + + The origin point used to position the autocomplete popover relative to its anchor. + + + + + Returns the CSS import declaration for the specified font. + + + + + Clears the selected font. - - @@ -4104,12 +4284,12 @@ - Number of columns. Default is 4. + Number of columns. Default is 1. - Number of rows. Default is 4. + Number of rows. Default is 1. diff --git a/docs/CodeBeam.MudBlazor.Extensions.Docs/CodeBeam.MudBlazor.Extensions.Docs.csproj b/docs/CodeBeam.MudBlazor.Extensions.Docs/CodeBeam.MudBlazor.Extensions.Docs.csproj index 0eb74754..e9919916 100644 --- a/docs/CodeBeam.MudBlazor.Extensions.Docs/CodeBeam.MudBlazor.Extensions.Docs.csproj +++ b/docs/CodeBeam.MudBlazor.Extensions.Docs/CodeBeam.MudBlazor.Extensions.Docs.csproj @@ -1,7 +1,7 @@  - net10.0 + net11.0 enable enable MudExtensions.Docs @@ -13,8 +13,8 @@ - - + + diff --git a/docs/CodeBeam.MudBlazor.Extensions.Docs/Shared/MainLayout.razor b/docs/CodeBeam.MudBlazor.Extensions.Docs/Shared/MainLayout.razor index 20006ef6..0ed2848c 100644 --- a/docs/CodeBeam.MudBlazor.Extensions.Docs/Shared/MainLayout.razor +++ b/docs/CodeBeam.MudBlazor.Extensions.Docs/Shared/MainLayout.razor @@ -49,7 +49,7 @@ @if (_showFontPicker) {
- +
} @Body @@ -132,7 +132,6 @@ }, } }; - StateHasChanged(); } private void ToggleOpen() diff --git a/src/CodeBeam.MudBlazor.Extensions.Code/CodeBeam.MudBlazor.Extensions.Code.csproj b/src/CodeBeam.MudBlazor.Extensions.Code/CodeBeam.MudBlazor.Extensions.Code.csproj index d20ba647..a5c43d3e 100644 --- a/src/CodeBeam.MudBlazor.Extensions.Code/CodeBeam.MudBlazor.Extensions.Code.csproj +++ b/src/CodeBeam.MudBlazor.Extensions.Code/CodeBeam.MudBlazor.Extensions.Code.csproj @@ -1,11 +1,11 @@  - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 enable enable MIT - 9.1.1 + 9.14.0 CodeBeam.MudBlazor.Extensions.Code CodeBeam CodeBeam @@ -30,7 +30,7 @@ https://www.nuget.org/packages/CodeBeam.MudBlazor.Extensions - + diff --git a/src/CodeBeam.MudBlazor.Extensions.CsvMapper/CodeBeam.MudBlazor.Extensions.CsvMapper.csproj b/src/CodeBeam.MudBlazor.Extensions.CsvMapper/CodeBeam.MudBlazor.Extensions.CsvMapper.csproj index a3cecf88..fab61d81 100644 --- a/src/CodeBeam.MudBlazor.Extensions.CsvMapper/CodeBeam.MudBlazor.Extensions.CsvMapper.csproj +++ b/src/CodeBeam.MudBlazor.Extensions.CsvMapper/CodeBeam.MudBlazor.Extensions.CsvMapper.csproj @@ -1,11 +1,11 @@  - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 enable enable MIT - 9.1.2 + 9.14.0 CodeBeam.MudBlazor.Extensions.Csv CodeBeam CodeBeam diff --git a/src/CodeBeam.MudBlazor.Extensions.Qr/CodeBeam.MudBlazor.Extensions.Qr.csproj b/src/CodeBeam.MudBlazor.Extensions.Qr/CodeBeam.MudBlazor.Extensions.Qr.csproj index 7291cda3..e2d746fc 100644 --- a/src/CodeBeam.MudBlazor.Extensions.Qr/CodeBeam.MudBlazor.Extensions.Qr.csproj +++ b/src/CodeBeam.MudBlazor.Extensions.Qr/CodeBeam.MudBlazor.Extensions.Qr.csproj @@ -1,11 +1,11 @@  - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 enable enable MIT - 9.1.0 + 9.14.0 CodeBeam.MudBlazor.Extensions.Qr CodeBeam CodeBeam @@ -30,7 +30,7 @@ - + diff --git a/src/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj b/src/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj index 57395a84..756c76ed 100644 --- a/src/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj +++ b/src/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj @@ -1,12 +1,12 @@  - net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0;net11.0 enable enable MIT README.md - 9.3.1 + 9.14.0 CodeBeam.MudBlazor.Extensions CodeBeam.MudBlazor.Extensions CodeBeam @@ -41,7 +41,7 @@ - + diff --git a/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor b/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor index b4893ca2..2f5d60c2 100644 --- a/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor +++ b/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor @@ -1,17 +1,59 @@ @namespace MudExtensions -@inherits MudAutocomplete +@inherits MudComponentBase - - - + + + - @context + @font diff --git a/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor.cs b/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor.cs index 9a46dc4a..83cee40d 100644 --- a/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor.cs +++ b/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor.cs @@ -1,97 +1,287 @@ using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Web; using MudBlazor; using MudExtensions.Utilities; -namespace MudExtensions +namespace MudExtensions; + +/// +/// A font picker based on MudAutocomplete. +/// +public partial class MudFontPicker : MudComponentBase { - /// - /// - /// - public partial class MudFontPicker : MudAutocomplete - { - /// - /// Selected font. - /// - [Parameter] - public string? Font { get; set; } - - /// - /// Fonts will show in popover. Default is Google latin font list. - /// - [Parameter] - public List FontCollection { get; set; } = GoogleFonts.FontListLatin; - - /// - /// The css import url for adding custom fonts. Default is google font url. Ex. 'https://font.something.com' - /// - [Parameter] - public string? RootImportUrl { get; set; } - - /// - /// If true, the input's label and text always use the theme font instead of font picker's value. - /// - [Parameter] - public bool StaticInputText { get; set; } - - /// - /// Fires on font changed. - /// - [Parameter] - public EventCallback FontChanged { get; set; } - - /// - /// Import selected font automatically. - /// - /// - /// - public string ImportFontStyleText(string? font) - { - if (!string.IsNullOrEmpty(RootImportUrl)) - { - return $"@import url('{RootImportUrl}{font?.Replace(" ", "+")}')"; - } - else - { - return $"@import url('https://fonts.googleapis.com/css2?family={font?.Replace(" ", "+")}')"; - } - } - - /// - /// Clears selected font. - /// - /// - public async Task ClearFont() - { - Font = null; - await SetFontValue(null); - } - - /// - /// - /// - /// - /// - protected async Task SetFontValue(string? font) - { - if (font == Font) - { - return; - } - - Font = font; - await FontChanged.InvokeAsync(font); - StateHasChanged(); - } - - private async Task?> SearchFonts(string? searchText, CancellationToken cancellationToken) - { - if (FontCollection == null) - { - return null; - } - await Task.Delay(1); - if (string.IsNullOrEmpty(searchText)) return FontCollection; - return FontCollection.Where(c => c.ToLowerInvariant().Trim().StartsWith(searchText.ToLower().Trim())).ToList(); - } - } + /// + /// The selected font. + /// + [Parameter] + public string? Font { get; set; } + + /// + /// Occurs when the selected font changes. + /// + [Parameter] + public EventCallback FontChanged { get; set; } + + /// + /// The available fonts. + /// + [Parameter] + public List FontCollection { get; set; } = GoogleFonts.FontListLatin; + + /// + /// The root URL used to import fonts. + /// + [Parameter] + public string? RootImportUrl { get; set; } + + /// + /// Uses the theme font for the input text. + /// + [Parameter] + public bool StaticInputText { get; set; } + + /// + /// The label displayed for the input. + /// + [Parameter] public string? Label { get; set; } + + /// + /// The placeholder text displayed when the input is empty. + /// + [Parameter] public string? Placeholder { get; set; } + + /// + /// Additional CSS classes applied to the autocomplete popover. + /// + [Parameter] public string? PopoverClass { get; set; } + + /// + /// The visual variant of the input. + /// + [Parameter] public Variant Variant { get; set; } = Variant.Text; + + /// + /// The spacing around the input. + /// + [Parameter] public Margin Margin { get; set; } = Margin.None; + + /// + /// Reduces the vertical spacing of the input when enabled. + /// + [Parameter] public bool Dense { get; set; } + + /// + /// Requires a value to be selected. + /// + [Parameter] public bool Required { get; set; } + + /// + /// The validation message displayed when a required value is missing. + /// + [Parameter] public string RequiredError { get; set; } = "Required"; + + /// + /// Prevents user interaction when enabled. + /// + [Parameter] public bool Disabled { get; set; } + + /// + /// Prevents the user from modifying the selected value. + /// + [Parameter] public bool ReadOnly { get; set; } + + /// + /// Expands the input to fill the available width. + /// + [Parameter] public bool FullWidth { get; set; } + + /// + /// Automatically focuses the input after its initial render. + /// + [Parameter] public bool AutoFocus { get; set; } + + /// + /// Updates the input value immediately as the user types. + /// + [Parameter] public bool Immediate { get; set; } + + /// + /// Displays the input underline when enabled. + /// + [Parameter] public bool Underline { get; set; } = true; + + /// + /// Helper text displayed below the input. + /// + [Parameter] public string? HelperText { get; set; } + + /// + /// Displays helper text only while the input has focus. + /// + [Parameter] public bool HelperTextOnFocus { get; set; } + + /// + /// Displays a character counter when specified. + /// + [Parameter] public int? Counter { get; set; } + + /// + /// The maximum number of characters allowed in the input. + /// + [Parameter] public int MaxLength { get; set; } = 524288; + + /// + /// The maximum number of suggestions displayed in the dropdown. + /// + [Parameter] public int MaxItems { get; set; } = 10; + + /// + /// The minimum number of characters required before searching. + /// + [Parameter] public int MinCharacters { get; set; } + + /// + /// The delay, in milliseconds, before searching after the input changes. + /// + [Parameter] public int DebounceInterval { get; set; } = 100; + + /// + /// The position of the input adornment. + /// + [Parameter] public Adornment Adornment { get; set; } = Adornment.None; + + /// + /// The accessible label for the input adornment. + /// + [Parameter] public string? AdornmentAriaLabel { get; set; } + + /// + /// The color of the input adornment. + /// + [Parameter] public Color AdornmentColor { get; set; } = Color.Default; + + /// + /// The icon displayed in the input adornment. + /// + [Parameter] public string? AdornmentIcon { get; set; } + + /// + /// The text displayed in the input adornment. + /// + [Parameter] public string? AdornmentText { get; set; } + + /// + /// The size of the adornment icon. + /// + [Parameter] public Size IconSize { get; set; } = Size.Medium; + + /// + /// Occurs when the input adornment is clicked. + /// + [Parameter] public EventCallback OnAdornmentClick { get; set; } + + /// + /// Selects the current input text when the input is activated. + /// + [Parameter] public bool SelectOnActivation { get; set; } = true; + + /// + /// Resets the selected value when the input text is cleared. + /// + [Parameter] public bool ResetValueOnEmptyText { get; set; } + + /// + /// Displays a button for clearing the selected value. + /// + [Parameter] public bool Clearable { get; set; } + + /// + /// Selects the highlighted suggestion when the Tab key is pressed. + /// + [Parameter] public bool SelectValueOnTab { get; set; } + + /// + /// Performs validation only after the input value has been modified. + /// + [Parameter] public bool OnlyValidateIfDirty { get; set; } + + /// + /// Indicates whether the input is in an error state. + /// + [Parameter] public bool Error { get; set; } + + /// + /// The ID of the element containing the validation error message. + /// + [Parameter] public string? ErrorId { get; set; } + + /// + /// The validation error message displayed below the input. + /// + [Parameter] public string? ErrorText { get; set; } + + /// + /// The origin point used to anchor the autocomplete popover. + /// + [Parameter] public Origin AnchorOrigin { get; set; } = Origin.BottomCenter; + + /// + /// The origin point used to position the autocomplete popover relative to its anchor. + /// + [Parameter] public Origin TransformOrigin { get; set; } = Origin.TopCenter; + + private string? InputStyle => + StaticInputText || string.IsNullOrWhiteSpace(Font) + ? Style + : $"{Style};font-family:\"{Font}\" !important"; + + /// + /// Returns the CSS import declaration for the specified font. + /// + public string ImportFontStyleText(string? font) + { + var fontName = font?.Replace(" ", "+"); + + var url = string.IsNullOrEmpty(RootImportUrl) + ? $"https://fonts.googleapis.com/css2?family={fontName}" + : $"{RootImportUrl}{fontName}"; + + return $"@import url('{url}')"; + } + + /// + /// Clears the selected font. + /// + public Task ClearFont() + { + return SetFontValue(null); + } + + private async Task SetFontValue(string? font) + { + if (Font == font) + return; + + Font = font; + await FontChanged.InvokeAsync(font); + } + + private Task?> SearchFonts( + string? searchText, + CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + + IEnumerable fonts = FontCollection ?? []; + + if (!string.IsNullOrWhiteSpace(searchText)) + { + fonts = fonts.Where(font => + font.StartsWith( + searchText.Trim(), + StringComparison.OrdinalIgnoreCase)); + } + + return Task.FromResult?>(fonts); + } } diff --git a/src/CodeBeam.MudBlazor.Extensions/Components/Page/MudPage.razor.cs b/src/CodeBeam.MudBlazor.Extensions/Components/Page/MudPage.razor.cs index 7622a5d9..82822e3e 100644 --- a/src/CodeBeam.MudBlazor.Extensions/Components/Page/MudPage.razor.cs +++ b/src/CodeBeam.MudBlazor.Extensions/Components/Page/MudPage.razor.cs @@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Web; using MudBlazor; -using MudBlazor.Extensions; using MudBlazor.Utilities; namespace MudExtensions @@ -43,18 +42,18 @@ public partial class MudPage : MudComponentBase public RenderFragment? ChildContent { get; set; } /// - /// Number of columns. Default is 4. + /// Number of columns. Default is 1. /// [Parameter] [Category(CategoryTypes.Item.Appearance)] - public int Column { get; set; } = 4; + public int Column { get; set; } = 1; /// - /// Number of rows. Default is 4. + /// Number of rows. Default is 1. /// [Parameter] [Category(CategoryTypes.Item.Appearance)] - public int Row { get; set; } = 4; + public int Row { get; set; } = 1; /// /// Determines MudPage's height. diff --git a/tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer.csproj b/tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer.csproj index e78b966f..24307b1a 100644 --- a/tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer.csproj +++ b/tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer.csproj @@ -1,7 +1,7 @@  - net10.0 + net11.0 enable enable MudExtensions.UnitTests.Viewer @@ -12,8 +12,8 @@ - - + + diff --git a/tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/TestComponents/SelectExtended/StepperTest1.razor b/tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/TestComponents/SelectExtended/StepperTest1.razor index 711d459f..48bbdeea 100644 --- a/tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/TestComponents/SelectExtended/StepperTest1.razor +++ b/tests/CodeBeam.MudBlazor.Extensions.UnitTests.Viewer/TestComponents/SelectExtended/StepperTest1.razor @@ -69,7 +69,7 @@ - + @@ -140,7 +140,7 @@ _loading = true; StateHasChanged(); await Task.Delay(1000); - await _form.Validate(); + await _form.ValidateAsync(); _loading = false; StateHasChanged(); return !_form.IsValid; @@ -150,7 +150,7 @@ _loading = true; StateHasChanged(); await Task.Delay(1000); - await _form2.Validate(); + await _form2.ValidateAsync(); _loading = false; StateHasChanged(); return !_form2.IsValid; diff --git a/tests/CodeBeam.MudBlazor.Extensions.UnitTests/CodeBeam.MudBlazor.Extensions.UnitTests.csproj b/tests/CodeBeam.MudBlazor.Extensions.UnitTests/CodeBeam.MudBlazor.Extensions.UnitTests.csproj index 37039fb5..ae11d52f 100644 --- a/tests/CodeBeam.MudBlazor.Extensions.UnitTests/CodeBeam.MudBlazor.Extensions.UnitTests.csproj +++ b/tests/CodeBeam.MudBlazor.Extensions.UnitTests/CodeBeam.MudBlazor.Extensions.UnitTests.csproj @@ -1,7 +1,7 @@  - net10.0 + net11.0 enable enable MudExtensions.UnitTests @@ -12,7 +12,7 @@ - + diff --git a/tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components/RenderTests.cs b/tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components/RenderTests.cs index cca05c05..0bac1b38 100644 --- a/tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components/RenderTests.cs +++ b/tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components/RenderTests.cs @@ -48,7 +48,7 @@ public void Component_Should_Render(Type componentType) catch (Exception ex) { Assert.Fail( - $"Component render FAILED: {componentType.FullName}\n" + + $"Component render FAILED: {componentType.FullName}\n{ex}" + $"Exception: {ex.GetType().Name}\n" + $"Message: {ex.Message}" ); diff --git a/tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components/SelectExtendedTests.cs b/tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components/SelectExtendedTests.cs index 735456cc..70bf4880 100644 --- a/tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components/SelectExtendedTests.cs +++ b/tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components/SelectExtendedTests.cs @@ -379,7 +379,7 @@ public void Select_Should_FireTextChangedWithNewValue() //Console.WriteLine(comp.Markup); var select = comp.FindComponent>(); string? text = null; - select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.TextChanged, (Action)(x => text = x))); + select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.TextChanged, (Action)(x => text = x))); var menu = comp.Find("div.mud-popover"); var input = comp.Find("div.mud-input-control"); // check initial state @@ -425,12 +425,12 @@ public void SingleSelect_Should_FireTextChangedBeforeSelectedValuesChanged() var eventCounter = 0; var textChangedCount = 0; var selectedValuesChangedCount = 0; - select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.TextChanged, (Action)(x => + select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.TextChanged, (Action)(x => { textChangedCount = eventCounter++; text = x; }))); - select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.SelectedValuesChanged, (Action>)(x => + select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.SelectedValuesChanged, (Action?>)(x => { selectedValuesChangedCount = eventCounter++; selectedValues = x; @@ -487,12 +487,12 @@ public void MultiSelect_Should_FireTextChangedBeforeSelectedValuesChanged() var textChangedCount = 0; var selectedValuesChangedCount = 0; select.Render(p => p.Add(x => x.MultiSelection, true)); - select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.TextChanged, (Action)(x => + select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.TextChanged, (Action)(x => { textChangedCount = eventCounter++; text = x; }))); - select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.SelectedValuesChanged, (Action>)(x => + select.SetParametersAndRenderAsync(parameters => parameters.Add(s => s.SelectedValuesChanged, (Action?>)(x => { selectedValuesChangedCount = eventCounter++; selectedValues = x; From ac44a4dbcfc0ee7db52ed5849a84020614c999ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Can=20Karag=C3=B6z?= Date: Tue, 17 Nov 2026 10:50:56 +0300 Subject: [PATCH 2/4] CI Fixes --- .github/workflows/deploy.yml | 2 +- .github/workflows/dotnet.yml | 5 +++-- Dockerfile | 2 +- .../CodeBeam.MudBlazor.Extensions.csproj | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d6e290f1..73dfe620 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 782f843d..dc3795e4 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,14 +13,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: | 8.0.x 9.0.x 10.0.x + 11.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/Dockerfile b/Dockerfile index edaf1a3f..c03a5ba4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /src ENV CI=true diff --git a/src/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj b/src/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj index 756c76ed..9b791c85 100644 --- a/src/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj +++ b/src/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj @@ -44,7 +44,7 @@ - + From a45992cce12048b5f18367aa91b12e87502840ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Can=20Karag=C3=B6z?= Date: Tue, 17 Nov 2026 10:57:56 +0300 Subject: [PATCH 3/4] Fix CI & Complete MudFontPicker Parameters --- .github/workflows/dotnet.yml | 2 +- .../virtualization-benchmark-probe.yml | 6 +- .../wwwroot/CodeBeam.MudBlazor.Extensions.xml | 56 +++++++++++++ .../Components/FontPicker/MudFontPicker.razor | 12 ++- .../FontPicker/MudFontPicker.razor.cs | 84 +++++++++++++++++-- 5 files changed, 150 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index dc3795e4..e040e875 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -27,7 +27,7 @@ jobs: - name: Build run: dotnet build --no-restore - name: Test - run: dotnet test --configuration Release -f net10.0 --collect:"XPlat Code Coverage" + run: dotnet test --configuration Release -f net11.0 --collect:"XPlat Code Coverage" - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 with: diff --git a/.github/workflows/virtualization-benchmark-probe.yml b/.github/workflows/virtualization-benchmark-probe.yml index 5045d38b..1627c2a8 100644 --- a/.github/workflows/virtualization-benchmark-probe.yml +++ b/.github/workflows/virtualization-benchmark-probe.yml @@ -17,15 +17,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: fetch-depth: 0 ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Run upstream-to-PR1 structural probe shell: pwsh diff --git a/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml b/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml index 4fa423a1..de0c2abd 100644 --- a/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml +++ b/docs/CodeBeam.MudBlazor.Extensions.Docs.Wasm/wwwroot/CodeBeam.MudBlazor.Extensions.xml @@ -2569,6 +2569,62 @@ The origin point used to position the autocomplete popover relative to its anchor.
+ + + The model property used for form validation. + + + + + The validation rules applied to the selected font. + + + + + Controls whether the autocomplete selection is restricted to + the available suggestions. + + + + + Opens the suggestions popover when the input receives focus. + + + + + Additional CSS classes applied to the autocomplete's outer container. + + + + + Additional CSS classes applied to the autocomplete input. + + + + + Occurs when the input loses focus. + + + + + Occurs when a key is pressed in the input. + + + + + Occurs when a key is released in the input. + + + + + Sets focus to the font picker input. + + + + + Clears the autocomplete selection and input text. + + Returns the CSS import declaration for the specified font. diff --git a/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor b/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor index 2f5d60c2..e1885fd7 100644 --- a/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor +++ b/src/CodeBeam.MudBlazor.Extensions/Components/FontPicker/MudFontPicker.razor @@ -2,6 +2,7 @@ @inherits MudComponentBase + ReadOnly="@ReadOnly" + For="@For" + Validation="@Validation" + Strict="@Strict" + OpenOnFocus="@OpenOnFocus" + OuterClass="@OuterClass" + InputClass="@InputClass" + OnBlur="@OnBlur" + OnKeyDown="@OnKeyDown" + OnKeyUp="@OnKeyUp">