Enhance SbConfirmDialog component with improved icon handling and styling. Update project file to enable package generation on build and adjust CSS for better dialog responsiveness and overflow management.
Release NuGet Packages / pack-and-push (release) Successful in 3m21s
Release NuGet Packages / pack-and-push (release) Successful in 3m21s
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
@using SufiChain.SufiBlazor.Components.Common
|
@using SufiChain.SufiBlazor.Components.Common
|
||||||
@using SufiChain.SufiBlazor.Components.Actions
|
@using SufiChain.SufiBlazor.Components.Actions
|
||||||
@inject IStringLocalizer<SufiBlazorResource> L
|
@inject IStringLocalizer<SufiBlazorResource> L
|
||||||
@inject IStringLocalizer<SufiBlazorResource> L
|
|
||||||
|
|
||||||
@if (_isOpen)
|
@if (_isOpen)
|
||||||
{
|
{
|
||||||
@@ -17,7 +16,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div class="sb-confirm-dialog__icon sb-confirm-dialog__icon--@Variant.ToString().ToLower()">
|
<div class="sb-confirm-dialog__icon sb-confirm-dialog__icon--@Variant.ToString().ToLower()">
|
||||||
<SbIcon Name="@GetDefaultIconName()" Size="SbSize.Lg" />
|
<SbIcon Name="@GetDefaultIconName()" Size="SbSize.Lg" Color="@GetConfirmButtonColor()" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +127,7 @@
|
|||||||
|
|
||||||
private string GetDefaultIconName() => Variant switch
|
private string GetDefaultIconName() => Variant switch
|
||||||
{
|
{
|
||||||
SbConfirmDialogVariant.Danger => "warning",
|
SbConfirmDialogVariant.Danger => "error",
|
||||||
SbConfirmDialogVariant.Warning => "warning",
|
SbConfirmDialogVariant.Warning => "warning",
|
||||||
SbConfirmDialogVariant.Info => "info",
|
SbConfirmDialogVariant.Info => "info",
|
||||||
_ => "help-circle"
|
_ => "help-circle"
|
||||||
|
|||||||
@@ -17,6 +17,12 @@
|
|||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
|
||||||
|
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<SupportedPlatform Include="browser" />
|
<SupportedPlatform Include="browser" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -42,4 +48,8 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Update="wwwroot\**\*.*" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" Pack="true" PackagePath="staticwebassets\%(RecursiveDir)%(Filename)%(Extension)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -7321,10 +7321,13 @@ body.sb-resizing {
|
|||||||
.sb-confirm-dialog {
|
.sb-confirm-dialog {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
|
max-height: calc(100vh - (var(--sb-space-4) * 2));
|
||||||
padding: var(--sb-space-6);
|
padding: var(--sb-space-6);
|
||||||
background-color: var(--sb-color-surface);
|
background-color: var(--sb-color-surface);
|
||||||
border-radius: var(--sb-radius-lg);
|
border-radius: var(--sb-radius-lg);
|
||||||
box-shadow: var(--sb-shadow-lg);
|
box-shadow: var(--sb-shadow-lg);
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-confirm-dialog__icon {
|
.sb-confirm-dialog__icon {
|
||||||
@@ -7358,17 +7361,39 @@ body.sb-resizing {
|
|||||||
color: var(--sb-color-info);
|
color: var(--sb-color-info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sb-confirm-dialog--success .sb-confirm-dialog__icon {
|
||||||
|
background-color: var(--sb-color-success-light, #dcfce7);
|
||||||
|
color: var(--sb-color-success);
|
||||||
|
}
|
||||||
|
|
||||||
.sb-confirm-dialog__title {
|
.sb-confirm-dialog__title {
|
||||||
font-size: var(--sb-font-size-lg);
|
font-size: var(--sb-font-size-lg);
|
||||||
font-weight: var(--sb-font-weight-semibold);
|
font-weight: var(--sb-font-weight-semibold);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: var(--sb-space-2);
|
margin-bottom: var(--sb-space-2);
|
||||||
|
min-width: 0;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
word-break: break-word;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-confirm-dialog__message {
|
.sb-confirm-dialog__message {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--sb-color-text-secondary);
|
color: var(--sb-color-text-secondary);
|
||||||
margin-bottom: var(--sb-space-4);
|
margin-bottom: var(--sb-space-4);
|
||||||
|
min-width: 0;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
word-break: break-word;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb-confirm-dialog__content,
|
||||||
|
.sb-confirm-dialog__body {
|
||||||
|
min-width: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-confirm-dialog__actions {
|
.sb-confirm-dialog__actions {
|
||||||
|
|||||||
Reference in New Issue
Block a user