chore: kanban template

This commit is contained in:
e2e
2026-06-21 20:31:53 +02:00
commit a197174b13
209 changed files with 215578 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
{
"id": "default"
}

View File

@@ -0,0 +1,6 @@
{
"fontFamily": "IBM Plex Sans, sans-serif",
"headings": {
"fontFamily": "IBM Plex Sans, sans-serif"
}
}

View File

@@ -0,0 +1,37 @@
import { createTheme, type MantineThemeOverride } from '@mantine/core'
import { generateColors } from '@mantine/colors-generator'
import base from './base.json'
import active from './active.json'
import { palettes } from './palettes'
export type Palette = {
name: string
description?: string
primaryColor?: string
bases?: Record<string, string>
}
// Each palette extends the shared base (fonts, radius, component defaults) and
// auto-expands its `bases` hexes into full 10-shade Mantine scales, so a palette
// only declares one colour per semantic role.
export const buildTheme = (palette: Palette): MantineThemeOverride => {
const colors = Object.fromEntries(
Object.entries(palette.bases ?? {}).map(([role, hex]) => [role, generateColors(hex)]),
)
return createTheme({
...(base as MantineThemeOverride),
...(palette.primaryColor ? { primaryColor: palette.primaryColor } : {}),
...(Object.keys(colors).length ? { colors } : {}),
})
}
export const themes: Record<string, MantineThemeOverride> = Object.fromEntries(
Object.entries(palettes).map(([id, palette]) => [id, buildTheme(palette as Palette)]),
)
export { palettes }
export const activeId = active.id
export const activeTheme: MantineThemeOverride = themes[active.id] ?? themes.default
// Back-compat: existing imports of `theme` resolve to the active palette.
export const theme = activeTheme

View File

@@ -0,0 +1,25 @@
{
"name": "@project/mantine-themes",
"version": "0.0.1",
"private": true,
"type": "module",
"exports": {
".": "./index.ts",
"./base.json": "./base.json",
"./active.json": "./active.json"
},
"scripts": {
"tsc": "tsc --noEmit"
},
"dependencies": {
"@mantine/colors-generator": "^8.3.8",
"chroma-js": "^3.1.2"
},
"devDependencies": {
"@mantine/core": "^8.3.8",
"typescript": "^5.9"
},
"peerDependencies": {
"@mantine/core": "^8.3.8"
}
}

View File

@@ -0,0 +1,4 @@
{
"name": "Default",
"primaryColor": "blue"
}

View File

@@ -0,0 +1,7 @@
// Generated by the fabric-theme tool — do not edit by hand.
// Lists every palette JSON in this directory. Add palettes via the theme tool.
import p_default from './default.json'
export const palettes: Record<string, unknown> = {
default: p_default,
}

View File

@@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"noEmit": true,
"types": []
},
"include": ["index.ts", "base.json", "active.json", "palettes/**/*.ts", "palettes/**/*.json"]
}