mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
🧹 refactor: Clear Raw-Color and Unknown-Class Suppressions in Panels (#16818)
This commit is contained in:
parent
32ae2fd7c4
commit
a66b479ffe
7 changed files with 13 additions and 29 deletions
|
|
@ -52,8 +52,8 @@ const PromptTextCard = ({ mainText }: PromptTextCardProps) => {
|
|||
}, [mainText, showToast, localize, isCopied]);
|
||||
|
||||
return (
|
||||
<div className="relative flex h-full flex-col rounded-xl border border-border-medium bg-transparent">
|
||||
<div className="absolute right-2 top-2 z-10">
|
||||
<div className="border-border-medium relative flex h-full flex-col rounded-xl border bg-transparent">
|
||||
<div className="absolute top-2 right-2 z-10">
|
||||
<TooltipAnchor
|
||||
description={isCopied ? localize('com_ui_copied') : localize('com_ui_copy')}
|
||||
render={
|
||||
|
|
@ -67,7 +67,7 @@ const PromptTextCard = ({ mainText }: PromptTextCardProps) => {
|
|||
}
|
||||
aria-live="polite"
|
||||
>
|
||||
<MorphIcon icon={isCopied ? Check : Copy} className="size-4 text-text-secondary" />
|
||||
<MorphIcon icon={isCopied ? Check : Copy} className="text-text-secondary size-4" />
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
|
@ -88,7 +88,7 @@ const PromptTextCard = ({ mainText }: PromptTextCardProps) => {
|
|||
]}
|
||||
/** @ts-ignore */
|
||||
components={{ p: PromptVariableGfm, code: codeNoExecution }}
|
||||
className="markdown prose dark:prose-invert light my-1 max-w-none break-words text-text-primary"
|
||||
className="markdown prose light text-text-primary my-1 max-w-none break-words"
|
||||
>
|
||||
{mainText}
|
||||
</ReactMarkdown>
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ const PromptEditor: React.FC<Props> = ({ name, isEditing, setIsEditing }) => {
|
|||
rehypePlugins={rehypePlugins}
|
||||
/** @ts-ignore */
|
||||
components={{ p: PromptVariableGfm, code: codeNoExecution }}
|
||||
className="markdown prose dark:prose-invert light text-text-primary w-full break-words"
|
||||
className="markdown prose light text-text-primary w-full break-words"
|
||||
>
|
||||
{field.value}
|
||||
</ReactMarkdown>
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ export default function VariableForm({
|
|||
return (
|
||||
<div className="mx-auto p-1 md:container">
|
||||
<form onSubmit={handleSubmit(onSubmit)} className="space-y-4">
|
||||
<div className="mb-6 max-h-screen max-w-[80vw] overflow-auto rounded-md bg-surface-tertiary p-4 text-text-secondary sm:max-w-full md:max-h-96">
|
||||
<div className="bg-surface-tertiary text-text-secondary mb-6 max-h-screen max-w-[80vw] overflow-auto rounded-md p-4 sm:max-w-full md:max-h-96">
|
||||
<ReactMarkdown
|
||||
/** @ts-ignore */
|
||||
remarkPlugins={[supersub, remarkGfm, [remarkMath, { singleDollarTextMath: false }]]}
|
||||
|
|
@ -157,7 +157,7 @@ export default function VariableForm({
|
|||
]}
|
||||
/** @ts-ignore */
|
||||
components={{ code: codeNoExecution, p: PromptVariableGfm }}
|
||||
className="markdown prose dark:prose-invert light my-1 max-h-[50vh] max-w-full break-words"
|
||||
className="markdown prose light my-1 max-h-[50vh] max-w-full break-words"
|
||||
>
|
||||
{generateHighlightedMarkdown()}
|
||||
</ReactMarkdown>
|
||||
|
|
@ -176,7 +176,7 @@ export default function VariableForm({
|
|||
placeholder={field.config.variable}
|
||||
className={cn(
|
||||
defaultTextProps,
|
||||
'mb-1 rounded px-3 py-2 focus:bg-surface-tertiary',
|
||||
'focus:bg-surface-tertiary mb-1 rounded px-3 py-2',
|
||||
)}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
|
|
@ -196,7 +196,7 @@ export default function VariableForm({
|
|||
id={`fields.${index}.value`}
|
||||
className={cn(
|
||||
defaultTextProps,
|
||||
'peer rounded px-3 py-2 focus:bg-surface-tertiary',
|
||||
'peer focus:bg-surface-tertiary rounded px-3 py-2',
|
||||
)}
|
||||
placeholder=""
|
||||
maxRows={8}
|
||||
|
|
@ -204,7 +204,7 @@ export default function VariableForm({
|
|||
/>
|
||||
<label
|
||||
htmlFor={`fields.${index}.value`}
|
||||
className="absolute left-3 top-0 text-sm text-text-secondary transition-all duration-200 peer-focus:-top-6 peer-focus:left-1 peer-focus:text-xs peer-focus:text-text-primary peer-[:not(:placeholder-shown)]:-top-6 peer-[:not(:placeholder-shown)]:left-1 peer-[:not(:placeholder-shown)]:text-xs"
|
||||
className="text-text-secondary peer-focus:text-text-primary absolute top-0 left-3 text-sm transition-all duration-200 peer-focus:-top-6 peer-focus:left-1 peer-focus:text-xs peer-[:not(:placeholder-shown)]:-top-6 peer-[:not(:placeholder-shown)]:left-1 peer-[:not(:placeholder-shown)]:text-xs"
|
||||
>
|
||||
{field.config.variable}
|
||||
</label>
|
||||
|
|
|
|||
|
|
@ -156,8 +156,7 @@ function SkillMarkdownRenderer({
|
|||
components={components as unknown as Record<string, React.ElementType>}
|
||||
urlTransform={skillUrlTransform}
|
||||
className={
|
||||
className ??
|
||||
'markdown prose dark:prose-invert light w-full break-words leading-[1.65rem] text-text-primary'
|
||||
className ?? 'markdown prose light text-text-primary w-full leading-[1.65rem] break-words'
|
||||
}
|
||||
>
|
||||
{content}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ const SkillContentEditor: React.FC<SkillContentEditorProps> = ({
|
|||
/** @ts-ignore - PluggableList vs Pluggable[] shape drift */
|
||||
rehypePlugins={REHYPE_PLUGINS}
|
||||
components={MARKDOWN_COMPONENTS as unknown as Record<string, React.ElementType>}
|
||||
className="markdown prose dark:prose-invert light text-text-primary w-full break-words"
|
||||
className="markdown prose light text-text-primary w-full break-words"
|
||||
>
|
||||
{field.value}
|
||||
</ReactMarkdown>
|
||||
|
|
|
|||
|
|
@ -1329,7 +1329,7 @@ html:not(.high-contrast) .markdown :is(th, td):last-child {
|
|||
--tw-text-opacity: 1;
|
||||
color: rgba(64, 65, 79, var(--tw-text-opacity));
|
||||
}
|
||||
.dark .dark\:prose-invert {
|
||||
.dark .prose {
|
||||
--tw-prose-body: var(--tw-prose-invert-body);
|
||||
--tw-prose-headings: var(--tw-prose-invert-headings);
|
||||
--tw-prose-lead: var(--tw-prose-invert-lead);
|
||||
|
|
|
|||
|
|
@ -1274,9 +1274,6 @@
|
|||
"client/src/components/Prompts/display/PromptTextCard.tsx": {
|
||||
"shadcn/no-restyle": {
|
||||
"count": 2
|
||||
},
|
||||
"shadcn/no-unknown-classes": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"client/src/components/Prompts/display/PromptVariables.tsx": {
|
||||
|
|
@ -1292,9 +1289,6 @@
|
|||
"client/src/components/Prompts/editor/PromptEditor.tsx": {
|
||||
"shadcn/no-restyle": {
|
||||
"count": 11
|
||||
},
|
||||
"shadcn/no-unknown-classes": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"client/src/components/Prompts/editor/VariablesDropdown.tsx": {
|
||||
|
|
@ -1337,9 +1331,6 @@
|
|||
"shadcn/no-restyle": {
|
||||
"count": 8
|
||||
},
|
||||
"shadcn/no-unknown-classes": {
|
||||
"count": 1
|
||||
},
|
||||
"shadcn/require-static-classes": {
|
||||
"count": 2
|
||||
}
|
||||
|
|
@ -1869,9 +1860,6 @@
|
|||
"client/src/components/Skills/display/SkillMarkdownRenderer.tsx": {
|
||||
"shadcn/no-arbitrary-values": {
|
||||
"count": 1
|
||||
},
|
||||
"shadcn/no-unknown-classes": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"client/src/components/Skills/display/SkillState.tsx": {
|
||||
|
|
@ -1887,9 +1875,6 @@
|
|||
"client/src/components/Skills/forms/SkillContentEditor.tsx": {
|
||||
"shadcn/no-restyle": {
|
||||
"count": 13
|
||||
},
|
||||
"shadcn/no-unknown-classes": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"client/src/components/Skills/forms/SkillForm.tsx": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue