diff --git a/src/AlohaKit.UI.Gallery/AlohaKit.UI.Gallery.csproj b/src/AlohaKit.UI.Gallery/AlohaKit.UI.Gallery.csproj new file mode 100644 index 0000000..d8ef35d --- /dev/null +++ b/src/AlohaKit.UI.Gallery/AlohaKit.UI.Gallery.csproj @@ -0,0 +1,68 @@ + + + + net7.0-android;net7.0-ios;net7.0-maccatalyst + $(TargetFrameworks);net7.0-windows10.0.19041.0 + + + Exe + AlohaKit.UI.Gallery + true + true + enable + + + AlohaKit.UI.Gallery + + + com.companyname.alohakit.ui.gallery + d3f78708-ecf3-4a86-b8bb-967c5679690b + + + 1.0 + 1 + + 11.0 + 13.1 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + MSBuild:Compile + + + + diff --git a/src/AlohaKit.UI.Gallery/App.xaml b/src/AlohaKit.UI.Gallery/App.xaml new file mode 100644 index 0000000..22ade60 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/AlohaKit.UI.Gallery/App.xaml.cs b/src/AlohaKit.UI.Gallery/App.xaml.cs new file mode 100644 index 0000000..cdd3ea1 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/App.xaml.cs @@ -0,0 +1,12 @@ +namespace AlohaKit.UI.Gallery +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/AppShell.xaml b/src/AlohaKit.UI.Gallery/AppShell.xaml new file mode 100644 index 0000000..229db37 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/AppShell.xaml @@ -0,0 +1,14 @@ + + + + + + diff --git a/src/AlohaKit.UI.Gallery/AppShell.xaml.cs b/src/AlohaKit.UI.Gallery/AppShell.xaml.cs new file mode 100644 index 0000000..a6279fc --- /dev/null +++ b/src/AlohaKit.UI.Gallery/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace AlohaKit.UI.Gallery +{ + public partial class AppShell : Shell + { + public AppShell() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/MauiProgram.cs b/src/AlohaKit.UI.Gallery/MauiProgram.cs new file mode 100644 index 0000000..597e8fd --- /dev/null +++ b/src/AlohaKit.UI.Gallery/MauiProgram.cs @@ -0,0 +1,20 @@ +using Microsoft.Extensions.Logging; + +namespace AlohaKit.UI.Gallery +{ + public static class MauiProgram + { + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp(); + +#if DEBUG + builder.Logging.AddDebug(); +#endif + + return builder.Build(); + } + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/Android/AndroidManifest.xml b/src/AlohaKit.UI.Gallery/Platforms/Android/AndroidManifest.xml new file mode 100644 index 0000000..e9937ad --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/Android/MainActivity.cs b/src/AlohaKit.UI.Gallery/Platforms/Android/MainActivity.cs new file mode 100644 index 0000000..f37e135 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Android/MainActivity.cs @@ -0,0 +1,11 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; + +namespace AlohaKit.UI.Gallery +{ + [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] + public class MainActivity : MauiAppCompatActivity + { + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/Android/MainApplication.cs b/src/AlohaKit.UI.Gallery/Platforms/Android/MainApplication.cs new file mode 100644 index 0000000..bf8e852 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Android/MainApplication.cs @@ -0,0 +1,16 @@ +using Android.App; +using Android.Runtime; + +namespace AlohaKit.UI.Gallery +{ + [Application] + public class MainApplication : MauiApplication + { + public MainApplication(IntPtr handle, JniHandleOwnership ownership) + : base(handle, ownership) + { + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/Android/Resources/values/colors.xml b/src/AlohaKit.UI.Gallery/Platforms/Android/Resources/values/colors.xml new file mode 100644 index 0000000..c04d749 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Android/Resources/values/colors.xml @@ -0,0 +1,6 @@ + + + #512BD4 + #2B0B98 + #2B0B98 + \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/AppDelegate.cs b/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/AppDelegate.cs new file mode 100644 index 0000000..770989e --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace AlohaKit.UI.Gallery +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/Info.plist b/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/Info.plist new file mode 100644 index 0000000..c96dd0a --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/Info.plist @@ -0,0 +1,30 @@ + + + + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/Program.cs b/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/Program.cs new file mode 100644 index 0000000..4386efb --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/MacCatalyst/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace AlohaKit.UI.Gallery +{ + public class Program + { + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/Tizen/Main.cs b/src/AlohaKit.UI.Gallery/Platforms/Tizen/Main.cs new file mode 100644 index 0000000..422ab2a --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Tizen/Main.cs @@ -0,0 +1,17 @@ +using Microsoft.Maui; +using Microsoft.Maui.Hosting; +using System; + +namespace AlohaKit.UI.Gallery +{ + internal class Program : MauiApplication + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + + static void Main(string[] args) + { + var app = new Program(); + app.Run(args); + } + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/Tizen/tizen-manifest.xml b/src/AlohaKit.UI.Gallery/Platforms/Tizen/tizen-manifest.xml new file mode 100644 index 0000000..a9f0eaf --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Tizen/tizen-manifest.xml @@ -0,0 +1,15 @@ + + + + + + maui-appicon-placeholder + + + + + http://tizen.org/privilege/internet + + + + \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/Windows/App.xaml b/src/AlohaKit.UI.Gallery/Platforms/Windows/App.xaml new file mode 100644 index 0000000..ce4cce3 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Windows/App.xaml @@ -0,0 +1,8 @@ + + + diff --git a/src/AlohaKit.UI.Gallery/Platforms/Windows/App.xaml.cs b/src/AlohaKit.UI.Gallery/Platforms/Windows/App.xaml.cs new file mode 100644 index 0000000..cca2dc5 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Windows/App.xaml.cs @@ -0,0 +1,24 @@ +using Microsoft.UI.Xaml; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace AlohaKit.UI.Gallery.WinUI +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public partial class App : MauiWinUIApplication + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/Windows/Package.appxmanifest b/src/AlohaKit.UI.Gallery/Platforms/Windows/Package.appxmanifest new file mode 100644 index 0000000..2bcb11e --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Windows/Package.appxmanifest @@ -0,0 +1,43 @@ + + + + + + + $placeholder$ + User Name + $placeholder$.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/AlohaKit.UI.Gallery/Platforms/Windows/app.manifest b/src/AlohaKit.UI.Gallery/Platforms/Windows/app.manifest new file mode 100644 index 0000000..8cf125d --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/Windows/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/src/AlohaKit.UI.Gallery/Platforms/iOS/AppDelegate.cs b/src/AlohaKit.UI.Gallery/Platforms/iOS/AppDelegate.cs new file mode 100644 index 0000000..770989e --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/iOS/AppDelegate.cs @@ -0,0 +1,10 @@ +using Foundation; + +namespace AlohaKit.UI.Gallery +{ + [Register("AppDelegate")] + public class AppDelegate : MauiUIApplicationDelegate + { + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Platforms/iOS/Info.plist b/src/AlohaKit.UI.Gallery/Platforms/iOS/Info.plist new file mode 100644 index 0000000..0004a4f --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/iOS/Info.plist @@ -0,0 +1,32 @@ + + + + + LSRequiresIPhoneOS + + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + XSAppIconAssets + Assets.xcassets/appicon.appiconset + + diff --git a/src/AlohaKit.UI.Gallery/Platforms/iOS/Program.cs b/src/AlohaKit.UI.Gallery/Platforms/iOS/Program.cs new file mode 100644 index 0000000..4386efb --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Platforms/iOS/Program.cs @@ -0,0 +1,16 @@ +using ObjCRuntime; +using UIKit; + +namespace AlohaKit.UI.Gallery +{ + public class Program + { + // This is the main entry point of the application. + static void Main(string[] args) + { + // if you want to use a different Application Delegate class from "AppDelegate" + // you can specify it here. + UIApplication.Main(args, null, typeof(AppDelegate)); + } + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Properties/launchSettings.json b/src/AlohaKit.UI.Gallery/Properties/launchSettings.json new file mode 100644 index 0000000..edf8aad --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Windows Machine": { + "commandName": "MsixPackage", + "nativeDebugging": false + } + } +} \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Resources/AppIcon/appicon.svg b/src/AlohaKit.UI.Gallery/Resources/AppIcon/appicon.svg new file mode 100644 index 0000000..9d63b65 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Resources/AppIcon/appicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Resources/AppIcon/appiconfg.svg b/src/AlohaKit.UI.Gallery/Resources/AppIcon/appiconfg.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Resources/AppIcon/appiconfg.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Resources/Fonts/OpenSans-Regular.ttf b/src/AlohaKit.UI.Gallery/Resources/Fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..238424f Binary files /dev/null and b/src/AlohaKit.UI.Gallery/Resources/Fonts/OpenSans-Regular.ttf differ diff --git a/src/AlohaKit.UI.Gallery/Resources/Fonts/OpenSans-Semibold.ttf b/src/AlohaKit.UI.Gallery/Resources/Fonts/OpenSans-Semibold.ttf new file mode 100644 index 0000000..0fd77c6 Binary files /dev/null and b/src/AlohaKit.UI.Gallery/Resources/Fonts/OpenSans-Semibold.ttf differ diff --git a/src/AlohaKit.UI.Gallery/Resources/Images/dotnet_bot.svg b/src/AlohaKit.UI.Gallery/Resources/Images/dotnet_bot.svg new file mode 100644 index 0000000..abfaff2 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Resources/Images/dotnet_bot.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/AlohaKit.UI.Gallery/Resources/Raw/AboutAssets.txt b/src/AlohaKit.UI.Gallery/Resources/Raw/AboutAssets.txt new file mode 100644 index 0000000..15d6244 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Resources/Raw/AboutAssets.txt @@ -0,0 +1,15 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories). Deployment of the asset to your application +is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. + + + +These files will be deployed with you package and will be accessible using Essentials: + + async Task LoadMauiAsset() + { + using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); + using var reader = new StreamReader(stream); + + var contents = reader.ReadToEnd(); + } diff --git a/src/AlohaKit.UI.Gallery/Resources/Splash/splash.svg b/src/AlohaKit.UI.Gallery/Resources/Splash/splash.svg new file mode 100644 index 0000000..21dfb25 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Resources/Splash/splash.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Resources/Styles/Colors.xaml b/src/AlohaKit.UI.Gallery/Resources/Styles/Colors.xaml new file mode 100644 index 0000000..245758b --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Resources/Styles/Colors.xaml @@ -0,0 +1,44 @@ + + + + + #512BD4 + #DFD8F7 + #2B0B98 + White + Black + #E1E1E1 + #C8C8C8 + #ACACAC + #919191 + #6E6E6E + #404040 + #212121 + #141414 + + + + + + + + + + + + + + + #F7B548 + #FFD590 + #FFE5B9 + #28C2D1 + #7BDDEF + #C3F2F4 + #3E8EED + #72ACF1 + #A7CBF6 + + \ No newline at end of file diff --git a/src/AlohaKit.UI.Gallery/Resources/Styles/Styles.xaml b/src/AlohaKit.UI.Gallery/Resources/Styles/Styles.xaml new file mode 100644 index 0000000..56eab87 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Resources/Styles/Styles.xaml @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/AlohaKit.UI.Gallery/Views/CSharp/MainPage.cs b/src/AlohaKit.UI.Gallery/Views/CSharp/MainPage.cs new file mode 100644 index 0000000..f6cb9d8 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Views/CSharp/MainPage.cs @@ -0,0 +1,30 @@ +using AlohaKit.UI.Extensions; +using static AlohaKit.UI.UIStatics; + +namespace AlohaKit.UI.Gallery.Views.CSharp +{ + public class MainPage : ContentPage + { + public MainPage() + { + Title = "AlohaKit UI from C#"; + + Content = + CanvasView() + .Children(new Element[] { + Rectangle() + .X(10).Y(10) + .Height(80).Width(80) + .Fill(Colors.Red), + Ellipse() + .X(10).Y(100) + .Height(80).Width(80) + .Fill(Colors.Orange), + Label() + .X(10).Y(200) + .Height(20).Width(100) + .Text("Label"), + }); + } + } +} diff --git a/src/AlohaKit.UI.Gallery/Views/MainPage.xaml b/src/AlohaKit.UI.Gallery/Views/MainPage.xaml new file mode 100644 index 0000000..59e8e74 --- /dev/null +++ b/src/AlohaKit.UI.Gallery/Views/MainPage.xaml @@ -0,0 +1,18 @@ + + + + +