refactor: standardize theme colors, update UI components, and refine auth redirection logic

This commit is contained in:
Firman Ramdhani
2026-07-31 11:49:09 +07:00
parent f91bbefddc
commit 2c8c9d22b4
10 changed files with 95 additions and 70 deletions
@@ -188,7 +188,7 @@ export function EnterpriseFormPageProvider<E extends BaseEntity = BaseEntity>(pr
notifications.show({
title: t('common:notifications.errorTitle'),
message: message ?? error?.message,
color: 'red',
color: 'var(--mantine-color-error-6)',
});
} finally {
setIsLoading(false);
@@ -250,7 +250,7 @@ export function EnterpriseFormPageProvider<E extends BaseEntity = BaseEntity>(pr
notifications.show({
title: t('common:notifications.errorTitle'),
message: message ?? error?.message,
color: 'red',
color: 'var(--mantine-color-error-6)',
});
} finally {
setIsSaving(false);
@@ -355,7 +355,7 @@ export function EnterpriseFormPageProvider<E extends BaseEntity = BaseEntity>(pr
{t('common:confirmDialog.leave.cancel')}
</Button>
<Button
color="red"
color="var(--mantine-color-error-6)"
size="xs"
onClick={() => {
actionTaken = true;
+7 -1
View File
@@ -35,11 +35,17 @@ export function ThemeProvider({ children, colorScheme = 'light', density = 'comp
black: '#1A1B1E',
colors: {
brand: brandColors,
dark: darkColors,
error: errorColors,
warning: warningColors,
success: successColors,
info: infoColors,
dark: darkColors,
red: errorColors,
yellow: warningColors,
green: successColors,
blue: infoColors,
},
primaryColor: 'brand',
fontFamily: typography.fontFamily,
+40 -42
View File
@@ -12,57 +12,56 @@ export const brandColors: MantineColorsTuple = [
'#321a7a', // 800
'#1b0f4a', // 900
];
export const errorColors: MantineColorsTuple = [
'#fef2f2',
'#fee2e2',
'#fecaca',
'#fca5a5',
'#f87171',
'#ef4444',
'#dc2626',
'#b91c1c',
'#991b1b',
'#7f1d1d',
'#fef3f2', // 0: 50
'#fee4e2', // 1: 100
'#fecdca', // 2: 200
'#fda29b', // 3: 300
'#f97066', // 4: 400
'#f04438', // 5: 500
'#d92d20', // 6: 600 (Primary)
'#b42318', // 7: 700
'#912018', // 8: 800
'#7a271a', // 9: 900
];
export const warningColors: MantineColorsTuple = [
'#fffbeb',
'#fef3c7',
'#fde68a',
'#fcd34d',
'#fbbf24',
'#f59e0b',
'#d97706',
'#b45309',
'#92400e',
'#78350f',
'#fffdf5', // 0: 50
'#fff9db', // 1: 100
'#fff0b3', // 2: 200
'#ffe480', // 3: 300
'#ffd64d', // 4: 400
'#ffc71a', // 5: 500
'#ffb800', // 6: 600 (Primary)
'#d19200', // 7: 700
'#a67000', // 8: 800
'#7a5000', // 9: 900
];
export const successColors: MantineColorsTuple = [
'#f0fdf4',
'#dcfce7',
'#bbf7d0',
'#86efac',
'#4ade80',
'#22c55e',
'#16a34a',
'#15803d',
'#166534',
'#14532d',
'#f3fcf0', // 0: 50
'#e3f8dc', // 1: 100
'#c6f0b7', // 2: 200
'#a0e589', // 3: 300
'#7bd760', // 4: 400
'#5ace3c', // 5: 500
'#3ec300', // 6: 600 (Primary)
'#309b00', // 7: 700
'#267b00', // 8: 800
'#206505', // 9: 900
];
export const infoColors: MantineColorsTuple = [
'#f0f9ff',
'#e0f2fe',
'#bae6fd',
'#7dd3fc',
'#38bdf8',
'#0ea5e9',
'#0284c7',
'#0369a1',
'#075985',
'#0c4a6e',
'#eef7ff', // 0: 50
'#d9efff', // 1: 100
'#b0ddff', // 2: 200
'#82c9ff', // 3: 300
'#54b5ff', // 4: 400
'#26a1ff', // 5: 500
'#0094ff', // 6: 600 (Primary)
'#0079d6', // 7: 700
'#0060ad', // 8: 800
'#004b87', // 9: 900
];
export const grayColors: MantineColorsTuple = [
@@ -104,4 +103,3 @@ export const darkColors: MantineColorsTuple = [
'#151828', // 8 Deep background (sidebar, nav)
'#0F1120', // 9 Deepest background
];