chore: add ui package and custom theme colors

This commit is contained in:
Meier Lukas
2023-12-08 23:47:55 +01:00
parent 9ea96899b1
commit f6094c6ae2
12 changed files with 127 additions and 4 deletions

1
packages/ui/index.ts Normal file
View File

@@ -0,0 +1 @@
export * from './src';

38
packages/ui/package.json Normal file
View File

@@ -0,0 +1,38 @@
{
"name": "@alparr/ui",
"private": true,
"version": "0.1.0",
"exports": {
".": "./index.ts"
},
"typesVersions": {
"*": {
"*": [
"src/*"
]
}
},
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0",
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": [
"@alparr/eslint-config/base"
]
},
"prettier": "@alparr/prettier-config",
"dependencies": {
"@mantine/core": "^7.3.1"
}
}

7
packages/ui/src/index.ts Normal file
View File

@@ -0,0 +1,7 @@
import type { MantineProviderProps } from "@mantine/core";
import { theme } from "./theme";
export const uiConfiguration = ({
theme,
}) satisfies MantineProviderProps;

11
packages/ui/src/theme.ts Normal file
View File

@@ -0,0 +1,11 @@
import { createTheme } from "@mantine/core";
import { primaryColor } from "./theme/colors/primary";
import { secondaryColor } from "./theme/colors/secondary";
export const theme = createTheme({
colors: {
primaryColor,
secondaryColor,
},
primaryColor: "primaryColor",
});

View File

@@ -0,0 +1,14 @@
import type { MantineColorsTuple } from "@mantine/core";
export const primaryColor: MantineColorsTuple = [
'#eafbf0',
'#ddefe3',
'#bedcc7',
'#9bc8aa',
'#7eb892',
'#6bad81',
'#60a878',
'#509265',
'#438359',
'#35724a'
];

View File

@@ -0,0 +1,14 @@
import type { MantineColorsTuple } from "@mantine/core";
export const secondaryColor: MantineColorsTuple = [
'#e6f7ff',
'#d9e8f6',
'#b6cde6',
'#90b2d4',
'#6f9ac5',
'#5a8bbd',
'#4d84ba',
'#3d71a4',
'#326595',
'#205885'
];

View File

@@ -0,0 +1,8 @@
{
"extends": "@alparr/tsconfig/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["*.ts", "src"],
"exclude": ["node_modules"]
}