diff --git a/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.razor b/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.razor new file mode 100644 index 0000000000..b461e34683 --- /dev/null +++ b/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.razor @@ -0,0 +1,70 @@ +@namespace Bit.BlazorUI +@inherits BitComponentBase + + + @if (Header is not null || HeaderText is not null || ShowCloseButton) + { +
+ @if (Header is not null) + { +
+ @Header +
+ } + else if (HeaderText is not null) + { +
+ @HeaderText +
+ } + + @if (ShowCloseButton) + { + + } +
+ } + +
+ @(Body ?? ChildContent) +
+ + @if (Footer is not null) + { +
+ @Footer +
+ } + else if (FooterText is not null) + { +
+ @FooterText +
+ } +
diff --git a/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.razor.cs b/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.razor.cs new file mode 100644 index 0000000000..cc7b077732 --- /dev/null +++ b/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.razor.cs @@ -0,0 +1,151 @@ +namespace Bit.BlazorUI; + +public partial class BitProPanel : BitComponentBase +{ + /// + /// Enables the auto scrollbar toggle behavior of the panel. + /// + [Parameter] public bool AutoToggleScroll { get; set; } + + /// + /// The alias of the ChildContent. + /// + [Parameter] public RenderFragment? Body { get; set; } + + /// + /// Whether the panel can be dismissed by clicking outside of it on the overlay. + /// + [Parameter] public bool Blocking { get; set; } + + /// + /// The content of the panel. + /// + [Parameter] public RenderFragment? ChildContent { get; set; } + + /// + /// Custom CSS classes for different parts of the panel. + /// + [Parameter] public BitProPanelClassStyles? Classes { get; set; } + + /// + /// The template used to render the footer section of the panel. + /// + [Parameter] public RenderFragment? Footer { get; set; } + + /// + /// The text of the footer section of the panel. + /// + [Parameter] public string? FooterText { get; set; } + + /// + /// The template used to render the header section of the panel. + /// + [Parameter] public RenderFragment? Header { get; set; } + + /// + /// The text of the header section of the panel. + /// + [Parameter] public string? HeaderText { get; set; } + + /// + /// Determines the openness of the panel. + /// + [Parameter, TwoWayBound] + public bool IsOpen { get; set; } + + /// + /// Renders the overlay in full mode that gives it an opaque background. + /// + [Parameter] public bool ModeFull { get; set; } + + /// + /// Removes the overlay element of the panel. + /// + [Parameter] public bool Modeless { get; set; } + + /// + /// A callback function for when the Panel is dismissed. + /// + [Parameter] public EventCallback OnDismiss { get; set; } + + /// + /// The event callback for when the swipe action starts on the container of the panel. + /// + [Parameter] public EventCallback OnSwipeStart { get; set; } + + /// + /// The event callback for when the swipe action moves on the container of the panel. + /// + [Parameter] public EventCallback OnSwipeMove { get; set; } + + /// + /// The event callback for when the swipe action ends on the container of the panel. + /// + [Parameter] public EventCallback OnSwipeEnd { get; set; } + + /// + /// The position of the panel to show on the screen. + /// + [Parameter] public BitPanelPosition? Position { get; set; } + + /// + /// The value of the height or width (based on the position) of the Panel. + /// + [Parameter] public double? Size { get; set; } + + /// + /// Specifies the element selector for which the Panel disables its scroll if applicable. + /// + [Parameter] public string? ScrollerSelector { get; set; } + + /// + /// Shows the close button of the Panel. + /// + [Parameter] public bool ShowCloseButton { get; set; } + + /// + /// Custom CSS styles for different parts of the panel component. + /// + [Parameter] public BitProPanelClassStyles? Styles { get; set; } + + /// + /// The swiping point (difference percentage) based on the width of the panel container to trigger the close action (default is 0.25m). + /// + [Parameter] public decimal? SwipeTrigger { get; set; } + + + + public async Task Open() + { + if (await AssignIsOpen(true) is false) return; + + StateHasChanged(); + } + + public async Task Close() + { + if (await AssignIsOpen(false) is false) return; + + StateHasChanged(); + } + + + + protected override string RootElementClass => "bit-ppl"; + + protected override void RegisterCssClasses() + { + ClassBuilder.Register(() => ModeFull ? "bit-ppl-mfl" : string.Empty); + } + + + + private async Task ClosePanel(MouseEventArgs e) + { + if (IsEnabled is false) return; + + if (await AssignIsOpen(false) is false) return; + + await OnDismiss.InvokeAsync(e); + } +} diff --git a/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.scss b/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.scss new file mode 100644 index 0000000000..db747ffc91 --- /dev/null +++ b/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanel.scss @@ -0,0 +1,71 @@ +@import '../../../Bit.BlazorUI/Styles/functions.scss'; + +.bit-ppl { + .bit-pnl-cnt { + display: flex; + flex-direction: column; + } +} + +.bit-ppl-mfl { + .bit-pnl-ovl { + background-color: $clr-bg-overlay; + } +} + +.bit-ppl-hcn { + top: 0; + z-index: 1; + display: flex; + position: sticky; + font-weight: 600; + color: $clr-fg-pri; + overflow-wrap: anywhere; + background-color: $clr-bg-pri; + padding: spacing(2) spacing(2) 0; +} + +.bit-ppl-hdr { + flex-grow: 1; + display: flex; + align-items: center; + font-size: spacing(2.5); +} + +.bit-ppl-cls { + display: flex; + cursor: pointer; + width: spacing(5); + height: spacing(5); + align-items: center; + justify-content: center; + font-size: spacing(1.75); + border-radius: spacing(0.25); + background-color: transparent; + + @media (hover: hover) { + &:hover { + color: $clr-fg-pri-hover; + background-color: $clr-bg-pri-hover; + } + } + + &:active { + color: $clr-fg-pri-active; + background-color: $clr-bg-pri-active; + } +} + +.bit-ppl-bdy { + flex-grow: 1; + overflow-y: auto; + padding: spacing(2); +} + +.bit-ppl-fcn { + bottom: 0; + z-index: 1; + position: sticky; + background-color: $clr-bg-pri; + padding: 0 spacing(2) spacing(2) spacing(2); +} diff --git a/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanelClassStyles.cs b/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanelClassStyles.cs new file mode 100644 index 0000000000..0ce332226a --- /dev/null +++ b/src/BlazorUI/Bit.BlazorUI.Extras/Components/ProPanel/BitProPanelClassStyles.cs @@ -0,0 +1,34 @@ +namespace Bit.BlazorUI; + +public class BitProPanelClassStyles : BitPanelClassStyles +{ + /// + /// Custom CSS classes/styles for the header container of the BitProPanel. + /// + public string? HeaderContainer { get; set; } + + /// + /// Custom CSS classes/styles for the header of the BitProPanel. + /// + public string? Header { get; set; } + + /// + /// Custom CSS classes/styles for the close button of the BitProPanel. + /// + public string? CloseButton { get; set; } + + /// + /// Custom CSS classes/styles for the close button of the BitProPanel. + /// + public string? CloseIcon { get; set; } + + /// + /// Custom CSS classes/styles for the body of the BitProPanel. + /// + public string? Body { get; set; } + + /// + /// Custom CSS classes/styles for the footer of the BitProPanel. + /// + public string? Footer { get; set; } +} diff --git a/src/BlazorUI/Bit.BlazorUI.Extras/Styles/bit.blazorui.extras.scss b/src/BlazorUI/Bit.BlazorUI.Extras/Styles/bit.blazorui.extras.scss index 66554e8edc..4d58f1782c 100644 --- a/src/BlazorUI/Bit.BlazorUI.Extras/Styles/bit.blazorui.extras.scss +++ b/src/BlazorUI/Bit.BlazorUI.Extras/Styles/bit.blazorui.extras.scss @@ -1,2 +1,2 @@ -@import "fabric.mdl2.bit.blazoui.extras.scss"; -@import "components.scss"; +@import "components.scss"; +@import "fabric.mdl2.bit.blazoui.extras.scss"; diff --git a/src/BlazorUI/Bit.BlazorUI.Extras/Styles/components.scss b/src/BlazorUI/Bit.BlazorUI.Extras/Styles/components.scss index 0e9f9d3e91..ca46bd9aef 100644 --- a/src/BlazorUI/Bit.BlazorUI.Extras/Styles/components.scss +++ b/src/BlazorUI/Bit.BlazorUI.Extras/Styles/components.scss @@ -1,4 +1,4 @@ @import "../Components/DataGrid/BitDataGrid.scss"; @import "../Components/DataGrid/Pagination/BitDataGridPaginator.scss"; - @import "../Components/PdfReader/BitPdfReader.scss"; +@import "../Components/ProPanel/BitProPanel.scss"; diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj b/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj index 79d9f65d85..a01542257f 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj +++ b/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj @@ -24,7 +24,8 @@ - + + diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ProPanel/BitProPanelTests.cs b/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ProPanel/BitProPanelTests.cs new file mode 100644 index 0000000000..be0b2ba6e8 --- /dev/null +++ b/src/BlazorUI/Bit.BlazorUI.Tests/Components/Extras/ProPanel/BitProPanelTests.cs @@ -0,0 +1,54 @@ +using Bunit; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Bit.BlazorUI.Tests.Components.Extras.ProPanel; + +[TestClass] +public class BitProPanelTests : BunitTestContext +{ + [TestMethod] + public void BitProPanelContentTest() + { + var com = RenderComponent(parameters => + { + parameters.Add(p => p.IsOpen, true); + parameters.AddChildContent("
Test Content
"); + }); + + var elementContent = com.Find(".bit-ppl-bdy"); + + elementContent.MarkupMatches("
Test Content
"); + } + + [TestMethod] + public void BitProPanelFooterContentTest() + { + var footerContent = "
Test Footer Content
"; + + var com = RenderComponent(parameters => + { + parameters.Add(p => p.IsOpen, true); + parameters.Add(p => p.Footer, footerContent); + }); + + var elementContent = com.Find(".bit-ppl-fcn :first-child"); + + elementContent.MarkupMatches(footerContent); + } + + [TestMethod] + public void BitProPanelHeaderContentTest() + { + const string headerContent = "
Test Header Content
"; + + var com = RenderComponent(parameters => + { + parameters.Add(p => p.IsOpen, true); + parameters.Add(p => p.Header, headerContent); + }); + + var elementContent = com.Find(".bit-ppl-hcn :first-child :first-child"); + + elementContent.MarkupMatches(headerContent); + } +} diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs b/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs index e7a3a7fbc8..5477856812 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs +++ b/src/BlazorUI/Bit.BlazorUI.Tests/Components/Surfaces/Panel/BitPanelTests.cs @@ -51,9 +51,6 @@ public void BitPanelModelessTest(bool modeless) parameters.Add(p => p.IsOpen, true); }); - var element = com.Find(".bit-pnl"); - Assert.AreEqual(element.Attributes["aria-modal"].Value, (modeless is false).ToString()); - var elementOverlay = com.FindAll(".bit-pnl-ovl"); Assert.AreEqual(modeless ? 0 : 1, elementOverlay.Count); } @@ -73,64 +70,6 @@ public void BitPanelIsOpenTest(bool isOpen) Assert.AreEqual(isOpen, container.GetStyle().CssText.Contains("opacity: 1")); } - [DataTestMethod, - DataRow(null), - DataRow(""), - DataRow("Test-S-A-Id") - ] - public void BitPanelSubtitleAriaIdTest(string subtitleAriaId) - { - var com = RenderComponent(parameters => - { - parameters.Add(p => p.SubtitleAriaId, subtitleAriaId); - parameters.Add(p => p.IsOpen, true); - }); - - var element = com.Find(".bit-pnl"); - - if (subtitleAriaId == null) - { - Assert.IsFalse(element.HasAttribute("aria-describedby")); - } - else if (subtitleAriaId == string.Empty) - { - Assert.AreEqual(element.Attributes["aria-describedby"].Value, string.Empty); - } - else - { - Assert.AreEqual(element.Attributes["aria-describedby"].Value, subtitleAriaId); - } - } - - [DataTestMethod, - DataRow(null), - DataRow(""), - DataRow("Test-T-A-Id") - ] - public void BitPanelTitleAriaIdTest(string titleAriaId) - { - var com = RenderComponent(parameters => - { - parameters.Add(p => p.TitleAriaId, titleAriaId); - parameters.Add(p => p.IsOpen, true); - }); - - var element = com.Find(".bit-pnl"); - - if (titleAriaId == null) - { - Assert.IsFalse(element.HasAttribute("aria-labelledby")); - } - else if (titleAriaId == string.Empty) - { - Assert.AreEqual(element.Attributes["aria-labelledby"].Value, string.Empty); - } - else - { - Assert.AreEqual(element.Attributes["aria-labelledby"].Value, titleAriaId); - } - } - [TestMethod] public void BitPanelContentTest() { @@ -140,41 +79,9 @@ public void BitPanelContentTest() parameters.AddChildContent("
Test Content
"); }); - var elementContent = com.Find(".bit-pnl-bdy"); - - elementContent.MarkupMatches("
Test Content
"); - } - - [TestMethod] - public void BitPanelFooterContentTest() - { - var footerContent = "
Test Footer Content
"; - - var com = RenderComponent(parameters => - { - parameters.Add(p => p.IsOpen, true); - parameters.Add(p => p.FooterTemplate, footerContent); - }); - - var elementContent = com.Find(".bit-pnl-fcn :first-child"); - - elementContent.MarkupMatches(footerContent); - } - - [TestMethod] - public void BitPanelHeaderContentTest() - { - const string headerContent = "
Test Header Content
"; - - var com = RenderComponent(parameters => - { - parameters.Add(p => p.IsOpen, true); - parameters.Add(p => p.HeaderTemplate, headerContent); - }); - - var elementContent = com.Find(".bit-pnl-hcn :first-child"); + var elementContent = com.Find(".bit-pnl-cnt"); - elementContent.MarkupMatches(headerContent); + elementContent.MarkupMatches("
Test Content
"); } [TestMethod] diff --git a/src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj b/src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj index 9438d817fd..a0231bd04a 100644 --- a/src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj +++ b/src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj @@ -18,6 +18,14 @@ + + + + + + + + diff --git a/src/BlazorUI/Bit.BlazorUI/Components/BitComponentBase.cs b/src/BlazorUI/Bit.BlazorUI/Components/BitComponentBase.cs index c30cbcd9ff..746f61ef90 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/BitComponentBase.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/BitComponentBase.cs @@ -177,9 +177,9 @@ protected override void OnAfterRender(bool firstRender) protected abstract string RootElementClass { get; } - internal ElementClassBuilder ClassBuilder { get; private set; } = new ElementClassBuilder(); + protected ElementClassBuilder ClassBuilder { get; private set; } = new ElementClassBuilder(); - internal ElementStyleBuilder StyleBuilder { get; private set; } = new ElementStyleBuilder(); + protected ElementStyleBuilder StyleBuilder { get; private set; } = new ElementStyleBuilder(); protected virtual void RegisterCssStyles() { } diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Panel/BitPanelPosition.cs b/src/BlazorUI/Bit.BlazorUI/Components/BitPanelPosition.cs similarity index 100% rename from src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Panel/BitPanelPosition.cs rename to src/BlazorUI/Bit.BlazorUI/Components/BitPanelPosition.cs diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/Dropdown/BitDropdown.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/Dropdown/BitDropdown.razor.cs index a228db8891..addc3d92be 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/Dropdown/BitDropdown.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/Dropdown/BitDropdown.razor.cs @@ -852,7 +852,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) if (firstRender is false) return; if (Responsive is false) return; - await _js.SwipesSetup(_calloutId, 0.25m, SwipesPosition.End, Dir is BitDir.Rtl, _dotnetObj); + await _js.SwipesSetup(_calloutId, 0.25m, BitPanelPosition.End, Dir is BitDir.Rtl, _dotnetObj); } protected override bool TryParseValueFromString(string? value, [MaybeNullWhen(false)] out TValue result, [NotNullWhen(false)] out string? parsingErrorMessage) diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/CircularTimePicker/BitCircularTimePicker.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/CircularTimePicker/BitCircularTimePicker.razor.cs index d7d3197c5b..31936c2e66 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/CircularTimePicker/BitCircularTimePicker.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/CircularTimePicker/BitCircularTimePicker.razor.cs @@ -307,7 +307,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) if (firstRender is false) return; - await _js.SwipesSetup(_calloutId, 0.25m, SwipesPosition.Top, Dir is BitDir.Rtl, _dotnetObj); + await _js.SwipesSetup(_calloutId, 0.25m, BitPanelPosition.Top, Dir is BitDir.Rtl, _dotnetObj); _pointerUpAbortControllerId = await _js.BitCircularTimePickerRegisterPointerUp(_dotnetObj, nameof(_HandlePointerUp)); _pointerMoveAbortControllerId = await _js.BitCircularTimePickerRegisterPointerMove(_dotnetObj, nameof(_HandlePointerMove)); } diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/DatePicker/BitDatePicker.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/DatePicker/BitDatePicker.razor.cs index a43798701a..35b8b01462 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/DatePicker/BitDatePicker.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/DatePicker/BitDatePicker.razor.cs @@ -530,7 +530,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) if (firstRender is false) return; if (Responsive is false) return; - await _js.SwipesSetup(_calloutId, 0.25m, SwipesPosition.Top, Dir is BitDir.Rtl, _dotnetObj); + await _js.SwipesSetup(_calloutId, 0.25m, BitPanelPosition.Top, Dir is BitDir.Rtl, _dotnetObj); } protected override bool TryParseValueFromString(string? value, [MaybeNullWhen(false)] out DateTimeOffset? result, [NotNullWhen(false)] out string? validationErrorMessage) diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/DateRangePicker/BitDateRangePicker.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/DateRangePicker/BitDateRangePicker.razor.cs index 77abb1fe3f..a64044a39c 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/DateRangePicker/BitDateRangePicker.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/DateRangePicker/BitDateRangePicker.razor.cs @@ -593,7 +593,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) if (firstRender is false) return; if (Responsive is false) return; - await _js.SwipesSetup(_calloutId, 0.25m, SwipesPosition.Top, Dir is BitDir.Rtl, _dotnetObj); + await _js.SwipesSetup(_calloutId, 0.25m, BitPanelPosition.Top, Dir is BitDir.Rtl, _dotnetObj); } protected override bool TryParseValueFromString(string? value, [MaybeNullWhen(false)] out BitDateRangePickerValue? result, [NotNullWhen(false)] out string? validationErrorMessage) diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/TimePicker/BitTimePicker.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/TimePicker/BitTimePicker.razor.cs index 7c19c82d49..d554b0d9ee 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/TimePicker/BitTimePicker.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/_Pickers/TimePicker/BitTimePicker.razor.cs @@ -345,7 +345,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) if (firstRender is false) return; if (Responsive is false) return; - await _js.SwipesSetup(_calloutId, 0.25m, SwipesPosition.Top, Dir is BitDir.Rtl, _dotnetObj); + await _js.SwipesSetup(_calloutId, 0.25m, BitPanelPosition.Top, Dir is BitDir.Rtl, _dotnetObj); } protected override bool TryParseValueFromString(string? value, [MaybeNullWhen(false)] out TimeSpan? result, [NotNullWhen(false)] out string? validationErrorMessage) diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.razor.cs index 2a426aa349..48f83584e7 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Navs/DropMenu/BitDropMenu.razor.cs @@ -150,7 +150,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) if (firstRender is false) return; if (Responsive is false) return; - await _js.SwipesSetup(_calloutId, 0.25m, SwipesPosition.End, Dir is BitDir.Rtl, _dotnetObj); + await _js.SwipesSetup(_calloutId, 0.25m, BitPanelPosition.End, Dir is BitDir.Rtl, _dotnetObj); } diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Progress/Loading/Base/BitLoadingBase.cs b/src/BlazorUI/Bit.BlazorUI/Components/Progress/Loading/Base/BitLoadingBase.cs index c9d9247d69..5b774859de 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Progress/Loading/Base/BitLoadingBase.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Progress/Loading/Base/BitLoadingBase.cs @@ -111,6 +111,12 @@ public override Task SetParametersAsync(ParameterView parameters) + internal new ElementClassBuilder ClassBuilder => base.ClassBuilder; + + internal new ElementStyleBuilder StyleBuilder => base.StyleBuilder; + + + protected override void RegisterCssClasses() { ClassBuilder.Register(() => "bit-ldn"); diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Panel/BitPanel.razor b/src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Panel/BitPanel.razor index c6f1965ebb..cd189aa5fb 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Panel/BitPanel.razor +++ b/src/BlazorUI/Bit.BlazorUI/Components/Surfaces/Panel/BitPanel.razor @@ -6,55 +6,19 @@ role="dialog" style="@StyleBuilder.Value" class="@ClassBuilder.Value" - dir="@Dir?.ToString().ToLower()" - aria-labelledby="@TitleAriaId" - aria-describedby="@SubtitleAriaId" - aria-modal="@((Modeless is false).ToString())"> + dir="@Dir?.ToString().ToLower()"> @if (IsOpen && Modeless is false) { - +
+ + isProPanelStylesOpen = true"">Open ProPanel Styles + + BitProPanel with Styles to customize its elements. +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit + amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor + sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut + turpis. +
+
+ + isProPanelClassesOpen = true"">Open ProPanel Classes + + BitProPanel with Classes to customize its elements. +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit + amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor + sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut + turpis. +
+
"; + private readonly string example5CsharpCode = @" +private bool isStyledPanelOpen; +private bool isClassedPanelOpen; +private bool isPanelStylesOpen; +private bool isPanelClassesOpen;"; + + private readonly string example6RazorCode = @" + isRtlPanelOpenStart = true"">آغاز + isRtlPanelOpenEnd = true"">پایان + + +
+ لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. + چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. + کتابهای زیادی در شصت و سه درصد گذشته، حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی و فرهنگ پیشرو در زبان فارسی ایجاد کرد. + در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها و شرایط سخت تایپ به پایان رسد وزمان مورد نیاز شامل حروفچینی دستاوردهای اصلی و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد. +
+
+
+ لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. + چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. + کتابهای زیادی در شصت و سه درصد گذشته، حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی و فرهنگ پیشرو در زبان فارسی ایجاد کرد. + در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها و شرایط سخت تایپ به پایان رسد وزمان مورد نیاز شامل حروفچینی دستاوردهای اصلی و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد. +
+
"; + private readonly string example6CsharpCode = @" +private bool isRtlProPanelOpenStart; +private bool isRtlProPanelOpenEnd;"; +} diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/ProPanel/BitProPanelDemo.razor.scss b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/ProPanel/BitProPanelDemo.razor.scss new file mode 100644 index 0000000000..2fd279810f --- /dev/null +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/ProPanel/BitProPanelDemo.razor.scss @@ -0,0 +1,60 @@ +@import '../../../../Styles/abstracts/functions'; + +.btn-container { + display: flex; + gap: rem2(16px); + flex-flow: column; + max-width: max-content; +} + +.position-btn { + gap: rem2(16px); + display: flex; + flex-flow: column nowrap; + + div { + display: flex; + justify-content: space-between; + } +} + +::deep { + .custom-class { + .item { + color: black; + padding: 1rem; + margin: 0.5rem; + border-radius: 0.5rem; + background-color: brown; + } + } + + .custom-container { + border: 0.25rem solid #0054C6; + } + + .custom-overlay { + background-color: #ffbd5a66; + } + + .custom-header-container { + padding: 1.5rem; + background-color: tomato; + } + + .custom-header { + font-size: 2rem; + } + + .custom-body { + color: black; + background-color: lightseagreen; + } + + .custom-footer { + color: brown; + padding: 1.5rem; + font-size: 1.5rem; + background-color: tomato; + } +} diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor index e282901360..adda9f235c 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor @@ -14,7 +14,7 @@ Open Panel -
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut @@ -24,111 +24,43 @@ - - -
HeaderText:

- Open Panel - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut - turpis. In hac habitasse platea dictumst. In a odio eget enim porttitor maximus. Aliquam nulla nibh, - ullamcorper aliquam placerat eu, viverra et dui. Phasellus ex lectus, maximus in mollis ac, luctus vel eros. - Vivamus ultrices, turpis sed malesuada gravida, eros ipsum venenatis elit, et volutpat eros dui et ante. - Quisque ultricies mi nec leo ultricies mollis. Vivamus egestas volutpat lacinia. Quisque pharetra eleifend - efficitur. -
-
-


-
HeaderTemplate:

- Open Panel - - -
-

BitPanel with custom header content

- -
-
- -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut - turpis. In hac habitasse platea dictumst. In a odio eget enim porttitor maximus. Aliquam nulla nibh, - ullamcorper aliquam placerat eu, viverra et dui. Phasellus ex lectus, maximus in mollis ac, luctus vel eros. - Vivamus ultrices, turpis sed malesuada gravida, eros ipsum venenatis elit, et volutpat eros dui et ante. - Quisque ultricies mi nec leo ultricies mollis. Vivamus egestas volutpat lacinia. Quisque pharetra eleifend - efficitur. -
-
-
-
-
- - - -
FooterTemplate:

- Open Panel - - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut - turpis. In hac habitasse platea dictumst. In a odio eget enim porttitor maximus. Aliquam nulla nibh, - ullamcorper aliquam placerat eu, viverra et dui. Phasellus ex lectus, maximus in mollis ac, luctus vel eros. - Vivamus ultrices, turpis sed malesuada gravida, eros ipsum venenatis elit, et volutpat eros dui et ante. - Quisque ultricies mi nec leo ultricies mollis. Vivamus egestas volutpat lacinia. Quisque pharetra eleifend - efficitur. -
-
- - Save - Close - -
-
-
- - +
BitPanel has some advanced options to be customized.


-
ShowCloseButton:

- Open Panel - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. -
-
-


Blocking:

Open Panel - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. + +
+

Blocking

+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit + amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor + sagittis nunc, ut interdum ipsum vestibulum non. +
+ Close



Modeless:

Open Panel - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. + +
+

Modeless

+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit + amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor + sagittis nunc, ut interdum ipsum vestibulum non. +
+ Close



AutoToggleScroll:

Open Panel - -
+ +
+

AutoToggleScroll

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor sagittis nunc, ut interdum ipsum vestibulum non. @@ -137,7 +69,7 @@ - +
To set the Panel position on the page you can use the Position parameter.


@@ -153,69 +85,82 @@
- - BitPanel with Start position and custom Size. - + +
+ BitPanel with Start position and custom Size. + +
- - BitPanel with End position and custom Size. - + +
+ BitPanel with End position and custom Size. + +
- BitPanel with Top position and custom Size. - +
+ BitPanel with Top position and custom Size. + +
- - BitPanel with Bottom position and custom Size. - + +
+ BitPanel with Bottom position and custom Size. + +
- +
Explore styling and class customization for BitPanel, including component styles, custom classes, and detailed styles.


Component's Style & Class:

Open Styled panel -

- Open Classed panel -


-
Styles & Classes:

- Open panel Styles -

- Open panel Classes - - BitPanel with custom style. +
+ BitPanel with custom style. +
- +

+ Open Classed panel - BitPanel with custom class: -
Item 1
-
Item 2
-
Item 3
+
+ BitPanel with custom class: +
Item 1
+
Item 2
+
Item 3
+
- - +



+
Styles & Classes:

+ Open panel Styles + BitPanel with Styles to customize its elements. - +

+ Open panel Classes + Overlay = "custom-overlay" })"> BitPanel with Classes to customize its elements.
- +
Use BitPanel in right-to-left (RTL).


