diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..2a70607 Binary files /dev/null and b/.DS_Store differ diff --git a/compass/app/auth/forgot_password/page.tsx b/compass/app/auth/forgot_password/page.tsx new file mode 100644 index 0000000..c8493b0 --- /dev/null +++ b/compass/app/auth/forgot_password/page.tsx @@ -0,0 +1,57 @@ +// pages/forgot-password.tsx +"use client"; + +import React, { useState } from 'react'; +import Input from '@/components/Input'; +import Button from '@/components/Button'; +import InlineLink from '@/components/InlineLink'; +import ErrorBanner from '@/components/auth/ErrorBanner'; + + +export default function ForgotPasswordPage() { + const [confirmEmail, setConfirmEmail] = useState(""); + const [emailError, setEmailError] = useState(null); + + + function isValidEmail(email: string): boolean { + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (email.trim() === '') { + setEmailError('Email cannot be empty'); + return false; + } else if (!emailRegex.test(email)) { + setEmailError('Invalid email format'); + return false; + } + return true; // No error + } + const handleClick = (event: React.MouseEvent) => { + isValidEmail(confirmEmail); + event.preventDefault(); + } + + return ( + <> +

Forgot Password

+
+ setConfirmEmail(e.target.value)} + /> +
+ {emailError && } +
+ + Back to Sign In + + +
+ + + ); +} diff --git a/compass/app/auth/layout.tsx b/compass/app/auth/layout.tsx new file mode 100644 index 0000000..1181fe6 --- /dev/null +++ b/compass/app/auth/layout.tsx @@ -0,0 +1,22 @@ + +import Paper from '@/components/auth/Paper'; + + +export default function RootLayout({ + // Layouts must accept a children prop. + // This will be populated with nested layouts or pages + children, +}: { + children: React.ReactNode +}) { + return ( + +
+ {children} +
+

+ © 2024 Compass Center +

+
+ ) +} \ No newline at end of file diff --git a/compass/app/auth/login/page.tsx b/compass/app/auth/login/page.tsx new file mode 100644 index 0000000..ccb8b2c --- /dev/null +++ b/compass/app/auth/login/page.tsx @@ -0,0 +1,81 @@ +// pages/index.tsx +"use client"; + +import Button from '@/components/Button'; +import Input from '@/components/Input' +import InlineLink from '@/components/InlineLink'; +import Image from 'next/image'; +import { useState } from "react"; +import PasswordInput from '@/components/auth/PasswordInput'; +import ErrorBanner from '@/components/auth/ErrorBanner'; + +export default function Page() { + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [emailError, setEmailError] = useState(""); + const [passwordError, setPasswordError] = useState(""); + + const handleEmailChange = (event: React.ChangeEvent) => { + setEmail(event.currentTarget.value); + } + + const handlePasswordChange = (event: React.ChangeEvent) => { + setPassword(event.currentTarget.value); + } + + const handleClick = (event: React.MouseEvent) => { + // Priority: Incorrect combo > Missing email > Missing password + + if (password.trim().length === 0) { + setEmailError("Please enter your password.") + event.preventDefault(); + } + // This shouldn't happen, already provides validation, but just in case. + if (email.trim().length === 0) { + setPasswordError("Please enter your email.") + event.preventDefault(); + } + // Placeholder for incorrect email + password combo. + if (email === "incorrect@gmail.com" && password) { + setPasswordError("Incorrect password.") + event.preventDefault(); + } + } + + return ( + <> + Compass Center logo. + +

Login

+ +
+ + +
+ {emailError && } + +
+ + +
+ {passwordError && } + +
+ + Forgot password? + + +
+ + + + ); +}; + diff --git a/compass/app/auth/new_password/page.tsx b/compass/app/auth/new_password/page.tsx new file mode 100644 index 0000000..1d9ca52 --- /dev/null +++ b/compass/app/auth/new_password/page.tsx @@ -0,0 +1,62 @@ +// pages/index.tsx +"use client"; +import { useState, useEffect } from 'react'; +import Button from '@/components/Button'; +import PasswordInput from '@/components/auth/PasswordInput'; +import ErrorBanner from '@/components/auth/ErrorBanner'; + + +function isStrongPassword(password: string): boolean { + const strongPasswordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*]).{8,}$/; + return strongPasswordRegex.test(password); +} + + +export default function Page() { + const [newPassword, setNewPassword] = useState(''); + const [confirmPassword, setConfirmPassword] = useState(''); + const [isButtonDisabled, setIsButtonDisabled] = useState(true); + + useEffect(() => { + setIsButtonDisabled(newPassword === '' || confirmPassword === '' || newPassword !== confirmPassword|| !isStrongPassword(newPassword)); + }, [newPassword, confirmPassword]); + + + return ( + <> +
+

