Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

<Input> component horizontal padding adjustment (#11418)

Jimmy Ben Klievecc00c3ec93d1
diff --git a/web/src/components/ui/input.tsx b/web/src/components/ui/input.tsx
index 20fe404600..7eb1c0fe44 100644
--- a/web/src/components/ui/input.tsx
+++ b/web/src/components/ui/input.tsx
@@ -45,9 +45,9 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent-primary',
'disabled:cursor-not-allowed disabled:opacity-50 transition-colors',
{
- 'pl-12': !!prefix,
- 'pr-12': !!suffix || isPasswordInput,
- 'pr-24': !!suffix && isPasswordInput,
+ 'pl-[calc(1em+1.25rem)]': !!prefix,
+ 'pr-[calc(1em+1.25rem)]': !!suffix || isPasswordInput,
+ 'pr-[calc(2em+2rem)]': !!suffix && isPasswordInput,
},
type === 'number' &&
'[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none',
diff --git a/web/src/pages/admin/components/theme-switch.tsx b/web/src/pages/admin/components/theme-switch.tsx
index bfcfb32123..1f4dde3e96 100644
--- a/web/src/pages/admin/components/theme-switch.tsx
+++ b/web/src/pages/admin/components/theme-switch.tsx
@@ -25,8 +25,8 @@ const ThemeSwitch = forwardRef<
setTheme(value ? ThemeEnum.Dark : ThemeEnum.Light)
}
>
- <div className="self-center p-3 py-2 rounded-full bg-bg-card transition-[background-color] duration-300">
- <div className="h-full flex items-center justify-between gap-4 relative z-[1] text-text-disabled transition-[text-color] duration-300 delay-75">
+ <div className="self-center p-3 py-2 rounded-full bg-bg-card transition-[background-color]">
+ <div className="h-full flex items-center justify-between gap-4 relative z-[1] text-text-disabled transition-[text-color]">
<LucideSun
className={cn('size-[1em]', !isDark && 'text-text-primary')}
/>
@@ -39,7 +39,7 @@ const ThemeSwitch = forwardRef<
<Thumb
className={cn(
'absolute top-0 left-0 w-[calc(50%+.25rem)] p-0.5 h-full rounded-full overflow-hidden',
- 'transition-all ease-out duration-300',
+ 'transition-all ease-out',
'group-hover/theme-switch:w-[calc(50%+.66rem)] group-focus-visible/theme-switch:w-[calc(50%+.66rem)]',
{
'left-[calc(50%-.25rem)] group-hover/theme-switch:left-[calc(50%-.66rem)] group-focus-visible/theme-switch:left-[calc(50%-.66rem)]':
@@ -47,12 +47,7 @@ const ThemeSwitch = forwardRef<
},
)}
>
- <div
- className="
- size-full rounded-full bg-bg-base shadow-md
- transition-colors ease-out duration-300 delay-75
- "
- />
+ <div className="size-full rounded-full bg-bg-base shadow-md transition-colors ease-out" />
</Thumb>
</Root>
);