chore: add ui package and custom theme colors
This commit is contained in:
1
packages/ui/index.ts
Normal file
1
packages/ui/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './src';
|
||||
38
packages/ui/package.json
Normal file
38
packages/ui/package.json
Normal 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
7
packages/ui/src/index.ts
Normal 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
11
packages/ui/src/theme.ts
Normal 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",
|
||||
});
|
||||
14
packages/ui/src/theme/colors/primary.ts
Normal file
14
packages/ui/src/theme/colors/primary.ts
Normal 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'
|
||||
];
|
||||
14
packages/ui/src/theme/colors/secondary.ts
Normal file
14
packages/ui/src/theme/colors/secondary.ts
Normal 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'
|
||||
];
|
||||
8
packages/ui/tsconfig.json
Normal file
8
packages/ui/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@alparr/tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
||||
},
|
||||
"include": ["*.ts", "src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user