-
- Get started by editing
- app/page.tsx
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
);
}
diff --git a/apps/web/components/layout/auth.tsx b/apps/web/components/layout/auth.tsx
new file mode 100644
index 0000000..ba00bb5
--- /dev/null
+++ b/apps/web/components/layout/auth.tsx
@@ -0,0 +1,9 @@
+export function Auth() {
+ return (
+
+ );
+}
diff --git a/apps/web/components/layout/index.ts b/apps/web/components/layout/index.ts
new file mode 100644
index 0000000..2569579
--- /dev/null
+++ b/apps/web/components/layout/index.ts
@@ -0,0 +1,2 @@
+export * from './auth';
+export * from './logo';
diff --git a/apps/web/components/layout/logo.tsx b/apps/web/components/layout/logo.tsx
new file mode 100644
index 0000000..f329ced
--- /dev/null
+++ b/apps/web/components/layout/logo.tsx
@@ -0,0 +1,6 @@
+import Image from 'next/image';
+import logo from 'public/assets/images/logo-primary.svg';
+
+export function Logo() {
+ return
;
+}
diff --git a/apps/web/constants/colors.ts b/apps/web/constants/colors.ts
new file mode 100644
index 0000000..eafd83e
--- /dev/null
+++ b/apps/web/constants/colors.ts
@@ -0,0 +1,11 @@
+export const COLORS_PROD = {
+ COLOR_DANGER: '#D10000',
+ COLOR_PRIMARY: '#1C01A9',
+ COLOR_SECONDARY: '#3A0185',
+ COLOR_TERTIARTY: '#580161',
+};
+export const COLORS_DEV = {
+ COLOR_PRIMARY: '#BF3676',
+ COLOR_SECONDARY: '#FD4047',
+ COLOR_TERTIARTY: '#FF9112',
+};
diff --git a/apps/web/package.json b/apps/web/package.json
index f8be6f2..fd4574a 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -12,7 +12,9 @@
"next": "^14",
"react": "^18",
"react-dom": "^18",
- "tsconfig": "*"
+ "tailwind-tints": "^1.1.0",
+ "tsconfig": "*",
+ "ui": "*"
},
"devDependencies": {
"@types/node": "^20",
diff --git a/apps/web/public/assets/images/logo-primary.svg b/apps/web/public/assets/images/logo-primary.svg
new file mode 100644
index 0000000..12a7540
--- /dev/null
+++ b/apps/web/public/assets/images/logo-primary.svg
@@ -0,0 +1,31 @@
+
\ No newline at end of file
diff --git a/apps/web/public/next.svg b/apps/web/public/next.svg
deleted file mode 100644
index 5174b28..0000000
--- a/apps/web/public/next.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/apps/web/public/vercel.svg b/apps/web/public/vercel.svg
deleted file mode 100644
index d2f8422..0000000
--- a/apps/web/public/vercel.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/apps/web/tailwind.config.ts b/apps/web/tailwind.config.ts
index c7ead80..9e96cae 100644
--- a/apps/web/tailwind.config.ts
+++ b/apps/web/tailwind.config.ts
@@ -1,20 +1,30 @@
-import type { Config } from 'tailwindcss'
+import { COLORS_PROD } from './constants/colors';
+import tailwindTints from 'tailwind-tints';
+import type { Config } from 'tailwindcss';
+
+const tints = tailwindTints({
+ primary: COLORS_PROD.COLOR_PRIMARY,
+ secondary: COLORS_PROD.COLOR_SECONDARY,
+ tertiarty: COLORS_PROD.COLOR_TERTIARTY,
+ danger: COLORS_PROD.COLOR_DANGER,
+});
const config: Config = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
+ '../../packages/ui/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
- extend: {
- backgroundImage: {
- 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
- 'gradient-conic':
- 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
- },
- },
+ // extend: {
+ // colors: {
+ // primary: COLORS_PROD.COLOR_PRIMARY,
+ // secondary: COLORS_PROD.COLOR_SECONDARY,
+ // tertiarty: COLORS_PROD.COLOR_TERTIARTY,
+ // },
+ // },
},
- plugins: [],
-}
-export default config
+ plugins: [tints],
+};
+export default config;
diff --git a/packages/ui/.eslintrc.js b/packages/ui/.eslintrc.js
index 8b2a762..6537119 100644
--- a/packages/ui/.eslintrc.js
+++ b/packages/ui/.eslintrc.js
@@ -5,4 +5,9 @@ module.exports = createConfig('react-typescript', {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
+ rules: {
+ 'react/forbid-component-props': 'off',
+ 'import/no-duplicates': 'off',
+ },
+ ignorePatterns: ['*.config.js', '.eslintrc.js'],
});
diff --git a/packages/ui/background.tsx b/packages/ui/background.tsx
new file mode 100644
index 0000000..8360d07
--- /dev/null
+++ b/packages/ui/background.tsx
@@ -0,0 +1,5 @@
+import type { PropsWithChildren } from 'react';
+
+export function Background({ children }: PropsWithChildren) {
+ return
{children}
;
+}
diff --git a/packages/ui/button.tsx b/packages/ui/button.tsx
new file mode 100644
index 0000000..4632515
--- /dev/null
+++ b/packages/ui/button.tsx
@@ -0,0 +1,25 @@
+import { cn } from './utils';
+import type { VariantProps } from 'class-variance-authority';
+import { cva } from 'class-variance-authority';
+import type { ButtonHTMLAttributes } from 'react';
+import { forwardRef } from 'react';
+
+const variants = cva('rounded-sm px-5 py-2.5 text-sm font-medium text-white', {
+ defaultVariants: {
+ color: 'default',
+ },
+ variants: {
+ color: {
+ danger: 'bg-danger hover:bg-danger-700',
+ default: 'bg-primary hover:bg-primary-700',
+ },
+ },
+});
+
+export type ButtonProps = ButtonHTMLAttributes
& VariantProps;
+
+export const Button = forwardRef(
+ ({ className, color, ...props }, ref) => (
+
+ )
+);
diff --git a/packages/ui/card.tsx b/packages/ui/card.tsx
deleted file mode 100644
index e6551f3..0000000
--- a/packages/ui/card.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import * as React from "react";
-
-export function Card({
- className,
- title,
- children,
- href,
-}: {
- className?: string;
- title: string;
- children: React.ReactNode;
- href: string;
-}): JSX.Element {
- return (
-
-
- {title} ->
-
- {children}
-
- );
-}
diff --git a/packages/ui/content.tsx b/packages/ui/content.tsx
new file mode 100644
index 0000000..a1f2ee0
--- /dev/null
+++ b/packages/ui/content.tsx
@@ -0,0 +1,5 @@
+import type { PropsWithChildren } from 'react';
+
+export function Content({ children }: PropsWithChildren) {
+ return {children}
;
+}
diff --git a/packages/ui/header.tsx b/packages/ui/header.tsx
new file mode 100644
index 0000000..0ad249e
--- /dev/null
+++ b/packages/ui/header.tsx
@@ -0,0 +1,13 @@
+import * as React from 'react';
+
+type Props = {
+ readonly children?: React.ReactNode;
+};
+
+export function Header({ children }: Props) {
+ return (
+
+ );
+}
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index 926b151..3ed7db1 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -1,2 +1,5 @@
-// component exports
-export { Card } from "./card";
+export * from './background';
+export * from './button';
+export * from './content';
+export * from './header'
+export * from './input'
\ No newline at end of file
diff --git a/packages/ui/input.tsx b/packages/ui/input.tsx
new file mode 100644
index 0000000..c743ddd
--- /dev/null
+++ b/packages/ui/input.tsx
@@ -0,0 +1,29 @@
+import { cn } from './utils';
+import type { VariantProps } from 'class-variance-authority';
+import { cva } from 'class-variance-authority';
+import { forwardRef } from 'react';
+
+const variants = cva(
+ 'block w-full rounded-sm border border-gray-300 p-2 text-sm text-gray-900 outline-none transition-all ease-linear hover:border-primary-500 hover:transition-all focus:border-primary-500 focus:transition-all'
+);
+
+export type InputProps = React.InputHTMLAttributes &
+ VariantProps;
+
+export const Input = forwardRef(({ className, ...props }, ref) => (
+
+
+
+
+));
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 34928c7..ebaa1ef 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -14,7 +14,10 @@
"@types/react": "^18.2.34",
"@types/react-dom": "^18.2.14",
"@vchikalkin/eslint-config-awesome": "^1.1.5",
+ "class-variance-authority": "^0.7.0",
+ "clsx": "^2.0.0",
"react": "^18.2.0",
+ "tailwind-merge": "^2.0.0",
"tsconfig": "*",
"typescript": "^5.2.2"
}
diff --git a/packages/ui/turbo/generators/templates/component.hbs b/packages/ui/turbo/generators/templates/component.hbs
index cf7b636..391a742 100644
--- a/packages/ui/turbo/generators/templates/component.hbs
+++ b/packages/ui/turbo/generators/templates/component.hbs
@@ -6,9 +6,8 @@ interface Props {
export const {{ pascalCase name }} = ({ children }: Props) => {
return (
-
-
{{ name }}
+ <{{ name }}>
{children}
-
+ {{ name }}>
);
};
diff --git a/packages/ui/utils.ts b/packages/ui/utils.ts
new file mode 100644
index 0000000..91bbff2
--- /dev/null
+++ b/packages/ui/utils.ts
@@ -0,0 +1,4 @@
+import { type ClassValue, clsx } from 'clsx';
+import { twMerge } from 'tailwind-merge';
+
+export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
diff --git a/yarn.lock b/yarn.lock
index 767a2cf..8b3da1c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -208,7 +208,7 @@
core-js-pure "^3.30.2"
regenerator-runtime "^0.14.0"
-"@babel/runtime@^7.23.2":
+"@babel/runtime@^7.23.1", "@babel/runtime@^7.23.2":
version "7.23.2"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885"
integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==
@@ -1557,6 +1557,13 @@ ci-info@^3.8.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==
+class-variance-authority@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/class-variance-authority/-/class-variance-authority-0.7.0.tgz#1c3134d634d80271b1837452b06d821915954522"
+ integrity sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==
+ dependencies:
+ clsx "2.0.0"
+
clean-regexp@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clean-regexp/-/clean-regexp-1.0.0.tgz#8df7c7aae51fd36874e8f8d05b9180bc11a3fed7"
@@ -1611,6 +1618,11 @@ clone@^1.0.2:
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==
+clsx@2.0.0, clsx@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b"
+ integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==
+
color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
@@ -5302,6 +5314,18 @@ synckit@^0.8.5:
"@pkgr/utils" "^2.3.1"
tslib "^2.5.0"
+tailwind-merge@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/tailwind-merge/-/tailwind-merge-2.0.0.tgz#a0f3a8c874ebae5feec5595614d08245a5f88a39"
+ integrity sha512-WO8qghn9yhsldLSg80au+3/gY9E4hFxIvQ3qOmlpXnqpDKoMruKfi/56BbbMg6fHTQJ9QD3cc79PoWqlaQE4rw==
+ dependencies:
+ "@babel/runtime" "^7.23.1"
+
+tailwind-tints@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/tailwind-tints/-/tailwind-tints-1.1.0.tgz#38d6d8a850738d0ee869a3b1101bf740281f4a60"
+ integrity sha512-05Dlsz765xP8xqCqDZGToRDcdJupXPkTQgUtNqGoNwQr3Ibiioy1IF2NIEhzso2uy4YrCHWx24caUXh6aCd5tw==
+
tailwindcss@^3.3.5:
version "3.3.5"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.3.5.tgz#22a59e2fbe0ecb6660809d9cc5f3976b077be3b8"