diff --git a/src/core/components/AskAi.tsx b/src/core/components/AskAi.tsx index 4ed56d9..7baaf25 100644 --- a/src/core/components/AskAi.tsx +++ b/src/core/components/AskAi.tsx @@ -51,7 +51,7 @@ export const AIUserPrompt = ({ blockId }: { blockId: string | undefined }) => {
setOpen(!open)} - className="flex cursor-pointer items-center justify-between border-b border-border py-2 text-sm font-bold text-muted-foreground hover:underline"> + className="flex cursor-pointer items-center justify-between border-t border-border py-2 text-sm font-medium hover:underline"> {t("Ask AI")} @@ -194,9 +194,9 @@ export const AISetContext = () => { collapsible> {/* @ts-ignore */} - +
- {t("AI Context")} + {t("AI Context")}
@@ -287,7 +287,7 @@ export const AISetContext = () => { export const AskAI = () => { const [ids] = useSelectedBlockIds(); return ( -
+
diff --git a/src/core/components/layout/RootLayout.tsx b/src/core/components/layout/RootLayout.tsx index 76951c5..6884f36 100644 --- a/src/core/components/layout/RootLayout.tsx +++ b/src/core/components/layout/RootLayout.tsx @@ -140,9 +140,9 @@ const RootLayout: ComponentType = () => { initial={{ width: 280 }} animate={{ width: 280 }} transition={{ duration: 0.3, ease: "easeInOut" }}> -
-
-

+
+
+

{panel === "ai" ? ( @@ -151,34 +151,25 @@ const RootLayout: ComponentType = () => { {t("AI Assistant")}
- ) : ( + ) : panel === "theme" ? (
- {panel === "theme" ? ( - <> - - - {t("Theme Settings")} - - - - ) : ( -
- - {t("Block Settings")} -
- )} + + + {t("Theme Settings")} + +
- )} + ) : null}

-
+
Loading...
}> {panel === "ai" ? : panel === "theme" ? : } diff --git a/src/core/components/settings/AskAiStyle.tsx b/src/core/components/settings/AskAiStyle.tsx index 44142b1..bb85cd0 100644 --- a/src/core/components/settings/AskAiStyle.tsx +++ b/src/core/components/settings/AskAiStyle.tsx @@ -33,8 +33,8 @@ export const AskAIStyles = ({ blockId }: { blockId: string | undefined }) => { value={prompt} onChange={(e) => setPrompt(e.target.value)} placeholder={t("Ask AI to edit styles")} - className="w-full border border-border focus:border-0" - rows={3} + className="no-scrollbar my-2 w-full border border-border p-2 text-xs" + rows={4} onKeyDown={(e) => { if (e.key === "Enter") { e.preventDefault(); diff --git a/src/core/components/settings/SettingsPanel.tsx b/src/core/components/settings/SettingsPanel.tsx index 4f84e2b..137186b 100644 --- a/src/core/components/settings/SettingsPanel.tsx +++ b/src/core/components/settings/SettingsPanel.tsx @@ -9,6 +9,7 @@ import { ErrorBoundary } from "react-error-boundary"; import { BlockAttributesEditor } from "./new-panel/BlockAttributesEditor.tsx"; import { ChevronDown } from "lucide-react"; import { FallbackError } from "../FallbackError.tsx"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../ui/index.ts"; function BlockAttributesToggle() { const { t } = useTranslation(); @@ -21,7 +22,7 @@ function BlockAttributesToggle() { <>
setShowAttributes(!showAttributes)} - className="flex cursor-pointer items-center justify-between border-b border-border py-2 text-sm font-bold text-muted-foreground hover:underline"> + className="flex cursor-pointer items-center justify-between border-b border-border py-2 text-sm font-medium hover:underline"> {t("Attributes")} @@ -49,16 +50,27 @@ const SettingsPanel: React.FC = () => { return ( } onError={onErrorFn}> -
- -
- - - -
-
-
-
+ + + + Settings + + + Styles + + + + +
+
+
+ + + +
+
+
+
); }; diff --git a/src/core/components/settings/new-panel/SettingSection.tsx b/src/core/components/settings/new-panel/SettingSection.tsx index 7e0534f..f685a1b 100644 --- a/src/core/components/settings/new-panel/SettingSection.tsx +++ b/src/core/components/settings/new-panel/SettingSection.tsx @@ -92,7 +92,7 @@ export const StylingGroup = ({ section }: any) => {
-
{startCase(t(section.heading))}
+
{startCase(t(section.heading))}
diff --git a/src/core/components/sidepanels/panels/theme-configuration/BorderRadiusInput.tsx b/src/core/components/sidepanels/panels/theme-configuration/BorderRadiusInput.tsx index 58fc8c1..6bdde43 100644 --- a/src/core/components/sidepanels/panels/theme-configuration/BorderRadiusInput.tsx +++ b/src/core/components/sidepanels/panels/theme-configuration/BorderRadiusInput.tsx @@ -18,7 +18,7 @@ const BorderRadiusInput = ({ value, onChange, disabled }: BorderRadiusInputProps disabled={disabled} defaultValue={value.replace("px", "")} onChange={(e) => throttledChange(e.target.value)} - className="flex-1" + className="flex-1 cursor-pointer" /> ); }; diff --git a/src/core/components/sidepanels/panels/theme-configuration/FontSelector.tsx b/src/core/components/sidepanels/panels/theme-configuration/FontSelector.tsx index fa8a04d..d8d3b65 100644 --- a/src/core/components/sidepanels/panels/theme-configuration/FontSelector.tsx +++ b/src/core/components/sidepanels/panels/theme-configuration/FontSelector.tsx @@ -64,12 +64,11 @@ const FontSelector = ({ value: string; onChange: (value: string) => void; }) => { - return ( -
- +
+ handlePresetChange(e.target.value)} - className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"> + className="w-full space-y-0.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"> {Array.isArray(themePresets) && themePresets.map((preset: any) => ( @@ -176,13 +173,10 @@ const ThemeConfigPanel: React.FC = React.memo(({ className = " {/* Border Radius Section */} {chaiThemeOptions?.borderRadius && ( -
-

{t("Border Radius")}

-
- +
+ +
+ {themeValues.borderRadius}
@@ -190,14 +184,9 @@ const ThemeConfigPanel: React.FC = React.memo(({ className = " {/* Colors Section with Mode Switch */} {chaiThemeOptions?.colors && ( -
-
-
-

{t("Colors")}

-
-
- -
+
+ +
{chaiThemeOptions.colors.map((group) => renderColorGroup(group))}
@@ -207,7 +196,7 @@ const ThemeConfigPanel: React.FC = React.memo(({ className = "


- +
); });