Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d077382
feat(dialogs): added support for alert, prompt, and custom dialogs
Denny09310 Mar 2, 2026
14aec6d
fix(dialogs): 'IComponent' taken from wrong using
Denny09310 Mar 2, 2026
1c3e198
fix(dialog): dialog closing from IDialogReference
Denny09310 Mar 2, 2026
5dfa6fc
chore(demo): added demo for new dialog variants
Denny09310 Mar 2, 2026
9ffb90d
feat(dialogs): added support for alert, prompt, and custom dialogs
Denny09310 Mar 2, 2026
18bf2d7
fix(dialogs): changed 'AlertDialog' cancelling instead of acknowledging
Denny09310 Mar 4, 2026
2106c03
fix(dialogs): adding a backward compatible 'Confirm' method, ensuring…
Denny09310 Mar 4, 2026
200aaa4
fix(dialogs): added default text to 'ConfirmText' property
Denny09310 Mar 4, 2026
532c8fd
fix(dialogs): renamed 'Task' property to 'Completion' avoiding overla…
Denny09310 Mar 4, 2026
1a19678
fix(dialogs): restored accessibility attributes for every dialog type
Denny09310 Mar 4, 2026
0c7e9f1
fix(dialogs): remove orphaned/duplicate summaries
Denny09310 Mar 4, 2026
8df7157
chore(demo): added code samples for dialog services
Denny09310 Mar 4, 2026
a2d4bac
chore(dialog): moved dialog wrapper up to 'BbDialogProvider'
Denny09310 Mar 4, 2026
c6eb53b
fix(dialogs): better 'PromptDialog' validation
Denny09310 Mar 4, 2026
af37d8e
chore(dialogs): removed check on 'Title' as it's required, avoid cast…
Denny09310 Mar 4, 2026
bc33d17
fix. avoid injecting service in custom dialog data
Denny09310 Mar 4, 2026
9d2392d
fix: for some reason adding the dialogs new classes, makes the compil…
Denny09310 Mar 4, 2026
34c458c
feat(dialog): add escape key, focus trap, scroll lock, dynamic sizing…
mathewtaylor Mar 5, 2026
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
@@ -0,0 +1,18 @@
@inject DialogService DialogService

private async Task HandleAlert()
{
alertStatus = "Waiting...";
await DialogService.AlertAsync(
"Session Expired",
"Please log in again.");
}

