diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f87b4dd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 9.0.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore --configuration Release + + - name: Run tests + run: dotnet test --no-restore --configuration Release --verbosity normal + + - name: Pack NuGet packages + run: dotnet pack --no-build --configuration Release -p:ContinuousIntegrationBuild=true + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: nuget-packages + path: | + **/*.nupkg + **/*.snupkg diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3774638 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release + +on: + push: + tags: + - 'v*.*.*' + +jobs: + publish: + runs-on: ubuntu-latest + if: github.event.repository.fork == false + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 9.0.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore --configuration Release + + - name: Run tests + run: dotnet test --no-restore --configuration Release + + - name: Pack NuGet packages + run: dotnet pack --no-restore --configuration Release + + - name: Publish to NuGet + run: | + dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate + dotnet nuget push **/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..91b786e --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,30 @@ + + + + + 0.1.0 + + + + + + $(ShellUIVersion) + $(ShellUIVersion)-$(ShellUIVersionSuffix) + $(ShellUIVersion) + $(ShellUIVersion) + $(Version) + + + + + ShellUI + ShellUI + ShellUI + © $([System.DateTime]::Now.Year) ShellUI. All rights reserved. + MIT + false + blazor;ui;components;tailwindcss;shadcn + https://github.com/shellui-dev/shellui + git + + \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 8aa2645..2be080c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) [year] [fullname] +Copyright (c) 2025-2026 ShellUI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NET9/BlazorInteractiveServer/Components/Demo/AdvancedFormDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/AdvancedFormDemo.razor index 415035e..f5d7c5b 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/AdvancedFormDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/AdvancedFormDemo.razor @@ -1,4 +1,5 @@ @namespace BlazorInteractiveServer.Components.Demo +@using BlazorInteractiveServer.Components

Advanced Forms

@@ -46,7 +47,7 @@
- @if (!string.IsNullOrEmpty(_selectedTech)) @@ -56,7 +57,7 @@
- @if (!string.IsNullOrEmpty(_selectedFramework)) @@ -73,7 +74,7 @@
- + @if (_selectedDate.HasValue) {

Selected: @_selectedDate.Value.ToString("MMMM dd, yyyy")

@@ -81,7 +82,7 @@
- + @if (_selectedDate2.HasValue) {

Selected: @_selectedDate2.Value.ToString("MMMM dd, yyyy")

@@ -106,7 +107,7 @@

Time Picker

- + @if (_selectedTime.HasValue) {

Selected: @_selectedTime.Value.ToString(@"hh\:mm")

@@ -134,8 +135,10 @@ @if (_formSubmitted) { - - Form submitted successfully! + + + Form submitted successfully! + }
@@ -287,4 +290,3 @@ await FormSubmittedChanged.InvokeAsync(_formSubmitted); } } - diff --git a/NET9/BlazorInteractiveServer/Components/Demo/BadgesDialogDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/BadgesDialogDemo.razor index 2ec9a21..206ae11 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/BadgesDialogDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/BadgesDialogDemo.razor @@ -1,26 +1,31 @@ @using BlazorInteractiveServer.Components.UI +@using BlazorInteractiveServer.Components

Badges & Dialog

- Default - Secondary - Destructive - Success - Warning - Info + Default + Secondary + Destructive + Success + Warning + Info
- - + + + + ShellUI Dialog + This is a demo of the Dialog component. +

This dialog demonstrates the ShellUI Dialog component. You can put any content here!

-
-
- - -
+ + + + +
@code { @@ -36,4 +41,3 @@ isDialogOpen = false; } } - diff --git a/NET9/BlazorInteractiveServer/Components/Demo/ButtonsDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/ButtonsDemo.razor index a78b1a5..73e029c 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/ButtonsDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/ButtonsDemo.razor @@ -1,24 +1,25 @@ @using BlazorInteractiveServer.Components.UI +@using BlazorInteractiveServer.Components

Variants

- - - - - - + + + + + +

Sizes

- - - - + + + +
@@ -48,4 +49,3 @@ isLoading = false; } } - diff --git a/NET9/BlazorInteractiveServer/Components/Demo/CardsAlertsDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/CardsAlertsDemo.razor index 4f05e58..b8e83fd 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/CardsAlertsDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/CardsAlertsDemo.razor @@ -1,35 +1,41 @@ @using BlazorInteractiveServer.Components.UI +@using BlazorInteractiveServer.Components

Card

-
-

Card Title

-

Card description goes here.

-
- + + Card Title + Card description goes here. + +

This is the main content of the card. It can contain any content you want.

-
-
- -
+ + + +

Alerts

- - This is an informational alert. + + + This is an informational alert. + - - Operation completed successfully! + + + Operation completed successfully! + - - Please check your input. + + + Please check your input. +
- diff --git a/NET9/BlazorInteractiveServer/Components/Demo/ComplexComponentsDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/ComplexComponentsDemo.razor index f10cef1..8622e6c 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/ComplexComponentsDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/ComplexComponentsDemo.razor @@ -1,4 +1,5 @@ @namespace BlazorInteractiveServer.Components.Demo +@using BlazorInteractiveServer.Components

