Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<MudListItemExtended T="int?" Value="1" Text="Trash" />
<MudListItemExtended T="int?" Value="2" Text="Spam" />
<MudDivider />
<MudListItemExtended T="int?" Value="3" Text="Inbox" Icon="@Icons.Filled.Inbox" />
<MudListItemExtended T="int?" Value="4" Text="Sent" Icon="@Icons.Filled.Send" />
<MudListItemExtended T="int?" Value="3" Text="Inbox" Icon="@Icons.Material.Filled.Inbox" />
<MudListItemExtended T="int?" Value="4" Text="Sent" Icon="@Icons.Material.Filled.Send" />
<MudDivider />
<MudListItemExtended T="int?" Value="5" Avatar="@Icons.Filled.Image" IconColor="Color.Primary">Photos</MudListItemExtended>
<MudListItemExtended T="int?" Value="6" Avatar="@Icons.Filled.Work" IconColor="Color.Secondary">Work</MudListItemExtended>
<MudListItemExtended T="int?" Value="5" Avatar="@Icons.Material.Filled.Image" IconColor="Color.Primary">Photos</MudListItemExtended>
<MudListItemExtended T="int?" Value="6" Avatar="@Icons.Material.Filled.Work" IconColor="Color.Secondary">Work</MudListItemExtended>
</MudListExtended>
</MudPaper>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ public void MultiSelect_SelectAll2()

// get the first (select all item) and check if it is indeterminate
var selectAllItem = comp.FindComponent<MudListItemExtended<string>>();
selectAllItem.Instance.Icon.Should().Be(Icons.Filled.IndeterminateCheckBox);
selectAllItem.Instance.Icon.Should().Be(Icons.Material.Filled.IndeterminateCheckBox);

