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 @@ -56,7 +56,7 @@
{
if (firstRender)
{
await FillColor.SetValueFor(Toolbar!.Element, "#333".ToSwatch());
await FillColor.SetValueFor(Toolbar!.Element, "#333");
await BaseLayerLuminance.SetValueFor(Toolbar!.Element, (float)0.15);

StateHasChanged();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

<fluent-dialog id="xxx" class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: 200px;" modal="true" trap-focus="true" blazor:ondialogdismiss="1" b-dsxskpj5rr="" blazor:elementreference="">
<fluent-dialog id="xxx" class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: 200px;" modal="true" trap-focus="true" blazor:ondialogdismiss="1" tabindex="-1" b-dsxskpj5rr="" blazor:elementreference="">
<div class="stack-horizontal fluent-dialog-header" style="justify-content: start; align-items: start; column-gap: 10px; row-gap: 10px; width: 100%;" b-0nr62qx0mz="">
<div style="width: 100%;">
<h4 typo="pane-header" class="fluent-typography" b-1nnnfjehkp="">Sample title</h4>
</div>
<fluent-button type="button" aria-label="Close" appearance="stealth" blazor:onclick="6" b-x1200685t0="" blazor:elementreference="xxx">
<svg style="width: 16px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onclick="8">
<fluent-button type="button" id="xxx" appearance="stealth" blazor:onclick="7" aria-label="Close" b-x1200685t0="" blazor:elementreference="xxx">
<svg style="width: 16px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onkeydown="9" blazor:onclick="10">
<path d="m4.4 4.55.07-.08a.75.75 0 0 1 .98-.07l.08.07L12 10.94l6.47-6.47a.75.75 0 1 1 1.06 1.06L13.06 12l6.47 6.47c.27.27.3.68.07.98l-.07.08a.75.75 0 0 1-.98.07l-.08-.07L12 13.06l-6.47 6.47a.75.75 0 0 1-1.06-1.06L10.94 12 4.47 5.53a.75.75 0 0 1-.07-.98l.07-.08-.07.08Z"></path>
</svg>
</fluent-button>
</div>
<div class="stack-horizontal fluent-dialog-footer" style="justify-content: end; align-items: end; column-gap: 10px; row-gap: 10px; width: 100%;" b-0nr62qx0mz="">
<fluent-button type="button" appearance="accent" blazor:onclick="7" b-x1200685t0="" blazor:elementreference="xxx">Close</fluent-button>
<fluent-button type="button" appearance="accent" blazor:onclick="8" b-x1200685t0="" blazor:elementreference="xxx">Close</fluent-button>
</div>
<div class="fluent-dialog-body">
My body
</div>
</fluent-dialog>
</fluent-dialog>
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

<fluent-dialog id="xxx" class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: unset;" modal="true" trap-focus="true" blazor:ondialogdismiss="1" b-dsxskpj5rr="" blazor:elementreference="">
<fluent-dialog id="xxx" class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: unset;" modal="true" trap-focus="true" blazor:ondialogdismiss="1" tabindex="-1" b-dsxskpj5rr="" blazor:elementreference="">
<div class="stack-horizontal fluent-dialog-header" style="justify-content: start; align-items: start; column-gap: 10px; row-gap: 10px; width: 100%;" b-0nr62qx0mz="">
<div style="width: 100%;">
<h4 typo="pane-header" class="fluent-typography" b-1nnnfjehkp="">Sample title</h4>
</div>
<fluent-button type="button" aria-label="Close" appearance="stealth" blazor:onclick="6" b-x1200685t0="" blazor:elementreference="xxx">
<svg style="width: 16px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onclick="8">
<fluent-button type="button" id="xxx" appearance="stealth" blazor:onclick="7" aria-label="Close" b-x1200685t0="" blazor:elementreference="xxx">
<svg style="width: 16px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onkeydown="9" blazor:onclick="10">
<path d="m4.4 4.55.07-.08a.75.75 0 0 1 .98-.07l.08.07L12 10.94l6.47-6.47a.75.75 0 1 1 1.06 1.06L13.06 12l6.47 6.47c.27.27.3.68.07.98l-.07.08a.75.75 0 0 1-.98.07l-.08-.07L12 13.06l-6.47 6.47a.75.75 0 0 1-1.06-1.06L10.94 12 4.47 5.53a.75.75 0 0 1-.07-.98l.07-.08-.07.08Z"></path>
</svg>
</fluent-button>
</div>
<div class="stack-horizontal fluent-dialog-footer" style="justify-content: end; align-items: end; column-gap: 10px; row-gap: 10px; width: 100%;" b-0nr62qx0mz="">
<fluent-button type="button" appearance="accent" blazor:onclick="7" b-x1200685t0="" blazor:elementreference="xxx">Close</fluent-button>
<fluent-button type="button" appearance="accent" blazor:onclick="8" b-x1200685t0="" blazor:elementreference="xxx">Close</fluent-button>
</div>
<div class="fluent-dialog-body">
My body
</div>
</fluent-dialog>
</fluent-dialog>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

<fluent-dialog id="xxx" class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: unset;" modal="true" trap-focus="true" blazor:ondialogdismiss="1" b-dsxskpj5rr="" blazor:elementreference="">
<fluent-dialog id="xxx" class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: unset;" modal="true" trap-focus="true" blazor:ondialogdismiss="1" tabindex="-1" b-dsxskpj5rr="" blazor:elementreference="">
<div class="stack-horizontal fluent-dialog-header" style="justify-content: start; align-items: start; column-gap: 10px; row-gap: 10px; width: 100%;" b-0nr62qx0mz="">
<div style="width: 100%;">
<h4 typo="pane-header" class="fluent-typography" b-1nnnfjehkp="">Render Fragment Example</h4>
</div>
<fluent-button type="button" aria-label="Close" aria-label="Close" appearance="stealth" blazor:onclick="2" b-x1200685t0="" blazor:elementreference="xxx">
<svg style="width: 16px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onclick="5">
<fluent-button type="button" id="xxx" appearance="stealth" blazor:onclick="2" aria-label="Close" b-x1200685t0="" blazor:elementreference="xxx">
<svg style="width: 16px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onkeydown="5" blazor:onclick="6">
<path d="m4.4 4.55.07-.08a.75.75 0 0 1 .98-.07l.08.07L12 10.94l6.47-6.47a.75.75 0 1 1 1.06 1.06L13.06 12l6.47 6.47c.27.27.3.68.07.98l-.07.08a.75.75 0 0 1-.98.07l-.08-.07L12 13.06l-6.47 6.47a.75.75 0 0 1-1.06-1.06L10.94 12 4.47 5.53a.75.75 0 0 1-.07-.98l.07-.08-.07.08Z"></path>
</svg>
</fluent-button>
Expand All @@ -17,4 +17,4 @@ <h4 typo="pane-header" class="fluent-typography" b-1nnnfjehkp="">Render Fragment
<fluent-button type="button" aria-label="OK" title="OK" appearance="accent" blazor:onclick="3" b-x1200685t0="" blazor:elementreference="xxx">OK</fluent-button>
<fluent-button type="button" aria-label="Cancel" title="Cancel" appearance="neutral" blazor:onclick="4" b-x1200685t0="" blazor:elementreference="xxx">Cancel</fluent-button>
</div>
</fluent-dialog>
</fluent-dialog>
8 changes: 8 additions & 0 deletions tests/Core/Dialog/FluentDialogServiceTests.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
@inherits TestContext
@code
{
[Inject]
private LibraryConfiguration LibraryConfiguration { get; set; } = new LibraryConfiguration();

public FluentDialogServiceTests()
{
Services.AddSingleton(LibraryConfiguration);
}

[Fact]
public async Task FluentDialogService_Default()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

<fluent-dialog class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: unset;" modal="true" trap-focus="true" b-dsxskpj5rr="" blazor:elementreference="xxx">My dialog content</fluent-dialog>
<fluent-dialog class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: unset;" modal="true" trap-focus="true" tabindex="-1" b-dsxskpj5rr="" blazor:elementreference="xxx">My dialog content</fluent-dialog>
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

<fluent-dialog class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: unset;" modal="true" trap-focus="true" b-dsxskpj5rr="" blazor:elementreference="">
<fluent-dialog class="fluent-dialog-main prevent-scroll" style="position: absolute; z-index: 999; top: 50%; left: 50%; --dialog-width: 500px; --dialog-height: unset;" modal="true" trap-focus="true" tabindex="-1" b-dsxskpj5rr="" blazor:elementreference="">
<div class="stack-horizontal fluent-dialog-header" style="justify-content: start; align-items: start; column-gap: 10px; row-gap: 10px; width: 100%;" b-0nr62qx0mz="">
<div style="width: 100%;">
Header content
</div>
<fluent-button type="button" appearance="stealth" blazor:onclick="1" b-x1200685t0="" blazor:elementreference="">
<svg style="width: 16px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onclick="2">
<fluent-button type="button" id="xxx" appearance="stealth" blazor:onclick="1" b-x1200685t0="" blazor:elementreference="">
<svg style="width: 16px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onkeydown="3" blazor:onclick="4">
<path d="m4.4 4.55.07-.08a.75.75 0 0 1 .98-.07l.08.07L12 10.94l6.47-6.47a.75.75 0 1 1 1.06 1.06L13.06 12l6.47 6.47c.27.27.3.68.07.98l-.07.08a.75.75 0 0 1-.98.07l-.08-.07L12 13.06l-6.47 6.47a.75.75 0 0 1-1.06-1.06L10.94 12 4.47 5.53a.75.75 0 0 1-.07-.98l.07-.08-.07.08Z"></path>
</svg>
</fluent-button>
<fluent-tooltip anchor="xxx" delay="300" blazor:ontooltipdismiss="2" placement="Placement.Bottom" blazor:elementreference=""></fluent-tooltip>
</div>
<div class="fluent-dialog-body">
Body content
Expand Down
12 changes: 10 additions & 2 deletions tests/Core/Dialog/FluentDialogTests.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
@using Xunit;
@using Xunit;
@inherits TestContext
@code
{
[Inject]
private LibraryConfiguration LibraryConfiguration { get; set; } = new LibraryConfiguration();

public FluentDialogTests()
{
Services.AddSingleton(LibraryConfiguration);
}

[Fact]
public void FluentDialog_Default()
{
Expand Down Expand Up @@ -65,4 +73,4 @@
var result = cut.Markup;
});
}
}
}