Refactor styles and class names in multiple components, update color variables, and adjust button and control styles.
- Simplify class names in the SingleAlert component and update color variables. - Update class names and color variables in the Dialog component. - Update color variables in the constants file. - Update color variables and class names in the index.css file. - Update class names and color variables in the PageComponent file. - Add a color variable for shared blur styles. - Update Tailwind CSS configuration to include new color variables. Note: These changes improve code readability and maintain color consistency throughout the application.
This commit is contained in:
parent
c0dbafe49f
commit
27b17a13c2
6 changed files with 43 additions and 25 deletions
|
|
@ -62,34 +62,34 @@ export default function SingleAlert({
|
||||||
removeAlert(dropItem.id);
|
removeAlert(dropItem.id);
|
||||||
}, 500);
|
}, 500);
|
||||||
}}
|
}}
|
||||||
className="inline-flex rounded-md bg-red-50 p-1.5 text-status-red"
|
className="inline-flex rounded-md p-1.5 text-status-red"
|
||||||
>
|
>
|
||||||
<span className="sr-only">Dismiss</span>
|
<span className="sr-only">Dismiss</span>
|
||||||
<X className="h-5 w-5" aria-hidden="true" />
|
<X className="h-4 w-4 text-error-foreground" aria-hidden="true" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : type === "notice" ? (
|
) : type === "notice" ? (
|
||||||
<div
|
<div
|
||||||
className="flex rounded-md bg-blue-50 p-3 mb-2 mx-2"
|
className="flex rounded-md bg-info-background p-3 mb-2 mx-2"
|
||||||
key={dropItem.id}
|
key={dropItem.id}
|
||||||
>
|
>
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
<Info
|
<Info
|
||||||
className="h-5 w-5 text-medium-dark-blue"
|
className="h-5 w-5 text-info-background"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="ml-3 flex-1 md:flex md:justify-between">
|
<div className="ml-3 flex-1 md:flex md:justify-between">
|
||||||
<p className="text-sm text-medium-dark-blue">
|
<p className="text-sm text-info-background">
|
||||||
{dropItem.title}
|
{dropItem.title}
|
||||||
</p>
|
</p>
|
||||||
<p className="mt-3 text-sm md:mt-0 md:ml-6">
|
<p className="mt-3 text-sm md:mt-0 md:ml-6">
|
||||||
{dropItem.link ? (
|
{dropItem.link ? (
|
||||||
<Link
|
<Link
|
||||||
to={dropItem.link}
|
to={dropItem.link}
|
||||||
className="whitespace-nowrap font-medium text-medium-dark-blue hover:text-ring"
|
className="whitespace-nowrap font-medium text-info-background hover:text-ring"
|
||||||
>
|
>
|
||||||
Details
|
Details
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -108,17 +108,17 @@ export default function SingleAlert({
|
||||||
removeAlert(dropItem.id);
|
removeAlert(dropItem.id);
|
||||||
}, 500);
|
}, 500);
|
||||||
}}
|
}}
|
||||||
className="inline-flex rounded-md bg-blue-50 p-1.5 text-medium-dark-blue "
|
className="inline-flex rounded-md p-1.5 text-info-foreground"
|
||||||
>
|
>
|
||||||
<span className="sr-only">Dismiss</span>
|
<span className="sr-only">Dismiss</span>
|
||||||
<X className="h-5 w-5" aria-hidden="true" />
|
<X className="h-4 w-4 text-info-foreground" aria-hidden="true" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
className="flex bg-green-50 p-3 mb-2 mx-2 rounded-md"
|
className="flex bg-success-background p-3 mb-2 mx-2 rounded-md"
|
||||||
key={dropItem.id}
|
key={dropItem.id}
|
||||||
>
|
>
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
|
|
@ -142,10 +142,10 @@ export default function SingleAlert({
|
||||||
removeAlert(dropItem.id);
|
removeAlert(dropItem.id);
|
||||||
}, 500);
|
}, 500);
|
||||||
}}
|
}}
|
||||||
className="inline-flex rounded-md bg-success-background p-1.5 text-status-green"
|
className="inline-flex rounded-md p-1.5 text-status-green"
|
||||||
>
|
>
|
||||||
<span className="sr-only">Dismiss</span>
|
<span className="sr-only">Dismiss</span>
|
||||||
<X className="h-5 w-5" aria-hidden="true" />
|
<X className="h-4 w-4 text-success-foreground" aria-hidden="true" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const DialogOverlay = React.forwardRef<
|
||||||
<DialogPrimitive.Overlay
|
<DialogPrimitive.Overlay
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"fixed inset-0 z-50 bg-secondary/80 backdrop-blur-sm transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",
|
"fixed inset-0 z-50 bg-blur-shared backdrop-blur-sm transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ export const EXPORT_CODE_DIALOG =
|
||||||
* @constant
|
* @constant
|
||||||
*/
|
*/
|
||||||
export const INPUT_STYLE =
|
export const INPUT_STYLE =
|
||||||
"focus:tw-ring-none focus:ring-ring bg-background focus:outline-none";
|
"focus:tw-ring-none focus-visible:outline-none focus:ring-ring bg-background focus:outline-none";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,39 +34,45 @@
|
||||||
--build-trigger: #dc735b;
|
--build-trigger: #dc735b;
|
||||||
--chat-trigger: #5c8be1;
|
--chat-trigger: #5c8be1;
|
||||||
|
|
||||||
--error-background: #fef2f2;
|
|
||||||
--error-foreground: #991b1b;
|
|
||||||
|
|
||||||
--status-red: #ef4444;
|
--status-red: #ef4444;
|
||||||
--status-yellow: #eab308;
|
--status-yellow: #eab308;
|
||||||
--status-green: #4ade80;
|
--status-green: #4ade80;
|
||||||
|
|
||||||
|
--error-background: #fef2f2;
|
||||||
|
--error-foreground: #991b1b;
|
||||||
|
|
||||||
--success-background: #f0fdf4;
|
--success-background: #f0fdf4;
|
||||||
--success-foreground: #14532d;
|
--success-foreground: #14532d;
|
||||||
|
|
||||||
|
--info-background: #f0f4fd;
|
||||||
|
--info-foreground: #141653;
|
||||||
|
|
||||||
--high-indigo: #4338ca;
|
--high-indigo: #4338ca;
|
||||||
--medium-indigo: #6366f1;
|
--medium-indigo: #6366f1;
|
||||||
--medium-dark-blue:#1d4ed8;
|
--medium-dark-blue:#1d4ed8;
|
||||||
|
|
||||||
|
/* Colors that are shared in dark and light mode */
|
||||||
|
--blur-shared: #151923de;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
--background: 224 71% 4%; /* hsl(224 71% 4%) */
|
--background: 224 35% 7.5%; /* hsl(224 40% 10%) */
|
||||||
--foreground: 213 31% 85%; /* hsl(213 31% 91%) */
|
--foreground: 213 31% 85%; /* hsl(213 31% 91%) */
|
||||||
|
|
||||||
--muted: 223 40% 11%; /* hsl(223 47% 11%) */
|
--muted: 223 27% 11%; /* hsl(223 27% 11%) */
|
||||||
--muted-foreground: 215.4 16.3% 56.9%; /* hsl(215 16% 56%) */
|
--muted-foreground: 215.4 16.3% 56.9%; /* hsl(215 16% 56%) */
|
||||||
|
|
||||||
--popover: 224 71% 4%; /* hsl(224 71% 4%) */
|
--popover: 224 71% 4%; /* hsl(224 71% 4%) */
|
||||||
--popover-foreground: 215 20.2% 65.1%; /* hsl(215 20% 65%) */
|
--popover-foreground: 215 20.2% 65.1%; /* hsl(215 20% 65%) */
|
||||||
|
|
||||||
--card: 224 71% 7%; /* hsl(224 71% 4%) */
|
--card: 224 25% 15.5%; /* hsl(224 71% 4%) */
|
||||||
--card-foreground: 213 31% 80%; /* hsl(213 31% 91%) */
|
--card-foreground: 213 31% 80%; /* hsl(213 31% 91%) */
|
||||||
|
|
||||||
--border: 216 24% 17%; /* hsl(216 34% 17%) */
|
--border: 216 24% 17%; /* hsl(216 34% 17%) */
|
||||||
--input: 216 24% 17%; /* hsl(216 34% 17%) */
|
--input: 216 24% 17%; /* hsl(216 34% 17%) */
|
||||||
|
|
||||||
--primary: 210 40% 80%; /* hsl(210 40% 98%) */
|
--primary: 210 20% 80%; /* hsl(210 40% 98%) */
|
||||||
--primary-foreground: 222.2 47.4% 1.2%; /* hsl(222 47% 1%) */
|
--primary-foreground: 222.2 27.4% 1.2%; /* hsl(222 47% 1%) */
|
||||||
|
|
||||||
--secondary: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
|
--secondary: 222.2 47.4% 11.2%; /* hsl(222 47% 11%) */
|
||||||
--secondary-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
|
--secondary-foreground: 210 40% 98%; /* hsl(210 40% 98%) */
|
||||||
|
|
@ -86,18 +92,26 @@
|
||||||
--build-trigger: #dc735b;
|
--build-trigger: #dc735b;
|
||||||
--chat-trigger: #5c8be1;
|
--chat-trigger: #5c8be1;
|
||||||
|
|
||||||
--error-foreground: #c2b7b7;
|
|
||||||
--error-background: #671212;
|
|
||||||
|
|
||||||
--status-red: #ef4444;
|
--status-red: #ef4444;
|
||||||
--status-yellow: #eab308;
|
--status-yellow: #eab308;
|
||||||
--status-green: #4ade80;
|
--status-green: #4ade80;
|
||||||
|
|
||||||
--success-background: #f0fdf4;
|
--success-background: #f0fdf4;
|
||||||
--success-foreground: #14532d;
|
--success-foreground: #14532d;
|
||||||
|
|
||||||
|
--error-foreground: #c2b7b7;
|
||||||
|
--error-background: #3e1818;
|
||||||
|
|
||||||
|
--info-foreground: #b7b8c2;
|
||||||
|
--info-background: #18243e;
|
||||||
|
|
||||||
|
|
||||||
--high-indigo: #4338ca;
|
--high-indigo: #4338ca;
|
||||||
--medium-indigo: #6366f1;
|
--medium-indigo: #6366f1;
|
||||||
--medium-dark-blue:#1d4ed8;
|
--medium-dark-blue:#1d4ed8;
|
||||||
|
|
||||||
|
/* Colors that are shared in dark and light mode */
|
||||||
|
--blur-shared: #151923d2;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
|
|
|
||||||
|
|
@ -402,7 +402,8 @@ export default function Page({ flow }: { flow: FlowType }) {
|
||||||
maxZoom={8}
|
maxZoom={8}
|
||||||
>
|
>
|
||||||
<Background className="" />
|
<Background className="" />
|
||||||
<Controls className="[&>button]:text-black"></Controls>
|
<Controls className="text-primary stroke-foreground [&>button]:border-b-border hover:[&>button]:bg-border
|
||||||
|
fill-foreground bg-muted"></Controls>
|
||||||
</ReactFlow>
|
</ReactFlow>
|
||||||
<Chat flow={flow} reactFlowInstance={reactFlowInstance} />
|
<Chat flow={flow} reactFlowInstance={reactFlowInstance} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ module.exports = {
|
||||||
'btn-shadow': "var(--round-btn-shadow)",
|
'btn-shadow': "var(--round-btn-shadow)",
|
||||||
'build-trigger': "var(--build-trigger)",
|
'build-trigger': "var(--build-trigger)",
|
||||||
'chat-trigger': "var(--chat-trigger)",
|
'chat-trigger': "var(--chat-trigger)",
|
||||||
|
'blur-shared': "var(--blur-shared)",
|
||||||
'dark-blue': "var(--dark-blue)",
|
'dark-blue': "var(--dark-blue)",
|
||||||
'dark-gray': "var(--dark-gray)",
|
'dark-gray': "var(--dark-gray)",
|
||||||
'dark-red': "var(--dark-red)",
|
'dark-red': "var(--dark-red)",
|
||||||
|
|
@ -36,6 +37,8 @@ module.exports = {
|
||||||
'high-dark-gray': "var(--high-dark-gray)",
|
'high-dark-gray': "var(--high-dark-gray)",
|
||||||
'high-indigo': "var(--high-indigo)",
|
'high-indigo': "var(--high-indigo)",
|
||||||
'high-light-gray': "var(--high-light-gray)",
|
'high-light-gray': "var(--high-light-gray)",
|
||||||
|
'info-background': "var(--info-background)",
|
||||||
|
'info-foreground': "var(--info-foreground)",
|
||||||
'light-blue': "var(--light-blue)",
|
'light-blue': "var(--light-blue)",
|
||||||
'light-gray': "var(--light-gray)",
|
'light-gray': "var(--light-gray)",
|
||||||
'light-slate': "var(--light-slate)",
|
'light-slate': "var(--light-slate)",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue