From 9d6c7dcde068a862e5767cf3cee7c5d24dcee25e Mon Sep 17 00:00:00 2001 From: barsa Date: Tue, 16 Dec 2025 16:08:17 +0900 Subject: [PATCH] Refactor UI components for improved styling and consistency - Updated global styles to enhance color usage and contrast across the application. - Refined input components for better accessibility and visual feedback. - Enhanced layout components with consistent padding and margins for a cleaner look. - Improved card and button styles to align with the new design tokens. - Standardized text colors and hover effects for better user interaction. --- apps/portal/src/app/globals.css | 125 +++--- apps/portal/src/components/atoms/input.tsx | 9 +- .../molecules/FormField/FormField.tsx | 2 +- .../SearchFilterBar/SearchFilterBar.tsx | 82 ++-- .../components/molecules/SubCard/SubCard.tsx | 25 +- .../organisms/AppShell/AppShell.tsx | 2 +- .../components/organisms/AppShell/Header.tsx | 21 +- .../components/organisms/AppShell/Sidebar.tsx | 60 ++- .../templates/AuthLayout/AuthLayout.tsx | 37 +- .../templates/PageLayout/PageLayout.tsx | 2 +- .../templates/PublicShell/PublicShell.tsx | 43 +- .../account/components/AddressCard.tsx | 28 +- .../account/views/ProfileContainer.tsx | 18 +- .../auth/components/LoginForm/LoginForm.tsx | 10 +- .../components/InvoiceDetail/InvoiceItems.tsx | 48 ++- .../InvoiceDetail/InvoiceSummaryBar.tsx | 149 ++++--- .../InvoiceDetail/InvoiceTotals.tsx | 32 +- .../components/InvoiceList/InvoiceList.tsx | 92 ++--- .../components/InvoiceTable/InvoiceTable.tsx | 104 ++--- .../features/billing/views/InvoiceDetail.tsx | 9 +- .../components/base/CatalogBackLink.tsx | 2 +- .../catalog/components/base/CatalogHero.tsx | 6 +- .../components/common/ServiceHeroCard.tsx | 37 +- .../components/internet/InternetPlanCard.tsx | 59 ++- .../configure/InternetConfigureContainer.tsx | 14 +- .../configure/steps/ReviewOrderStep.tsx | 60 ++- .../catalog/components/sim/SimPlanCard.tsx | 8 +- .../catalog/components/vpn/VpnPlanCard.tsx | 8 +- .../checkout/views/CheckoutContainer.tsx | 10 +- .../dashboard/components/ActivityFeed.tsx | 175 --------- .../dashboard/components/ActivityTimeline.tsx | 110 ++++++ .../components/DashboardActivityItem.tsx | 62 +-- .../components/PaymentErrorBanner.tsx | 18 - .../dashboard/components/QuickAction.tsx | 21 +- .../dashboard/components/StatCard.tsx | 66 ++-- .../dashboard/components/TasksChip.tsx | 41 -- .../components/UpcomingPaymentBanner.tsx | 67 ---- .../features/dashboard/components/index.ts | 1 + .../dashboard/utils/dashboard.utils.ts | 15 - .../dashboard/views/DashboardView.tsx | 368 +++++++----------- .../landing-page/views/PublicLandingView.tsx | 136 ++++--- .../features/orders/components/OrderCard.tsx | 42 +- .../src/features/orders/views/OrderDetail.tsx | 72 ++-- .../components/SubscriptionCard.tsx | 70 +++- .../SubscriptionTable/SubscriptionTable.tsx | 58 +-- .../subscriptions/utils/status-presenters.tsx | 10 +- .../views/SubscriptionDetail.tsx | 202 +++++----- .../subscriptions/views/SubscriptionsList.tsx | 76 ++-- .../support/utils/case-presenters.tsx | 52 +-- .../support/views/SupportCasesView.tsx | 8 +- apps/portal/src/styles/tokens.css | 75 ++-- apps/portal/src/styles/utilities.css | 22 +- 52 files changed, 1329 insertions(+), 1540 deletions(-) delete mode 100644 apps/portal/src/features/dashboard/components/ActivityFeed.tsx create mode 100644 apps/portal/src/features/dashboard/components/ActivityTimeline.tsx delete mode 100644 apps/portal/src/features/dashboard/components/PaymentErrorBanner.tsx delete mode 100644 apps/portal/src/features/dashboard/components/TasksChip.tsx delete mode 100644 apps/portal/src/features/dashboard/components/UpcomingPaymentBanner.tsx diff --git a/apps/portal/src/app/globals.css b/apps/portal/src/app/globals.css index e121c9d7..e8d8e260 100644 --- a/apps/portal/src/app/globals.css +++ b/apps/portal/src/app/globals.css @@ -4,37 +4,38 @@ @import "../styles/utilities.css"; @import "../styles/responsive.css"; - @custom-variant dark (&:is(.dark *)); :root { --radius: 0.625rem; /* Core neutrals (light) */ - --background: oklch(0.98 0 0); + /* Background and cards are both white for clean look */ + --background: oklch(1 0 0); /* pure white for main content */ --foreground: oklch(0.16 0 0); - --card: var(--background); + --card: oklch(1 0 0); /* pure white for cards */ --card-foreground: var(--foreground); - --popover: var(--background); + --card-muted: oklch(0.98 0.003 250); /* subtle gray for nested/muted cards */ + --popover: oklch(1 0 0); --popover-foreground: var(--foreground); - /* Primary brand (azure) */ - --primary: oklch(0.62 0.17 255); + /* Primary brand - matches logo cyan blue */ + --primary: oklch(0.68 0.14 220); /* bright cyan blue from logo */ --primary-foreground: oklch(0.99 0 0); /* Interaction shades */ - --primary-hover: oklch(0.58 0.17 255); - --primary-active: oklch(0.54 0.17 255); + --primary-hover: oklch(0.63 0.14 220); + --primary-active: oklch(0.58 0.14 220); /* Subtle surfaces & text */ - --secondary: oklch(0.93 0 0); + --secondary: oklch(0.95 0.003 250); /* subtle cool gray */ --secondary-foreground: oklch(0.29 0 0); - --muted: oklch(0.95 0 0); - --muted-foreground: oklch(0.55 0 0); + --muted: oklch(0.96 0.003 250); /* subtle cool gray for surfaces */ + --muted-foreground: oklch(0.5 0 0); - /* Light accent (tinted, not a second brand) */ - --accent: oklch(0.94 0.03 245); + /* Light accent (tinted with brand) */ + --accent: oklch(0.95 0.05 220); /* light cyan tint */ --accent-foreground: var(--foreground); /* Feedback (now with full semantic set) */ @@ -50,33 +51,33 @@ --warning-foreground: oklch(0.16 0 0); --warning-soft: oklch(0.96 0.07 90); - --info: oklch(0.64 0.16 255); + --info: oklch(0.68 0.14 220); /* matches primary */ --info-foreground: oklch(0.99 0 0); - --info-soft: oklch(0.95 0.05 255); + --info-soft: oklch(0.95 0.06 220); /* UI chrome */ - --border: oklch(0.90 0 0); - --border-muted: oklch(0.88 0 0); - --input: var(--border); - --ring: oklch(0.68 0.16 255); + --border: oklch(0.9 0 0); + --border-muted: oklch(0.92 0 0); + --input: oklch(0.88 0 0); /* slightly darker for inputs */ + --ring: oklch(0.72 0.12 220); --ring-subtle: color-mix(in oklch, var(--ring) 45%, transparent); /* Charts */ - --chart-1: oklch(0.62 0.17 255); - --chart-2: oklch(0.66 0.15 202); + --chart-1: oklch(0.68 0.14 220); /* cyan from logo */ + --chart-2: oklch(0.28 0.1 265); /* navy from logo */ --chart-3: oklch(0.64 0.19 147); - --chart-4: oklch(0.70 0.16 82); + --chart-4: oklch(0.7 0.16 82); --chart-5: oklch(0.68 0.16 28); - /* Sidebar */ - --sidebar: var(--background); - --sidebar-foreground: var(--foreground); - --sidebar-primary: var(--primary); - --sidebar-primary-foreground: var(--primary-foreground); - --sidebar-accent: var(--secondary); - --sidebar-accent-foreground: var(--secondary-foreground); - --sidebar-border: var(--border); - --sidebar-ring: var(--ring); + /* Sidebar - Brand navy blue from logo */ + --sidebar: oklch(0.28 0.1 265); /* deep navy blue from logo */ + --sidebar-foreground: oklch(1 0 0); /* pure white text */ + --sidebar-primary: oklch(1 0 0); /* white for emphasis */ + --sidebar-primary-foreground: oklch(0.28 0.1 265); + --sidebar-accent: oklch(0.35 0.09 265); /* lighter navy for hover */ + --sidebar-accent-foreground: oklch(1 0 0); + --sidebar-border: oklch(0.35 0.08 265); /* lighter navy border */ + --sidebar-ring: oklch(0.72 0.12 220); } .dark { @@ -86,28 +87,29 @@ --card: oklch(0.18 0 0); --card-foreground: var(--foreground); + --card-muted: oklch(0.22 0 0); /* subtle lighter gray for nested cards */ --popover: oklch(0.18 0 0); --popover-foreground: var(--foreground); - /* Primary brand (slightly lighter for dark) */ - --primary: oklch(0.74 0.16 255); + /* Primary brand - lighter cyan for dark mode */ + --primary: oklch(0.75 0.12 220); --primary-foreground: oklch(0.15 0 0); - --primary-hover: oklch(0.70 0.16 255); - --primary-active: oklch(0.66 0.16 255); + --primary-hover: oklch(0.7 0.12 220); + --primary-active: oklch(0.65 0.12 220); /* Subtle surfaces & text */ --secondary: oklch(0.22 0 0); - --secondary-foreground: oklch(0.90 0 0); + --secondary-foreground: oklch(0.9 0 0); --muted: oklch(0.25 0 0); --muted-foreground: oklch(0.74 0 0); - /* Accent (tinted) */ - --accent: oklch(0.24 0.02 245); + /* Accent (tinted with brand) */ + --accent: oklch(0.24 0.04 220); --accent-foreground: oklch(0.92 0 0); /* Feedback */ - --destructive: oklch(0.70 0.21 27); + --destructive: oklch(0.7 0.21 27); --destructive-foreground: oklch(0.15 0 0); --destructive-soft: oklch(0.25 0.05 27); @@ -119,32 +121,32 @@ --warning-foreground: oklch(0.15 0 0); --warning-soft: oklch(0.26 0.07 90); - --info: oklch(0.78 0.15 255); + --info: oklch(0.75 0.12 220); --info-foreground: oklch(0.15 0 0); - --info-soft: oklch(0.24 0.05 255); + --info-soft: oklch(0.24 0.05 220); /* UI chrome */ --border: oklch(0.32 0 0); --border-muted: oklch(0.28 0 0); - --input: var(--border); - --ring: oklch(0.78 0.13 255); + --input: oklch(0.35 0 0); /* slightly lighter for inputs */ + --ring: oklch(0.78 0.1 220); --ring-subtle: color-mix(in oklch, var(--ring) 40%, transparent); /* Charts */ - --chart-1: oklch(0.74 0.16 255); - --chart-2: oklch(0.72 0.14 202); - --chart-3: oklch(0.70 0.18 147); + --chart-1: oklch(0.75 0.12 220); /* cyan from logo */ + --chart-2: oklch(0.45 0.08 265); /* navy from logo */ + --chart-3: oklch(0.7 0.18 147); --chart-4: oklch(0.74 0.17 82); --chart-5: oklch(0.72 0.17 28); - /* Sidebar */ - --sidebar: var(--card); - --sidebar-foreground: var(--foreground); - --sidebar-primary: var(--primary); - --sidebar-primary-foreground: var(--primary-foreground); - --sidebar-accent: var(--secondary); - --sidebar-accent-foreground: var(--secondary-foreground); - --sidebar-border: var(--border); + /* Sidebar - Dark navy from logo */ + --sidebar: oklch(0.2 0.08 265); /* darker navy */ + --sidebar-foreground: oklch(1 0 0); /* pure white */ + --sidebar-primary: oklch(1 0 0); + --sidebar-primary-foreground: oklch(0.2 0.08 265); + --sidebar-accent: oklch(0.28 0.07 265); /* lighter on hover */ + --sidebar-accent-foreground: oklch(1 0 0); + --sidebar-border: oklch(0.28 0.06 265); --sidebar-ring: var(--ring); } @@ -154,6 +156,7 @@ --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); + --color-card-muted: var(--card-muted); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); @@ -224,11 +227,15 @@ @theme inline { --animate-aurora: aurora 60s linear infinite; @keyframes aurora { - from { - backgroundPosition: 50% 50%, 50% 50%; + from { + backgroundposition: + 50% 50%, + 50% 50%; } - to { - backgroundPosition: 350% 50%, 350% 50%; + to { + backgroundposition: + 350% 50%, + 350% 50%; } } } @@ -240,4 +247,4 @@ body { @apply bg-background text-foreground; } -} \ No newline at end of file +} diff --git a/apps/portal/src/components/atoms/input.tsx b/apps/portal/src/components/atoms/input.tsx index 8ae8d2c4..1d88a4b5 100644 --- a/apps/portal/src/components/atoms/input.tsx +++ b/apps/portal/src/components/atoms/input.tsx @@ -14,9 +14,14 @@ const Input = forwardRef( ( > {label} {required ? ( -