New Password

+
+
+ { + setNewPassword(e.target.value); + }} + /> +
+ {isStrongPassword(newPassword) || newPassword === '' ? null : } +
+ { + setConfirmPassword(e.target.value); + }} + /> +
+ {newPassword === confirmPassword || confirmPassword === '' ? null : } +
+ +
+ + ); +} + + + diff --git a/compass/app/layout.tsx b/compass/app/layout.tsx index fb5b7a2..e9ef9ca 100644 --- a/compass/app/layout.tsx +++ b/compass/app/layout.tsx @@ -1,9 +1,5 @@ import '../styles/globals.css'; -import { Metadata } from 'next' - -export const metadata: Metadata = { - title: 'Login', -} + export default function RootLayout({ // Layouts must accept a children prop. diff --git a/compass/app/page.tsx b/compass/app/page.tsx index db5c62b..dba820a 100644 --- a/compass/app/page.tsx +++ b/compass/app/page.tsx @@ -1,41 +1,86 @@ -// pages/index.tsx - -import Button from '@/components/Button'; -import Input from '@/components/Input' -import InlineLink from '@/components/InlineLink'; -import Paper from '@/components/auth/Paper'; -import { Metadata } from 'next' - -export const metadata: Metadata = { - title: 'Login', -} - -export default function Page() { - return ( - <> - -
-
- -
-
- -
-
- - Forgot password? - - - -
-
-

- © 2024 Compass Center -

-
- - ); -}; - +// pages/index.tsx +"use client"; + +import Button from '@/components/Button'; +import Input from '@/components/Input' +import InlineLink from '@/components/InlineLink'; +import Paper from '@/components/auth/Paper'; +// import { Metadata } from 'next' +import Image from 'next/image'; +import {ChangeEvent, useState} from "react"; + +// export const metadata: Metadata = { +// title: 'Login', +// } + +export default function Page() { + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [error, setError] = useState(""); + + const handleEmailChange = (event: React.ChangeEvent) => { + setEmail(event.currentTarget.value); + console.log("email " + email); + } + + const handlePasswordChange = (event: React.ChangeEvent) => { + setPassword(event.currentTarget.value); + console.log("password " + password) + } + + const handleClick = (event: React.MouseEvent) => { + event.preventDefault(); + // Priority: Incorrect combo > Missing email > Missing password + + if (password.trim().length === 0) { + setError("Please enter your password.") + } + // This shouldn't happen, already provides validation, but just in case. + if (email.trim().length === 0) { + setError("Please enter your email.") + } + // Placeholder for incorrect email + password combo. + if (email === "incorrect@gmail.com" && password) { + setError("Incorrect password.") + } + } + + + + return ( + <> + +
+ Compass Center logo. +

Login

+
+ +
+
+ +
+
+ + Forgot password? + + + + +
+
+

+ © 2024 Compass Center +

