diff --git a/src/components/panel/ConversationList.tsx b/src/components/panel/ConversationList.tsx new file mode 100644 index 0000000..2e45bae --- /dev/null +++ b/src/components/panel/ConversationList.tsx @@ -0,0 +1,63 @@ + +import { User } from "lucide-react"; +import { Card } from "@/components/ui/card"; + +interface Conversation { + id: string; + contact: string; + lastMessage: string; + timestamp: string; +} + +const mockConversations: Conversation[] = [ + { + id: "1", + contact: "+1 (555) 987-6543", + lastMessage: "Thanks for your message", + timestamp: "2 min ago", + }, + { + id: "2", + contact: "+1 (555) 876-5432", + lastMessage: "I'll get back to you shortly", + timestamp: "1 hour ago", + }, +]; + +export function ConversationList() { + return ( +
+
+

Conversations

+ + {mockConversations.length} active + +
+
+ {mockConversations.map((conversation) => ( + +
+
+ +
+
+
+

{conversation.contact}

+ + {conversation.timestamp} + +
+

+ {conversation.lastMessage} +

+
+
+
+ ))} +
+
+ ); +} diff --git a/src/components/panel/MessageComposer.tsx b/src/components/panel/MessageComposer.tsx new file mode 100644 index 0000000..386e40b --- /dev/null +++ b/src/components/panel/MessageComposer.tsx @@ -0,0 +1,71 @@ + +import { useState } from "react"; +import { Send } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Card } from "@/components/ui/card"; +import { toast } from "sonner"; + +export function MessageComposer() { + const [message, setMessage] = useState(""); + const [phoneNumber, setPhoneNumber] = useState(""); + + const handleSend = () => { + if (!message.trim() || !phoneNumber.trim()) { + toast.error("Please enter both phone number and message"); + return; + } + + // Mock send functionality + toast.success("Message sent successfully!"); + setMessage(""); + setPhoneNumber(""); + }; + + return ( + +
+

Send Message

+
+
+ + setPhoneNumber(e.target.value)} + className="w-full" + /> +
+
+ + setMessage(e.target.value)} + className="w-full" + /> +
+ +
+
+
+ ); +} diff --git a/src/components/panel/Panel.tsx b/src/components/panel/Panel.tsx new file mode 100644 index 0000000..c337f54 --- /dev/null +++ b/src/components/panel/Panel.tsx @@ -0,0 +1,94 @@ + +import { useState } from "react"; +import { PhoneNumberList } from "./PhoneNumberList"; +import { ConversationList } from "./ConversationList"; +import { MessageComposer } from "./MessageComposer"; +import { + MessageSquare, + Phone, + Send, + Menu, +} from "lucide-react"; +import { Button } from "@/components/ui/button"; + +type PanelView = "numbers" | "conversations" | "compose"; + +export function Panel() { + const [view, setView] = useState("numbers"); + const [isSidebarOpen, setIsSidebarOpen] = useState(true); + + const renderView = () => { + switch (view) { + case "numbers": + return ; + case "conversations": + return ; + case "compose": + return ; + default: + return ; + } + }; + + return ( +
+ {/* Sidebar */} +
+
+

+ Chatterbox +

+ +
+ +
+ + {/* Main Content */} +
+
{renderView()}
+
+
+ ); +} diff --git a/src/components/panel/PhoneNumberList.tsx b/src/components/panel/PhoneNumberList.tsx new file mode 100644 index 0000000..212043f --- /dev/null +++ b/src/components/panel/PhoneNumberList.tsx @@ -0,0 +1,56 @@ + +import { Phone } from "lucide-react"; +import { Card } from "@/components/ui/card"; + +interface PhoneNumber { + id: string; + number: string; + status: "active" | "inactive"; +} + +const mockNumbers: PhoneNumber[] = [ + { id: "1", number: "+1 (555) 123-4567", status: "active" }, + { id: "2", number: "+1 (555) 234-5678", status: "active" }, +]; + +export function PhoneNumberList() { + return ( +
+
+

Phone Numbers

+ + {mockNumbers.length} numbers + +
+
+ {mockNumbers.map((number) => ( + +
+
+ +
+
+

{number.number}

+

+ Status:{" "} + + {number.status} + +

+
+
+
+ ))} +
+
+ ); +} diff --git a/src/index.css b/src/index.css index 33fdf9d..e685a36 100644 --- a/src/index.css +++ b/src/index.css @@ -1,3 +1,6 @@ + +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); + @tailwind base; @tailwind components; @tailwind utilities; @@ -32,70 +35,15 @@ --input: 214.3 31.8% 91.4%; --ring: 222.2 84% 4.9%; - --radius: 0.5rem; - - --sidebar-background: 0 0% 98%; - - --sidebar-foreground: 240 5.3% 26.1%; - - --sidebar-primary: 240 5.9% 10%; - - --sidebar-primary-foreground: 0 0% 98%; - - --sidebar-accent: 240 4.8% 95.9%; - - --sidebar-accent-foreground: 240 5.9% 10%; - - --sidebar-border: 220 13% 91%; - - --sidebar-ring: 217.2 91.2% 59.8%; + --radius: 0.75rem; } - .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; - - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; - - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; - - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; - - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; - - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; - - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; - - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; - - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; - --ring: 212.7 26.8% 83.9%; - --sidebar-background: 240 5.9% 10%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary: 224.3 76.3% 48%; - --sidebar-primary-foreground: 0 0% 100%; - --sidebar-accent: 240 3.7% 15.9%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; - } -} - -@layer base { * { @apply border-border; } body { - @apply bg-background text-foreground; + @apply bg-background text-foreground antialiased; + font-feature-settings: "rlig" 1, "calt" 1; } -} \ No newline at end of file +} diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 52ea22c..c3200de 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -1,14 +1,8 @@ -// Update this page (the content is just a fallback if you fail to update the page) + +import { Panel } from "@/components/panel/Panel"; const Index = () => { - return ( -
-
-

Welcome to Your Blank App

-

Start building your amazing project here!

-
-
- ); + return ; }; export default Index; diff --git a/tailwind.config.ts b/tailwind.config.ts index 8706086..4045b8a 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,96 +1,96 @@ + import type { Config } from "tailwindcss"; export default { - darkMode: ["class"], - content: [ - "./pages/**/*.{ts,tsx}", - "./components/**/*.{ts,tsx}", - "./app/**/*.{ts,tsx}", - "./src/**/*.{ts,tsx}", - ], - prefix: "", - theme: { - container: { - center: true, - padding: '2rem', - screens: { - '2xl': '1400px' - } - }, - extend: { - colors: { - border: 'hsl(var(--border))', - input: 'hsl(var(--input))', - ring: 'hsl(var(--ring))', - background: 'hsl(var(--background))', - foreground: 'hsl(var(--foreground))', - primary: { - DEFAULT: 'hsl(var(--primary))', - foreground: 'hsl(var(--primary-foreground))' - }, - secondary: { - DEFAULT: 'hsl(var(--secondary))', - foreground: 'hsl(var(--secondary-foreground))' - }, - destructive: { - DEFAULT: 'hsl(var(--destructive))', - foreground: 'hsl(var(--destructive-foreground))' - }, - muted: { - DEFAULT: 'hsl(var(--muted))', - foreground: 'hsl(var(--muted-foreground))' - }, - accent: { - DEFAULT: 'hsl(var(--accent))', - foreground: 'hsl(var(--accent-foreground))' - }, - popover: { - DEFAULT: 'hsl(var(--popover))', - foreground: 'hsl(var(--popover-foreground))' - }, - card: { - DEFAULT: 'hsl(var(--card))', - foreground: 'hsl(var(--card-foreground))' - }, - sidebar: { - DEFAULT: 'hsl(var(--sidebar-background))', - foreground: 'hsl(var(--sidebar-foreground))', - primary: 'hsl(var(--sidebar-primary))', - 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))', - accent: 'hsl(var(--sidebar-accent))', - 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))', - border: 'hsl(var(--sidebar-border))', - ring: 'hsl(var(--sidebar-ring))' - } - }, - borderRadius: { - lg: 'var(--radius)', - md: 'calc(var(--radius) - 2px)', - sm: 'calc(var(--radius) - 4px)' - }, - keyframes: { - 'accordion-down': { - from: { - height: '0' - }, - to: { - height: 'var(--radix-accordion-content-height)' - } - }, - 'accordion-up': { - from: { - height: 'var(--radix-accordion-content-height)' - }, - to: { - height: '0' - } - } - }, - animation: { - 'accordion-down': 'accordion-down 0.2s ease-out', - 'accordion-up': 'accordion-up 0.2s ease-out' - } - } - }, - plugins: [require("tailwindcss-animate")], + darkMode: ["class"], + content: [ + "./pages/**/*.{ts,tsx}", + "./components/**/*.{ts,tsx}", + "./app/**/*.{ts,tsx}", + "./src/**/*.{ts,tsx}", + ], + prefix: "", + theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px", + }, + }, + extend: { + fontFamily: { + sans: ["Inter", "sans-serif"], + }, + colors: { + border: "hsl(var(--border))", + input: "hsl(var(--input))", + ring: "hsl(var(--ring))", + background: "hsl(var(--background))", + foreground: "hsl(var(--foreground))", + panel: { + DEFAULT: "hsl(0 0% 100%)", + foreground: "hsl(222.2 84% 4.9%)", + }, + primary: { + DEFAULT: "hsl(222.2 47.4% 11.2%)", + foreground: "hsl(210 40% 98%)", + }, + secondary: { + DEFAULT: "hsl(210 40% 96.1%)", + foreground: "hsl(222.2 47.4% 11.2%)", + }, + destructive: { + DEFAULT: "hsl(0 84.2% 60.2%)", + foreground: "hsl(210 40% 98%)", + }, + muted: { + DEFAULT: "hsl(210 40% 96.1%)", + foreground: "hsl(215.4 16.3% 46.9%)", + }, + accent: { + DEFAULT: "hsl(210 40% 96.1%)", + foreground: "hsl(222.2 47.4% 11.2%)", + }, + popover: { + DEFAULT: "hsl(0 0% 100%)", + foreground: "hsl(222.2 84% 4.9%)", + }, + card: { + DEFAULT: "hsl(0 0% 100%)", + foreground: "hsl(222.2 84% 4.9%)", + }, + }, + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)", + }, + keyframes: { + "accordion-down": { + from: { height: "0" }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: "0" }, + }, + slideIn: { + "0%": { transform: "translateX(100%)" }, + "100%": { transform: "translateX(0)" }, + }, + fadeIn: { + "0%": { opacity: "0" }, + "100%": { opacity: "1" }, + }, + }, + animation: { + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + slideIn: "slideIn 0.3s ease-out", + fadeIn: "fadeIn 0.3s ease-out", + }, + }, + }, + plugins: [require("tailwindcss-animate")], } satisfies Config;