diff --git a/demo/Semi.Avalonia.Demo/Constant/ColorTokens.cs b/demo/Semi.Avalonia.Demo/Constant/ColorTokens.cs new file mode 100644 index 00000000..d41cfdc0 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Constant/ColorTokens.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; + +namespace Semi.Avalonia.Demo.Constant; + +public static class ColorTokens +{ + public static IReadOnlyList> PrimaryTokens { get; } = new List> + { + new("SemiColorPrimary", "Primary"), + new("SemiColorPrimaryPointerover", "Primary Pointerover"), + new("SemiColorPrimaryActive", "Primary Active"), + new("SemiColorPrimaryDisabled", "Primary Disabled"), + new("SemiColorPrimaryLight", "Primary Light"), + new("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"), + new("SemiColorPrimaryLightActive", "Primary Light Active"), + }; + + public static IReadOnlyList> SecondaryTokens { get; } = new List> + { + new("SemiColorSecondary", "Secondary"), + new("SemiColorSecondaryPointerover", "Secondary Pointerover"), + new("SemiColorSecondaryActive", "Secondary Active"), + new("SemiColorSecondaryDisabled", "Secondary Disabled"), + new("SemiColorSecondaryLight", "Secondary Light"), + new("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"), + new("SemiColorSecondaryLightActive", "Secondary Light Active"), + }; + + public static IReadOnlyList> TertiaryTokens { get; } = new List> + { + new("SemiColorTertiary", "Tertiary"), + new("SemiColorTertiaryPointerover", "Tertiary Pointerover"), + new("SemiColorTertiaryActive", "Tertiary Active"), + new("SemiColorTertiaryLight", "Tertiary Light"), + new("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"), + new("SemiColorTertiaryLightActive", "Tertiary Light Active"), + }; + + public static IReadOnlyList> InformationTokens { get; } = new List> + { + new("SemiColorInformation", "Information"), + new("SemiColorInformationPointerover", "Information Pointerover"), + new("SemiColorInformationActive", "Information Active"), + new("SemiColorInformationDisabled", "Information Disabled"), + new("SemiColorInformationLight", "Information Light"), + new("SemiColorInformationLightPointerover", "Information Light Pointerover"), + new("SemiColorInformationLightActive", "Information Light Active"), + }; + + public static IReadOnlyList> SuccessTokens { get; } = new List> + { + new("SemiColorSuccess", "Success"), + new("SemiColorSuccessPointerover", "Success Pointerover"), + new("SemiColorSuccessActive", "Success Active"), + new("SemiColorSuccessDisabled", "Success Disabled"), + new("SemiColorSuccessLight", "Success Light"), + new("SemiColorSuccessLightPointerover", "Success Light Pointerover"), + new("SemiColorSuccessLightActive", "Success Light Active"), + }; + + public static IReadOnlyList> WarningTokens { get; } = new List> + { + new("SemiColorWarning", "Warning"), + new("SemiColorWarningPointerover", "Warning Pointerover"), + new("SemiColorWarningActive", "Warning Active"), + new("SemiColorWarningLight", "Warning Light"), + new("SemiColorWarningLightPointerover", "Warning Light Pointerover"), + new("SemiColorWarningLightActive", "Warning Light Active"), + }; + + public static IReadOnlyList> DangerTokens { get; } = new List> + { + new("SemiColorDanger", "Danger"), + new("SemiColorDangerPointerover", "Danger Pointerover"), + new("SemiColorDangerActive", "Danger Active"), + new("SemiColorDangerLight", "Danger Light"), + new("SemiColorDangerLightPointerover", "Danger Light Pointerover"), + new("SemiColorDangerLightActive", "Danger Light Active"), + }; + + public static IReadOnlyList> TextTokens { get; } = new List> + { + new("SemiColorText0", "Text 0"), + new("SemiColorText1", "Text 1"), + new("SemiColorText2", "Text 2"), + new("SemiColorText3", "Text 3"), + }; + + public static IReadOnlyList> LinkTokens { get; } = new List> + { + new("SemiColorLink", "Link"), + new("SemiColorLinkPointerover", "Link Pointerover"), + new("SemiColorLinkActive", "Link Active"), + new("SemiColorLinkVisited", "Link Visited"), + }; + + public static IReadOnlyList> BackgroundTokens { get; } = new List> + { + new("SemiColorBackground0", "Background 0"), + new("SemiColorBackground1", "Background 1"), + new("SemiColorBackground2", "Background 2"), + new("SemiColorBackground3", "Background 3"), + new("SemiColorBackground4", "Background 4"), + }; + + public static IReadOnlyList> FillTokens { get; } = new List> + { + new("SemiColorFill0", "Fill 0"), + new("SemiColorFill1", "Fill 1"), + new("SemiColorFill2", "Fill 2"), + }; + + public static IReadOnlyList> BorderTokens { get; } = new List> + { + new("SemiColorBorder", "Border"), + }; + + public static IReadOnlyList> DisabledTokens { get; } = new List> + { + new("SemiColorDisabledText", "Disabled Text"), + new("SemiColorDisabledBorder", "Disabled Border"), + new("SemiColorDisabledBackground", "Disabled Background"), + new("SemiColorDisabledFill", "Disabled Fill"), + }; + + public static IReadOnlyList> ShadowTokens { get; } = new List> + { + new("SemiColorShadow", "Shadow"), + new("SemiShadowElevated", "Shadow Elevated"), + }; +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml index 03599ec0..2f4288ef 100644 --- a/demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml @@ -5,6 +5,7 @@ xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels" xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls" xmlns:cvt="clr-namespace:Semi.Avalonia.Demo.Converters" + xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages" mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="1450" x:DataType="vm:HighContrastDemoViewModel" x:CompileBindings="True" @@ -306,6 +307,18 @@ + + + + +