@@ -227,8 +172,10 @@
- -
+ +
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. کتابهای زیادی در شصت و سه درصد گذشته، حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی و فرهنگ پیشرو در زبان فارسی ایجاد کرد. @@ -236,8 +183,10 @@
- -
+ +
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. کتابهای زیادی در شصت و سه درصد گذشته، حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی و فرهنگ پیشرو در زبان فارسی ایجاد کرد. diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor.cs index f1d64e297e..ac7c61e7c0 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor.cs +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor.cs @@ -35,27 +35,6 @@ public partial class BitPanelDemo LinkType = LinkType.Link, }, new() - { - Name = "FooterTemplate", - Type = "RenderFragment?", - DefaultValue = "null", - Description = "The template used to render the footer section of the panel.", - }, - new() - { - Name = "HeaderTemplate", - Type = "RenderFragment?", - DefaultValue = "null", - Description = "The template used to render the header section of the panel.", - }, - new() - { - Name = "HeaderText", - Type = "string?", - DefaultValue = "null", - Description = "The text of the header section of the panel.", - }, - new() { Name = "IsOpen", Type = "bool", @@ -117,13 +96,6 @@ public partial class BitPanelDemo Description = "Specifies the element selector for which the Panel disables its scroll if applicable.", }, new() - { - Name = "ShowCloseButton", - Type = "bool", - DefaultValue = "false", - Description = "Shows the close button of the Panel.", - }, - new() { Name = "Styles", Type = "BitPanelClassStyles?", @@ -133,26 +105,12 @@ public partial class BitPanelDemo LinkType = LinkType.Link, }, new() - { - Name = "SubtitleAriaId", - Type = "string?", - DefaultValue = "null", - Description = "Specifies the id for the aria-describedby attribute of the panel.", - }, - new() { Name = "SwipeTrigger", Type = "decimal?", DefaultValue = "null", Description = "The swiping point (difference percentage) based on the width of the panel container to trigger the close action (default is 0.25m).", }, - new() - { - Name = "TitleAriaId", - Type = "string?", - DefaultValue = "null", - Description = "Specifies the id for the aria-labelledby attribute of the panel.", - }, ]; private readonly List componentSubClasses = @@ -183,48 +141,6 @@ public partial class BitPanelDemo Type = "string?", DefaultValue = "null", Description = "Custom CSS classes/styles for the container of the BitPanel." - }, - new() - { - Name = "Header", - Type = "string?", - DefaultValue = "null", - Description = "Custom CSS classes/styles for the header of the BitPanel." - }, - new() - { - Name = "HeaderText", - Type = "string?", - DefaultValue = "null", - Description = "Custom CSS classes/styles for the header text of the BitPanel." - }, - new() - { - Name = "CloseButton", - Type = "string?", - DefaultValue = "null", - Description = "Custom CSS classes/styles for the close button of the BitPanel." - }, - new() - { - Name = "CloseIcon", - Type = "string?", - DefaultValue = "null", - Description = "Custom CSS classes/styles for the close icon of the BitPanel." - }, - new() - { - Name = "Body", - Type = "string?", - DefaultValue = "null", - Description = "Custom CSS classes/styles for the body of the BitPanel." - }, - new() - { - Name = "Footer", - Type = "string?", - DefaultValue = "null", - Description = "Custom CSS classes/styles for the footer of the BitPanel." } ] } @@ -251,15 +167,10 @@ public partial class BitPanelDemo private bool isBasicPanelOpen; - private bool isPanelWithHeaderTextOpen; - private bool isPanelWithCustomHeaderOpen; - - private bool isPanelWithFooterOpen; - private bool isBlockingPanelOpen; private bool isModelessPanelOpen; + private BitPanel modelessPanelRef = default!; private bool isAutoToggleScrollPanelOpen; - private BitPanel bitPanelRef = default!; private double customPanelSize = 300; private bool isOpenInPositionStart; @@ -280,7 +191,7 @@ public partial class BitPanelDemo private readonly string example1RazorCode = @" isBasicPanelOpen = true"">Open Panel -
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut @@ -291,111 +202,48 @@ public partial class BitPanelDemo private bool isBasicPanelOpen;"; private readonly string example2RazorCode = @" - isPanelWithHeaderTextOpen = true"">Open Panel - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut - turpis. In hac habitasse platea dictumst. In a odio eget enim porttitor maximus. Aliquam nulla nibh, - ullamcorper aliquam placerat eu, viverra et dui. Phasellus ex lectus, maximus in mollis ac, luctus vel eros. - Vivamus ultrices, turpis sed malesuada gravida, eros ipsum venenatis elit, et volutpat eros dui et ante. - Quisque ultricies mi nec leo ultricies mollis. Vivamus egestas volutpat lacinia. Quisque pharetra eleifend - efficitur. -
-
- - isPanelWithCustomHeaderOpen = true"">Open Panel - - -
-

BitPanel with custom header content

- -
-
- -
+ isBlockingPanelOpen = true"">Open Panel + +
+

Blocking

+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut - turpis. In hac habitasse platea dictumst. In a odio eget enim porttitor maximus. Aliquam nulla nibh, - ullamcorper aliquam placerat eu, viverra et dui. Phasellus ex lectus, maximus in mollis ac, luctus vel eros. - Vivamus ultrices, turpis sed malesuada gravida, eros ipsum venenatis elit, et volutpat eros dui et ante. - Quisque ultricies mi nec leo ultricies mollis. Vivamus egestas volutpat lacinia. Quisque pharetra eleifend - efficitur. + sagittis nunc, ut interdum ipsum vestibulum non.
- -"; - private readonly string example2CsharpCode = @" -private bool isPanelWithHeaderTextOpen; -private bool isPanelWithCustomHeaderOpen;"; - - private readonly string example3RazorCode = @" - isPanelWithFooterOpen = true"">Open Panel - - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. Proin dolor elit, aliquam eget tincidunt non, vestibulum ut - turpis. In hac habitasse platea dictumst. In a odio eget enim porttitor maximus. Aliquam nulla nibh, - ullamcorper aliquam placerat eu, viverra et dui. Phasellus ex lectus, maximus in mollis ac, luctus vel eros. - Vivamus ultrices, turpis sed malesuada gravida, eros ipsum venenatis elit, et volutpat eros dui et ante. - Quisque ultricies mi nec leo ultricies mollis. Vivamus egestas volutpat lacinia. Quisque pharetra eleifend - efficitur. -