// Check that all normal select items are actually selected
//var items = comp.FindComponents<MudSelectItem<string>>().Where(x=>x.Instance.HideContent==false).ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Task<Guid> SubscribeGlobal<T>(string eventName, int throotleInterval, Fun
public Task<bool> Unsubscribe(Guid key)
{
var result = Callbacks.ContainsKey(key);
if (result == true)
if (result)
{
Callbacks.Remove(key);
ElementIdMapper.Remove(key);
Expand Down
10 changes: 5 additions & 5 deletions CodeBeam.MudExtensions.UnitTests/Mocks/MockResizeObserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void UpdateTotalPanelSize(double newSize)
{
var entry = _cachedValues.Last();

if (IsVertical == false)
if (!IsVertical)
{
entry.Value.Width = newSize;
}
Expand All @@ -57,7 +57,7 @@ public void UpdatePanelSize(int index, double newSize)
{
var entry = _cachedValues.ElementAt(index);

if (IsVertical == false)
if (!IsVertical)
{
entry.Value.Width = newSize;
}
Expand Down Expand Up @@ -85,12 +85,12 @@ public Task<IEnumerable<BoundingClientRect>> Observe(IEnumerable<ElementReferenc
{
var size = PanelSize;
// last element is always TabsContentSize
if (item.Id == elements.Last().Id && _firstBatchProcessed == false)
if (item.Id == elements.Last().Id && !_firstBatchProcessed)
{
size = PanelTotalSize;
}
var rect = new BoundingClientRect { Width = size };
if (IsVertical == true)
if (IsVertical)
{
rect = new BoundingClientRect { Height = size };
}
Expand All @@ -115,7 +115,7 @@ public ValueTask DisposeAsync()

public BoundingClientRect GetSizeInfo(ElementReference reference)
{
if (_cachedValues.ContainsKey(reference) == false)
if (!_cachedValues.ContainsKey(reference))
{
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@
}
@if (!_importedComplete)
{
<MudButton Class="my-2" Color="Color.Primary" StartIcon="@Icons.Filled.CloudDownload" Variant="Variant.Filled" OnClick="@OnImport" Disabled="!_valid">@LocalizedStrings.Import</MudButton>
<MudButton Class="my-2" Color="Color.Primary" StartIcon="@Icons.Material.Filled.CloudDownload" Variant="Variant.Filled" OnClick="@OnImport" Disabled="!_valid">@LocalizedStrings.Import</MudButton>
}
else
{
<MudButton Class="my-2" Color="Color.Secondary" StartIcon="@Icons.Filled.RestartAlt" Variant="Variant.Filled" OnClick="@ReloadPage" Disabled="!_valid">Reset</MudButton>
<MudButton Class="my-2" Color="Color.Secondary" StartIcon="@Icons.Material.Filled.RestartAlt" Variant="Variant.Filled" OnClick="@ReloadPage" Disabled="!_valid">Reset</MudButton>
}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
<div class="d-flex">
@if (SubmitOnClose == false)
{
<MudIconButton Icon="@Icons.Filled.Done" Color="@Color" OnClick="@(() => CloseMenu(true))" />
<MudIconButton Icon="@Icons.Material.Filled.Done" Color="@Color" OnClick="@(() => CloseMenu(true))" />
}
<MudSpacer />
@if (ShowToolbar)
{
<MudIconButton Icon="@Icons.Filled.Sync" Color="@Color" Disabled="@(DateView == DateView.Both)" OnClick="@(() => ToggleDateView())" />
<MudIconButton Icon="@(DateView == DateView.Both ? Icons.Filled.ChevronLeft : Icons.Filled.ChevronRight)" Color="@Color" OnClick="@(() => ExpandDateView())" />
<MudIconButton Icon="@Icons.Material.Filled.Sync" Color="@Color" Disabled="@(DateView == DateView.Both)" OnClick="@(() => ToggleDateView())" />
<MudIconButton Icon="@(DateView == DateView.Both ? Icons.Material.Filled.ChevronLeft : Icons.Material.Filled.ChevronRight)" Color="@Color" OnClick="@(() => ExpandDateView())" />
}
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override void OnInitialized()
Converter = new MudBlazor.Converter<DateTime?, string>()
{
SetFunc = x => x?.ToString(DateFormat),
GetFunc = x => DateTime.TryParseExact(x, DateFormat, null, System.Globalization.DateTimeStyles.None, out dt) == true ? dt : null,
GetFunc = x => DateTime.TryParseExact(x, DateFormat, null, System.Globalization.DateTimeStyles.None, out dt) ? dt : null,
};
}

Expand Down Expand Up @@ -189,7 +189,7 @@ protected override void OnInitialized()
public int MaxHeight { get; set; } = 300;

internal bool _isOpen;
internal string _currentIcon { get; set; } = Icons.Filled.CalendarMonth;
internal string _currentIcon { get; set; } = Icons.Material.Filled.CalendarMonth;

[Parameter]
[Category(CategoryTypes.FormComponent.ListAppearance)]
Expand Down Expand Up @@ -243,7 +243,7 @@ public async Task OpenMenu()
return;
SetWheelValues();
_isOpen = true;
if (Editable == true)
if (Editable)
{
await InputReference.FocusAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected async Task SetAdjacentImage(int count)
return;
}

if (EnableAnimation == true)
if (EnableAnimation)
{
await _animate.Refresh();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static string GetClassname<T>(MudBaseInputExtended<T> baseInput, Func<boo
//.AddClass($"mud-input-adorned-start", baseInput.AdornmentStart != null)
//.AddClass($"mud-input-adorned-end", baseInput.AdornmentEnd != null)
.AddClass($"mud-input-margin-{baseInput.Margin.ToDescriptionString()}", when: () => baseInput.Margin != Margin.None)
.AddClass("mud-input-underline", when: () => baseInput.DisableUnderLine == false && baseInput.Variant != Variant.Outlined)
.AddClass("mud-input-underline", when: () => !baseInput.DisableUnderLine && baseInput.Variant != Variant.Outlined)
.AddClass("mud-shrink", when: shrinkWhen)
.AddClass("mud-disabled", baseInput.Disabled)
.AddClass("mud-input-error", baseInput.HasErrors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ public partial class MudInputExtended<T> : MudBaseInputExtended<T>

protected string ClearButtonClassname =>
new CssBuilder()
.AddClass("me-n1", Adornment == Adornment.End && HideSpinButtons == false)
.AddClass("mud-icon-button-edge-end", Adornment == Adornment.End && HideSpinButtons == true)
.AddClass("me-6", Adornment != Adornment.End && HideSpinButtons == false)
.AddClass("mud-icon-button-edge-margin-end", Adornment != Adornment.End && HideSpinButtons == true)
.AddClass("me-n1", Adornment == Adornment.End && !HideSpinButtons)
.AddClass("mud-icon-button-edge-end", Adornment == Adornment.End && HideSpinButtons)
.AddClass("me-6", Adornment != Adornment.End && !HideSpinButtons)
.AddClass("mud-icon-button-edge-margin-end", Adornment != Adornment.End && HideSpinButtons)
.Build();

protected override async Task OnAfterRenderAsync(bool firstRender)
{
await base.OnAfterRenderAsync(firstRender);
if (firstRender)
{
if (AutoSize == true)
if (AutoSize)
{
await JSRuntime.InvokeVoidAsync("auto_size", ElementReference);
StateHasChanged();
Expand Down
Loading