Merge pull request #398 from irihitech/toast

New Control: Notification & Toast
This commit is contained in:
Dong Bin
2024-09-12 18:55:40 +08:00
committed by GitHub
33 changed files with 2034 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BoxShadows x:Key="NotificationCardBoxShadows">inset 0 0 0 1 #1AFFFFFF, 0 4 14 0 #40000000</BoxShadows>
<SolidColorBrush x:Key="NotificationCardLightBackground" Color="#16161A" />
<SolidColorBrush x:Key="NotificationCardLightInformationBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="NotificationCardLightInformationBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="NotificationCardLightSuccessBorderBrush" Color="#5DC264" />
<SolidColorBrush x:Key="NotificationCardLightSuccessBackground" Opacity="0.2" Color="#5DC264" />
<SolidColorBrush x:Key="NotificationCardLightWarningBorderBrush" Color="#FFAE43" />
<SolidColorBrush x:Key="NotificationCardLightWarningBackground" Opacity="0.2" Color="#FFAE43" />
<SolidColorBrush x:Key="NotificationCardLightErrorBorderBrush" Color="#FC725A" />
<SolidColorBrush x:Key="NotificationCardLightErrorBackground" Opacity="0.2" Color="#FC725A" />
<SolidColorBrush x:Key="NotificationCardCloseButtonForeground" Opacity="0.8" Color="#F9F9F9" />
</ResourceDictionary>

View File

@@ -0,0 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="ToastCardContentForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToastCardBackground" Color="#43444A" />
</ResourceDictionary>

View File

@@ -12,10 +12,12 @@
<MergeResourceInclude Source="KeyGestureInput.axaml" />
<MergeResourceInclude Source="Loading.axaml" />
<MergeResourceInclude Source="NavigationMenu.axaml" />
<MergeResourceInclude Source="NotificationShared.axaml" />
<MergeResourceInclude Source="Pagination.axaml" />
<MergeResourceInclude Source="Rating.axaml" />
<MergeResourceInclude Source="TagInput.axaml" />
<MergeResourceInclude Source="Timeline.axaml" />
<MergeResourceInclude Source="Toast.axaml" />
<MergeResourceInclude Source="Skeleton.axaml" />
<MergeResourceInclude Source="TimeBox.axaml" />
</ResourceDictionary.MergedDictionaries>

View File

@@ -0,0 +1,15 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BoxShadows x:Key="NotificationCardBoxShadows">0 0 1 0 #4A000000, 0 4 14 0 #1A000000</BoxShadows>
<SolidColorBrush x:Key="NotificationCardLightBackground" Color="White" />
<SolidColorBrush x:Key="NotificationCardLightInformationBorderBrush" Color="#0077FA" />
<SolidColorBrush x:Key="NotificationCardLightInformationBackground" Color="#EAF5FF" />
<SolidColorBrush x:Key="NotificationCardLightSuccessBorderBrush" Color="#3BB346" />
<SolidColorBrush x:Key="NotificationCardLightSuccessBackground" Color="#ECF7EC" />
<SolidColorBrush x:Key="NotificationCardLightWarningBorderBrush" Color="#FC8800" />
<SolidColorBrush x:Key="NotificationCardLightWarningBackground" Color="#FFF8EA" />
<SolidColorBrush x:Key="NotificationCardLightErrorBorderBrush" Color="#F93920" />
<SolidColorBrush x:Key="NotificationCardLightErrorBackground" Color="#FEF2ED" />
<SolidColorBrush x:Key="NotificationCardCloseButtonForeground" Opacity="0.8" Color="#1C1F23" />
</ResourceDictionary>

View File

@@ -0,0 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="ToastCardContentForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="ToastCardBackground" Color="White" />
</ResourceDictionary>

View File

@@ -12,10 +12,12 @@
<MergeResourceInclude Source="KeyGestureInput.axaml" />
<MergeResourceInclude Source="Loading.axaml" />
<MergeResourceInclude Source="NavigationMenu.axaml" />
<MergeResourceInclude Source="NotificationShared.axaml" />
<MergeResourceInclude Source="Pagination.axaml" />
<MergeResourceInclude Source="Rating.axaml" />
<MergeResourceInclude Source="TagInput.axaml" />
<MergeResourceInclude Source="Timeline.axaml" />
<MergeResourceInclude Source="Toast.axaml" />
<MergeResourceInclude Source="Skeleton.axaml" />
<MergeResourceInclude Source="TimeBox.axaml" />
</ResourceDictionary.MergedDictionaries>

View File

@@ -0,0 +1,3 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Thickness x:Key="NotificationCardPadding">20 16 12 16</Thickness>
</ResourceDictionary>

View File

@@ -0,0 +1,17 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Double x:Key="ToastCardMinHeight">40</x:Double>
<Thickness x:Key="ToastCardBorderThickness">1</Thickness>
<CornerRadius x:Key="ToastCardCornerRadius">6</CornerRadius>
<Thickness x:Key="ToastCardMargin">12</Thickness>
<Thickness x:Key="ToastCardPadding">12 8</Thickness>
<x:Double x:Key="ToastCardIconWidth">18</x:Double>
<x:Double x:Key="ToastCardIconHeight">18</x:Double>
<Thickness x:Key="ToastCardIconMargin">0 2 0 0</Thickness>
<FontWeight x:Key="ToastCardContentFontWeight">600</FontWeight>
<Thickness x:Key="ToastCardContentMargin">12 0</Thickness>
<x:Double x:Key="ToastCardContentMaxWidth">450</x:Double>
</ResourceDictionary>

View File

@@ -15,12 +15,14 @@
<MergeResourceInclude Source="KeyGestureInput.axaml" />
<MergeResourceInclude Source="MessageBox.axaml" />
<MergeResourceInclude Source="NavigationMenu.axaml" />
<MergeResourceInclude Source="Notification.axaml" />
<MergeResourceInclude Source="Pagination.axaml" />
<MergeResourceInclude Source="Rating.axaml" />
<MergeResourceInclude Source="ScrollToButton.axaml" />
<MergeResourceInclude Source="TagInput.axaml" />
<MergeResourceInclude Source="Skeleton.axaml" />
<MergeResourceInclude Source="ThemeSelector.axaml" />
<MergeResourceInclude Source="Toast.axaml" />
<MergeResourceInclude Source="ToolBar.axaml" />
<MergeResourceInclude Source="TimeBox.axaml" />
</ResourceDictionary.MergedDictionaries>