├── Artifacts └── .gitkeep ├── TestApps ├── Server │ └── BlazorDialog.BlazorServerTestApp │ │ ├── Pages │ │ ├── NoService.razor │ │ ├── Index.razor │ │ └── _Host.cshtml │ │ ├── wwwroot │ │ ├── favicon.ico │ │ └── css │ │ │ └── site.css │ │ ├── Shared │ │ └── MainLayout.razor │ │ ├── appsettings.json │ │ ├── appsettings.Development.json │ │ ├── App.razor │ │ ├── BlazorDialog.BlazorServerTestApp.csproj │ │ ├── _Imports.razor │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Program.cs │ │ └── Startup.cs ├── Wasm │ ├── BlazorDialog.BlazorTestApp.Client │ │ ├── wwwroot │ │ │ ├── js │ │ │ │ └── interop.js │ │ │ ├── index.html │ │ │ └── css │ │ │ │ └── site.css │ │ ├── Shared │ │ │ └── MainLayout.razor │ │ ├── _Imports.razor │ │ ├── App.razor │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ └── BlazorDialog.BlazorTestApp.Client.csproj │ └── BlazorDialog.BlazorTestApp.Server │ │ ├── BlazorDialog.BlazorTestApp.Server.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ └── Startup.cs └── BlazorDialog.TestAppsCommon │ ├── _Imports.razor │ ├── BlazorDialog.TestAppsCommon.csproj │ ├── NoServiceCommon.razor │ └── IndexCommon.razor ├── ReadmeResources └── dialog-demo.gif ├── DemoApp ├── BlazorDialog.DemoApp │ ├── Client │ │ ├── wwwroot │ │ │ ├── css │ │ │ │ ├── prism.css │ │ │ │ ├── open-iconic │ │ │ │ │ ├── font │ │ │ │ │ │ ├── fonts │ │ │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ │ │ └── open-iconic.woff │ │ │ │ │ │ └── css │ │ │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ ├── ICON-LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ └── FONT-LICENSE │ │ │ │ ├── custom-modal.css │ │ │ │ └── site.css │ │ │ ├── interop.js │ │ │ ├── spinner.svg │ │ │ ├── loader.js │ │ │ ├── index.html │ │ │ └── prism.js │ │ ├── _Imports.razor │ │ ├── Shared │ │ │ ├── TabItem.cs │ │ │ ├── CodeBlock.razor │ │ │ ├── TabStrip.razor │ │ │ ├── SourceFileLoader.razor │ │ │ ├── NavMenu.razor │ │ │ └── MainLayout.razor │ │ ├── Pages │ │ │ ├── NoService.razor │ │ │ ├── Events.razor │ │ │ ├── Service.razor │ │ │ └── Customization.razor │ │ ├── Program.cs │ │ ├── BlazorDialog.DemoApp.Client.csproj │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Sources │ │ │ ├── Index.razor │ │ │ ├── Customization.razor │ │ │ ├── Events.razor │ │ │ └── NoService.razor │ │ └── App.razor │ ├── Shared │ │ └── BlazorDialog.DemoApp.Shared.csproj │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Controllers │ │ └── SourceController.cs │ │ ├── BlazorDialog.DemoApp.Server.csproj │ │ └── Startup.cs └── BlazorDialog.DemoApp.sln ├── BlazorDialog ├── _Imports.razor ├── Components │ ├── DialogFooter.razor │ ├── DialogBody.razor │ ├── DialogInputProvider.razor │ ├── DialogHeader.razor │ └── Dialog.razor ├── DialogAnimation.cs ├── DialogSize.cs ├── IBlazorDialogStore.cs ├── package.json ├── DialogContext.cs ├── IBlazorDialogService.cs ├── ServiceCollectionExtensions.cs ├── Properties │ └── launchSettings.json ├── gulpfile.js ├── EventArgs.cs ├── BlazorDialogStore.cs ├── BlazorDialogService.cs ├── BlazorDialog.csproj └── wwwroot │ └── styles.css ├── Nuget.config ├── .editorconfig ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── LICENSE ├── .gitattributes ├── README.md ├── .gitignore └── BlazorDialog.sln /Artifacts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/Pages/NoService.razor: -------------------------------------------------------------------------------- 1 | @page "/noservice" 2 | 3 | -------------------------------------------------------------------------------- /ReadmeResources/dialog-demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tossnet/BlazorDialog/develop/ReadmeResources/dialog-demo.gif -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/wwwroot/js/interop.js: -------------------------------------------------------------------------------- 1 | function ShowBootstrapModal(id) { 2 | $("#" + id).modal(); 3 | } -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/prism.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tossnet/BlazorDialog/develop/DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/prism.css -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | 4 |
5 | Go to NoService 6 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tossnet/BlazorDialog/develop/TestApps/Server/BlazorDialog.BlazorServerTestApp/wwwroot/favicon.ico -------------------------------------------------------------------------------- /BlazorDialog/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Web 2 | @using Microsoft.AspNetCore.Components.Forms 3 | @using Microsoft.AspNetCore.Components.Routing 4 | @using Microsoft.JSInterop -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 |
5 | @Body 6 |
7 |
-------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 |
5 | @Body 6 |
7 |
-------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/interop.js: -------------------------------------------------------------------------------- 1 | DemoApp_RunPrism = function () { 2 | Prism.highlightAll(); 3 | } 4 | 5 | 6 | DemoApp_ScrollDown = function (element) { 7 | element.scrollTop = 99999; 8 | } 9 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tossnet/BlazorDialog/develop/DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tossnet/BlazorDialog/develop/DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tossnet/BlazorDialog/develop/DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tossnet/BlazorDialog/develop/DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /Nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /TestApps/BlazorDialog.TestAppsCommon/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Forms 2 | @using Microsoft.AspNetCore.Components.Routing 3 | @using Microsoft.AspNetCore.Components.Web 4 | @using Microsoft.JSInterop 5 | @using BlazorDialog -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Shared/BlazorDialog.DemoApp.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 7.3 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BlazorDialog/Components/DialogFooter.razor: -------------------------------------------------------------------------------- 1 | @namespace BlazorDialog 2 | 5 | 6 | @code{ 7 | [Parameter] public RenderFragment ChildContent { get; set; } 8 | [Parameter] public string CssClass { get; set; } 9 | } -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /BlazorDialog/DialogAnimation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BlazorDialog 6 | { 7 | public enum DialogAnimation 8 | { 9 | None, 10 | SlideDown, 11 | Zoom, 12 | FadeIn 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /BlazorDialog/Components/DialogBody.razor: -------------------------------------------------------------------------------- 1 | @namespace BlazorDialog 2 |
3 | @ChildContent 4 |
5 | 6 | @code{ 7 | 8 | [Parameter] public RenderFragment ChildContent { get; set; } 9 | 10 | [Parameter] public string CssClass { get; set; } 11 | } -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Components 3 | @using Microsoft.AspNetCore.Components.Routing 4 | @using System.Linq 5 | @using Microsoft.JSInterop 6 | @using BlazorDialog.BlazorTestApp.Client.Shared 7 | @using BlazorDialog 8 | @using BlazorDialog.TestAppsCommon -------------------------------------------------------------------------------- /BlazorDialog/DialogSize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorDialog 7 | { 8 | public enum DialogSize 9 | { 10 | Normal, 11 | Small, 12 | Large, 13 | ExtraLarge, 14 | FullScreen 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Components.Forms 3 | @using Microsoft.AspNetCore.Components.Routing 4 | @using Microsoft.AspNetCore.Components.Web 5 | @using Microsoft.JSInterop 6 | @using BlazorDialog.DemoApp.Client 7 | @using BlazorDialog.DemoApp.Client.Shared 8 | @using BlazorDialog -------------------------------------------------------------------------------- /BlazorDialog/IBlazorDialogStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BlazorDialog 6 | { 7 | public interface IBlazorDialogStore 8 | { 9 | 10 | void Register(Dialog blazorDialog); 11 | void Unregister(Dialog blazorDialog); 12 | Dialog GetById(string id); 13 | int GetVisibleDialogsCount(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /BlazorDialog/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "gulp": "^4.0.0", 4 | "gulp-cssmin": "^0.2.0", 5 | "gulp-rename": "^1.4.0", 6 | "gulp-uglify": "^3.0.2", 7 | "rimraf": "^2.6.3", 8 | "selenium-standalone": "^6.16.0" 9 | }, 10 | "scripts": { 11 | "minify": "gulp all", 12 | "selenium-install": "selenium-standalone install", 13 | "selenium-start": "selenium-standalone start" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
-------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Sorry, there's nothing at this address.

9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /BlazorDialog/Components/DialogInputProvider.razor: -------------------------------------------------------------------------------- 1 | @typeparam TInput 2 | @namespace BlazorDialog 3 | 4 | @ChildContent(new DialogContext(ParentDialog, (TInput)Input)) 5 | 6 | @code{ 7 | [Parameter] public RenderFragment> ChildContent { get; set; } 8 | [CascadingParameter(Name = "DialogInput")] protected object Input { get; set; } 9 | [CascadingParameter(Name = "ParentDialog")] protected Dialog ParentDialog { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/BlazorDialog.BlazorServerTestApp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Shared/TabItem.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorDialog.DemoApp.Client.Shared 8 | { 9 | public class TabItem 10 | { 11 | public string Id { get; set; } = Guid.NewGuid().ToString(); 12 | public string HeaderText { get; set; } 13 | public RenderFragment Contents { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorDialog.BlazorServerTestApp 9 | @using BlazorDialog.BlazorServerTestApp.Shared 10 | @using BlazorDialog 11 | @using BlazorDialog.TestAppsCommon -------------------------------------------------------------------------------- /BlazorDialog/DialogContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorDialog 7 | { 8 | public class DialogContext 9 | { 10 | public TInput Input { get; protected set; } 11 | public Dialog Dialog { get; protected set; } 12 | public DialogContext(Dialog blazorDialog , TInput input) 13 | { 14 | Dialog = blazorDialog; 15 | Input = input; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BlazorDialog/IBlazorDialogService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace BlazorDialog 4 | { 5 | public interface IBlazorDialogService 6 | { 7 | Task HideDialog(string dialogId); 8 | Task HideDialog(string dialogId, object result); 9 | Task ShowDialog(string dialogId); 10 | Task ShowDialog(string dialogId, object input); 11 | Task ShowDialog(string dialogId); 12 | Task ShowDialog(string dialogId, object input); 13 | } 14 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{cs,vb}] 2 | dotnet_naming_rule.private_members_with_underscore.symbols = private_fields 3 | dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore 4 | dotnet_naming_rule.private_members_with_underscore.severity = suggestion 5 | 6 | dotnet_naming_symbols.private_fields.applicable_kinds = field 7 | dotnet_naming_symbols.private_fields.applicable_accessibilities = private 8 | 9 | dotnet_naming_style.prefix_underscore.capitalization = camel_case 10 | dotnet_naming_style.prefix_underscore.required_prefix = _ -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Server/BlazorDialog.BlazorTestApp.Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Pages/NoService.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @{ 3 | var tabItems = new List() 4 | { 5 | new TabItem 6 | { 7 | HeaderText = "Demo", 8 | Contents = @ 9 | }, 10 | new TabItem 11 | { 12 | HeaderText = "<> Source", 13 | Contents = @ 14 | }, 15 | }; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /TestApps/BlazorDialog.TestAppsCommon/BlazorDialog.TestAppsCommon.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 7.3 6 | 3.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Pages/Events.razor: -------------------------------------------------------------------------------- 1 | @page "/Events" 2 | 3 | @{ 4 | var tabItems = new List() 5 | { 6 | new TabItem 7 | { 8 | HeaderText = "Demo", 9 | Contents = @ 10 | }, 11 | new TabItem 12 | { 13 | HeaderText = "<> Source", 14 | Contents = @
15 | 16 |
17 | } 18 | }; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /BlazorDialog/ServiceCollectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using BlazorDialog; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Extensions.DependencyInjection 8 | { 9 | public static class ServiceCollectionExtensions 10 | { 11 | public static IServiceCollection AddBlazorDialog(this IServiceCollection services) 12 | { 13 | services.AddScoped(); 14 | services.AddScoped(); 15 | return services; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BlazorDialog.BlazorTestApp 7 | 8 | 9 | 10 | 11 | 12 | Loading... 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Server/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Configuration; 4 | 5 | namespace BlazorDialog.DemoApp.Server 6 | { 7 | public class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | BuildWebHost(args).Run(); 12 | } 13 | 14 | public static IWebHost BuildWebHost(string[] args) => 15 | WebHost.CreateDefaultBuilder(args) 16 | .UseConfiguration(new ConfigurationBuilder() 17 | .AddCommandLine(args) 18 | .Build()) 19 | .UseStartup() 20 | .Build(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Pages/Service.razor: -------------------------------------------------------------------------------- 1 | @page "/Service" 2 | 3 | @{ 4 | var tabItems = new List() 5 | { 6 | new TabItem 7 | { 8 | HeaderText = "Demo", 9 | Contents = @ 10 | }, 11 | new TabItem 12 | { 13 | HeaderText = "<> Source", 14 | Contents = @
15 | 16 | 17 |
18 | } 19 | }; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Server/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Configuration; 4 | 5 | namespace BlazorDialog.BlazorTestApp.Server 6 | { 7 | public class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | BuildWebHost(args).Run(); 12 | } 13 | 14 | public static IWebHost BuildWebHost(string[] args) => 15 | WebHost.CreateDefaultBuilder(args) 16 | .UseConfiguration(new ConfigurationBuilder() 17 | .AddCommandLine(args) 18 | .Build()) 19 | .UseStartup() 20 | .Build(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Pages/Customization.razor: -------------------------------------------------------------------------------- 1 | @page "/Customization" 2 | 3 | @{ 4 | var tabItems = new List() 5 | { 6 | new TabItem 7 | { 8 | HeaderText = "Demo", 9 | Contents = @ 10 | }, 11 | new TabItem 12 | { 13 | HeaderText = "<> Source", 14 | Contents = @
15 | 16 | 17 |
18 | } 19 | }; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /BlazorDialog/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:59040/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BlazorDialog": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:59041/" 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Shared/CodeBlock.razor: -------------------------------------------------------------------------------- 1 | @inject IJSRuntime jsRuntime 2 | 3 |
4 | @if (!string.IsNullOrWhiteSpace(Title)) 5 | { 6 |
7 | @Title 8 |
9 | } 10 |
11 |
@ChildContent
12 |
13 |
14 | 15 | @functions{ 16 | [Parameter] public string Title { get; set; } 17 | [Parameter] public string Language { get; set; } 18 | [Parameter] public RenderFragment ChildContent { get; set; } 19 | 20 | protected override async Task OnAfterRenderAsync(bool firstRender) 21 | { 22 | await jsRuntime.InvokeAsync("DemoApp_RunPrism"); 23 | } 24 | } -------------------------------------------------------------------------------- /BlazorDialog/Components/DialogHeader.razor: -------------------------------------------------------------------------------- 1 | @namespace BlazorDialog 2 |
3 |
@ChildContent
4 | @if (ShowClose) 5 | { 6 | 9 | } 10 |
11 | 12 | @code{ 13 | [Parameter] public RenderFragment ChildContent { get; set; } 14 | [Parameter] public bool ShowClose { get; set; } = false; 15 | [Parameter] public string CssClass { get; set; } 16 | [CascadingParameter(Name = "ParentDialog")] Dialog Dialog { get; set; } 17 | 18 | private async Task OnCloseClick() 19 | { 20 | await Dialog.Hide(); 21 | } 22 | } -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 2 | using Microsoft.Extensions.DependencyInjection; 3 | using System; 4 | using System.Net.Http; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorDialog.DemoApp.Client 8 | { 9 | public class Program 10 | { 11 | public static async Task Main(string[] args) 12 | { 13 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 14 | 15 | builder.RootComponents.Add("app"); 16 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 17 | 18 | builder.Services.AddBlazorDialog(); 19 | 20 | await builder.Build().RunAsync(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50194", 7 | "sslPort": 44387 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BlazorDialog.BlazorServerTestApp": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Hosting; 10 | using Microsoft.Extensions.Logging; 11 | 12 | namespace BlazorDialog.BlazorServerTestApp 13 | { 14 | public class Program 15 | { 16 | public static void Main(string[] args) 17 | { 18 | CreateHostBuilder(args).Build().Run(); 19 | } 20 | 21 | public static IHostBuilder CreateHostBuilder(string[] args) => 22 | Host.CreateDefaultBuilder(args) 23 | .ConfigureWebHostDefaults(webBuilder => 24 | { 25 | webBuilder.UseStartup(); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | using System.Text; 6 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 7 | using Microsoft.Extensions.Configuration; 8 | using Microsoft.Extensions.DependencyInjection; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace BlazorDialog.BlazorTestApp.Client 12 | { 13 | public class Program 14 | { 15 | public static async Task Main(string[] args) 16 | { 17 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 18 | builder.RootComponents.Add("app"); 19 | 20 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 21 | builder.Services.AddBlazorDialog(); 22 | 23 | await builder.Build().RunAsync(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Desktop (please complete the following information):** 24 | - OS: [e.g. iOS] 25 | - Browser [e.g. chrome, safari] 26 | - Version [e.g. 22] 27 | 28 | **Smartphone (please complete the following information):** 29 | - Device: [e.g. iPhone6] 30 | - OS: [e.g. iOS8.1] 31 | - Browser [e.g. stock browser, safari] 32 | - Version [e.g. 22] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/BlazorDialog.DemoApp.Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 3.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:49636/", 7 | "sslPort": 44321 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorDialog.DemoApp.Client": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | }, 26 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:49633/", 7 | "sslPort": 44353 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorDialog.DemoApp.Server": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | }, 26 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:57871/", 7 | "sslPort": 44374 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorDialog.BlazorTestApp.Client": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | }, 25 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 26 | "applicationUrl": "http://localhost:57872/" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/BlazorDialog.BlazorTestApp.Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 3.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:57876/", 7 | "sslPort": 44353 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorDialog.BlazorTestApp.Server": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | }, 26 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 AkiraGTX 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /BlazorDialog/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require("gulp"), 2 | cssmin = require("gulp-cssmin"), 3 | rename = require("gulp-rename"), 4 | uglify = require("gulp-uglify"), 5 | rimraf = require("rimraf"); 6 | 7 | 8 | // gulp.task("clean:js", function (cb) { 9 | // rimraf("wwwroot/**/*.min.js", cb); 10 | // }); 11 | 12 | gulp.task("clean:css", function (cb) { 13 | rimraf("wwwroot/**/*.min.css", cb); 14 | }); 15 | 16 | gulp.task("min:css", function () { 17 | return gulp.src(["wwwroot/**/*.css", "!wwwroot/**/*.css.js"], { base: "." }) 18 | .pipe(cssmin()) 19 | .pipe(rename({ 20 | suffix: ".min" 21 | })) 22 | .pipe(gulp.dest(".")); 23 | }); 24 | 25 | // gulp.task("min:js", function () { 26 | // return gulp.src(["wwwroot/**/*.js", "!wwwroot/**/*.min.js"], { base: "." }) 27 | // .pipe(uglify()) 28 | // .pipe(rename({ 29 | // suffix: ".min" 30 | // })) 31 | // .pipe(gulp.dest(".")); 32 | // }); 33 | 34 | gulp.task("clean", gulp.parallel( /* "clean:js",*/ "clean:css")); 35 | gulp.task("min", gulp.parallel(/* "min:js" ,*/ "min:css")); 36 | gulp.task("all", gulp.series("clean", "min")); -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Server/Controllers/SourceController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | 9 | namespace BlazorDialog.DemoApp.Server.Controllers 10 | { 11 | [Route("api/[controller]")] 12 | public class SourceController : Controller 13 | { 14 | private readonly IWebHostEnvironment _hostingEnvironment; 15 | 16 | public SourceController(IWebHostEnvironment hostingEnvironment) 17 | { 18 | _hostingEnvironment = hostingEnvironment; 19 | } 20 | 21 | [HttpGet("{*path}")] 22 | public ActionResult Get(string path) 23 | { 24 | var mappedPath = Path.Combine(_hostingEnvironment.ContentRootPath, "ClientSources", path.Replace("_dot_", ".")); 25 | 26 | if (!System.IO.File.Exists(mappedPath)) 27 | { 28 | return NotFound(); 29 | } 30 | 31 | var source = System.IO.File.ReadAllText(mappedPath); 32 | return source; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Shared/TabStrip.razor: -------------------------------------------------------------------------------- 1 | 2 | @functions{ 3 | [Parameter] public string Title { get; set; } 4 | [Parameter] public List TabItems { get; set; } 5 | } 6 |
7 |
8 | 9 | 19 |
20 |
21 |
22 | @foreach (var tabItem in TabItems) 23 | { 24 |
25 | @tabItem.Contents 26 |
27 | } 28 |
29 |
30 |
-------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /BlazorDialog/EventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorDialog 7 | { 8 | public abstract class DialogEventArgs 9 | { 10 | public Dialog Dialog { get; protected set; } 11 | public DialogEventArgs(Dialog dialog) 12 | { 13 | Dialog = dialog; 14 | } 15 | } 16 | 17 | public class DialogBeforeShowEventArgs : DialogEventArgs 18 | { 19 | public DialogBeforeShowEventArgs(Dialog dialog) : base(dialog) 20 | { 21 | } 22 | 23 | //public bool PreventShow { get; set; } 24 | } 25 | 26 | public class DialogAfterShowEventArgs : DialogEventArgs 27 | { 28 | public DialogAfterShowEventArgs(Dialog dialog) : base(dialog) 29 | { 30 | } 31 | } 32 | 33 | public class DialogBeforeHideEventArgs : DialogEventArgs 34 | { 35 | public DialogBeforeHideEventArgs(Dialog dialog) : base(dialog) 36 | { 37 | } 38 | 39 | //public bool PreventHide { get; set; } 40 | } 41 | 42 | public class DialogAfterHideEventArgs : DialogEventArgs 43 | { 44 | public DialogAfterHideEventArgs(Dialog dialog) : base(dialog) 45 | { 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorDialog.BlazorServerTestApp.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @{ 5 | Layout = null; 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | BlazorDialog.BlazorServerTestApp 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | An error has occurred. This application may no longer respond until reloaded. 26 | 27 | 28 | An unhandled exception has occurred. See browser dev tools for details. 29 | 30 | Reload 31 | 🗙 32 |
33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/spinner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Sources/Index.razor: -------------------------------------------------------------------------------- 1 | @inject IBlazorDialogService dialogService 2 | 3 |
    4 |
  • You can use the IBlazorDialogService to call a dialog and await for the result.
  • 5 |
  • You can pass and receive any object as input or output.
  • 6 |
  • The dialog is searched by id, so it can exist anywhere in the app.
  • 7 |
  • There are some optional build-in helper components like DialogHeader, DialogBody, DialogFooter.
  • 8 |
  • Use the DialogInputProvider component to access the input object that was passed when the dialog was called.
  • 9 |
10 |
11 |
12 | 13 | 14 |
15 |
16 | 17 |
18 | 19 |
20 | 21 |
DialogResult: @dialogResult
22 | 23 | @code{ 24 | string dialogResult = null; 25 | string question = "Do you agree ?"; 26 | 27 | async Task ButtonOnClick() 28 | { 29 | dialogResult = null; 30 | 31 | //The dialog exists in App.razor 32 | dialogResult = await dialogService.ShowDialog("simple-dialog", question); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Shared/SourceFileLoader.razor: -------------------------------------------------------------------------------- 1 | @inject HttpClient httpClient 2 | 3 | @if(sourceFileContents == null) 4 | { 5 |

Loading ...

6 | } 7 | else 8 | { 9 | @sourceFileContents 10 | } 11 | 12 | @functions{ 13 | [Parameter] public string SourceFilePath { get; set; } 14 | 15 | private string sourceFileContents { get; set; } 16 | private string sourceFileName { get; set; } 17 | private string sourceFileLanguage { get; set; } 18 | protected override async Task OnParametersSetAsync() 19 | { 20 | sourceFileName = SourceFilePath.Split('/').Last(); 21 | sourceFileLanguage = GetLanguageByFileExtension(System.IO.Path.GetExtension(SourceFilePath)); 22 | sourceFileContents = await httpClient.GetStringAsync($"api/Source/{SourceFilePath.Replace(".", "_dot_")}"); 23 | } 24 | 25 | private string GetLanguageByFileExtension(string fileExtension) 26 | { 27 | switch (fileExtension) 28 | { 29 | case ".razor": 30 | return "html"; 31 | case ".js": 32 | return "javascript"; 33 | case ".cs": 34 | return "csharp"; 35 | case ".css": 36 | return "css"; 37 | default: 38 | throw new Exception("Unknown file extension"); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Server/BlazorDialog.DemoApp.Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/loader.js: -------------------------------------------------------------------------------- 1 | var startLoader = function (progressElement, textElement) { 2 | /* 3 | * Loader/splash screen 4 | * */ 5 | if (!window.XMLHttpRequest) { 6 | return; 7 | } 8 | var loading = {}; 9 | var files = []; 10 | var total = 0; 11 | var loaded = 0; 12 | var proxied = window.XMLHttpRequest.prototype.open; 13 | window.XMLHttpRequest.prototype.open = function () { 14 | var file = arguments[1]; 15 | files.push(file); 16 | total++; 17 | loading[file] = 1; 18 | this.addEventListener("load", function () { 19 | delete (loading[file]); 20 | loaded++; 21 | var progress = Math.floor(((loaded / total) * 100)); 22 | if (progressElement) { 23 | progressElement.max = total; 24 | progressElement.value = loaded; 25 | } 26 | if (textElement) { 27 | textElement.innerHTML = "Loaded " + file + " ..."; //+ ", " + progress + " %..." 28 | } 29 | if (loaded == total) { 30 | // Reset override. 31 | window.XMLHttpRequest.prototype.open = proxied; 32 | if (textElement) { 33 | textElement.innerHTML = "Loading 100%, opening application..."; 34 | } 35 | } 36 | }); 37 | return proxied.apply(this, [].slice.call(arguments)); 38 | }; 39 | }; -------------------------------------------------------------------------------- /BlazorDialog/BlazorDialogStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Security.Cryptography.X509Certificates; 4 | using System.Text; 5 | using System.Linq; 6 | 7 | namespace BlazorDialog 8 | { 9 | internal class BlazorDialogStore : IBlazorDialogStore 10 | { 11 | private Dictionary registeredDialogs = new Dictionary(); 12 | 13 | public Dialog GetById(string id) 14 | { 15 | if (registeredDialogs.ContainsKey(id)) 16 | { 17 | return registeredDialogs[id]; 18 | } 19 | 20 | throw new ArgumentException($"No dialog found for id '{id}'", nameof(id)); 21 | } 22 | 23 | public int GetVisibleDialogsCount() 24 | { 25 | return registeredDialogs.Count(x => x.Value.GetVisibility()); 26 | } 27 | 28 | public void Register(Dialog blazorDialog) 29 | { 30 | if (blazorDialog?.Id == null) 31 | { 32 | throw new ArgumentException("BlazorDialog Id is null", nameof(blazorDialog)); 33 | } 34 | registeredDialogs[blazorDialog.Id] = blazorDialog; 35 | } 36 | 37 | public void Unregister(Dialog blazorDialog) 38 | { 39 | if (blazorDialog.Id != null && registeredDialogs.ContainsKey(blazorDialog.Id)) 40 | { 41 | registeredDialogs.Remove(blazorDialog.Id); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /BlazorDialog/BlazorDialogService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorDialog 7 | { 8 | public class BlazorDialogService : IBlazorDialogService 9 | { 10 | private readonly IBlazorDialogStore _blazorDialogStore; 11 | 12 | public BlazorDialogService(IBlazorDialogStore blazorDialogStore) 13 | { 14 | _blazorDialogStore = blazorDialogStore; 15 | } 16 | 17 | public async Task HideDialog(string dialogId) 18 | { 19 | await _blazorDialogStore.GetById(dialogId).Hide(); 20 | } 21 | 22 | public async Task HideDialog(string dialogId, object result) 23 | { 24 | await _blazorDialogStore.GetById(dialogId).Hide(result); 25 | } 26 | 27 | public async Task ShowDialog(string dialogId) 28 | { 29 | await ShowDialog(dialogId, null); 30 | } 31 | 32 | public async Task ShowDialog(string dialogId) 33 | { 34 | return await ShowDialog(dialogId, null); 35 | } 36 | 37 | public async Task ShowDialog(string dialogId, object input) 38 | { 39 | await ShowDialog(dialogId, input); 40 | } 41 | 42 | public async Task ShowDialog(string dialogId, object input) 43 | { 44 | return await _blazorDialogStore.GetById(dialogId).Show(input); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 32 |
33 | 34 | @code { 35 | private bool collapseNavMenu = true; 36 | 37 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 38 | 39 | private void ToggleNavMenu() 40 | { 41 | collapseNavMenu = !collapseNavMenu; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 |

@context.Input

17 |
18 | 19 |

Lorem Ipsum

20 |

21 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, 22 | sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, 23 | et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 24 |

25 |
26 | 27 | 28 | 29 | 30 |
31 |
32 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 |

Blazor Dialog Samples App

10 | @*About*@ 11 | 12 | 17 | 18 |
19 | 20 |
21 | @Body 22 |
23 |
24 | -------------------------------------------------------------------------------- /BlazorDialog/BlazorDialog.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 3.0 6 | true 7 | 8 | 9 | false 10 | BlazorDialog 11 | Stavros Kasidis (AkiraGTX) 12 | https://github.com/stavroskasidis/BlazorDialog/blob/master/LICENSE 13 | https://github.com/stavroskasidis/BlazorDialog 14 | Dialog component as a service for Blazor 15 | https://github.com/stavroskasidis/BlazorDialog/blob/master/README.md 16 | 17 | blazor blazor-component blazor-dialog dialog modal blazor-modal blazordialog blazormodaldialog blazormodal razor razor-components razorcomponents 18 | $(VersionSuffix) 19 | 1.5.0 20 | $(Version)-$(VersionSuffix) 21 | BlazorDialog 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | false 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BlazorDialog DemoApp 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 |

Loading...

23 |
24 | 25 |
26 | 27 | 28 | 29 |
30 | 31 |
32 | An unhandled error has occurred. 33 | Reload 34 | 🗙 35 |
36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Server/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.AspNetCore.ResponseCompression; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Hosting; 6 | using System.Linq; 7 | 8 | namespace BlazorDialog.DemoApp.Server 9 | { 10 | public class Startup 11 | { 12 | // This method gets called by the runtime. Use this method to add services to the container. 13 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 14 | public void ConfigureServices(IServiceCollection services) 15 | { 16 | services.AddControllersWithViews(); 17 | services.AddRazorPages(); 18 | } 19 | 20 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 21 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 22 | { 23 | if (env.IsDevelopment()) 24 | { 25 | app.UseDeveloperExceptionPage(); 26 | app.UseWebAssemblyDebugging(); 27 | } 28 | else 29 | { 30 | app.UseExceptionHandler("/Error"); 31 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 32 | app.UseHsts(); 33 | } 34 | 35 | app.UseHttpsRedirection(); 36 | app.UseBlazorFrameworkFiles(); 37 | app.UseStaticFiles(); 38 | 39 | app.UseRouting(); 40 | 41 | app.UseEndpoints(endpoints => 42 | { 43 | endpoints.MapRazorPages(); 44 | endpoints.MapControllers(); 45 | endpoints.MapFallbackToFile("index.html"); 46 | }); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Server/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.AspNetCore.ResponseCompression; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Hosting; 6 | using System.Linq; 7 | using System.Net.Mime; 8 | 9 | namespace BlazorDialog.BlazorTestApp.Server 10 | { 11 | public class Startup 12 | { 13 | // This method gets called by the runtime. Use this method to add services to the container. 14 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 15 | public void ConfigureServices(IServiceCollection services) 16 | { 17 | services.AddControllersWithViews(); 18 | services.AddRazorPages(); 19 | } 20 | 21 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 22 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 23 | { 24 | if (env.IsDevelopment()) 25 | { 26 | app.UseDeveloperExceptionPage(); 27 | app.UseWebAssemblyDebugging(); 28 | } 29 | else 30 | { 31 | app.UseExceptionHandler("/Error"); 32 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 33 | app.UseHsts(); 34 | } 35 | 36 | app.UseHttpsRedirection(); 37 | app.UseBlazorFrameworkFiles(); 38 | app.UseStaticFiles(); 39 | 40 | app.UseRouting(); 41 | 42 | app.UseEndpoints(endpoints => 43 | { 44 | endpoints.MapRazorPages(); 45 | endpoints.MapControllers(); 46 | endpoints.MapFallbackToFile("index.html"); 47 | }); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/custom-modal.css: -------------------------------------------------------------------------------- 1 | /* The mymodal (background) */ 2 | .mymodal { 3 | position: fixed; /* Stay in place */ 4 | z-index: 1; /* Sit on top */ 5 | padding-top: 100px; /* Location of the box */ 6 | left: 0; 7 | top: 0; 8 | width: 100%; /* Full width */ 9 | height: 100%; /* Full height */ 10 | overflow: auto; /* Enable scroll if needed */ 11 | background-color: rgb(0,0,0); /* Fallback color */ 12 | background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ 13 | } 14 | 15 | /* mymodal Content */ 16 | .mymodal-content { 17 | position: relative; 18 | background-color: #fefefe; 19 | margin: auto; 20 | padding: 0; 21 | border: 1px solid #888; 22 | width: 80%; 23 | box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); 24 | -webkit-animation-name: myanimatetop; 25 | -webkit-animation-duration: 0.4s; 26 | animation-name: myanimatetop; 27 | animation-duration: 0.4s 28 | } 29 | 30 | /* Add Animation */ 31 | @-webkit-keyframes myanimatetop { 32 | from { 33 | top: -300px; 34 | opacity: 0 35 | } 36 | 37 | to { 38 | top: 0; 39 | opacity: 1 40 | } 41 | } 42 | 43 | @keyframes myanimatetop { 44 | from { 45 | top: -300px; 46 | opacity: 0 47 | } 48 | 49 | to { 50 | top: 0; 51 | opacity: 1 52 | } 53 | } 54 | 55 | /* The Close Button */ 56 | .mymodal-close { 57 | color: white; 58 | float: right; 59 | font-size: 28px; 60 | font-weight: bold; 61 | } 62 | 63 | .mymodal-close:hover, 64 | .mymodal-close:focus { 65 | color: #000; 66 | text-decoration: none; 67 | cursor: pointer; 68 | } 69 | 70 | .mymodal-header { 71 | padding: 2px 16px; 72 | background-color: #5cb85c; 73 | color: white; 74 | } 75 | 76 | .mymodal-body { 77 | padding: 2px 16px; 78 | } 79 | 80 | .mymodal-footer { 81 | padding: 2px 16px; 82 | background-color: #5cb85c; 83 | color: white; 84 | } 85 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Components; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.AspNetCore.HttpsPolicy; 9 | using Microsoft.Extensions.Configuration; 10 | using Microsoft.Extensions.DependencyInjection; 11 | using Microsoft.Extensions.Hosting; 12 | 13 | namespace BlazorDialog.BlazorServerTestApp 14 | { 15 | public class Startup 16 | { 17 | public Startup(IConfiguration configuration) 18 | { 19 | Configuration = configuration; 20 | } 21 | 22 | public IConfiguration Configuration { get; } 23 | 24 | // This method gets called by the runtime. Use this method to add services to the container. 25 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 26 | public void ConfigureServices(IServiceCollection services) 27 | { 28 | services.AddRazorPages(); 29 | services.AddServerSideBlazor(); 30 | services.AddBlazorDialog(); 31 | } 32 | 33 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 34 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 35 | { 36 | if (env.IsDevelopment()) 37 | { 38 | app.UseDeveloperExceptionPage(); 39 | } 40 | else 41 | { 42 | app.UseExceptionHandler("/Error"); 43 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 44 | app.UseHsts(); 45 | } 46 | 47 | app.UseHttpsRedirection(); 48 | app.UseStaticFiles(); 49 | 50 | app.UseRouting(); 51 | 52 | app.UseEndpoints(endpoints => 53 | { 54 | endpoints.MapBlazorHub(); 55 | endpoints.MapFallbackToPage("/_Host"); 56 | }); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Sources/Customization.razor: -------------------------------------------------------------------------------- 1 |
    2 |
  • If you don't want to use the opinionated build-in dialog styling/css you don't have to!
  • 3 |
  • Use any markup/css you want and the dialog will render that when showing itself.
  • 4 |
  • There are some caveats though. You have to provide every bit of css and html that makes the dialog appear 5 | and behave as a dialog (e.g. modal/with backdrop etc).
  • 6 |
  • This approach is well suited when you want to use a dialog as a service but you want to use completely custom html/css.
  • 7 |
  • Dialog parameters such as Centered and Side are ignored in custom dialogs.
  • 8 |
9 | 10 | 11 | 12 |
13 |
14 |
15 | × 16 |

@question

17 |
18 |
19 |

Some text in the Modal Body

20 |

Some other text...

21 |
22 | 26 |
27 |
28 |
29 | 30 |
31 | 32 |
33 | 34 |
DialogResult: @dialogResult
35 | 36 | @code{ 37 | string dialogResult = null; 38 | bool isShowing = false; 39 | string question = "Do you agree ?"; 40 | 41 | void ButtonOnClick() 42 | { 43 | dialogResult = null; 44 | isShowing = true; 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29613.14 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog.DemoApp.Server", "BlazorDialog.DemoApp\Server\BlazorDialog.DemoApp.Server.csproj", "{25348309-869E-4D7A-AEDC-FACFF12145F3}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog.DemoApp.Client", "BlazorDialog.DemoApp\Client\BlazorDialog.DemoApp.Client.csproj", "{C62F0AA9-9442-41A7-854F-47BF5126FE31}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog.DemoApp.Shared", "BlazorDialog.DemoApp\Shared\BlazorDialog.DemoApp.Shared.csproj", "{A21CB807-ACB7-4C74-8959-37225100BC3B}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {25348309-869E-4D7A-AEDC-FACFF12145F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {25348309-869E-4D7A-AEDC-FACFF12145F3}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {25348309-869E-4D7A-AEDC-FACFF12145F3}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {25348309-869E-4D7A-AEDC-FACFF12145F3}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {C62F0AA9-9442-41A7-854F-47BF5126FE31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {C62F0AA9-9442-41A7-854F-47BF5126FE31}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {C62F0AA9-9442-41A7-854F-47BF5126FE31}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {C62F0AA9-9442-41A7-854F-47BF5126FE31}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {A21CB807-ACB7-4C74-8959-37225100BC3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {A21CB807-ACB7-4C74-8959-37225100BC3B}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {A21CB807-ACB7-4C74-8959-37225100BC3B}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {A21CB807-ACB7-4C74-8959-37225100BC3B}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {6A561432-E617-4870-B9D6-7FE91E89E0D4} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /TestApps/Wasm/BlazorDialog.BlazorTestApp.Client/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | app { 8 | position: relative; 9 | display: flex; 10 | flex-direction: column; 11 | } 12 | 13 | .top-row { 14 | height: 3.5rem; 15 | display: flex; 16 | align-items: center; 17 | } 18 | 19 | .main { 20 | flex: 1; 21 | } 22 | 23 | .main .top-row { 24 | background-color: #e6e6e6; 25 | border-bottom: 1px solid #d6d5d5; 26 | } 27 | 28 | .sidebar { 29 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 30 | } 31 | 32 | .sidebar .top-row { 33 | background-color: rgba(0,0,0,0.4); 34 | } 35 | 36 | .sidebar .navbar-brand { 37 | font-size: 1.1rem; 38 | } 39 | 40 | .sidebar .oi { 41 | width: 2rem; 42 | font-size: 1.1rem; 43 | vertical-align: text-top; 44 | top: -2px; 45 | } 46 | 47 | .nav-item { 48 | font-size: 0.9rem; 49 | padding-bottom: 0.5rem; 50 | } 51 | 52 | .nav-item:first-of-type { 53 | padding-top: 1rem; 54 | } 55 | 56 | .nav-item:last-of-type { 57 | padding-bottom: 1rem; 58 | } 59 | 60 | .nav-item a { 61 | color: #d7d7d7; 62 | border-radius: 4px; 63 | height: 3rem; 64 | display: flex; 65 | align-items: center; 66 | line-height: 3rem; 67 | } 68 | 69 | .nav-item a.active { 70 | background-color: rgba(255,255,255,0.25); 71 | color: white; 72 | } 73 | 74 | .nav-item a:hover { 75 | background-color: rgba(255,255,255,0.1); 76 | color: white; 77 | } 78 | 79 | .content { 80 | padding-top: 1.1rem; 81 | } 82 | 83 | .navbar-toggler { 84 | background-color: rgba(255, 255, 255, 0.1); 85 | } 86 | 87 | @media (max-width: 767.98px) { 88 | .main .top-row { 89 | display: none; 90 | } 91 | } 92 | 93 | @media (min-width: 768px) { 94 | app { 95 | flex-direction: row; 96 | } 97 | 98 | .sidebar { 99 | width: 250px; 100 | height: 100vh; 101 | position: sticky; 102 | top: 0; 103 | } 104 | 105 | .main .top-row { 106 | position: sticky; 107 | top: 0; 108 | } 109 | 110 | .main > div { 111 | padding-left: 2rem !important; 112 | padding-right: 1.5rem !important; 113 | } 114 | 115 | .navbar-toggler { 116 | display: none; 117 | } 118 | 119 | .sidebar .collapse { 120 | /* Never collapse the sidebar for wide screens */ 121 | display: block; 122 | } 123 | } 124 | 125 | 126 | .bootstrap-static-modal .modal{ 127 | display:block; 128 | } -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Sources/Events.razor: -------------------------------------------------------------------------------- 1 | @inject IBlazorDialogService dialogService 2 | @inject IJSRuntime jsRuntime 3 | 4 |

Dialog exposes the following events:

5 |
    6 |
  • OnBeforeShow
  • 7 |
  • OnAfterShow
  • 8 |
  • OnBeforeHide
  • 9 |
  • OnAfterHide
  • 10 |
11 | 12 |
13 | 14 |
15 | 16 |
DialogResult: @dialogResult
17 | 18 |
19 |
20 | EVENT LOG 21 | Clear 22 |
23 |
24 | @foreach (var eventEntry in events) 25 | { 26 |
@eventEntry
27 | } 28 |
29 |
30 | 31 | 32 | 33 |

Lorem Ipsum

34 |

35 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, 36 | sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, 37 | et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 38 |

39 |
40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 48 | @code{ 49 | string dialogResult = null; 50 | bool? isShowing = false; 51 | List events = new List(); 52 | ElementReference eventLogElement; 53 | 54 | async Task ButtonOnClick() 55 | { 56 | dialogResult = null; 57 | isShowing = true; 58 | } 59 | 60 | public async Task OnBeforeShow(DialogBeforeShowEventArgs e) 61 | { 62 | await AddEventLogItem("Event: OnBeforeShow"); 63 | } 64 | 65 | public async Task OnAfterShow(DialogAfterShowEventArgs e) 66 | { 67 | await AddEventLogItem("Event: OnAfterShow"); 68 | } 69 | 70 | public async Task OnBeforeHide(DialogBeforeHideEventArgs e) 71 | { 72 | await AddEventLogItem("Event: OnBeforeHide"); 73 | } 74 | 75 | public async Task OnAfterHide(DialogAfterHideEventArgs e) 76 | { 77 | await AddEventLogItem("Event: OnAfterHide"); 78 | } 79 | 80 | protected async Task AddEventLogItem(string eventLogItem) 81 | { 82 | events.Add(eventLogItem); 83 | await Task.Delay(50); 84 | await jsRuntime.InvokeVoidAsync("DemoApp_ScrollDown", eventLogElement); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/Sources/NoService.razor: -------------------------------------------------------------------------------- 1 |
    2 |
  • You can use BlazorDialog as a regular component.
  • 3 |
  • You can use a flag to indicate if it is showing or not.
  • 4 |
  • There are some optional build-in helper components like DialogHeader, DialogBody, DialogFooter.
  • 5 |
6 |
7 |
8 | 9 | 10 | 11 | 18 | 19 | 20 | 26 | 27 |
28 | 29 | 30 |
31 | 32 |
33 |
34 | 35 | 36 | 37 |

@question

38 |
39 | 40 |

Lorem Ipsum

41 |

42 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, 43 | sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, 44 | et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 45 |

46 |
47 | 48 | 49 | 50 | 51 |
52 | 53 |
54 | 55 |
56 | 57 |
DialogResult: @dialogResult
58 | 59 | @code{ 60 | string dialogResult = null; 61 | bool isShowing = false; 62 | bool isCentered; 63 | string question = "Do you agree ?"; 64 | DialogSize size; 65 | DialogAnimation animation; 66 | 67 | void ButtonOnClick() 68 | { 69 | dialogResult = null; 70 | isShowing = true; 71 | } 72 | 73 | } -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blazor Dialog 2 | 3 | [![Build status](https://dev.azure.com/stavros-kasidis/Blazor%20Dialog/_apis/build/status/Blazor%20Dialog-CI)](https://dev.azure.com/stavros-kasidis/Blazor%20Dialog/_build/latest?definitionId=16) [![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/BlazorDialog.svg?logo=nuget)](https://www.nuget.org/packages/BlazorDialog) [![Nuget](https://img.shields.io/nuget/dt/BlazorDialog.svg?logo=nuget)](https://www.nuget.org/packages/BlazorDialog) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=7CRGWPYB5AKJQ¤cy_code=EUR&source=url) 4 | 5 | Dialog component as a service for [Blazor](https://blazor.net)! 6 | 7 | ![demo-img](ReadmeResources/dialog-demo.gif) 8 | 9 | ## Features 10 | * Call a dialog procedurally as a service and `await` for the result ! 11 | * Can use dialogs as normal components (if you don't want to use as a service). 12 | * Build-in modal dialog with optional helper components (`Header`, `Body`, `Footer`). 13 | * Option to use completely custom markup/css (without using the build-in opinionated css and html). 14 | 15 | 16 | ## Samples / Demo 17 | You can find code samples and demos [here](https://blazor-dialog-demo.azurewebsites.net/). 18 | 19 | ## Installation 20 | **1. Add the nuget package in your Blazor project** 21 | ``` 22 | > dotnet add package BlazorDialog 23 | 24 | OR 25 | 26 | PM> Install-Package BlazorDialog 27 | ``` 28 | *Nuget package page can be found [here](https://www.nuget.org/packages/BlazorDialog).* 29 | 30 | **2. Add the following line in your Blazor project in either `Startup.cs` (blazor server-side) or `Program.cs` (blazor wasm)** 31 | 32 | **- Blazor server-side: `Startup.cs`** 33 | ```csharp 34 | public class Startup 35 | { 36 | public void ConfigureServices(IServiceCollection services) 37 | { 38 | // other code 39 | services.AddBlazorDialog(); 40 | // other code 41 | } 42 | } 43 | ``` 44 | 45 | **- Blazor wasm: `Program.cs`** 46 | ```csharp 47 | public class Program 48 | { 49 | public static async Task Main(string[] args) 50 | { 51 | // other code 52 | builder.Services.AddBlazorDialog(); 53 | // other code 54 | } 55 | } 56 | ``` 57 | **3. Add the following line in your `_Imports.razor`** 58 | ```csharp 59 | @using BlazorDialog 60 | ``` 61 | **4. Reference the css file** 62 | 63 | Add the following static file reference in your `_Host.cshtml` (server-side blazor) or in your `index.html` (client-side blazor). 64 | Make sure that there is a call to `app.UseStaticFiles();` in your server project's `Startup.cs`. 65 | 66 | ```html 67 | 68 | ``` 69 | 70 | ## ⚠️ Breaking changes ⚠️ 71 | 72 |
Upgrading from 0.3 to 1.0 73 | 74 | >- Removed `PreventShow` and `PreventHide` from `OnBeforeShow` and `OnBeforeHide` respectively. Too many cases where infinite loops could happen. 75 |
76 | 77 | ## Release Notes 78 | 79 |
1.5 80 | 81 | >- Added css class parameter to all helper components (header/body/footer). 82 |
83 | 84 |
1.4 85 | 86 | >- Added css class parameter to dialog component. 87 |
88 | 89 |
1.3 90 | 91 | >- Added base z-index parameter to dialog component. 92 |
93 | 94 |
1.2 95 | 96 | >- Added fullscreen mode. 97 |
98 | 99 |
1.1 100 | 101 | >- Added support for dialog-in-dialog. 102 |
103 | 104 |
1.0 105 | 106 | >- Fixed an infinite loop bug with `OnBeforeShow` event. 107 | >- Fixed css bugs. 108 | >- Removed `PreventShow` and `PreventHide` from `OnBeforeShow` and `OnBeforeHide` respectively. Too many cases where infinite loops could happen. 109 |
110 | 111 |
0.3 112 | 113 | >- Upgrated to 3.1. 114 | >- Added new helper components: `DialogHeader`, `DialogBody`, `DialogFooter` 115 |
116 | 117 |
0.1 118 | 119 | >- Initial release. 120 |
121 | -------------------------------------------------------------------------------- /TestApps/Server/BlazorDialog.BlazorServerTestApp/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | a, .btn-link { 8 | color: #0366d6; 9 | } 10 | 11 | .btn-primary { 12 | color: #fff; 13 | background-color: #1b6ec2; 14 | border-color: #1861ac; 15 | } 16 | 17 | app { 18 | position: relative; 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | 23 | .top-row { 24 | height: 3.5rem; 25 | display: flex; 26 | align-items: center; 27 | } 28 | 29 | .main { 30 | flex: 1; 31 | } 32 | 33 | .main .top-row { 34 | background-color: #f7f7f7; 35 | border-bottom: 1px solid #d6d5d5; 36 | justify-content: flex-end; 37 | } 38 | 39 | .main .top-row > a, .main .top-row .btn-link { 40 | white-space: nowrap; 41 | margin-left: 1.5rem; 42 | } 43 | 44 | .main .top-row a:first-child { 45 | overflow: hidden; 46 | text-overflow: ellipsis; 47 | } 48 | 49 | .sidebar { 50 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 51 | } 52 | 53 | .sidebar .top-row { 54 | background-color: rgba(0,0,0,0.4); 55 | } 56 | 57 | .sidebar .navbar-brand { 58 | font-size: 1.1rem; 59 | } 60 | 61 | .sidebar .oi { 62 | width: 2rem; 63 | font-size: 1.1rem; 64 | vertical-align: text-top; 65 | top: -2px; 66 | } 67 | 68 | .sidebar .nav-item { 69 | font-size: 0.9rem; 70 | padding-bottom: 0.5rem; 71 | } 72 | 73 | .sidebar .nav-item:first-of-type { 74 | padding-top: 1rem; 75 | } 76 | 77 | .sidebar .nav-item:last-of-type { 78 | padding-bottom: 1rem; 79 | } 80 | 81 | .sidebar .nav-item a { 82 | color: #d7d7d7; 83 | border-radius: 4px; 84 | height: 3rem; 85 | display: flex; 86 | align-items: center; 87 | line-height: 3rem; 88 | } 89 | 90 | .sidebar .nav-item a.active { 91 | background-color: rgba(255,255,255,0.25); 92 | color: white; 93 | } 94 | 95 | .sidebar .nav-item a:hover { 96 | background-color: rgba(255,255,255,0.1); 97 | color: white; 98 | } 99 | 100 | .content { 101 | padding-top: 1.1rem; 102 | } 103 | 104 | .navbar-toggler { 105 | background-color: rgba(255, 255, 255, 0.1); 106 | } 107 | 108 | .valid.modified:not([type=checkbox]) { 109 | outline: 1px solid #26b050; 110 | } 111 | 112 | .invalid { 113 | outline: 1px solid red; 114 | } 115 | 116 | .validation-message { 117 | color: red; 118 | } 119 | 120 | #blazor-error-ui { 121 | background: lightyellow; 122 | bottom: 0; 123 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 124 | display: none; 125 | left: 0; 126 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 127 | position: fixed; 128 | width: 100%; 129 | z-index: 1000; 130 | } 131 | 132 | #blazor-error-ui .dismiss { 133 | cursor: pointer; 134 | position: absolute; 135 | right: 0.75rem; 136 | top: 0.5rem; 137 | } 138 | 139 | @media (max-width: 767.98px) { 140 | .main .top-row:not(.auth) { 141 | display: none; 142 | } 143 | 144 | .main .top-row.auth { 145 | justify-content: space-between; 146 | } 147 | 148 | .main .top-row a, .main .top-row .btn-link { 149 | margin-left: 0; 150 | } 151 | } 152 | 153 | @media (min-width: 768px) { 154 | app { 155 | flex-direction: row; 156 | } 157 | 158 | .sidebar { 159 | width: 250px; 160 | height: 100vh; 161 | position: sticky; 162 | top: 0; 163 | } 164 | 165 | .main .top-row { 166 | position: sticky; 167 | top: 0; 168 | } 169 | 170 | .main > div { 171 | padding-left: 2rem !important; 172 | padding-right: 1.5rem !important; 173 | } 174 | 175 | .navbar-toggler { 176 | display: none; 177 | } 178 | 179 | .sidebar .collapse { 180 | /* Never collapse the sidebar for wide screens */ 181 | display: block; 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /BlazorDialog/wwwroot/styles.css: -------------------------------------------------------------------------------- 1 | .blazor-dialog-container { 2 | position: fixed; 3 | left: 0; 4 | top: 0; 5 | width: 100%; /* Full width */ 6 | height: 100%; /* Full height */ 7 | /*overflow: auto;*/ /* Enable scroll if needed */ 8 | background-color: rgb(0,0,0); /* Fallback color */ 9 | background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ 10 | } 11 | 12 | .blazor-dialog-body { 13 | position: relative; 14 | flex: 1 1 auto; 15 | padding: 1rem; 16 | } 17 | 18 | .blazor-dialog-header { 19 | display: flex; 20 | align-items: flex-start; 21 | justify-content: space-between; 22 | padding: 1rem; 23 | border-bottom: 1px solid #e9ecef; 24 | border-top-left-radius: .3rem; 25 | border-top-right-radius: .3rem; 26 | } 27 | 28 | .blazor-dialog-title { 29 | margin-bottom: 0; 30 | line-height: 1.5; 31 | } 32 | 33 | .blazor-dialog-close { 34 | margin-top: auto; 35 | margin-bottom: auto; 36 | background-color: transparent; 37 | border: 0; 38 | float: right; 39 | font-size: 1.5rem; 40 | font-weight: 700; 41 | line-height: 1; 42 | color: #000; 43 | text-shadow: 0 1px 0 #fff; 44 | opacity: .5; 45 | cursor: pointer; 46 | } 47 | 48 | .blazor-dialog-close:hover { 49 | color: #000; 50 | text-decoration: none; 51 | opacity: .75; 52 | } 53 | 54 | 55 | .blazor-dialog-footer { 56 | display: flex; 57 | align-items: center; 58 | justify-content: flex-end; 59 | padding: 1rem; 60 | border-top: 1px solid #e9ecef; 61 | } 62 | 63 | .blazor-dialog-footer > :not(:last-child) { 64 | margin-right: .25rem; 65 | } 66 | 67 | .blazor-dialog-footer > :not(:first-child) { 68 | margin-left: .25rem; 69 | } 70 | 71 | @media (min-width: 576px) { 72 | .blazor-dialog-centered { 73 | min-height: calc(100% - (1.75rem * 2)); 74 | } 75 | } 76 | 77 | .blazor-dialog-centered { 78 | display: -webkit-box; 79 | display: -ms-flexbox; 80 | display: flex; 81 | -webkit-box-align: center; 82 | -ms-flex-align: center; 83 | align-items: center; 84 | min-height: calc(100% - (.5rem * 2)); 85 | } 86 | 87 | .blazor-dialog-content-wrapper { 88 | position: relative; 89 | background-color: #fefefe; 90 | margin: auto; 91 | padding: 0; 92 | border: 1px solid #888; 93 | width: 80%; 94 | box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); 95 | } 96 | 97 | .blazor-dialog-content-wrapper-full { 98 | width: 100%; 99 | height: 100%; 100 | margin: 0; 101 | border: 0; 102 | min-height:100%; 103 | overflow: auto; 104 | } 105 | 106 | .blazor-dialog-content-wrapper-full .blazor-dialog-content { 107 | margin: 0; 108 | display: flex; 109 | flex-direction: column; 110 | height: 100%; 111 | } 112 | 113 | .blazor-dialog-content { 114 | margin: 5px; 115 | } 116 | 117 | .blazor-dialog-content-wrapper-windowed{ 118 | max-height:90%; 119 | overflow: auto; 120 | } 121 | 122 | @media (min-width: 576px) { 123 | .blazor-dialog-content-wrapper-normal { 124 | max-width: 500px; 125 | margin: 2.75rem auto; 126 | } 127 | } 128 | 129 | @media (min-width: 992px) { 130 | .blazor-dialog-content-wrapper-large { 131 | max-width: 800px; 132 | margin: 2.75rem auto; 133 | } 134 | } 135 | 136 | @media (min-width: 1416px) { 137 | .blazor-dialog-content-wrapper-xlarge { 138 | max-width: 1200px; 139 | margin: 2.75rem auto; 140 | } 141 | } 142 | 143 | @media (min-width: 576px) { 144 | .blazor-dialog-content-wrapper-small { 145 | max-width: 300px; 146 | margin: 2.75rem auto; 147 | } 148 | } 149 | 150 | /* ============== Animations ==============*/ 151 | 152 | .blazor-dialog__animations--slidedown { 153 | animation: blazordialog-slidedown; 154 | animation-duration: 0.3s; 155 | } 156 | 157 | @keyframes blazordialog-slidedown { 158 | from { 159 | transform: translateY(-50px); 160 | opacity: 0 161 | } 162 | 163 | to { 164 | transform: translateY(0px); 165 | opacity: 1 166 | } 167 | } 168 | 169 | .blazor-dialog__animations--zoom { 170 | animation: blazordialog-zoom; 171 | animation-duration: 0.3s; 172 | } 173 | 174 | @keyframes blazordialog-zoom { 175 | from { 176 | transform: scale(0.5); 177 | opacity: 0 178 | } 179 | 180 | to { 181 | transform: scale(1); 182 | opacity: 1 183 | } 184 | } 185 | 186 | .blazor-dialog__animations--fadein { 187 | animation: blazordialog-fadein; 188 | animation-duration: 0.4s; 189 | } 190 | 191 | @keyframes blazordialog-fadein { 192 | from { 193 | opacity: 0 194 | } 195 | 196 | to { 197 | opacity: 1 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /TestApps/BlazorDialog.TestAppsCommon/NoServiceCommon.razor: -------------------------------------------------------------------------------- 1 |

Click the buttons to show the corresponding dialog

2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 |

Simple Dialog (No Service)

16 | 17 | 18 |
19 | 20 | " + dialogResult)"> 21 | 22 |

@context.Input

23 | 24 | 25 |
26 |
27 | 28 | 29 |

Simple Large Dialog (No Service)

30 |

Lorem Ipsum

31 |

32 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 33 | 34 | Duis ultrices lorem id fringilla semper. Integer bibendum sagittis arcu in bibendum. Vivamus rhoncus feugiat leo accumsan bibendum. Aliquam ac turpis ut sem luctus laoreet. Donec sed tristique elit. Proin sit amet blandit dolor, eget aliquam mi. Nullam in ante aliquet, placerat turpis id, blandit enim. Donec sed ligula nisl. Ut varius vulputate suscipit. Nam at tristique odio. 35 | 36 | Cras tincidunt ex arcu, quis luctus felis aliquet non. Morbi eget eleifend elit, quis molestie est. Sed vitae nulla non massa efficitur vulputate condimentum condimentum mauris. Suspendisse potenti. Suspendisse potenti. Ut ornare, odio a lacinia accumsan, ante ante accumsan elit, sit amet fringilla nulla felis quis arcu. Vestibulum eget erat non leo fringilla fringilla. Cras sed massa ac sapien mollis congue at non lorem. Vivamus ut justo id turpis iaculis pretium. Fusce leo odio, fringilla id ante sit amet, viverra vehicula neque. Phasellus maximus nisi elit. Aenean vitae rutrum ex. 37 | 38 | Donec nibh ex, fringilla non tempus vel, rutrum feugiat orci. Donec diam massa, varius sit amet consequat scelerisque, congue ut nisl. Pellentesque scelerisque massa nisl, id aliquet justo facilisis nec. Donec consequat sapien ut quam eleifend, et laoreet tellus vehicula. Integer facilisis mauris nec pulvinar cursus. In quis magna elit. Praesent scelerisque, libero sed faucibus auctor, leo lectus blandit nisl, sit amet mattis dolor lacus vitae diam. Donec vitae neque eu ipsum porttitor facilisis. Sed a sagittis enim. 39 | 40 | Curabitur ac purus quis purus dictum aliquam at nec diam. Fusce est felis, auctor ut ex et, lobortis lacinia urna. Fusce egestas mi lorem, vel sagittis enim euismod dignissim. Nam porta nec sem sed malesuada. Ut non sollicitudin ex. Nam luctus sem a elit volutpat, in iaculis massa ultrices. Aliquam congue magna sem. Quisque mi elit, volutpat et mauris non, pellentesque commodo tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras tincidunt a odio non scelerisque. Duis tincidunt a quam a lacinia. Vivamus nec justo gravida dui commodo vulputate. Nulla risus ante, vehicula id enim sit amet, vestibulum pellentesque nibh. Morbi a lectus semper, blandit mauris sed, tristique nibh. 41 |

42 | 43 | 44 | 45 |
46 | 47 | 48 | 49 | 50 | 51 | @if (dialogResult != null) 52 | { 53 |
DialogResult: @dialogResult
54 | } 55 | 56 | @code{ 57 | string dialogResult = null; 58 | bool simpleIsShowing; 59 | bool simpleWithInputIsShowing; 60 | bool simpleLargeIsShowing; 61 | bool isCentered; 62 | DialogSize size; 63 | 64 | void SimpleDialogOnClick() 65 | { 66 | simpleIsShowing = true; 67 | } 68 | 69 | void SimpleDialogWithInputOnClick() 70 | { 71 | simpleWithInputIsShowing = true; 72 | } 73 | 74 | void SimpleDialogBigOnClick() 75 | { 76 | simpleLargeIsShowing = true; 77 | } 78 | 79 | protected void OnDialogResult(string result) 80 | { 81 | simpleIsShowing = false; 82 | simpleLargeIsShowing = false; 83 | simpleWithInputIsShowing = false; 84 | dialogResult = result; 85 | } 86 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc 262 | 263 | 264 | /Artifacts/ 265 | /DemoApp/BlazorDialog.DemoApp/Server/ClientSources/ 266 | /BlazorDialog/wwwroot/styles.min.css 267 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | a, .btn-link { 8 | color: #0366d6; 9 | } 10 | 11 | .btn-primary { 12 | color: #fff; 13 | background-color: #1b6ec2; 14 | border-color: #1861ac; 15 | } 16 | 17 | app { 18 | position: relative; 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | 23 | .top-row { 24 | height: 3.5rem; 25 | display: flex; 26 | align-items: center; 27 | } 28 | 29 | .main { 30 | flex: 1; 31 | } 32 | 33 | .main .top-row { 34 | background-color: #f7f7f7; 35 | border-bottom: 1px solid #d6d5d5; 36 | justify-content: flex-end; 37 | } 38 | 39 | .main .top-row > a, .main .top-row .btn-link { 40 | white-space: nowrap; 41 | margin-left: 1.5rem; 42 | } 43 | 44 | .main .top-row a:first-child { 45 | overflow: hidden; 46 | text-overflow: ellipsis; 47 | } 48 | 49 | .sidebar { 50 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 51 | } 52 | 53 | .sidebar .top-row { 54 | background-color: rgba(0,0,0,0.4); 55 | } 56 | 57 | .sidebar .navbar-brand { 58 | font-size: 1.1rem; 59 | } 60 | 61 | .sidebar .oi { 62 | width: 2rem; 63 | font-size: 1.1rem; 64 | vertical-align: text-top; 65 | top: -2px; 66 | } 67 | 68 | .sidebar .nav-item { 69 | font-size: 0.9rem; 70 | padding-bottom: 0.5rem; 71 | } 72 | 73 | .sidebar .nav-item:first-of-type { 74 | padding-top: 1rem; 75 | } 76 | 77 | .sidebar .nav-item:last-of-type { 78 | padding-bottom: 1rem; 79 | } 80 | 81 | .sidebar .nav-item a { 82 | color: #d7d7d7; 83 | border-radius: 4px; 84 | height: 3rem; 85 | display: flex; 86 | align-items: center; 87 | line-height: 3rem; 88 | } 89 | 90 | .sidebar .nav-item a.active { 91 | background-color: rgba(255,255,255,0.25); 92 | color: white; 93 | } 94 | 95 | .sidebar .nav-item a:hover { 96 | background-color: rgba(255,255,255,0.1); 97 | color: white; 98 | } 99 | 100 | .content { 101 | padding-top: 1.1rem; 102 | } 103 | 104 | .navbar-toggler { 105 | background-color: rgba(255, 255, 255, 0.1); 106 | } 107 | 108 | .valid.modified:not([type=checkbox]) { 109 | outline: 1px solid #26b050; 110 | } 111 | 112 | .invalid { 113 | outline: 1px solid red; 114 | } 115 | 116 | .validation-message { 117 | color: red; 118 | } 119 | 120 | #blazor-error-ui { 121 | background: lightyellow; 122 | bottom: 0; 123 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 124 | display: none; 125 | left: 0; 126 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 127 | position: fixed; 128 | width: 100%; 129 | z-index: 1000; 130 | } 131 | 132 | #blazor-error-ui .dismiss { 133 | cursor: pointer; 134 | position: absolute; 135 | right: 0.75rem; 136 | top: 0.5rem; 137 | } 138 | 139 | @media (max-width: 767.98px) { 140 | .main .top-row:not(.auth) { 141 | display: none; 142 | } 143 | 144 | .main .top-row.auth { 145 | justify-content: space-between; 146 | } 147 | 148 | .main .top-row a, .main .top-row .btn-link { 149 | margin-left: 0; 150 | } 151 | } 152 | 153 | @media (min-width: 768px) { 154 | app { 155 | flex-direction: row; 156 | } 157 | 158 | .sidebar { 159 | width: 257px; 160 | height: 100vh; 161 | position: sticky; 162 | top: 0; 163 | } 164 | 165 | .main .top-row { 166 | position: sticky; 167 | top: 0; 168 | } 169 | 170 | .main > div { 171 | padding-left: 2rem !important; 172 | padding-right: 1.5rem !important; 173 | } 174 | 175 | .navbar-toggler { 176 | display: none; 177 | } 178 | 179 | .sidebar .collapse { 180 | /* Never collapse the sidebar for wide screens */ 181 | display: block; 182 | } 183 | } 184 | 185 | 186 | .loader-box { 187 | width: 900px; 188 | height: 120px; 189 | margin: 100px auto; 190 | text-align: center; 191 | font-family: Consolas, Verdana; 192 | font-size: .75em; 193 | } 194 | 195 | /* ================= Github Corner ================= */ 196 | .github-corner:hover .octo-arm { 197 | animation: octocat-wave 560ms ease-in-out 198 | } 199 | 200 | @keyframes octocat-wave { 201 | 0%,100% { 202 | transform: rotate(0) 203 | } 204 | 205 | 20%,60% { 206 | transform: rotate(-25deg) 207 | } 208 | 209 | 40%,80% { 210 | transform: rotate(10deg) 211 | } 212 | } 213 | 214 | @media (max-width:500px) { 215 | .github-corner:hover .octo-arm { 216 | animation: none 217 | } 218 | 219 | .github-corner .octo-arm { 220 | animation: octocat-wave 560ms ease-in-out 221 | } 222 | } 223 | 224 | 225 | /* =================== Event Log ====================== */ 226 | 227 | .event-log { 228 | padding: 17px 10px 0; 229 | height: 400px; 230 | overflow-x: hidden; 231 | overflow-y: auto; 232 | background-color: #f3f3f3; 233 | } 234 | 235 | .event-log-entry { 236 | padding: 5px 12px; 237 | border-bottom: 3px solid #f3f3f3; 238 | margin-top: 0px; 239 | background-color: rgb(255, 255, 255); 240 | } 241 | 242 | .event-log-header { 243 | padding: 5px 12px; 244 | background-color: #fff; 245 | display: flex; 246 | justify-content: flex-start; 247 | position: relative; 248 | } 249 | 250 | .event-log-title { 251 | flex: 0 1 auto; 252 | width: 90px; 253 | position: absolute; 254 | left: 50%; 255 | transform: translateX(-50%); 256 | letter-spacing: .35px; 257 | color: #3D57D8; 258 | font-weight: 500; 259 | font-size: 14px; 260 | line-height: 21px; 261 | } 262 | 263 | .event-log-clear { 264 | flex: 0 1 auto; 265 | width: 50px; 266 | margin-left: auto; 267 | font-weight: 400; 268 | cursor: pointer; 269 | font-size: 14px; 270 | line-height: 21px; 271 | } -------------------------------------------------------------------------------- /BlazorDialog.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29123.89 5 | MinimumVisualStudioVersion = 15.0.26124.0 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog", "BlazorDialog\BlazorDialog.csproj", "{D6A05A5B-2A9D-43A8-B949-272147D62E52}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4B0AEE66-03C7-46A3-AC4C-A18CCE52376C}" 9 | ProjectSection(SolutionItems) = preProject 10 | .editorconfig = .editorconfig 11 | .gitattributes = .gitattributes 12 | .gitignore = .gitignore 13 | build.ps1 = build.ps1 14 | README.md = README.md 15 | EndProjectSection 16 | EndProject 17 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{DA8334A6-0B04-44CD-925C-7710EDECF4D2}" 18 | EndProject 19 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestApps", "TestApps", "{99A35E68-10F9-4BDB-AB82-DEEEBAFA5581}" 20 | EndProject 21 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wasm", "Wasm", "{7E1980A3-6F6D-4073-8AA8-88860C0F8B57}" 22 | EndProject 23 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog.TestAppsCommon", "TestApps\BlazorDialog.TestAppsCommon\BlazorDialog.TestAppsCommon.csproj", "{9BFF377B-EA6D-4161-B9FE-4463764E79E1}" 24 | EndProject 25 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{52E5CEEB-C2A8-42AD-868E-7E186FBBD4A7}" 26 | EndProject 27 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog.BlazorTestApp.Server", "TestApps\Wasm\BlazorDialog.BlazorTestApp.Server\BlazorDialog.BlazorTestApp.Server.csproj", "{5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}" 28 | EndProject 29 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorDialog.BlazorTestApp.Client", "TestApps\Wasm\BlazorDialog.BlazorTestApp.Client\BlazorDialog.BlazorTestApp.Client.csproj", "{90954557-FBC5-4942-AB51-828A4D00A3F1}" 30 | EndProject 31 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorDialog.BlazorServerTestApp", "TestApps\Server\BlazorDialog.BlazorServerTestApp\BlazorDialog.BlazorServerTestApp.csproj", "{A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}" 32 | EndProject 33 | Global 34 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 35 | Debug|Any CPU = Debug|Any CPU 36 | Debug|x64 = Debug|x64 37 | Debug|x86 = Debug|x86 38 | Release|Any CPU = Release|Any CPU 39 | Release|x64 = Release|x64 40 | Release|x86 = Release|x86 41 | EndGlobalSection 42 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 43 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 44 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|Any CPU.Build.0 = Debug|Any CPU 45 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|x64.ActiveCfg = Debug|Any CPU 46 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|x64.Build.0 = Debug|Any CPU 47 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|x86.ActiveCfg = Debug|Any CPU 48 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Debug|x86.Build.0 = Debug|Any CPU 49 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|Any CPU.ActiveCfg = Release|Any CPU 50 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|Any CPU.Build.0 = Release|Any CPU 51 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|x64.ActiveCfg = Release|Any CPU 52 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|x64.Build.0 = Release|Any CPU 53 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|x86.ActiveCfg = Release|Any CPU 54 | {D6A05A5B-2A9D-43A8-B949-272147D62E52}.Release|x86.Build.0 = Release|Any CPU 55 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 56 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Debug|Any CPU.Build.0 = Debug|Any CPU 57 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Debug|x64.ActiveCfg = Debug|Any CPU 58 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Debug|x64.Build.0 = Debug|Any CPU 59 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Debug|x86.ActiveCfg = Debug|Any CPU 60 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Debug|x86.Build.0 = Debug|Any CPU 61 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Release|Any CPU.ActiveCfg = Release|Any CPU 62 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Release|Any CPU.Build.0 = Release|Any CPU 63 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Release|x64.ActiveCfg = Release|Any CPU 64 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Release|x64.Build.0 = Release|Any CPU 65 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Release|x86.ActiveCfg = Release|Any CPU 66 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1}.Release|x86.Build.0 = Release|Any CPU 67 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 68 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Debug|Any CPU.Build.0 = Debug|Any CPU 69 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Debug|x64.ActiveCfg = Debug|Any CPU 70 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Debug|x64.Build.0 = Debug|Any CPU 71 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Debug|x86.ActiveCfg = Debug|Any CPU 72 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Debug|x86.Build.0 = Debug|Any CPU 73 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Release|Any CPU.ActiveCfg = Release|Any CPU 74 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Release|Any CPU.Build.0 = Release|Any CPU 75 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Release|x64.ActiveCfg = Release|Any CPU 76 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Release|x64.Build.0 = Release|Any CPU 77 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Release|x86.ActiveCfg = Release|Any CPU 78 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4}.Release|x86.Build.0 = Release|Any CPU 79 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 80 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Debug|Any CPU.Build.0 = Debug|Any CPU 81 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Debug|x64.ActiveCfg = Debug|Any CPU 82 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Debug|x64.Build.0 = Debug|Any CPU 83 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Debug|x86.ActiveCfg = Debug|Any CPU 84 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Debug|x86.Build.0 = Debug|Any CPU 85 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Release|Any CPU.ActiveCfg = Release|Any CPU 86 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Release|Any CPU.Build.0 = Release|Any CPU 87 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Release|x64.ActiveCfg = Release|Any CPU 88 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Release|x64.Build.0 = Release|Any CPU 89 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Release|x86.ActiveCfg = Release|Any CPU 90 | {90954557-FBC5-4942-AB51-828A4D00A3F1}.Release|x86.Build.0 = Release|Any CPU 91 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 92 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Debug|Any CPU.Build.0 = Debug|Any CPU 93 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Debug|x64.ActiveCfg = Debug|Any CPU 94 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Debug|x64.Build.0 = Debug|Any CPU 95 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Debug|x86.ActiveCfg = Debug|Any CPU 96 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Debug|x86.Build.0 = Debug|Any CPU 97 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Release|Any CPU.ActiveCfg = Release|Any CPU 98 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Release|Any CPU.Build.0 = Release|Any CPU 99 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Release|x64.ActiveCfg = Release|Any CPU 100 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Release|x64.Build.0 = Release|Any CPU 101 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Release|x86.ActiveCfg = Release|Any CPU 102 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC}.Release|x86.Build.0 = Release|Any CPU 103 | EndGlobalSection 104 | GlobalSection(SolutionProperties) = preSolution 105 | HideSolutionNode = FALSE 106 | EndGlobalSection 107 | GlobalSection(NestedProjects) = preSolution 108 | {7E1980A3-6F6D-4073-8AA8-88860C0F8B57} = {99A35E68-10F9-4BDB-AB82-DEEEBAFA5581} 109 | {9BFF377B-EA6D-4161-B9FE-4463764E79E1} = {99A35E68-10F9-4BDB-AB82-DEEEBAFA5581} 110 | {52E5CEEB-C2A8-42AD-868E-7E186FBBD4A7} = {99A35E68-10F9-4BDB-AB82-DEEEBAFA5581} 111 | {5C6C9DA6-B2E6-440A-9C53-3CF031C5B6D4} = {7E1980A3-6F6D-4073-8AA8-88860C0F8B57} 112 | {90954557-FBC5-4942-AB51-828A4D00A3F1} = {7E1980A3-6F6D-4073-8AA8-88860C0F8B57} 113 | {A8D3328C-CBCC-4EDE-88BB-F77FD113ACCC} = {52E5CEEB-C2A8-42AD-868E-7E186FBBD4A7} 114 | EndGlobalSection 115 | GlobalSection(ExtensibilityGlobals) = postSolution 116 | SolutionGuid = {F6D16D50-B899-4FB4-BB9C-1ECDD5D38570} 117 | EndGlobalSection 118 | EndGlobal 119 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /BlazorDialog/Components/Dialog.razor: -------------------------------------------------------------------------------- 1 | @inject IBlazorDialogService dialogService 2 | @inject IBlazorDialogStore dialogStore 3 | @namespace BlazorDialog 4 | @implements IDisposable 5 | @if (isShowing) 6 | { 7 | 8 | 9 | @if (!IsCustom) 10 | { 11 |
12 |
13 |
14 | @ChildContent 15 |
16 |
17 |
18 | } 19 | else 20 | { 21 | @ChildContent 22 | } 23 |
24 |
25 | } 26 | 27 | @code{ 28 | 29 | [Parameter] public RenderFragment ChildContent { get; set; } 30 | 31 | /// 32 | /// The unique idetifier of the dialog. This field is required when using the dialog as a service. 33 | /// 34 | [Parameter] public string Id { get; set; } 35 | 36 | /// 37 | /// The base z-index of the dialog when shown. Default: 1050 38 | /// 39 | [Parameter] public int BaseZIndex { get; set; } = 1050; 40 | 41 | /// 42 | /// Use this to show/hide the dialog as a simple component. 43 | /// 44 | [Parameter] public bool? IsShowing { get; set; } 45 | private bool isShowing; 46 | 47 | /// 48 | /// The input provided to the dialog when opening. 49 | /// 50 | [Parameter] public object Input { get; set; } 51 | 52 | /// 53 | /// An event that is triggered before the dialog appears. 54 | /// 55 | [Parameter] public EventCallback OnBeforeShow { get; set; } 56 | 57 | /// 58 | /// An event that is triggered after the dialog appears. 59 | /// 60 | [Parameter] public EventCallback OnAfterShow { get; set; } 61 | 62 | /// 63 | /// An event that is triggered before the dialog hides. 64 | /// 65 | [Parameter] public EventCallback OnBeforeHide { get; set; } 66 | 67 | /// 68 | /// An event that is triggered after the dialog hides. 69 | /// 70 | [Parameter] public EventCallback OnAfterHide { get; set; } 71 | 72 | /// 73 | /// Allows you to set the dialog size. Ignored when the dialog is . 74 | /// 75 | [Parameter] public DialogSize Size { get; set; } = DialogSize.Normal; 76 | 77 | /// 78 | /// Allows you to change the appearing animation. Ignored when the dialog is . 79 | /// 80 | [Parameter] public DialogAnimation Animation { get; set; } = DialogAnimation.None; 81 | 82 | /// 83 | /// Allows you to set the positioning of the dialog from the top. Ignored when the dialog is . 84 | /// 85 | [Parameter] public bool Centered { get; set; } 86 | 87 | /// 88 | /// If set to true then all default html/css is removed. Use when custom dialog implementations are needed. 89 | /// 90 | [Parameter] public bool IsCustom { get; set; } 91 | 92 | /// 93 | /// Adds a custom css class to the wrapper of the dialog. 94 | /// 95 | [Parameter] public string CssClass { get; set; } 96 | 97 | protected TaskCompletionSource taskCompletionSource; 98 | internal Action OnDialogHide; 99 | protected void NotifyDialogHidden(object result) => OnDialogHide?.Invoke(result); 100 | 101 | protected string ContentWrapperCssClass 102 | { 103 | get 104 | { 105 | switch (Size) 106 | { 107 | case DialogSize.Normal: 108 | return "blazor-dialog-content-wrapper-windowed blazor-dialog-content-wrapper-normal"; 109 | case DialogSize.Small: 110 | return "blazor-dialog-content-wrapper-windowed blazor-dialog-content-wrapper-small"; 111 | case DialogSize.Large: 112 | return "blazor-dialog-content-wrapper-windowed blazor-dialog-content-wrapper-large"; 113 | case DialogSize.ExtraLarge: 114 | return "blazor-dialog-content-wrapper-windowed blazor-dialog-content-wrapper-xlarge"; 115 | case DialogSize.FullScreen: 116 | return "blazor-dialog-content-wrapper-full"; 117 | default: 118 | throw new Exception("Unknown dialog size"); 119 | } 120 | } 121 | } 122 | 123 | protected string AnimationCssClass 124 | { 125 | get 126 | { 127 | switch (Animation) 128 | { 129 | case DialogAnimation.None: 130 | return ""; 131 | case DialogAnimation.SlideDown: 132 | return "blazor-dialog__animations--slidedown"; 133 | case DialogAnimation.Zoom: 134 | return "blazor-dialog__animations--zoom"; 135 | case DialogAnimation.FadeIn: 136 | return "blazor-dialog__animations--fadein"; 137 | default: 138 | throw new Exception("Unknown dialog animation"); 139 | } 140 | } 141 | } 142 | 143 | 144 | protected override void OnInitialized() 145 | { 146 | if (Id != null) 147 | { 148 | dialogStore.Register(this); 149 | } 150 | OnDialogHide = (object result) => 151 | { 152 | if (taskCompletionSource != null) 153 | { 154 | taskCompletionSource.SetResult(result); 155 | taskCompletionSource = null; 156 | } 157 | }; 158 | } 159 | 160 | public override async Task SetParametersAsync(ParameterView parameters) 161 | { 162 | isShowingChanged = parameters.TryGetValue(nameof(IsShowing), out bool? newIsShowing) && newIsShowing != IsShowing; 163 | await base.SetParametersAsync(parameters); 164 | } 165 | 166 | bool isShowingChanged = false; 167 | int dialogDepth = 0; 168 | protected override async Task OnParametersSetAsync() 169 | { 170 | if (isShowingChanged && IsShowing == true && !isShowing) 171 | { 172 | if (OnBeforeShow.HasDelegate) 173 | { 174 | var args = new DialogBeforeShowEventArgs(this); 175 | await OnBeforeShow.InvokeAsync(args); 176 | } 177 | this.isShowing = true; 178 | dialogDepth = dialogStore.GetVisibleDialogsCount(); 179 | if (OnAfterShow.HasDelegate) 180 | { 181 | var args = new DialogAfterShowEventArgs(this); 182 | await OnAfterShow.InvokeAsync(args); 183 | } 184 | } 185 | else if (isShowingChanged && IsShowing == false && isShowing) 186 | { 187 | if (OnBeforeHide.HasDelegate) 188 | { 189 | var args = new DialogBeforeHideEventArgs(this); 190 | await OnBeforeHide.InvokeAsync(args); 191 | } 192 | this.isShowing = false; 193 | if (OnAfterHide.HasDelegate) 194 | { 195 | var args = new DialogAfterHideEventArgs(this); 196 | await OnAfterHide.InvokeAsync(args); 197 | } 198 | } 199 | } 200 | 201 | public void Dispose() 202 | { 203 | dialogStore.Unregister(this); 204 | if (taskCompletionSource != null) 205 | { 206 | taskCompletionSource.SetCanceled(); 207 | taskCompletionSource = null; 208 | } 209 | } 210 | 211 | public async Task Show() 212 | { 213 | await Show(); 214 | } 215 | 216 | public async Task Show() 217 | { 218 | this.Input = null; 219 | return (TResult)await ShowInternal(); 220 | } 221 | 222 | public async Task Show(object input) 223 | { 224 | await this.Show(input); 225 | } 226 | 227 | public async Task Show(object input) 228 | { 229 | this.Input = input; 230 | return (TResult)await ShowInternal(); 231 | } 232 | 233 | private async Task ShowInternal() 234 | { 235 | if (OnBeforeShow.HasDelegate) 236 | { 237 | var args = new DialogBeforeShowEventArgs(this); 238 | await OnBeforeShow.InvokeAsync(args); 239 | } 240 | this.isShowing = true; 241 | dialogDepth = dialogStore.GetVisibleDialogsCount(); 242 | await InvokeAsync(() => StateHasChanged()); 243 | if (OnAfterShow.HasDelegate) 244 | { 245 | var args = new DialogAfterShowEventArgs(this); 246 | await OnAfterShow.InvokeAsync(args); 247 | } 248 | if (taskCompletionSource != null) 249 | { 250 | taskCompletionSource.SetCanceled(); 251 | taskCompletionSource = null; 252 | } 253 | 254 | taskCompletionSource = new TaskCompletionSource(); 255 | return await taskCompletionSource.Task; 256 | } 257 | 258 | 259 | public async Task Hide(TResult result) 260 | { 261 | if (OnBeforeHide.HasDelegate) 262 | { 263 | var args = new DialogBeforeHideEventArgs(this); 264 | await OnBeforeHide.InvokeAsync(args); 265 | } 266 | this.isShowing = false; 267 | NotifyDialogHidden(result); 268 | await InvokeAsync(() => StateHasChanged()); 269 | if (OnAfterHide.HasDelegate) 270 | { 271 | var args = new DialogAfterHideEventArgs(this); 272 | await OnAfterHide.InvokeAsync(args); 273 | } 274 | } 275 | 276 | public async Task Hide() 277 | { 278 | await this.Hide(null); 279 | } 280 | 281 | public bool GetVisibility() 282 | { 283 | return this.isShowing; 284 | } 285 | } 286 | -------------------------------------------------------------------------------- /DemoApp/BlazorDialog.DemoApp/Client/wwwroot/prism.js: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.15.0 2 | https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+csharp&plugins=line-highlight */ 3 | var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {}, Prism = function (e) { function t(e, t, a, n, r) { this.type = e, this.content = t, this.alias = a, this.length = 0 | (n || "").length, this.greedy = !!r } var a = /\blang(?:uage)?-([\w-]+)\b/i, n = 0, r = { manual: e.Prism && e.Prism.manual, disableWorkerMessageHandler: e.Prism && e.Prism.disableWorkerMessageHandler, util: { encode: function (e) { return e instanceof t ? new t(e.type, r.util.encode(e.content), e.alias) : "Array" === r.util.type(e) ? e.map(r.util.encode) : e.replace(/&/g, "&").replace(/ e.length) return; if (!(w instanceof t)) { if (p && k != a.length - 1) { h.lastIndex = b; var A = h.exec(e); if (!A) break; for (var P = A.index + (f ? A[1].length : 0), O = A.index + A[0].length, x = k, N = b, j = a.length; j > x && (O > N || !a[x].type && !a[x - 1].greedy); ++x)N += a[x].length, P >= N && (++k, b = N); if (a[k] instanceof t) continue; S = x - k, w = e.slice(b, N), A.index -= b } else { h.lastIndex = 0; var A = h.exec(w), S = 1 } if (A) { f && (m = A[1] ? A[1].length : 0); var P = A.index + m, A = A[0].slice(m), O = P + A.length, E = w.slice(0, P), _ = w.slice(O), C = [k, S]; E && (++k, b += E.length, C.push(E)); var M = new t(u, d ? r.tokenize(A, d) : A, y, A, p); if (C.push(M), _ && C.push(_), Array.prototype.splice.apply(a, C), 1 != S && r.matchGrammar(e, a, n, k, b, !0, u), o) break } else if (o) break } } } } }, tokenize: function (e, t) { var a = [e], n = t.rest; if (n) { for (var i in n) t[i] = n[i]; delete t.rest } return r.matchGrammar(e, a, t, 0, 0, !1), a }, hooks: { all: {}, add: function (e, t) { var a = r.hooks.all; a[e] = a[e] || [], a[e].push(t) }, run: function (e, t) { var a = r.hooks.all[e]; if (a && a.length) for (var n, i = 0; n = a[i++];)n(t) } }, Token: t }; if (e.Prism = r, t.stringify = function (e, a, n) { if ("string" == typeof e) return e; if ("Array" === r.util.type(e)) return e.map(function (n) { return t.stringify(n, a, e) }).join(""); var i = { type: e.type, content: t.stringify(e.content, a, n), tag: "span", classes: ["token", e.type], attributes: {}, language: a, parent: n }; if (e.alias) { var l = "Array" === r.util.type(e.alias) ? e.alias : [e.alias]; Array.prototype.push.apply(i.classes, l) } r.hooks.run("wrap", i); var o = Object.keys(i.attributes).map(function (e) { return e + '="' + (i.attributes[e] || "").replace(/"/g, """) + '"' }).join(" "); return "<" + i.tag + ' class="' + i.classes.join(" ") + '"' + (o ? " " + o : "") + ">" + i.content + "" }, !e.document) return e.addEventListener ? (r.disableWorkerMessageHandler || e.addEventListener("message", function (t) { var a = JSON.parse(t.data), n = a.language, i = a.code, l = a.immediateClose; e.postMessage(r.highlight(i, r.languages[n], n)), l && e.close() }, !1), r) : r; var i = document.currentScript || [].slice.call(document.getElementsByTagName("script")).pop(); return i && (r.filename = i.src, r.manual || i.hasAttribute("data-manual") || ("loading" !== document.readyState ? window.requestAnimationFrame ? window.requestAnimationFrame(r.highlightAll) : window.setTimeout(r.highlightAll, 16) : document.addEventListener("DOMContentLoaded", r.highlightAll))), r }(_self); "undefined" != typeof module && module.exports && (module.exports = Prism), "undefined" != typeof global && (global.Prism = Prism); 4 | Prism.languages.markup = { comment: //, prolog: /<\?[\s\S]+?\?>/, doctype: //i, cdata: //i, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s\/>])))+)?\s*\/?>/i, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/i, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, inside: { punctuation: [/^=/, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: /&#?[\da-z]{1,8};/i }, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.hooks.add("wrap", function (a) { "entity" === a.type && (a.attributes.title = a.content.replace(/&/, "&")) }), Object.defineProperty(Prism.languages.markup.tag, "addInlined", { value: function (a, e) { var s = {}; s["language-" + e] = { pattern: /[\s\S]+/, inside: Prism.languages[e] }; var t = {}; t[a] = { pattern: RegExp("(<__[\\s\\S]*?>)(?:\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g, a), "i"), lookbehind: !0, greedy: !0, inside: { "included-cdata": { pattern: //i, inside: { content: { pattern: /(^$)/i, lookbehind: !0, inside: s }, cdata: /^$/i } }, rest: s } }, Prism.languages.insertBefore("markup", "cdata", t) } }), Prism.languages.xml = Prism.languages.extend("markup", {}), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup; 5 | !function (s) { var e = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/; s.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: /@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i, inside: { rule: /@[\w-]+/ } }, url: RegExp("url\\((?:" + e.source + "|.*?)\\)", "i"), selector: RegExp("[^{}\\s](?:[^{};\"']|" + e.source + ")*?(?=\\s*\\{)"), string: { pattern: e, greedy: !0 }, property: /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i, important: /!important\b/i, "function": /[-a-z0-9]+(?=\()/i, punctuation: /[(){};:,]/ }, s.languages.css.atrule.inside.rest = s.languages.css; var a = s.languages.markup; a && (a.tag.addInlined("style", "css"), s.languages.insertBefore("inside", "attr-value", { "style-attr": { pattern: /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i, inside: { "attr-name": { pattern: /^\s*style/i, inside: a.tag.inside }, punctuation: /^\s*=\s*['"]|['"]\s*$/, "attr-value": { pattern: /.+/i, inside: s.languages.css } }, alias: "language-css" } }, a.tag)) }(Prism); 6 | Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, "boolean": /\b(?:true|false)\b/, "function": /\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, punctuation: /[{}[\];(),.:]/ }; 7 | Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: !0 }, /\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/], number: /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, "function": /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, operator: /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/, lookbehind: !0, greedy: !0 }, "function-variable": { pattern: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { "template-string": { pattern: /`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/, greedy: !0, inside: { interpolation: { pattern: /\${[^}]+}/, inside: { "interpolation-punctuation": { pattern: /^\${|}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } } }), Prism.languages.markup && Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.js = Prism.languages.javascript; 8 | Prism.languages.csharp = Prism.languages.extend("clike", { keyword: /\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/, string: [{ pattern: /@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/, greedy: !0 }, { pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/, greedy: !0 }], "class-name": [{ pattern: /\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/, inside: { punctuation: /\./ } }, { pattern: /(\[)[A-Z]\w*(?:\.\w+)*\b/, lookbehind: !0, inside: { punctuation: /\./ } }, { pattern: /(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/, lookbehind: !0, inside: { punctuation: /\./ } }, { pattern: /((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/, lookbehind: !0, inside: { punctuation: /\./ } }], number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i, operator: />>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*\/%&|^!=<>]=?/, punctuation: /\?\.?|::|[{}[\];(),.:]/ }), Prism.languages.insertBefore("csharp", "class-name", { "generic-method": { pattern: /\w+\s*<[^>\r\n]+?>\s*(?=\()/, inside: { "function": /^\w+/, "class-name": { pattern: /\b[A-Z]\w*(?:\.\w+)*\b/, inside: { punctuation: /\./ } }, keyword: Prism.languages.csharp.keyword, punctuation: /[<>(),.:]/ } }, preprocessor: { pattern: /(^\s*)#.*/m, lookbehind: !0, alias: "property", inside: { directive: { pattern: /(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/, lookbehind: !0, alias: "keyword" } } } }), Prism.languages.dotnet = Prism.languages.csharp; 9 | !function () { function e(e, t) { return Array.prototype.slice.call((t || document).querySelectorAll(e)) } function t(e, t) { return t = " " + t + " ", (" " + e.className + " ").replace(/[\n\t]/g, " ").indexOf(t) > -1 } function n(e, n, i) { n = "string" == typeof n ? n : e.getAttribute("data-line"); for (var o, l = n.replace(/\s+/g, "").split(","), a = +e.getAttribute("data-line-offset") || 0, s = r() ? parseInt : parseFloat, d = s(getComputedStyle(e).lineHeight), u = t(e, "line-numbers"), c = 0; o = l[c++];) { var p = o.split("-"), m = +p[0], f = +p[1] || m, h = e.querySelector('.line-highlight[data-range="' + o + '"]') || document.createElement("div"); if (h.setAttribute("aria-hidden", "true"), h.setAttribute("data-range", o), h.className = (i || "") + " line-highlight", u && Prism.plugins.lineNumbers) { var g = Prism.plugins.lineNumbers.getLine(e, m), y = Prism.plugins.lineNumbers.getLine(e, f); g && (h.style.top = g.offsetTop + "px"), y && (h.style.height = y.offsetTop - g.offsetTop + y.offsetHeight + "px") } else h.setAttribute("data-start", m), f > m && h.setAttribute("data-end", f), h.style.top = (m - a - 1) * d + "px", h.textContent = new Array(f - m + 2).join(" \n"); u ? e.appendChild(h) : (e.querySelector("code") || e).appendChild(h) } } function i() { var t = location.hash.slice(1); e(".temporary.line-highlight").forEach(function (e) { e.parentNode.removeChild(e) }); var i = (t.match(/\.([\d,-]+)$/) || [, ""])[1]; if (i && !document.getElementById(t)) { var r = t.slice(0, t.lastIndexOf(".")), o = document.getElementById(r); o && (o.hasAttribute("data-line") || o.setAttribute("data-line", ""), n(o, i, "temporary "), document.querySelector(".temporary.line-highlight").scrollIntoView()) } } if ("undefined" != typeof self && self.Prism && self.document && document.querySelector) { var r = function () { var e; return function () { if ("undefined" == typeof e) { var t = document.createElement("div"); t.style.fontSize = "13px", t.style.lineHeight = "1.5", t.style.padding = 0, t.style.border = 0, t.innerHTML = " 
 ", document.body.appendChild(t), e = 38 === t.offsetHeight, document.body.removeChild(t) } return e } }(), o = 0; Prism.hooks.add("before-sanity-check", function (t) { var n = t.element.parentNode, i = n && n.getAttribute("data-line"); if (n && i && /pre/i.test(n.nodeName)) { var r = 0; e(".line-highlight", n).forEach(function (e) { r += e.textContent.length, e.parentNode.removeChild(e) }), r && /^( \n)+$/.test(t.code.slice(-r)) && (t.code = t.code.slice(0, -r)) } }), Prism.hooks.add("complete", function l(e) { var r = e.element.parentNode, a = r && r.getAttribute("data-line"); if (r && a && /pre/i.test(r.nodeName)) { clearTimeout(o); var s = Prism.plugins.lineNumbers, d = e.plugins && e.plugins.lineNumbers; t(r, "line-numbers") && s && !d ? Prism.hooks.add("line-numbers", l) : (n(r, a), o = setTimeout(i, 1)) } }), window.addEventListener("hashchange", i), window.addEventListener("resize", function () { var e = document.querySelectorAll("pre[data-line]"); Array.prototype.forEach.call(e, function (e) { n(e) }) }) } }(); 10 | -------------------------------------------------------------------------------- /TestApps/BlazorDialog.TestAppsCommon/IndexCommon.razor: -------------------------------------------------------------------------------- 1 | @inject IBlazorDialogService dialogService 2 |

Hello, Blazor Dialog!

3 | 4 |

Click the buttons to show the corresponding dialog

5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 25 | 26 | 27 | 28 |

@context.Input

29 |
30 | 31 |

Lorem Ipsum

32 |

33 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 34 | 35 | Duis ultrices lorem id fringilla semper. Integer bibendum sagittis arcu in bibendum. Vivamus rhoncus feugiat leo accumsan bibendum. Aliquam ac turpis ut sem luctus laoreet. Donec sed tristique elit. Proin sit amet blandit dolor, eget aliquam mi. Nullam in ante aliquet, placerat turpis id, blandit enim. Donec sed ligula nisl. Ut varius vulputate suscipit. Nam at tristique odio. 36 | 37 | Cras tincidunt ex arcu, quis luctus felis aliquet non. Morbi eget eleifend elit, quis molestie est. Sed vitae nulla non massa efficitur vulputate condimentum condimentum mauris. Suspendisse potenti. Suspendisse potenti. Ut ornare, odio a lacinia accumsan, ante ante accumsan elit, sit amet fringilla nulla felis quis arcu. Vestibulum eget erat non leo fringilla fringilla. Cras sed massa ac sapien mollis congue at non lorem. Vivamus ut justo id turpis iaculis pretium. Fusce leo odio, fringilla id ante sit amet, viverra vehicula neque. Phasellus maximus nisi elit. Aenean vitae rutrum ex. 38 | 39 | Donec nibh ex, fringilla non tempus vel, rutrum feugiat orci. Donec diam massa, varius sit amet consequat scelerisque, congue ut nisl. Pellentesque scelerisque massa nisl, id aliquet justo facilisis nec. Donec consequat sapien ut quam eleifend, et laoreet tellus vehicula. Integer facilisis mauris nec pulvinar cursus. In quis magna elit. Praesent scelerisque, libero sed faucibus auctor, leo lectus blandit nisl, sit amet mattis dolor lacus vitae diam. Donec vitae neque eu ipsum porttitor facilisis. Sed a sagittis enim. 40 | 41 | Curabitur ac purus quis purus dictum aliquam at nec diam. Fusce est felis, auctor ut ex et, lobortis lacinia urna. Fusce egestas mi lorem, vel sagittis enim euismod dignissim. Nam porta nec sem sed malesuada. Ut non sollicitudin ex. Nam luctus sem a elit volutpat, in iaculis massa ultrices. Aliquam congue magna sem. Quisque mi elit, volutpat et mauris non, pellentesque commodo tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras tincidunt a odio non scelerisque. Duis tincidunt a quam a lacinia. Vivamus nec justo gravida dui commodo vulputate. Nulla risus ante, vehicula id enim sit amet, vestibulum pellentesque nibh. Morbi a lectus semper, blandit mauris sed, tristique nibh. 42 |

43 |

44 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 45 | 46 | Duis ultrices lorem id fringilla semper. Integer bibendum sagittis arcu in bibendum. Vivamus rhoncus feugiat leo accumsan bibendum. Aliquam ac turpis ut sem luctus laoreet. Donec sed tristique elit. Proin sit amet blandit dolor, eget aliquam mi. Nullam in ante aliquet, placerat turpis id, blandit enim. Donec sed ligula nisl. Ut varius vulputate suscipit. Nam at tristique odio. 47 | 48 | Cras tincidunt ex arcu, quis luctus felis aliquet non. Morbi eget eleifend elit, quis molestie est. Sed vitae nulla non massa efficitur vulputate condimentum condimentum mauris. Suspendisse potenti. Suspendisse potenti. Ut ornare, odio a lacinia accumsan, ante ante accumsan elit, sit amet fringilla nulla felis quis arcu. Vestibulum eget erat non leo fringilla fringilla. Cras sed massa ac sapien mollis congue at non lorem. Vivamus ut justo id turpis iaculis pretium. Fusce leo odio, fringilla id ante sit amet, viverra vehicula neque. Phasellus maximus nisi elit. Aenean vitae rutrum ex. 49 | 50 | Donec nibh ex, fringilla non tempus vel, rutrum feugiat orci. Donec diam massa, varius sit amet consequat scelerisque, congue ut nisl. Pellentesque scelerisque massa nisl, id aliquet justo facilisis nec. Donec consequat sapien ut quam eleifend, et laoreet tellus vehicula. Integer facilisis mauris nec pulvinar cursus. In quis magna elit. Praesent scelerisque, libero sed faucibus auctor, leo lectus blandit nisl, sit amet mattis dolor lacus vitae diam. Donec vitae neque eu ipsum porttitor facilisis. Sed a sagittis enim. 51 | 52 | Curabitur ac purus quis purus dictum aliquam at nec diam. Fusce est felis, auctor ut ex et, lobortis lacinia urna. Fusce egestas mi lorem, vel sagittis enim euismod dignissim. Nam porta nec sem sed malesuada. Ut non sollicitudin ex. Nam luctus sem a elit volutpat, in iaculis massa ultrices. Aliquam congue magna sem. Quisque mi elit, volutpat et mauris non, pellentesque commodo tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras tincidunt a odio non scelerisque. Duis tincidunt a quam a lacinia. Vivamus nec justo gravida dui commodo vulputate. Nulla risus ante, vehicula id enim sit amet, vestibulum pellentesque nibh. Morbi a lectus semper, blandit mauris sed, tristique nibh. 53 |

54 | 55 |

56 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 57 | 58 | Duis ultrices lorem id fringilla semper. Integer bibendum sagittis arcu in bibendum. Vivamus rhoncus feugiat leo accumsan bibendum. Aliquam ac turpis ut sem luctus laoreet. Donec sed tristique elit. Proin sit amet blandit dolor, eget aliquam mi. Nullam in ante aliquet, placerat turpis id, blandit enim. Donec sed ligula nisl. Ut varius vulputate suscipit. Nam at tristique odio. 59 | 60 | Cras tincidunt ex arcu, quis luctus felis aliquet non. Morbi eget eleifend elit, quis molestie est. Sed vitae nulla non massa efficitur vulputate condimentum condimentum mauris. Suspendisse potenti. Suspendisse potenti. Ut ornare, odio a lacinia accumsan, ante ante accumsan elit, sit amet fringilla nulla felis quis arcu. Vestibulum eget erat non leo fringilla fringilla. Cras sed massa ac sapien mollis congue at non lorem. Vivamus ut justo id turpis iaculis pretium. Fusce leo odio, fringilla id ante sit amet, viverra vehicula neque. Phasellus maximus nisi elit. Aenean vitae rutrum ex. 61 | 62 | Donec nibh ex, fringilla non tempus vel, rutrum feugiat orci. Donec diam massa, varius sit amet consequat scelerisque, congue ut nisl. Pellentesque scelerisque massa nisl, id aliquet justo facilisis nec. Donec consequat sapien ut quam eleifend, et laoreet tellus vehicula. Integer facilisis mauris nec pulvinar cursus. In quis magna elit. Praesent scelerisque, libero sed faucibus auctor, leo lectus blandit nisl, sit amet mattis dolor lacus vitae diam. Donec vitae neque eu ipsum porttitor facilisis. Sed a sagittis enim. 63 | 64 | Curabitur ac purus quis purus dictum aliquam at nec diam. Fusce est felis, auctor ut ex et, lobortis lacinia urna. Fusce egestas mi lorem, vel sagittis enim euismod dignissim. Nam porta nec sem sed malesuada. Ut non sollicitudin ex. Nam luctus sem a elit volutpat, in iaculis massa ultrices. Aliquam congue magna sem. Quisque mi elit, volutpat et mauris non, pellentesque commodo tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras tincidunt a odio non scelerisque. Duis tincidunt a quam a lacinia. Vivamus nec justo gravida dui commodo vulputate. Nulla risus ante, vehicula id enim sit amet, vestibulum pellentesque nibh. Morbi a lectus semper, blandit mauris sed, tristique nibh. 65 |

66 | 67 |

68 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 69 | 70 | Duis ultrices lorem id fringilla semper. Integer bibendum sagittis arcu in bibendum. Vivamus rhoncus feugiat leo accumsan bibendum. Aliquam ac turpis ut sem luctus laoreet. Donec sed tristique elit. Proin sit amet blandit dolor, eget aliquam mi. Nullam in ante aliquet, placerat turpis id, blandit enim. Donec sed ligula nisl. Ut varius vulputate suscipit. Nam at tristique odio. 71 | 72 | Cras tincidunt ex arcu, quis luctus felis aliquet non. Morbi eget eleifend elit, quis molestie est. Sed vitae nulla non massa efficitur vulputate condimentum condimentum mauris. Suspendisse potenti. Suspendisse potenti. Ut ornare, odio a lacinia accumsan, ante ante accumsan elit, sit amet fringilla nulla felis quis arcu. Vestibulum eget erat non leo fringilla fringilla. Cras sed massa ac sapien mollis congue at non lorem. Vivamus ut justo id turpis iaculis pretium. Fusce leo odio, fringilla id ante sit amet, viverra vehicula neque. Phasellus maximus nisi elit. Aenean vitae rutrum ex. 73 | 74 | Donec nibh ex, fringilla non tempus vel, rutrum feugiat orci. Donec diam massa, varius sit amet consequat scelerisque, congue ut nisl. Pellentesque scelerisque massa nisl, id aliquet justo facilisis nec. Donec consequat sapien ut quam eleifend, et laoreet tellus vehicula. Integer facilisis mauris nec pulvinar cursus. In quis magna elit. Praesent scelerisque, libero sed faucibus auctor, leo lectus blandit nisl, sit amet mattis dolor lacus vitae diam. Donec vitae neque eu ipsum porttitor facilisis. Sed a sagittis enim. 75 | 76 | Curabitur ac purus quis purus dictum aliquam at nec diam. Fusce est felis, auctor ut ex et, lobortis lacinia urna. Fusce egestas mi lorem, vel sagittis enim euismod dignissim. Nam porta nec sem sed malesuada. Ut non sollicitudin ex. Nam luctus sem a elit volutpat, in iaculis massa ultrices. Aliquam congue magna sem. Quisque mi elit, volutpat et mauris non, pellentesque commodo tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras tincidunt a odio non scelerisque. Duis tincidunt a quam a lacinia. Vivamus nec justo gravida dui commodo vulputate. Nulla risus ante, vehicula id enim sit amet, vestibulum pellentesque nibh. Morbi a lectus semper, blandit mauris sed, tristique nibh. 77 |

78 | 79 |

80 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 81 | 82 | Duis ultrices lorem id fringilla semper. Integer bibendum sagittis arcu in bibendum. Vivamus rhoncus feugiat leo accumsan bibendum. Aliquam ac turpis ut sem luctus laoreet. Donec sed tristique elit. Proin sit amet blandit dolor, eget aliquam mi. Nullam in ante aliquet, placerat turpis id, blandit enim. Donec sed ligula nisl. Ut varius vulputate suscipit. Nam at tristique odio. 83 | 84 | Cras tincidunt ex arcu, quis luctus felis aliquet non. Morbi eget eleifend elit, quis molestie est. Sed vitae nulla non massa efficitur vulputate condimentum condimentum mauris. Suspendisse potenti. Suspendisse potenti. Ut ornare, odio a lacinia accumsan, ante ante accumsan elit, sit amet fringilla nulla felis quis arcu. Vestibulum eget erat non leo fringilla fringilla. Cras sed massa ac sapien mollis congue at non lorem. Vivamus ut justo id turpis iaculis pretium. Fusce leo odio, fringilla id ante sit amet, viverra vehicula neque. Phasellus maximus nisi elit. Aenean vitae rutrum ex. 85 | 86 | Donec nibh ex, fringilla non tempus vel, rutrum feugiat orci. Donec diam massa, varius sit amet consequat scelerisque, congue ut nisl. Pellentesque scelerisque massa nisl, id aliquet justo facilisis nec. Donec consequat sapien ut quam eleifend, et laoreet tellus vehicula. Integer facilisis mauris nec pulvinar cursus. In quis magna elit. Praesent scelerisque, libero sed faucibus auctor, leo lectus blandit nisl, sit amet mattis dolor lacus vitae diam. Donec vitae neque eu ipsum porttitor facilisis. Sed a sagittis enim. 87 | 88 | Curabitur ac purus quis purus dictum aliquam at nec diam. Fusce est felis, auctor ut ex et, lobortis lacinia urna. Fusce egestas mi lorem, vel sagittis enim euismod dignissim. Nam porta nec sem sed malesuada. Ut non sollicitudin ex. Nam luctus sem a elit volutpat, in iaculis massa ultrices. Aliquam congue magna sem. Quisque mi elit, volutpat et mauris non, pellentesque commodo tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras tincidunt a odio non scelerisque. Duis tincidunt a quam a lacinia. Vivamus nec justo gravida dui commodo vulputate. Nulla risus ante, vehicula id enim sit amet, vestibulum pellentesque nibh. Morbi a lectus semper, blandit mauris sed, tristique nibh. 89 |

90 | 91 |

92 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis est vitae purus eleifend bibendum id et neque. Sed eu nisi commodo, sagittis neque suscipit, euismod quam. In metus turpis, pulvinar ut odio vel, vehicula congue dui. Praesent sed feugiat est. Ut ut rhoncus mi, et facilisis eros. Vivamus malesuada nulla eu tincidunt vulputate. Donec non augue aliquam, sodales est vel, varius quam. Nam vel fringilla felis. 93 | 94 | Duis ultrices lorem id fringilla semper. Integer bibendum sagittis arcu in bibendum. Vivamus rhoncus feugiat leo accumsan bibendum. Aliquam ac turpis ut sem luctus laoreet. Donec sed tristique elit. Proin sit amet blandit dolor, eget aliquam mi. Nullam in ante aliquet, placerat turpis id, blandit enim. Donec sed ligula nisl. Ut varius vulputate suscipit. Nam at tristique odio. 95 | 96 | Cras tincidunt ex arcu, quis luctus felis aliquet non. Morbi eget eleifend elit, quis molestie est. Sed vitae nulla non massa efficitur vulputate condimentum condimentum mauris. Suspendisse potenti. Suspendisse potenti. Ut ornare, odio a lacinia accumsan, ante ante accumsan elit, sit amet fringilla nulla felis quis arcu. Vestibulum eget erat non leo fringilla fringilla. Cras sed massa ac sapien mollis congue at non lorem. Vivamus ut justo id turpis iaculis pretium. Fusce leo odio, fringilla id ante sit amet, viverra vehicula neque. Phasellus maximus nisi elit. Aenean vitae rutrum ex. 97 | 98 | Donec nibh ex, fringilla non tempus vel, rutrum feugiat orci. Donec diam massa, varius sit amet consequat scelerisque, congue ut nisl. Pellentesque scelerisque massa nisl, id aliquet justo facilisis nec. Donec consequat sapien ut quam eleifend, et laoreet tellus vehicula. Integer facilisis mauris nec pulvinar cursus. In quis magna elit. Praesent scelerisque, libero sed faucibus auctor, leo lectus blandit nisl, sit amet mattis dolor lacus vitae diam. Donec vitae neque eu ipsum porttitor facilisis. Sed a sagittis enim. 99 | 100 | Curabitur ac purus quis purus dictum aliquam at nec diam. Fusce est felis, auctor ut ex et, lobortis lacinia urna. Fusce egestas mi lorem, vel sagittis enim euismod dignissim. Nam porta nec sem sed malesuada. Ut non sollicitudin ex. Nam luctus sem a elit volutpat, in iaculis massa ultrices. Aliquam congue magna sem. Quisque mi elit, volutpat et mauris non, pellentesque commodo tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras tincidunt a odio non scelerisque. Duis tincidunt a quam a lacinia. Vivamus nec justo gravida dui commodo vulputate. Nulla risus ante, vehicula id enim sit amet, vestibulum pellentesque nibh. Morbi a lectus semper, blandit mauris sed, tristique nibh. 101 |

102 | 103 | 104 |
105 | 106 | 107 | 108 | 109 |
110 |
111 | 112 | 113 | 114 | 115 |

@context.Input

116 |
117 | 118 | 119 | 120 | 121 | 122 | 123 |
124 |
125 | 126 | 127 | 128 | 129 | 130 | 131 | @if (dialogResult != null) 132 | { 133 |
DialogResult: @dialogResult
134 | } 135 | 136 | @code{ 137 | string dialogResult = null; 138 | bool isCentered; 139 | DialogSize size; 140 | DialogAnimation animation; 141 | 142 | async Task SimpleDialogOnClick() 143 | { 144 | dialogResult = await dialogService.ShowDialog("simple-dialog", "(Simple Dialog) Are you sure?"); 145 | } 146 | 147 | async Task SimpleDialogBigOnClick() 148 | { 149 | dialogResult = await dialogService.ShowDialog("simple-large-dialog", "(Simple Dialog Large) Are you sure?"); 150 | } 151 | } --------------------------------------------------------------------------------