Skip to content

Commit 784d17c

Browse files
committed
2 parents 7576ace + 3e22958 commit 784d17c

File tree

6 files changed

+61
-2
lines changed

6 files changed

+61
-2
lines changed

examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3554,6 +3554,16 @@
35543554
If defined, this value will replace the one defined in the <see cref="T:Microsoft.FluentUI.AspNetCore.Components.DialogParameters"/>.
35553555
</summary>
35563556
</member>
3557+
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentDialogHeader.ShowDismissTooltip">
3558+
<summary>
3559+
When true, shows the "Close" button tooltip in the header.
3560+
</summary>
3561+
</member>
3562+
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentDialogHeader.TabIndex">
3563+
<summary>
3564+
Allows developers to make elements sequentially focusable and determine their relative ordering for navigation (usually with the Tab key).
3565+
</summary>
3566+
</member>
35573567
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentDialogHeader.ChildContent">
35583568
<summary>
35593569
Gets or sets the content to be rendered inside the component.
@@ -14121,6 +14131,11 @@
1412114131
The content is stretched to fill the available space.
1412214132
</summary>
1412314133
</member>
14134+
<member name="F:Microsoft.FluentUI.AspNetCore.Components.HorizontalAlignment.SpaceBetween">
14135+
<summary>
14136+
The items are evenly distributed within the alignment container along the main axis.
14137+
</summary>
14138+
</member>
1412414139
<member name="T:Microsoft.FluentUI.AspNetCore.Components.HorizontalPosition">
1412514140
<summary>
1412614141
Describes the horizontal positioning of a <see cref="T:Microsoft.FluentUI.AspNetCore.Components.FluentAnchoredRegion"/>.
@@ -15128,6 +15143,16 @@
1512815143
The content is aligned to the bottom
1512915144
</summary>
1513015145
</member>
15146+
<member name="F:Microsoft.FluentUI.AspNetCore.Components.VerticalAlignment.Stretch">
15147+
<summary>
15148+
The content is stretched to fill the available space.
15149+
</summary>
15150+
</member>
15151+
<member name="F:Microsoft.FluentUI.AspNetCore.Components.VerticalAlignment.SpaceBetween">
15152+
<summary>
15153+
The items are evenly distributed within the alignment container along the main axis.
15154+
</summary>
15155+
</member>
1513115156
<member name="T:Microsoft.FluentUI.AspNetCore.Components.VerticalPosition">
1513215157
<summary>
1513315158
Describes the vertical positioning of a <see cref="T:Microsoft.FluentUI.AspNetCore.Components.FluentAnchoredRegion"/>.

src/Core/Components/Dialog/FluentDialogHeader.razor

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Style="@StyleValue"
99
Class="@ClassValue"
1010
Id="@Id">
11-
<div style="width: 100%;" tabindex="0">
11+
<div style="width: 100%;" tabindex="@TabIndex">
1212
@if (@ChildContent == null && Dialog.Instance?.Parameters?.ShowTitle == true)
1313
{
1414
<FluentLabel Typo="Typography.PaneHeader">@Dialog.Instance?.Parameters?.Title</FluentLabel>
@@ -24,7 +24,11 @@
2424
<FluentButton Id="dialog_close" Appearance="Appearance.Stealth" OnClick="@(() => Dialog.CancelAsync())" aria-label="@Dialog.Instance?.Parameters?.DismissTitle">
2525
<FluentIcon Value="@(new CoreIcons.Regular.Size20.Dismiss())" Width="20px" Color="Color.Neutral" />
2626
</FluentButton>
27-
<FluentTooltip Anchor="dialog_close" Position="@TooltipPosition.Bottom">@Dialog.Instance?.Parameters?.DismissTitle</FluentTooltip>
27+
28+
if (ShowDismissTooltip == true)
29+
{
30+
<FluentTooltip Anchor="dialog_close" Position="@TooltipPosition.Bottom">@Dialog.Instance?.Parameters?.DismissTitle</FluentTooltip>
31+
}
2832
}
2933
</FluentStack>
3034
}

src/Core/Components/Dialog/FluentDialogHeader.razor.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ public partial class FluentDialogHeader : FluentComponentBase
3434
[Parameter]
3535
public bool? ShowDismiss { get; set; }
3636

37+
/// <summary>
38+
/// When true, shows the "Close" button tooltip in the header.
39+
/// </summary>
40+
[Parameter]
41+
public bool? ShowDismissTooltip { get; set; } = true;
42+
43+
/// <summary>
44+
/// Allows developers to make elements sequentially focusable and determine their relative ordering for navigation (usually with the Tab key).
45+
/// </summary>
46+
[Parameter]
47+
public int? TabIndex { get; set; } = 0;
48+
3749
/// <summary>
3850
/// Gets or sets the content to be rendered inside the component.
3951
/// </summary>

src/Core/Components/Stack/FluentStack.razor.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ private string GetHorizontalAlignment()
8787
HorizontalAlignment.Right => "end",
8888
HorizontalAlignment.End => "end",
8989
HorizontalAlignment.Stretch => "stretch",
90+
HorizontalAlignment.SpaceBetween => Orientation == Orientation.Vertical ? "start" : "space-between",
9091
_ => "start",
9192
};
9293
}
@@ -98,6 +99,8 @@ private string GetVerticalAlignment()
9899
VerticalAlignment.Top => "start",
99100
VerticalAlignment.Center => "center",
100101
VerticalAlignment.Bottom => "end",
102+
VerticalAlignment.Stretch => "stretch",
103+
VerticalAlignment.SpaceBetween => Orientation == Orientation.Horizontal ? "start" : "space-between",
101104
_ => "start",
102105
};
103106
}

src/Core/Enums/HorizontalAlignement.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,9 @@ public enum HorizontalAlignment
3434
/// The content is stretched to fill the available space.
3535
/// </summary>
3636
Stretch,
37+
38+
/// <summary>
39+
/// The items are evenly distributed within the alignment container along the main axis.
40+
/// </summary>
41+
SpaceBetween,
3742
}

src/Core/Enums/VerticalAlignment.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,14 @@ public enum VerticalAlignment
1919
/// The content is aligned to the bottom
2020
/// </summary>
2121
Bottom,
22+
23+
/// <summary>
24+
/// The content is stretched to fill the available space.
25+
/// </summary>
26+
Stretch,
27+
28+
/// <summary>
29+
/// The items are evenly distributed within the alignment container along the main axis.
30+
/// </summary>
31+
SpaceBetween,
2232
}

0 commit comments

Comments
 (0)