feat(ui): complete phase 4 Poyraz UI foundation

This commit is contained in:
poyrazavsever
2026-07-16 23:20:30 +03:00
parent 5d863280bf
commit 561af11b70
58 changed files with 2555 additions and 7806 deletions
@@ -22,7 +22,7 @@ type AnalyticsClientProps = {
data: AnalyticsData;
};
const COLORS = ["hsl(var(--primary))", "hsl(var(--destructive))", "#eab308", "#3b82f6", "#8b5cf6"];
const COLORS = ["var(--poyraz-primary)", "var(--poyraz-destructive)", "#eab308", "#3b82f6", "#8b5cf6"];
export function AnalyticsClient({ data }: AnalyticsClientProps) {
const router = useRouter();
@@ -98,8 +98,8 @@ export function AnalyticsClient({ data }: AnalyticsClientProps) {
<Tooltip
formatter={(value) => `${Number(value ?? 0)}`}
contentStyle={{
backgroundColor: 'hsl(var(--background))',
borderColor: 'hsl(var(--border))',
backgroundColor: 'var(--poyraz-background)',
borderColor: 'var(--poyraz-border)',
borderRadius: '0.375rem',
}}
/>
@@ -119,9 +119,9 @@ export function AnalyticsClient({ data }: AnalyticsClientProps) {
<div className="h-[300px] w-full">
<ResponsiveContainer width="100%" height="100%">
<BarChart data={taskStatusData}>
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="hsl(var(--border))" />
<XAxis dataKey="name" axisLine={false} tickLine={false} tick={{ fontSize: 12, fill: 'hsl(var(--muted-foreground))' }} dy={10} />
<YAxis axisLine={false} tickLine={false} tick={{ fontSize: 12, fill: 'hsl(var(--muted-foreground))' }} dx={-10} />
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="var(--poyraz-border)" />
<XAxis dataKey="name" axisLine={false} tickLine={false} tick={{ fontSize: 12, fill: 'var(--poyraz-muted-foreground)' }} dy={10} />
<YAxis axisLine={false} tickLine={false} tick={{ fontSize: 12, fill: 'var(--poyraz-muted-foreground)' }} dx={-10} />
<Tooltip
cursor={{ fill: 'transparent' }}
content={({ active, payload, label }) => {
+1 -2
View File
@@ -1,5 +1,4 @@
import { Skeleton } from "@/components/ui/skeleton";
import { Card, CardContent } from "poyraz-ui/atoms";
import { Card, CardContent, Skeleton } from "poyraz-ui/atoms";
export default function AnalyticsLoading() {
return (
+1 -2
View File
@@ -1,5 +1,4 @@
import { Skeleton } from "@/components/ui/skeleton";
import { Card, CardContent } from "poyraz-ui/atoms";
import { Card, CardContent, Skeleton } from "poyraz-ui/atoms";
export default function ClientsLoading() {
return (
+11 -11
View File
@@ -111,18 +111,18 @@ export function DashboardClient({ data }: DashboardClientProps) {
{incomeTrendData.length > 0 ? (
<ResponsiveContainer width="100%" height="100%">
<BarChart data={incomeTrendData}>
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="hsl(var(--border))" />
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="var(--poyraz-border)" />
<XAxis
dataKey="name"
axisLine={false}
tickLine={false}
tick={{ fontSize: 12, fill: 'hsl(var(--muted-foreground))' }}
tick={{ fontSize: 12, fill: 'var(--poyraz-muted-foreground)' }}
dy={10}
/>
<YAxis
axisLine={false}
tickLine={false}
tick={{ fontSize: 12, fill: 'hsl(var(--muted-foreground))' }}
tick={{ fontSize: 12, fill: 'var(--poyraz-muted-foreground)' }}
dx={-10}
/>
<Tooltip
@@ -181,26 +181,26 @@ export function DashboardClient({ data }: DashboardClientProps) {
{moodTrendData.length > 0 ? (
<ResponsiveContainer width="100%" height="100%">
<LineChart data={moodTrendData}>
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="hsl(var(--border))" />
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="var(--poyraz-border)" />
<XAxis
dataKey="date"
axisLine={false}
tickLine={false}
tick={{ fontSize: 12, fill: 'hsl(var(--muted-foreground))' }}
tick={{ fontSize: 12, fill: 'var(--poyraz-muted-foreground)' }}
dy={10}
/>
<YAxis
domain={[0, 5]}
axisLine={false}
tickLine={false}
tick={{ fontSize: 12, fill: 'hsl(var(--muted-foreground))' }}
tick={{ fontSize: 12, fill: 'var(--poyraz-muted-foreground)' }}
width={30}
dx={-10}
/>
<Tooltip
contentStyle={{
backgroundColor: 'hsl(var(--background))',
borderColor: 'hsl(var(--border))',
backgroundColor: 'var(--poyraz-background)',
borderColor: 'var(--poyraz-border)',
borderRadius: '0.375rem',
boxShadow: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)'
}}
@@ -208,9 +208,9 @@ export function DashboardClient({ data }: DashboardClientProps) {
<Line
type="monotone"
dataKey="mood"
stroke="hsl(var(--primary))"
stroke="var(--poyraz-primary)"
strokeWidth={3}
dot={{ r: 4, fill: "hsl(var(--primary))", strokeWidth: 2, stroke: "hsl(var(--background))" }}
dot={{ r: 4, fill: "var(--poyraz-primary)", strokeWidth: 2, stroke: "var(--poyraz-background)" }}
activeDot={{ r: 6, strokeWidth: 0 }}
/>
<Line
@@ -218,7 +218,7 @@ export function DashboardClient({ data }: DashboardClientProps) {
dataKey="energy"
stroke="#eab308"
strokeWidth={3}
dot={{ r: 4, fill: "#eab308", strokeWidth: 2, stroke: "hsl(var(--background))" }}
dot={{ r: 4, fill: "#eab308", strokeWidth: 2, stroke: "var(--poyraz-background)" }}
activeDot={{ r: 6, strokeWidth: 0 }}
/>
</LineChart>
+2 -2
View File
@@ -138,12 +138,12 @@ export function JournalClient({ logs }: JournalClientProps) {
<div className="h-80">
<ResponsiveContainer width="100%" height="100%">
<LineChart data={chartData} margin={{ left: -16, right: 16, top: 12, bottom: 0 }}>
<CartesianGrid strokeDasharray="3 3" stroke="hsl(var(--border))" />
<CartesianGrid strokeDasharray="3 3" stroke="var(--poyraz-border)" />
<XAxis dataKey="date" tickLine={false} axisLine={false} fontSize={12} />
<YAxis domain={[1, 5]} tickCount={5} tickLine={false} axisLine={false} fontSize={12} />
<Tooltip
contentStyle={{
border: "1px solid hsl(var(--border))",
border: "1px solid var(--poyraz-border)",
borderRadius: 4,
boxShadow: "0 10px 30px rgba(15, 23, 42, 0.08)",
}}
+8
View File
@@ -1,5 +1,6 @@
import { DashboardShell } from "@/components/layout/dashboard-shell";
import { requireFreelancer } from "@/server/auth/session";
import { getPublicBranding } from "@/server/branding/runtime";
export default async function DashboardLayout({
children,
@@ -7,6 +8,7 @@ export default async function DashboardLayout({
children: React.ReactNode;
}>) {
const { user, profile } = await requireFreelancer();
const branding = getPublicBranding();
const displayName = profile.displayName || user.name || user.email.split("@")[0] || "Neta Kullanıcısı";
const shortName =
@@ -20,6 +22,12 @@ export default async function DashboardLayout({
return (
<DashboardShell
branding={{
applicationName: branding.applicationName,
organizationName: branding.organizationName,
lightLogoUrl: branding.lightLogoUrl,
darkLogoUrl: branding.darkLogoUrl,
}}
user={{
email: user.email,
displayName,
+1 -2
View File
@@ -1,5 +1,4 @@
import { Skeleton } from "@/components/ui/skeleton";
import { Card, CardContent } from "poyraz-ui/atoms";
import { Card, CardContent, Skeleton } from "poyraz-ui/atoms";
export default function DashboardLoading() {
return (
+1 -2
View File
@@ -1,5 +1,4 @@
import { Skeleton } from "@/components/ui/skeleton";
import { Card, CardContent } from "poyraz-ui/atoms";
import { Card, CardContent, Skeleton } from "poyraz-ui/atoms";
export default function ProjectDetailLoading() {
return (
+1 -2
View File
@@ -1,5 +1,4 @@
import { Skeleton } from "@/components/ui/skeleton";
import { Card, CardContent } from "poyraz-ui/atoms";
import { Card, CardContent, Skeleton } from "poyraz-ui/atoms";
export default function ProjectsLoading() {
return (
+1 -2
View File
@@ -1,5 +1,4 @@
import { Skeleton } from "@/components/ui/skeleton";
import { Card, CardContent } from "poyraz-ui/atoms";
import { Card, CardContent, Skeleton } from "poyraz-ui/atoms";
export default function TasksLoading() {
return (