+
@ChildContent
}
diff --git a/src/MudBlazor/Components/Tabs/MudTabPanel.razor.cs b/src/MudBlazor/Components/Tabs/MudTabPanel.razor.cs
index ec74173261f9..b88130a57a9e 100644
--- a/src/MudBlazor/Components/Tabs/MudTabPanel.razor.cs
+++ b/src/MudBlazor/Components/Tabs/MudTabPanel.razor.cs
@@ -4,6 +4,7 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
+using MudBlazor.Utilities;
namespace MudBlazor;
@@ -16,6 +17,18 @@ public partial class MudTabPanel
{
private Boolean _disposed;
+ protected string Stylename =>
+ new StyleBuilder()
+ .AddStyle("display", Parent?.ActivePanel == this ? "contents" : "none", Parent?.KeepPanelsAlive == true)
+ .AddStyle(Style)
+ .Build();
+
+ internal string Classname =>
+ new CssBuilder("mud-tab-panel")
+ .AddClass("mud-tab-panel-hidden", !Visible)
+ .AddClass(Class)
+ .Build();
+
[CascadingParameter]
private MudTabs? Parent { get; set; }
@@ -64,6 +77,16 @@ public partial class MudTabPanel
[Category(CategoryTypes.Tabs.Behavior)]
public bool Disabled { get; set; }
+ ///
+ /// Shows the tab.
+ ///
+ ///
+ /// Defaults to true.
+ ///
+ [Parameter]
+ [Category(CategoryTypes.FormComponent.Behavior)]
+ public bool Visible { get; set; } = true;
+
///
/// For dynamic tabs, shows a "Close" icon for this tab.
///
diff --git a/src/MudBlazor/Components/Tabs/MudTabs.razor.cs b/src/MudBlazor/Components/Tabs/MudTabs.razor.cs
index b8cf22aaf4a2..942d398014d5 100644
--- a/src/MudBlazor/Components/Tabs/MudTabs.razor.cs
+++ b/src/MudBlazor/Components/Tabs/MudTabs.razor.cs
@@ -571,7 +571,7 @@ public void ActivatePanel(object id, bool ignoreDisabledState = false)
private async void ActivatePanel(MudTabPanel panel, MouseEventArgs? ev, bool ignoreDisabledState = false)
{
- if (!panel.Disabled || ignoreDisabledState)
+ if ((panel.Visible && !panel.Disabled) || ignoreDisabledState)
{
var index = _panels.IndexOf(panel);
var previewArgs = new TabInteractionEventArgs
@@ -700,7 +700,7 @@ string GetTabClass(MudTabPanel panel)
.AddClass($"mud-ripple", Ripple)
.AddClass(ActiveTabClass, when: () => panel == ActivePanel)
.AddClass(TabPanelClass)
- .AddClass(panel.Class)
+ .AddClass(panel.Classname)
.Build();
return tabClass;
diff --git a/src/MudBlazor/Services/Browser/BrowserViewportService.cs b/src/MudBlazor/Services/Browser/BrowserViewportService.cs
index 05044040c81f..cbb4c1510d90 100644
--- a/src/MudBlazor/Services/Browser/BrowserViewportService.cs
+++ b/src/MudBlazor/Services/Browser/BrowserViewportService.cs
@@ -101,7 +101,7 @@ public async Task SubscribeAsync(IBrowserViewportObserver observer, bool fireImm
optionsClone.BreakpointDefinitions = BreakpointGlobalOptions.GetDefaultOrUserDefinedBreakpointDefinition(optionsClone, ResizeOptions);
var subscription = await CreateJavaScriptListener(optionsClone, observer.Id);
- if (_observerManager.Observers.ContainsKey(subscription))
+ if (_observerManager.IsSubscribed(subscription))
{
// Only re-subscribe
_observerManager.Subscribe(subscription, observer);
@@ -271,9 +271,8 @@ public async ValueTask DisposeAsync()
internal BrowserViewportSubscription? GetInternalSubscription(Guid observerId)
{
var subscription = _observerManager
- .Observers
- .Select(x => x.Key)
- .FirstOrDefault(x => x.ObserverId == observerId);
+ .FindObserverIdentities((key, _) => key.ObserverId == observerId)
+ .FirstOrDefault();
return subscription;
}
@@ -284,9 +283,8 @@ private async Task
CreateJavaScriptListener(ResizeO
{
// We check if we have an observer with equals options or same observer id
var javaScriptListenerId = _observerManager
- .Observers
- .Where(x => clonedOptions.Equals(x.Key.Options ?? clonedOptions) || x.Key.ObserverId == observerId)
- .Select(x => x.Key.JavaScriptListenerId)
+ .FindObserverIdentities((key, _) => clonedOptions.Equals(key.Options ?? clonedOptions) || key.ObserverId == observerId)
+ .Select(x => x.JavaScriptListenerId)
.FirstOrDefault();
// This implementation serves as an optimization to avoid creating a new JavaScript "listener" each time a subscription occurs.
@@ -316,7 +314,7 @@ private async Task CreateJavaScriptListener(ResizeO
return null;
}
- var observersWithSameJsListenerIdCount = _observerManager.Observers.Keys.Count(x => x.JavaScriptListenerId == subscription.JavaScriptListenerId);
+ var observersWithSameJsListenerIdCount = _observerManager.FindObserverIdentities((key, _) => key.JavaScriptListenerId == subscription.JavaScriptListenerId).Count();
if (observersWithSameJsListenerIdCount == 1)
{
diff --git a/src/MudBlazor/Services/KeyInterceptor/KeyInterceptorService.cs b/src/MudBlazor/Services/KeyInterceptor/KeyInterceptorService.cs
index 93e5ae001f68..0308e12b124e 100644
--- a/src/MudBlazor/Services/KeyInterceptor/KeyInterceptorService.cs
+++ b/src/MudBlazor/Services/KeyInterceptor/KeyInterceptorService.cs
@@ -54,7 +54,7 @@ public async Task SubscribeAsync(IKeyInterceptorObserver observer, KeyIntercepto
return;
}
- if (!_observerManager.Observers.ContainsKey(observer.ElementId))
+ if (!_observerManager.IsSubscribed(observer.ElementId))
{
var isConnected = await _keyInterceptorInterop.Connect(_dotNetReferenceLazy.Value, observer.ElementId, options);
if (isConnected)
@@ -158,9 +158,9 @@ public async ValueTask DisposeAsync()
_dotNetReferenceLazy.Value.Dispose();
}
- foreach (var elementId in _observerManager.Observers.Keys)
+ foreach (var observer in _observerManager)
{
- await _keyInterceptorInterop.Disconnect(elementId);
+ await _keyInterceptorInterop.Disconnect(observer.ElementId);
}
_observerManager.Clear();
diff --git a/src/MudBlazor/Styles/components/_badge.scss b/src/MudBlazor/Styles/components/_badge.scss
index 97776d1f14d1..bce4430f6dda 100644
--- a/src/MudBlazor/Styles/components/_badge.scss
+++ b/src/MudBlazor/Styles/components/_badge.scss
@@ -156,9 +156,6 @@
}
}
- &.center {
- }
-
&.right {
left: calc(100% - 4px);
diff --git a/src/MudBlazor/Styles/components/_button.scss b/src/MudBlazor/Styles/components/_button.scss
index 3f0d81ec0849..82123377fa01 100644
--- a/src/MudBlazor/Styles/components/_button.scss
+++ b/src/MudBlazor/Styles/components/_button.scss
@@ -57,13 +57,6 @@
}
}
-.mud-button-label {
- width: 100%;
- display: inherit;
- align-items: inherit;
- justify-content: inherit;
-}
-
.mud-button-text {
padding: 6px 8px;
@@ -271,6 +264,11 @@
}
.mud-button-label {
+ width: 100%;
+ display: inherit;
+ align-items: inherit;
+ justify-content: inherit;
+
.mud-button-icon-start {
display: inherit;
margin-left: -4px;
diff --git a/src/MudBlazor/Styles/components/_buttongroup.scss b/src/MudBlazor/Styles/components/_buttongroup.scss
index cd3048b4d55e..63ff7e63aeec 100644
--- a/src/MudBlazor/Styles/components/_buttongroup.scss
+++ b/src/MudBlazor/Styles/components/_buttongroup.scss
@@ -30,6 +30,97 @@
}
}
}
+
+ &.mud-button-group-text-size-small .mud-button-root {
+ padding: 4px 5px;
+ font-size: 0.8125rem;
+
+ &.mud-icon-button .mud-icon-root {
+ font-size: 1.422rem;
+ }
+ }
+
+ &.mud-button-group-text-size-large .mud-button-root {
+ padding: 8px 11px;
+ font-size: 0.9375rem;
+
+ &.mud-icon-button .mud-icon-root {
+ font-size: 1.641rem;
+ }
+ }
+
+ &.mud-button-group-outlined-size-small .mud-button-root {
+ padding: 3px 9px;
+ font-size: 0.8125rem;
+
+ &.mud-icon-button {
+ padding: 3px 9px;
+
+ .mud-icon-root {
+ font-size: 1.422rem;
+ }
+ }
+ }
+
+ &.mud-button-group-outlined-size-large .mud-button-root {
+ padding: 7px 21px;
+ font-size: 0.9375rem;
+
+ &.mud-icon-button {
+ padding: 7px 15px;
+
+ .mud-icon-root {
+ font-size: 1.641rem;
+ }
+ }
+ }
+
+ &.mud-button-group-filled-size-small .mud-button-root {
+ padding: 4px 10px;
+ font-size: 0.8125rem;
+
+ &.mud-icon-button {
+ padding: 4px 10px;
+
+ .mud-icon-root {
+ font-size: 1.422rem;
+ }
+ }
+ }
+
+ &.mud-button-group-filled-size-large .mud-button-root {
+ padding: 8px 22px;
+ font-size: 0.9375rem;
+
+ &.mud-icon-button {
+ padding: 8px 16px;
+
+ .mud-icon-root {
+ font-size: 1.641rem;
+ }
+ }
+ }
+
+ .mud-button-root.mud-icon-button {
+ padding-right: 12px;
+ padding-left: 12px;
+
+ .mud-icon-root {
+ font-size: 1.516rem;
+ }
+
+ &.mud-ripple-icon {
+ &:after {
+ transform: scale(10,10);
+ }
+
+ &:active:after {
+ transform: scale(0,0);
+ opacity: 0.1;
+ transition: 0s;
+ }
+ }
+ }
}
.mud-button-group-horizontal {
@@ -262,98 +353,3 @@
.mud-button-group-disable-elevation {
box-shadow: none;
}
-
-.mud-button-group-root {
- &.mud-button-group-text-size-small .mud-button-root {
- padding: 4px 5px;
- font-size: 0.8125rem;
-
- &.mud-icon-button .mud-icon-root {
- font-size: 1.422rem;
- }
- }
-
- &.mud-button-group-text-size-large .mud-button-root {
- padding: 8px 11px;
- font-size: 0.9375rem;
-
- &.mud-icon-button .mud-icon-root {
- font-size: 1.641rem;
- }
- }
-
- &.mud-button-group-outlined-size-small .mud-button-root {
- padding: 3px 9px;
- font-size: 0.8125rem;
-
- &.mud-icon-button {
- padding: 3px 9px;
-
- .mud-icon-root {
- font-size: 1.422rem;
- }
- }
- }
-
- &.mud-button-group-outlined-size-large .mud-button-root {
- padding: 7px 21px;
- font-size: 0.9375rem;
-
- &.mud-icon-button {
- padding: 7px 15px;
-
- .mud-icon-root {
- font-size: 1.641rem;
- }
- }
- }
-
- &.mud-button-group-filled-size-small .mud-button-root {
- padding: 4px 10px;
- font-size: 0.8125rem;
-
- &.mud-icon-button {
- padding: 4px 10px;
-
- .mud-icon-root {
- font-size: 1.422rem;
- }
- }
- }
-
- &.mud-button-group-filled-size-large .mud-button-root {
- padding: 8px 22px;
- font-size: 0.9375rem;
-
- &.mud-icon-button {
- padding: 8px 16px;
-
- .mud-icon-root {
- font-size: 1.641rem;
- }
- }
- }
-}
-
-.mud-button-group-root {
- .mud-button-root.mud-icon-button {
- padding-right: 12px;
- padding-left: 12px;
-
- .mud-icon-root {
- font-size: 1.516rem;
- }
-
- &.mud-ripple-icon {
- &:after {
- transform: scale(10,10);
- }
-
- &:active:after {
- transform: scale(0,0);
- opacity: 0.1;
- transition: 0s;
- }
- }
- }
-}
diff --git a/src/MudBlazor/Styles/components/_datagrid.scss b/src/MudBlazor/Styles/components/_datagrid.scss
index 731c7a3b1fca..f5f39ad385e4 100644
--- a/src/MudBlazor/Styles/components/_datagrid.scss
+++ b/src/MudBlazor/Styles/components/_datagrid.scss
@@ -21,8 +21,6 @@
.mud-table-cell {
&.edit-mode-cell {
- //padding: 0 !important;
-
.mud-input-control {
margin: 0 !important;
}
@@ -104,7 +102,6 @@
.sort-direction-icon {
font-size: 18px;
margin-left: 4px;
- margin-left: 4px;
margin-inline-start: 4px;
margin-inline-end: unset;
user-select: none;
@@ -127,9 +124,7 @@
}
.column-options .mud-menu .mud-icon-button-label {
- /*font-size: 18px;*/
user-select: none;
- /*margin-right: 4px;*/
transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
opacity: 0;
}
@@ -179,7 +174,6 @@
.sort-direction-icon {
font-size: 18px;
margin-left: 4px;
- margin-left: 4px;
margin-inline-start: 4px;
margin-inline-end: unset;
user-select: none;
diff --git a/src/MudBlazor/Styles/components/_input.scss b/src/MudBlazor/Styles/components/_input.scss
index 749f9807990b..df260c064e05 100644
--- a/src/MudBlazor/Styles/components/_input.scss
+++ b/src/MudBlazor/Styles/components/_input.scss
@@ -149,6 +149,7 @@
box-sizing: border-box;
width: 100%;
max-width: 100%;
+ min-width: 0%;
height: 100%;
text-align: start;
pointer-events: none;
@@ -359,7 +360,6 @@
box-sizing: content-box;
letter-spacing: inherit;
-webkit-tap-highlight-color: transparent;
- height: auto;
resize: none;
cursor: auto;
@@ -501,16 +501,14 @@
white-space: nowrap;
}
-.mud-input-adornment-start {
- &.mud-input-root-filled-shrink {
- margin-top: 16px;
- }
-}
-
.mud-input-adornment-start {
margin-right: 8px;
margin-inline-end: 8px;
margin-inline-start: unset;
+
+ &.mud-input-root-filled-shrink {
+ margin-top: 16px;
+ }
}
.mud-input-adornment-end {
diff --git a/src/MudBlazor/Styles/components/_inputcontrol.scss b/src/MudBlazor/Styles/components/_inputcontrol.scss
index 0159a7fe79f9..27a412e2aa8f 100644
--- a/src/MudBlazor/Styles/components/_inputcontrol.scss
+++ b/src/MudBlazor/Styles/components/_inputcontrol.scss
@@ -59,16 +59,6 @@
margin-top: 16px;
}
}
-
- &.mud-input.mud-input-filled {
- &.mud-input-filled-with-label {
- }
- }
-
- &.mud-input.mud-input-outlined {
- &.mud-input-outlined-with-label {
- }
- }
}
}
@@ -83,7 +73,7 @@
padding: 0;
font-size: 1rem;
font-weight: 400;
- line-height: 1;
+ line-height: 1.15rem;
letter-spacing: 0.00938em;
z-index: 0;
pointer-events: none;
@@ -158,14 +148,18 @@
bottom: 0;
& button {
- padding: 2px;
+ padding: 2px 0;
min-width: unset;
min-height: unset;
}
}
+ }
- .mud-input-numeric-spin button {
- padding: 2px 0;
+ &:focus-within, &.mud-input-error {
+ .mud-input-helper-text {
+ &.mud-input-helper-onfocus {
+ transform: translateY(0);
+ }
}
}
}
@@ -190,16 +184,6 @@
}
}
-.mud-input-control {
- &:focus-within, &.mud-input-error {
- .mud-input-helper-text {
- &.mud-input-helper-onfocus {
- transform: translateY(0);
- }
- }
- }
-}
-
.mud-input-helper-text.mud-disabled {
color: var(--mud-palette-text-disabled);
}
diff --git a/src/MudBlazor/Styles/components/_inputlabel.scss b/src/MudBlazor/Styles/components/_inputlabel.scss
index c5d24f961c86..fb3e250f4ede 100644
--- a/src/MudBlazor/Styles/components/_inputlabel.scss
+++ b/src/MudBlazor/Styles/components/_inputlabel.scss
@@ -24,7 +24,7 @@
}
.mud-input-label-animated {
- transition: color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms,transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
+ transition: color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, max-width 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
}
.mud-input-label-filled {
@@ -68,7 +68,7 @@ label.mud-input-label.mud-input-label-inputcontrol {
&.mud-input-label-filled {
transform: translate(12px, 10px) scale(0.75);
- max-width: calc(100% - 12px);
+ max-width: calc((100% - 12px) / 0.75);
&.mud-input-label-margin-dense {
transform: translate(12px, 7px) scale(0.75);
@@ -77,7 +77,7 @@ label.mud-input-label.mud-input-label-inputcontrol {
&.mud-input-label-outlined {
transform: translate(14px, -6px) scale(0.75);
- max-width: calc(100% - 14px);
+ max-width: calc((100% - 14px) / 0.75);
}
}
diff --git a/src/MudBlazor/Styles/components/_markdowncode.scss b/src/MudBlazor/Styles/components/_markdowncode.scss
deleted file mode 100644
index d3a3c571ab95..000000000000
--- a/src/MudBlazor/Styles/components/_markdowncode.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-.mud-markdown {
- margin: 0px;
- padding: 15px;
- border-radius: var(--mud-default-borderradius);
- background-color: var(--mud-palette-dark);
- margin-bottom: 1.5rem;
-
- & .mud-markdown-pre {
- white-space: normal;
- }
-
- & .mud-markdown-code {
- color: #fff;
- font-size: 1em;
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
- }
-}
-
-.mud-markdown .mud-markdown-pre .mud-markdown-code {
-
- & mark {
- color: #808078;
- background-color: none;
- }
-
- & mark {
- color: #008080;
- font-weight: bold;
- background-color: none;
- }
-}
-
-.token.attr-value > .punctuation {
- color: #d0d0d0;
-}
diff --git a/src/MudBlazor/Styles/components/_menu.scss b/src/MudBlazor/Styles/components/_menu.scss
index 85c2b51848ab..deb401c043e8 100644
--- a/src/MudBlazor/Styles/components/_menu.scss
+++ b/src/MudBlazor/Styles/components/_menu.scss
@@ -64,9 +64,6 @@
margin: 4px 0;
}
- .mud-menu-submenu-icon {
- }
-
&.mud-menu-item-dense {
padding: 2px 12px;
}
diff --git a/src/MudBlazor/Styles/components/_navmenu.scss b/src/MudBlazor/Styles/components/_navmenu.scss
index b92fefcee592..73a45d1a54bd 100644
--- a/src/MudBlazor/Styles/components/_navmenu.scss
+++ b/src/MudBlazor/Styles/components/_navmenu.scss
@@ -5,6 +5,88 @@
position: relative;
list-style: none;
overscroll-behavior-y: contain;
+
+ &.mud-navmenu-dense {
+ .mud-nav-link {
+ padding: 4px 16px 4px 16px;
+ }
+ }
+
+ &.mud-navmenu-margin-dense {
+ .mud-nav-link {
+ margin: 2px 0;
+ }
+ }
+
+ &.mud-navmenu-margin-normal {
+ .mud-nav-link {
+ margin: 4px 0;
+ }
+ }
+
+ &.mud-navmenu-rounded {
+ .mud-nav-link {
+ border-radius: var(--mud-default-borderradius);
+ }
+ }
+
+ &.mud-navmenu-bordered {
+ .mud-nav-link {
+ &.active:not(.mud-nav-link-disabled) {
+ border-inline-end-style: solid;
+ border-inline-end-width: 2px;
+ }
+ }
+ }
+
+ &.mud-navmenu-default {
+ .mud-nav-link.active:not(.mud-nav-link-disabled) {
+ color: var(--mud-palette-primary);
+ background-color: var(--mud-palette-action-default-hover);
+
+ @media(hover: hover) and (pointer: fine) {
+ &:hover:not(.mud-nav-link-disabled) {
+ background-color: var(--mud-palette-action-default-hover);
+ }
+ }
+
+ &:focus-visible:not(.mud-nav-link-disabled), &:active:not(.mud-nav-link-disabled) {
+ background-color: var(--mud-palette-action-default-hover);
+ }
+ }
+
+ .mud-nav-link-expand-icon.mud-transform {
+ fill: var(--mud-palette-primary);
+ }
+ }
+
+ @each $color in $mud-palette-colors {
+ &.mud-navmenu-#{$color} {
+ .mud-nav-link.active:not(.mud-nav-link-disabled) {
+ color: var(--mud-palette-#{$color});
+ --mud-ripple-color: var(--mud-palette-#{$color});
+ background-color: var(--mud-palette-#{$color}-hover);
+
+ @media(hover: hover) and (pointer: fine) {
+ &:hover:not(.mud-nav-link-disabled) {
+ background-color: rgba(var(--mud-palette-#{$color}-rgb), 0.12);
+ }
+ }
+
+ &:focus-visible:not(.mud-nav-link-disabled), &:active:not(.mud-nav-link-disabled) {
+ background-color: rgba(var(--mud-palette-#{$color}-rgb), 0.12);
+ }
+
+ .mud-nav-link-icon {
+ color: var(--mud-palette-#{$color});
+ }
+ }
+
+ .mud-nav-link-expand-icon.mud-transform {
+ fill: var(--mud-palette-#{$color});
+ }
+ }
+ }
}
.mud-nav-group {
@@ -20,9 +102,7 @@
& > .mud-nav-link > .mud-nav-link-text {
font-weight: 400;
}
- }
- & * .mud-nav-group {
& > .mud-nav-link.mud-expanded > .mud-nav-link-text {
font-weight: 500;
}
@@ -57,7 +137,6 @@
color: inherit;
line-height: 1.75;
display: inline-flex;
- align-items: center;
justify-content: flex-start;
text-transform: inherit;
background-color: transparent;
@@ -117,91 +196,6 @@
}
}
-.mud-navmenu {
-
- &.mud-navmenu-dense {
- .mud-nav-link {
- padding: 4px 16px 4px 16px;
- }
- }
-
- &.mud-navmenu-margin-dense {
- .mud-nav-link {
- margin: 2px 0;
- }
- }
-
- &.mud-navmenu-margin-normal {
- .mud-nav-link {
- margin: 4px 0;
- }
- }
-
- &.mud-navmenu-rounded {
- .mud-nav-link {
- border-radius: var(--mud-default-borderradius);
- }
- }
-
- &.mud-navmenu-bordered {
- .mud-nav-link {
- &.active:not(.mud-nav-link-disabled) {
- border-inline-end-style: solid;
- border-inline-end-width: 2px;
- }
- }
- }
-
- &.mud-navmenu-default {
- .mud-nav-link.active:not(.mud-nav-link-disabled) {
- color: var(--mud-palette-primary);
- background-color: var(--mud-palette-action-default-hover);
-
- @media(hover: hover) and (pointer: fine) {
- &:hover:not(.mud-nav-link-disabled) {
- background-color: var(--mud-palette-action-default-hover);
- }
- }
-
- &:focus-visible:not(.mud-nav-link-disabled), &:active:not(.mud-nav-link-disabled) {
- background-color: var(--mud-palette-action-default-hover);
- }
- }
-
- .mud-nav-link-expand-icon.mud-transform {
- fill: var(--mud-palette-primary);
- }
- }
-
- @each $color in $mud-palette-colors {
- &.mud-navmenu-#{$color} {
- .mud-nav-link.active:not(.mud-nav-link-disabled) {
- color: var(--mud-palette-#{$color});
- --mud-ripple-color: var(--mud-palette-#{$color});
- background-color: var(--mud-palette-#{$color}-hover);
-
- @media(hover: hover) and (pointer: fine) {
- &:hover:not(.mud-nav-link-disabled) {
- background-color: rgba(var(--mud-palette-#{$color}-rgb), 0.12);
- }
- }
-
- &:focus-visible:not(.mud-nav-link-disabled), &:active:not(.mud-nav-link-disabled) {
- background-color: rgba(var(--mud-palette-#{$color}-rgb), 0.12);
- }
-
- .mud-nav-link-icon {
- color: var(--mud-palette-#{$color});
- }
- }
-
- .mud-nav-link-expand-icon.mud-transform {
- fill: var(--mud-palette-#{$color});
- }
- }
- }
-}
-
.mud-nav-group * .mud-navmenu > .mud-nav-group {
& .mud-nav-link {
padding-left: 36px;
diff --git a/src/MudBlazor/Styles/components/_picker.scss b/src/MudBlazor/Styles/components/_picker.scss
index 2e7d514f4ed9..a08aa6f257e5 100644
--- a/src/MudBlazor/Styles/components/_picker.scss
+++ b/src/MudBlazor/Styles/components/_picker.scss
@@ -95,7 +95,6 @@
.mud-picker-content {
display: flex;
- //max-width: 325px;
max-width: 100%;
min-width: 310px;
min-height: 305px;
diff --git a/src/MudBlazor/Styles/components/_pickercolor.scss b/src/MudBlazor/Styles/components/_pickercolor.scss
index b31decfe4e96..a9cdca2b6fd0 100644
--- a/src/MudBlazor/Styles/components/_pickercolor.scss
+++ b/src/MudBlazor/Styles/components/_pickercolor.scss
@@ -51,6 +51,19 @@
/*Let the overlay handle the clicks*/
pointer-events: none;
}
+
+ .mud-picker-color-grid {
+ display: flex;
+ flex-wrap: wrap;
+
+ .mud-picker-color-dot {
+ height: 25px;
+ min-width: 26px;
+ max-width: 26px;
+ border-radius: 0px;
+ box-shadow: none;
+ }
+ }
}
.mud-picker-color-controls {
@@ -232,18 +245,3 @@
}
}
}
-
-.mud-picker-color-picker {
- .mud-picker-color-grid {
- display: flex;
- flex-wrap: wrap;
-
- .mud-picker-color-dot {
- height: 25px;
- min-width: 26px;
- max-width: 26px;
- border-radius: 0px;
- box-shadow: none;
- }
- }
-}
diff --git a/src/MudBlazor/Styles/components/_pickerdate.scss b/src/MudBlazor/Styles/components/_pickerdate.scss
index c17063f8709a..12b4e2035885 100644
--- a/src/MudBlazor/Styles/components/_pickerdate.scss
+++ b/src/MudBlazor/Styles/components/_pickerdate.scss
@@ -122,7 +122,6 @@
height: 60px;
display: flex;
outline: none;
- transition: font-size 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
align-items: center;
justify-content: center;
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
diff --git a/src/MudBlazor/Styles/components/_popover.scss b/src/MudBlazor/Styles/components/_popover.scss
index e69c79930550..8ddd8aa6b43e 100644
--- a/src/MudBlazor/Styles/components/_popover.scss
+++ b/src/MudBlazor/Styles/components/_popover.scss
@@ -22,6 +22,11 @@
transition-duration: 0ms !important;
transition-delay: 0ms !important;
}
+
+ .mud-list {
+ max-height: inherit;
+ overflow-y: auto;
+ }
}
.mud-popover .mud-popover {
@@ -58,12 +63,4 @@
.mud-popover-cascading-value {
z-index: calc(var(--mud-zindex-select) + 5);
}
-
-}
-
-.mud-popover {
- .mud-list {
- max-height: inherit;
- overflow-y: auto;
- }
}
diff --git a/src/MudBlazor/Styles/components/_simpletable.scss b/src/MudBlazor/Styles/components/_simpletable.scss
index 0254203c06ab..185ce30de7f6 100644
--- a/src/MudBlazor/Styles/components/_simpletable.scss
+++ b/src/MudBlazor/Styles/components/_simpletable.scss
@@ -13,6 +13,12 @@
tbody {
display: table-row-group;
+
+ tr:last-child {
+ td {
+ border-bottom: none;
+ }
+ }
}
* tr {
@@ -38,14 +44,6 @@
line-height: 1.5rem;
}
}
-
- tbody {
- tr:last-child {
- td {
- border-bottom: none;
- }
- }
- }
}
}
diff --git a/src/MudBlazor/Styles/components/_table.scss b/src/MudBlazor/Styles/components/_table.scss
index c6bf64e3f9d0..1ba5f58d0704 100644
--- a/src/MudBlazor/Styles/components/_table.scss
+++ b/src/MudBlazor/Styles/components/_table.scss
@@ -33,7 +33,15 @@
line-height: 1.5rem;
& .mud-button-root {
- user-select: auto;
+ @media(hover: hover) and (pointer: fine) {
+ &:hover {
+ color: var(--mud-palette-action-default);
+
+ .mud-table-sort-label-icon {
+ opacity: 0.8;
+ }
+ }
+ }
}
}
}
@@ -57,22 +65,12 @@
}
.mud-table-sort-label {
- cursor: pointer;
+ user-select: auto;
display: inline-flex;
align-items: center;
flex-direction: inherit;
justify-content: flex-start;
- @media(hover: hover) and (pointer: fine) {
- &:hover {
- color: var(--mud-palette-action-default);
-
- .mud-table-sort-label-icon {
- opacity: 0.8;
- }
- }
- }
-
.mud-table-sort-label-icon {
font-size: 18px;
transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,transform 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
@@ -122,6 +120,26 @@
padding: 4px;
}
}
+
+ & > .mud-input-control {
+ & > div.mud-input.mud-input-text {
+ color: var(--mud-theme-on-surface);
+ font-size: 0.875rem;
+ margin-top: -14px;
+ margin-bottom: -8px;
+ }
+ }
+
+ & > .mud-select {
+ & > .mud-input-control {
+ & > div.mud-input.mud-input-text {
+ color: var(--mud-theme-on-surface);
+ font-size: 0.875rem;
+ margin-top: -14px;
+ margin-bottom: -8px;
+ }
+ }
+ }
}
.mud-table-cell-footer {
@@ -185,34 +203,25 @@
& .mud-table-bordered {
& .mud-table-container .mud-table-root .mud-table-body {
& .mud-table-row {
- .mud-table-cell:last-child {
- border-right: 1px solid var(--mud-palette-table-lines);
+ .mud-table-cell:first-child {
+ border-right: none;
border-top-right-radius: 0px;
}
- }
- }
- & .mud-table-container .mud-table-root .mud-table-body {
- & .mud-table-row {
- .mud-table-cell:first-child {
- border-right: none;
+ .mud-table-cell:last-child {
+ border-right: 1px solid var(--mud-palette-table-lines);
border-top-right-radius: 0px;
}
}
}
-
& .mud-table-container .mud-table-root .mud-table-head.table-head-bordered {
& .mud-table-row {
.mud-table-cell:last-child {
border-right: 1px solid var(--mud-palette-table-lines);
border-top-right-radius: 0px;
}
- }
- }
- & .mud-table-container .mud-table-root .mud-table-head.table-head-bordered {
- & .mud-table-row {
.mud-table-cell:only-child {
border-right: none;
border-top-right-radius: var(--mud-default-borderradius);
@@ -220,7 +229,6 @@
}
}
-
& .mud-table-container .mud-table-root .mud-table-head {
& .mud-table-row {
th.mud-table-cell:first-child {
@@ -272,8 +280,19 @@
top: 0;
}
+ & * .mud-table-loading {
+ background-color: var(--mud-palette-surface);
+ position: sticky;
+ z-index: 2;
+ top: 59px;
+ }
+
& * .mud-filter-panel-cell {
- top: 58px;
+ top: 59px;
+ }
+ // If .mud-table-loading exists, move .mud-filter-panel-cell down
+ table:has(.mud-table-loading) & * .mud-filter-panel-cell {
+ top: 63px;
}
& * .mud-table-cell.sticky-left,
@@ -288,9 +307,18 @@
.mud-table-sticky-header.mud-table-dense {
& * .mud-table-root {
.mud-table-head {
+
+ & * .mud-table-loading {
+ top: 39px;
+ }
+
& * .mud-filter-panel-cell {
top: 39px;
}
+
+ table:has(.mud-table-loading) & * .mud-filter-panel-cell {
+ top: 43px;
+ }
}
}
}
@@ -350,29 +378,6 @@
}
}
-
-.mud-table-cell {
- & > .mud-input-control {
- & > div.mud-input.mud-input-text {
- color: var(--mud-theme-on-surface);
- font-size: 0.875rem;
- margin-top: -14px;
- margin-bottom: -8px;
- }
- }
-
- & > .mud-select {
- & > .mud-input-control {
- & > div.mud-input.mud-input-text {
- color: var(--mud-theme-on-surface);
- font-size: 0.875rem;
- margin-top: -14px;
- margin-bottom: -8px;
- }
- }
- }
-}
-
.mud-table-cell-align {
&-left {
text-align: left;
@@ -611,9 +616,7 @@
}
}
}
- }
- &.mud-table-bordered {
& .mud-table-container .mud-table-root .mud-table-body {
& .mud-table-row {
.mud-table-cell {
diff --git a/src/MudBlazor/Styles/components/_tabs.scss b/src/MudBlazor/Styles/components/_tabs.scss
index 02ea7a857ed7..6534fb04db18 100644
--- a/src/MudBlazor/Styles/components/_tabs.scss
+++ b/src/MudBlazor/Styles/components/_tabs.scss
@@ -172,6 +172,10 @@
margin-inline-end: 8px;
margin-inline-start: unset;
}
+
+ &.mud-tab-panel-hidden {
+ display: none;
+ }
}
.mud-tab-slider {
diff --git a/src/MudBlazor/Styles/components/_timeline.scss b/src/MudBlazor/Styles/components/_timeline.scss
index 170a363ecf0d..50ae6d0ba609 100644
--- a/src/MudBlazor/Styles/components/_timeline.scss
+++ b/src/MudBlazor/Styles/components/_timeline.scss
@@ -4,19 +4,30 @@
display: flex;
}
-.mud-timeline-vertical {
- padding-top: 24px;
- flex-direction: column;
+.mud-timeline-item {
+ display: flex;
- &::before {
- top: 0;
- bottom: 0;
- content: "";
+ .mud-timeline-item-content {
+ position: relative;
height: 100%;
- position: absolute;
- width: 2px;
- background: var(--mud-palette-divider);
+ flex: 1 1 auto;
+ }
+
+ .mud-timeline-item-divider {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .mud-timeline-item-opposite {
+ align-self: center;
}
+}
+
+.mud-timeline-vertical {
+ padding-top: 24px;
+ flex-direction: column;
.mud-timeline-item {
padding-bottom: 24px;
@@ -34,59 +45,17 @@
max-width: calc(50% - 48px);
}
}
-}
-
-.mud-timeline-horizontal {
- flex-direction: row;
&::before {
top: 0;
bottom: 0;
content: "";
- height: 2px;
+ height: 100%;
position: absolute;
- width: 100%;
+ width: 2px;
background: var(--mud-palette-divider);
}
- .mud-timeline-item {
- padding: 0 24px;
- width: 100%;
- min-width: 0;
-
- .mud-timeline-item-content {
- max-height: calc(50% - 48px);
- }
-
- .mud-timeline-item-divider {
- min-height: 96px;
- }
- }
-}
-
-.mud-timeline-item {
- display: flex;
-
- .mud-timeline-item-content {
- position: relative;
- height: 100%;
- flex: 1 1 auto;
- }
-
- .mud-timeline-item-divider {
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .mud-timeline-item-opposite {
- align-self: center;
- }
-}
-
-
-.mud-timeline-vertical {
&.mud-timeline-align-start {
.mud-timeline-item-divider {
align-items: flex-start;
@@ -202,6 +171,32 @@
}
.mud-timeline-horizontal {
+ flex-direction: row;
+
+ .mud-timeline-item {
+ padding: 0 24px;
+ width: 100%;
+ min-width: 0;
+
+ .mud-timeline-item-content {
+ max-height: calc(50% - 48px);
+ }
+
+ .mud-timeline-item-divider {
+ min-height: 96px;
+ }
+ }
+
+ &::before {
+ top: 0;
+ bottom: 0;
+ content: "";
+ height: 2px;
+ position: absolute;
+ width: 100%;
+ background: var(--mud-palette-divider);
+ }
+
&.mud-timeline-align-start {
.mud-timeline-item-divider {
justify-content: flex-start;
@@ -372,9 +367,29 @@
.mud-timeline-modifiers {
.mud-timeline-item-content {
.mud-card {
- &::before, &::after {
+ &::before {
content: "";
position: absolute;
+ border-top: 16px solid transparent;
+ border-bottom: 16px solid transparent;
+ border-right: 16px solid rgba(0,0,0,.10);
+ top: calc(50% - 14px);
+ }
+
+ &::after {
+ content: "";
+ position: absolute;
+ border-top: 16px solid transparent;
+ border-bottom: 16px solid transparent;
+ border-right: 16px solid var(--mud-palette-surface);
+ top: calc(50% - 16px);
+ }
+
+ &.mud-paper-outlined {
+ &::before {
+ top: calc(50% - 16px);
+ border-right-color: var(--mud-palette-lines-default);
+ }
}
}
}
@@ -620,31 +635,4 @@
}
}
}
-
-
-
- .mud-timeline-item-content {
- .mud-card {
- &::before {
- border-top: 16px solid transparent;
- border-bottom: 16px solid transparent;
- border-right: 16px solid rgba(0,0,0,.10);
- top: calc(50% - 14px);
- }
-
- &::after {
- border-top: 16px solid transparent;
- border-bottom: 16px solid transparent;
- border-right: 16px solid var(--mud-palette-surface);
- top: calc(50% - 16px);
- }
-
- &.mud-paper-outlined {
- &::before {
- top: calc(50% - 16px);
- border-right-color: var(--mud-palette-lines-default);
- }
- }
- }
- }
}
diff --git a/src/MudBlazor/Styles/layout/_drawer.scss b/src/MudBlazor/Styles/layout/_drawer.scss
index 1a834b2b5a4b..cb47860c658e 100644
--- a/src/MudBlazor/Styles/layout/_drawer.scss
+++ b/src/MudBlazor/Styles/layout/_drawer.scss
@@ -2,8 +2,6 @@
.mud-drawer {
display: flex;
- flex-shrink: 0;
- flex-grow: 1;
flex: 0 0 auto;
outline: 0;
position: fixed;
@@ -18,8 +16,6 @@
height: 100%;
max-height: 100%;
display: flex;
- flex-shrink: 0;
- flex-grow: 1;
flex: 0 0 auto;
flex-direction: column;
}
diff --git a/src/MudBlazor/Styles/utilities/flexbox/_flex-direction.scss b/src/MudBlazor/Styles/utilities/flexbox/_flex-direction.scss
index c106f76b9126..ad63c087ce8f 100644
--- a/src/MudBlazor/Styles/utilities/flexbox/_flex-direction.scss
+++ b/src/MudBlazor/Styles/utilities/flexbox/_flex-direction.scss
@@ -18,4 +18,4 @@
}
}
-@include flex-direction("");
+@include flex-direction("");
\ No newline at end of file
diff --git a/src/MudBlazor/Utilities/ObserverManager/ObserverManager.cs b/src/MudBlazor/Utilities/ObserverManager/ObserverManager.cs
index 6863c6a7753b..ed76188cd1b2 100644
--- a/src/MudBlazor/Utilities/ObserverManager/ObserverManager.cs
+++ b/src/MudBlazor/Utilities/ObserverManager/ObserverManager.cs
@@ -4,6 +4,7 @@
using System.Collections;
using System.Collections.Concurrent;
+using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.Logging;
namespace MudBlazor.Utilities.ObserverManager;
@@ -50,6 +51,38 @@ public ObserverManager(ILogger log)
///
public void Clear() => _observers.Clear();
+ ///
+ /// Checks if an observer with the specified identity is subscribed.
+ ///
+ /// The identity of the observer.
+ /// True if the observer is subscribed; otherwise, false.
+ public bool IsSubscribed(TIdentity id) => _observers.ContainsKey(id);
+
+ ///
+ /// Tries to get the subscription for the specified identity.
+ ///
+ /// The identity of the observer.
+ /// When this method returns, contains the observer associated with the specified identity, if the identity is found; otherwise, the default value for the type of the observer parameter.
+ /// True if the observer is found; otherwise, false.
+ public bool TryGetSubscription(TIdentity id, [MaybeNullWhen(false)] out TObserver observer)
+ {
+ if (_observers.TryGetValue(id, out var entry))
+ {
+ observer = entry.Observer;
+ return true;
+ }
+ observer = default;
+ return false;
+ }
+
+ ///
+ /// Finds the identities of observers that match the specified predicate.
+ ///
+ /// The predicate to filter the observers.
+ /// An enumerable collection of observer identities that match the predicate.
+ public IEnumerable FindObserverIdentities(Func predicate) =>
+ _observers.Where(kvp => predicate(kvp.Key, kvp.Value.Observer)).Select(kvp => kvp.Key);
+
///
/// Ensures that the provided is subscribed, renewing its subscription.
///
diff --git a/tools/CheckPackageContainsStaticAssets.ps1 b/tools/CheckPackageContainsStaticAssets.ps1
index f9e38041eea1..23b2cb385d82 100644
--- a/tools/CheckPackageContainsStaticAssets.ps1
+++ b/tools/CheckPackageContainsStaticAssets.ps1
@@ -9,6 +9,6 @@ if($fileNames.Contains($assetName))
}
else
{
- Write-Error -Message "Static asset check - $nupkgFilePath does not contain $assetNamh"
+ Write-Error -Message "Static asset check - $nupkgFilePath does not contain $assetName"
exit 1
}