Complex Components

@@ -18,7 +19,7 @@ Title="Are you sure?" Description="This action cannot be undone. This will permanently delete your account and remove your data from our servers." ConfirmText="Delete Account" - ConfirmVariant="destructive" + ConfirmVariant="@ButtonVariant.Destructive" CancelText="Cancel" OnConfirm="HandleAlertConfirm" OnCancel="HandleAlertCancel" @@ -89,7 +90,7 @@

Hover Card

- +
@@ -328,4 +329,3 @@ "; } } - diff --git a/NET9/BlazorInteractiveServer/Components/Demo/DataDisplayDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/DataDisplayDemo.razor index 9c0b0a2..8bdad34 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/DataDisplayDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/DataDisplayDemo.razor @@ -1,4 +1,5 @@ @namespace BlazorInteractiveServer.Components.Demo +@using BlazorInteractiveServer.Components

Data Display

@@ -13,7 +14,7 @@
- +
@@ -47,7 +48,7 @@

Section 1

- +

Section 2

@@ -63,9 +64,9 @@

Avatar

- - - + + +
@@ -92,7 +93,7 @@ Shell Technologies contact@shell-tech.dev Organization - Verified + Verified @@ -102,4 +103,3 @@ @code { } - diff --git a/NET9/BlazorInteractiveServer/Components/Demo/FormControlsDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/FormControlsDemo.razor index 78f5529..142a31c 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/FormControlsDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/FormControlsDemo.razor @@ -1,4 +1,5 @@ @namespace BlazorInteractiveServer.Components.Demo +@using BlazorInteractiveServer.Components

Form Controls

@@ -77,8 +78,8 @@ Toggle Me - Outline - Small + Outline + Small

Pressed: @(_togglePressed ? "Yes" : "No")

@@ -188,4 +189,3 @@ await TogglePressed3Changed.InvokeAsync(value); } } - diff --git a/NET9/BlazorInteractiveServer/Components/Demo/NavigationDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/NavigationDemo.razor index d956272..fa57ded 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/NavigationDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/NavigationDemo.razor @@ -1,4 +1,5 @@ @namespace BlazorInteractiveServer.Components.Demo +@using BlazorInteractiveServer.Components

Navigation

@@ -9,13 +10,16 @@
- ShellUI +
+ + ShellUI +
- +
@@ -78,7 +82,7 @@ -

Yes. It adheres to the WAI-ARIA design pattern.

+

Yes. It adheres to the WAI-ARIA design pattern.

Yes. It comes with default styles that matches the other components aesthetic.

@@ -103,4 +107,3 @@ await IsSidebarOpenChanged.InvokeAsync(IsSidebarOpen); } } - diff --git a/NET9/BlazorInteractiveServer/Components/Demo/OverlayDemo.razor b/NET9/BlazorInteractiveServer/Components/Demo/OverlayDemo.razor index 8b935f7..655f22b 100644 --- a/NET9/BlazorInteractiveServer/Components/Demo/OverlayDemo.razor +++ b/NET9/BlazorInteractiveServer/Components/Demo/OverlayDemo.razor @@ -1,4 +1,5 @@ @namespace BlazorInteractiveServer.Components.Demo +@using BlazorInteractiveServer.Components

Overlays

@@ -28,7 +29,7 @@
- +

This is a tooltip on top!

@@ -36,7 +37,7 @@
- +

This is a tooltip on bottom!

@@ -44,7 +45,7 @@
- +

Tooltip on the left

@@ -58,7 +59,7 @@

Popover

- +
@@ -81,8 +82,8 @@

Toast

- - + +
@@ -127,4 +128,3 @@ await ShowWarningToastChanged.InvokeAsync(ShowWarningToast); } } - diff --git a/NET9/BlazorInteractiveServer/Components/Layout/MainLayout.razor b/NET9/BlazorInteractiveServer/Components/Layout/MainLayout.razor index b81a13f..c6dd46a 100644 --- a/NET9/BlazorInteractiveServer/Components/Layout/MainLayout.razor +++ b/NET9/BlazorInteractiveServer/Components/Layout/MainLayout.razor @@ -16,12 +16,10 @@
-
- - - -
-

ShellUI

+ + +

ShellUI

+
@@ -54,7 +52,7 @@ - @@ -89,16 +87,12 @@
-
- - - -
+

Menu