-
- - isPanelWithFooterOpen = false"">Save - isPanelWithFooterOpen = false"">Close - -
"; - private readonly string example3CsharpCode = @" -private bool isPanelWithFooterOpen;"; - - private readonly string example4RazorCode = @" - bitPanelRef.Open()"">Open Panel - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. -
-
- - isBlockingPanelOpen = true"">Open Panel - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. + isBlockingPanelOpen = false"">Close
isModelessPanelOpen = true"">Open Panel - -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit - amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor - sagittis nunc, ut interdum ipsum vestibulum non. + +
+

Modeless

+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit + amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor + sagittis nunc, ut interdum ipsum vestibulum non. +
+ modelessPanelRef.Close()"">Close
isAutoToggleScrollPanelOpen = true"">Open Panel - -
+ +
+

AutoToggleScroll

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lorem nulla, malesuada ut sagittis sit amet, vulputate in leo. Maecenas vulputate congue sapien eu tincidunt. Etiam eu sem turpis. Fusce tempor sagittis nunc, ut interdum ipsum vestibulum non.
"; - private readonly string example4CsharpCode = @" + private readonly string example2CsharpCode = @" private bool isBlockingPanelOpen; private bool isModelessPanelOpen; -private bool isAutoToggleScrollPanelOpen; -private BitPanel bitPanelRef = default!;"; +private BitPanel modelessPanelRef = default!; +private bool isAutoToggleScrollPanelOpen;"; - private readonly string example5RazorCode = @" + private readonly string example3RazorCode = @" isOpenInPositionStart = true"">Start @@ -403,121 +251,108 @@ Quisque ultricies mi nec leo ultricies mollis. Vivamus egestas volutpat lacinia. isOpenInPositionTop = true"">Top isOpenInPositionBottom = true"">Bottom - - BitPanel with Start position and custom Size. - + +
+ BitPanel with Start position and custom Size. + +
- - BitPanel with End position and custom Size. - + +
+ BitPanel with End position and custom Size. + +
- BitPanel with Top position and custom Size. - +
+ BitPanel with Top position and custom Size. + +
- - BitPanel with Bottom position and custom Size. - + +
+ BitPanel with Bottom position and custom Size. + +
"; - private readonly string example5CsharpCode = @" + private readonly string example3CsharpCode = @" private double customPanelSize = 300; private bool isOpenInPositionStart; private bool isOpenPositionEnd; private bool isOpenInPositionTop; private bool isOpenInPositionBottom;"; - private readonly string example6RazorCode = @" - - - + private readonly string example4RazorCode = @" isStyledPanelOpen = true"">Open Styled panel - isClassedPanelOpen = true"">Open Classed panel - - isPanelStylesOpen = true"">Open panel Styles - isPanelClassesOpen = true"">Open panel Classes - BitPanel with custom style. -
+ BitPanel with custom style. +
+
+ isClassedPanelOpen = true"">Open Classed panel - BitPanel with custom class: -
Item 1
-
Item 2
-
Item 3
-
+ BitPanel with custom class: +
Item 1
+
Item 2
+
Item 3
+
+
- + isPanelStylesOpen = true"">Open panel Styles + BitPanel with Styles to customize its elements. - + isPanelClassesOpen = true"">Open panel Classes + Overlay = ""custom-overlay"" })""> BitPanel with Classes to customize its elements. "; - private readonly string example6CsharpCode = @" + private readonly string example4CsharpCode = @" private bool isStyledPanelOpen; private bool isClassedPanelOpen; private bool isPanelStylesOpen; private bool isPanelClassesOpen;"; - private readonly string example7RazorCode = @" + private readonly string example5RazorCode = @" isRtlPanelOpenStart = true"">آغاز isRtlPanelOpenEnd = true"">پایان - -

