Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
168a60e
feat(themes): theme foundation — palettes, ThemeProvider refactor, fo…
IzumiSy Jun 4, 2026
aa142f2
refactor(theme): simplify ThemeProvider — remove legacy migration, ha…
IzumiSy Jun 4, 2026
58770aa
Format files
IzumiSy Jun 4, 2026
aaf0582
feat: add ThemeSwitcher component with color palette and font selection
IzumiSy Jun 4, 2026
2390951
Revert vite-app
IzumiSy Jun 4, 2026
136673b
refactor: remove themeSwitcher prop from SidebarLayout
IzumiSy Jun 4, 2026
acf69c3
refactor(core): split theme.css into per-theme files
IzumiSy Jun 4, 2026
ca0dd66
refactor(core): pre-generate font assets and append via closeBundle hook
IzumiSy Jun 5, 2026
d2b2423
Fix appendFonts plugin to use proper hooks
IzumiSy Jun 11, 2026
79c1f92
Fix concatenation target
IzumiSy Jun 11, 2026
55ab068
feat(theme): split theming into mode and palette axes (#313)
itsprade Jun 15, 2026
a8f75f8
refactor: move @custom-variant dark to theme.css
IzumiSy Jun 15, 2026
c730da2
refactor: consolidate token tier docs into theme.css
IzumiSy Jun 15, 2026
efc3d62
refactor(core): simplify theme system — remove font axis, make palett…
IzumiSy Jun 15, 2026
f54bf1e
Remove unnecessary exports
IzumiSy Jun 15, 2026
2aa3b49
refactor: auto-scan @fontsource-variable packages from dependencies
IzumiSy Jun 15, 2026
355d3ed
Revise changeset
IzumiSy Jun 15, 2026
1ab25fa
refactor(theme): rename Theme→ThemePalette, ColorMode→ColorTheme
IzumiSy Jun 15, 2026
b6194a9
refactor(theme): remove type aliases in index.ts exports, fix changes…
IzumiSy Jun 15, 2026
5233a37
feat(themes): add i18n labels to AppearanceSwitcher and remove ThemeP…
IzumiSy Jun 15, 2026
7da861f
refactor: replace defaultThemePalette prop with static CSS theme imports
IzumiSy Jun 16, 2026
67eba3b
chore(core): remove generated font assets
IzumiSy Jun 17, 2026
bf14e60
Revert style loading
IzumiSy Jun 17, 2026
ead70be
feat(theme): accent tokens, palette tier organisation, and appearance…
itsprade Jun 17, 2026
06b579c
Remove unnecessary changeset
IzumiSy Jun 17, 2026
1ec3b56
refactor(themes): inherit shared aliases from default
IzumiSy Jun 19, 2026
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
27 changes: 27 additions & 0 deletions .changeset/theme-mode-palette-axes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"@tailor-platform/app-shell": minor
Comment thread
IzumiSy marked this conversation as resolved.
---

Introduce theming support — **ColorTheme** axis, static **theme palettes** via CSS imports, a new `AppearanceSwitcher` component, and bundled Inter variable fonts.

#### ColorTheme (end-user preference, persisted)

`ColorTheme` (`"light" | "dark" | "system"`) is the end-user color mode preference. Applied to `<html>` as `.light` / `.dark` class.

- `<AppShell defaultColorTheme="system">` sets the initial preference; user choice is persisted to localStorage.
- `useTheme()` hook returns `{ theme, resolvedTheme, setTheme }`.

#### Theme Palettes (static CSS imports)

Each palette (`default`, `cream`, `bloom`) ships both light and dark variants.
Select a palette by importing its CSS file — no prop needed:

```ts
import "@tailor-platform/app-shell/themes/cream";
```

The default palette is included automatically via `@tailor-platform/app-shell/styles`.

#### AppearanceSwitcher

- New `<AppearanceSwitcher />` component for toggling color theme (light / dark / system).
5 changes: 5 additions & 0 deletions .changeset/theme-token-tiers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tailor-platform/app-shell": patch
---

Set explicit `--accent` values per palette and mode, reorganise palette CSS into numbered tiers with a `_template.css` authoring guide, add `--alert-*` semantic tokens to the default palette, and wire `Alert` variants to those tokens (including lighter dark-mode foregrounds).
2 changes: 1 addition & 1 deletion docs/components/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Each variant automatically renders a contextual icon:

| Variant | Automatic Icon | Color palette |
| --------- | ------------------- | --------------- |
| `neutral` | Message circle icon | Secondary/muted |
| `neutral` | Message circle icon | Muted surface |
| `success` | Check circle icon | Green |
| `warning` | Alert triangle icon | Yellow |
| `error` | X circle icon | Red/destructive |
Expand Down
18 changes: 18 additions & 0 deletions docs/concepts/styling-theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,21 @@ These properties are defined in `:root` and can be overridden in your own CSS:
--z-popup: 100;
}
```

## Adding a palette

Theme tokens live in `packages/core/src/assets/themes/`. Copy `_template.css` to start a new palette — it lists exactly which sections to fill in for light and dark mode.

| Section | Required? | What to set |
| --------------------- | --------------------- | ------------------------------------------------------------- |
| **1. Brand** | Yes | `primary`, `secondary`, `accent` (+ foregrounds) — both modes |
| **2. Shell gradient** | Branded palettes only | `--shell-gradient-base`, `--shell-gradient-tint` |
| **3. Derived** | Copy verbatim | Ring, sidebar aliases, gradient stops — do not edit |
| **4. System** | Tune or copy default | Surfaces: background, card, popover, muted, borders |
| **5. Palette** | Optional | Radius, chart colors, shadows |
| **6. Semantic** | Do not duplicate | Status and alert tokens inherit from `default.css` |
| **7. Structural** | Branded palettes | Copy `@layer` blocks from `bloom.css` for gradient shell |

Then `@import` the new file in `theme.css` and set `defaultThemePalette` on `<AppShell />`.

Preview token values at `/custom-page/color` in the Next.js example app.
1 change: 0 additions & 1 deletion e2e/app/src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import "tailwindcss";
@import "@tailor-platform/app-shell/styles";
@import "@tailor-platform/app-shell/theme.css";
1 change: 1 addition & 0 deletions examples/nextjs-app/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Metadata } from "next";
import "@tailor-platform/app-shell/styles";
import "@tailor-platform/app-shell/themes/cream";
import "./globals.css";

export const metadata: Metadata = {
Expand Down
13 changes: 13 additions & 0 deletions examples/nextjs-app/src/modules/custom-module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { dropdownComponentsDemoResource } from "./pages/dropdown-demo";
import { formComponentsDemoResource, zodRHFFormDemoResource } from "./pages/form-demo";
import { csvImporterDemoResource } from "./pages/csv-importer-demo";
import { dataTableDemoResource } from "./pages/data-table-demo";
import { colorDemoResource } from "./pages/color-demo";

export const customPageModule = defineModule({
path: "custom-page",
Expand All @@ -40,6 +41,17 @@ export const customPageModule = defineModule({
<p>
<Link to="/custom-page/sub1/sub1-1/123">{t("goToDynamicPage")}</Link>
</p>
<p>
<Link
to="/custom-page/color"
style={{
color: "hsl(var(--primary))",
textDecoration: "underline",
}}
>
Color tokens (swatches & layers)
</Link>
</p>
<p>
<Link
to="/custom-page/purchase-order-demo"
Expand Down Expand Up @@ -217,6 +229,7 @@ export const customPageModule = defineModule({
subPageResource,
hiddenResource,
adminOnlyResource,
colorDemoResource,
purchaseOrderDemoResource,
actionPanelDemoResource,
metricCardDemoResource,
Expand Down
Loading
Loading