- @@ -185,7 +179,7 @@ { Title = "GitHub", Description = "View source code on GitHub", - Action = async () => await JSRuntime.InvokeVoidAsync("ShellUI.openUrl", "https://github.com/Shell-Technologies/shellui", "_blank") + Action = async () => await JSRuntime.InvokeVoidAsync("ShellUI.openUrl", "https://github.com/shellui-dev/shellui", "_blank") }, new CommandItem { diff --git a/NET9/BlazorInteractiveServer/Components/Pages/Home.razor b/NET9/BlazorInteractiveServer/Components/Pages/Home.razor index 42229ea..2547e0b 100644 --- a/NET9/BlazorInteractiveServer/Components/Pages/Home.razor +++ b/NET9/BlazorInteractiveServer/Components/Pages/Home.razor @@ -3,6 +3,7 @@ @using BlazorInteractiveServer.Components.Models @using BlazorInteractiveServer.Components.Demo @using Microsoft.AspNetCore.Components.Forms +@using BlazorInteractiveServer.Components ShellUI - Component Demo @@ -17,7 +18,7 @@

Responsive Design

All components support Tailwind's responsive utilities. Resize your browser to see it in action!

- +
@@ -188,7 +189,7 @@ CellTemplate = context => builder => { builder.OpenComponent(0); - builder.AddAttribute(1, "Variant", context.Role == "Admin" ? "destructive" : "default"); + builder.AddAttribute(1, "Variant", context.Role == "Admin" ? BadgeVariant.Destructive : BadgeVariant.Default); builder.AddAttribute(2, "ChildContent", (RenderFragment)(childBuilder => childBuilder.AddContent(0, context.Role))); builder.CloseComponent(); } diff --git a/NET9/BlazorInteractiveServer/Components/Shell.cs b/NET9/BlazorInteractiveServer/Components/Shell.cs new file mode 100644 index 0000000..d9af5bb --- /dev/null +++ b/NET9/BlazorInteractiveServer/Components/Shell.cs @@ -0,0 +1,10 @@ +using System.Linq; + +namespace BlazorInteractiveServer.Components; + +public static class Shell +{ + public static string Cn(params string?[] classes) + => string.Join(" ", classes.Where(c => !string.IsNullOrWhiteSpace(c))); +} + diff --git a/NET9/BlazorInteractiveServer/Components/UI/Accordion.razor b/NET9/BlazorInteractiveServer/Components/UI/Accordion.razor index f7a6af1..7d30b52 100644 --- a/NET9/BlazorInteractiveServer/Components/UI/Accordion.razor +++ b/NET9/BlazorInteractiveServer/Components/UI/Accordion.razor @@ -1,16 +1,15 @@ @namespace BlazorInteractiveServer.Components.UI +@using BlazorInteractiveServer.Components -
- @ChildContent +
+ + @ChildContent +
@code { - [Parameter] - public RenderFragment? ChildContent { get; set; } - - [Parameter] - public string ClassName { get; set; } = ""; - + [Parameter] public RenderFragment? ChildContent { get; set; } + [Parameter] public string? Class { get; set; } [Parameter(CaptureUnmatchedValues = true)] public Dictionary? AdditionalAttributes { get; set; } @@ -26,3 +25,4 @@ _items.Remove(item); } } + diff --git a/NET9/BlazorInteractiveServer/Components/UI/AccordionItem.razor b/NET9/BlazorInteractiveServer/Components/UI/AccordionItem.razor index 08fdae2..4d016ee 100644 --- a/NET9/BlazorInteractiveServer/Components/UI/AccordionItem.razor +++ b/NET9/BlazorInteractiveServer/Components/UI/AccordionItem.razor @@ -1,38 +1,29 @@ @namespace BlazorInteractiveServer.Components.UI +@using BlazorInteractiveServer.Components -
+
@if (IsOpen) { -
+
@ChildContent
}
@code { - [CascadingParameter] - private Accordion? Accordion { get; set; } - - [Parameter] - public string Title { get; set; } = ""; - - [Parameter] - public bool IsOpen { get; set; } - - [Parameter] - public RenderFragment? ChildContent { get; set; } - - [Parameter] - public string ClassName { get; set; } = ""; - + [CascadingParameter] private Accordion? Accordion { get; set; } + [Parameter] public string Title { get; set; } = ""; + [Parameter] public bool IsOpen { get; set; } + [Parameter] public RenderFragment? ChildContent { get; set; } + [Parameter] public string? Class { get; set; } [Parameter(CaptureUnmatchedValues = true)] public Dictionary? AdditionalAttributes { get; set; } @@ -51,3 +42,4 @@ IsOpen = !IsOpen; } } + diff --git a/NET9/BlazorInteractiveServer/Components/UI/Alert.razor b/NET9/BlazorInteractiveServer/Components/UI/Alert.razor index 24ea112..b913f4c 100644 --- a/NET9/BlazorInteractiveServer/Components/UI/Alert.razor +++ b/NET9/BlazorInteractiveServer/Components/UI/Alert.razor @@ -1,6 +1,7 @@ @namespace BlazorInteractiveServer.Components.UI +@using BlazorInteractiveServer.Components -