+ +

لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. کتابهای زیادی در شصت و سه درصد گذشته، حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی و فرهنگ پیشرو در زبان فارسی ایجاد کرد. در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها و شرایط سخت تایپ به پایان رسد وزمان مورد نیاز شامل حروفچینی دستاوردهای اصلی و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد. -

- - - -

+

+
+
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد. کتابهای زیادی در شصت و سه درصد گذشته، حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی و فرهنگ پیشرو در زبان فارسی ایجاد کرد. در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها و شرایط سخت تایپ به پایان رسد وزمان مورد نیاز شامل حروفچینی دستاوردهای اصلی و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد. -

+
"; - private readonly string example7CsharpCode = @" + private readonly string example5CsharpCode = @" private bool isRtlPanelOpenStart; private bool isRtlPanelOpenEnd;"; } diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor.scss b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor.scss index a54db15c4f..99ecfa183f 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor.scss +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Panel/BitPanelDemo.razor.scss @@ -1,5 +1,10 @@ @import '../../../../Styles/abstracts/functions'; +.panel-body { + width: 300px; + padding: 1rem; +} + .btn-container { display: flex; gap: rem2(16px); @@ -19,21 +24,6 @@ } ::deep { - .header-margin, - .custom-header { - margin-top: var(--bit-status-bar-height); - - @supports (-webkit-touch-callout: none) { - margin-top: env(safe-area-inset-top); - } - } - - .footer-margin { - @supports (-webkit-touch-callout: none) { - margin-top: env(safe-area-inset-bottom); - } - } - .custom-class { .item { width: 3rem; @@ -45,6 +35,7 @@ } .custom-container { + padding: 1rem; border: 0.25rem solid #0054C6; border-end-start-radius: 1rem; border-start-start-radius: 1rem; @@ -53,14 +44,4 @@ .custom-overlay { background-color: #ffbd5a66; } - - .custom-header { - padding-bottom: 1.25rem; - background-color: tomato; - } - - .custom-body { - padding-top: 1.25rem; - background-color: lightseagreen; - } } diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Home/ComponentsSection.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Home/ComponentsSection.razor index bec34a5508..b3e28e6a15 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Home/ComponentsSection.razor +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Home/ComponentsSection.razor @@ -253,6 +253,9 @@ PdfReader + + ProPanel + ModalService diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Shared/NavMenu.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Shared/NavMenu.razor.cs index d1277d3a9f..84b6f10f89 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Shared/NavMenu.razor.cs +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Shared/NavMenu.razor.cs @@ -156,6 +156,7 @@ public partial class NavMenu : IDisposable new() { Text = "DataGrid", Url = "/components/datagrid", AdditionalUrls = ["/components/data-grid"] }, new() { Text = "Chart", Url = "/components/chart" }, new() { Text = "PdfReader", Url = "/components/pdfreader" }, + new() { Text = "ProPanel", Url = "/components/propanel" }, new() { Text = "Services", diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/compilerconfig.json b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/compilerconfig.json index 1ea4c0c110..d9e1a8c69c 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/compilerconfig.json +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/compilerconfig.json @@ -71,6 +71,12 @@ "minify": { "enabled": false }, "options": { "sourceMap": false } }, + { + "outputFile": "Pages/Components/Extras/ProPanel/BitProPanelDemo.razor.css", + "inputFile": "Pages/Components/Extras/ProPanel/BitProPanelDemo.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, { "outputFile": "Pages/Components/Inputs/Calendar/BitCalendarDemo.razor.css", "inputFile": "Pages/Components/Inputs/Calendar/BitCalendarDemo.razor.scss", @@ -306,8 +312,8 @@ "options": { "sourceMap": false } }, { - "outputFile": "Pages/Components/Progress/ProgressBar/BitProgressDemo.razor.css", - "inputFile": "Pages/Components/Progress/ProgressBar/BitProgressDemo.razor.scss", + "outputFile": "Pages/Components/Progress/Progress/BitProgressDemo.razor.css", + "inputFile": "Pages/Components/Progress/Progress/BitProgressDemo.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } },