├── .gitignore ├── Blazorade-Bootstrap.sln ├── Blazorade.Bootstrap.Components.Showroom ├── Alerts.razor ├── Badges.razor ├── Blazorade.Bootstrap.Components.Showroom.csproj ├── Breadcrumbs.razor ├── Buttons.razor ├── Cards.razor ├── Carousels.razor ├── Collapses.razor ├── Containers.razor ├── DocsSection.razor ├── Dropdowns.razor ├── Embeds.razor ├── ExampleJsInterop.cs ├── Forms.razor ├── Grid.razor ├── Host │ └── Shared │ │ ├── MainLayout.razor │ │ └── MainMenu.razor ├── InputGroups.razor ├── Jumbotrons.razor ├── ListGroups.razor ├── MediaObjects.razor ├── Modals.razor ├── Navbars.razor ├── Navs.razor ├── Paginations.razor ├── ProgressBars.razor ├── Sizing.razor ├── Spinners.razor ├── ToastHost.cs ├── Toasts.razor ├── Tooltips.razor ├── Typography.razor ├── WikiLink.razor ├── WikiLink.razor.cs ├── _Imports.razor ├── readme.md └── wwwroot │ ├── background.png │ ├── blazorade-logo-64.png │ ├── exampleJsInterop.js │ └── styles.css ├── Blazorade.Bootstrap.Components.Tests ├── Blazorade.Bootstrap.Components.Tests.csproj ├── BuilderTests.cs ├── ContentAlignmentTests.cs ├── HeadingTests.cs ├── SizingTests.cs └── SpacingTests.cs ├── Blazorade.Bootstrap.Components ├── AddonPlacement.cs ├── Alert.razor ├── Alert.razor.cs ├── AlertLink.razor ├── AlertLink.razor.cs ├── Backdrop.cs ├── Badge.razor ├── Badge.razor.cs ├── Blazorade.Bootstrap.Components.csproj ├── Blazorade.Bootstrap.Components.xml ├── BootstrapComponentBase.cs ├── Breadcrumb.razor ├── Breadcrumb.razor.cs ├── BreadcrumbItem.razor ├── BreadcrumbItem.razor.cs ├── Builder │ ├── BootstrapComponentBuilder.cs │ ├── ColumnBuilder.cs │ ├── IResponsiveBreakpointModifiers.cs │ └── RowBuilder.cs ├── Button.razor ├── Button.razor.cs ├── ButtonGroup.razor ├── ButtonGroup.razor.cs ├── ButtonToolbar.razor ├── ButtonToolbar.razor.cs ├── Card.razor ├── Card.razor.cs ├── CardBody.razor ├── CardBody.razor.cs ├── CardContent.razor ├── CardContent.razor.cs ├── CardFooter.razor ├── CardFooter.razor.cs ├── CardGroup.razor ├── CardGroup.razor.cs ├── CardGroupType.cs ├── CardHeader.razor ├── CardHeader.razor.cs ├── CardImage.razor ├── CardImage.razor.cs ├── CardImagePosition.cs ├── CardLink.razor ├── CardLink.razor.cs ├── CardSubtitle.razor ├── CardSubtitle.razor.cs ├── CardText.razor ├── CardText.razor.cs ├── CardTitle.razor ├── CardTitle.razor.cs ├── Carousel.razor ├── Carousel.razor.cs ├── CarouselControl.razor ├── CarouselControl.razor.cs ├── CarouselControlDirection.cs ├── CarouselItem.razor ├── CarouselItem.razor.cs ├── CarouselSlideEventArgs.cs ├── CarouselTransitionType.cs ├── ClassNames.cs ├── Collapse.razor ├── Collapse.razor.cs ├── ColoredBootstrapComponentBase.cs ├── ComponentSize.cs ├── Configuration │ ├── BlazoradeBootstrapBuilder.cs │ ├── BlazoradeBootstrapOptions.cs │ ├── StartupExtensions.cs │ └── TooltipOptions.cs ├── Content │ ├── Anchor.razor │ ├── Anchor.razor.cs │ ├── Blockquote.razor │ ├── Blockquote.razor.cs │ ├── Div.razor │ ├── Div.razor.cs │ ├── Heading.razor │ ├── Heading.razor.cs │ ├── HeadingContent.razor │ ├── HeadingContent.razor.cs │ ├── HeadingDisplay.cs │ ├── HeadingLevel.cs │ ├── Paragraph.razor │ ├── Paragraph.razor.cs │ ├── Span.razor │ └── Span.razor.cs ├── Dropdown.razor ├── Dropdown.razor.cs ├── DropdownDivider.razor ├── DropdownDivider.razor.cs ├── DropdownItem.cs ├── DropdownMenu.razor ├── DropdownMenu.razor.cs ├── DropdownNavItem.razor ├── DropdownNavItem.razor.cs ├── DropdownToggleButton.razor ├── DropdownToggleButton.razor.cs ├── DropdownToggleLink.razor ├── DropdownToggleLink.razor.cs ├── Embed.razor ├── Embed.razor.cs ├── EmbedAspectRatio.cs ├── EventNames.cs ├── ExtensionMethods.cs ├── HorizontalAlignment.cs ├── ImageBase.cs ├── ImageScaleMode.cs ├── InputGroup.razor ├── InputGroup.razor.cs ├── InputGroupTextAddon.razor ├── InputGroupTextAddon.razor.cs ├── InputType.cs ├── JsFunctions.cs ├── Jumbotron.razor ├── Jumbotron.razor.cs ├── JumbotronContent.razor ├── JumbotronContent.razor.cs ├── Layout │ ├── Column.razor │ ├── Column.razor.cs │ ├── Container.razor │ ├── Container.razor.cs │ ├── ContainerType.cs │ ├── Row.razor │ └── Row.razor.cs ├── ListGroup.razor ├── ListGroup.razor.cs ├── ListGroupAnchor.cs ├── ListGroupButton.cs ├── ListGroupItem.razor ├── ListGroupItem.razor.cs ├── Media.razor ├── Media.razor.cs ├── MediaImage.razor ├── MediaImage.razor.cs ├── Modal.razor ├── Modal.razor.cs ├── ModalBody.razor ├── ModalBody.razor.cs ├── ModalFooter.razor ├── ModalFooter.razor.cs ├── ModalHeader.razor ├── ModalHeader.razor.cs ├── ModalSize.cs ├── Model │ ├── Link.cs │ └── MenuItem.cs ├── NamedColor.cs ├── Nav.razor ├── Nav.razor.cs ├── NavItem.razor ├── NavItem.razor.cs ├── Navbar.razor ├── Navbar.razor.cs ├── NavbarBrand.razor ├── NavbarBrand.razor.cs ├── NavbarCollapse.cs ├── NavbarExpandBreakpoint.cs ├── NavbarNav.razor ├── NavbarNav.razor.cs ├── Pagination.razor ├── Pagination.razor.cs ├── Progress.razor ├── Progress.razor.cs ├── ProgressBar.razor ├── ProgressBar.razor.cs ├── ResponsiveBreakpoint.cs ├── Spinner.razor ├── Spinner.razor.cs ├── SpinnerSize.cs ├── SpinnerType.cs ├── Toast.razor ├── Toast.razor.cs ├── ToastHeader.razor ├── ToastHeader.razor.cs ├── ToggleAction.cs ├── TooltipPlacement.cs ├── Utilities │ ├── CloseIcon.razor │ ├── ModalCloseIcon.cs │ ├── Shadow.cs │ ├── Size.cs │ └── Spacing.cs ├── VerticalAlignment.cs ├── _Imports.razor ├── readme.md └── wwwroot │ ├── Blazorade-Icon-128.png │ └── bbs.js ├── ClientTestHost ├── App.razor ├── ClientTestHost.csproj ├── Pages │ ├── Alerts.razor │ ├── Badges.razor │ ├── Breadcrumbs.razor │ ├── Buttons.razor │ ├── Cards.razor │ ├── Carousels.razor │ ├── Collapses.razor │ ├── Containers.razor │ ├── Dropdowns.razor │ ├── Embeds.razor │ ├── Grid.razor │ ├── Index.razor │ ├── Jumbotrons.razor │ ├── ListGroups.razor │ ├── Media.razor │ ├── Modals.razor │ ├── Navbars.razor │ ├── Navs.razor │ ├── Paginations.razor │ ├── ProgressBars.razor │ ├── Sizing.razor │ ├── Spinners.razor │ ├── Toasts.razor │ └── Typography.razor ├── Program.cs ├── Shared │ └── MainLayout.razor ├── Startup.cs ├── _Imports.razor └── wwwroot │ ├── .nojekyll │ ├── 404.html │ ├── css │ ├── bootstrap │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── open-iconic │ │ ├── FONT-LICENSE │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ └── site.css │ └── index.html ├── LICENSE ├── LICENSE.txt ├── README.md ├── SampleCustomerPortal ├── App.razor ├── Data │ ├── WeatherForecast.cs │ └── WeatherForecastService.cs ├── Pages │ ├── Error.razor │ ├── Index.razor │ ├── Login.razor │ └── _Host.cshtml ├── Program.cs ├── SampleCustomerPortal.csproj ├── Shared │ ├── MainLayout.razor │ ├── MainMenu.razor │ └── NavMenu.razor ├── Startup.cs ├── _Imports.razor ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ └── favicon.ico ├── ServerAppDemo ├── App.razor ├── Data │ ├── WeatherForecast.cs │ └── WeatherForecastService.cs ├── Pages │ ├── Counter.razor │ ├── Error.razor │ ├── FetchData.razor │ ├── Index.razor │ └── _Host.cshtml ├── Program.cs ├── ServerAppDemo.csproj ├── Shared │ ├── MainLayout.razor │ └── NavMenu.razor ├── Startup.cs ├── _Imports.razor ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── css │ └── site.css │ └── favicon.ico ├── ServerAppDev ├── App.razor ├── Pages │ ├── Error.razor │ ├── Index.razor │ └── _Host.cshtml ├── Program.cs ├── ServerAppDev.csproj ├── Shared │ ├── MainLayout.razor │ └── NavMenu.razor ├── Startup.cs ├── _Imports.razor ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── css │ ├── bootstrap │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── open-iconic │ │ ├── FONT-LICENSE │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ └── site.css │ └── favicon.ico ├── ServerTestHost ├── App.razor ├── Pages │ ├── Alerts.razor │ ├── Badges.razor │ ├── Breadcrumbs.razor │ ├── Buttons.razor │ ├── Cards.razor │ ├── Carousels.razor │ ├── Collapses.razor │ ├── Containers.razor │ ├── Dropdowns.razor │ ├── Embeds.razor │ ├── Error.razor │ ├── Grid.razor │ ├── Index.razor │ ├── InputGroups.razor │ ├── Jumbotrons.razor │ ├── ListGroups.razor │ ├── Media.razor │ ├── Modals.razor │ ├── Navbars.razor │ ├── Navs.razor │ ├── Paginations.razor │ ├── ProgressBars.razor │ ├── Sizing.razor │ ├── Spinners.razor │ ├── Toasts.razor │ ├── Tooltips.razor │ ├── Typography.razor │ └── _Host.cshtml ├── Program.cs ├── ServerTestHost.csproj ├── Startup.cs ├── _Imports.razor ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── css │ ├── bootstrap │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── open-iconic │ │ ├── FONT-LICENSE │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ └── site.css │ └── favicon.ico └── docs ├── .nojekyll ├── 404.html ├── _content ├── Blazorade.Bootstrap.Components.Showroom │ ├── background.png │ ├── blazorade-logo-64.png │ ├── exampleJsInterop.js │ └── styles.css └── Blazorade.Bootstrap.Components │ ├── Blazorade-Icon-128.png │ └── bbs.js ├── _framework ├── _bin │ ├── Blazorade.Bootstrap.Components.Showroom.dll │ ├── Blazorade.Bootstrap.Components.dll │ ├── Blazorade.Core.dll │ ├── ClientTestHost.dll │ ├── Microsoft.AspNetCore.Authorization.dll │ ├── Microsoft.AspNetCore.Blazor.HttpClient.dll │ ├── Microsoft.AspNetCore.Blazor.dll │ ├── Microsoft.AspNetCore.Components.Forms.dll │ ├── Microsoft.AspNetCore.Components.Web.dll │ ├── Microsoft.AspNetCore.Components.dll │ ├── Microsoft.AspNetCore.Metadata.dll │ ├── Microsoft.Bcl.AsyncInterfaces.dll │ ├── Microsoft.Extensions.DependencyInjection.Abstractions.dll │ ├── Microsoft.Extensions.DependencyInjection.dll │ ├── Microsoft.Extensions.Logging.Abstractions.dll │ ├── Microsoft.Extensions.Options.dll │ ├── Microsoft.Extensions.Primitives.dll │ ├── Microsoft.JSInterop.dll │ ├── Mono.WebAssembly.Interop.dll │ ├── System.ComponentModel.DataAnnotations.dll │ ├── System.Core.dll │ ├── System.Net.Http.dll │ ├── System.Runtime.CompilerServices.Unsafe.dll │ ├── System.Text.Encodings.Web.dll │ ├── System.Text.Json.dll │ ├── System.dll │ ├── WebAssembly.Bindings.dll │ ├── WebAssembly.Net.Http.dll │ └── mscorlib.dll ├── blazor.boot.json ├── blazor.webassembly.js └── wasm │ ├── mono.js │ └── mono.wasm ├── css ├── bootstrap │ ├── bootstrap.min.css │ └── bootstrap.min.css.map ├── open-iconic │ ├── FONT-LICENSE │ ├── ICON-LICENSE │ ├── README.md │ └── font │ │ ├── css │ │ └── open-iconic-bootstrap.min.css │ │ └── fonts │ │ ├── open-iconic.eot │ │ ├── open-iconic.otf │ │ ├── open-iconic.svg │ │ ├── open-iconic.ttf │ │ └── open-iconic.woff └── site.css └── index.html /Blazorade.Bootstrap.Components.Showroom/Blazorade.Bootstrap.Components.Showroom.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 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/DocsSection.razor: -------------------------------------------------------------------------------- 1 | @code { 2 | 3 | [Parameter] 4 | public string ComponentName { get; set; } 5 | 6 | private string DocsUrl; 7 | 8 | protected override void OnParametersSet() 9 | { 10 | this.DocsUrl = $"https://github.com/Blazorade/Blazorade-Bootstrap/wiki/{this.ComponentName}"; 11 | base.OnParametersSet(); 12 | } 13 | } 14 | 15 | Documentation 16 | 17 | The documentation for @this.ComponentName is avaible at @this.DocsUrl. 18 | 19 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/Dropdowns.razor: -------------------------------------------------------------------------------- 1 | Dropdown Component 2 | 3 | Dropdowns are menus that display a list of links and other elements. Dropdowns can be toggled. 4 | 5 | 6 | 7 | 8 | 9 | 10 | Examples 11 | 12 | The two examples below shows the variations you can have with the Dropdown component. 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Button toggle 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/Embeds.razor: -------------------------------------------------------------------------------- 1 | @code { 2 | string videoUrl = "https://www.youtube.com/embed/MetcuX1OHD0"; 3 | } 4 | 5 | Embed Component 6 | 7 | 8 | The Embed component is used to create responsive video or slideshow embeds. 9 | 10 | 11 | 12 | 13 | 14 | Basic Embed 15 | 16 | A basic Embed with a Youtube video with the default 16 to 9 aspect ratio. 17 | 18 | 19 | 20 | 21 | Aspect Ratios 22 | 23 | The Embed component also supports other aspect ratios than the default 16 to 9 which is shown above. 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/ExampleJsInterop.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | using System.Threading.Tasks; 3 | 4 | namespace Blazorade.Bootstrap.Components.Showroom 5 | { 6 | public class ExampleJsInterop 7 | { 8 | public static ValueTask Prompt(IJSRuntime jsRuntime, string message) 9 | { 10 | // Implemented in exampleJsInterop.js 11 | return jsRuntime.InvokeAsync( 12 | "exampleJsFunctions.showPrompt", 13 | message); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/Forms.razor: -------------------------------------------------------------------------------- 1 | 

Forms

2 | 3 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/Host/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 4 | 5 |
6 | @Body 7 |
8 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/Jumbotrons.razor: -------------------------------------------------------------------------------- 1 |  2 | Jumbotron Component 3 | 4 | 5 | The Jumbotron component is a lightweight and flexible component for showcasing content. 6 | 7 | 8 | 9 | 10 | 11 | Basic Jumbotron 12 | 13 | An example of a basic jumbotron. 14 | 15 | 16 |
17 | For more information on Blazor Bootstrap, and how to use it in your application, please visit the Blazor Bootstrap Wiki. 18 |
19 | 20 | 21 | Fluid Jumbotron 22 | 23 | A fluid jumbotron is full-width without rounded corners. 24 | 25 | 26 | 27 | The container inside of the jumbotron is a fluid container too, but you can adjust it with the Jumbotron.FluidContainerType parameter. 28 | 29 | 30 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/Navs.razor: -------------------------------------------------------------------------------- 1 | @code { 2 | Spacing marginTop = Spacing.S5; 3 | } 4 | 5 | 6 | Nav Component 7 | 8 | The Nav component provides a simple way to build navigation elements. 9 | 10 | 11 | 12 | 13 | 14 | Alignment 15 | 16 | The contents of a Nav component can be aligned. The default is left aligned, but you can also 17 | set it to center or right. 18 | 19 | 20 | 25 | 30 | 35 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/ToastHost.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using Microsoft.AspNetCore.Components.Rendering; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace Blazorade.Bootstrap.Components.Showroom 8 | { 9 | public class ToastHost : ComponentBase 10 | { 11 | 12 | public void AddToast(string content) 13 | { 14 | this.StateHasChanged(); 15 | } 16 | 17 | protected override void BuildRenderTree(RenderTreeBuilder builder) 18 | { 19 | base.BuildRenderTree(builder); 20 | 21 | builder.OpenComponent(0); 22 | builder.AddAttribute(1, "ChildContent", (RenderFragment)((builder2) => 23 | { 24 | builder2.AddContent(2, "Hello! This is a toast!"); 25 | })); 26 | builder.CloseComponent(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/Tooltips.razor: -------------------------------------------------------------------------------- 1 | Tooltips 2 | 3 | Tooltips allow you to add additional information to any component. 4 | 5 | 6 | 7 | 8 | 9 | Placement 10 | 11 | You can configure a default placement for all your tooltips, or customize the placement for each component separately. 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | HTML Content 22 | 23 | You can also have HTML content in your tooltips, if you enable it in the tooltip options. 24 | 25 | 26 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/WikiLink.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | 4 | @if(null != this.ChildContent) 5 | { 6 | @this.ChildContent 7 | } 8 | else 9 | { 10 | See the Wiki for details. 11 | } 12 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/WikiLink.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components.Showroom 7 | { 8 | partial class WikiLink 9 | { 10 | public WikiLink() 11 | { 12 | this.OpenInNewTab = true; 13 | } 14 | 15 | [Parameter] 16 | public string Page { get; set; } 17 | 18 | [Parameter] 19 | public string Section { get; set; } 20 | 21 | [Parameter] 22 | public bool OpenInNewTab { get; set; } 23 | 24 | 25 | public string Url { get; set; } 26 | 27 | 28 | protected override void OnParametersSet() 29 | { 30 | this.Url = "https://github.com/Blazorade/Blazorade-Bootstrap/wiki"; 31 | if (!string.IsNullOrEmpty(this.Page)) 32 | { 33 | this.Url = $"{this.Url}/{this.Page}"; 34 | } 35 | if(!string.IsNullOrEmpty(this.Section)) 36 | { 37 | this.Url = $"{this.Url}#{this.Section}"; 38 | } 39 | 40 | base.OnParametersSet(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Web 2 | 3 | @using Blazorade.Core.Components 4 | @using Blazorade.Core.Components.Builder 5 | @using Blazorade.Bootstrap.Components 6 | @using Blazorade.Bootstrap.Components.Builder 7 | @using Blazorade.Bootstrap.Components.Model 8 | @using Blazorade.Bootstrap.Components.Content 9 | @using Blazorade.Bootstrap.Components.Layout 10 | @using Blazorade.Bootstrap.Components.Utilities 11 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/readme.md: -------------------------------------------------------------------------------- 1 | Blazorade.Bootstrap.Components.Showroom 2 | =================================== 3 | 4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/wwwroot/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/Blazorade.Bootstrap.Components.Showroom/wwwroot/background.png -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/wwwroot/blazorade-logo-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/Blazorade.Bootstrap.Components.Showroom/wwwroot/blazorade-logo-64.png -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/wwwroot/exampleJsInterop.js: -------------------------------------------------------------------------------- 1 | // This file is to show how a library package may provide JavaScript interop features 2 | // wrapped in a .NET API 3 | 4 | window.exampleJsFunctions = { 5 | showPrompt: function (message) { 6 | return prompt(message, 'Type anything here'); 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Showroom/wwwroot/styles.css: -------------------------------------------------------------------------------- 1 | /* 2 | This file is to show how CSS and other static resources (such as images) can be 3 | used from a library project/package. 4 | */ 5 | 6 | .my-component { 7 | border: 2px dashed red; 8 | padding: 1em; 9 | margin: 1em 0; 10 | background-image: url('background.png'); 11 | } 12 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Tests/Blazorade.Bootstrap.Components.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Tests/ContentAlignmentTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components.Tests 7 | { 8 | [TestClass] 9 | public class ContentAlignmentTests 10 | { 11 | 12 | [TestMethod] 13 | public void Equals01() 14 | { 15 | var ca1 = HorizontalAlignment.Center; 16 | var ca2 = HorizontalAlignment.Center; 17 | Assert.AreEqual(ca1, ca2); 18 | Assert.IsTrue(ca1 == ca2); 19 | } 20 | 21 | [TestMethod] 22 | public void Equals02() 23 | { 24 | HorizontalAlignment? ca1 = null; 25 | HorizontalAlignment ca2 = HorizontalAlignment.Left; 26 | 27 | Assert.AreNotEqual(ca2, ca1); 28 | } 29 | 30 | [TestMethod] 31 | public void Equals03() 32 | { 33 | HorizontalAlignment? ca1 = HorizontalAlignment.Right; 34 | HorizontalAlignment ca2 = HorizontalAlignment.Right; 35 | 36 | Assert.AreEqual(ca1, ca2); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Tests/SizingTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Globalization; 5 | using System.Text; 6 | 7 | namespace Blazorade.Bootstrap.Components.Tests 8 | { 9 | [TestClass] 10 | public class SizingTests 11 | { 12 | 13 | [TestMethod] 14 | public void CreateSize01() 15 | { 16 | Size s = .75d; 17 | Assert.AreEqual("75%", s.ToString()); 18 | } 19 | 20 | [TestMethod] 21 | public void CreateSize02() 22 | { 23 | Size s = 64d; 24 | Assert.AreEqual("64px", s.ToString()); 25 | } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components.Tests/SpacingTests.cs: -------------------------------------------------------------------------------- 1 | using Blazorade.Bootstrap.Components.Content; 2 | using Blazorade.Bootstrap.Components.Utilities; 3 | using Microsoft.VisualStudio.TestTools.UnitTesting; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | 8 | namespace Blazorade.Bootstrap.Components.Tests 9 | { 10 | [TestClass] 11 | public class SpacingTests 12 | { 13 | 14 | [TestMethod] 15 | public void Margin01() 16 | { 17 | var m1 = Spacing.S1; 18 | var m2 = 1; 19 | var m3 = "1"; 20 | 21 | var div1 = new Div { Margin = m1 }; 22 | var div2 = new Div { Margin = m2 }; 23 | var div3 = new Div { Margin = m3 }; 24 | 25 | Assert.AreEqual(m1, div1.Margin); 26 | Assert.AreEqual(m1, div2.Margin); 27 | Assert.AreEqual(m1, div3.Margin); 28 | } 29 | 30 | 31 | [TestMethod] 32 | public void Spacing01() 33 | { 34 | Spacing s1 = -5; 35 | Spacing s2 = "-5"; 36 | 37 | Assert.AreEqual(s1, s2); 38 | Assert.IsTrue(s1.IsNegative); 39 | Assert.AreEqual("n5", s1.Value); 40 | } 41 | 42 | [TestMethod] 43 | public void Spacing02() 44 | { 45 | Spacing s1 = "auto"; 46 | Assert.IsTrue(s1.IsAuto); 47 | 48 | Spacing s2 = "a"; 49 | Assert.AreEqual(s1, s2); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/AddonPlacement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines options for addon placement in components. 9 | /// 10 | /// 11 | public enum AddonPlacement 12 | { 13 | /// 14 | /// Addons are appended to the input controls. 15 | /// 16 | Append, 17 | 18 | /// 19 | /// Addons are prepended to the input controls. 20 | /// 21 | Prepend 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Alert.razor: -------------------------------------------------------------------------------- 1 | @inherits ColoredBootstrapComponentBase 2 | 3 |
4 | @* 5 | We must wrap the alert component with an additional div that represents the root of our component. This is because 6 | Bootstrap removes the alert element from the DOM when it is dismissed. This is done by the Bootstrap JavaScript, which 7 | will cause problems for the Blazor rendering. 8 | *@ 9 | 10 |
11 | @if (this.IsDismissible) 12 | { 13 | 16 | } 17 | 18 | @if (null != this.HeadingTemplate) 19 | { 20 | @this.HeadingTemplate 21 | } 22 | else if (!string.IsNullOrEmpty(this.Heading)) 23 | { 24 | @this.Heading 25 | } 26 | 27 | @ChildContent 28 |
29 |
30 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/AlertLink.razor: -------------------------------------------------------------------------------- 1 | @inherits Anchor 2 | 3 | @this.ChildContent 14 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/AlertLink.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// This component can be used inside of components to provide link colors matching with the parent component. 9 | /// 10 | /// 11 | public partial class AlertLink 12 | { 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Alerts.AlertLink); 18 | 19 | base.OnParametersSet(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Backdrop.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | 8 | /// 9 | /// Defines behaviour for modal backdrops on components. 10 | /// 11 | /// 12 | public enum Backdrop 13 | { 14 | /// 15 | /// Do not display a backdrop. Clicking outside of the modal will not close the modal. 16 | /// 17 | Hidden, 18 | 19 | /// 20 | /// Shows the default backdrop. Clicking the backdrop will close the modal. 21 | /// 22 | Default, 23 | 24 | /// 25 | /// A static backdrop. Clicking the backdrop will not close the modal. 26 | /// 27 | Static 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Badge.razor: -------------------------------------------------------------------------------- 1 | @inherits ColoredBootstrapComponentBase 2 | 3 | @if (string.IsNullOrEmpty(this.Url)) 4 | { 5 | @this.ChildContent 6 | } 7 | else 8 | { 9 | @this.ChildContent 10 | } 11 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Badge.razor.cs: -------------------------------------------------------------------------------- 1 | using Blazorade.Bootstrap.Components.Model; 2 | using Microsoft.AspNetCore.Components; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Blazorade.Bootstrap.Components 9 | { 10 | /// 11 | /// The Badge component is used to add counts and labels to other components. 12 | /// 13 | public partial class Badge 14 | { 15 | 16 | /// 17 | /// Specifies whether the badge is a pill, i.e. with rounded corners. 18 | /// 19 | [Parameter] 20 | public bool IsPill { get; set; } 21 | 22 | /// 23 | /// Defines whether to open the link in a new tab. 24 | /// 25 | [Parameter] 26 | public bool OpenInNewTab { get; set; } 27 | 28 | /// 29 | /// The URL to use as link for the batch. 30 | /// 31 | [Parameter] 32 | public string Url { get; set; } 33 | 34 | 35 | 36 | /// 37 | /// 38 | protected override void OnParametersSet() 39 | { 40 | this.AddClasses(ClassNames.Badges.Badge); 41 | if (this.IsPill) this.AddClasses(ClassNames.Badges.Pill); 42 | 43 | base.OnParametersSet(); 44 | } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Breadcrumb.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @code { int ix = 0; } 4 | 5 | 37 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/BreadcrumbItem.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
  • 4 | @if (!string.IsNullOrEmpty(this.Url)) 5 | { 6 | 7 | @if(null != this.ChildContent) 8 | { 9 | @this.ChildContent 10 | } 11 | else 12 | { 13 | @this.Text 14 | } 15 | 16 | } 17 | else 18 | { 19 | 20 | @if(null != this.ChildContent) 21 | { 22 | @this.ChildContent 23 | } 24 | else 25 | { 26 | @this.Text 27 | } 28 | 29 | } 30 |
  • 31 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Builder/IResponsiveBreakpointModifiers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Builder 6 | { 7 | /// 8 | /// Defines modifiers for applying component features on the different responsive breakpoints supported by Bootstrap. 9 | /// 10 | /// The type of feature interface to return by the modifier methods. 11 | /// 12 | /// The XS breakpoint is missing because anything not explicitly applied to a responsive breakpoint applies to 13 | /// all breakpoints, including XS. 14 | /// 15 | public interface IResponsiveBreakpointModifiers 16 | { 17 | /// 18 | /// Configures the preceeding features to be applied on all responsive breakpoints. 19 | /// 20 | TFeature OnAll(); 21 | 22 | /// 23 | /// Configures the preceeding features to be applied to the SM responsive breakpoint and above. 24 | /// 25 | TFeature OnSm(); 26 | 27 | /// 28 | /// Configures the preceeding features to be applied to the MD responsive breakpoint and above. 29 | /// 30 | TFeature OnMd(); 31 | 32 | /// 33 | /// Configures the preceeding features to be applied to the LG responsive breakpoint and above. 34 | /// 35 | TFeature OnLg(); 36 | 37 | /// 38 | /// Configures the preceeding features to be applied to the XL responsive breakpoint and above. 39 | /// 40 | TFeature OnXl(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Button.razor: -------------------------------------------------------------------------------- 1 | @inherits ColoredBootstrapComponentBase 2 | 3 | 6 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ButtonGroup.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ButtonGroup.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// The ButtonGroup component is used to group components together. Buttons in the same group are joined together. 10 | /// 11 | public partial class ButtonGroup 12 | { 13 | 14 | /// 15 | /// Specifies the default size for buttons in the group. 16 | /// 17 | [Parameter] 18 | public ButtonSize? Size { get; set; } 19 | 20 | 21 | 22 | /// 23 | /// 24 | protected override void OnParametersSet() 25 | { 26 | this.AddClasses(ClassNames.ButtonGroups.Group); 27 | switch (this.Size.GetValueOrDefault()) 28 | { 29 | case ButtonSize.Large: 30 | this.AddClasses(ClassNames.ButtonGroups.Large); 31 | break; 32 | 33 | case ButtonSize.Small: 34 | this.AddClasses(ClassNames.ButtonGroups.Small); 35 | break; 36 | } 37 | 38 | base.OnParametersSet(); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ButtonToolbar.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ButtonToolbar.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// The ButtonToolbar component combines sets of components together into a toolbar. 9 | /// 10 | public partial class ButtonToolbar 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.ButtonToolbars.Toolbar); 18 | 19 | base.OnParametersSet(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Card.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @if (null != this.HeaderTemplate) 5 | { 6 | @this.HeaderTemplate(this.Header) 7 | } 8 | else if (!string.IsNullOrEmpty(this.Header)) 9 | { 10 | @this.Header 11 | } 12 | 13 | 14 | 15 | @if (null != this.BodyTemplate) 16 | { 17 | @this.BodyTemplate 18 | } 19 | else 20 | { 21 | 22 | } 23 | 24 | 25 | @if (null != this.ImageTemplate) 26 | { 27 | @this.ImageTemplate(context) 28 | } 29 | else 30 | { 31 | 32 | } 33 | 34 | 35 | 36 | @if (null != this.FooterTemplate) 37 | { 38 | @this.FooterTemplate(this.Footer) 39 | } 40 | else if (!string.IsNullOrEmpty(this.Footer)) 41 | { 42 | @this.Footer 43 | } 44 |
    45 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardBody.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @if (null != this.TitleTemplate) 5 | { 6 | @this.TitleTemplate(this.Title) 7 | } 8 | else if (!string.IsNullOrEmpty(this.Title)) 9 | { 10 | @this.Title 11 | } 12 | 13 | @if (null != this.SubtitleTemplate) 14 | { 15 | @this.SubtitleTemplate(this.Subtitle) 16 | } 17 | else if (!string.IsNullOrEmpty(this.Subtitle)) 18 | { 19 | @this.Subtitle 20 | } 21 | 22 | 23 | 24 | @if (null != this.TextTemplate) 25 | { 26 | @this.TextTemplate(this.Text) 27 | } 28 | else if (!string.IsNullOrEmpty(this.Text)) 29 | { 30 | @foreach (var line in this.Text.Lines()) 31 | { 32 | @line 33 | } 34 | } 35 | 36 | 37 | @if (null != this.LinkSectionTemplate) 38 | { 39 | @this.LinkSectionTemplate(this.Links) 40 | } 41 | else if (this.Links?.Count() > 0) 42 | { 43 | @foreach (var link in this.Links) 44 | { 45 | @if (null != this.LinkTemplate) 46 | { 47 | @this.LinkTemplate(link) 48 | } 49 | else 50 | { 51 | 52 | } 53 | } 54 | } 55 | 56 | @this.ChildContent 57 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardContent.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @if (!string.IsNullOrEmpty(this.ImageUrl)) 4 | { 5 | if (this.ImagePosition == CardImagePosition.Top || this.ImagePosition == CardImagePosition.Overlay) 6 | { 7 | @this.ImageTemplate(this.ImageUrl) 8 | @this.BodyTemplate 9 | } 10 | else if (this.ImagePosition == CardImagePosition.Bottom) 11 | { 12 | @this.BodyTemplate 13 | @this.ImageTemplate(this.ImageUrl) 14 | } 15 | else if (this.ImagePosition == CardImagePosition.Left) 16 | { 17 |
    18 |
    @this.ImageTemplate(this.ImageUrl)
    19 |
    @this.BodyTemplate
    20 |
    21 | } 22 | else if (this.ImagePosition == CardImagePosition.Right) 23 | { 24 |
    25 |
    @this.BodyTemplate
    26 |
    @this.ImageTemplate(this.ImageUrl)
    27 |
    28 | } 29 | } 30 | else 31 | { 32 | @this.BodyTemplate 33 | } -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardContent.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// The CardContent represents all content in a component, except for 10 | /// the and . 11 | /// 12 | /// 13 | /// 14 | /// Normally, you should not need to use this component in your code. Instead, use the component. 15 | /// 16 | /// 17 | /// 18 | partial class CardContent 19 | { 20 | 21 | /// 22 | /// The template to use for the card body. 23 | /// 24 | [Parameter] 25 | public RenderFragment BodyTemplate { get; set; } 26 | 27 | /// 28 | /// Specifies the position for the image specified in . 29 | /// 30 | [Parameter] 31 | public CardImagePosition ImagePosition { get; set; } 32 | 33 | /// 34 | /// The template to use for the card image. 35 | /// 36 | [Parameter] 37 | public RenderFragment ImageTemplate { get; set; } 38 | 39 | /// 40 | /// The URL, either absolute or relative, to the image to show in the card. 41 | /// 42 | [Parameter] 43 | public string ImageUrl { get; set; } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardFooter.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardFooter.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents the footer in a component. 9 | /// 10 | public partial class CardFooter 11 | { 12 | /// 13 | /// 14 | protected override void OnParametersSet() 15 | { 16 | this.AddClasses(ClassNames.Cards.Footer); 17 | base.OnParametersSet(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardGroup.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardGroup.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// Represents a group of components. 10 | /// 11 | public partial class CardGroup 12 | { 13 | /// 14 | /// 15 | public CardGroup() 16 | { 17 | this.Type = CardGroupType.Group; 18 | } 19 | 20 | 21 | /// 22 | /// Specifies the type for the group. 23 | /// 24 | [Parameter] 25 | public CardGroupType Type { get; set; } 26 | 27 | 28 | /// 29 | /// 30 | protected override void OnParametersSet() 31 | { 32 | switch (this.Type) 33 | { 34 | case CardGroupType.Group: 35 | this.AddClasses(ClassNames.CardGroups.Group); 36 | break; 37 | 38 | case CardGroupType.Deck: 39 | this.AddClasses(ClassNames.CardGroups.Deck); 40 | break; 41 | 42 | case CardGroupType.Columns: 43 | this.AddClasses(ClassNames.CardGroups.Columns); 44 | break; 45 | } 46 | base.OnParametersSet(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardGroupType.cs: -------------------------------------------------------------------------------- 1 | namespace Blazorade.Bootstrap.Components 2 | { 3 | /// 4 | /// Defines different types for components. 5 | /// 6 | public enum CardGroupType 7 | { 8 | /// 9 | /// The default type. Cards in a group of this type have equal width and equal height with no specing in between the cards. 10 | /// 11 | Group, 12 | 13 | /// 14 | /// Cards in a group of this type have equal width and equal height with a little bit of spacing in between. 15 | /// 16 | Deck, 17 | 18 | /// 19 | /// Cards in a group of this type have equal width, but the height is whatever height each card has. Cards are arranged 20 | /// top to bottom, left to right. 21 | /// 22 | Columns 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardHeader.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardHeader.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents the header on a component. 9 | /// 10 | public partial class CardHeader 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Cards.Header); 18 | base.OnParametersSet(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardImage.razor: -------------------------------------------------------------------------------- 1 | @inherits ImageBase 2 | 3 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardImage.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// Renders an image in a component. 10 | /// 11 | public partial class CardImage 12 | { 13 | 14 | /// 15 | /// Specifies whether the card is an overlay image, i.e. the contents of the card are 16 | /// overlaid ver the image. 17 | /// 18 | [Parameter] 19 | public bool IsOverlay { get; set; } 20 | 21 | 22 | 23 | /// 24 | /// 25 | protected override void OnParametersSet() 26 | { 27 | if (!this.IsOverlay) 28 | { 29 | this.AddClasses(ClassNames.Cards.Image); 30 | } 31 | else 32 | { 33 | this.AddClasses(ClassNames.Cards.OverlayImage); 34 | } 35 | 36 | base.OnParametersSet(); 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardImagePosition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines different positions for images contained in components. 9 | /// 10 | public enum CardImagePosition 11 | { 12 | /// 13 | /// Default. The image is positioned at the top of the card. 14 | /// 15 | Top, 16 | 17 | /// 18 | /// The image is positioned at the bottom of the card. 19 | /// 20 | Bottom, 21 | 22 | /// 23 | /// The image is positioned to the left of the card. 24 | /// 25 | Left, 26 | 27 | /// 28 | /// The image is positioned to the right of the card. 29 | /// 30 | Right, 31 | 32 | /// 33 | /// The contents of the card are overlaid over the image. 34 | /// 35 | Overlay 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardLink.razor: -------------------------------------------------------------------------------- 1 | @inherits Anchor 2 | 3 | @this.ChildContent 14 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardLink.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents a link in a component. 9 | /// 10 | public partial class CardLink 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Cards.Link); 18 | base.OnParametersSet(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardSubtitle.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @this.ChildContent 4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardSubtitle.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents the subtitle on a component. 9 | /// 10 | public partial class CardSubtitle 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Cards.Subtitle, ClassNames.InlineText.TextMuted); 18 | base.OnParametersSet(); 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardText.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @this.ChildContent -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardText.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Microsoft.AspNetCore.Components; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// Represents the text on a component. 10 | /// 11 | public partial class CardText 12 | { 13 | 14 | /// 15 | /// 16 | protected override void OnParametersSet() 17 | { 18 | this.AddClasses(ClassNames.Cards.Text); 19 | base.OnParametersSet(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardTitle.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @this.ChildContent 4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CardTitle.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents the title on a component. 9 | /// 10 | public partial class CardTitle 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Cards.Title); 18 | base.OnParametersSet(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Carousel.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @{ 4 | string innerClasses = $"{ClassNames.Carousels.Inner} h-100"; 5 | } 6 | 7 |
    8 | @if (this.ShowIndicators) 9 | { 10 |
      11 | @for (int i = 0; i < this.SlideCount; i++) 12 | { 13 |
    1. 14 | } 15 |
    16 | } 17 |
    18 | @if (null != this.ImageUrls) 19 | { 20 | @for (var i = 0; i < this.ImageUrls.Count(); i++) 21 | { 22 | 23 | } 24 | } 25 | else 26 | { 27 | @this.ChildContent 28 | } 29 |
    30 | 31 | @if (this.ShowControls) 32 | { 33 | 34 | 35 | } 36 |
    37 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CarouselControl.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CarouselControlDirection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines directions for a component. 9 | /// 10 | public enum CarouselControlDirection 11 | { 12 | /// 13 | /// Moves the carousel to the next slide. 14 | /// 15 | Next, 16 | 17 | /// 18 | /// Moves the carousel to the previous slide. 19 | /// 20 | Previous 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CarouselItem.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 | 6 | @if (!string.IsNullOrEmpty(this.ImageUrl)) 7 | { 8 | 9 | } 10 | else if(null == this.ChildContent && !string.IsNullOrEmpty(this.MinHeight)) 11 | { 12 |
    13 | } 14 | 15 | @if (!string.IsNullOrEmpty(this.CaptionHeading) || !string.IsNullOrEmpty(this.CaptionBody) || null != this.CaptionHeadingTemplate || null != this.CaptionBodyTemplate) 16 | { 17 |
    18 | @if (null != this.CaptionHeadingTemplate) 19 | { 20 | @this.CaptionHeadingTemplate(this.CaptionHeading) 21 | } 22 | else if (!string.IsNullOrEmpty(this.CaptionHeading)) 23 | { 24 | @this.CaptionHeading 25 | } 26 | 27 | @if (null != this.CaptionBodyTemplate) 28 | { 29 | @this.CaptionBodyTemplate(this.CaptionBody) 30 | } 31 | else if (!string.IsNullOrEmpty(this.CaptionBody)) 32 | { 33 | @this.CaptionBody 34 | } 35 |
    36 | } 37 | 38 |
    39 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CarouselSlideEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// The event args class for and . 9 | /// 10 | public class CarouselSlideEventArgs 11 | { 12 | /// 13 | /// 14 | public CarouselSlideEventArgs(Carousel carousel, int from, int to, string direction) 15 | { 16 | this.Carousel = carousel; 17 | this.From = from; 18 | this.To = to; 19 | this.Direction = direction; 20 | } 21 | 22 | 23 | /// 24 | /// The source component instance for the event. 25 | /// 26 | public Carousel Carousel { get; private set; } 27 | 28 | /// 29 | /// The zero-based index of the slide the carousel is moving from. 30 | /// 31 | public int From { get; private set; } 32 | 33 | /// 34 | /// The zero-based index of the slide the carousel is moving to. 35 | /// 36 | public int To { get; private set; } 37 | 38 | /// 39 | /// A textual representation of the direction. 40 | /// 41 | public string Direction { get; private set; } 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/CarouselTransitionType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines different types for transitions between slides in a component. 9 | /// 10 | public enum CarouselTransitionType 11 | { 12 | /// 13 | /// The slide are changed by sliding left or right. 14 | /// 15 | Slide, 16 | 17 | /// 18 | /// The slides are changed by fading from one to the other. 19 | /// 20 | Fade 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Collapse.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    @this.ChildContent
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ColoredBootstrapComponentBase.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System.Text; 3 | 4 | namespace Blazorade.Bootstrap.Components 5 | { 6 | 7 | /// 8 | /// The base class for all Bootstrap components that support colour theming with the colours specified in . 9 | /// 10 | public abstract class ColoredBootstrapComponentBase : BootstrapComponentBase 11 | { 12 | 13 | /// 14 | /// 15 | protected ColoredBootstrapComponentBase() 16 | { 17 | this.AddClasses(this.GetType().Name.ToLower()); 18 | } 19 | 20 | 21 | /// 22 | /// Specifies the colour to use in the component. 23 | /// 24 | [Parameter] 25 | public NamedColor? Color { get; set; } 26 | 27 | 28 | 29 | /// 30 | /// 31 | protected override void OnParametersSet() 32 | { 33 | var styleContext = this.GetColorClassName(color: this.Color); 34 | this.AddClasses(styleContext); 35 | 36 | base.OnParametersSet(); 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ComponentSize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines standard values for specifying size on many Bootstrap components. 9 | /// 10 | public enum ComponentSize 11 | { 12 | /// 13 | /// The default size of the component. This is the size the component has if not explicitly specified. 14 | /// 15 | Normal = 0, 16 | 17 | /// 18 | /// A small component. 19 | /// 20 | Small = -1, 21 | 22 | /// 23 | /// A large component. 24 | /// 25 | Large = 1 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Configuration/BlazoradeBootstrapBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.DependencyInjection; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components.Configuration 7 | { 8 | 9 | /// 10 | /// The builder that is used to build the configuration for Blazorade Bootstrap with. 11 | /// 12 | public class BlazoradeBootstrapBuilder 13 | { 14 | internal BlazoradeBootstrapBuilder(IServiceCollection services) 15 | { 16 | this.Services = services; 17 | 18 | this.BlazoradeBootstrapOptions = new BlazoradeBootstrapOptions(); 19 | this.TooltipOptions = new TooltipOptions(); 20 | } 21 | 22 | public IServiceCollection Services { get; private set; } 23 | 24 | 25 | internal BlazoradeBootstrapOptions BlazoradeBootstrapOptions { get; private set; } 26 | 27 | internal TooltipOptions TooltipOptions { get; private set; } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Configuration/BlazoradeBootstrapOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Configuration 6 | { 7 | /// 8 | /// The options class for basic Blazorade Bootstrap options. 9 | /// 10 | public class BlazoradeBootstrapOptions 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Configuration/StartupExtensions.cs: -------------------------------------------------------------------------------- 1 | using Blazorade.Bootstrap.Components.Configuration; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Microsoft.Extensions.DependencyInjection 7 | { 8 | /// 9 | /// Extension methods for configuring Blazorade Bootstrap at startup. 10 | /// 11 | public static class StartupExtensions 12 | { 13 | 14 | public static BlazoradeBootstrapBuilder AddBlazoradeBootstrap(this IServiceCollection services, Action configure = null) 15 | { 16 | var builder = new BlazoradeBootstrapBuilder(services); 17 | services.AddSingleton(builder.BlazoradeBootstrapOptions); 18 | services.AddSingleton(builder.TooltipOptions); 19 | 20 | 21 | if(null != configure) 22 | { 23 | configure(builder.BlazoradeBootstrapOptions); 24 | } 25 | 26 | return builder; 27 | } 28 | 29 | public static BlazoradeBootstrapBuilder WithTooltip(this BlazoradeBootstrapBuilder builder, Action configure = null) 30 | { 31 | if(null != configure) 32 | { 33 | configure(builder.TooltipOptions); 34 | } 35 | 36 | return builder; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Configuration/TooltipOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Configuration 6 | { 7 | /// 8 | /// Defines options for tooltips. 9 | /// 10 | public class TooltipOptions 11 | { 12 | /// 13 | /// Creates a new instance. 14 | /// 15 | public TooltipOptions() 16 | { 17 | this.DefaultPlacement = TooltipPlacement.Top; 18 | this.SanitizeHtml = true; 19 | } 20 | 21 | 22 | /// 23 | /// Specifies whether to allow HTML markup in tooltips. Default is false. 24 | /// 25 | public bool AllowHtml { get; set; } 26 | 27 | /// 28 | /// Specifies the default placement for your tooltips. The default is . 29 | /// 30 | public TooltipPlacement DefaultPlacement { get; set; } 31 | 32 | /// 33 | /// Determines whether HTML markup will be sanitized using the configured sanitization mechanism. Default is true. 34 | /// 35 | public bool SanitizeHtml { get; set; } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Anchor.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | @implements ILink 3 | 4 | 5 | @if(string.IsNullOrEmpty(this.Text)) 6 | { 7 | @this.ChildContent 8 | } 9 | else 10 | { 11 | @this.Text 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Blockquote.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    6 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Blockquote.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Content 6 | { 7 | /// 8 | /// The Blockquote component represents a standard blockquote element in HTML. 9 | /// 10 | public partial class Blockquote 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.BlockQuotes.Blockquote); 18 | base.OnParametersSet(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Div.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    6 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Div.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Content 6 | { 7 | /// 8 | /// The Div component represents a standard <div /> element. 9 | /// 10 | /// 11 | /// 12 | /// 13 | /// 14 | partial class Div 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Heading.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @switch (this.Level.Value) 4 | { 5 | case HeadingLevel.H1Value: 6 |

    @this.ChildContent

    7 | break; 8 | 9 | case HeadingLevel.H2Value: 10 |

    @this.ChildContent

    11 | break; 12 | 13 | case HeadingLevel.H3Value: 14 |

    @this.ChildContent

    15 | break; 16 | 17 | case HeadingLevel.H4Value: 18 |

    @this.ChildContent

    19 | break; 20 | 21 | case HeadingLevel.H5Value: 22 |
    @this.ChildContent
    23 | break; 24 | 25 | case HeadingLevel.H6Value: 26 |
    @this.ChildContent
    27 | break; 28 | } 29 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Heading.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components.Content 7 | { 8 | /// 9 | /// Represents the heading elements H1, H2, H3, H4, H5 and H6. 10 | /// 11 | public partial class Heading 12 | { 13 | 14 | /// 15 | /// 16 | public Heading() 17 | { 18 | this.Level = HeadingLevel.H1; 19 | } 20 | 21 | 22 | /// 23 | /// Use this property to specify a different display size for your heading to better visually fit into the overall look and feel. 24 | /// 25 | [Parameter] 26 | public HeadingDisplay? Display { get; set; } 27 | 28 | /// 29 | /// Specifies that the heading is also an anchor that you can link to. This requires that the Id property is also set on the 30 | /// heading. An anchor heading will display a link icon when hovered over to indicate that the heading is an anchor. 31 | /// 32 | [Parameter] 33 | public bool IsAnchor { get; set; } 34 | 35 | /// 36 | /// The heading level. 37 | /// 38 | [Parameter] 39 | public HeadingLevel Level { get; set; } 40 | 41 | 42 | /// 43 | /// 44 | protected override void OnParametersSet() 45 | { 46 | if (this.Display.HasValue) 47 | { 48 | this.AddClasses($"display-{(int)this.Display.Value.Value}"); 49 | } 50 | 51 | 52 | base.OnParametersSet(); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/HeadingContent.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @if (this.IsAnchor && !string.IsNullOrEmpty(this.HeadingId)) 4 | { 5 |
    6 | @this.ChildContent 7 | # 8 |
    9 | } 10 | else 11 | { 12 | @this.ChildContent 13 | } 14 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Paragraph.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |

    4 | @this.ChildContent 5 |

    6 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Paragraph.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components.Content 7 | { 8 | /// 9 | /// The component produces a standard <p /> HTML element. 10 | /// 11 | partial class Paragraph 12 | { 13 | 14 | /// 15 | /// Specifies whether the paragraph is a lead paragraph. 16 | /// 17 | [Parameter] 18 | public bool IsLead { get; set; } 19 | 20 | /// 21 | /// 22 | protected override void OnParametersSet() 23 | { 24 | if (this.IsLead) 25 | { 26 | this.AddClasses(ClassNames.Paragraphs.Lead); 27 | } 28 | base.OnParametersSet(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Span.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | 4 | @this.ChildContent 5 | 6 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Content/Span.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Content 6 | { 7 | /// 8 | /// The Span component represents a standard <span /> element. 9 | /// 10 | partial class Span 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Dropdown.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Dropdown.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// The Dropdown component is a contextual overlay that displays a list of links and other elements. The Dropdown component can be toggled. 9 | /// 10 | public partial class Dropdown 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Dropdowns.Dropdown); 18 | 19 | base.OnParametersSet(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownDivider.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownDivider.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// The component is used to add a divider between items in a menu. 9 | /// 10 | public partial class DropdownDivider 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Dropdowns.Divider); 18 | base.OnParametersSet(); 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownItem.cs: -------------------------------------------------------------------------------- 1 | using Blazorade.Bootstrap.Components.Content; 2 | using Microsoft.AspNetCore.Components; 3 | using Microsoft.AspNetCore.Components.Web; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | 8 | namespace Blazorade.Bootstrap.Components 9 | { 10 | /// 11 | /// The component is used inside a component to display a link or other element. 12 | /// 13 | public partial class DropdownItem : Anchor 14 | { 15 | 16 | /// 17 | /// 18 | protected override void OnParametersSet() 19 | { 20 | this.AddClasses(ClassNames.Dropdowns.Item); 21 | base.OnParametersSet(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownMenu.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownMenu.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// The component is uses as child component in a component. 10 | /// It is the parent to one or many components. 11 | /// 12 | public partial class DropdownMenu 13 | { 14 | 15 | /// 16 | /// 17 | protected override void OnParametersSet() 18 | { 19 | this.AddClasses(ClassNames.Dropdowns.Menu); 20 | base.OnParametersSet(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownNavItem.razor: -------------------------------------------------------------------------------- 1 | @inherits NavItem 2 | 3 | 4 |
  • 5 | 6 | 7 | 20 |
  • -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownNavItem.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents an item in a component with child items. 9 | /// 10 | public partial class DropdownNavItem 11 | { 12 | /// 13 | /// 14 | public DropdownNavItem() 15 | { 16 | this.Url = "#"; 17 | } 18 | 19 | 20 | /// 21 | /// 22 | protected override void OnParametersSet() 23 | { 24 | this.AddClasses(ClassNames.Dropdowns.Dropdown); 25 | base.OnParametersSet(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownToggleButton.razor: -------------------------------------------------------------------------------- 1 | @inherits Button 2 | 3 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownToggleButton.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// A button that is used to toggle a component. 9 | /// 10 | public partial class DropdownToggleButton 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Dropdowns.Toggle); 18 | this.AddAttribute("role", "button"); 19 | this.AddAttribute("data-toggle", "dropdown"); 20 | this.AddAttribute("aria-haspopup", "true"); 21 | this.AddAttribute("aria-expanded", "false"); 22 | 23 | base.OnParametersSet(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownToggleLink.razor: -------------------------------------------------------------------------------- 1 | @inherits Anchor 2 | 3 | 4 | 5 | @if(null != this.ChildContent) 6 | { 7 | @this.ChildContent 8 | } 9 | else 10 | { 11 | @this.Text 12 | } 13 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/DropdownToggleLink.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// A link that is used to toggle a component. 9 | /// 10 | public partial class DropdownToggleLink 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Dropdowns.Toggle); 18 | this.AddAttribute("role", "button"); 19 | this.AddAttribute("data-toggle", "dropdown"); 20 | this.AddAttribute("aria-haspopup", "true"); 21 | this.AddAttribute("aria-expanded", "false"); 22 | 23 | base.OnParametersSet(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Embed.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | 5 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/EmbedAspectRatio.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines aspect ratios for . 9 | /// 10 | public enum EmbedAspectRatio 11 | { 12 | /// 13 | /// 21 by 9 14 | /// 15 | Ratio21by9, 16 | 17 | /// 18 | /// 16 by 9 19 | /// 20 | Ratio16by9, 21 | 22 | /// 23 | /// 4 by 3 24 | /// 25 | Ratio4by3, 26 | 27 | /// 28 | /// 1 by 1 29 | /// 30 | Ratio1by1 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/EventNames.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | public static class EventNames 8 | { 9 | 10 | public static class Alert 11 | { 12 | public const string Close = "close.bs.alert"; 13 | 14 | public const string Closed = "closed.bs.alert"; 15 | } 16 | 17 | public static class Carousel 18 | { 19 | public const string Slide = "slide.bs.carousel"; 20 | 21 | public const string Slid = "slid.bs.carousel"; 22 | } 23 | 24 | public static class Collapse 25 | { 26 | public const string Hide = "hide.bs.collapse"; 27 | 28 | public const string Hidden = "hidden.bs.collapse"; 29 | 30 | public const string Show = "show.bs.collapse"; 31 | 32 | public const string Shown = "shown.bs.collapse"; 33 | } 34 | 35 | public static class Modal 36 | { 37 | public const string Hide = "hide.bs.modal"; 38 | 39 | public const string Hidden = "hidden.bs.modal"; 40 | 41 | public const string HidePrevented = "hidePrevented.bs.modal"; 42 | 43 | public const string Show = "show.bs.modal"; 44 | 45 | public const string Shown = "shown.bs.modal"; 46 | } 47 | 48 | public static class Toast 49 | { 50 | public const string Show = "show.bs.toast"; 51 | 52 | public const string Shown = "shown.bs.toast"; 53 | 54 | public const string Hide = "hide.bs.toast"; 55 | 56 | public const string Hidden = "hidden.bs.toast"; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/HorizontalAlignment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines different horizontal alignments values. 9 | /// 10 | public enum HorizontalAlignment 11 | { 12 | /// 13 | /// Left alignment. 14 | /// 15 | Left, 16 | 17 | /// 18 | /// Center alignment. 19 | /// 20 | Center, 21 | 22 | /// 23 | /// Right alignment. 24 | /// 25 | Right 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ImageBase.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// Base class for images. 10 | /// 11 | public abstract class ImageBase : BootstrapComponentBase 12 | { 13 | 14 | /// 15 | /// The absolute or relative URL of the image. 16 | /// 17 | [Parameter] 18 | public string Src { get; set; } 19 | 20 | /// 21 | /// The alt text to use for the image. 22 | /// 23 | [Parameter] 24 | public string Alt { get; set; } 25 | 26 | 27 | 28 | /// 29 | /// 30 | protected override void OnParametersSet() 31 | { 32 | this.AddAttribute("src", this.Src); 33 | if (!string.IsNullOrEmpty(this.Alt)) 34 | { 35 | this.AddAttribute("alt", this.Alt); 36 | } 37 | 38 | base.OnParametersSet(); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ImageScaleMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines different modes for scaling images. 9 | /// 10 | public enum ImageScaleMode 11 | { 12 | /// 13 | /// The image will be resized so that it completely fits within the area specified for the image. 14 | /// 15 | Fit, 16 | 17 | /// 18 | /// The image will be resized so that it completely fills the area specified for the image. Some cropping may occur. 19 | /// 20 | Fill 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/InputGroup.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @if(this.ShowPrependAddons()) 5 | { 6 |
    7 | @this.PrependAddonsTemplate 8 | 9 | @if(this.GetAddonsPlacement() == Components.AddonPlacement.Prepend) 10 | { 11 | @this.AddonsTemplate 12 | 13 | @if (!string.IsNullOrEmpty(this.AddonText)) 14 | { 15 | @this.AddonText 16 | } 17 | } 18 |
    19 | } 20 | 21 | @if (null != this.InputsTemplate) 22 | { 23 | @this.InputsTemplate 24 | } 25 | else 26 | { 27 | @if (this.InputType != InputType.TextMultiline) 28 | { 29 | 30 | } 31 | else 32 | { 33 | 34 | } 35 | } 36 | 37 | 38 | @if(this.ShowAppendAddons()) 39 | { 40 |
    41 | @if(this.GetAddonsPlacement() == Components.AddonPlacement.Append) 42 | { 43 | @if (!string.IsNullOrEmpty(this.AddonText)) 44 | { 45 | @this.AddonText 46 | } 47 | 48 | @this.AddonsTemplate 49 | } 50 | 51 | @this.AppendAddonsTemplate 52 |
    53 | } 54 |
    55 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/InputGroupTextAddon.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | 4 | @this.ChildContent 5 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/InputGroupTextAddon.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// A simple text addon for components. 9 | /// 10 | /// 11 | partial class InputGroupTextAddon 12 | { 13 | 14 | /// 15 | /// 16 | protected override void OnParametersSet() 17 | { 18 | base.OnParametersSet(); 19 | 20 | this.AddClasses(ClassNames.InputGroups.Text); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/InputType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | public enum InputType 8 | { 9 | Colour, 10 | Date, 11 | DateTimeLocal, 12 | Email, 13 | Month, 14 | Number, 15 | Password, 16 | Tel, 17 | Text, 18 | TextMultiline, 19 | Time, 20 | Url, 21 | Week, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Jumbotron.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | 5 | @if (null != this.HeadingTemplate) 6 | { 7 | @this.HeadingTemplate(this.Heading) 8 | } 9 | else 10 | { 11 | @this.Heading 12 | } 13 | 14 | @if (!string.IsNullOrEmpty(this.Lead)) 15 | { 16 | @this.Lead 17 | } 18 | 19 | @this.ChildContent 20 | 21 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/JumbotronContent.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @if (this.IsFluid) 4 | { 5 | 6 | @this.ChildContent 7 | 8 | } 9 | else 10 | { 11 | @this.ChildContent 12 | } -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/JumbotronContent.razor.cs: -------------------------------------------------------------------------------- 1 | using Blazorade.Bootstrap.Components.Layout; 2 | using Microsoft.AspNetCore.Components; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace Blazorade.Bootstrap.Components 8 | { 9 | /// 10 | /// Represents the contents of a component. 11 | /// 12 | partial class JumbotronContent 13 | { 14 | /// 15 | /// 16 | public JumbotronContent() 17 | { 18 | this.ContainerType = ContainerType.Fluid; 19 | } 20 | 21 | /// 22 | /// The container type for components that have set to true. 23 | /// 24 | [Parameter] 25 | public ContainerType ContainerType { get; set; } 26 | 27 | /// 28 | /// Defines if the containing component is a fluid container. 29 | /// 30 | [Parameter] 31 | public bool IsFluid { get; set; } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Layout/Column.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    @this.ChildContent
    4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Layout/Column.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Linq; 5 | 6 | namespace Blazorade.Bootstrap.Components.Layout 7 | { 8 | /// 9 | /// Represents a column in a grid. 10 | /// 11 | /// 12 | /// For examples, see . 13 | /// 14 | /// 15 | /// 16 | partial class Column 17 | { 18 | /// 19 | /// 20 | protected override void OnParametersSet() 21 | { 22 | base.OnParametersSet(); 23 | 24 | var colClasses = from x in this.Classes where x == ClassNames.Cols.Col || x?.StartsWith($"{ClassNames.Cols.Col}-") == true select x; 25 | if(colClasses.Count() == 0) 26 | { 27 | this.AddClasses(ClassNames.Cols.Col); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Layout/Container.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    @this.ChildContent
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Layout/Container.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components.Layout 7 | { 8 | /// 9 | /// The Container component is the foundation for many layout configurations in Bootstrap. 10 | /// 11 | /// 12 | /// 13 | /// 14 | /// 15 | /// 16 | partial class Container 17 | { 18 | /// 19 | /// 20 | public Container() 21 | { 22 | this.Type = ContainerType.FixedWidth; 23 | } 24 | 25 | /// 26 | /// The type of container. The default is . 27 | /// 28 | [Parameter] 29 | public ContainerType Type { get; set; } 30 | 31 | 32 | /// 33 | /// 34 | protected override void OnParametersSet() 35 | { 36 | if(this.Type == ContainerType.FixedWidth) 37 | { 38 | this.AddClasses(ClassNames.Containers.FixedWidth); 39 | } 40 | else 41 | { 42 | this.AddClasses($"{ClassNames.Containers.FixedWidth}-{this.Type.ToString().ToLower()}"); 43 | } 44 | 45 | base.OnParametersSet(); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Layout/ContainerType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Layout 6 | { 7 | /// 8 | /// Defines different container types. 9 | /// 10 | public enum ContainerType 11 | { 12 | /// 13 | /// The container has a fixed max width at each breakpoint. The default type of container. 14 | /// 15 | FixedWidth, 16 | 17 | /// 18 | /// The container is fluid with a max width of 100%. 19 | /// 20 | Fluid, 21 | 22 | /// 23 | /// 100% wide on on SM screen sizes. Fixed width above this breakpoint. 24 | /// 25 | SM, 26 | 27 | /// 28 | /// 100% wide on on MD screen sizes. Fixed width above this breakpoint. 29 | /// 30 | MD, 31 | 32 | /// 33 | /// 100% wide on on LG screen sizes. Fixed width above this breakpoint. 34 | /// 35 | LG, 36 | 37 | /// 38 | /// 100% wide on on XL screen sizes. Fixed width above this breakpoint. 39 | /// 40 | XL, 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Layout/Row.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    @this.ChildContent
    4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Layout/Row.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components.Layout 7 | { 8 | /// 9 | /// Represents a row in a grid. 10 | /// 11 | /// 12 | /// For examples, see . 13 | /// 14 | /// 15 | /// 16 | partial class Row 17 | { 18 | 19 | /// 20 | /// If set to true, all columns in the current row will be rendered without gutters (i.e. space between columns). 21 | /// 22 | [Parameter] 23 | public bool NoGutters { get; set; } 24 | 25 | 26 | /// 27 | /// 28 | protected override void OnParametersSet() 29 | { 30 | base.OnParametersSet(); 31 | 32 | this.AddClasses(ClassNames.Rows.Row); 33 | 34 | if (this.NoGutters) 35 | { 36 | this.AddClasses(ClassNames.Rows.NoGutters); 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ListGroup.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    @this.ChildContent
    4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ListGroup.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Microsoft.AspNetCore.Components; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// The ListGroup component is used to display a series of content in a powerful and flexible way. 10 | /// 11 | partial class ListGroup 12 | { 13 | /// 14 | /// Removes some borders and rounder corners to render list group items edge-to-edge in a parent container. 15 | /// 16 | [Parameter] 17 | public bool IsFlush { get; set; } 18 | 19 | /// 20 | /// Changes the layout of list group items from vertical to horizontal across all breakpoints. 21 | /// 22 | [Parameter] 23 | public bool IsHorizontal { get; set; } 24 | 25 | 26 | 27 | /// 28 | /// 29 | protected override void OnParametersSet() 30 | { 31 | this.AddClasses(ClassNames.ListGroups.ListGroup); 32 | 33 | if(this.IsFlush) 34 | { 35 | this.AddClasses(ClassNames.ListGroups.Flush); 36 | } 37 | 38 | if(this.IsHorizontal) 39 | { 40 | this.AddClasses(ClassNames.ListGroups.Horizontal); 41 | } 42 | 43 | this.AddAttribute("role", "list"); 44 | base.OnParametersSet(); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ListGroupAnchor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Blazorade.Bootstrap.Components.Content; 5 | using Microsoft.AspNetCore.Components; 6 | 7 | namespace Blazorade.Bootstrap.Components 8 | { 9 | /// 10 | /// Represents a link in a component. 11 | /// 12 | public class ListGroupAnchor : Anchor 13 | { 14 | /// 15 | /// Setting a color for a ListGroupAnchor will apply a contextual color to the list group item. 16 | /// 17 | [Parameter] 18 | public NamedColor? Color { get; set; } 19 | 20 | /// 21 | /// 22 | protected override void OnParametersSet() 23 | { 24 | this.AddClasses(ClassNames.ListGroups.Item, ClassNames.ListGroups.Action); 25 | 26 | if (Color != null) 27 | { 28 | this.AddClasses(this.GetColorClassName(ClassNames.ListGroups.Item, Color)); 29 | } 30 | 31 | base.OnParametersSet(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ListGroupButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents a button in a component. 9 | /// 10 | public class ListGroupButton : Button 11 | { 12 | /// 13 | /// 14 | protected override void OnParametersSet() 15 | { 16 | base.OnParametersSet(); 17 | 18 | this.AddClasses(ClassNames.ListGroups.Item, ClassNames.ListGroups.Action); 19 | 20 | // replace the button coloration with the list item coloration 21 | this.RemoveClass(this.GetColorClassName(prefix: !this.IsOutline ? ClassNames.Buttons.Button : ClassNames.Buttons.OutlineButton, color: this.Color)); 22 | this.AddClasses(this.GetColorClassName(prefix: ClassNames.ListGroups.Item, this.Color)); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ListGroupItem.razor: -------------------------------------------------------------------------------- 1 | @inherits ColoredBootstrapComponentBase 2 | 3 |
  • @this.ChildContent
  • 4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ListGroupItem.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// Represents an item in a component. 10 | /// 11 | public partial class ListGroupItem 12 | { 13 | /// 14 | /// Indicates that the item is the current or active selection. 15 | /// 16 | [Parameter] 17 | public bool IsActive { get; set; } 18 | 19 | /// 20 | /// Makes an item appear as disabled. 21 | /// 22 | [Parameter] 23 | public bool IsDisabled { get; set; } 24 | 25 | 26 | 27 | /// 28 | /// 29 | protected override void OnParametersSet() 30 | { 31 | this.AddClasses(ClassNames.ListGroups.Item); 32 | 33 | if(this.IsActive) 34 | { 35 | this.AddClasses(ClassNames.Active); 36 | } 37 | 38 | if(this.IsDisabled) 39 | { 40 | this.AddClasses(ClassNames.Disabled); 41 | } 42 | 43 | if(Color != null) 44 | { 45 | this.AddClasses(this.GetColorClassName(prefix: ClassNames.ListGroups.Item, this.Color)); 46 | } 47 | 48 | base.OnParametersSet(); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Media.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @if (this.ImageHorizontalAlignment == HorizontalAlignment.Left) 5 | { 6 | if (null != this.ImageTemplate) 7 | { 8 | @this.ImageTemplate(this.ImageUrl) 9 | } 10 | else 11 | { 12 | 13 | } 14 | 15 | } 16 | 17 |
    18 | @if (null != this.HeadingTemplate) 19 | { 20 | @this.HeadingTemplate(this.Heading) 21 | } 22 | else 23 | { 24 | @this.Heading 25 | } 26 | 27 | @this.ChildContent 28 |
    29 | 30 | @if (this.ImageHorizontalAlignment == HorizontalAlignment.Right) 31 | { 32 | if (null != this.ImageTemplate) 33 | { 34 | @this.ImageTemplate(this.ImageUrl) 35 | } 36 | else 37 | { 38 | 39 | } 40 | 41 | } 42 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/MediaImage.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Modal.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 |
    5 |
    6 | @if (null != this.HeaderTemplate) 7 | { 8 | @this.HeaderTemplate(this.Header) 9 | } 10 | else if(!string.IsNullOrEmpty(this.Header)) 11 | { 12 | 13 | @this.Header 14 | 15 | 16 | } 17 | 18 | @if (null != this.BodyTemplate) 19 | { 20 | @this.BodyTemplate(this.Body) 21 | } 22 | else if (!string.IsNullOrEmpty(this.Body)) 23 | { 24 | 25 | 26 | @this.Body 27 | 28 | 29 | } 30 | @if (null != this.FooterTemplate) 31 | { 32 | @this.FooterTemplate 33 | } 34 |
    35 |
    36 |
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ModalBody.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    @this.ChildContent
    4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ModalBody.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents the body of a component. 9 | /// 10 | public partial class ModalBody 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Modals.Body); 18 | base.OnParametersSet(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ModalFooter.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    @this.ChildContent
    -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ModalFooter.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents the footer on a component. 9 | /// 10 | public partial class ModalFooter 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Modals.Footer); 18 | base.OnParametersSet(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ModalHeader.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    @this.ChildContent
    4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ModalHeader.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Represents the header on a component. 9 | /// 10 | public partial class ModalHeader 11 | { 12 | 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.Modals.Header); 18 | 19 | base.OnParametersSet(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ModalSize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines different sizes for components. 9 | /// 10 | public enum ModalSize 11 | { 12 | /// 13 | /// The default size. 14 | /// 15 | Default, 16 | 17 | /// 18 | /// Small. 19 | /// 20 | SM, 21 | 22 | /// 23 | /// Large. 24 | /// 25 | LG, 26 | 27 | /// 28 | /// Extra large. 29 | /// 30 | XL 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Model/MenuItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Model 6 | { 7 | 8 | public interface IMenuItem : ILink 9 | { 10 | IEnumerable Children { get; set; } 11 | } 12 | 13 | public class MenuItem : Link, IMenuItem 14 | { 15 | public IEnumerable Children { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Nav.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
      @this.ChildContent
    4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Nav.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// The Nav component provides a simple way to build navigation elements. 10 | /// 11 | partial class Nav 12 | { 13 | 14 | /// 15 | /// Allows you to specify how the content of the Nav is aligned. The default is null, which results in left alignment. 16 | /// 17 | [Parameter] 18 | public HorizontalAlignment? ContentAlignment { get; set; } 19 | 20 | /// 21 | /// 22 | protected override void OnParametersSet() 23 | { 24 | if(this.ContentAlignment == HorizontalAlignment.Center) 25 | { 26 | this.AddClasses(ClassNames.Navs.AlignContentCenter); 27 | } 28 | else if(this.ContentAlignment == HorizontalAlignment.Right) 29 | { 30 | this.AddClasses(ClassNames.Navs.AlignContentRight); 31 | } 32 | 33 | this.AddClasses(ClassNames.Navs.Nav); 34 | base.OnParametersSet(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/NavItem.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | @implements IMenuItem 3 | 4 |
  • 5 | @if (null != this.ChildContent) 6 | { 7 | @this.ChildContent 8 | } 9 | else 10 | { 11 | 12 | } 13 |
  • -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Navbar.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @{ 4 | string collapseId = $"{this.Id}-collapse"; 5 | } 6 | 41 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/NavbarBrand.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | 4 | 5 | @if(null != this.ChildContent) 6 | { 7 | @this.ChildContent 8 | } 9 | else 10 | { 11 | @if (!string.IsNullOrEmpty(this.ImageUrl)) 12 | { 13 | 14 | } 15 | 16 | @this.Text 17 | } 18 | 19 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/NavbarBrand.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// This component is used to create the brand section of a component. This section usually displays 10 | /// the name of the application or site, with an additional logo. The brand also normally works as a link to the front 11 | /// page of the site or application. 12 | /// 13 | public partial class NavbarBrand 14 | { 15 | 16 | /// 17 | /// The URL, either relative or absolute, to an image to use as logo in the brand section. This works best with SVG images, since they scale much better than bitmap based images. 18 | /// 19 | [Parameter] 20 | public string ImageUrl { get; set; } 21 | 22 | /// 23 | /// The text to show in the brand section. Typically the name or title of your site or application. 24 | /// 25 | [Parameter] 26 | public string Text { get; set; } 27 | 28 | /// 29 | /// The URL that the brand link will point to. Very often this is the link to the front page of your site or application. 30 | /// 31 | [Parameter] 32 | public string Url { get; set; } 33 | 34 | 35 | 36 | /// 37 | /// 38 | protected override void OnParametersSet() 39 | { 40 | this.AddClasses(ClassNames.Navbars.Brand); 41 | 42 | base.OnParametersSet(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/NavbarCollapse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Supports collapsing for components. 9 | /// 10 | public class NavbarCollapse : Collapse 11 | { 12 | 13 | protected override void OnParametersSet() 14 | { 15 | base.OnParametersSet(); 16 | 17 | this.AddClasses(ClassNames.Navbars.Collapse); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/NavbarExpandBreakpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines different breakpoints at which a will expand. 9 | /// 10 | public enum NavbarExpandBreakpoint 11 | { 12 | /// 13 | /// Expands by default at >= 576 px. 14 | /// 15 | SM, 16 | 17 | /// 18 | /// Expands by default at >= 768 px. 19 | /// 20 | MD, 21 | 22 | /// 23 | /// Expands by default at >= 992 px. 24 | /// 25 | LG, 26 | 27 | /// 28 | /// Expands by default at >= 1200 px. 29 | /// 30 | XL, 31 | 32 | /// 33 | /// The will never expand. 34 | /// 35 | Never, 36 | 37 | /// 38 | /// The is always expanded. 39 | /// 40 | Always 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/NavbarNav.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
      4 | @if (null != this.ChildContent) 5 | { 6 | @this.ChildContent 7 | } 8 | else if (null != this.Items) 9 | { 10 | @foreach (var item in this.Items) 11 | { 12 | if (item?.Children?.Count() > 0) 13 | { 14 | 15 | } 16 | else 17 | { 18 | 19 | } 20 | 21 | } 22 | } 23 |
    24 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/NavbarNav.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Blazorade.Bootstrap.Components.Model; 5 | using Microsoft.AspNetCore.Components; 6 | 7 | namespace Blazorade.Bootstrap.Components 8 | { 9 | /// 10 | /// Groups navigation items inside of a component. Use margins to align. 11 | /// 12 | public partial class NavbarNav 13 | { 14 | 15 | /// 16 | /// The items to show in the component. 17 | /// 18 | [Parameter] 19 | public IEnumerable Items { get; set; } 20 | 21 | 22 | /// 23 | /// 24 | protected override void OnParametersSet() 25 | { 26 | this.AddClasses(ClassNames.Navbars.Nav); 27 | base.OnParametersSet(); 28 | } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Pagination.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | @code { 4 | 5 | } 6 | 51 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Progress.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.ChildContent 5 |
    6 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Progress.razor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Wrapper component for ProgressBar components. 9 | /// Use one or more ProgressBar components inside of a Progress component to create a bootstrap progress bar. 10 | /// 11 | public partial class Progress 12 | { 13 | /// 14 | /// 15 | protected override void OnParametersSet() 16 | { 17 | this.AddClasses(ClassNames.ProgressBars.Progress); 18 | 19 | base.OnParametersSet(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ProgressBar.razor: -------------------------------------------------------------------------------- 1 | @inherits ColoredBootstrapComponentBase 2 | 3 |
    4 | @if (null != this.ChildContent) 5 | { 6 | @this.ChildContent 7 | } 8 | else if(ShowPercentage) 9 | { 10 | @CalculatedWidth 11 | } 12 |
    13 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ResponsiveBreakpoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines the different responsive breakpoints supported by Bootstrap. 9 | /// 10 | public enum ResponsiveBreakpoint 11 | { 12 | /// 13 | /// Extra small. < 576 px. 14 | /// 15 | XS, 16 | 17 | /// 18 | /// Small. >= 576 px 19 | /// 20 | SM, 21 | 22 | /// 23 | /// Medium. >= 768 px. 24 | /// 25 | MD, 26 | 27 | /// 28 | /// Large. >= 992 px. 29 | /// 30 | LG, 31 | 32 | /// 33 | /// Extra large. >= 1200 px. 34 | /// 35 | XL 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Spinner.razor: -------------------------------------------------------------------------------- 1 | @inherits ColoredBootstrapComponentBase 2 | 3 | @if(null == this.ChildContent) 4 | { 5 |
    6 | } 7 | else 8 | { 9 |
    10 | @if (null == this.ContentAlignment || this.ContentAlignment == HorizontalAlignment.Left) 11 | { 12 | @this.ChildContent 13 | } 14 |
    15 | @if (this.ContentAlignment == HorizontalAlignment.Right) 16 | { 17 | @this.ChildContent 18 | } 19 |
    20 | } 21 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/SpinnerSize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines different sizes for components. 9 | /// 10 | public enum SpinnerSize 11 | { 12 | /// 13 | /// Normal size. 14 | /// 15 | Normal, 16 | 17 | /// 18 | /// Small size. Useful for instance on buttons and links. 19 | /// 20 | Small 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/SpinnerType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines different types to be used in components. 9 | /// 10 | public enum SpinnerType 11 | { 12 | /// 13 | /// Default. The spinner has a spinning border. 14 | /// 15 | Border, 16 | 17 | /// 18 | /// The spinner is a growing circle. 19 | /// 20 | Grow 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Toast.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | 5 | @if(null != this.HeaderTemplate) 6 | { 7 | @this.HeaderTemplate(this.Header) 8 | } 9 | else 10 | { 11 | 12 | } 13 |
    @this.ChildContent
    14 | 15 |
    16 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ToastHeader.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 |
    4 | @this.Header 5 | @if (!string.IsNullOrEmpty(this.Subheader)) 6 | { 7 | @this.Subheader 8 | } 9 | @if (this.ShowHideButton) 10 | { 11 | 14 | } 15 |
    16 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ToastHeader.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Blazorade.Bootstrap.Components 7 | { 8 | /// 9 | /// Represents the header on a component. 10 | /// 11 | partial class ToastHeader 12 | { 13 | 14 | /// 15 | /// The header text. 16 | /// 17 | [Parameter] 18 | public string Header { get; set; } 19 | 20 | /// 21 | /// Specifies whether the containing component should display a hide button that the toast can be hidden with. 22 | /// 23 | [Parameter] 24 | public bool ShowHideButton { get; set; } 25 | 26 | /// 27 | /// The text for the subheader. 28 | /// 29 | [Parameter] 30 | public string Subheader { get; set; } 31 | 32 | 33 | /// 34 | /// 35 | protected override void OnParametersSet() 36 | { 37 | this.AddClasses(ClassNames.Toasts.Header); 38 | 39 | if(string.IsNullOrEmpty(this.Header) && string.IsNullOrEmpty(this.Subheader) && !this.ShowHideButton) 40 | { 41 | this.AddClasses(ClassNames.DisplayNone); 42 | } 43 | 44 | 45 | base.OnParametersSet(); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/ToggleAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Defines toggle actions for the component. 9 | /// 10 | public enum ToggleAction 11 | { 12 | /// 13 | /// Show the component. 14 | /// 15 | Show, 16 | 17 | /// 18 | /// Hide the component. 19 | /// 20 | Hide, 21 | 22 | /// 23 | /// Toggle the visibility of the component. 24 | /// 25 | Toggle 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/TooltipPlacement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | public enum TooltipPlacement 8 | { 9 | Top, 10 | Right, 11 | Bottom, 12 | Left, 13 | Auto 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Utilities/CloseIcon.razor: -------------------------------------------------------------------------------- 1 | @inherits BootstrapComponentBase 2 | 3 | 6 | 7 | @code { 8 | override protected async Task OnParametersSetAsync() 9 | { 10 | this.AddClasses("close"); 11 | this.AddAttribute("type", "button"); 12 | this.AddAttribute("aria-label", "Close"); 13 | await base.OnParametersSetAsync(); 14 | } 15 | } -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Utilities/ModalCloseIcon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Threading.Tasks; 5 | 6 | namespace Blazorade.Bootstrap.Components.Utilities 7 | { 8 | /// 9 | /// A close icon for components. 10 | /// 11 | public class ModalCloseIcon : CloseIcon 12 | { 13 | 14 | /// 15 | /// 16 | protected override Task OnParametersSetAsync() 17 | { 18 | this.AddAttribute("data-dismiss", "modal"); 19 | return base.OnParametersSetAsync(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/Utilities/Shadow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components.Utilities 6 | { 7 | /// 8 | /// Defines different shadow sizes for components. 9 | /// 10 | public enum Shadow 11 | { 12 | /// 13 | /// No shadow. Default. 14 | /// 15 | None, 16 | 17 | /// 18 | /// A small shadow. 19 | /// 20 | Small, 21 | 22 | /// 23 | /// Regular shadow. 24 | /// 25 | Regular, 26 | 27 | /// 28 | /// Large shadow. 29 | /// 30 | Large 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/VerticalAlignment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Blazorade.Bootstrap.Components 6 | { 7 | /// 8 | /// Different vertical alignment options. 9 | /// 10 | public enum VerticalAlignment 11 | { 12 | /// 13 | /// Top alignment. 14 | /// 15 | Top, 16 | 17 | /// 18 | /// Middle alignment. 19 | /// 20 | Middle, 21 | 22 | /// 23 | /// Bottom alignment. 24 | /// 25 | Bottom 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Web 2 | @using Blazorade.Bootstrap.Components.Content 3 | @using Blazorade.Bootstrap.Components.Layout 4 | @using Blazorade.Bootstrap.Components.Model 5 | @using Blazorade.Bootstrap.Components.Content 6 | @using Blazorade.Bootstrap.Components.Layout 7 | @using Blazorade.Bootstrap.Components.Utilities 8 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/readme.md: -------------------------------------------------------------------------------- 1 | Blazorade.Bootstrap.Components 2 | ========================== 3 | 4 | -------------------------------------------------------------------------------- /Blazorade.Bootstrap.Components/wwwroot/Blazorade-Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/Blazorade.Bootstrap.Components/wwwroot/Blazorade-Icon-128.png -------------------------------------------------------------------------------- /ClientTestHost/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

    Sorry, there's nothing at this address.

    8 |
    9 |
    10 |
    11 | -------------------------------------------------------------------------------- /ClientTestHost/ClientTestHost.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 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Alerts.razor: -------------------------------------------------------------------------------- 1 | @page "/alerts" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Badges.razor: -------------------------------------------------------------------------------- 1 | @page "/badges" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Breadcrumbs.razor: -------------------------------------------------------------------------------- 1 | @page "/breadcrumbs" 2 | 3 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Buttons.razor: -------------------------------------------------------------------------------- 1 | @page "/buttons" 2 | 3 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Cards.razor: -------------------------------------------------------------------------------- 1 | @page "/cards" 2 | 3 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Carousels.razor: -------------------------------------------------------------------------------- 1 | @page "/carousels" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Collapses.razor: -------------------------------------------------------------------------------- 1 | @page "/collapses" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Containers.razor: -------------------------------------------------------------------------------- 1 | @page "/containers" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Dropdowns.razor: -------------------------------------------------------------------------------- 1 | @page "/dropdowns" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Embeds.razor: -------------------------------------------------------------------------------- 1 | @page "/embeds" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Grid.razor: -------------------------------------------------------------------------------- 1 | @page "/grid" 2 | 3 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Blazorade Bootstrap Showroom 4 | 5 | 6 | Blazorade Bootstrap works with both Blazor WebAssemby and Blazor Server applications. This is a Blazor WebAssembly application demonstrating 7 | the use of the Blazorade Bootstrap component library. 8 | 9 | 10 | Read more about the Blazorade Bootstrap component library on the GitHub wiki at 11 | https://github.com/Blazorade/Blazorade-Bootstrap/wiki. 12 | 13 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Jumbotrons.razor: -------------------------------------------------------------------------------- 1 | @page "/jumbotrons" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/ListGroups.razor: -------------------------------------------------------------------------------- 1 | @page "/listgroups" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Media.razor: -------------------------------------------------------------------------------- 1 | @page "/media" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Modals.razor: -------------------------------------------------------------------------------- 1 | @page "/modals" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Navbars.razor: -------------------------------------------------------------------------------- 1 | @page "/navbars" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Navs.razor: -------------------------------------------------------------------------------- 1 | @page "/navs" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Paginations.razor: -------------------------------------------------------------------------------- 1 | @page "/paginations" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/ProgressBars.razor: -------------------------------------------------------------------------------- 1 | @page "/progressbars" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Sizing.razor: -------------------------------------------------------------------------------- 1 | @page "/sizing" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Spinners.razor: -------------------------------------------------------------------------------- 1 | @page "/spinners" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Toasts.razor: -------------------------------------------------------------------------------- 1 | @page "/toasts" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Pages/Typography.razor: -------------------------------------------------------------------------------- 1 | @page "/typography" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ClientTestHost/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Blazor.Hosting; 2 | 3 | namespace ClientTestHost 4 | { 5 | public class Program 6 | { 7 | public static void Main(string[] args) 8 | { 9 | CreateHostBuilder(args).Build().Run(); 10 | } 11 | 12 | public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => 13 | BlazorWebAssemblyHost.CreateDefaultBuilder() 14 | .UseBlazorStartup(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ClientTestHost/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
    8 |
    9 | About 10 |
    11 | 12 |
    13 | @Body 14 |
    15 |
    16 | -------------------------------------------------------------------------------- /ClientTestHost/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.Builder; 2 | using Microsoft.Extensions.DependencyInjection; 3 | 4 | namespace ClientTestHost 5 | { 6 | public class Startup 7 | { 8 | public void ConfigureServices(IServiceCollection services) 9 | { 10 | } 11 | 12 | public void Configure(IComponentsApplicationBuilder app) 13 | { 14 | app.AddComponent("app"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ClientTestHost/_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 ClientTestHost 7 | @using ClientTestHost.Shared 8 | 9 | @using Blazorade.Bootstrap.Components 10 | @using Blazorade.Bootstrap.Components.Builder 11 | @using Blazorade.Bootstrap.Components.Model 12 | @using Blazorade.Bootstrap.Components.Content 13 | @using Blazorade.Bootstrap.Components.Layout 14 | @using Blazorade.Bootstrap.Components.Utilities 15 | -------------------------------------------------------------------------------- /ClientTestHost/wwwroot/.nojekyll: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /ClientTestHost/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. -------------------------------------------------------------------------------- /ClientTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ClientTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /ClientTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ClientTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /ClientTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ClientTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /ClientTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ClientTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Blazorade 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Blazorade Bootstrap 2 | =================== 3 | 4 | Bootstrap components implemented as Razor components for Blazor applications. For details, visit the [Blazorade Bootstrap Wiki](https://github.com/Blazorade/Blazorade-Bootstrap/wiki). 5 | -------------------------------------------------------------------------------- /SampleCustomerPortal/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

    Sorry, there's nothing at this address.

    8 |
    9 |
    10 |
    11 | -------------------------------------------------------------------------------- /SampleCustomerPortal/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SampleCustomerPortal.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SampleCustomerPortal/Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | 5 | namespace SampleCustomerPortal.Data 6 | { 7 | public class WeatherForecastService 8 | { 9 | private static readonly string[] Summaries = new[] 10 | { 11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 12 | }; 13 | 14 | public Task GetForecastAsync(DateTime startDate) 15 | { 16 | var rng = new Random(); 17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast 18 | { 19 | Date = startDate.AddDays(index), 20 | TemperatureC = rng.Next(-20, 55), 21 | Summary = Summaries[rng.Next(Summaries.Length)] 22 | }).ToArray()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SampleCustomerPortal/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

    Error.

    5 |

    An error occurred while processing your request.

    6 | 7 |

    Development Mode

    8 |

    9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

    11 |

    12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

    -------------------------------------------------------------------------------- /SampleCustomerPortal/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

    Hello, world!

    4 | 5 | Welcome to your new app. 6 | -------------------------------------------------------------------------------- /SampleCustomerPortal/Pages/Login.razor: -------------------------------------------------------------------------------- 1 | @page "/login" 2 | 3 | 4 | 5 | 6 | 7 | 8 |
    9 | 10 | 11 |
    12 |
    13 |
    -------------------------------------------------------------------------------- /SampleCustomerPortal/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace SampleCustomerPortal.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | Sample Customer Portal 11 | 12 | 13 | 14 | 15 | 16 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 17 | 18 | 19 | @* Blazor Server scripts *@ 20 | 21 | 22 | @* Scripts required by Bootstrap. *@ 23 | 24 | 25 | 26 | 27 | @* Script required by Blazor Bootstrap components. *@ 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /SampleCustomerPortal/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 SampleCustomerPortal 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 | -------------------------------------------------------------------------------- /SampleCustomerPortal/SampleCustomerPortal.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /SampleCustomerPortal/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 4 |
    5 | 6 | 7 |
    8 | @Body 9 |
    10 |
    11 | -------------------------------------------------------------------------------- /SampleCustomerPortal/Shared/MainMenu.razor: -------------------------------------------------------------------------------- 1 |  2 | @{ 3 | var items = new[] 4 | { 5 | new MenuItem { Text = "Link 1", Url = "#" }, 6 | new MenuItem { 7 | Text = "Link 2", 8 | Url = "#", 9 | Children = new[] { 10 | new MenuItem { Text = "Link 2.1", Url = "#" } 11 | } 12 | } 13 | }; 14 | } 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /SampleCustomerPortal/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
    9 | 26 |
    27 | 28 | @code { 29 | bool collapseNavMenu = true; 30 | 31 | string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /SampleCustomerPortal/_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 SampleCustomerPortal 9 | @using SampleCustomerPortal.Shared 10 | @using BlazorBootstrap.Components 11 | @using BlazorBootstrap.Components.Model -------------------------------------------------------------------------------- /SampleCustomerPortal/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SampleCustomerPortal/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /SampleCustomerPortal/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/SampleCustomerPortal/wwwroot/favicon.ico -------------------------------------------------------------------------------- /ServerAppDemo/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

    Sorry, there's nothing at this address.

    8 |
    9 |
    10 |
    11 | -------------------------------------------------------------------------------- /ServerAppDemo/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ServerAppDemo.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ServerAppDemo/Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | 5 | namespace ServerAppDemo.Data 6 | { 7 | public class WeatherForecastService 8 | { 9 | private static readonly string[] Summaries = new[] 10 | { 11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 12 | }; 13 | 14 | public Task GetForecastAsync(DateTime startDate) 15 | { 16 | var rng = new Random(); 17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast 18 | { 19 | Date = startDate.AddDays(index), 20 | TemperatureC = rng.Next(-20, 55), 21 | Summary = Summaries[rng.Next(Summaries.Length)] 22 | }).ToArray()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ServerAppDemo/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

    Counter

    4 | 5 |

    Current count: @currentCount

    6 | 7 | 8 | 9 | @code { 10 | int currentCount = 0; 11 | 12 | void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ServerAppDemo/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

    Error.

    5 |

    An error occurred while processing your request.

    6 | 7 |

    Development Mode

    8 |

    9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

    11 |

    12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

    -------------------------------------------------------------------------------- /ServerAppDemo/Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | 3 | @using ServerAppDemo.Data 4 | @inject WeatherForecastService ForecastService 5 | 6 |

    Weather forecast

    7 | 8 |

    This component demonstrates fetching data from a service.

    9 | 10 | @if (forecasts == null) 11 | { 12 |

    Loading...

    13 | } 14 | else 15 | { 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach (var forecast in forecasts) 27 | { 28 | 29 | 30 | 31 | 32 | 33 | 34 | } 35 | 36 |
    DateTemp. (C)Temp. (F)Summary
    @forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
    37 | } 38 | 39 | @code { 40 | WeatherForecast[] forecasts; 41 | 42 | protected override async Task OnInitializedAsync() 43 | { 44 | forecasts = await ForecastService.GetForecastAsync(DateTime.Now); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /ServerAppDemo/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @using BlazorBootstrap.Components 3 | 4 | Blazor Bootstrap 5 | 6 | 7 | Please note! 8 | 9 | 10 |
    11 | This application is just a simple demonstration of what you need to add to your Blazor application. 12 | For more information about Blazor Bootstrap, visit the Wiki on GitHub. 13 |
    14 |
    15 |
    16 | 17 |

    18 | This application demonstrates how to get started with Blazor Bootsrap, a Razor component library for Blazor applications. 19 |

    20 | -------------------------------------------------------------------------------- /ServerAppDemo/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace ServerAppDemo.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | ServerAppDemo 11 | 12 | 13 | 14 | 15 | 16 | 17 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 18 | 19 | 20 | @* Blazor Server scripts *@ 21 | 22 | 23 | @* Scripts required by Bootstrap. *@ 24 | 25 | 26 | 27 | 28 | @* Script required by Blazor Bootstrap components. *@ 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ServerAppDemo/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 ServerAppDemo 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 | -------------------------------------------------------------------------------- /ServerAppDemo/ServerAppDemo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ServerAppDemo/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
    8 |
    9 | About 10 |
    11 | 12 |
    13 | @Body 14 |
    15 |
    16 | -------------------------------------------------------------------------------- /ServerAppDemo/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
    9 | 26 |
    27 | 28 | @code { 29 | bool collapseNavMenu = true; 30 | 31 | string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ServerAppDemo/_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 ServerAppDemo 9 | @using ServerAppDemo.Shared -------------------------------------------------------------------------------- /ServerAppDemo/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ServerAppDemo/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /ServerAppDemo/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerAppDemo/wwwroot/favicon.ico -------------------------------------------------------------------------------- /ServerAppDev/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

    Sorry, there's nothing at this address.

    8 |
    9 |
    10 |
    11 | -------------------------------------------------------------------------------- /ServerAppDev/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

    Error.

    5 |

    An error occurred while processing your request.

    6 | 7 |

    Development Mode

    8 |

    9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

    11 |

    12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

    -------------------------------------------------------------------------------- /ServerAppDev/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

    Hello, world!

    4 | 5 | @code { 6 | Carousel c1; 7 | } 8 | 9 | @**@ 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ServerAppDev/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 ServerAppDev 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 | -------------------------------------------------------------------------------- /ServerAppDev/ServerAppDev.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ServerAppDev/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
    8 |
    9 | About 10 |
    11 | 12 |
    13 | @Body 14 |
    15 |
    16 | -------------------------------------------------------------------------------- /ServerAppDev/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
    9 | 16 |
    17 | 18 | @code { 19 | private bool collapseNavMenu = true; 20 | 21 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 22 | 23 | private void ToggleNavMenu() 24 | { 25 | collapseNavMenu = !collapseNavMenu; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ServerAppDev/_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 ServerAppDev 9 | @using ServerAppDev.Shared 10 | 11 | @using Blazorade.Bootstrap.Components 12 | @using Blazorade.Bootstrap.Components.Builder 13 | @using Blazorade.Bootstrap.Components.Model 14 | @using Blazorade.Bootstrap.Components.Content 15 | @using Blazorade.Bootstrap.Components.Layout 16 | @using Blazorade.Bootstrap.Components.Utilities 17 | -------------------------------------------------------------------------------- /ServerAppDev/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 | -------------------------------------------------------------------------------- /ServerAppDev/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /ServerAppDev/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. -------------------------------------------------------------------------------- /ServerAppDev/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerAppDev/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /ServerAppDev/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerAppDev/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /ServerAppDev/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerAppDev/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /ServerAppDev/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerAppDev/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /ServerAppDev/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerAppDev/wwwroot/favicon.ico -------------------------------------------------------------------------------- /ServerTestHost/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

    Sorry, there's nothing at this address.

    8 |
    9 |
    10 |
    11 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Alerts.razor: -------------------------------------------------------------------------------- 1 | @page "/alerts" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Badges.razor: -------------------------------------------------------------------------------- 1 | @page "/badges" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Breadcrumbs.razor: -------------------------------------------------------------------------------- 1 | @page "/breadcrumbs" 2 | 3 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Buttons.razor: -------------------------------------------------------------------------------- 1 | @page "/buttons" 2 | 3 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Cards.razor: -------------------------------------------------------------------------------- 1 | @page "/cards" 2 | 3 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Carousels.razor: -------------------------------------------------------------------------------- 1 | @page "/carousels" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Collapses.razor: -------------------------------------------------------------------------------- 1 | @page "/collapses" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Containers.razor: -------------------------------------------------------------------------------- 1 | @page "/containers" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Dropdowns.razor: -------------------------------------------------------------------------------- 1 | @page "/dropdowns" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Embeds.razor: -------------------------------------------------------------------------------- 1 | @page "/embeds" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

    Error.

    5 |

    An error occurred while processing your request.

    6 | 7 |

    Development Mode

    8 |

    9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

    11 |

    12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

    -------------------------------------------------------------------------------- /ServerTestHost/Pages/Grid.razor: -------------------------------------------------------------------------------- 1 | @page "/grid" 2 | 3 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

    Blazorade Bootstap Test Host

    4 | 5 | This is a Blazor Server application demonstrating the use of the Blazorade Bootstrap component library. 6 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/InputGroups.razor: -------------------------------------------------------------------------------- 1 | @page "/inputgroups" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Jumbotrons.razor: -------------------------------------------------------------------------------- 1 | @page "/jumbotrons" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/ListGroups.razor: -------------------------------------------------------------------------------- 1 | @page "/listgroups" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Media.razor: -------------------------------------------------------------------------------- 1 | @page "/media" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Modals.razor: -------------------------------------------------------------------------------- 1 | @page "/modals" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Navbars.razor: -------------------------------------------------------------------------------- 1 | @page "/navbars" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Navs.razor: -------------------------------------------------------------------------------- 1 | @page "/navs" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Paginations.razor: -------------------------------------------------------------------------------- 1 | @page "/paginations" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/ProgressBars.razor: -------------------------------------------------------------------------------- 1 | @page "/progressbars" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Sizing.razor: -------------------------------------------------------------------------------- 1 | @page "/sizing" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Spinners.razor: -------------------------------------------------------------------------------- 1 | @page "/spinners" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Toasts.razor: -------------------------------------------------------------------------------- 1 | @page "/toasts" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Tooltips.razor: -------------------------------------------------------------------------------- 1 | @page "/tooltips" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/Typography.razor: -------------------------------------------------------------------------------- 1 | @page "/typography" 2 | 3 | 4 | -------------------------------------------------------------------------------- /ServerTestHost/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace ServerTestHost.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | ServerTestHost 11 | 12 | 13 | 14 | 15 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ServerTestHost/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 ServerTestHost 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 | -------------------------------------------------------------------------------- /ServerTestHost/ServerTestHost.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ServerTestHost/_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 ServerTestHost 9 | 10 | @using Blazorade.Bootstrap.Components 11 | @using Blazorade.Bootstrap.Components.Builder 12 | @using Blazorade.Bootstrap.Components.Model 13 | @using Blazorade.Bootstrap.Components.Content 14 | @using Blazorade.Bootstrap.Components.Layout 15 | @using Blazorade.Bootstrap.Components.Utilities 16 | -------------------------------------------------------------------------------- /ServerTestHost/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | }, 9 | "DetailedErrors": true 10 | } 11 | -------------------------------------------------------------------------------- /ServerTestHost/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /ServerTestHost/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. -------------------------------------------------------------------------------- /ServerTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /ServerTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /ServerTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /ServerTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerTestHost/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /ServerTestHost/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/ServerTestHost/wwwroot/favicon.ico -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Blazor Bootstrap 6 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /docs/_content/Blazorade.Bootstrap.Components.Showroom/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_content/Blazorade.Bootstrap.Components.Showroom/background.png -------------------------------------------------------------------------------- /docs/_content/Blazorade.Bootstrap.Components.Showroom/blazorade-logo-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_content/Blazorade.Bootstrap.Components.Showroom/blazorade-logo-64.png -------------------------------------------------------------------------------- /docs/_content/Blazorade.Bootstrap.Components.Showroom/exampleJsInterop.js: -------------------------------------------------------------------------------- 1 | // This file is to show how a library package may provide JavaScript interop features 2 | // wrapped in a .NET API 3 | 4 | window.exampleJsFunctions = { 5 | showPrompt: function (message) { 6 | return prompt(message, 'Type anything here'); 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /docs/_content/Blazorade.Bootstrap.Components.Showroom/styles.css: -------------------------------------------------------------------------------- 1 | /* 2 | This file is to show how CSS and other static resources (such as images) can be 3 | used from a library project/package. 4 | */ 5 | 6 | .my-component { 7 | border: 2px dashed red; 8 | padding: 1em; 9 | margin: 1em 0; 10 | background-image: url('background.png'); 11 | } 12 | -------------------------------------------------------------------------------- /docs/_content/Blazorade.Bootstrap.Components/Blazorade-Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_content/Blazorade.Bootstrap.Components/Blazorade-Icon-128.png -------------------------------------------------------------------------------- /docs/_framework/_bin/Blazorade.Bootstrap.Components.Showroom.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Blazorade.Bootstrap.Components.Showroom.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Blazorade.Bootstrap.Components.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Blazorade.Bootstrap.Components.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Blazorade.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Blazorade.Core.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/ClientTestHost.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/ClientTestHost.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.AspNetCore.Authorization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.AspNetCore.Authorization.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.AspNetCore.Blazor.HttpClient.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.AspNetCore.Blazor.HttpClient.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.AspNetCore.Blazor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.AspNetCore.Blazor.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.AspNetCore.Components.Forms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.AspNetCore.Components.Forms.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.AspNetCore.Components.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.AspNetCore.Components.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.AspNetCore.Metadata.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.AspNetCore.Metadata.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.Bcl.AsyncInterfaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.Bcl.AsyncInterfaces.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.Extensions.Options.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.Extensions.Options.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.Extensions.Primitives.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.Extensions.Primitives.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Microsoft.JSInterop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Microsoft.JSInterop.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/Mono.WebAssembly.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/Mono.WebAssembly.Interop.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/System.ComponentModel.DataAnnotations.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/System.ComponentModel.DataAnnotations.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/System.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/System.Core.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/System.Net.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/System.Net.Http.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/System.Text.Encodings.Web.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/System.Text.Encodings.Web.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/System.Text.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/System.Text.Json.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/System.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/System.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/WebAssembly.Bindings.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/WebAssembly.Bindings.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/WebAssembly.Net.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/WebAssembly.Net.Http.dll -------------------------------------------------------------------------------- /docs/_framework/_bin/mscorlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/_bin/mscorlib.dll -------------------------------------------------------------------------------- /docs/_framework/blazor.boot.json: -------------------------------------------------------------------------------- 1 | {"assemblies":["Blazorade.Bootstrap.Components.dll","Blazorade.Bootstrap.Components.Showroom.dll","Blazorade.Core.dll","ClientTestHost.dll","Microsoft.AspNetCore.Authorization.dll","Microsoft.AspNetCore.Blazor.dll","Microsoft.AspNetCore.Blazor.HttpClient.dll","Microsoft.AspNetCore.Components.dll","Microsoft.AspNetCore.Components.Forms.dll","Microsoft.AspNetCore.Components.Web.dll","Microsoft.AspNetCore.Metadata.dll","Microsoft.Bcl.AsyncInterfaces.dll","Microsoft.Extensions.DependencyInjection.Abstractions.dll","Microsoft.Extensions.DependencyInjection.dll","Microsoft.Extensions.Logging.Abstractions.dll","Microsoft.Extensions.Options.dll","Microsoft.Extensions.Primitives.dll","Microsoft.JSInterop.dll","Mono.WebAssembly.Interop.dll","mscorlib.dll","System.ComponentModel.DataAnnotations.dll","System.Core.dll","System.dll","System.Net.Http.dll","System.Runtime.CompilerServices.Unsafe.dll","System.Text.Encodings.Web.dll","System.Text.Json.dll","WebAssembly.Bindings.dll","WebAssembly.Net.Http.dll"],"entryAssembly":"ClientTestHost","linkerEnabled":true} -------------------------------------------------------------------------------- /docs/_framework/wasm/mono.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/_framework/wasm/mono.wasm -------------------------------------------------------------------------------- /docs/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. -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blazorade/Blazorade-Bootstrap/afe7c1994b3bce6f455afc2d0a97bb830a40e1a3/docs/css/open-iconic/font/fonts/open-iconic.woff --------------------------------------------------------------------------------