Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b8f12ba
build(deps): bump TailwindMerge.NET from 0.3.0 to 1.0.0
desmondinho Feb 24, 2025
ef009f6
feat: add new CSS theme file
desmondinho Feb 27, 2025
3576c88
feat/build: add custom targets file to improve library usability
desmondinho Feb 27, 2025
bc363ba
chore: move `Plugin` folder one level higher; remove `Scripts` folder
desmondinho Feb 27, 2025
2c2174b
feat/build: pack new theme and custom `.targets` files
desmondinho Feb 27, 2025
b15abae
build(docs): add `Directory.Build.props` and `Directory.Build.targets`
desmondinho Feb 27, 2025
726dfb9
chore(docs): remove tailwind npm deps; use standalone CLI instead
desmondinho Feb 27, 2025
7bd0bce
docs: apply `static` on theme
desmondinho Feb 27, 2025
220649d
refactor(theme-provider): simplify names of box-shadow css variables
desmondinho Feb 27, 2025
07c52e3
refactor(theme-provider): opacities are percentage to match `color-mi…
desmondinho Feb 27, 2025
6ce5c54
chore(components): apply `static` on theme; fix some vars
desmondinho Feb 27, 2025
37545b8
refactor(components): drop Tailwind CSS v3 support
desmondinho Feb 28, 2025
8cd7182
feat(theme): add custom transition variables
desmondinho Feb 28, 2025
c809cfb
fix(theme): correct `default` color; add `default-foreground` color
desmondinho Feb 28, 2025
813c6a2
chore(theme): add reference for the custom transitions approach (it's…
desmondinho Feb 28, 2025
03fb06c
fix: rename `shadow-sm` to `shadow-xs`
desmondinho Feb 28, 2025
0b15745
fix: rename `rounded-sm` to `rounded-xs`
desmondinho Feb 28, 2025
15a6c53
fix: rename `rounded` to `rounded-sm`
desmondinho Feb 28, 2025
7aab9ef
fix: rename `outline-none` to `outline-hidden`
desmondinho Feb 28, 2025
0138e3b
fix: rename `ring-1` to `ring`
desmondinho Feb 28, 2025
80bd921
fix(button): add base `cursor-pointer` class
desmondinho Feb 28, 2025
334bf6c
docs: remove `children` custom variant in favor of `*`
desmondinho Feb 28, 2025
abc32db
fix(theme): correct `enter` custom animation
desmondinho Feb 28, 2025
ce1b4d7
chore(components): cleanup styles
desmondinho Feb 28, 2025
8242229
fix(theme): add missing comma separator in custom transition vars
desmondinho Feb 28, 2025
1dbb325
docs: configure typography
desmondinho Mar 1, 2025
2bc4401
refactor(theme): simplify `scrollbar-hide` utility
desmondinho Mar 1, 2025
654abdb
chore(theme): apply `inline` on theme
desmondinho Mar 1, 2025
289e1dc
refactor: replace `theme` function with CSS vars
desmondinho Mar 1, 2025
62a7cbb
fix(components): correct scale/translate transitions
desmondinho Mar 2, 2025
f8f5e47
feat(theme): update colors from hex to oklch
desmondinho Mar 2, 2025
63d3428
docs(installation): update installation guide
desmondinho Mar 2, 2025
f70047e
feat(theme): add leading CSS vars
desmondinho Mar 2, 2025
f799665
chore(docs): fix prose `<code>` tag ticks
desmondinho Mar 2, 2025
c34b3ca
refactor(utils): remove hex luminance calculator
desmondinho Mar 2, 2025
34087a1
docs(customization): update Theme and Colors pages
desmondinho Mar 2, 2025
fe3bd65
docs(colors): remove 'common colors are not configurable' callout
desmondinho Mar 2, 2025
18f0f35
fix(checkbox): correct radius styles
desmondinho Mar 2, 2025
368d9f9
fix(data-grid): correct striped styles
desmondinho Mar 2, 2025
8f25501
fix(input/select): correct label placement out transitions
desmondinho Mar 2, 2025
68472d8
fix(input/select): correct outlined variant focus styles
desmondinho Mar 2, 2025
aa717c2
fix(input): add cursor-pointer style on the clear button
desmondinho Mar 2, 2025
6445741
fix(input/select): correct flat variant focus styles
desmondinho Mar 2, 2025
0a26a14
fix(docs): correct some component examples
desmondinho Mar 2, 2025
313e088
build(docs): adjust Tailwind standalone CLI file download for Linux
desmondinho Mar 2, 2025
740238f
build(docs): adjust Tailwind standalone CLI file download for Linux
desmondinho Mar 2, 2025
528b141
ci(deploy): try add staging env in the ci/cd
desmondinho Mar 2, 2025
a4f0971
ci(build-test): change trigger branch
desmondinho Mar 2, 2025
dacfb1f
ci(deploy): update trigger branches
desmondinho Mar 2, 2025
093535a
ci(deploy): change env vars usage (test)
desmondinho Mar 2, 2025
e851faa
ci: add deploy-dev.yml; revert deploy.yml
desmondinho Mar 2, 2025
846fa48
chore: merge
desmondinho Mar 2, 2025
9583cd1
ci(deploy): test staging
desmondinho Mar 2, 2025
e8a04a6
chore(docs): nits
desmondinho Mar 4, 2025
6b6d574
chore(components): tweak styles of some components
desmondinho Mar 4, 2025
dee2c6e
chore(docs): tweak some components examples
desmondinho Mar 4, 2025
e8c7663
chore: coderabbit comments
desmondinho Mar 4, 2025
3e4747a
ci: remove deploy-dev.yml
desmondinho Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@

name: Build and Test

on:
pull_request:
branches:
- main
- dev
paths:
- 'docs/**'
- 'src/**'
- 'tests/**'
- "docs/**"
- "src/**"
- "tests/**"

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
dotnet-version: |
8.0.x
9.0.x

- name: Restore
run: dotnet restore

Expand All @@ -36,5 +35,5 @@ jobs:

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Deploy to Azure Web App
on:
push:
branches:
- main
- dev
paths:
- "docs/**"
workflow_dispatch:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
name: "staging"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT
Expand All @@ -64,5 +64,5 @@ jobs:
uses: azure/webapps-deploy@v3
with:
app-name: "lumexui"
slot-name: "Production"
slot-name: "staging"
package: .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,4 @@ FodyWeavers.xsd
/src/LumexUI/**/dist

/docs/LumexUI.Docs/**/*/css
/docs/LumexUI.Docs/*.exe
2 changes: 1 addition & 1 deletion docs/LumexUI.Docs.Client/Components/CodeSnippet.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
</div>
}
<div id="@Id" class="children:my-0">
<div id="@Id" class="*:my-0">
@_renderCodeSnippet
</div>
</div>
Expand Down
9 changes: 2 additions & 7 deletions docs/LumexUI.Docs.Client/Components/ColorSwatches.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

<LumexButton Color="@ThemeColor.None"
Class="w-full min-w-fit h-auto p-0 justify-start gap-x-3 overflow-visible rounded-small sm:block sm:space-y-1">
<div class="relative w-12 h-12 rounded-md ring-1 ring-inset ring-foreground-950/10 sm:w-full"
<div class="relative w-12 h-12 rounded-md ring ring-inset ring-foreground-950/10 sm:w-full"
style="background-color: @(color.Value + (isDivider ? "26" : default))">

<span class="hidden absolute top-1 right-1.5 font-medium text-[0.625rem] leading-none sm:block"
<span class="absolute top-1 right-1.5 font-medium text-[0.625rem] leading-none"
style="color: @(isDivider ? "black" : ColorUtils.GetReadableColor(color.Value))">
@color.Key
</span>
Expand All @@ -30,11 +30,6 @@
</span>
}
</div>

<div class="px-0.5 text-left">
<div class="font-medium text-foreground-900 text-xs sm:hidden">@color.Key</div>
<div class="font-mono text-foreground-500 text-xs">@color.Value</div>
</div>
</LumexButton>
}
}
Expand Down
26 changes: 11 additions & 15 deletions docs/LumexUI.Docs.Client/Components/ComponentLinks.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<LumexButton As="a"
Size="@Size.Small"
StartContent="@BlazorIcon"
Class="bg-default-100 text-default-700"
Class="bg-default-100 text-default-700 text-small"
href="https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/?view=aspnetcore-8.0#client-and-server-rendering-concepts"
target="_blank"
rel="noopener noreferrer">
Expand All @@ -17,7 +17,7 @@
<LumexButton As="a"
Size="@Size.Small"
StartContent="@GithubIcon"
Class="bg-default-100 text-default-700"
Class="bg-default-100 text-default-700 text-small"
href="@($"{Constants.GitHub.ComponentPath}/{ComponentName}")"
target="_blank"
rel="noopener noreferrer">
Expand All @@ -27,7 +27,7 @@
<LumexButton As="a"
Size="@Size.Small"
StartContent="@GithubIcon"
Class="bg-default-100 text-default-700"
Class="bg-default-100 text-default-700 text-small"
href="@($"{Constants.GitHub.ComponentStylesPath}/{ComponentName}.cs")"
target="_blank"
rel="noopener noreferrer">
Expand All @@ -39,17 +39,13 @@
[Parameter, EditorRequired] public string ComponentName { get; set; } = default!;
[Parameter] public bool IsServer { get; set; }

private RenderFragment BlazorIcon =>
@<text>
<LumexIcon Icon="@Icons.Brands.Blazor"
Size="@new("20")"
viewBox="-10 -38 340 340" />
</text>;
private static readonly RenderFragment BlazorIcon =
@<LumexIcon Icon="@Icons.Brands.Blazor"
Size="@new("20")"
viewBox="-10 -38 340 340" />;

private RenderFragment GithubIcon =>
@<text>
<LumexIcon Icon="@Icons.Brands.GitHub"
Size="@new("20")"
viewBox="0 0 24 24" />
</text>;
private static readonly RenderFragment GithubIcon =
@<LumexIcon Icon="@Icons.Brands.GitHub"
Size="@new("20")"
viewBox="0 0 24 24" />;
}
2 changes: 1 addition & 1 deletion docs/LumexUI.Docs.Client/Components/DocsApiSection.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<li>
<LumexLink Href="@($"{NavigationManager.BaseUri}docs/api/{componentPathSegment}")"
Class="border-none text-orange-500 text-xs font-normal not-prose">
<span class="px-1 py-0.5 rounded-md ring-1 ring-orange-200 bg-orange-50">
<span class="px-1 py-0.5 rounded-md ring ring-orange-200 bg-orange-50">
@($"<{component} />")
</span>
</LumexLink>
Expand Down
2 changes: 1 addition & 1 deletion docs/LumexUI.Docs.Client/Components/DocsSection.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Color="@ThemeColor.None"
Class="border-none">
@Title
<span class="flex items-center justify-center size-6 ml-2 rounded-md text-foreground-400 shadow-sm ring-1 ring-foreground-950/5 hover:ring-orange-200 hover:bg-orange-50 hover:text-orange-500">
<span class="flex items-center justify-center size-6 ml-2 rounded-md text-foreground-400 shadow-xs ring ring-foreground-950/5 hover:ring-orange-200 hover:bg-orange-50 hover:text-orange-500">
<LumexIcon Icon="@Icons.Rounded.Link"
Size="@new("16")" />
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
foreach( var step in Steps )
{
<li class="relative pl-10 pb-8 xl:grid xl:grid-cols-5 xl:gap-10 before:absolute before:content-[counter(step)] before:left-0 before:flex before:items-center before:justify-center before:size-6 before:text-[0.625rem] before:font-bold before:text-zinc-700 before:rounded-md before:shadow-sm before:ring-1 before:ring-foreground-950/5 after:absolute after:top-8 after:bottom-0 after:left-3 after:w-px after:bg-divider" style="counter-increment: step;">
<li class="relative pl-10 pb-8 xl:grid xl:grid-cols-5 xl:gap-10 before:absolute before:content-[counter(step)] before:left-0 before:flex before:items-center before:justify-center before:size-6 before:text-[0.625rem] before:font-bold before:text-zinc-700 before:rounded-md before:shadow-xs before:ring before:ring-foreground-950/5 after:absolute after:top-8 after:bottom-0 after:left-3 after:w-px after:bg-divider" style="counter-increment: step;">
<div class="mb-6 xl:mb-0 xl:col-span-2">
<h4 class="text-sm leading-6 font-semibold mb-2">
@step.Title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
or later
</li>
<li>
<LumexLink Href="https://v3.tailwindcss.com"
<LumexLink Href="https://tailwindcss.com"
External="@true">
Tailwind CSS 3.4
Tailwind CSS 4.0
<LumexIcon Icon="@Icons.Rounded.OpenInNew"
Size="@new("16")"
Class="mx-1 text-orange-400" />
Expand All @@ -45,13 +45,6 @@
</li>
</ul>
</DocsSection>

<Callout Variant="@CalloutVariant.Warning">
Please be aware that LumexUI isn't fully compatible with Tailwind CSS v4.0 at this time. If this is the
version you plan on using, proceed at your own risk. More information can be found in
<LumexLink Href="https://github.com/LumexUI/lumexui/issues/156"
External="true">this Github conversation</LumexLink>.
</Callout>
<LumexDivider />
</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/LumexUI.Docs.Client/Components/NavItemBadge.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.Add( "px-1.5" )
.Add( "py-[3px]" )
.Add( "rounded-full" )
.Add( "ring-1" )
.Add( "ring" )
.Add( "font-semibold" )
.Add( "text-[0.5rem]" )
.Add( "uppercase" )
Expand Down
2 changes: 1 addition & 1 deletion docs/LumexUI.Docs.Client/Components/Preview.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
private readonly Slots _slots = new()
{
Preview = "relative flex flex-wrap items-center gap-4",
PreviewWrapper = "relative p-8 rounded-xl bg-zinc-50 ring-1 ring-foreground-950/5 not-prose",
PreviewWrapper = "relative p-8 rounded-xl bg-zinc-50 ring ring-foreground-950/5 not-prose",
Background = "absolute inset-0 [mask-image:radial-gradient(#fff_0%,transparent_100%)]",
};

Expand Down
2 changes: 1 addition & 1 deletion docs/LumexUI.Docs.Client/Components/PreviewCode.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
</div>

<LumexCollapse Expanded="@_expanded" Class="children:rounded-t-none">
<LumexCollapse Expanded="@_expanded" Class="*:rounded-t-none">
<CodeSnippet Id="@_id" Code="@Code" />
</LumexCollapse>
</div>
4 changes: 2 additions & 2 deletions docs/LumexUI.Docs.Client/Components/PreviewCode.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public partial class PreviewCode

private string? BaseClass => ElementClass.Empty()
.Add( "rounded-2xl" )
.Add( "ring-1" )
.Add( "ring" )
.Add( "ring-foreground-950/5" )
.Add( "shadow-sm" )
.Add( "shadow-xs" )
.Add( "overflow-hidden" )
.Add( Class )
.ToString();
Expand Down
2 changes: 1 addition & 1 deletion docs/LumexUI.Docs.Client/Components/QuickLink.razor
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@Description
</p>
</div>
<div class="absolute -z-10 -inset-3 rounded-2xl bg-gray-50 peer-hover:ring-1 peer-hover:ring-foreground-950/5"></div>
<div class="absolute -z-10 -inset-3 rounded-2xl bg-gray-50 peer-hover:ring peer-hover:ring-foreground-950/5"></div>
</li>

@code {
Expand Down
6 changes: 3 additions & 3 deletions docs/LumexUI.Docs.Client/Pages/Api/Api.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@if( _properties.Length > 1 )
{
<DocsSection Title="Properties">
<div class="overflow-x-auto children:mt-0">
<div class="overflow-x-auto *:mt-0">
<table>
<thead>
<tr>
Expand All @@ -40,7 +40,7 @@
{
<tr>
<td class="text-orange-500">@property.Name</td>
<td class="max-w-44 overflow-x-auto scrollbar:h-1 scrollbar:w-1 scrollbar-thumb:rounded scrollbar-thumb:bg-foreground-200 scrollbar-track:rounded scrollbar-track:bg-foreground-100">
<td class="max-w-44 overflow-x-auto scrollbar:h-1 scrollbar:w-1 scrollbar-thumb:rounded-sm scrollbar-thumb:bg-foreground-200 scrollbar-track:rounded-sm scrollbar-track:bg-foreground-100">
<Code>@GetTypeName( property.PropertyType )</Code>
</td>
<td>@GetDescription( property )</td>
Expand Down Expand Up @@ -68,7 +68,7 @@
@if( _methods.Length > 1 )
{
<DocsSection Title="Methods">
<div class="overflow-x-auto children:mt-0">
<div class="overflow-x-auto *:mt-0">
<table>
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Title="General Settings"
Subtitle="Custom display, sound, privacy, connectivity, updates">
<StartContent>
<span class="h-8 w-8 flex items-center justify-center bg-primary text-zinc-50 rounded-lg ring ring-primary/30">
<span class="h-8 w-8 flex items-center justify-center bg-primary text-zinc-50 rounded-lg ring-3 ring-primary/30">
<LumexIcon Icon="@Icons.Rounded.Settings"
Color="@ThemeColor.None" />
</span>
Expand All @@ -16,7 +16,7 @@
Title="Advanced Settings"
Subtitle="Detailed system, developer, security, network, diagnostics">
<StartContent>
<span class="h-8 w-8 flex items-center justify-center bg-secondary text-zinc-50 rounded-lg ring ring-secondary/30">
<span class="h-8 w-8 flex items-center justify-center bg-secondary text-zinc-50 rounded-lg ring-3 ring-secondary/30">
<LumexIcon Icon="@Icons.Rounded.Manufacturing"
Color="@ThemeColor.None" />
</span>
Expand All @@ -29,7 +29,7 @@
Title="Personal Data"
Subtitle="Contacts, messages, photos, account info, preferences">
<StartContent>
<span class="h-8 w-8 flex items-center justify-center bg-danger text-zinc-50 rounded-lg ring ring-danger/30">
<span class="h-8 w-8 flex items-center justify-center bg-danger text-zinc-50 rounded-lg ring-3 ring-danger/30">
<LumexIcon Icon="@Icons.Rounded.ManageAccounts"
Color="@ThemeColor.None" />
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@code {
private CardSlots _classes = new()
{
Root = "max-w-md py-4 rounded-3xl bg-zinc-100 shadow-[5px_5px_10px_theme(colors.zinc.200),-5px_-5px_10px_theme(colors.zinc.50)]",
Root = "max-w-md py-4 rounded-3xl bg-zinc-100 shadow-[5px_5px_10px_var(--color-zinc-200),-5px_-5px_10px_var(--color-zinc-50)]",
Header = "justify-center text-center",
Body = "py-0 justify-center text-center",
Footer = "justify-center gap-2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<LumexDataGrid Data="@_users">
<LumexDataGrid Data="@_users"
Layout="@Layout.Fixed"
Classes="@(new() { Table = "w-full" })">
<EditColumn Property="@(p => p.Name)" />
<EditColumn Property="@(p => p.Role)" />
<EditColumn Property="@(p => p.Status)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,15 @@
<PropertyColumn Property="@(p => p.Status)" />
</LumexDataGrid>

<fieldset class="flex gap-4">
@foreach( var color in _colors )
<LumexRadioGroup Orientation="@Orientation.Horizontal"
@bind-Value="@_color">
@foreach( var color in Enum.GetValues<ThemeColor>()[1..] )
{
var value = color.ToString();

<div class="flex gap-1">
<input type="radio"
id="@($"multiple-sel-{value.ToLower()}")"
name="color"
@bind:event="onchange"
@bind:get="@color"
@bind:set="@OnColorSelect" />
<label for="@($"multiple-sel-{value.ToLower()}")">@value</label>
</div>
<LumexRadio Value="@color" Color="@color">
@color.ToString()
</LumexRadio>
}
</fieldset>
</LumexRadioGroup>

@if( _selectedUsers.Count > 0 )
{
Expand All @@ -46,23 +39,8 @@
new( "Diana Lee", "Moderator", "Active" )
}.AsQueryable();

private readonly ThemeColor[] _colors = [
ThemeColor.Default,
ThemeColor.Primary,
ThemeColor.Secondary,
ThemeColor.Success,
ThemeColor.Warning,
ThemeColor.Danger,
ThemeColor.Info
];

private ThemeColor _color = ThemeColor.Default;
private ICollection<User> _selectedUsers = [];

private void OnColorSelect( ThemeColor value )
{
_color = value;
}

private record User( string Name, string Role, string Status );
}
Loading
Loading