+
+ + ); +}; \ No newline at end of file diff --git a/compass/app/resource/layout.tsx b/compass/app/resource/layout.tsx new file mode 100644 index 0000000..bb7fddd --- /dev/null +++ b/compass/app/resource/layout.tsx @@ -0,0 +1,37 @@ +"use client" + +import Sidebar from '@/components/resource/Sidebar'; +import React, { useState } from 'react'; +import { ChevronDoubleRightIcon } from '@heroicons/react/24/outline'; + +export default function RootLayout({ + + children, +}: { + children: React.ReactNode +}) { + const [isSidebarOpen, setIsSidebarOpen] = useState(false); + + return ( +
+ {/* button to open sidebar */} + + {/* sidebar */} +
+ +
+ {/* page ui */} +
+ {children} +
+
+ ) +} \ No newline at end of file diff --git a/compass/app/resource/page.tsx b/compass/app/resource/page.tsx new file mode 100644 index 0000000..ca68cdb --- /dev/null +++ b/compass/app/resource/page.tsx @@ -0,0 +1,39 @@ +"use client" +import Callout from "@/components/resource/Callout"; +import Card from "@/components/resource/Card"; +import { LandingSearchBar } from "@/components/resource/LandingSearchBar"; +import { BookOpenIcon, BookmarkIcon, ClipboardIcon } from "@heroicons/react/24/solid"; +import Image from 'next/image'; + +export default function Page() { + return ( +
+ {/* icon + title */} +
+
+ Compass Center logo. +

Compass Center Advocate Landing Page

+
+ + Welcome! Below you will find a list of resources for the Compass Center's trained advocates. These materials serve to virtually provide a collection of advocacy, resource, and hotline manuals and information. + If you are an advocate looking for the contact information of a particular Compass Center employee, please directly contact your staff back-up or the person in charge of your training. + +
+
+ {/* link to different pages */} +
+ } text="Resources" /> + } text="Services" /> + } text="Training Manuals" /> +
+ {/* search bar */} + +
+
+ ) +} diff --git a/compass/components/Button.tsx b/compass/components/Button.tsx index 85291ac..0ebfe6c 100644 --- a/compass/components/Button.tsx +++ b/compass/components/Button.tsx @@ -1,23 +1,26 @@ -import { FunctionComponent, ReactNode } from 'react'; - -type ButtonProps = { - children: ReactNode; - onClick?: () => void; // make the onClick handler optional -}; - -const Button: FunctionComponent = ({ children, onClick }) => { - return ( - - ); -}; -export default Button; +import { FunctionComponent, ReactNode } from 'react'; + +type ButtonProps = { + children: ReactNode; + onClick?: (event: React.MouseEvent) => void; + type?: "button" | "submit" | "reset"; // specify possible values for type + disabled?: boolean; +}; + + +const Button: FunctionComponent = ({ children, type, disabled, onClick}) => { + const buttonClassName = `inline-block rounded border ${disabled ? 'bg-gray-400 text-gray-600 cursor-not-allowed' : 'border-purple-600 bg-purple-600 text-white hover:bg-transparent hover:text-purple-600 focus:outline-none focus:ring active:text-purple-500'} px-4 py-1 text-md font-semibold w-20 h-10 text-center`; + + return ( + + ); +}; + +export default Button; diff --git a/compass/components/InlineLink.tsx b/compass/components/InlineLink.tsx index 743be3a..f2e45ef 100644 --- a/compass/components/InlineLink.tsx +++ b/compass/components/InlineLink.tsx @@ -1,16 +1,16 @@ -import React, { ReactNode } from 'react'; - -interface Link { - href?: string; - children: ReactNode; -} - -const InlineLink: React.FC = ({href = '#', children}) => { - return ( - - {children} - - ) -} - +import React, { ReactNode } from 'react'; + +interface Link { + href?: string; + children: ReactNode; +} + +const InlineLink: React.FC = ({href = '#', children}) => { + return ( + + {children} + + ) +} + export default InlineLink; \ No newline at end of file diff --git a/compass/components/Input.tsx b/compass/components/Input.tsx index a69a7a4..b8eff67 100644 --- a/compass/components/Input.tsx +++ b/compass/components/Input.tsx @@ -1,41 +1,36 @@ -import { Icons } from '@/utils/constants'; -import React, { FunctionComponent, InputHTMLAttributes, ReactElement, ReactNode } from 'react'; +import React, { FunctionComponent, InputHTMLAttributes, ReactNode, ChangeEvent } from 'react'; type InputProps = InputHTMLAttributes & { - iconKey?: keyof typeof Icons; // Use keyof typeof to ensure the key exists in Icons - title?: string; // Assuming title is always a string - type?: string; - placeholder?: string; + icon?: ReactNode; + title?: ReactNode; + type?:ReactNode; + placeholder?:ReactNode + valid?:boolean; + onChange: (event: ChangeEvent) => void; }; -const Input: FunctionComponent = ({ iconKey, type, title, placeholder, ...rest }) => { - const IconComponent = iconKey ? Icons[iconKey] : null; - +const Input: FunctionComponent = ({ icon, type, title, placeholder, onChange, valid = true, ...rest }) => { return ( -
- {title && ( -
- -
- )} -
- {IconComponent && ( - - - - )} - -
-
+
+ +
); }; diff --git a/compass/components/auth/ErrorBanner.tsx b/compass/components/auth/ErrorBanner.tsx new file mode 100644 index 0000000..c7dfea3 --- /dev/null +++ b/compass/components/auth/ErrorBanner.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + +interface ErrorBannerProps { + heading: string; + description?: string | null; +} + +const ErrorBanner: React.FC = ({ heading, description = null }) => { + return ( +
+ {heading} + {description &&

+ {description} +

} +
+ ); +}; + +export default ErrorBanner; diff --git a/compass/components/auth/Paper.tsx b/compass/components/auth/Paper.tsx index d793775..de9d4b3 100644 --- a/compass/components/auth/Paper.tsx +++ b/compass/components/auth/Paper.tsx @@ -1,15 +1,15 @@ -import React, { ReactNode } from 'react'; - -interface PageInterface { - children: ReactNode; -} - -const Paper: React.FC = ({ children }) => { - return ( -
- {children} -
- ); -}; - +import React, { ReactNode } from 'react'; + +interface PageInterface { + children: ReactNode; +} + +const Paper: React.FC = ({ children }) => { + return ( +
+ {children} +
+ ); +}; + export default Paper; \ No newline at end of file diff --git a/compass/components/auth/PasswordInput.tsx b/compass/components/auth/PasswordInput.tsx new file mode 100644 index 0000000..c7f3b70 --- /dev/null +++ b/compass/components/auth/PasswordInput.tsx @@ -0,0 +1,35 @@ +import React, { useState, FunctionComponent, ChangeEvent, ReactNode } from 'react'; +import Input from '../Input'; // Adjust the import path as necessary +import { Icons } from '@/utils/constants'; + +type PasswordInputProps = { + title?: ReactNode; // Assuming you might want to reuse title, placeholder etc. + placeholder?: ReactNode; + valid?: boolean; + onChange: (event: ChangeEvent) => void; +}; + +const PasswordInput: FunctionComponent = ({ onChange, valid = true, ...rest }) => { + const [visible, setVisible] = useState(false); + + const toggleVisibility = () => { + setVisible(!visible); + }; + + const PasswordIcon = visible ? Icons['HidePasswordIcon'] : Icons['UnhidePasswordIcon']; + + // Render the Input component and pass the PasswordIcon as an icon prop + return ( + + } + /> + ); +}; + +export default PasswordInput; diff --git a/compass/components/resource/Callout.tsx b/compass/components/resource/Callout.tsx new file mode 100644 index 0000000..c51f3f2 --- /dev/null +++ b/compass/components/resource/Callout.tsx @@ -0,0 +1,15 @@ +import { ReactNode } from "react"; + +interface CalloutProps { + children: ReactNode; +} + +const Callout = ({ children }: CalloutProps) => { + return ( +
+ {children} +
+ ); +}; + +export default Callout; \ No newline at end of file diff --git a/compass/components/resource/Card.tsx b/compass/components/resource/Card.tsx new file mode 100644 index 0000000..140542b --- /dev/null +++ b/compass/components/resource/Card.tsx @@ -0,0 +1,20 @@ +import React, { ReactNode } from "react"; + + +interface TagProps { + text: string; + icon: React.ReactNode; +} + +const Card: React.FC = ({ text, icon }) => { + return ( +
+ + {icon} + + {text} +
+ ); +}; + +export default Card; \ No newline at end of file diff --git a/compass/components/resource/LandingSearchBar.tsx b/compass/components/resource/LandingSearchBar.tsx new file mode 100644 index 0000000..f52b6ba --- /dev/null +++ b/compass/components/resource/LandingSearchBar.tsx @@ -0,0 +1,48 @@ +import { MagnifyingGlassIcon, XMarkIcon } from "@heroicons/react/24/solid" +import React, { useState } from 'react'; +import Image from 'next/image'; + +export const LandingSearchBar: React.FC = () => { + const [searchTerm, setSearchTerm] = useState(''); + + const handleSearchChange = (event: React.ChangeEvent) => { + setSearchTerm(event.target.value); + }; + + const clearSearch = () => { + setSearchTerm(''); + }; + + return ( +
+ {/* searchbar */} +
+
+ +
+ {/* input */} + {searchTerm && ( + + )} +
+
+
+ {/* search results, for now since it's empty this is the default screen */} +
+ Landing illustration +

Need to find something? Use the links or the search bar above to get your results.

+
+
+ ); +}; diff --git a/compass/components/resource/Sidebar.tsx b/compass/components/resource/Sidebar.tsx new file mode 100644 index 0000000..97e59d4 --- /dev/null +++ b/compass/components/resource/Sidebar.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { HomeIcon, ChevronDoubleLeftIcon, BookmarkIcon, ClipboardIcon, BookOpenIcon } from '@heroicons/react/24/solid'; +import { SidebarItem } from './SidebarItem'; +import { UserProfile } from './UserProfile'; + +interface SidebarProps { + setIsSidebarOpen: React.Dispatch>; +} + +const Sidebar: React.FC = ({ setIsSidebarOpen }) => { + return ( +
+ {/* button to close sidebar */} +
+ +
+
+ + {/* user + logout button */} +
+ + +
+ {/* navigation menu */} +
+

Pages

+ +
+
+
+ ); +}; + + +export default Sidebar; \ No newline at end of file diff --git a/compass/components/resource/SidebarItem.tsx b/compass/components/resource/SidebarItem.tsx new file mode 100644 index 0000000..db7a4db --- /dev/null +++ b/compass/components/resource/SidebarItem.tsx @@ -0,0 +1,16 @@ + +interface SidebarItemProps { + icon: React.ReactElement; + text: string; +} + +export const SidebarItem: React.FC = ({ icon, text }) => { + return ( + + + {icon} + + {text} + + ); +}; \ No newline at end of file diff --git a/compass/components/resource/UserProfile.tsx b/compass/components/resource/UserProfile.tsx new file mode 100644 index 0000000..0471596 --- /dev/null +++ b/compass/components/resource/UserProfile.tsx @@ -0,0 +1,11 @@ +export const UserProfile = () => { + return ( +
+
+ Compass Center + cssgunc@gmail.com +
+ +
+ ) +} \ No newline at end of file diff --git a/compass/next.config.js b/compass/next.config.js index ab026d0..9fff58d 100644 --- a/compass/next.config.js +++ b/compass/next.config.js @@ -1,4 +1,8 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = {} - -module.exports = nextConfig +/** @type {import('next').NextConfig} */ +const nextConfig = { + images: { + domains: ['notioly.com'] + }, +} + +module.exports = nextConfig diff --git a/compass/public/landing_illustration.png b/compass/public/landing_illustration.png new file mode 100644 index 0000000..ac853ce Binary files /dev/null and b/compass/public/landing_illustration.png differ diff --git a/compass/public/logo.png b/compass/public/logo.png new file mode 100644 index 0000000..6ab7af4 Binary files /dev/null and b/compass/public/logo.png differ diff --git a/compass/styles/globals.css b/compass/styles/globals.css index 76ad52b..9fb976a 100644 --- a/compass/styles/globals.css +++ b/compass/styles/globals.css @@ -1,47 +1,96 @@ -/* globals.css */ -@import 'tailwindcss/base'; -@import 'tailwindcss/components'; -@import 'tailwindcss/utilities'; - - -:root { - /* Colors */ - --ring-color: 199, 21, 133; - /* This is the RGB value for a purple color */ - --ring-opacity: 0.5; - - /* Shadows */ - --shadow-default: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); - --shadow-focus: 0 0 0 3px rgba(66, 153, 225, 0.5); - - /* Borders */ - --border-radius: 0.375rem; - /* 6px */ - --border-width: 1px; - - /* Spacing */ - --spacing-px: 1px; - --spacing-2: 0.5rem; - /* 8px */ - --spacing-3: 0.75rem; - /* 12px */ - - /* Font */ - --font-color: #4a5568; - /* A shade of gray */ -} - - -@font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 400; - src: url('/fonts/Inter-Regular.ttf') format('ttf'), - url('/fonts/Inter-Bold.ttf') format('ttf'), - url('/fonts/Inter-Black.ttf') format('ttf'), - url('/fonts/Inter-ExtraBold.ttf') format('ttf'), - url('/fonts/Inter-ExtraLight.ttf') format('ttf'), - url('/fonts/Inter-Medium.ttf') format('ttf'), - url('/fonts/Inter-SemiBold.ttf') format('ttf'), - url('/fonts/Inter-Thin.ttf') format('ttf'); - } \ No newline at end of file +/* globals.css */ +@import 'tailwindcss/base'; +@import 'tailwindcss/components'; +@import 'tailwindcss/utilities'; + + +:root { + /* Colors */ + --ring-color: 199, 21, 133; + /* This is the RGB value for a purple color */ + --ring-opacity: 0.5; + + /* Shadows */ + --shadow-default: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + --shadow-focus: 0 0 0 3px rgba(66, 153, 225, 0.5); + + /* Borders */ + --border-radius: 0.375rem; + /* 6px */ + --border-width: 1px; + + /* Spacing */ + --spacing-px: 1px; + --spacing-2: 0.5rem; + /* 8px */ + --spacing-3: 0.75rem; + /* 12px */ + + /* Font */ + --font-color: #4a5568; + /* A shade of gray */ +} + + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + src: url('/fonts/Inter-Regular.ttf') format('truetype'); +} + +/* Inter-Bold */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + src: url('/fonts/Inter-Bold.ttf') format('truetype'); +} + +/* Inter-Black */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 900; + src: url('/fonts/Inter-Black.ttf') format('truetype'); +} + +/* Inter-ExtraBold */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + src: url('/fonts/Inter-ExtraBold.ttf') format('truetype'); +} + +/* Inter-ExtraLight */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 200; + src: url('/fonts/Inter-ExtraLight.ttf') format('truetype'); +} + +/* Inter-Medium */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + src: url('/fonts/Inter-Medium.ttf') format('truetype'); +} + +/* Inter-SemiBold */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + src: url('/fonts/Inter-SemiBold.ttf') format('truetype'); +} + +/* Inter-Thin */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 100; + src: url('/fonts/Inter-Thin.ttf') format('truetype'); +} \ No newline at end of file diff --git a/compass/tailwind.config.ts b/compass/tailwind.config.ts index d59e2d6..d0ea17c 100644 --- a/compass/tailwind.config.ts +++ b/compass/tailwind.config.ts @@ -1,23 +1,26 @@ -import type { Config } from 'tailwindcss'; - -const config: Config = { - content: [ - './pages/**/*.{js,ts,jsx,tsx,mdx}', - './components/**/*.{js,ts,jsx,tsx,mdx}', - './app/**/*.{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))', - }, - fontFamily: { - sans: ['Inter', 'sans-serif'], - }, - }, - }, - plugins: [], -}; - -export default config; +import type { Config } from 'tailwindcss'; + +const config: Config = { + content: [ + './pages/**/*.{js,ts,jsx,tsx,mdx}', + './components/**/*.{js,ts,jsx,tsx,mdx}', + './app/**/*.{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))', + }, + fontFamily: { + 'sans': ['Inter', 'sans-serif'], // Add 'Inter' to the fontFamily theme + }, + fontWeight: { + 'medium': 500, // Ensure medium is correctly set to 500 + } + }, + }, + plugins: [], +}; + +export default config; diff --git a/compass/tsconfig.json b/compass/tsconfig.json index a4fdc91..1acc222 100644 --- a/compass/tsconfig.json +++ b/compass/tsconfig.json @@ -1,27 +1,27 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/compass/utils/classes/InputProps.ts b/compass/utils/classes/InputProps.ts new file mode 100644 index 0000000..2354d62 --- /dev/null +++ b/compass/utils/classes/InputProps.ts @@ -0,0 +1,9 @@ +import { InputHTMLAttributes } from "react"; +import { Icons } from "../constants"; + +export type InputProps = InputHTMLAttributes & { + iconKey?: keyof typeof Icons; // Use keyof typeof to ensure the key exists in Icons + title?: string; // Assuming title is always a string + type?: string; + placeholder?: string; + }; \ No newline at end of file