// With custom options:
var confirmed = await DialogService.ConfirmAsync(
"Delete item?",
"This action cannot be undone.",
new AlertDialogOptions
{
ButtonText = "Ok, I Accept!",
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

private async Task HandleDelete()
{
var confirmed = await DialogService.Confirm(
var confirmed = await DialogService.ConfirmAsync(
"Delete item?",
"This action cannot be undone.");

Expand All @@ -13,12 +13,12 @@ private async Task HandleDelete()
}

// With custom options:
var confirmed = await DialogService.Confirm(
var confirmed = await DialogService.ConfirmAsync(
"Delete item?",
"This action cannot be undone.",
new ConfirmDialogOptions
{
ConfirmText = "Yes, delete",
CancelText = "Keep it",
Destructive = true
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@inject DialogService DialogService

private async Task HandleCustomDialog()
{
var result = await DialogService.OpenAsync<EditUserComponent>(
new Dictionary<string, object?>
{
[nameof(EditUserComponent.UserId)] = 42
},
new DialogOpenOptions
{
Title = "Edit User",
Size = DialogSize.Large
});

if (result.Cancelled)
{
return;
}

var data = result.GetData<UserDto>();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<BbDialog>
<BbDialogTrigger>
<BbButton>Open Form Dialog</BbButton>
</BbDialogTrigger>

<BbDialogContent>
<BbDialogHeader>
<BbDialogTitle>Create Account</BbDialogTitle>
<BbDialogDescription>
Fill in the details below to create a new account.
</BbDialogDescription>
</BbDialogHeader>

<div class="grid gap-4 py-4">
<div class="space-y-2">
<label class="text-sm font-medium">First Name</label>
<BbInput @bind-Value="formFirstName" Placeholder="Enter first name..." />
</div>
<div class="space-y-2">
<label class="text-sm font-medium">Last Name</label>
<BbInput @bind-Value="formLastName" Placeholder="Enter last name..." />
</div>
<div class="space-y-2">
<label class="text-sm font-medium">Email</label>
<BbInput @bind-Value="formEmail" Type="InputType.Email" Placeholder="you@example.com" />
</div>
<div class="space-y-2">
<label class="text-sm font-medium">Bio</label>
<BbTextarea @bind-Value="formBio" Placeholder="Tell us about yourself..." />
</div>
</div>

<BbDialogFooter>
<BbDialogClose>
<BbButton Variant="ButtonVariant.Outline">Cancel</BbButton>
</BbDialogClose>
<BbButton OnClick="HandleCreateAccount">Create Account</BbButton>
</BbDialogFooter>
</BbDialogContent>
</BbDialog>

@code {
private string? formFirstName;
private string? formLastName;
private string? formEmail;
private string? formBio;

private void HandleCreateAccount()
{
// Handle account creation
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<BbDialog @bind-Open="outerDialogOpen">
<BbDialogTrigger>
<BbButton Variant="ButtonVariant.Outline">Open Outer Dialog</BbButton>
</BbDialogTrigger>

<BbDialogContent>
<BbDialogHeader>
<BbDialogTitle>Outer Dialog</BbDialogTitle>
<BbDialogDescription>
This is the outer dialog. Click the button below to open a nested dialog inside.
</BbDialogDescription>
</BbDialogHeader>

<div class="py-4 space-y-4">
<div class="space-y-2">
<label class="text-sm font-medium">Outer Input</label>
<BbInput @bind-Value="outerDialogInput" Placeholder="Type here..." />
</div>

<BbDialog @bind-Open="innerDialogOpen">
<BbDialogTrigger>
<BbButton Variant="ButtonVariant.Secondary">Open Inner Dialog</BbButton>
</BbDialogTrigger>

<BbDialogContent>
<BbDialogHeader>
<BbDialogTitle>Inner Dialog</BbDialogTitle>
<BbDialogDescription>
This is the nested inner dialog. Press Escape — only this dialog should close.
</BbDialogDescription>
</BbDialogHeader>

<div class="py-4 space-y-2">
<label class="text-sm font-medium">Inner Input</label>
<BbInput @bind-Value="innerDialogInput" Placeholder="Type in the inner dialog..." />
</div>

<BbDialogFooter>
<BbDialogClose>
<BbButton Variant="ButtonVariant.Outline">Close Inner</BbButton>
</BbDialogClose>
</BbDialogFooter>
</BbDialogContent>
</BbDialog>
</div>

<BbDialogFooter>
<BbDialogClose>
<BbButton Variant="ButtonVariant.Outline">Close Outer</BbButton>
</BbDialogClose>
</BbDialogFooter>
</BbDialogContent>
</BbDialog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<BbDialog>
<BbDialogTrigger>
<BbButton Variant="ButtonVariant.Outline">Open Dialog</BbButton>
</BbDialogTrigger>

<BbDialogContent CloseOnOverlayClick="false">
<BbDialogHeader>
<BbDialogTitle>Non-Dismissible</BbDialogTitle>
<BbDialogDescription>
Clicking the backdrop will not close this dialog. Use the button below or press Escape.
</BbDialogDescription>
</BbDialogHeader>
<BbDialogFooter Class="mt-4">
<BbDialogClose>
<BbButton>Got it</BbButton>
</BbDialogClose>
</BbDialogFooter>
</BbDialogContent>
</BbDialog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@inject DialogService DialogService

private async Task HandlePrompt()
{
var name = await DialogService.PromptAsync(
"Rename File",
"Enter a new file name:",
new PromptDialogOptions
{
DefaultValue = "document.txt",
Placeholder = "file-name.txt",
Required = true,
MaxLength = 50
});

var text = name.Value ?? "Cancelled";
}
Loading