Login and dashboard added
This commit is contained in:
41
.gitignore
vendored
Normal file
41
.gitignore
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
/.pnp
|
||||||
|
.pnp.*
|
||||||
|
.yarn/*
|
||||||
|
!.yarn/patches
|
||||||
|
!.yarn/plugins
|
||||||
|
!.yarn/releases
|
||||||
|
!.yarn/versions
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# next.js
|
||||||
|
/.next/
|
||||||
|
/out/
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
*.pem
|
||||||
|
|
||||||
|
# debug
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# env files (can opt-in for committing if needed)
|
||||||
|
.env*
|
||||||
|
|
||||||
|
# vercel
|
||||||
|
.vercel
|
||||||
|
|
||||||
|
# typescript
|
||||||
|
*.tsbuildinfo
|
||||||
|
next-env.d.ts
|
||||||
5
AGENTS.md
Normal file
5
AGENTS.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<!-- BEGIN:nextjs-agent-rules -->
|
||||||
|
# This is NOT the Next.js you know
|
||||||
|
|
||||||
|
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
|
||||||
|
<!-- END:nextjs-agent-rules -->
|
||||||
36
README.md
Normal file
36
README.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
First, run the development server:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
# or
|
||||||
|
yarn dev
|
||||||
|
# or
|
||||||
|
pnpm dev
|
||||||
|
# or
|
||||||
|
bun dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||||
|
|
||||||
|
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||||
|
|
||||||
|
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||||
|
|
||||||
|
## Learn More
|
||||||
|
|
||||||
|
To learn more about Next.js, take a look at the following resources:
|
||||||
|
|
||||||
|
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||||
|
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||||
|
|
||||||
|
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||||
|
|
||||||
|
## Deploy on Vercel
|
||||||
|
|
||||||
|
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||||
|
|
||||||
|
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
||||||
20
app/dashboard/page.tsx
Normal file
20
app/dashboard/page.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import Sidebar from "@/components/dashboard/sidebar";
|
||||||
|
|
||||||
|
|
||||||
|
export default function DashboardPage() {
|
||||||
|
return (
|
||||||
|
|
||||||
|
|
||||||
|
<main className="flex bg-[#091522]">
|
||||||
|
<Sidebar />
|
||||||
|
|
||||||
|
<div className="flex-1 p-10 text-white">
|
||||||
|
Main Content
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
BIN
app/favicon.ico
Normal file
BIN
app/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
26
app/globals.css
Normal file
26
app/globals.css
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
@import "tailwindcss";
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--background: #ffffff;
|
||||||
|
--foreground: #171717;
|
||||||
|
}
|
||||||
|
|
||||||
|
@theme inline {
|
||||||
|
--color-background: var(--background);
|
||||||
|
--color-foreground: var(--foreground);
|
||||||
|
--font-sans: var(--font-geist-sans);
|
||||||
|
--font-mono: var(--font-geist-mono);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--background: #0a0a0a;
|
||||||
|
--foreground: #ededed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--background);
|
||||||
|
color: var(--foreground);
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
18
app/layout.tsx
Normal file
18
app/layout.tsx
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
import "./globals.css";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default function RootLayout({
|
||||||
|
children,
|
||||||
|
}: Readonly<{
|
||||||
|
children: React.ReactNode;
|
||||||
|
}>) {
|
||||||
|
return (
|
||||||
|
<html
|
||||||
|
lang="en"
|
||||||
|
>
|
||||||
|
<body >{children}</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
|
}
|
||||||
15
app/login/page.tsx
Normal file
15
app/login/page.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
"use client";
|
||||||
|
import AuthLayout from "@/components/auth/authlayout";
|
||||||
|
import AuthCard from "@/components/auth/authCard";
|
||||||
|
|
||||||
|
export default function LoginPage() {
|
||||||
|
return (
|
||||||
|
|
||||||
|
|
||||||
|
<AuthLayout>
|
||||||
|
<AuthCard />
|
||||||
|
</AuthLayout>
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
7
app/page.tsx
Normal file
7
app/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import Image from "next/image";
|
||||||
|
|
||||||
|
export default function Home() {
|
||||||
|
return (
|
||||||
|
<div>heelo</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
32
components/auth/authCard.tsx
Normal file
32
components/auth/authCard.tsx
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { useState } from "react";
|
||||||
|
import LoginForm from "./loginForm";
|
||||||
|
import VerifyCode from "./verifyCode";
|
||||||
|
import ForgotPassword from "./forgetPassword";
|
||||||
|
import {Step} from "@/constants/types"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default function AuthCard() {
|
||||||
|
const [step, setStep] = useState<Step>("login");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{step === "login" && (
|
||||||
|
<LoginForm
|
||||||
|
onSuccess={() => setStep("verify")}
|
||||||
|
onForgotPassword={() => setStep("forgot")}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{step === "verify" && (
|
||||||
|
<VerifyCode onBack={() => setStep("login")} />
|
||||||
|
)}
|
||||||
|
|
||||||
|
{step === "forgot" && (
|
||||||
|
<ForgotPassword onBack={() => setStep("login")} />
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
16
components/auth/authlayout.tsx
Normal file
16
components/auth/authlayout.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import LeftPanel from "./leftpanel";
|
||||||
|
|
||||||
|
interface AuthLayoutProps {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function AuthLayout({ children }: AuthLayoutProps) {
|
||||||
|
return (
|
||||||
|
<main className="min-h-screen grid lg:grid-cols-2 bg-[#081321]">
|
||||||
|
<LeftPanel />
|
||||||
|
<div className="flex items-center justify-center p-8">
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
39
components/auth/forgetPassword.tsx
Normal file
39
components/auth/forgetPassword.tsx
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import FormInput from "@/utils/formInput";
|
||||||
|
import Button from "@/utils/button";
|
||||||
|
|
||||||
|
|
||||||
|
import {Props} from "@/constants/types"
|
||||||
|
export default function ForgotPassword({ onBack }: Props) {
|
||||||
|
return (
|
||||||
|
<div className="space-y-4">
|
||||||
|
<button
|
||||||
|
onClick={onBack}
|
||||||
|
className="text-slate-400 hover:text-white"
|
||||||
|
>
|
||||||
|
← Back to sign in
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2 className="text-2xl font-bold text-white">
|
||||||
|
Reset your password
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p className="mt-3 text-slate-400">
|
||||||
|
Enter your work email and we'll send a secure
|
||||||
|
time-limited reset link.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Your email input */}
|
||||||
|
<FormInput
|
||||||
|
label="Email"
|
||||||
|
value="dhananjay@kafm.io"
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Send reset button */}
|
||||||
|
<Button className="h-10 w-full rounded-xl bg-gradient-to-r from-teal-400 to-emerald-400 font-semibold text-black">
|
||||||
|
Send reset link
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
83
components/auth/leftpanel.tsx
Normal file
83
components/auth/leftpanel.tsx
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
"use client";
|
||||||
|
import Badge from "@/utils/badge";
|
||||||
|
import Stat from "@/utils/statCard";
|
||||||
|
|
||||||
|
import { ShieldCheck, KeyRound, FileText } from "lucide-react";
|
||||||
|
|
||||||
|
export default function LeftPanel() {
|
||||||
|
return (
|
||||||
|
|
||||||
|
<div className="relative overflow-hidden border-r border-slate-800 bg-[#091523] hidden lg:block">
|
||||||
|
{/* Grid Background overlay */}
|
||||||
|
<div
|
||||||
|
className="absolute inset-0 opacity-10 pointer-events-none"
|
||||||
|
style={{
|
||||||
|
backgroundImage: `
|
||||||
|
linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
|
||||||
|
linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px)
|
||||||
|
`,
|
||||||
|
backgroundSize: "44px 44px",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className="relative flex h-full flex-col justify-between p-16 z-10">
|
||||||
|
<div>
|
||||||
|
{/* Logo Group */}
|
||||||
|
<div className="mb-20 flex items-center gap-3">
|
||||||
|
<div className="flex h-10 w-10 items-center justify-center rounded-lg bg-gradient-to-br from-teal-300 to-cyan-500 font-bold text-black shadow-md text-lg">
|
||||||
|
K
|
||||||
|
</div>
|
||||||
|
<h2 className="text-2xl font-bold tracking-wider text-white">
|
||||||
|
KAF<span className="text-teal-400">M</span>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Subtitle */}
|
||||||
|
<p className="mb-6 text-xs font-semibold uppercase tracking-[4px] text-teal-400/90">
|
||||||
|
Unified Facility Platform
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* Punchy Catchphrase */}
|
||||||
|
<h1 className="max-w-lg text-4xl font-bold tracking-tight text-white leading-[1]">
|
||||||
|
One platform.
|
||||||
|
<br />
|
||||||
|
Configure it.
|
||||||
|
<br />
|
||||||
|
Run it.
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
{/* Paragraph explanation */}
|
||||||
|
<p className="mt-6 max-w-md text-[16px] leading-relaxed text-slate-400">
|
||||||
|
Administer tenants, sites and access — then operate every
|
||||||
|
building from the same console. Multi-tenant, scoped to the site
|
||||||
|
in front of you.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* Badges Stack */}
|
||||||
|
<div className="mt-10 flex flex-col items-start gap-3">
|
||||||
|
<Badge icon={<ShieldCheck size={14} className="text-teal-400" />}>
|
||||||
|
MFA enforced
|
||||||
|
</Badge>
|
||||||
|
<Badge icon={<KeyRound size={14} className="text-teal-400" />}>
|
||||||
|
Encrypted in transit
|
||||||
|
</Badge>
|
||||||
|
<Badge icon={<FileText size={14} className="text-teal-400" />}>
|
||||||
|
Full audit trail
|
||||||
|
</Badge>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Global Statistics Footer */}
|
||||||
|
<div className=" flex gap-2 mt-10 text-slate-300 ">
|
||||||
|
<Stat number="4" label="TENANTS" />
|
||||||
|
<Stat number="8" label="MODULES" />
|
||||||
|
<Stat number="2" label="WORKSPACES" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
103
components/auth/loginForm.tsx
Normal file
103
components/auth/loginForm.tsx
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
import { Eye,EyeOff } from "lucide-react";
|
||||||
|
import FormInput from "@/utils/formInput";
|
||||||
|
import Button from "@/utils/button";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import {Props} from "@/constants/types"
|
||||||
|
|
||||||
|
|
||||||
|
export default function LoginForm({ onSuccess,onForgotPassword }: Props) {
|
||||||
|
const [showPassword, setShowPassword] = useState(false);
|
||||||
|
return (
|
||||||
|
|
||||||
|
<div className="w-full max-w-md space-y-3">
|
||||||
|
{/* Header text container */}
|
||||||
|
<div>
|
||||||
|
<h2 className="text-2xl font-bold tracking-tight text-white">
|
||||||
|
Sign in to your account
|
||||||
|
</h2>
|
||||||
|
<p className="mt-3 text-[15px] text-slate-400">
|
||||||
|
Use your registered work credentials.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Field Elements */}
|
||||||
|
<div className="space-y-2">
|
||||||
|
<FormInput
|
||||||
|
label="Email"
|
||||||
|
value="dhananjay@kafm.io"
|
||||||
|
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className="relative">
|
||||||
|
<FormInput
|
||||||
|
label="PASSWORD"
|
||||||
|
value=""
|
||||||
|
type={showPassword ? "text" : "password"}
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
|
className="absolute right-4 top-[40px] text-slate-500 hover:text-slate-300"
|
||||||
|
>
|
||||||
|
{showPassword ? <EyeOff size={18} /> : <Eye size={18} />}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Interactive options row */}
|
||||||
|
<div className="flex items-center justify-between text-sm">
|
||||||
|
<label className="flex cursor-pointer items-center gap-2.5 text-slate-300 select-none">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
defaultChecked
|
||||||
|
className="h-4 w-4 rounded border-slate-700 bg-slate-900 accent-teal-400 focus:ring-0 focus:ring-offset-0"
|
||||||
|
/>
|
||||||
|
Keep me signed in
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
|
||||||
|
onClick={onForgotPassword}
|
||||||
|
className="font-medium text-teal-400 transition hover:text-teal-300 bg-transparent border-0 p-0 cursor-pointer"
|
||||||
|
>
|
||||||
|
Forgot password?
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Actions / Submit Stack */}
|
||||||
|
<div className="space-y-4">
|
||||||
|
<Button
|
||||||
|
onClick={onSuccess}
|
||||||
|
className="h-10 w-full rounded-lg bg-gradient-to-r from-teal-400 to-emerald-400 font-semibold text-slate-950 shadow-md hover:opacity-95 transition"
|
||||||
|
>
|
||||||
|
Sign in
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
{/* Custom Visual Divider */}
|
||||||
|
<div className="flex items-center gap-4 py-2">
|
||||||
|
<div className="h-px flex-1 bg-slate-800" />
|
||||||
|
<span className="text-xs uppercase tracking-wider text-slate-600 font-medium">or</span>
|
||||||
|
<div className="h-px flex-1 bg-slate-800" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
className="h-10 w-full rounded-lg border border-slate-800 bg-[#122031] text-sm font-semibold text-white hover:bg-[#17293e] transition"
|
||||||
|
>
|
||||||
|
Sign in with SSO
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Bottom Legal Info */}
|
||||||
|
<p className="text-center text-xs tracking-wide text-slate-500 font-mono">
|
||||||
|
Protected by 2-factor auth • every sign-in is
|
||||||
|
<br/> audit-logged
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
32
components/auth/otpInput.tsx
Normal file
32
components/auth/otpInput.tsx
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { useRef } from "react";
|
||||||
|
|
||||||
|
export default function OTPInput() {
|
||||||
|
const refs = useRef<(HTMLInputElement | null)[]>([]);
|
||||||
|
|
||||||
|
const handleChange = (
|
||||||
|
e: React.ChangeEvent<HTMLInputElement>,
|
||||||
|
index: number
|
||||||
|
) => {
|
||||||
|
if (e.target.value && index < 5) {
|
||||||
|
refs.current[index + 1]?.focus();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex gap-3">
|
||||||
|
{[...Array(6)].map((_, index) => (
|
||||||
|
<input
|
||||||
|
key={index}
|
||||||
|
maxLength={1}
|
||||||
|
ref={(el) => {
|
||||||
|
refs.current[index] = el;
|
||||||
|
}}
|
||||||
|
onChange={(e) => handleChange(e, index)}
|
||||||
|
className="h-16 w-16 rounded-xl border border-slate-700 bg-[#13233a] text-center text-2xl text-white outline-none focus:border-teal-400"
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
86
components/auth/verifyCode.tsx
Normal file
86
components/auth/verifyCode.tsx
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
import Button from "@/utils/button";
|
||||||
|
import OTPInput from "./otpInput";
|
||||||
|
import { useEffect, useState, } from "react";
|
||||||
|
|
||||||
|
import {Props} from "@/constants/types"
|
||||||
|
|
||||||
|
|
||||||
|
export default function VerifyCode({ onBack }: Props) {
|
||||||
|
const [timer, setTimer] = useState(30);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (timer === 0) return;
|
||||||
|
|
||||||
|
const interval = setInterval(() => {
|
||||||
|
setTimer((prev) => prev - 1);
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
return () => clearInterval(interval);
|
||||||
|
}, [timer]);
|
||||||
|
|
||||||
|
const handleResend = () => {
|
||||||
|
if (timer > 0) return;
|
||||||
|
|
||||||
|
// Call your resend OTP API here
|
||||||
|
|
||||||
|
setTimer(30);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="space-y-6">
|
||||||
|
<button
|
||||||
|
onClick={onBack}
|
||||||
|
className="text-slate-400 hover:text-white"
|
||||||
|
>
|
||||||
|
← Back to sign in
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2 className="text-2xl font-bold text-white">
|
||||||
|
Two-factor authentication
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p className="text-slate-400">
|
||||||
|
Enter the 6-digit code from your authenticator app, or the<br/>
|
||||||
|
code we sent to{" "}
|
||||||
|
<span className="font-semibold text-white">
|
||||||
|
d•••@kafm.io
|
||||||
|
</span>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<OTPInput />
|
||||||
|
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Button
|
||||||
|
|
||||||
|
onClick={handleResend}
|
||||||
|
|
||||||
|
className={`font-semibold transition-colors ${
|
||||||
|
timer > 0
|
||||||
|
? "text-slate-400 cursor-not-allowed"
|
||||||
|
: "text-teal-400 hover:text-teal-300 cursor-pointer"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
Resend code
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
{timer > 0 && (
|
||||||
|
<span className="text-sm text-slate-500">
|
||||||
|
{timer}s
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<label className="flex items-center gap-2 text-slate-300">
|
||||||
|
<input type="checkbox" />
|
||||||
|
Trust this device for 30 days
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<Button className="h-10 w-full rounded-xl bg-gradient-to-r from-teal-400 to-emerald-400 font-semibold text-black">
|
||||||
|
Verify & Continue
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
50
components/dashboard/sideBarItem.tsx
Normal file
50
components/dashboard/sideBarItem.tsx
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import Link from "next/link";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { ChevronDown } from "lucide-react";
|
||||||
|
import {Props} from "@/constants/types";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default function SidebarItem({ item }: Props) {
|
||||||
|
const [open, setOpen] = useState(item.title === "Overview");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="border-b border-slate-800">
|
||||||
|
<button
|
||||||
|
onClick={() => setOpen(!open)}
|
||||||
|
className="flex w-full items-center justify-between px-5 py-4 hover:bg-slate-900"
|
||||||
|
>
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<item.icon size={20} />
|
||||||
|
|
||||||
|
<span className="font-medium">{item.title}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ChevronDown
|
||||||
|
size={18}
|
||||||
|
className={`transition-transform ${
|
||||||
|
open ? "rotate-180" : ""
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{open && item.children.length > 0 && (
|
||||||
|
<div className="ml-8 border-l border-slate-700 pl-5 pb-3">
|
||||||
|
{item.children.map((child: any) => (
|
||||||
|
<Link
|
||||||
|
key={child.title}
|
||||||
|
href={child.href}
|
||||||
|
className="group mt-2 flex items-center gap-3 rounded-lg px-3 py-2 text-slate-300 hover:bg-teal-500/20 hover:text-teal-400"
|
||||||
|
>
|
||||||
|
<child.icon size={18} />
|
||||||
|
|
||||||
|
<span>{child.title}</span>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
73
components/dashboard/sidebar.tsx
Normal file
73
components/dashboard/sidebar.tsx
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import { SIDEBAR_ITEMS } from "@/constants/constant";
|
||||||
|
import SidebarItem from "./sideBarItem";
|
||||||
|
import {
|
||||||
|
|
||||||
|
ShieldCheck,
|
||||||
|
|
||||||
|
Activity,
|
||||||
|
ChevronDown,
|
||||||
|
ChevronsLeft,
|
||||||
|
|
||||||
|
|
||||||
|
} from "lucide-react";
|
||||||
|
|
||||||
|
export default function Sidebar() {
|
||||||
|
return (
|
||||||
|
<aside className="w-80 bg-[#071321] text-white h-screen overflow-y-auto">
|
||||||
|
<div className="flex items-center gap-2.5 px-4 pt-4 pb-3">
|
||||||
|
<div className="flex h-9 w-9 items-center justify-center rounded-lg bg-[#3de0c4] font-bold text-[#05111d] text-lg">
|
||||||
|
K
|
||||||
|
</div>
|
||||||
|
<span className="text-xl font-bold tracking-tight text-white">
|
||||||
|
KA<span className="text-[#3de0c4]">FM</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="mx-3 my-2 flex rounded-xl bg-[#091624] p-1 border border-[#142538]">
|
||||||
|
<button className="flex flex-1 items-center justify-center gap-1.5 rounded-lg bg-[#3de0c4] py-1.5 text-xs text-black font-semibold shadow-sm">
|
||||||
|
<Activity size={14} />
|
||||||
|
Operations
|
||||||
|
</button>
|
||||||
|
<button className="flex flex-1 items-center justify-center gap-1.5 rounded-lg py-1.5 text-xs text-slate-400 font-medium hover:text-white transition-colors">
|
||||||
|
<ShieldCheck size={14} />
|
||||||
|
Admin
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p className="px-4 pt-2 pb-1 text-xs font-semibold uppercase tracking-wider text-slate-500">
|
||||||
|
Tenant runtime
|
||||||
|
</p>
|
||||||
|
<div className="py-4">
|
||||||
|
{SIDEBAR_ITEMS.map((item) => (
|
||||||
|
<SidebarItem
|
||||||
|
key={item.title}
|
||||||
|
item={item}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<div className="px-3 pb-2 pt-1 border-t border-[#0f1f30]">
|
||||||
|
<button className="flex w-full items-center gap-2 rounded-xl py-2 px-3 text-xs text-slate-400 hover:bg-[#091624] hover:text-white transition-colors">
|
||||||
|
<ChevronsLeft size={16} />
|
||||||
|
Minimise menu
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Profile Card Section */}
|
||||||
|
<div className="m-3 mt-0 rounded-xl border border-[#142538] bg-[#071321] p-2.5">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div className="flex gap-2.5 items-center">
|
||||||
|
<div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-cyan-600/50 bg-[#0d2430] text-cyan-400 text-xs font-bold">
|
||||||
|
DT
|
||||||
|
</div>
|
||||||
|
<div className="min-w-0 leading-tight">
|
||||||
|
<h4 className="font-semibold text-xs text-white truncate">Dhananjay T</h4>
|
||||||
|
<p className="text-[11px] text-slate-500 truncate">
|
||||||
|
dhananjay@kafm.io
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ChevronDown className="-rotate-90 text-slate-500 shrink-0" size={14} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
);
|
||||||
|
}
|
||||||
131
constants/constant.ts
Normal file
131
constants/constant.ts
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
import {
|
||||||
|
LayoutGrid,
|
||||||
|
Smile,
|
||||||
|
Building2,
|
||||||
|
User,
|
||||||
|
Target,
|
||||||
|
CheckSquare,
|
||||||
|
FileText,
|
||||||
|
Box,
|
||||||
|
Zap,
|
||||||
|
ClipboardList,
|
||||||
|
Star,
|
||||||
|
Monitor,
|
||||||
|
UserCheck,
|
||||||
|
Calendar,
|
||||||
|
Layers,
|
||||||
|
Coins,
|
||||||
|
Receipt,
|
||||||
|
ShieldCheck,
|
||||||
|
Flame,
|
||||||
|
Recycle,
|
||||||
|
GraduationCap,
|
||||||
|
Brain,
|
||||||
|
|
||||||
|
Activity,
|
||||||
|
Bot,
|
||||||
|
Gauge,
|
||||||
|
Snowflake,
|
||||||
|
Leaf,
|
||||||
|
MapPin,
|
||||||
|
BarChart3,
|
||||||
|
Sun,
|
||||||
|
Shield,
|
||||||
|
|
||||||
|
|
||||||
|
Settings,
|
||||||
|
Wallet,
|
||||||
|
Radar,
|
||||||
|
|
||||||
|
Cog,
|
||||||
|
} from "lucide-react";
|
||||||
|
|
||||||
|
export const SIDEBAR_ITEMS = [
|
||||||
|
{
|
||||||
|
title: "Overview",
|
||||||
|
icon: LayoutGrid,
|
||||||
|
children: [
|
||||||
|
{ title: "Dashboard", href: "/overview/dashboard", icon: LayoutGrid },
|
||||||
|
{ title: "Engagement", href: "/overview/engagement", icon: Smile },
|
||||||
|
{ title: "Building Owner", href: "/overview/building-owner", icon: Building2 },
|
||||||
|
{ title: "Property Manager", href: "/overview/property-manager", icon: User },
|
||||||
|
{ title: "Service Engineer", href: "/overview/service-engineer", icon: Target },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Operations",
|
||||||
|
icon: Settings,
|
||||||
|
children: [
|
||||||
|
{ title: "Help Desk", href: "/operations/help-desk", icon: CheckSquare, badge: 6, badgeColor: "bg-amber-500 text-black" },
|
||||||
|
{ title: "Equipment", href: "/operations/equipment", icon: Target },
|
||||||
|
{ title: "Requests", href: "/operations/requests", icon: FileText, badge: 15, badgeColor: "bg-amber-400 text-black" },
|
||||||
|
{ title: "Inventory", href: "/operations/inventory", icon: Box },
|
||||||
|
{ title: "Energy", href: "/operations/energy", icon: Zap },
|
||||||
|
{ title: "Work Permit", href: "/operations/work-permit", icon: ClipboardList, badge: 3, badgeColor: "bg-amber-500 text-black" },
|
||||||
|
{ title: "Vendor & Field Service", href: "/operations/vendor-field", icon: Star, badge: 12, badgeColor: "bg-sky-400 text-black" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Workplace",
|
||||||
|
icon: Monitor,
|
||||||
|
children: [
|
||||||
|
{ title: "Visitor Management", href: "/workplace/visitor", icon: UserCheck },
|
||||||
|
{ title: "Meeting Rooms", href: "/workplace/meeting-rooms", icon: Calendar },
|
||||||
|
{ title: "Workspace", href: "/workplace/workspace", icon: Layers },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Finance",
|
||||||
|
icon: Wallet,
|
||||||
|
children: [
|
||||||
|
{ title: "O&M Budget", href: "/finance/om-budget", icon: Coins },
|
||||||
|
{ title: "Costing & Invoicing", href: "/finance/costing-invoicing", icon: Receipt },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Compliance & Safety",
|
||||||
|
icon: ShieldCheck,
|
||||||
|
children: [
|
||||||
|
{ title: "Statutory Compliance", href: "/compliance/statutory", icon: ShieldCheck },
|
||||||
|
{ title: "Contracts & SLA", href: "/compliance/contracts-sla", icon: FileText },
|
||||||
|
{ title: "Fire & Safety", href: "/compliance/fire-safety", icon: Flame },
|
||||||
|
{ title: "Waste & ESG", href: "/compliance/waste-esg", icon: Recycle },
|
||||||
|
{ title: "Training", href: "/compliance/training", icon: GraduationCap },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Intelligence",
|
||||||
|
icon: Brain,
|
||||||
|
children: [{ title: "AI & Predictive", href: "/intelligence/predictive", icon: Brain },
|
||||||
|
{ title: "Asset Health", href: "/intelligence/asset-health", icon: ShieldCheck },
|
||||||
|
{ title: "Energy Benchmarking", href: "/intelligence/benchmarking", icon: Activity },
|
||||||
|
{ title: "AI Helpdesk", href: "/intelligence/ai-helpdesk", icon: Bot },
|
||||||
|
{ title: "Connected Ops", href: "/intelligence/connected-ops", icon: Gauge },
|
||||||
|
{ title: "Connected Assets", href: "/intelligence/connected-assets", icon: Snowflake },
|
||||||
|
{ title: "Sustainability", href: "/intelligence/sustainability", icon: Leaf },
|
||||||
|
{ title: "GPS Tracking", href: "/intelligence/gps-tracking", icon: MapPin },],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "IoT Application",
|
||||||
|
icon: Radar,
|
||||||
|
children: [{ title: "Command Center", href: "/iot/command-center", icon: Gauge },
|
||||||
|
{ title: "HVAC Plant", href: "/iot/hvac-plant", icon: Snowflake },
|
||||||
|
{ title: "Energy & Utilities", href: "/iot/energy-utilities", icon: Zap },
|
||||||
|
{ title: "Device Fleet", href: "/iot/device-fleet", icon: LayoutGrid },
|
||||||
|
{ title: "Alarms & Rules", href: "/iot/alarms-rules", icon: Shield, badge: 7, badgeColor: "bg-rose-500 text-white" },],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Insight",
|
||||||
|
icon: BarChart3,
|
||||||
|
children: [{ title: "Reports & MMR", href: "/insight/reports", icon: BarChart3 },],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Configure",
|
||||||
|
icon: Cog,
|
||||||
|
children: [{ title: "Master Data", href: "/configure/master-data", icon: Layers },
|
||||||
|
{ title: "Roles & Access", href: "/configure/roles-access", icon: Shield },
|
||||||
|
{ title: "Workflow Automation", href: "/configure/workflow", icon: Bot },
|
||||||
|
{ title: "User Location", href: "/configure/user-location", icon: MapPin },
|
||||||
|
{ title: "Settings", href: "/configure/settings", icon: Sun },],
|
||||||
|
},
|
||||||
|
];
|
||||||
9
constants/types.ts
Normal file
9
constants/types.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export type Step = "login" | "verify" | "forgot";
|
||||||
|
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
onBack?: () => void;
|
||||||
|
onSuccess?: () => void;
|
||||||
|
onForgotPassword?:()=>void;
|
||||||
|
item?: any;
|
||||||
|
}
|
||||||
18
eslint.config.mjs
Normal file
18
eslint.config.mjs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { defineConfig, globalIgnores } from "eslint/config";
|
||||||
|
import nextVitals from "eslint-config-next/core-web-vitals";
|
||||||
|
import nextTs from "eslint-config-next/typescript";
|
||||||
|
|
||||||
|
const eslintConfig = defineConfig([
|
||||||
|
...nextVitals,
|
||||||
|
...nextTs,
|
||||||
|
// Override default ignores of eslint-config-next.
|
||||||
|
globalIgnores([
|
||||||
|
// Default ignores of eslint-config-next:
|
||||||
|
".next/**",
|
||||||
|
"out/**",
|
||||||
|
"build/**",
|
||||||
|
"next-env.d.ts",
|
||||||
|
]),
|
||||||
|
]);
|
||||||
|
|
||||||
|
export default eslintConfig;
|
||||||
7
next.config.ts
Normal file
7
next.config.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import type { NextConfig } from "next";
|
||||||
|
|
||||||
|
const nextConfig: NextConfig = {
|
||||||
|
/* config options here */
|
||||||
|
};
|
||||||
|
|
||||||
|
export default nextConfig;
|
||||||
6828
package-lock.json
generated
Normal file
6828
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
27
package.json
Normal file
27
package.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "my-kafm-app",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev": "next dev",
|
||||||
|
"build": "next build",
|
||||||
|
"start": "next start",
|
||||||
|
"lint": "eslint"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"lucide-react": "^1.24.0",
|
||||||
|
"next": "16.2.10",
|
||||||
|
"react": "19.2.4",
|
||||||
|
"react-dom": "19.2.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tailwindcss/postcss": "^4",
|
||||||
|
"@types/node": "^20",
|
||||||
|
"@types/react": "^19",
|
||||||
|
"@types/react-dom": "^19",
|
||||||
|
"eslint": "^9",
|
||||||
|
"eslint-config-next": "16.2.10",
|
||||||
|
"tailwindcss": "^4",
|
||||||
|
"typescript": "^5"
|
||||||
|
}
|
||||||
|
}
|
||||||
7
postcss.config.mjs
Normal file
7
postcss.config.mjs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
const config = {
|
||||||
|
plugins: {
|
||||||
|
"@tailwindcss/postcss": {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
1
public/file.svg
Normal file
1
public/file.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
|
||||||
|
After Width: | Height: | Size: 391 B |
1
public/globe.svg
Normal file
1
public/globe.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
1
public/next.svg
Normal file
1
public/next.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
1
public/vercel.svg
Normal file
1
public/vercel.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
|
||||||
|
After Width: | Height: | Size: 128 B |
1
public/window.svg
Normal file
1
public/window.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
|
||||||
|
After Width: | Height: | Size: 385 B |
34
tsconfig.json
Normal file
34
tsconfig.json
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2017",
|
||||||
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
|
"allowJs": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"incremental": true,
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "next"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"next-env.d.ts",
|
||||||
|
"**/*.ts",
|
||||||
|
"**/*.tsx",
|
||||||
|
".next/types/**/*.ts",
|
||||||
|
".next/dev/types/**/*.ts",
|
||||||
|
"**/*.mts"
|
||||||
|
],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
||||||
14
utils/badge.tsx
Normal file
14
utils/badge.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
export default function Badge({
|
||||||
|
children,
|
||||||
|
icon,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
icon: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<div className="inline-flex w-fit items-center gap-2 rounded-full border border-slate-700 bg-[#0d1b2d] px-4 py-2 text-sm text-slate-300">
|
||||||
|
<span className="text-teal-400">{icon}</span>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
17
utils/button.tsx
Normal file
17
utils/button.tsx
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
interface Props {
|
||||||
|
children: React.ReactNode;
|
||||||
|
onClick?: () => void;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Button({
|
||||||
|
children,
|
||||||
|
onClick,
|
||||||
|
className,
|
||||||
|
}: Props) {
|
||||||
|
return (
|
||||||
|
<button onClick={onClick} className={className}>
|
||||||
|
{children}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
||||||
25
utils/formInput.tsx
Normal file
25
utils/formInput.tsx
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
interface Props {
|
||||||
|
label: string;
|
||||||
|
value?: string;
|
||||||
|
type?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function FormInput({
|
||||||
|
label,
|
||||||
|
value,
|
||||||
|
type = "text",
|
||||||
|
}: Props) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<label className="mb-2 block text-sm text-slate-400">
|
||||||
|
{label}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<input
|
||||||
|
type={type}
|
||||||
|
defaultValue={value}
|
||||||
|
className="h-10 w-full rounded-xl border border-slate-700 text-white px-5"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
16
utils/statCard.tsx
Normal file
16
utils/statCard.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
export default function Stat({
|
||||||
|
number,
|
||||||
|
label,
|
||||||
|
}: {
|
||||||
|
number: string;
|
||||||
|
label: string;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h2 className="text-3xl font-bold">{number}</h2>
|
||||||
|
<p className="mt-2 text-xs tracking-[3px] text-slate-400">
|
||||||
|
{label}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user