Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/microsoft/fluentui-blazor in…
Browse files Browse the repository at this point in the history
…to dev
  • Loading branch information
vnbaaij committed Jan 10, 2025
2 parents 7576ace + 3e22958 commit 784d17c
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 2 deletions.
25 changes: 25 additions & 0 deletions examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3554,6 +3554,16 @@
If defined, this value will replace the one defined in the <see cref="T:Microsoft.FluentUI.AspNetCore.Components.DialogParameters"/>.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentDialogHeader.ShowDismissTooltip">
<summary>
When true, shows the "Close" button tooltip in the header.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentDialogHeader.TabIndex">
<summary>
Allows developers to make elements sequentially focusable and determine their relative ordering for navigation (usually with the Tab key).
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentDialogHeader.ChildContent">
<summary>
Gets or sets the content to be rendered inside the component.
Expand Down Expand Up @@ -14121,6 +14131,11 @@
The content is stretched to fill the available space.
</summary>
</member>
<member name="F:Microsoft.FluentUI.AspNetCore.Components.HorizontalAlignment.SpaceBetween">
<summary>
The items are evenly distributed within the alignment container along the main axis.
</summary>
</member>
<member name="T:Microsoft.FluentUI.AspNetCore.Components.HorizontalPosition">
<summary>
Describes the horizontal positioning of a <see cref="T:Microsoft.FluentUI.AspNetCore.Components.FluentAnchoredRegion"/>.
Expand Down Expand Up @@ -15128,6 +15143,16 @@
The content is aligned to the bottom
</summary>
</member>
<member name="F:Microsoft.FluentUI.AspNetCore.Components.VerticalAlignment.Stretch">
<summary>
The content is stretched to fill the available space.
</summary>
</member>
<member name="F:Microsoft.FluentUI.AspNetCore.Components.VerticalAlignment.SpaceBetween">
<summary>
The items are evenly distributed within the alignment container along the main axis.
</summary>
</member>
<member name="T:Microsoft.FluentUI.AspNetCore.Components.VerticalPosition">
<summary>
Describes the vertical positioning of a <see cref="T:Microsoft.FluentUI.AspNetCore.Components.FluentAnchoredRegion"/>.
Expand Down
8 changes: 6 additions & 2 deletions src/Core/Components/Dialog/FluentDialogHeader.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Style="@StyleValue"
Class="@ClassValue"
Id="@Id">
<div style="width: 100%;" tabindex="0">
<div style="width: 100%;" tabindex="@TabIndex">
@if (@ChildContent == null && Dialog.Instance?.Parameters?.ShowTitle == true)
{
<FluentLabel Typo="Typography.PaneHeader">@Dialog.Instance?.Parameters?.Title</FluentLabel>
Expand All @@ -24,7 +24,11 @@
<FluentButton Id="dialog_close" Appearance="Appearance.Stealth" OnClick="@(() => Dialog.CancelAsync())" aria-label="@Dialog.Instance?.Parameters?.DismissTitle">
<FluentIcon Value="@(new CoreIcons.Regular.Size20.Dismiss())" Width="20px" Color="Color.Neutral" />
</FluentButton>
<FluentTooltip Anchor="dialog_close" Position="@TooltipPosition.Bottom">@Dialog.Instance?.Parameters?.DismissTitle</FluentTooltip>

if (ShowDismissTooltip == true)
{
<FluentTooltip Anchor="dialog_close" Position="@TooltipPosition.Bottom">@Dialog.Instance?.Parameters?.DismissTitle</FluentTooltip>
}
}
</FluentStack>
}
12 changes: 12 additions & 0 deletions src/Core/Components/Dialog/FluentDialogHeader.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ public partial class FluentDialogHeader : FluentComponentBase
[Parameter]
public bool? ShowDismiss { get; set; }

/// <summary>
/// When true, shows the "Close" button tooltip in the header.
/// </summary>
[Parameter]
public bool? ShowDismissTooltip { get; set; } = true;

/// <summary>
/// Allows developers to make elements sequentially focusable and determine their relative ordering for navigation (usually with the Tab key).
/// </summary>
[Parameter]
public int? TabIndex { get; set; } = 0;

/// <summary>
/// Gets or sets the content to be rendered inside the component.
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions src/Core/Components/Stack/FluentStack.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ private string GetHorizontalAlignment()
HorizontalAlignment.Right => "end",
HorizontalAlignment.End => "end",
HorizontalAlignment.Stretch => "stretch",
HorizontalAlignment.SpaceBetween => Orientation == Orientation.Vertical ? "start" : "space-between",
_ => "start",
};
}
Expand All @@ -98,6 +99,8 @@ private string GetVerticalAlignment()
VerticalAlignment.Top => "start",
VerticalAlignment.Center => "center",
VerticalAlignment.Bottom => "end",
VerticalAlignment.Stretch => "stretch",
VerticalAlignment.SpaceBetween => Orientation == Orientation.Horizontal ? "start" : "space-between",
_ => "start",
};
}
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Enums/HorizontalAlignement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ public enum HorizontalAlignment
/// The content is stretched to fill the available space.
/// </summary>
Stretch,

/// <summary>
/// The items are evenly distributed within the alignment container along the main axis.
/// </summary>
SpaceBetween,
}
10 changes: 10 additions & 0 deletions src/Core/Enums/VerticalAlignment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@ public enum VerticalAlignment
/// The content is aligned to the bottom
/// </summary>
Bottom,

/// <summary>
/// The content is stretched to fill the available space.
/// </summary>
Stretch,

/// <summary>
/// The items are evenly distributed within the alignment container along the main axis.
/// </summary>
SpaceBetween,
}

0 comments on commit 784d17c

Please sign in to comment.