#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
Consolidate buttons and related components (#6787)
EthanHealy018ba8f69252ae
diff --git a/frontend/.storybook/declarations.d.ts b/frontend/.storybook/declarations.d.tsnew file mode 100644index 0000000000..ef6d741f62--- /dev/null+++ b/frontend/.storybook/declarations.d.ts@@ -0,0 +1 @@+declare module "*.css" {}diff --git a/frontend/.storybook/preview.tsx b/frontend/.storybook/preview.tsxindex cd601cf525..bab413a0e8 100644--- a/frontend/.storybook/preview.tsx+++ b/frontend/.storybook/preview.tsx@@ -14,7 +14,7 @@ void React;import { TierProvider, type Tier } from "@portal/contexts/TierContext";import { LinkProvider, type LinkState } from "@portal/contexts/LinkContext";-import { ThemeProvider } from "@portal/contexts/ThemeContext";+import { ThemeProvider, useTheme } from "@portal/contexts/ThemeContext";import { UIProvider } from "@portal/contexts/UIContext";import { SuiProvider } from "@portal/theme/SuiProvider";import { handlers } from "@portal/mocks/handlers";@@ -78,13 +78,21 @@ function TierKey({);}-/** Keeps useTheme() and the data-theme attribute in sync. */-function ThemeWatcher() {+/**+ * Makes the Storybook toolbar the SINGLE source of truth for the theme.+ */+function ThemeBridge({+ theme,+ children,+}: {+ theme: "light" | "dark";+ children: React.ReactNode;+}) {+ const { setTheme } = useTheme();useEffect(() => {- // The addon-themes decorator already sets data-theme on <html>.- // We just read it on mount so ThemeProvider picks it up.- }, []);- return null;+ setTheme(theme);+ }, [theme, setTheme]);+ return <>{children}</>;}const withProviders: Decorator = (Story, context) => {@@ -101,20 +109,21 @@ const withProviders: Decorator = (Story, context) => {return (<MemoryRouter initialEntries={["/"]}><ThemeProvider>- <SuiProvider colorScheme={colorScheme}>- {/* LinkProvider must wrap TierProvider: TierContext derives its tier- from useLink() (matches App.tsx's nesting). */}- <LinkProvider key={linkState} initialState={linkState}>- <TierKey tier={tier}>- <UIProvider>- <ThemeWatcher />- <Suspense fallback={null}>- <Story />- </Suspense>- </UIProvider>- </TierKey>- </LinkProvider>- </SuiProvider>+ <ThemeBridge theme={colorScheme}>+ <SuiProvider colorScheme={colorScheme}>+ {/* LinkProvider must wrap TierProvider: TierContext derives its tier+ from useLink() (matches App.tsx's nesting). */}+ <LinkProvider key={linkState} initialState={linkState}>+ <TierKey tier={tier}>+ <UIProvider>+ <Suspense fallback={null}>+ <Story />+ </Suspense>+ </UIProvider>+ </TierKey>+ </LinkProvider>+ </SuiProvider>+ </ThemeBridge></ThemeProvider></MemoryRouter>);diff --git a/frontend/.storybook/tsconfig.json b/frontend/.storybook/tsconfig.jsonnew file mode 100644index 0000000000..9615d34a22--- /dev/null+++ b/frontend/.storybook/tsconfig.json@@ -0,0 +1,24 @@+{+ "compilerOptions": {+ "target": "es2022",+ "jsx": "react-jsx",+ "module": "esnext",+ "moduleResolution": "bundler",+ "paths": {+ "@app/*": [+ "../editor/src/desktop/*",+ "../editor/src/proprietary/*",+ "../editor/src/core/*"+ ],+ "@core/*": ["../editor/src/core/*"],+ "@proprietary/*": ["../editor/src/proprietary/*"],+ "@portal/*": ["../editor/src/portal/*"]+ },+ "resolveJsonModule": true,+ "esModuleInterop": true,+ "forceConsistentCasingInFileNames": true,+ "strict": true,+ "skipLibCheck": true+ },+ "include": ["./**/*"]+}diff --git a/frontend/editor/public/locales/en-US/translation.toml b/frontend/editor/public/locales/en-US/translation.tomlindex 241289d1db..6d827eb895 100644--- a/frontend/editor/public/locales/en-US/translation.toml+++ b/frontend/editor/public/locales/en-US/translation.toml@@ -7,6 +7,7 @@ black = "Black"blue = "Blue"cancel = "Cancel"chooseFile = "Choose File"+clear = "Clear"close = "Close"comingSoon = "Coming soon"confirm = "Confirm"@@ -87,6 +88,7 @@ processingCompleteMultiple = "{{count}} files are ready."property = "Property"quickPosition = "Quick Position"red = "Red"+remove = "Remove"reset = "Reset"review = "Review"save = "Save"@@ -180,6 +182,7 @@ addMoreFiles = "Add more files..."attachments = "Select Attachments"info = "Select files to attach to your PDF. These files will be embedded and accessible through the PDF's attachment panel."placeholder = "Choose files..."+removeFile = "Remove file"selectedFiles = "Selected Files"submit = "Add Attachments"@@ -1628,6 +1631,9 @@ title = "Do you want to help make Stirling PDF better?"tags = "annotate,highlight,draw,markup,comment,notes,review,redline,feedback,markup tools,sticky notes,shapes,arrows,text box,freehand"[annotation]+alignCenter = "Align center"+alignLeft = "Align left"+alignRight = "Align right"annotationStyle = "Annotation style"backgroundColor = "Background color"borderOff = "Border: Off"@@ -2531,6 +2537,7 @@ title = "Rule of thumb"[certSign.source]device = "This device"+noOtherSources = "No other certificate sources are available."server = "Server"stepTitle = "Certificate source"upload = "Upload"@@ -3595,7 +3602,9 @@ makeCopy = "Make a copy"mobileShort = "Mobile"mobileUpload = "Mobile Upload"mobileUploadNotAvailable = "Mobile upload not enabled"+moreOptions = "More options"myFiles = "My Files"+nextFile = "Next file"noFiles = "No files available"noFilesFound = "No files found matching your search"noRecentFiles = "No recent files found"@@ -3605,6 +3614,7 @@ openInFileEditor = "Open in File Editor"openInPageEditor = "Open in Page Editor"owner = "Owner"ownerUnknown = "Unknown"+previousFile = "Previous file"recent = "Recent"removeBoth = "Remove from both"removeFilePrompt = "This file is saved on this device and on your server. Where would you like to remove it from?"@@ -4614,10 +4624,10 @@ welcomeTitle = "You've been invited!"[landing]addFiles = "Add Files"heroSubtitle = "Drop in or add an existing PDF to get started."-heroTitle = "Stirling PDF"mobileUpload = "Upload from Mobile"openFromComputer = "Open from computer"uploadFromComputer = "Upload from computer"+workbenchEmptyStateHero = "Drop a PDF anywhere"[language]direction = "ltr"@@ -4930,6 +4940,7 @@ title = "Output"[onboarding]activeFiles = "The <strong>Active Files</strong> view shows all of the PDFs you have loaded into the tool, and allows you to select which ones to process."allTools = "This is the <strong>Tools</strong> panel, where you can browse and select from all available PDF tools."+close = "Close"cropSettings = "Now that we've selected the file we want crop, we can configure the Crop tool to choose the area that we want to crop the PDF to."fileCheckbox = "Clicking one of the files selects it for processing. You can select multiple files for batch operations."fileReplacement = "The modified file will replace the original file in the Workbench automatically, allowing you to easily run it through more tools."@@ -4955,6 +4966,7 @@ skipTheTour = "Skip the tour"[onboarding.desktopInstall]body = "Stirling works best as a desktop app. You can use it offline, access documents faster, and make edits locally on your computer."+selectOs = "Select operating system"title = "Download"titleWithOs = "Download for {{osLabel}}"@@ -5566,7 +5578,9 @@ viewLabel = "PDF Editor"[pdfTextEditor.actions]applyChanges = "Apply Changes"+clearText = "Clear text"downloadCopy = "Download Copy"+moreOptions = "More options"reset = "Reset Changes"[pdfTextEditor.badges]@@ -9670,7 +9684,9 @@ memberRemoved = "Member removed successfully"namePlaceholder = "Enter team name"personal = "Personal"removeError = "Failed to remove member"+renameCancel = "Cancel rename"renameError = "Failed to rename team"+renameSubmit = "Save team name"renameSuccess = "Team renamed successfully"[team.invitationBanner]@@ -9686,6 +9702,7 @@ sendButton = "Send Invitation"title = "Invite Team Member"[team.members]+actions = "Member actions"emailColumn = "Email"empty = "No team members yet"nameColumn = "Name"@@ -10041,14 +10058,23 @@ zoomOut = "Zoom Out"[viewer.attachments]addAttachment = "Add attachment"close = "Close attachments"+closeSidebar = "Close attachments sidebar"+download = "Download attachment"empty = "No attachments in this document"loading = "Loading attachments..."noDocument = "Open a PDF to view its attachments."noMatch = "No attachments match your search"noSupport = "Attachment support is unavailable for this viewer."+retry = "Retry"searchPlaceholder = "Search attachments"title = "Attachments"+[viewer.bookmarks]+bookmarkTitle = "Bookmark title"+closeSidebar = "Close bookmarks sidebar"+collapseAll = "Collapse all bookmarks"+expandAll = "Expand all bookmarks"+[viewer.comments]addComment = "Add comment"addCommentPlaceholder = "Add comment..."@@ -10059,6 +10085,7 @@ clearAll = "Clear all comments"clearAllDescription = "This removes comments and replies from the sidebar while keeping any attached annotations in the document."clearAllTitle = "Clear all comments?"close = "Close comments"+closeSidebar = "Close comments sidebar"deleteAnnotationAndComment = "Delete annotation & comment"deleteDescription = "This annotation has a comment attached. You can remove just the comment from the sidebar while keeping the annotation, or delete everything."deleteTitle = "Remove annotation from comments?"@@ -10090,6 +10117,11 @@ title = "Form Fields"unsavedBadge = "Unsaved"unsavedDesc = "You have unsaved changes"+[viewer.layers]+closeSidebar = "Close layers sidebar"+hideAll = "Hide all layers"+showAll = "Show all layers"+[viewer.link]delete = "Delete link"@@ -10120,6 +10152,9 @@ resultsOf = "of {{total}}"[viewer.signature]delete = "Delete signature"+[viewer.thumbnails]+closeSidebar = "Close thumbnails sidebar"+[viewPdf]tags = "view,read,annotate,text,image,highlight,edit"title = "View/Edit PDF"@@ -10546,6 +10581,7 @@ loading = "Loading people..."locked = "locked"lockedBadge = "Locked"loginRequired = "Enable login mode first"+memberActions = "Member actions"noMembersFound = "No members found"role = "Role"searchMembers = "Search members..."@@ -10555,6 +10591,7 @@ unlockAccount = "Unlock Account"unlockUserError = "Failed to unlock user account"unlockUserSuccess = "User account unlocked successfully"user = "User"+userInfo = "User info"[workspace.people.actions]upgrade = "Upgrade"@@ -10700,6 +10737,7 @@ removeMemberError = "Failed to remove user from team"removeMemberSuccess = "User removed from team"renameTeamLabel = "Rename Team"system = "System"+teamActions = "Team actions"teamName = "Team Name"teamNotFound = "Team not found"title = "Teams"diff --git a/frontend/editor/src/cloud/components/onboarding/renderButtons.tsx b/frontend/editor/src/cloud/components/onboarding/renderButtons.tsxindex f2857af460..7ff108d121 100644--- a/frontend/editor/src/cloud/components/onboarding/renderButtons.tsx+++ b/frontend/editor/src/cloud/components/onboarding/renderButtons.tsx@@ -1,5 +1,7 @@import React from "react";-import { Button, Group, ActionIcon } from "@mantine/core";+import { Group } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";import { TFunction } from "i18next";import {@@ -31,22 +33,6 @@ export function renderButtons({(btn) => btn.group === "right",);- const buttonStyles = (variant: ButtonDefinition["variant"]) =>- variant === "primary"- ? {- root: {- background: "var(--onboarding-primary-button-bg)",- color: "var(--onboarding-primary-button-text)",- },- }- : {- root: {- background: "var(--onboarding-secondary-button-bg)",- border: "1px solid var(--onboarding-secondary-button-border)",- color: "var(--onboarding-secondary-button-text)",- },- };-const resolveButtonLabel = (button: ButtonDefinition) => {// Translate the label (it's a translation key)const label = button.label ?? "";@@ -65,20 +51,15 @@ export function renderButtons({<ActionIconkey={button.key}onClick={() => onAction(button.action)}- radius="md"- size={40}+ size="lg"+ variant="secondary"+ accent="neutral"disabled={disabled}- styles={{- root: {- background: "var(--onboarding-secondary-button-bg)",- border: "1px solid var(--onboarding-secondary-button-border)",- color: "var(--onboarding-secondary-button-text)",- },- }}+ aria-label={t("onboarding.buttons.back", "Back")}>- {button.icon === "chevron-left" && (+ {button.icon === "chevron-left" ? (<ChevronLeftIcon fontSize="small" />- )}+ ) : null}</ActionIcon>);}@@ -91,7 +72,8 @@ export function renderButtons({key={button.key}onClick={() => onAction(button.action)}disabled={disabled}- styles={buttonStyles(variant)}+ variant={variant === "primary" ? "primary" : "secondary"}+ accent="neutral">{label}</Button>diff --git a/frontend/editor/src/cloud/components/onboarding/slides/TeamSlide.tsx b/frontend/editor/src/cloud/components/onboarding/slides/TeamSlide.tsxindex 03eadf0f4c..a1948f2f06 100644--- a/frontend/editor/src/cloud/components/onboarding/slides/TeamSlide.tsx+++ b/frontend/editor/src/cloud/components/onboarding/slides/TeamSlide.tsx@@ -1,5 +1,6 @@import React, { useEffect, useState } from "react";-import { Badge, Button, TextInput } from "@mantine/core";+import { Badge, TextInput } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { SlideConfig } from "@app/types/types";import { createLightSlideBackground } from "@app/components/onboarding/slides/unifiedBackgroundConfig";diff --git a/frontend/editor/src/cloud/components/shared/FreeLimitReachedModal.tsx b/frontend/editor/src/cloud/components/shared/FreeLimitReachedModal.tsxindex 7db30887e7..177a15b7af 100644--- a/frontend/editor/src/cloud/components/shared/FreeLimitReachedModal.tsx+++ b/frontend/editor/src/cloud/components/shared/FreeLimitReachedModal.tsx@@ -1,5 +1,6 @@import { useMemo } from "react";-import { Modal, Stack, Button } from "@mantine/core";+import { Modal, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import CelebrationIcon from "@mui/icons-material/CelebrationOutlined";import AnimatedSlideBackground from "@app/components/onboarding/slides/AnimatedSlideBackground";@@ -169,7 +170,7 @@ export function FreeLimitReachedModal({ onClose }: FreeLimitReachedModalProps) {><ButtononClick={onClose}- variant="default"+ variant="secondary"size="sm"className="free-limit-modal-button"style={{diff --git a/frontend/editor/src/cloud/components/shared/SpendCapReachedModal.tsx b/frontend/editor/src/cloud/components/shared/SpendCapReachedModal.tsxindex c124b9baec..91f4ec6e95 100644--- a/frontend/editor/src/cloud/components/shared/SpendCapReachedModal.tsx+++ b/frontend/editor/src/cloud/components/shared/SpendCapReachedModal.tsx@@ -1,5 +1,6 @@import { useMemo } from "react";-import { Modal, Stack, Button } from "@mantine/core";+import { Modal, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import TrendingUpIcon from "@mui/icons-material/TrendingUpOutlined";import AnimatedSlideBackground from "@app/components/onboarding/slides/AnimatedSlideBackground";@@ -167,7 +168,7 @@ export function SpendCapReachedModal({ onClose }: SpendCapReachedModalProps) {><ButtononClick={onClose}- variant="default"+ variant="secondary"size="sm"className="spend-cap-modal-button"style={{diff --git a/frontend/editor/src/cloud/components/shared/TeamInvitationBanner.tsx b/frontend/editor/src/cloud/components/shared/TeamInvitationBanner.tsxindex aa07d823df..3b373e9c3b 100644--- a/frontend/editor/src/cloud/components/shared/TeamInvitationBanner.tsx+++ b/frontend/editor/src/cloud/components/shared/TeamInvitationBanner.tsx@@ -1,5 +1,6 @@import { useState } from "react";-import { Button, Group, Text } from "@mantine/core";+import { Group, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { InfoBanner } from "@app/components/shared/InfoBanner";@@ -75,9 +76,9 @@ export function TeamInvitationBanner() {const actionButtons = (<Group gap="xs" wrap="nowrap"><Button- variant="white"- color="gray"- size="xs"+ variant="secondary"+ accent="neutral"+ size="sm"onClick={handleAccept}loading={processing}leftSection={@@ -88,17 +89,12 @@ export function TeamInvitationBanner() {style={{ color: "var(--mantine-color-dark-9)" }}/>}- styles={{- label: {- color: "var(--mantine-color-dark-9)",- },- }}>{t("team.invitationBanner.acceptButton", "Accept")}</Button><Button- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"onClick={handleReject}loading={processing}style={{ color: "rgba(255, 255, 255, 0.7)" }}diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/Payg.css b/frontend/editor/src/cloud/components/shared/config/configSections/Payg.cssindex 8e1921d061..cf9378ac9e 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/Payg.css+++ b/frontend/editor/src/cloud/components/shared/config/configSections/Payg.css@@ -14,14 +14,13 @@--payg-divider: var(--border-subtle);}-/* Dark mode: the modal content bg is #2a2f36 and so is --bg-surface, so plain- cards vanish. Lift cards a shade above the modal and strengthen borders. */+/* Dark mode: modal content bg is #131729 (--bg-surface), so lift cards above it */[data-mantine-color-scheme="dark"] .payg {- --payg-card-bg: #313842;- --payg-card-border: #3d444e;- --payg-inset-bg: #272c33;- --payg-accent-soft: rgba(10, 139, 255, 0.16);- --payg-divider: #3d444e;+ --payg-card-bg: #1c2340;+ --payg-card-border: #2d3560;+ --payg-inset-bg: #0d1020;+ --payg-accent-soft: rgba(79, 142, 245, 0.16);+ --payg-divider: #2d3560;}/* ── Header ─────────────────────────────────────────────────────────── */@@ -258,16 +257,16 @@/* Dark mode: the stock default button is a flat slab that disappears into thecard. Lift it with a soft top-down gradient + brighter border, and warm the- hover so the buttons feel tactile against --payg-card-bg (#313842). Driven+ hover so the buttons feel tactile against --payg-card-bg (#1c2340). Driventhrough Mantine's --button-* vars. The same rule covers disabled buttons(Cancel/Update cap before the form is dirty) so they read identically to thealways-enabled ones — Mantine only fades them via opacity. */[data-mantine-color-scheme="dark"].payg.mantine-Button-root[data-variant="default"] {- --button-bg: linear-gradient(180deg, #3d4651 0%, #353d48 100%);- --button-hover: linear-gradient(180deg, #475160 0%, #3d4654 100%);- --button-bd: 1px solid #4b5563;+ --button-bg: linear-gradient(180deg, #232a50 0%, #1c2340 100%);+ --button-hover: linear-gradient(180deg, #2d3560 0%, #232a50 100%);+ --button-bd: 1px solid #2d3560;--button-color: var(--mantine-color-white);box-shadow:0 1px 0 rgba(255, 255, 255, 0.04) inset,diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/Payg.tsx b/frontend/editor/src/cloud/components/shared/config/configSections/Payg.tsxindex ea0e7f3d32..8cf61f2385 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/Payg.tsx+++ b/frontend/editor/src/cloud/components/shared/config/configSections/Payg.tsx@@ -16,7 +16,8 @@* V1 — so it shows a real empty state, not fabricated rows*/import React, { useState } from "react";-import { Button, Group, Stack, Text } from "@mantine/core";+import { Group, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useRenderCount } from "@app/hooks/useRenderCount";import OpenInNewIcon from "@mui/icons-material/OpenInNew";import LockIcon from "@mui/icons-material/LockOutlined";@@ -110,16 +111,16 @@ export function DocHelp() {const [open, setOpen] = useState(false);return (<div className="payg-help">- <button- type="button"+ <Button+ variant="tertiary"className="payg-help__toggle"aria-expanded={open}onClick={() => setOpen((o) => !o)}+ leftSection={<HelpOutlineIcon sx={{ fontSize: 15 }} />}>- <HelpOutlineIcon sx={{ fontSize: 15 }} />{t("payg.docHelp.toggle", "What counts as a PDF?")}<ExpandMoreIcon className="payg-help__chevron" sx={{ fontSize: 16 }} />- </button>+ </Button>{open && (<div className="payg-help__panel"><ul>@@ -446,16 +447,16 @@ function CapReachedHelp() {const [open, setOpen] = useState(false);return (<div className="payg-help">- <button- type="button"+ <Button+ variant="tertiary"className="payg-help__toggle"aria-expanded={open}onClick={() => setOpen((o) => !o)}+ leftSection={<HelpOutlineIcon sx={{ fontSize: 15 }} />}>- <HelpOutlineIcon sx={{ fontSize: 15 }} />{t("payg.gates.title", "What happens when the cap is reached")}<ExpandMoreIcon className="payg-help__chevron" sx={{ fontSize: 16 }} />- </button>+ </Button>{open && (<div className="payg-help__panel"><div className="payg-gates">@@ -656,7 +657,7 @@ function StripePortalLink({onClick={handleClick}loading={loading}rightSection={<OpenInNewIcon sx={{ fontSize: 16 }} />}- variant="light"+ variant="secondary">{t("payg.stripe.open", "Open billing portal")}</Button>diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/PaygFree.css b/frontend/editor/src/cloud/components/shared/config/configSections/PaygFree.cssindex 17ef96e8b3..6ade6c7b6d 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/PaygFree.css+++ b/frontend/editor/src/cloud/components/shared/config/configSections/PaygFree.css@@ -217,25 +217,6 @@border-top: 1px solid var(--payg-divider);padding-top: 16px;}-.paygf-cta__button {- padding: 13px 22px;- border: none;- border-radius: 11px;- background: linear-gradient(135deg, var(--payg-accent) 0%, #6c5ce7 100%);- color: white;- font-weight: 600;- font-size: 0.95rem;- font-family: inherit;- cursor: pointer;- transition:- transform 120ms ease,- box-shadow 120ms ease;- white-space: nowrap;-}-.paygf-cta__button:hover {- transform: translateY(-1px);- box-shadow: 0 8px 22px -6px rgba(10, 139, 255, 0.55);-}.paygf-cta__reassurance {margin: 0;font-size: 0.78rem;diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/PaygFree.tsx b/frontend/editor/src/cloud/components/shared/config/configSections/PaygFree.tsxindex 330bffa71e..ae3738bd5f 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/PaygFree.tsx+++ b/frontend/editor/src/cloud/components/shared/config/configSections/PaygFree.tsx@@ -25,6 +25,7 @@*/import React, { useState } from "react";import { Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import BoltIcon from "@mui/icons-material/BoltRounded";import AllInclusiveIcon from "@mui/icons-material/AllInclusiveRounded";import CheckIcon from "@mui/icons-material/CheckRounded";@@ -171,14 +172,14 @@ function ProcessorCard({ snap, isLeader, onTurnOn }: ProcessorCardProps) {<FreeMeterPanel snap={snap} />{isLeader ? (<>- <button- type="button"- className="paygf-cta__button paygf-proc__cta"+ <Button+ fullWidth+ className="paygf-proc__cta"onClick={onTurnOn}data-testid="turn-on-processor">{t("payg.free.cta.button", "Turn on Processor →")}- </button>+ </Button><span className="paygf-cta__reassurance paygf-proc__reassure">{t("payg.free.cta.reassurance",diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/SpendCapControl.css b/frontend/editor/src/cloud/components/shared/config/configSections/SpendCapControl.cssindex 90083fb80e..bc9ce0cef8 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/SpendCapControl.css+++ b/frontend/editor/src/cloud/components/shared/config/configSections/SpendCapControl.css@@ -22,10 +22,10 @@gap: 14px;}[data-mantine-color-scheme="dark"] .scc {- --scc-accent-text: #66b8ff;- --scc-accent-soft: rgba(10, 139, 255, 0.16);- --scc-chip-bg: #272d35;- --scc-chip-border: #3d444e;+ --scc-accent-text: #7ab4ff;+ --scc-accent-soft: rgba(79, 142, 245, 0.16);+ --scc-chip-bg: #1c2340;+ --scc-chip-border: #2d3560;}/* ── Inline row: presets · custom · no-cap · (save) ──────────────────── */diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/StripeCheckoutPanel.tsx b/frontend/editor/src/cloud/components/shared/config/configSections/StripeCheckoutPanel.tsxindex 1ffc9f4ee2..03584f11de 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/StripeCheckoutPanel.tsx+++ b/frontend/editor/src/cloud/components/shared/config/configSections/StripeCheckoutPanel.tsx@@ -64,6 +64,7 @@*/import React, { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";import { useAuth } from "@app/auth/UseSession";import {createCheckoutSession,@@ -267,17 +268,12 @@ const StripeCheckoutPanel: React.FC<StripeCheckoutPanelProps> = ({)}</div><div style={{ marginTop: 12 }}>- <button- type="button"- className="upm-btn"- data-variant="primary"- onClick={onComplete}- >+ <Button onClick={onComplete}>{t("payg.checkout.mock.continue","Continue with mock subscription",)}- </button>+ </Button></div></div>);diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/TeamSection.tsx b/frontend/editor/src/cloud/components/shared/config/configSections/TeamSection.tsxindex 6755a4d746..44fc59c738 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/TeamSection.tsx+++ b/frontend/editor/src/cloud/components/shared/config/configSections/TeamSection.tsx@@ -1,6 +1,5 @@import React, { useState, useEffect } from "react";import {- Button,TextInput,Group,Text,@@ -8,9 +7,10 @@ import {Alert,Table,Badge,- ActionIcon,Menu,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import { useSaaSTeam } from "@app/contexts/SaaSTeamContext";import LocalIcon from "@app/components/shared/LocalIcon";@@ -233,19 +233,18 @@ const TeamSection: React.FC = () => {}}/><ActionIcon- variant="filled"- color="blue"onClick={handleRenameSubmit}loading={renamingTeam}disabled={!newTeamName.trim()}+ aria-label={t("team.renameSubmit", "Save team name")}><LocalIcon icon="check" width="1rem" height="1rem" /></ActionIcon><ActionIcon- variant="subtle"- color="gray"+ variant="tertiary"onClick={handleCancelRename}disabled={renamingTeam}+ aria-label={t("team.renameCancel", "Cancel rename")}><LocalIcon icon="close" width="1rem" height="1rem" /></ActionIcon>@@ -257,7 +256,7 @@ const TeamSection: React.FC = () => {</Text>{isTeamLeader && !isPersonalTeam && (<ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={handleStartRename}aria-label={t("team.editName", "Edit team name")}@@ -285,9 +284,9 @@ const TeamSection: React.FC = () => {</div>{!isPersonalTeam && !isTeamLeader && !isEditingName && (<Button- color="red"- variant="outline"- size="xs"+ accent="danger"+ variant="secondary"+ size="sm"onClick={handleLeaveTeam}leftSection={<LocalIcon icon="logout" width="1rem" height="1rem" />@@ -449,7 +448,13 @@ const TeamSection: React.FC = () => {zIndex={Z_INDEX_OVER_CONFIG_MODAL}><Menu.Target>- <ActionIcon variant="subtle">+ <ActionIcon+ variant="tertiary"+ aria-label={t(+ "team.members.actions",+ "Member actions",+ )}+ ><LocalIconicon="more-vert"width="1rem"@@ -504,8 +509,8 @@ const TeamSection: React.FC = () => {{isTeamLeader && !isPersonalTeam && (<Table.Td><ActionIcon- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"onClick={() =>handleCancelInvitation(invitation.invitationId,diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/UpgradeModal.css b/frontend/editor/src/cloud/components/shared/config/configSections/UpgradeModal.cssindex 2e7aafef5c..c6da318f0f 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/UpgradeModal.css+++ b/frontend/editor/src/cloud/components/shared/config/configSections/UpgradeModal.css@@ -17,10 +17,10 @@--upm-muted: var(--text-muted);}[data-mantine-color-scheme="dark"] .upm {- --upm-card-bg: #313842;- --upm-border: #3d444e;- --upm-divider: #3d444e;- --upm-accent-soft: rgba(10, 139, 255, 0.14);+ --upm-card-bg: #1c2340;+ --upm-border: #2d3560;+ --upm-divider: #2d3560;+ --upm-accent-soft: rgba(79, 142, 245, 0.14);}/* Backdrop locks the page and centres the modal. z-index matches@@ -101,26 +101,6 @@color: var(--upm-text);margin: 0;}-.upm-header__close {- background: transparent;- border: none;- color: var(--upm-muted);- cursor: pointer;- width: 32px;- height: 32px;- border-radius: 8px;- display: inline-flex;- align-items: center;- justify-content: center;- transition:- background 120ms ease,- color 120ms ease;-}-.upm-header__close:hover {- background: var(--upm-divider);- color: var(--upm-text);-}-/* Left cluster: optional back arrow + title. The back arrow only renders on thecheckout step (cap/confirm have no parent step to return to) — it replaces theold footer "← Back" button. */@@ -130,28 +110,6 @@gap: 6px;min-width: 0;}-.upm-header__back {- background: transparent;- border: none;- color: var(--upm-muted);- cursor: pointer;- width: 32px;- height: 32px;- border-radius: 8px;- display: inline-flex;- align-items: center;- justify-content: center;- flex-shrink: 0;- margin-left: -6px;- transition:- background 120ms ease,- color 120ms ease;-}-.upm-header__back:hover {- background: var(--upm-divider);- color: var(--upm-text);-}-.upm-steps {display: flex;align-items: center;@@ -357,41 +315,6 @@display: flex;gap: 8px;}-.upm-btn {- padding: 10px 18px;- border-radius: 10px;- border: 1.5px solid transparent;- font-weight: 600;- font-size: 0.9rem;- cursor: pointer;- transition: all 120ms ease;- font-family: inherit;- white-space: nowrap;-}-.upm-btn[data-variant="ghost"] {- background: transparent;- border-color: var(--upm-divider);- color: var(--upm-text);-}-.upm-btn[data-variant="ghost"]:hover {- border-color: var(--upm-accent);- color: var(--upm-accent);-}-.upm-btn[data-variant="primary"] {- background: linear-gradient(135deg, var(--upm-accent), var(--upm-accent-2));- color: white;-}-.upm-btn[data-variant="primary"]:hover {- transform: translateY(-1px);- box-shadow: 0 6px 18px -6px rgba(10, 139, 255, 0.5);-}-.upm-btn[disabled] {- opacity: 0.5;- cursor: not-allowed;- transform: none !important;- box-shadow: none !important;-}-/* ── Step 3: confirmation ─────────────────────────────────────────────── */.upm-confirm {diff --git a/frontend/editor/src/cloud/components/shared/config/configSections/UpgradeModal.tsx b/frontend/editor/src/cloud/components/shared/config/configSections/UpgradeModal.tsxindex 0ca290611b..bdbd84c6bc 100644--- a/frontend/editor/src/cloud/components/shared/config/configSections/UpgradeModal.tsx+++ b/frontend/editor/src/cloud/components/shared/config/configSections/UpgradeModal.tsx@@ -18,6 +18,8 @@*/import React, { Suspense, useEffect, useState } from "react";import { createPortal } from "react-dom";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import CloseIcon from "@mui/icons-material/CloseRounded";import ArrowBackIcon from "@mui/icons-material/ArrowBackRounded";import ShieldIcon from "@mui/icons-material/ShieldOutlined";@@ -152,14 +154,14 @@ export default function UpgradeModal({<header className="upm-header"><div className="upm-header__left">{step === "checkout" && (- <button- type="button"- className="upm-header__back"+ <ActionIcon+ variant="tertiary"aria-label={t("payg.upgrade.backAria", "Back")}onClick={goBackToCap}+ style={{ marginLeft: -6 }}><ArrowBackIcon fontSize="small" />- </button>+ </ActionIcon>)}<h2 className="upm-header__title">{step === "confirm"@@ -170,14 +172,13 @@ export default function UpgradeModal({)}</h2></div>- <button- type="button"- className="upm-header__close"+ <ActionIcon+ variant="tertiary"aria-label={t("payg.upgrade.closeAria", "Close")}onClick={closeAndReset}><CloseIcon fontSize="small" />- </button>+ </ActionIcon></header>{/* Step indicator. Hidden on the confirmation panel since the@@ -198,13 +199,13 @@ export default function UpgradeModal({"{{symbol}}{{amount}} / month",{ symbol: sym, amount: effectiveCap },)}- <button- type="button"+ <Button+ variant="tertiary"className="upm-step__edit"onClick={goBackToCap}>{t("payg.upgrade.checkout.edit", "Edit")}- </button>+ </Button></span>) : (<span>@@ -264,36 +265,23 @@ export default function UpgradeModal({<div className="upm-footer__actions">{step === "cap" && (<>- <button- type="button"- className="upm-btn"- data-variant="ghost"- onClick={closeAndReset}- >+ <Button variant="secondary" onClick={closeAndReset}>{t("payg.upgrade.button.cancel", "Cancel")}- </button>- <button- type="button"- className="upm-btn"- data-variant="primary"- onClick={goToCheckout}- >+ </Button>+ <Button onClick={goToCheckout}>{t("payg.upgrade.button.continue", "Continue →")}- </button>+ </Button></>)}{step === "confirm" && (- <button- type="button"- className="upm-btn"- data-variant="primary"+ <ButtononClick={() => {setStep("cap");onComplete({ capUsd: effectiveCap });}}>{t("payg.upgrade.button.finish", "Finish")}- </button>+ </Button>)}</div></footer>diff --git a/frontend/editor/src/core/assets/login/github.svg b/frontend/editor/src/core/assets/login/github.svgindex 651eaac2b8..1174b67928 100644--- a/frontend/editor/src/core/assets/login/github.svg+++ b/frontend/editor/src/core/assets/login/github.svg@@ -1,3 +1,3 @@<svg width="37" height="36" viewBox="0 0 37 36" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M18.5 3.3125C16.5712 3.3125 14.6613 3.6924 12.8793 4.43052C11.0974 5.16864 9.47823 6.25051 8.11437 7.61437C5.35993 10.3688 3.8125 14.1046 3.8125 18C3.8125 24.4919 8.02781 29.9997 13.8588 31.9531C14.5931 32.0706 14.8281 31.6153 14.8281 31.2187V28.7366C10.7597 29.6178 9.89312 26.7684 9.89312 26.7684C9.2175 25.0647 8.26281 24.6094 8.26281 24.6094C6.92625 23.6987 8.36562 23.7281 8.36562 23.7281C9.83437 23.8309 10.6128 25.2409 10.6128 25.2409C11.8906 27.4734 14.0497 26.8125 14.8869 26.46C15.0191 25.5053 15.4009 24.8591 15.8122 24.4919C12.5516 24.1247 9.12937 22.8616 9.12937 17.2656C9.12937 15.6353 9.6875 14.3281 10.6422 13.2853C10.4953 12.9181 9.98125 11.3906 10.7891 9.40781C10.7891 9.40781 12.0228 9.01125 14.8281 10.9059C15.9884 10.5828 17.2516 10.4212 18.5 10.4212C19.7484 10.4212 21.0116 10.5828 22.1719 10.9059C24.9772 9.01125 26.2109 9.40781 26.2109 9.40781C27.0188 11.3906 26.5047 12.9181 26.3578 13.2853C27.3125 14.3281 27.8706 15.6353 27.8706 17.2656C27.8706 22.8762 24.4338 24.11 21.1584 24.4772C21.6872 24.9325 22.1719 25.8284 22.1719 27.1944V31.2187C22.1719 31.6153 22.4069 32.0853 23.1559 31.9531C28.9869 29.985 33.1875 24.4919 33.1875 18C33.1875 16.0712 32.8076 14.1613 32.0695 12.3793C31.3314 10.5974 30.2495 8.97823 28.8856 7.61437C27.5218 6.25051 25.9026 5.16864 24.1207 4.43052C22.3387 3.6924 20.4288 3.3125 18.5 3.3125Z" fill="black"/>+<path d="M18.5 3.3125C16.5712 3.3125 14.6613 3.6924 12.8793 4.43052C11.0974 5.16864 9.47823 6.25051 8.11437 7.61437C5.35993 10.3688 3.8125 14.1046 3.8125 18C3.8125 24.4919 8.02781 29.9997 13.8588 31.9531C14.5931 32.0706 14.8281 31.6153 14.8281 31.2187V28.7366C10.7597 29.6178 9.89312 26.7684 9.89312 26.7684C9.2175 25.0647 8.26281 24.6094 8.26281 24.6094C6.92625 23.6987 8.36562 23.7281 8.36562 23.7281C9.83437 23.8309 10.6128 25.2409 10.6128 25.2409C11.8906 27.4734 14.0497 26.8125 14.8869 26.46C15.0191 25.5053 15.4009 24.8591 15.8122 24.4919C12.5516 24.1247 9.12937 22.8616 9.12937 17.2656C9.12937 15.6353 9.6875 14.3281 10.6422 13.2853C10.4953 12.9181 9.98125 11.3906 10.7891 9.40781C10.7891 9.40781 12.0228 9.01125 14.8281 10.9059C15.9884 10.5828 17.2516 10.4212 18.5 10.4212C19.7484 10.4212 21.0116 10.5828 22.1719 10.9059C24.9772 9.01125 26.2109 9.40781 26.2109 9.40781C27.0188 11.3906 26.5047 12.9181 26.3578 13.2853C27.3125 14.3281 27.8706 15.6353 27.8706 17.2656C27.8706 22.8762 24.4338 24.11 21.1584 24.4772C21.6872 24.9325 22.1719 25.8284 22.1719 27.1944V31.2187C22.1719 31.6153 22.4069 32.0853 23.1559 31.9531C28.9869 29.985 33.1875 24.4919 33.1875 18C33.1875 16.0712 32.8076 14.1613 32.0695 12.3793C31.3314 10.5974 30.2495 8.97823 28.8856 7.61437C27.5218 6.25051 25.9026 5.16864 24.1207 4.43052C22.3387 3.6924 20.4288 3.3125 18.5 3.3125Z" fill="currentColor"/></svg>diff --git a/frontend/editor/src/core/components/StorageStatsCard.tsx b/frontend/editor/src/core/components/StorageStatsCard.tsxindex 468d24fe37..186b56c4ca 100644--- a/frontend/editor/src/core/components/StorageStatsCard.tsx+++ b/frontend/editor/src/core/components/StorageStatsCard.tsx@@ -1,5 +1,6 @@import React from "react";-import { Card, Group, Text, Button, Progress } from "@mantine/core";+import { Card, Group, Text, Progress } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import StorageIcon from "@mui/icons-material/Storage";import DeleteIcon from "@mui/icons-material/Delete";@@ -58,21 +59,16 @@ const StorageStatsCard: React.FC<StorageStatsCardProps> = ({<Group gap="xs">{filesCount > 0 && (<Button- variant="light"- color="red"- size="xs"+ variant="secondary"+ accent="danger"+ size="sm"onClick={onClearAll}leftSection={<DeleteIcon style={{ fontSize: 16 }} />}>{t("fileManager.clearAll", "Clear All")}</Button>)}- <Button- variant="light"- color="blue"- size="xs"- onClick={onReloadFiles}- >+ <Button variant="secondary" size="sm" onClick={onReloadFiles}>Reload Files</Button></Group>diff --git a/frontend/editor/src/core/components/annotation/shared/ColorControl.tsx b/frontend/editor/src/core/components/annotation/shared/ColorControl.tsxindex ca41f0f6a2..524314ee62 100644--- a/frontend/editor/src/core/components/annotation/shared/ColorControl.tsx+++ b/frontend/editor/src/core/components/annotation/shared/ColorControl.tsx@@ -1,5 +1,4 @@import {- ActionIcon,Tooltip,Popover,Stack,@@ -10,6 +9,7 @@ import {import { useState, useCallback, useEffect } from "react";import { useTranslation } from "react-i18next";import ColorizeIcon from "@mui/icons-material/Colorize";+import { ActionIcon } from "@app/ui/ActionIcon";// safari and firefox do not support the eye dropper API, only edge, chrome and opera do.// the button is hidden in the UI if the API is not supported.@@ -66,24 +66,12 @@ export function ColorControl({<Popover.Target><Tooltip label={label}><ActionIcon- variant="subtle"- color="gray"+ aria-label={label}+ variant="secondary"+ accent="neutral"size="md"onClick={() => setOpened(!opened)}disabled={disabled}- styles={{- root: {- flexShrink: 0,- backgroundColor: "var(--bg-raised)",- border: "1px solid var(--border-default)",- color: "var(--text-secondary)",- "&:hover": {- backgroundColor: "var(--hover-bg)",- borderColor: "var(--border-strong)",- color: "var(--text-primary)",- },- },- }}><ColorSwatch color={localColor} size={18} /></ActionIcon>@@ -117,11 +105,14 @@ export function ColorControl({label={t("color.eyeDropper.tooltip", "Pick colour from screen")}><ActionIcon- variant="subtle"- color="gray"+ aria-label={t(+ "color.eyeDropper.tooltip",+ "Pick colour from screen",+ )}+ variant="tertiary"+ accent="neutral"size="sm"onClick={handleEyeDropper}- style={{ color: "var(--text-primary)" }}><ColorizeIcon style={{ fontSize: 16 }} /></ActionIcon>diff --git a/frontend/editor/src/core/components/annotation/shared/ColorPicker.tsx b/frontend/editor/src/core/components/annotation/shared/ColorPicker.tsxindex e12db7f340..ec854426e6 100644--- a/frontend/editor/src/core/components/annotation/shared/ColorPicker.tsx+++ b/frontend/editor/src/core/components/annotation/shared/ColorPicker.tsx@@ -4,13 +4,12 @@ import {Stack,ColorPicker as MantineColorPicker,Group,- Button,ColorSwatch,Slider,Text,} from "@mantine/core";import { useTranslation } from "react-i18next";-+import { Button } from "@app/ui/Button";interface ColorPickerProps {isOpen: boolean;onClose: () => void;diff --git a/frontend/editor/src/core/components/annotation/shared/DrawingCanvas.tsx b/frontend/editor/src/core/components/annotation/shared/DrawingCanvas.tsxindex 08808b5b61..c10d9d9023 100644--- a/frontend/editor/src/core/components/annotation/shared/DrawingCanvas.tsx+++ b/frontend/editor/src/core/components/annotation/shared/DrawingCanvas.tsx@@ -1,6 +1,7 @@import React, { useEffect, useRef, useState } from "react";-import { Paper, Button, Modal, Stack, Text, Group } from "@mantine/core";+import { Paper, Modal, Stack, Text, Group } from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";import { ColorSwatchButton } from "@app/components/annotation/shared/ColorPicker";import PenSizeSelector from "@app/components/tools/sign/PenSizeSelector";import SignaturePad from "signature_pad";@@ -331,7 +332,7 @@ export const DrawingCanvas: React.FC<DrawingCanvasProps> = ({</PrivateContent><div style={{ display: "flex", justifyContent: "space-between" }}>- <Button variant="subtle" color="red" onClick={clear}>+ <Button variant="tertiary" accent="danger" onClick={clear}>{t("sign.canvas.clear", "Clear canvas")}</Button><Button onClick={closeModal}>{t("common.done", "Done")}</Button>diff --git a/frontend/editor/src/core/components/annotation/shared/DrawingControls.tsx b/frontend/editor/src/core/components/annotation/shared/DrawingControls.tsxindex 7118a817e8..0844125117 100644--- a/frontend/editor/src/core/components/annotation/shared/DrawingControls.tsx+++ b/frontend/editor/src/core/components/annotation/shared/DrawingControls.tsx@@ -1,7 +1,9 @@import React from "react";-import { Group, Button, ActionIcon, Tooltip } from "@mantine/core";+import { Group, Tooltip } from "@mantine/core";import { useTranslation } from "react-i18next";import { LocalIcon } from "@app/components/shared/LocalIcon";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";interface DrawingControlsProps {onUndo?: () => void;@@ -37,12 +39,11 @@ export const DrawingControls: React.FC<DrawingControlsProps> = ({{onUndo && (<Tooltip label={t("sign.undo", "Undo")}><ActionIcon- variant="subtle"+ variant="tertiary"size="lg"aria-label={t("sign.undo", "Undo")}onClick={onUndo}disabled={undoDisabled}- color={undoDisabled ? "gray" : "blue"}><LocalIconicon="undo"@@ -56,12 +57,11 @@ export const DrawingControls: React.FC<DrawingControlsProps> = ({{onRedo && (<Tooltip label={t("sign.redo", "Redo")}><ActionIcon- variant="subtle"+ variant="tertiary"size="lg"aria-label={t("sign.redo", "Redo")}onClick={onRedo}disabled={redoDisabled}- color={redoDisabled ? "gray" : "blue"}><LocalIconicon="redo"@@ -78,11 +78,9 @@ export const DrawingControls: React.FC<DrawingControlsProps> = ({{/* Place Signature Button */}{showPlaceButton && onPlaceSignature && (<Button- variant="filled"- color="blue"onClick={onPlaceSignature}disabled={disabled || !hasSignatureData}- ml="auto"+ style={{ marginLeft: "auto" }}>{placeButtonText}</Button>diff --git a/frontend/editor/src/core/components/annotation/shared/OpacityControl.tsx b/frontend/editor/src/core/components/annotation/shared/OpacityControl.tsxindex 496b5c4070..3853fa32c2 100644--- a/frontend/editor/src/core/components/annotation/shared/OpacityControl.tsx+++ b/frontend/editor/src/core/components/annotation/shared/OpacityControl.tsx@@ -1,14 +1,8 @@-import {- ActionIcon,- Tooltip,- Popover,- Stack,- Slider,- Text,-} from "@mantine/core";+import { Tooltip, Popover, Stack, Slider, Text } from "@mantine/core";import { useTranslation } from "react-i18next";import { useState } from "react";import OpacityIcon from "@mui/icons-material/Opacity";+import { ActionIcon } from "@app/ui/ActionIcon";interface OpacityControlProps {value: number; // 0-100@@ -29,24 +23,12 @@ export function OpacityControl({<Popover.Target><Tooltip label={t("annotation.opacity", "Opacity")}><ActionIcon- variant="subtle"- color="gray"+ aria-label={t("annotation.opacity", "Opacity")}+ variant="secondary"+ accent="neutral"size="md"onClick={() => setOpened(!opened)}disabled={disabled}- styles={{- root: {- flexShrink: 0,- backgroundColor: "var(--bg-raised)",- border: "1px solid var(--border-default)",- color: "var(--text-secondary)",- "&:hover": {- backgroundColor: "var(--hover-bg)",- borderColor: "var(--border-strong)",- color: "var(--text-primary)",- },- },- }}><OpacityIcon style={{ fontSize: 18 }} /></ActionIcon>diff --git a/frontend/editor/src/core/components/annotation/shared/PropertiesPopover.tsx b/frontend/editor/src/core/components/annotation/shared/PropertiesPopover.tsxindex 5f23b81ede..2f2a42b982 100644--- a/frontend/editor/src/core/components/annotation/shared/PropertiesPopover.tsx+++ b/frontend/editor/src/core/components/annotation/shared/PropertiesPopover.tsx@@ -1,14 +1,7 @@-import {- ActionIcon,- Tooltip,- Popover,- Stack,- Slider,- Text,- Group,- Button,-} from "@mantine/core";+import { Tooltip, Popover, Stack, Slider, Text, Group } from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useState } from "react";import type { TrackedAnnotation } from "@embedpdf/plugin-annotation";import type { PdfAnnotationObject } from "@embedpdf/models";@@ -106,21 +99,24 @@ export function PropertiesPopover({</Text><Group gap="xs"><ActionIcon- variant={currentAlign === "left" ? "filled" : "default"}+ aria-label={t("annotation.alignLeft", "Align left")}+ variant={currentAlign === "left" ? "primary" : "secondary"}onClick={() => onUpdate({ textAlign: 0 })}size="md"><FormatAlignLeftIcon style={{ fontSize: 18 }} /></ActionIcon><ActionIcon- variant={currentAlign === "center" ? "filled" : "default"}+ aria-label={t("annotation.alignCenter", "Align center")}+ variant={currentAlign === "center" ? "primary" : "secondary"}onClick={() => onUpdate({ textAlign: 1 })}size="md"><FormatAlignCenterIcon style={{ fontSize: 18 }} /></ActionIcon><ActionIcon- variant={currentAlign === "right" ? "filled" : "default"}+ aria-label={t("annotation.alignRight", "Align right")}+ variant={currentAlign === "right" ? "primary" : "secondary"}onClick={() => onUpdate({ textAlign: 2 })}size="md">@@ -176,8 +172,8 @@ export function PropertiesPopover({/></div><Button- size="xs"- variant={!borderVisible ? "filled" : "light"}+ size="sm"+ variant={!borderVisible ? "primary" : "secondary"}onClick={() => {const newValue = borderVisible ? 0 : 1;onUpdate({@@ -201,24 +197,12 @@ export function PropertiesPopover({<Popover.Target><Tooltip label={t("annotation.properties", "Properties")}><ActionIcon- variant="subtle"- color="gray"+ aria-label={t("annotation.properties", "Properties")}+ variant="secondary"+ accent="neutral"size="md"onClick={() => setOpened(!opened)}disabled={disabled}- styles={{- root: {- flexShrink: 0,- backgroundColor: "var(--bg-raised)",- border: "1px solid var(--border-default)",- color: "var(--text-secondary)",- "&:hover": {- backgroundColor: "var(--hover-bg)",- borderColor: "var(--border-strong)",- color: "var(--text-primary)",- },- },- }}><TuneIcon style={{ fontSize: 18 }} /></ActionIcon>diff --git a/frontend/editor/src/core/components/annotation/shared/TextInputWithFont.tsx b/frontend/editor/src/core/components/annotation/shared/TextInputWithFont.tsxindex a1a07a95b7..60905d3065 100644--- a/frontend/editor/src/core/components/annotation/shared/TextInputWithFont.tsx+++ b/frontend/editor/src/core/components/annotation/shared/TextInputWithFont.tsx@@ -7,8 +7,8 @@ import {useCombobox,Group,Box,- SegmentedControl,} from "@mantine/core";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import { ColorPicker } from "@app/components/annotation/shared/ColorPicker";@@ -253,14 +253,14 @@ export const TextInputWithFont: React.FC<TextInputWithFontProps> = ({{/* Text Alignment */}{onTextAlignChange && (- <SegmentedControl+ <SegmentedControl<"left" | "center" | "right">value={textAlign}- onChange={(value: string) => {- onTextAlignChange(value as "left" | "center" | "right");+ onChange={(value) => {+ onTextAlignChange(value);onAnyChange?.();}}- disabled={disabled}- data={[+ loading={disabled}+ options={[{ label: t("textAlign.left", "Left"), value: "left" },{ label: t("textAlign.center", "Center"), value: "center" },{ label: t("textAlign.right", "Right"), value: "right" },diff --git a/frontend/editor/src/core/components/annotation/shared/WidthControl.tsx b/frontend/editor/src/core/components/annotation/shared/WidthControl.tsxindex d4f063f604..b7e9d28531 100644--- a/frontend/editor/src/core/components/annotation/shared/WidthControl.tsx+++ b/frontend/editor/src/core/components/annotation/shared/WidthControl.tsx@@ -1,14 +1,8 @@-import {- ActionIcon,- Tooltip,- Popover,- Stack,- Slider,- Text,-} from "@mantine/core";+import { Tooltip, Popover, Stack, Slider, Text } from "@mantine/core";import { useTranslation } from "react-i18next";import { useState } from "react";import LineWeightIcon from "@mui/icons-material/LineWeight";+import { ActionIcon } from "@app/ui/ActionIcon";interface WidthControlProps {value: number;@@ -33,24 +27,12 @@ export function WidthControl({<Popover.Target><Tooltip label={t("annotation.width", "Width")}><ActionIcon- variant="subtle"- color="gray"+ aria-label={t("annotation.width", "Width")}+ variant="secondary"+ accent="neutral"size="md"onClick={() => setOpened(!opened)}disabled={disabled}- styles={{- root: {- flexShrink: 0,- backgroundColor: "var(--bg-raised)",- border: "1px solid var(--border-default)",- color: "var(--text-secondary)",- "&:hover": {- backgroundColor: "var(--hover-bg)",- borderColor: "var(--border-strong)",- color: "var(--text-primary)",- },- },- }}><LineWeightIcon style={{ fontSize: 18 }} /></ActionIcon>diff --git a/frontend/editor/src/core/components/fileEditor/AddFileCard.tsx b/frontend/editor/src/core/components/fileEditor/AddFileCard.tsxindex 00c9e4b396..bf19c16967 100644--- a/frontend/editor/src/core/components/fileEditor/AddFileCard.tsx+++ b/frontend/editor/src/core/components/fileEditor/AddFileCard.tsx@@ -1,5 +1,6 @@import React, { useRef, useState } from "react";-import { Button, Group } from "@mantine/core";+import { Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useFilesModalContext } from "@app/contexts/FilesModalContext";import LocalIcon from "@app/components/shared/LocalIcon";@@ -106,6 +107,7 @@ const AddFileCard = ({>{!isUploadHover && (<Button+ variant="tertiary"style={{backgroundColor: "var(--landing-button-bg)",color: "var(--landing-button-color)",@@ -133,6 +135,7 @@ const AddFileCard = ({</Button>)}<Button+ variant="tertiary"aria-label={t("addFileCard.upload", "Upload")}title={terminology.uploadFromComputer}style={{diff --git a/frontend/editor/src/core/components/fileEditor/FileEditor.module.css b/frontend/editor/src/core/components/fileEditor/FileEditor.module.cssindex 2e601f8f7f..da407cf261 100644--- a/frontend/editor/src/core/components/fileEditor/FileEditor.module.css+++ b/frontend/editor/src/core/components/fileEditor/FileEditor.module.css@@ -291,15 +291,15 @@DARK MODE OVERRIDES========================= */:global([data-mantine-color-scheme="dark"]) .card {- outline-color: #3a4047; /* deselected stroke */+ outline-color: #1c2340; /* deselected stroke */}:global([data-mantine-color-scheme="dark"]) .card[data-selected="true"] {- outline-color: #4b525a; /* selected stroke (subtle grey) */+ outline-color: #2d3560; /* selected stroke (subtle navy) */}:global([data-mantine-color-scheme="dark"]) .headerResting {- background: #1f2329; /* requested default unselected color */+ background: #0d1020; /* requested default unselected color */color: var(--tool-header-text); /* #D0D6DC */border-bottom-color: var(--tool-header-border); /* #3A4047 */}diff --git a/frontend/editor/src/core/components/fileEditor/FileEditorThumbnail.tsx b/frontend/editor/src/core/components/fileEditor/FileEditorThumbnail.tsxindex 87bcfab3f1..07d134f75c 100644--- a/frontend/editor/src/core/components/fileEditor/FileEditorThumbnail.tsx+++ b/frontend/editor/src/core/components/fileEditor/FileEditorThumbnail.tsx@@ -1,13 +1,7 @@import React, { useState, useCallback, useRef, useMemo } from "react";-import {- Text,- Modal,- Button,- Group,- Stack,- ActionIcon,- Tooltip,-} from "@mantine/core";+import { Text, Modal, Group, Stack, Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";+import { Button } from "@app/ui/Button";import { useIsMobile } from "@app/hooks/useIsMobile";import { alert } from "@app/components/toast";import { useTranslation } from "react-i18next";@@ -545,9 +539,12 @@ const FileEditorThumbnail = ({)}><ActionIcon- size="xs"- variant="filled"- color="yellow"+ size="sm"+ accent="warning"+ aria-label={t(+ "encryptedPdfUnlock.unlockPrompt",+ "Unlock PDF to continue",+ )}onClick={(e) => {e.stopPropagation();openEncryptedUnlockPrompt(file.id);@@ -606,17 +603,13 @@ const FileEditorThumbnail = ({<PrivateContent>{file.name}</PrivateContent></Text><Group justify="flex-end" gap="sm">- <Button variant="light" onClick={handleCancelClose}>+ <Button variant="secondary" onClick={handleCancelClose}>{t("confirmCloseCancel", "Cancel")}</Button>- <Button- variant="filled"- color="red"- onClick={handleConfirmClose}- >+ <Button accent="danger" onClick={handleConfirmClose}>{t("confirmCloseDiscard", "Discard changes and close")}</Button>- <Button variant="filled" onClick={handleSaveAndClose}>+ <Button onClick={handleSaveAndClose}>{t("confirmCloseSave", "Save and close")}</Button></Group>@@ -633,14 +626,10 @@ const FileEditorThumbnail = ({<PrivateContent>{file.name}</PrivateContent></Text><Group justify="flex-end" gap="sm">- <Button variant="light" onClick={handleCancelClose}>+ <Button variant="secondary" onClick={handleCancelClose}>{t("confirmCloseCancel", "Cancel")}</Button>- <Button- variant="filled"- color="red"- onClick={handleConfirmClose}- >+ <Button accent="danger" onClick={handleConfirmClose}>{t("confirmCloseConfirm", "Close File")}</Button></Group>diff --git a/frontend/editor/src/core/components/fileManager/CompactFileDetails.tsx b/frontend/editor/src/core/components/fileManager/CompactFileDetails.tsxindex 09ca9a10b1..11657cc288 100644--- a/frontend/editor/src/core/components/fileManager/CompactFileDetails.tsx+++ b/frontend/editor/src/core/components/fileManager/CompactFileDetails.tsx@@ -1,5 +1,7 @@import React from "react";-import { Stack, Box, Text, Button, ActionIcon, Center } from "@mantine/core";+import { Stack, Box, Text, Center } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";import ChevronRightIcon from "@mui/icons-material/ChevronRight";@@ -128,18 +130,20 @@ const CompactFileDetails: React.FC<CompactFileDetailsProps> = ({{hasMultipleFiles && (<Box style={{ display: "flex", gap: "0.25rem" }}><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={onPrevious}disabled={isAnimating}+ aria-label={t("fileManager.previousFile", "Previous file")}><ChevronLeftIcon style={{ fontSize: 16 }} /></ActionIcon><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={onNext}disabled={isAnimating}+ aria-label={t("fileManager.nextFile", "Next file")}><ChevronRightIcon style={{ fontSize: 16 }} /></ActionIcon>@@ -150,16 +154,10 @@ const CompactFileDetails: React.FC<CompactFileDetailsProps> = ({{/* Action Button */}<Buttonsize="sm"+ accent="neutral"onClick={onOpenFiles}disabled={!hasSelection && !canCloseAll}fullWidth- style={{- backgroundColor:- hasSelection || canCloseAll- ? "var(--btn-open-file)"- : "var(--mantine-color-gray-4)",- color: "white",- }}>{canCloseAll? t("fileManager.closeAllFiles", "Close all files")diff --git a/frontend/editor/src/core/components/fileManager/EmptyFilesState.tsx b/frontend/editor/src/core/components/fileManager/EmptyFilesState.tsxindex 422dd8306e..95cbff8b9b 100644--- a/frontend/editor/src/core/components/fileManager/EmptyFilesState.tsx+++ b/frontend/editor/src/core/components/fileManager/EmptyFilesState.tsx@@ -1,5 +1,6 @@import React, { useState } from "react";-import { Button, Group, Text, Stack } from "@mantine/core";+import { Group, Text, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import HistoryIcon from "@mui/icons-material/History";import { useTranslation } from "react-i18next";import { useFileManagerContext } from "@app/contexts/FileManagerContext";@@ -77,6 +78,7 @@ const EmptyFilesState: React.FC = () => {onMouseLeave={() => setIsUploadHover(false)}><Button+ variant="tertiary"aria-label={t("emptyFilesState.upload", "Upload")}style={{backgroundColor: "var(--bg-file-manager)",diff --git a/frontend/editor/src/core/components/fileManager/FileActions.tsx b/frontend/editor/src/core/components/fileManager/FileActions.tsxindex e228bc9457..3226420c3f 100644--- a/frontend/editor/src/core/components/fileManager/FileActions.tsx+++ b/frontend/editor/src/core/components/fileManager/FileActions.tsx@@ -1,11 +1,7 @@import React, { useEffect } from "react";-import {- Group,- Text,- ActionIcon,- Tooltip,- SegmentedControl,-} from "@mantine/core";+import { Group, Text, Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";+import { SegmentedControl } from "@app/ui/SegmentedControl";import SelectAllIcon from "@mui/icons-material/SelectAll";import DeleteIcon from "@mui/icons-material/Delete";import CloudUploadIcon from "@mui/icons-material/CloudUpload";@@ -131,26 +127,29 @@ const FileActions: React.FC = () => {}><ActionIcon- variant="light"+ variant="secondary"size="sm"- color="dimmed"onClick={handleSelectAll}disabled={filteredFiles.length === 0}- radius="sm"+ aria-label={+ allFilesSelected+ ? t("fileManager.deselectAll", "Deselect All")+ : t("fileManager.selectAll", "Select All")+ }><SelectAllIcon style={{ fontSize: "1rem" }} /></ActionIcon></Tooltip>{showStorageFilter && (<SegmentedControl- size="xs"+ size="sm"value={storageFilter}onChange={(value) =>onStorageFilterChange(value as "all" | "local" | "sharedWithMe" | "sharedByMe",)}- data={storageFilterOptions}+ options={storageFilterOptions}/>)}</Group>@@ -177,12 +176,11 @@ const FileActions: React.FC = () => {{uploadEnabled && (<Tooltip label={t("fileManager.uploadSelected", "Upload Selected")}><ActionIcon- variant="light"+ variant="secondary"size="sm"- color="dimmed"onClick={() => setShowBulkUploadModal(true)}disabled={!canBulkUpload}- radius="sm"+ aria-label={t("fileManager.uploadSelected", "Upload Selected")}><CloudUploadIcon style={{ fontSize: "1rem" }} /></ActionIcon>@@ -191,12 +189,11 @@ const FileActions: React.FC = () => {{shareLinksEnabled && (<Tooltip label={t("fileManager.shareSelected", "Share Selected")}><ActionIcon- variant="light"+ variant="secondary"size="sm"- color="dimmed"onClick={() => setShowBulkShareModal(true)}disabled={!canBulkShare}- radius="sm"+ aria-label={t("fileManager.shareSelected", "Share Selected")}><LinkIcon style={{ fontSize: "1rem" }} /></ActionIcon>@@ -204,12 +201,12 @@ const FileActions: React.FC = () => {)}<Tooltip label={t("fileManager.deleteSelected", "Delete Selected")}><ActionIcon- variant="light"+ variant="secondary"size="sm"- color="dimmed"+ accent="danger"onClick={handleDeleteSelected}disabled={!hasSelection}- radius="sm"+ aria-label={t("fileManager.deleteSelected", "Delete Selected")}><DeleteIcon style={{ fontSize: "1rem" }} /></ActionIcon>@@ -217,12 +214,11 @@ const FileActions: React.FC = () => {<Tooltip label={terminology.downloadSelected}><ActionIcon- variant="light"+ variant="secondary"size="sm"- color="dimmed"onClick={handleDownloadSelected}disabled={!hasSelection || !hasDownloadAccess}- radius="sm"+ aria-label={terminology.downloadSelected}><DownloadIcon style={{ fontSize: "1rem" }} /></ActionIcon>diff --git a/frontend/editor/src/core/components/fileManager/FileDetails.tsx b/frontend/editor/src/core/components/fileManager/FileDetails.tsxindex 4621559ae8..3fd116b75e 100644--- a/frontend/editor/src/core/components/fileManager/FileDetails.tsx+++ b/frontend/editor/src/core/components/fileManager/FileDetails.tsx@@ -1,5 +1,6 @@import React, { useEffect, useState } from "react";-import { Stack, Button, Box } from "@mantine/core";+import { Stack, Box } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useIndexedDBThumbnail } from "@app/hooks/useIndexedDBThumbnail";import { useFileManagerContext } from "@app/contexts/FileManagerContext";@@ -108,16 +109,10 @@ const FileDetails: React.FC<FileDetailsProps> = ({ compact = false }) => {<Buttonsize="md"+ accent="neutral"onClick={onOpenFiles}disabled={!hasSelection && !canCloseAll}fullWidth- style={{- backgroundColor:- hasSelection || canCloseAll- ? "var(--btn-open-file)"- : "var(--mantine-color-gray-4)",- color: "white",- }}>{canCloseAll? t("fileManager.closeAllFiles", "Close all files")diff --git a/frontend/editor/src/core/components/fileManager/FileInfoCard.tsx b/frontend/editor/src/core/components/fileManager/FileInfoCard.tsxindex 594442aefb..f43df3d86c 100644--- a/frontend/editor/src/core/components/fileManager/FileInfoCard.tsx+++ b/frontend/editor/src/core/components/fileManager/FileInfoCard.tsx@@ -8,8 +8,8 @@ import {Group,Divider,ScrollArea,- Button,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { detectFileExtension, getFileSize } from "@app/utils/fileUtils";import { StirlingFileStub } from "@app/types/fileContext";@@ -208,7 +208,7 @@ const FileInfoCard: React.FC<FileInfoCardProps> = ({<Divider /><Buttonsize="sm"- variant="light"+ variant="secondary"onClick={() => onMakeCopy(currentFile)}fullWidth>@@ -260,7 +260,7 @@ const FileInfoCard: React.FC<FileInfoCardProps> = ({</Group><Buttonsize="sm"- variant="light"+ variant="secondary"onClick={() => setShowShareManageModal(true)}fullWidth>diff --git a/frontend/editor/src/core/components/fileManager/FileListItem.tsx b/frontend/editor/src/core/components/fileManager/FileListItem.tsxindex ae22ced51f..ba1fe52bc9 100644--- a/frontend/editor/src/core/components/fileManager/FileListItem.tsx+++ b/frontend/editor/src/core/components/fileManager/FileListItem.tsx@@ -3,12 +3,12 @@ import {Group,Box,Text,- ActionIcon,Checkbox,Divider,Menu,Badge,} from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import MoreVertIcon from "@mui/icons-material/MoreVert";import DeleteIcon from "@mui/icons-material/Delete";import DownloadIcon from "@mui/icons-material/Download";@@ -323,10 +323,11 @@ const FileListItem: React.FC<FileListItemProps> = ({><Menu.Target><ActionIcon- variant="subtle"- c="dimmed"+ variant="tertiary"+ accent="neutral"size="md"onClick={(e) => e.stopPropagation()}+ aria-label={t("fileManager.moreOptions", "More options")}style={{opacity: shouldShowHovered ? 1 : 0,transform: shouldShowHovered ? "scale(1)" : "scale(0.8)",diff --git a/frontend/editor/src/core/components/fileManager/FileSourceButtons.tsx b/frontend/editor/src/core/components/fileManager/FileSourceButtons.tsxindex 6905f1bc75..6ac3e3c91e 100644--- a/frontend/editor/src/core/components/fileManager/FileSourceButtons.tsx+++ b/frontend/editor/src/core/components/fileManager/FileSourceButtons.tsx@@ -1,5 +1,6 @@import React, { useState } from "react";-import { Stack, Text, Button, Group } from "@mantine/core";+import { Stack, Text, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import HistoryIcon from "@mui/icons-material/History";import PhonelinkIcon from "@mui/icons-material/Phonelink";import { useTranslation } from "react-i18next";@@ -65,86 +66,45 @@ const FileSourceButtons: React.FC<FileSourceButtonsProps> = ({// Determine visibility of Mobile QR Scanner buttonconst shouldHideMobileQR =!isMobileUploadEnabled && config?.hideDisabledToolsMobileQRScanner;-- const buttonProps = {- variant: (source: string) =>- activeSource === source ? "filled" : "subtle",- getColor: (source: string) =>- activeSource === source ? "var(--mantine-color-gray-2)" : undefined,- getStyles: (source: string) => ({- root: {- backgroundColor: activeSource === source ? undefined : "transparent",- color:- activeSource === source- ? "var(--mantine-color-gray-9)"- : "var(--mantine-color-gray-6)",- border: "none",- "&:hover": {- backgroundColor:- activeSource === source ? undefined : "var(--mantine-color-gray-0)",- },- },- }),- };-+ // Shared Button has no `xs`; map the old horizontal `xs` to `sm`.+ const buttonSize = "sm" as const;+ const buttonJustify = horizontal ? "center" : "start";const buttons = (<><Button+ variant={activeSource === "recent" ? "primary" : "tertiary"}+ accent="neutral"leftSection={<HistoryIcon />}- justify={horizontal ? "center" : "flex-start"}+ justify={buttonJustify}onClick={() => onSourceChange("recent")}fullWidth={!horizontal}- size={horizontal ? "xs" : "sm"}- color={buttonProps.getColor("recent")}- styles={buttonProps.getStyles("recent")}+ size={buttonSize}>- {horizontal- ? t("fileManager.recent", "Recent")- : t("fileManager.recent", "Recent")}+ {t("fileManager.recent", "Recent")}</Button><Button- variant="subtle"- color="var(--mantine-color-gray-6)"+ variant="tertiary"+ accent="neutral"leftSection={<UploadIcon />}- justify={horizontal ? "center" : "flex-start"}+ justify={buttonJustify}onClick={onLocalFileClick}fullWidth={!horizontal}- size={horizontal ? "xs" : "sm"}- styles={{- root: {- backgroundColor: "transparent",- border: "none",- "&:hover": {- backgroundColor: "var(--mantine-color-gray-0)",- },- },- }}+ size={buttonSize}>{horizontal ? terminology.upload : terminology.uploadFiles}</Button>{!shouldHideGoogleDrive && (<Button- variant="subtle"- color="var(--mantine-color-gray-6)"+ variant="tertiary"+ accent="neutral"leftSection={<GoogleDriveIcon colored={isGoogleDriveEnabled} />}- justify={horizontal ? "center" : "flex-start"}+ justify={buttonJustify}onClick={handleGoogleDriveClick}fullWidth={!horizontal}- size={horizontal ? "xs" : "sm"}+ size={buttonSize}disabled={!isGoogleDriveEnabled}- styles={{- root: {- backgroundColor: "transparent",- border: "none",- "&:hover": {- backgroundColor: isGoogleDriveEnabled- ? "var(--mantine-color-gray-0)"- : "transparent",- },- },- }}title={!isGoogleDriveEnabled? t(@@ -162,25 +122,14 @@ const FileSourceButtons: React.FC<FileSourceButtonsProps> = ({{!shouldHideMobileQR && (<Button- variant="subtle"- color="var(--mantine-color-gray-6)"+ variant="tertiary"+ accent="neutral"leftSection={<PhonelinkIcon />}- justify={horizontal ? "center" : "flex-start"}+ justify={buttonJustify}onClick={handleMobileUploadClick}fullWidth={!horizontal}- size={horizontal ? "xs" : "sm"}+ size={buttonSize}disabled={!isMobileUploadEnabled}- styles={{- root: {- backgroundColor: "transparent",- border: "none",- "&:hover": {- backgroundColor: isMobileUploadEnabled- ? "var(--mantine-color-gray-0)"- : "transparent",- },- },- }}title={!isMobileUploadEnabled? t(diff --git a/frontend/editor/src/core/components/filesPage/DeleteFilesDialog.tsx b/frontend/editor/src/core/components/filesPage/DeleteFilesDialog.tsxindex 2eb57716f2..0261cf58dd 100644--- a/frontend/editor/src/core/components/filesPage/DeleteFilesDialog.tsx+++ b/frontend/editor/src/core/components/filesPage/DeleteFilesDialog.tsx@@ -1,8 +1,10 @@import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Alert, Button, Group, Modal, Radio, Stack, Text } from "@mantine/core";+import { Alert, Group, Modal, Radio, Stack, Text } from "@mantine/core";import ErrorOutlineIcon from "@mui/icons-material/ErrorOutlined";+import { Button } from "@app/ui/Button";+import type { StirlingFileStub } from "@app/types/fileContext";import type { DeleteScope } from "@app/services/serverStorageDelete";@@ -164,11 +166,11 @@ export function DeleteFilesDialog({)}<Group justify="flex-end">- <Button variant="default" onClick={onClose} disabled={submitting}>+ <Button variant="secondary" onClick={onClose} disabled={submitting}>{t("filesPage.cancel", "Cancel")}</Button><Button- color="red"+ accent="danger"loading={submitting}onClick={() => runConfirm(showChoice ? scope : fixedScope)}>diff --git a/frontend/editor/src/core/components/filesPage/DeleteFolderDialog.tsx b/frontend/editor/src/core/components/filesPage/DeleteFolderDialog.tsxindex e2d7edc438..08811f0053 100644--- a/frontend/editor/src/core/components/filesPage/DeleteFolderDialog.tsx+++ b/frontend/editor/src/core/components/filesPage/DeleteFolderDialog.tsx@@ -1,16 +1,9 @@import React, { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import {- Alert,- Button,- Checkbox,- Group,- Modal,- Stack,- Text,-} from "@mantine/core";+import { Alert, Checkbox, Group, Modal, Stack, Text } from "@mantine/core";import ErrorOutlineIcon from "@mui/icons-material/ErrorOutlined";+import { Button } from "@app/ui/Button";import { FolderRecord } from "@app/types/folder";interface DeleteFolderDialogProps {@@ -95,11 +88,11 @@ export function DeleteFolderDialog({</Alert>)}<Group justify="flex-end">- <Button variant="default" onClick={onClose} disabled={submitting}>+ <Button variant="secondary" onClick={onClose} disabled={submitting}>{t("filesPage.cancel", "Cancel")}</Button><Button- color="red"+ accent="danger"loading={submitting}onClick={async () => {setSubmitting(true);diff --git a/frontend/editor/src/core/components/filesPage/FileDetailsPanel.tsx b/frontend/editor/src/core/components/filesPage/FileDetailsPanel.tsxindex aaab5d3b08..e789167038 100644--- a/frontend/editor/src/core/components/filesPage/FileDetailsPanel.tsx+++ b/frontend/editor/src/core/components/filesPage/FileDetailsPanel.tsx@@ -1,6 +1,8 @@import React, { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { ActionIcon, Badge, Button, Tooltip } from "@mantine/core";+import { Badge, Tooltip } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import CloseIcon from "@mui/icons-material/Close";import OpenInNewIcon from "@mui/icons-material/OpenInNew";import DriveFileMoveIcon from "@mui/icons-material/DriveFileMove";@@ -143,7 +145,12 @@ export function FileDetailsPanel({label={t("filesPage.closeDetails", "Close details")}withinPortal>- <ActionIcon variant="subtle" size="sm" onClick={onClose}>+ <ActionIcon+ variant="tertiary"+ size="sm"+ onClick={onClose}+ aria-label={t("filesPage.closeDetails", "Close details")}+ ><CloseIcon fontSize="small" /></ActionIcon></Tooltip>@@ -181,25 +188,27 @@ export function FileDetailsPanel({<span className="files-page-details-ext-tag">{ext}</span>)}{(single.versionNumber ?? 1) > 1 && (- <Badge size="sm" variant="filled" color="blue">+ <Badge size="sm" color="blue">v{single.versionNumber}</Badge>)}</div>- <button- type="button"+ <Button+ variant="tertiary"className="files-page-details-collapse-toggle"onClick={() => setFieldsOpen((o) => !o)}aria-expanded={fieldsOpen}+ rightSection={+ <KeyboardArrowDownIcon+ className={`files-page-details-collapse-chevron${+ fieldsOpen ? " is-open" : ""+ }`}+ fontSize="small"+ />+ }><span>{t("filesPage.fileInfo", "File info")}</span>- <KeyboardArrowDownIcon- className={`files-page-details-collapse-chevron${- fieldsOpen ? " is-open" : ""- }`}- fontSize="small"- />- </button>+ </Button>{fieldsOpen && (<div className="files-page-details-fieldlist"><DetailField@@ -256,7 +265,7 @@ export function FileDetailsPanel({(compactVersions && onOpenVersionHistory ? (<ButtonleftSection={<HistoryIcon fontSize="small" />}- variant="default"+ variant="secondary"onClick={onOpenVersionHistory}>{t(@@ -291,7 +300,6 @@ export function FileDetailsPanel({<div className="files-page-details-actions"><ButtonleftSection={<OpenInNewIcon fontSize="small" />}- variant="filled"onClick={() => onAddToWorkspace(selectedFileIds)}>{files.length === 1@@ -302,7 +310,7 @@ export function FileDetailsPanel({</Button><ButtonleftSection={<DownloadIcon fontSize="small" />}- variant="default"+ variant="secondary"onClick={handleDownload}loading={downloading}>@@ -329,14 +337,12 @@ export function FileDetailsPanel({><ButtonleftSection={<LinkIcon fontSize="small" />}- variant="default"+ variant="secondary"disabled={!sharingEnabled}onClick={() => setShareModalOpen(true)}- styles={{- root: {- // Keep tooltip hoverable while button is disabled.- pointerEvents: sharingEnabled ? undefined : "auto",- },+ style={{+ // Keep tooltip hoverable while button is disabled.+ pointerEvents: sharingEnabled ? undefined : "auto",}}>{t("filesPage.shareManage", "Manage sharing")}@@ -345,7 +351,7 @@ export function FileDetailsPanel({)}<ButtonleftSection={<DriveFileMoveIcon fontSize="small" />}- variant="default"+ variant="secondary"onClick={() => onMove(selectedFileIds)}>{t("filesPage.moveTo", "Move to…")}@@ -363,16 +369,12 @@ export function FileDetailsPanel({><ButtonleftSection={<CloudUploadIcon fontSize="small" />}- variant="default"+ variant="secondary"disabled={Boolean(saveToServerDisabledReason)}onClick={() => onSaveToServer(localOnlyFiles)}- styles={{- root: {- // Keep tooltip hoverable while button is disabled.- pointerEvents: saveToServerDisabledReason- ? "auto"- : undefined,- },+ style={{+ // Keep tooltip hoverable while button is disabled.+ pointerEvents: saveToServerDisabledReason ? "auto" : undefined,}}>{t("filesPage.saveToServer", "Save to server")}@@ -381,8 +383,7 @@ export function FileDetailsPanel({)}<ButtonleftSection={<DeleteIcon fontSize="small" />}- color="red"- variant="light"+ accent="danger"onClick={() => onRemove(selectedFileIds)}>{t("filesPage.remove", "Delete")}diff --git a/frontend/editor/src/core/components/filesPage/FileGrid.tsx b/frontend/editor/src/core/components/filesPage/FileGrid.tsxindex 01e9b9355a..4d18fccc80 100644--- a/frontend/editor/src/core/components/filesPage/FileGrid.tsx+++ b/frontend/editor/src/core/components/filesPage/FileGrid.tsx@@ -1,6 +1,8 @@import React, { useCallback, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { ActionIcon, Button, Checkbox, Menu, Tooltip } from "@mantine/core";+import { Checkbox, Menu, Tooltip } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import MoreVertIcon from "@mui/icons-material/MoreVert";import ShieldOutlinedIcon from "@mui/icons-material/ShieldOutlined";import FolderIcon from "@mui/icons-material/Folder";@@ -297,10 +299,10 @@ function EmptyState({<span style={{ display: "inline-flex" }}><Buttonsize="md"- variant="default"+ variant="secondary"leftSection={<CreateNewFolderIcon fontSize="small" />}disabled- styles={{ root: { pointerEvents: "auto" } }}+ style={{ pointerEvents: "auto" }}>{t("filesPage.empty.newFolderCta", "Create folder")}</Button>@@ -309,7 +311,7 @@ function EmptyState({) : (<Buttonsize="md"- variant="default"+ variant="secondary"leftSection={<CreateNewFolderIcon fontSize="small" />}onClick={onCreateFolder}>@@ -528,8 +530,6 @@ function FolderCard({<Menu.Target><ActionIconref={kebabRef}- variant="filled"- color="gray"size="sm"onClick={(e) => e.stopPropagation()}aria-label={t("filesPage.folderMenu", "Folder actions")}@@ -771,8 +771,6 @@ function FileCard({<Menu.Target><ActionIconref={kebabRef}- variant="filled"- color="gray"size="sm"onClick={(e) => e.stopPropagation()}aria-label={t("filesPage.fileMenu", "File actions")}@@ -1151,7 +1149,7 @@ function FolderRow({<Menu.Target><ActionIconref={kebabRef}- variant="subtle"+ variant="tertiary"size="sm"onClick={(e) => e.stopPropagation()}aria-label={t("filesPage.folderMenu", "Folder actions")}@@ -1370,7 +1368,7 @@ function FileRow({<Menu.Target><ActionIconref={kebabRef}- variant="subtle"+ variant="tertiary"size="sm"onClick={(e) => e.stopPropagation()}aria-label={t("filesPage.fileMenu", "File actions")}diff --git a/frontend/editor/src/core/components/filesPage/FileManagerView.tsx b/frontend/editor/src/core/components/filesPage/FileManagerView.tsxindex f88e6b7945..002d81ca00 100644--- a/frontend/editor/src/core/components/filesPage/FileManagerView.tsx+++ b/frontend/editor/src/core/components/filesPage/FileManagerView.tsx@@ -7,19 +7,12 @@ import React, {} from "react";import { useTranslation } from "react-i18next";import { useLocation, useNavigate } from "react-router-dom";-import {- ActionIcon,- Button,- Drawer,- Group,- MultiSelect,- SegmentedControl,- Select,- Tooltip,-} from "@mantine/core";+import { Drawer, Group, MultiSelect, Select, Tooltip } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useMediaQuery } from "@mantine/hooks";import SearchIcon from "@mui/icons-material/Search";-import CloseIcon from "@mui/icons-material/Close";import UploadFileIcon from "@mui/icons-material/UploadFile";import QrCode2Icon from "@mui/icons-material/QrCode2";import CreateNewFolderIcon from "@mui/icons-material/CreateNewFolder";@@ -910,8 +903,8 @@ export default function FileManagerView() {withinPortal><ActionIcon- variant="default"- size="md"+ variant="secondary"+ size="sm"loading={refreshing}disabled={refreshing || Boolean(signInRequiredReason)}aria-busy={refreshing}@@ -930,11 +923,11 @@ export default function FileManagerView() {><span style={{ display: "inline-flex" }}><Button- variant="default"+ variant="secondary"size="sm"leftSection={<CreateNewFolderIcon fontSize="small" />}disabled- styles={{ root: { pointerEvents: "auto" } }}+ style={{ pointerEvents: "auto" }}>{t("filesPage.newFolder", "New folder")}</Button>@@ -942,7 +935,7 @@ export default function FileManagerView() {</Tooltip>) : (<Button- variant="default"+ variant="secondary"size="sm"leftSection={<CreateNewFolderIcon fontSize="small" />}onClick={() => openNewFolderDialog()}@@ -966,9 +959,8 @@ export default function FileManagerView() {withinPortal><ActionIcon- size="lg"- variant="default"- radius="md"+ size="sm"+ variant="secondary"onClick={() => setMobileUploadModalOpen(true)}aria-label={t("filesPage.uploadFromMobile",@@ -1012,11 +1004,11 @@ export default function FileManagerView() {<span>{folders.error}</span><ActionIconsize="sm"- variant="subtle"+ variant="tertiary"aria-label={t("filesPage.dismissError", "Dismiss")}onClick={() => folders.setError(null)}>- <CloseIcon fontSize="small" />+ ×</ActionIcon></div>)}@@ -1147,8 +1139,8 @@ export default function FileManagerView() {w={280}><Button- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"onClick={() => {if (allSelected) {setSelectedFileIds(new Set());@@ -1210,19 +1202,17 @@ export default function FileManagerView() {><Buttonsize="sm"- variant="default"+ variant="secondary"leftSection={<CloudUploadIcon fontSize="small" />}disabled={Boolean(saveToServerDisabledReason)}onClick={() =>setSaveToServerTarget(localOnlySelectedStubs)}- styles={{- root: {- // Keep the tooltip hoverable while disabled.- pointerEvents: saveToServerDisabledReason- ? "auto"- : undefined,- },+ style={{+ // Keep the tooltip hoverable while disabled.+ pointerEvents: saveToServerDisabledReason+ ? "auto"+ : undefined,}}aria-label={t("filesPage.saveToServer",@@ -1242,7 +1232,7 @@ export default function FileManagerView() {><Buttonsize="sm"- variant="default"+ variant="secondary"leftSection={<InfoOutlinedIcon fontSize="small" />}@@ -1259,7 +1249,7 @@ export default function FileManagerView() {<Tooltip label={moveLabel} withinPortal><Buttonsize="sm"- variant="default"+ variant="secondary"leftSection={<DriveFileMoveIcon fontSize="small" />}onClick={() => promptMoveFiles(selectedFiles)}aria-label={moveLabel}@@ -1270,8 +1260,8 @@ export default function FileManagerView() {<Tooltip label={removeLabel} withinPortal><Buttonsize="sm"- color="red"- variant="light"+ accent="danger"+ variant="secondary"leftSection={<DeleteIcon fontSize="small" />}onClick={() => handleRemoveFiles(selectedFiles)}aria-label={removeLabel}@@ -1284,7 +1274,7 @@ export default function FileManagerView() {withinPortal><ActionIcon- variant="subtle"+ variant="tertiary"size="md"onClick={() => clearSelection()}aria-label={t(@@ -1292,7 +1282,7 @@ export default function FileManagerView() {"Clear selection",)}>- <CloseIcon fontSize="small" />+ ×</ActionIcon></Tooltip></Group>@@ -1388,7 +1378,7 @@ export default function FileManagerView() {/><span className="files-page-toolbar-divider" aria-hidden="true" /><SegmentedControl- size="xs"+ size="sm"value={viewMode}onChange={(v) => {// Mantine only emits values declared in `data[].value`, but@@ -1401,7 +1391,7 @@ export default function FileManagerView() {setViewMode(v as (typeof FILES_PAGE_VIEW_MODES)[number]);}}aria-label={t("filesPage.viewMode.label", "View mode")}- data={[+ options={[{value: "grid",label: (@@ -1686,12 +1676,12 @@ const SearchField = React.forwardRef</>{value && (<ActionIcon- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"onClick={() => onChange("")}aria-label={t("filesPage.clearSearch", "Clear search")}>- <CloseIcon fontSize="small" />+ ×</ActionIcon>)}</div>@@ -1712,8 +1702,8 @@ function Breadcrumbs() {const isLast = idx === trail.length - 1;return (<React.Fragment key={entry.id ?? "root"}>- <button- type="button"+ <Button+ variant="tertiary"className={`files-page-breadcrumb${isLast ? " is-current" : ""}`}onClick={() => folders.setCurrentFolderId(entry.id)}onDragOver={(e) => {@@ -1772,7 +1762,7 @@ function Breadcrumbs() {}}>{entry.name}- </button>+ </Button>{!isLast && (<KeyboardArrowRightIconclassName="files-page-breadcrumb-sep"diff --git a/frontend/editor/src/core/components/filesPage/FolderAppearancePicker.tsx b/frontend/editor/src/core/components/filesPage/FolderAppearancePicker.tsxindex c5f3479038..3944489cb7 100644--- a/frontend/editor/src/core/components/filesPage/FolderAppearancePicker.tsx+++ b/frontend/editor/src/core/components/filesPage/FolderAppearancePicker.tsx@@ -13,6 +13,7 @@ import {FOLDER_ICONS,FolderIconOption,} from "@app/components/filesPage/folderIcons";+import { Button } from "@app/ui/Button";interface FolderAppearancePickerProps {folder: FolderRecord;@@ -50,9 +51,9 @@ export function FolderAppearancePicker({}}>{FOLDER_COLOR_PALETTE.map((c) => (- <button+ <Buttonkey={c}- type="button"+ variant="secondary"disabled={disabled}aria-label={t("filesPage.appearance.useColour",@@ -146,8 +147,8 @@ function IconButton({}) {return (<Tooltip label={icon.label} withinPortal>- <button- type="button"+ <Button+ variant="tertiary"disabled={disabled}aria-label={icon.label}onClick={(e) => {@@ -172,7 +173,7 @@ function IconButton({}}>{icon.glyph || "-"}- </button>+ </Button></Tooltip>);}diff --git a/frontend/editor/src/core/components/filesPage/FolderNameDialog.tsx b/frontend/editor/src/core/components/filesPage/FolderNameDialog.tsxindex 4197d652ed..62858076cd 100644--- a/frontend/editor/src/core/components/filesPage/FolderNameDialog.tsx+++ b/frontend/editor/src/core/components/filesPage/FolderNameDialog.tsx@@ -1,8 +1,10 @@import React, { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { Alert, Button, Group, Modal, Stack, TextInput } from "@mantine/core";+import { Alert, Group, Modal, Stack, TextInput } from "@mantine/core";import ErrorOutlineIcon from "@mui/icons-material/ErrorOutlined";+import { Button } from "@app/ui/Button";+interface FolderNameDialogProps {opened: boolean;title: string;@@ -94,7 +96,7 @@ export function FolderNameDialog({</Alert>)}<Group justify="flex-end">- <Button variant="default" onClick={onClose}>+ <Button variant="secondary" onClick={onClose}>{t("filesPage.folderName.cancel", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/core/components/filesPage/FolderTreeSidebar.tsx b/frontend/editor/src/core/components/filesPage/FolderTreeSidebar.tsxindex 72bd4186ec..597b0782e8 100644--- a/frontend/editor/src/core/components/filesPage/FolderTreeSidebar.tsx+++ b/frontend/editor/src/core/components/filesPage/FolderTreeSidebar.tsx@@ -1,6 +1,7 @@import React, { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { ActionIcon, Menu } from "@mantine/core";+import { Menu } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight";import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";import HomeIcon from "@mui/icons-material/Home";@@ -409,8 +410,8 @@ function TreeNodeRow({><Menu.Target><ActionIcon- size="xs"- variant="subtle"+ size="sm"+ variant="tertiary"className="files-page-tree-kebab"aria-label={t("filesPage.treeMenu.actions",diff --git a/frontend/editor/src/core/components/filesPage/MoveToFolderDialog.tsx b/frontend/editor/src/core/components/filesPage/MoveToFolderDialog.tsxindex 8950f3f494..b6e098ea4d 100644--- a/frontend/editor/src/core/components/filesPage/MoveToFolderDialog.tsx+++ b/frontend/editor/src/core/components/filesPage/MoveToFolderDialog.tsx@@ -1,9 +1,7 @@import React, { useMemo, useState } from "react";import { useTranslation } from "react-i18next";import {- ActionIcon,Alert,- Button,Group,Modal,Stack,@@ -15,9 +13,10 @@ import HomeIcon from "@mui/icons-material/Home";import FolderIcon from "@mui/icons-material/Folder";import FolderOpenIcon from "@mui/icons-material/FolderOpen";import CreateNewFolderIcon from "@mui/icons-material/CreateNewFolder";-import CloseIcon from "@mui/icons-material/Close";import ErrorOutlineIcon from "@mui/icons-material/ErrorOutlined";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { FolderId, FolderRecord, ROOT_FOLDER_ID } from "@app/types/folder";interface MoveToFolderDialogProps {@@ -228,8 +227,7 @@ export function MoveToFolderDialog({withinPortal><ActionIcon- variant="subtle"- color="gray"+ variant="tertiary"size="lg"onClick={handleCancel}disabled={creating}@@ -238,20 +236,20 @@ export function MoveToFolderDialog({"Discard",)}>- <CloseIcon fontSize="small" />+ ×</ActionIcon></Tooltip></Group>) : (<Button- variant="subtle"+ variant="tertiary"size="sm"leftSection={<CreateNewFolderIcon fontSize="small" />}onClick={() => {setCreatingFolder(true);setNewFolderName("");}}- styles={{ root: { alignSelf: "flex-start" } }}+ style={{ alignSelf: "flex-start" }}data-testid="move-dialog-create-folder-toggle">{t(@@ -272,7 +270,7 @@ export function MoveToFolderDialog({</Alert>)}<Group justify="flex-end">- <Button variant="default" onClick={onClose} disabled={submitting}>+ <Button variant="secondary" onClick={onClose} disabled={submitting}>{t("filesPage.moveDialog.cancel", "Cancel")}</Button><Button@@ -325,35 +323,35 @@ function FolderPick({onPick,}: FolderPickProps) {return (- <button- type="button"+ <Button+ variant="tertiary"+ justify="start"+ fullWidthonClick={onPick}disabled={disabled}+ leftSection={+ isRoot ? (+ <HomeIcon fontSize="small" />+ ) : isActive ? (+ <FolderOpenIcon fontSize="small" style={{ color }} />+ ) : (+ <FolderIcon fontSize="small" style={{ color }} />+ )+ }style={{- all: "unset",cursor: disabled ? "not-allowed" : "pointer",opacity: disabled ? 0.45 : 1,- display: "flex",- alignItems: "center",gap: "0.5rem",padding: `0.4rem 0.75rem 0.4rem ${0.75 + depth * 0.85}rem`,- width: "100%",background: isActive ? "var(--hover-bg)" : "transparent",borderBottom: "1px solid var(--border-subtle)",boxSizing: "border-box",fontWeight: isActive ? 600 : 400,}}>- {isRoot ? (- <HomeIcon fontSize="small" />- ) : isActive ? (- <FolderOpenIcon fontSize="small" style={{ color }} />- ) : (- <FolderIcon fontSize="small" style={{ color }} />- )}<span style={{ overflow: "hidden", textOverflow: "ellipsis" }}>{label}</span>- </button>+ </Button>);}diff --git a/frontend/editor/src/core/components/filesPage/VersionTimeline.tsx b/frontend/editor/src/core/components/filesPage/VersionTimeline.tsxindex 937db8c384..0b6a75878b 100644--- a/frontend/editor/src/core/components/filesPage/VersionTimeline.tsx+++ b/frontend/editor/src/core/components/filesPage/VersionTimeline.tsx@@ -1,6 +1,8 @@import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { ActionIcon, Badge, Menu } from "@mantine/core";+import { Badge, Menu } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import OpenInNewIcon from "@mui/icons-material/OpenInNew";import DeleteIcon from "@mui/icons-material/Delete";import DownloadIcon from "@mui/icons-material/Download";@@ -144,8 +146,8 @@ export function VersionTimeline({<span className="files-page-details-version-timeline-rail-line" />)}</div>- <button- type="button"+ <Button+ variant="tertiary"className="files-page-details-version-timeline-ellipsis-btn"onClick={() => setShowAllCollapsed(true)}>@@ -154,7 +156,7 @@ export function VersionTimeline({"Show {{count}} earlier versions",{ count: row.hidden },)}- </button>+ </Button></li>);}@@ -181,24 +183,31 @@ export function VersionTimeline({)}</div><div className="files-page-details-version-timeline-body">- <button- type="button"+ <Button+ variant="tertiary"className="files-page-details-version-timeline-summary"onClick={() => toggleExpand(v.id)}aria-expanded={isExpanded}+ leftSection={+ <Badge+ size="xs"+ variant={isActive ? "filled" : "outline"}+ color="blue"+ >+ v{v.versionNumber ?? 1}+ </Badge>+ }+ rightSection={+ <KeyboardArrowDownIcon+ className={`files-page-details-version-timeline-chevron${+ isExpanded ? " is-expanded" : ""+ }`}+ fontSize="small"+ />+ }>- <Badge- size="xs"- variant={isActive ? "filled" : "outline"}- color="blue"- >- v{v.versionNumber ?? 1}- </Badge>{delta ? (<span className="files-page-details-version-timeline-delta">- <span className="files-page-details-version-timeline-delta-plus">- +- </span><ToolLabel toolId={delta.toolId} /></span>) : (@@ -206,14 +215,7 @@ export function VersionTimeline({{t("filesPage.versionOrigin", "Original upload")}</span>)}- <span className="files-page-details-version-timeline-spacer" />- <KeyboardArrowDownIcon- className={`files-page-details-version-timeline-chevron${- isExpanded ? " is-expanded" : ""- }`}- fontSize="small"- />- </button>+ </Button><div className="files-page-details-version-timeline-meta-line"><span>{formatFileSize(v.size)}</span>{v.lastModified ? (@@ -230,7 +232,7 @@ export function VersionTimeline({<Menu position="bottom-end" withinPortal shadow="md"><Menu.Target><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"aria-label={t("filesPage.versionActions",@@ -303,13 +305,13 @@ export function VersionTimeline({})}</ol>{collapsible && showAllCollapsed && (- <button- type="button"+ <Button+ variant="tertiary"className="files-page-details-version-timeline-collapse-btn"onClick={() => setShowAllCollapsed(false)}>{t("filesPage.versionCollapse", "Collapse middle versions")}- </button>+ </Button>)}</div>);diff --git a/frontend/editor/src/core/components/onboarding/InitialOnboardingModal/renderButtons.tsx b/frontend/editor/src/core/components/onboarding/InitialOnboardingModal/renderButtons.tsxindex fc7914db55..86a087f325 100644--- a/frontend/editor/src/core/components/onboarding/InitialOnboardingModal/renderButtons.tsx+++ b/frontend/editor/src/core/components/onboarding/InitialOnboardingModal/renderButtons.tsx@@ -1,5 +1,7 @@import React from "react";-import { Button, Group, ActionIcon } from "@mantine/core";+import { Group } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";+import { Button } from "@app/ui/Button";import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";import { useTranslation } from "react-i18next";import {@@ -33,22 +35,6 @@ export function SlideButtons({(btn) => btn.group === "right",);- const buttonStyles = (variant: ButtonDefinition["variant"]) =>- variant === "primary"- ? {- root: {- background: "var(--onboarding-primary-button-bg)",- color: "var(--onboarding-primary-button-text)",- },- }- : {- root: {- background: "var(--onboarding-secondary-button-bg)",- border: "1px solid var(--onboarding-secondary-button-border)",- color: "var(--onboarding-secondary-button-text)",- },- };-const resolveButtonLabel = (button: ButtonDefinition) => {// Special case: override "See Plans" with "Upgrade now" when over limitif (@@ -77,20 +63,14 @@ export function SlideButtons({<ActionIconkey={button.key}onClick={() => onAction(button.action)}- radius="md"- size={40}+ variant="secondary"+ accent="neutral"disabled={disabled}- styles={{- root: {- background: "var(--onboarding-secondary-button-bg)",- border: "1px solid var(--onboarding-secondary-button-border)",- color: "var(--onboarding-secondary-button-text)",- },- }}+ aria-label={t("onboarding.buttons.back", "Back")}>- {button.icon === "chevron-left" && (+ {button.icon === "chevron-left" ? (<ChevronLeftIcon fontSize="small" />- )}+ ) : null}</ActionIcon>);}@@ -103,7 +83,10 @@ export function SlideButtons({key={button.key}onClick={() => onAction(button.action)}disabled={disabled}- styles={buttonStyles(variant)}+ variant={variant === "primary" ? "primary" : "secondary"}+ accent={+ button.accent ?? (variant === "primary" ? "default" : "neutral")+ }>{label}</Button>diff --git a/frontend/editor/src/core/components/onboarding/OnboardingModalSlide.tsx b/frontend/editor/src/core/components/onboarding/OnboardingModalSlide.tsxindex b1bc731d52..b8135739bd 100644--- a/frontend/editor/src/core/components/onboarding/OnboardingModalSlide.tsx+++ b/frontend/editor/src/core/components/onboarding/OnboardingModalSlide.tsx@@ -6,9 +6,10 @@*/import React from "react";-import { Modal, Stack, ActionIcon } from "@mantine/core";+import { Modal, Stack } from "@mantine/core";+import { useTranslation } from "react-i18next";+import { ActionIcon } from "@app/ui/ActionIcon";import DiamondOutlinedIcon from "@mui/icons-material/DiamondOutlined";-import CloseIcon from "@mui/icons-material/Close";import type {SlideDefinition,@@ -45,6 +46,7 @@ export default function OnboardingModalSlide({onAction,allowDismiss = true,}: OnboardingModalSlideProps) {+ const { t } = useTranslation();const renderHero = () => {if (slideDefinition.hero.type === "dual-icon") {return (@@ -139,8 +141,9 @@ export default function OnboardingModalSlide({{allowDismiss && (<ActionIcononClick={onSkip}- radius="md"- size={36}+ variant="tertiary"+ size="lg"+ aria-label={t("common.close", "Close")}style={{position: "absolute",top: 16,@@ -150,15 +153,12 @@ export default function OnboardingModalSlide({backdropFilter: "blur(4px)",zIndex: 10,}}- styles={{- root: {- "&:hover": {- backgroundColor: "rgba(255, 255, 255, 0.3)",- },- },- }}>- <CloseIcon fontSize="small" />+ <LocalIcon+ icon="close-rounded"+ width="1.25rem"+ height="1.25rem"+ /></ActionIcon>)}<div className={styles.heroLogo} key={`logo-${slideContent.key}`}>diff --git a/frontend/editor/src/core/components/onboarding/OnboardingTour.tsx b/frontend/editor/src/core/components/onboarding/OnboardingTour.tsxindex 1f3ca67692..c38d9f952b 100644--- a/frontend/editor/src/core/components/onboarding/OnboardingTour.tsx+++ b/frontend/editor/src/core/components/onboarding/OnboardingTour.tsx@@ -8,7 +8,7 @@import React from "react";import { TourProvider, useTour, type StepType } from "@reactour/tour";-import { CloseButton, ActionIcon } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import ArrowForwardIcon from "@mui/icons-material/ArrowForward";import ArrowBackIcon from "@mui/icons-material/ArrowBack";import CheckIcon from "@mui/icons-material/Check";@@ -137,7 +137,7 @@ export default function OnboardingTour({setIsOpen,})}- variant="subtle"+ variant="tertiary"size="lg"aria-label={isLast@@ -151,11 +151,15 @@ export default function OnboardingTour({}}components={{Close: ({ onClick }) => (- <CloseButton+ <ActionIcononClick={onClick}+ variant="tertiary"size="md"+ aria-label={t("onboarding.close", "Close")}style={{ position: "absolute", top: "8px", right: "8px" }}- />+ >+ ×+ </ActionIcon>),Content: ({ content }: { content: string }) => (<divdiff --git a/frontend/editor/src/core/components/onboarding/onboardingFlowConfig.ts b/frontend/editor/src/core/components/onboarding/onboardingFlowConfig.tsindex 5f5a9be408..6eb843f4a5 100644--- a/frontend/editor/src/core/components/onboarding/onboardingFlowConfig.ts+++ b/frontend/editor/src/core/components/onboarding/onboardingFlowConfig.ts@@ -8,6 +8,7 @@ import TourOverviewSlide from "@app/components/onboarding/slides/TourOverviewSliimport AnalyticsChoiceSlide from "@app/components/onboarding/slides/AnalyticsChoiceSlide";import MFASetupSlide from "@app/components/onboarding/slides/MFASetupSlide";import { SlideConfig, LicenseNotice } from "@app/types/types";+import type { ButtonAccent } from "@app/ui/Button";export type SlideId =| "first-login"@@ -83,6 +84,8 @@ export interface ButtonDefinition {label?: string;icon?: "chevron-left";variant?: "primary" | "secondary" | "default";+ /** Accent for the shared Button; defaults to neutral. */+ accent?: ButtonAccent;group: "left" | "right";action: ButtonAction;disabledWhen?: (state: FlowState) => boolean;@@ -238,6 +241,7 @@ export const SLIDE_DEFINITIONS: Record<SlideId, SlideDefinition> = {type: "button",label: "onboarding.serverLicense.seePlans",variant: "primary",+ accent: "premium",group: "right",action: "see-plans",},diff --git a/frontend/editor/src/core/components/onboarding/slides/AnalyticsChoiceSlide.tsx b/frontend/editor/src/core/components/onboarding/slides/AnalyticsChoiceSlide.tsxindex 6960b88c27..23566a5527 100644--- a/frontend/editor/src/core/components/onboarding/slides/AnalyticsChoiceSlide.tsx+++ b/frontend/editor/src/core/components/onboarding/slides/AnalyticsChoiceSlide.tsx@@ -1,6 +1,6 @@import React from "react";import { Trans } from "react-i18next";-import { Button } from "@mantine/core";+import { Button } from "@app/ui/Button";import OpenInNewIcon from "@mui/icons-material/OpenInNew";import i18n from "@app/i18n";import { SlideConfig } from "@app/types/types";@@ -36,7 +36,7 @@ export default function AnalyticsChoiceSlide({<br /><div style={{ textAlign: "right", marginTop: 0 }}><Button- variant="default"+ variant="secondary"size="sm"onClick={() =>window.open(diff --git a/frontend/editor/src/core/components/onboarding/slides/DesktopInstallTitle.tsx b/frontend/editor/src/core/components/onboarding/slides/DesktopInstallTitle.tsxindex 7362774017..97329db5d7 100644--- a/frontend/editor/src/core/components/onboarding/slides/DesktopInstallTitle.tsx+++ b/frontend/editor/src/core/components/onboarding/slides/DesktopInstallTitle.tsx@@ -1,6 +1,7 @@import React from "react";import { useTranslation } from "react-i18next";-import { Menu, ActionIcon } from "@mantine/core";+import { Menu } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import ExpandMoreIcon from "@mui/icons-material/ExpandMore";export interface OSOption {@@ -67,8 +68,12 @@ export const DesktopInstallTitle: React.FC<DesktopInstallTitleProps> = ({<Menu position="bottom" offset={5} zIndex={10000}><Menu.Target><ActionIcon- variant="transparent"+ variant="tertiary"size="sm"+ aria-label={t(+ "onboarding.desktopInstall.selectOs",+ "Select operating system",+ )}style={{background: "transparent",border: "none",diff --git a/frontend/editor/src/core/components/onboarding/slides/FirstLoginSlide.tsx b/frontend/editor/src/core/components/onboarding/slides/FirstLoginSlide.tsxindex 6f0e0e587c..89de08e6e7 100644--- a/frontend/editor/src/core/components/onboarding/slides/FirstLoginSlide.tsx+++ b/frontend/editor/src/core/components/onboarding/slides/FirstLoginSlide.tsx@@ -1,5 +1,6 @@import React, { useState } from "react";-import { Stack, PasswordInput, Button, Alert, Text } from "@mantine/core";+import { Stack, PasswordInput, Alert, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { SlideConfig } from "@app/types/types";import LocalIcon from "@app/components/shared/LocalIcon";@@ -199,8 +200,8 @@ function FirstLoginForm({/><Button- type="submit"fullWidth+ type="submit"loading={loading}disabled={!newPassword ||@@ -209,7 +210,7 @@ function FirstLoginForm({confirmPassword.length < 8}size="md"- mt="xs"+ style={{ marginTop: "var(--mantine-spacing-xs)" }}>{t("firstLogin.changePassword", "Change Password")}</Button>diff --git a/frontend/editor/src/core/components/onboarding/slides/MFASetupSlide.tsx b/frontend/editor/src/core/components/onboarding/slides/MFASetupSlide.tsxindex de76eadd6b..c018d69265 100644--- a/frontend/editor/src/core/components/onboarding/slides/MFASetupSlide.tsx+++ b/frontend/editor/src/core/components/onboarding/slides/MFASetupSlide.tsx@@ -8,13 +8,13 @@ import {import {Alert,Box,- Button,Group,Loader,Stack,Text,TextInput,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { QRCodeSVG } from "qrcode.react";import { useTranslation } from "react-i18next";import { SlideConfig } from "@app/types/types";@@ -210,8 +210,8 @@ function MFASetupContent({ onMfaSetupComplete }: MFASetupSlideProps) {<Group justify="space-between" wrap="wrap"><Button+ variant="secondary"type="button"- variant="light"onClick={fetchMfaSetup}disabled={mfaLoading || submitting || setupComplete}>@@ -226,7 +226,7 @@ function MFASetupContent({ onMfaSetupComplete }: MFASetupSlideProps) {>Enable MFA</Button>- <Button type="button" variant="light" onClick={onLogout}>+ <Button variant="secondary" type="button" onClick={onLogout}>Logout</Button></Group>diff --git a/frontend/editor/src/core/components/pageEditor/FileThumbnail.tsx b/frontend/editor/src/core/components/pageEditor/FileThumbnail.tsxindex 93ff3c2ab9..472fc141d7 100644--- a/frontend/editor/src/core/components/pageEditor/FileThumbnail.tsx+++ b/frontend/editor/src/core/components/pageEditor/FileThumbnail.tsx@@ -5,7 +5,9 @@ import React, {useMemo,useEffect,} from "react";-import { ActionIcon, CheckboxIndicator } from "@mantine/core";+import { CheckboxIndicator } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import MoreVertIcon from "@mui/icons-material/MoreVert";import DeleteOutlineIcon from "@mui/icons-material/DeleteOutlined";@@ -259,7 +261,7 @@ const FileThumbnail = ({{/* Kebab menu */}<ActionIconaria-label={t("moreOptions", "More options")}- variant="subtle"+ variant="tertiary"className={styles.kebab}onClick={(e) => {e.stopPropagation();@@ -277,8 +279,18 @@ const FileThumbnail = ({style={{ width: actionsWidth }}onClick={(e) => e.stopPropagation()}>- <button+ <Button+ variant="tertiary"+ justify="start"+ fullWidthclassName={styles.actionRow}+ leftSection={+ isPinned ? (+ <PushPinIcon fontSize="small" />+ ) : (+ <PushPinOutlinedIcon fontSize="small" />+ )+ }onClick={() => {if (actualFile) {if (isPinned) {@@ -292,38 +304,36 @@ const FileThumbnail = ({setShowActions(false);}}>- {isPinned ? (- <PushPinIcon fontSize="small" />- ) : (- <PushPinOutlinedIcon fontSize="small" />- )}- <span>{isPinned ? t("unpin", "Unpin") : t("pin", "Pin")}</span>- </button>-- <button+ {isPinned ? t("unpin", "Unpin") : t("pin", "Pin")}+ </Button>+ <Button+ variant="tertiary"+ justify="start"+ fullWidthclassName={styles.actionRow}+ leftSection={<DownloadOutlinedIcon fontSize="small" />}onClick={() => {downloadSelectedFile();setShowActions(false);}}>- <DownloadOutlinedIcon fontSize="small" />- <span>{terminology.download}</span>- </button>-+ {terminology.download}+ </Button><div className={styles.actionsDivider} />-- <button+ <Button+ variant="tertiary"+ justify="start"+ fullWidthclassName={`${styles.actionRow} ${styles.actionDanger}`}+ leftSection={<DeleteOutlineIcon fontSize="small" />}onClick={() => {onDeleteFile(file.id);onSetStatus(`Deleted ${file.name}`);setShowActions(false);}}>- <DeleteOutlineIcon fontSize="small" />- <span>{t("delete", "Delete")}</span>- </button>+ {t("delete", "Delete")}+ </Button></div>)}diff --git a/frontend/editor/src/core/components/pageEditor/PageEditorControls.tsx b/frontend/editor/src/core/components/pageEditor/PageEditorControls.tsxindex 2e8653fa89..96762a9203 100644--- a/frontend/editor/src/core/components/pageEditor/PageEditorControls.tsx+++ b/frontend/editor/src/core/components/pageEditor/PageEditorControls.tsx@@ -1,4 +1,5 @@-import { Tooltip, ActionIcon } from "@mantine/core";+import { Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import UndoIcon from "@mui/icons-material/Undo";import RedoIcon from "@mui/icons-material/Redo";import ContentCutIcon from "@mui/icons-material/ContentCut";@@ -135,28 +136,22 @@ const PageEditorControls = ({{/* Undo/Redo */}<Tooltip label={t("pageEditor.toolbar.undo", "Undo")}><ActionIcon+ variant="tertiary"+ size="lg"onClick={onUndo}disabled={!canUndo}- variant="subtle"- style={{- color: canUndo ? "var(--text-secondary)" : "var(--text-muted)",- }}- radius="md"- size="lg"+ aria-label={t("pageEditor.toolbar.undo", "Undo")}><UndoIcon /></ActionIcon></Tooltip><Tooltip label={t("pageEditor.toolbar.redo", "Redo")}><ActionIcon+ variant="tertiary"+ size="lg"onClick={onRedo}disabled={!canRedo}- variant="subtle"- style={{- color: canRedo ? "var(--text-secondary)" : "var(--text-muted)",- }}- radius="md"- size="lg"+ aria-label={t("pageEditor.toolbar.redo", "Redo")}><RedoIcon /></ActionIcon>@@ -176,17 +171,14 @@ const PageEditorControls = ({label={t("pageEditor.toolbar.rotateLeft", "Rotate Selected Left")}><ActionIcon+ variant="tertiary"+ size="lg"onClick={() => onRotate("left")}disabled={selectedPageIds.length === 0}- variant="subtle"- style={{- color:- selectedPageIds.length > 0- ? "var(--text-secondary)"- : "var(--text-muted)",- }}- radius="md"- size="lg"+ aria-label={t(+ "pageEditor.toolbar.rotateLeft",+ "Rotate Selected Left",+ )}><RotateLeftIcon /></ActionIcon>@@ -195,68 +187,47 @@ const PageEditorControls = ({label={t("pageEditor.toolbar.rotateRight", "Rotate Selected Right")}><ActionIcon+ variant="tertiary"+ size="lg"onClick={() => onRotate("right")}disabled={selectedPageIds.length === 0}- variant="subtle"- style={{- color:- selectedPageIds.length > 0- ? "var(--text-secondary)"- : "var(--text-muted)",- }}- radius="md"- size="lg"+ aria-label={t(+ "pageEditor.toolbar.rotateRight",+ "Rotate Selected Right",+ )}><RotateRightIcon /></ActionIcon></Tooltip><Tooltip label={t("pageEditor.toolbar.delete", "Delete Selected")}><ActionIcon+ variant="tertiary"+ size="lg"onClick={onDelete}disabled={selectedPageIds.length === 0}- variant="subtle"- style={{- color:- selectedPageIds.length > 0- ? "var(--text-secondary)"- : "var(--text-muted)",- }}- radius="md"- size="lg"+ aria-label={t("pageEditor.toolbar.delete", "Delete Selected")}><DeleteIcon /></ActionIcon></Tooltip><Tooltip label={getSplitTooltip()}><ActionIcon+ variant="tertiary"+ size="lg"onClick={onSplit}disabled={selectedPageIds.length === 0}- variant="subtle"- style={{- color:- selectedPageIds.length > 0- ? "var(--text-secondary)"- : "var(--text-muted)",- }}- radius="md"- size="lg"+ aria-label={getSplitTooltip()}><ContentCutIcon /></ActionIcon></Tooltip><Tooltip label={getPageBreakTooltip()}><ActionIcon+ variant="tertiary"+ size="lg"onClick={onPageBreak}disabled={selectedPageIds.length === 0}- variant="subtle"- style={{- color:- selectedPageIds.length > 0- ? "var(--text-secondary)"- : "var(--text-muted)",- }}- radius="md"- size="lg"+ aria-label={getPageBreakTooltip()}><InsertPageBreakIcon /></ActionIcon>diff --git a/frontend/editor/src/core/components/pageEditor/PageSelectByNumberButton.tsx b/frontend/editor/src/core/components/pageEditor/PageSelectByNumberButton.tsxindex fff0b8ef8f..dc2032fa4a 100644--- a/frontend/editor/src/core/components/pageEditor/PageSelectByNumberButton.tsx+++ b/frontend/editor/src/core/components/pageEditor/PageSelectByNumberButton.tsx@@ -1,4 +1,5 @@-import { ActionIcon, Popover } from "@mantine/core";+import { Popover } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import { Tooltip } from "@app/components/shared/Tooltip";import BulkSelectionPanel from "@app/components/pageEditor/BulkSelectionPanel";@@ -37,8 +38,7 @@ export default function PageSelectByNumberButton({<Popover.Target><div style={{ display: "inline-flex" }}><ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"disabled={disabled || totalPages === 0}aria-label={label}>diff --git a/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/OperatorsSection.tsx b/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/OperatorsSection.tsxindex 71c07d26b3..d2ff79ad97 100644--- a/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/OperatorsSection.tsx+++ b/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/OperatorsSection.tsx@@ -1,4 +1,5 @@-import { Button, Text, Group, Divider } from "@mantine/core";+import { Text, Group, Divider } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import classes from "@app/components/pageEditor/bulkSelectionPanel/BulkSelectionPanel.module.css";import { LogicalOperator } from "@app/utils/bulkselection/selectionBuilders";@@ -22,7 +23,7 @@ const OperatorsSection = ({<Group gap="sm" wrap="nowrap"><Buttonsize="sm"- variant="outline"+ variant="secondary"className={classes.operatorChip}onClick={() => onInsertOperator("and")}disabled={!csvInput.trim()}@@ -37,7 +38,7 @@ const OperatorsSection = ({</Button><Buttonsize="sm"- variant="outline"+ variant="secondary"className={classes.operatorChip}onClick={() => onInsertOperator("or")}disabled={!csvInput.trim()}@@ -52,7 +53,7 @@ const OperatorsSection = ({</Button><Buttonsize="sm"- variant="outline"+ variant="secondary"className={classes.operatorChip}onClick={() => onInsertOperator("not")}disabled={!csvInput.trim()}@@ -70,7 +71,7 @@ const OperatorsSection = ({<Group gap="sm" wrap="nowrap"><Buttonsize="sm"- variant="outline"+ variant="secondary"className={classes.operatorChip}onClick={() => onInsertOperator("even")}title={t(@@ -84,7 +85,7 @@ const OperatorsSection = ({</Button><Buttonsize="sm"- variant="outline"+ variant="secondary"className={classes.operatorChip}onClick={() => onInsertOperator("odd")}title={t(diff --git a/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/PageSelectionInput.tsx b/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/PageSelectionInput.tsxindex 3a386f039d..2e5513a7c8 100644--- a/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/PageSelectionInput.tsx+++ b/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/PageSelectionInput.tsx@@ -1,4 +1,5 @@-import { TextInput, Button, Text, Flex, Switch } from "@mantine/core";+import { TextInput, Text, Flex, Switch } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { Tooltip } from "@app/components/shared/Tooltip";@@ -77,20 +78,15 @@ const PageSelectionInput = ({placeholder="1,3,5-10"rightSection={csvInput && (- <Button- variant="subtle"- size="xs"+ <ActionIcon+ variant="tertiary"+ accent="neutral"+ size="sm"onClick={onClear}- style={{- color: "var(--text-muted)",- minWidth: "auto",- width: "24px",- height: "24px",- padding: 0,- }}+ aria-label={t("clear", "Clear")}>- ×- </Button>+ ×+ </ActionIcon>)}onKeyDown={(e) => e.key === "Enter" && onUpdatePagesFromCSV()}diff --git a/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/SelectPages.tsx b/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/SelectPages.tsxindex 314ca282b6..5fc7341430 100644--- a/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/SelectPages.tsx+++ b/frontend/editor/src/core/components/pageEditor/bulkSelectionPanel/SelectPages.tsx@@ -1,5 +1,6 @@import { useState } from "react";-import { Button, Text, NumberInput, Group } from "@mantine/core";+import { Text, NumberInput, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import classes from "@app/components/pageEditor/bulkSelectionPanel/BulkSelectionPanel.module.css";interface SelectPagesProps {diff --git a/frontend/editor/src/core/components/shared/AppConfigModal.tsx b/frontend/editor/src/core/components/shared/AppConfigModal.tsxindex 365d42608a..264db178ac 100644--- a/frontend/editor/src/core/components/shared/AppConfigModal.tsx+++ b/frontend/editor/src/core/components/shared/AppConfigModal.tsx@@ -5,7 +5,8 @@ import React, {useCallback,useRef,} from "react";-import { Badge, Modal, Text, ActionIcon, Tooltip, Group } from "@mantine/core";+import { Badge, Modal, Text, Tooltip, Group } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useNavigate, useLocation } from "react-router-dom";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";@@ -365,7 +366,7 @@ const AppConfigModalInner: React.FC<AppConfigModalProps> = ({/><ActionIconref={closeButtonRef}- variant="subtle"+ variant="tertiary"onClick={handleClose}aria-label={t("settings.close", "Close")}data-autofocusdiff --git a/frontend/editor/src/core/components/shared/BulkShareModal.tsx b/frontend/editor/src/core/components/shared/BulkShareModal.tsxindex 978b321232..e210d2f201 100644--- a/frontend/editor/src/core/components/shared/BulkShareModal.tsx+++ b/frontend/editor/src/core/components/shared/BulkShareModal.tsx@@ -3,13 +3,13 @@ import {Modal,Stack,Text,- Button,Group,Alert,TextInput,Paper,Select,} from "@mantine/core";+import { Button } from "@app/ui/Button";import LinkIcon from "@mui/icons-material/Link";import ContentCopyRoundedIcon from "@mui/icons-material/ContentCopyRounded";import { useTranslation } from "react-i18next";@@ -243,8 +243,8 @@ const BulkShareModal: React.FC<BulkShareModalProps> = ({label={t("storageShare.linkLabel", "Share link")}rightSection={<Button- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"leftSection={<ContentCopyRoundedIcon style={{ fontSize: 16 }} />}@@ -297,7 +297,7 @@ const BulkShareModal: React.FC<BulkShareModalProps> = ({</Paper><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={onClose} disabled={isWorking}>+ <Button variant="secondary" onClick={onClose} disabled={isWorking}>{t("cancel", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/core/components/shared/BulkUploadToServerModal.tsx b/frontend/editor/src/core/components/shared/BulkUploadToServerModal.tsxindex 16cae6ef88..df594c4eac 100644--- a/frontend/editor/src/core/components/shared/BulkUploadToServerModal.tsx+++ b/frontend/editor/src/core/components/shared/BulkUploadToServerModal.tsx@@ -1,5 +1,6 @@import React, { useCallback, useEffect, useMemo, useState } from "react";-import { Modal, Stack, Text, Button, Group, Alert } from "@mantine/core";+import { Modal, Stack, Text, Group, Alert } from "@mantine/core";+import { Button } from "@app/ui/Button";import CloudUploadIcon from "@mui/icons-material/CloudUpload";import { useTranslation } from "react-i18next";@@ -151,7 +152,7 @@ const BulkUploadToServerModal: React.FC<BulkUploadToServerModalProps> = ({)}<Group justify="flex-end" gap="sm">- <Button variant="default" onClick={onClose} disabled={isUploading}>+ <Button variant="secondary" onClick={onClose} disabled={isUploading}>{t("cancel", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/core/components/shared/ButtonSelector.test.tsx b/frontend/editor/src/core/components/shared/ButtonSelector.test.tsxindex ab9fee8ef6..f13051b0ae 100644--- a/frontend/editor/src/core/components/shared/ButtonSelector.test.tsx+++ b/frontend/editor/src/core/components/shared/ButtonSelector.test.tsx@@ -8,6 +8,14 @@ const TestWrapper = ({ children }: { children: React.ReactNode }) => (<MantineProvider>{children}</MantineProvider>);+// The shared SegmentedControl renders each option as a radio <input> (inside a+// <label>) whose `value` attribute matches the option value. Select by value+// since it is stable regardless of how the label is wrapped (e.g. FitText).+const getRadioByValue = (container: HTMLElement, value: string) =>+ container.querySelector<HTMLInputElement>(+ `input[type="radio"][value="${value}"]`,+ );+describe("ButtonSelector", () => {const mockOnChange = vi.fn();@@ -15,7 +23,7 @@ describe("ButtonSelector", () => {vi.clearAllMocks();});- test("should render all options as buttons", () => {+ test("should render all options as segments", () => {const options = [{ value: "option1", label: "Option 1" },{ value: "option2", label: "Option 2" },@@ -37,13 +45,13 @@ describe("ButtonSelector", () => {expect(screen.getByText("Option 2")).toBeInTheDocument();});- test("should highlight selected button with filled variant", () => {+ test("should mark selected option as checked", () => {const options = [{ value: "option1", label: "Option 1" },{ value: "option2", label: "Option 2" },];- render(+ const { container } = render(<TestWrapper><ButtonSelectorvalue="option1"@@ -54,22 +62,22 @@ describe("ButtonSelector", () => {</TestWrapper>,);- const selectedButton = screen.getByRole("button", { name: "Option 1" });- const unselectedButton = screen.getByRole("button", { name: "Option 2" });+ const selectedRadio = getRadioByValue(container, "option1");+ const unselectedRadio = getRadioByValue(container, "option2");- // Check data-variant attribute for filled/outline- expect(selectedButton).toHaveAttribute("data-variant", "filled");- expect(unselectedButton).toHaveAttribute("data-variant", "outline");+ // Selected option is marked via the radio's checked state.+ expect(selectedRadio).toBeChecked();+ expect(unselectedRadio).not.toBeChecked();expect(screen.getByText("Selection Label")).toBeInTheDocument();});- test("should call onChange when button is clicked", () => {+ test("should call onChange when an option is clicked", () => {const options = [{ value: "option1", label: "Option 1" },{ value: "option2", label: "Option 2" },];- render(+ const { container } = render(<TestWrapper><ButtonSelectorvalue="option1"@@ -79,7 +87,7 @@ describe("ButtonSelector", () => {</TestWrapper>,);- fireEvent.click(screen.getByRole("button", { name: "Option 2" }));+ fireEvent.click(getRadioByValue(container, "option2")!);expect(mockOnChange).toHaveBeenCalledWith("option2");});@@ -90,7 +98,7 @@ describe("ButtonSelector", () => {{ value: "option2", label: "Option 2" },];- render(+ const { container } = render(<TestWrapper><ButtonSelectorvalue={undefined}@@ -100,17 +108,17 @@ describe("ButtonSelector", () => {</TestWrapper>,);- // Both buttons should be outlined when no value is selected- const button1 = screen.getByRole("button", { name: "Option 1" });- const button2 = screen.getByRole("button", { name: "Option 2" });+ // No option should be checked when no value is selected+ const radio1 = getRadioByValue(container, "option1");+ const radio2 = getRadioByValue(container, "option2");- expect(button1).toHaveAttribute("data-variant", "outline");- expect(button2).toHaveAttribute("data-variant", "outline");+ expect(radio1).not.toBeChecked();+ expect(radio2).not.toBeChecked();});test.each([{- description: "disable buttons when disabled prop is true",+ description: "disable options when disabled prop is true",options: [{ value: "option1", label: "Option 1" },{ value: "option2", label: "Option 2" },@@ -128,7 +136,7 @@ describe("ButtonSelector", () => {expectedStates: [false, true],},])("should $description", ({ options, globalDisabled, expectedStates }) => {- render(+ const { container } = render(<TestWrapper><ButtonSelectorvalue="option1"@@ -140,18 +148,18 @@ describe("ButtonSelector", () => {);options.forEach((option, index) => {- const button = screen.getByRole("button", { name: option.label });- expect(button).toHaveProperty("disabled", expectedStates[index]);+ const radio = getRadioByValue(container, String(option.value));+ expect(radio).toHaveProperty("disabled", expectedStates[index]);});});- test("should not call onChange when disabled button is clicked", () => {+ test("should not allow selecting a disabled option", () => {const options = [{ value: "option1", label: "Option 1" },{ value: "option2", label: "Option 2", disabled: true },];- render(+ const { container } = render(<TestWrapper><ButtonSelectorvalue="option1"@@ -161,12 +169,16 @@ describe("ButtonSelector", () => {</TestWrapper>,);- fireEvent.click(screen.getByRole("button", { name: "Option 2" }));-+ // The disabled option's radio is disabled, so a real user cannot select it+ // and onChange will not fire from genuine interaction. (jsdom does not+ // replicate the browser's disabled-click blocking, so assert the disabled+ // state — that is what prevents selection for real users.)+ const disabledRadio = getRadioByValue(container, "option2");+ expect(disabledRadio).toBeDisabled();expect(mockOnChange).not.toHaveBeenCalled();});- test("should not apply fullWidth styling when fullWidth is false", () => {+ test("should render options when fullWidth is false", () => {const options = [{ value: "option1", label: "Option 1" },{ value: "option2", label: "Option 2" },@@ -184,8 +196,7 @@ describe("ButtonSelector", () => {</TestWrapper>,);- const button = screen.getByRole("button", { name: "Option 1" });- expect(button).not.toHaveStyle({ flex: "1" });+ expect(screen.getByText("Option 1")).toBeInTheDocument();expect(screen.getByText("Layout Label")).toBeInTheDocument();});@@ -205,14 +216,14 @@ describe("ButtonSelector", () => {</TestWrapper>,);- // Should render buttons+ // Should render the optionsexpect(screen.getByText("Option 1")).toBeInTheDocument();expect(screen.getByText("Option 2")).toBeInTheDocument();- // Stack should only contain the Group (buttons), no Text element for label+ // Stack should only contain the SegmentedControl, no label Text elementconst stackElement = container.querySelector('[class*="mantine-Stack-root"]',);- expect(stackElement?.children).toHaveLength(1); // Only the Group, no label Text+ expect(stackElement?.children).toHaveLength(1); // Only the SegmentedControl, no label Text});});diff --git a/frontend/editor/src/core/components/shared/ButtonSelector.tsx b/frontend/editor/src/core/components/shared/ButtonSelector.tsxindex 73e18cac8a..f52256ba0a 100644--- a/frontend/editor/src/core/components/shared/ButtonSelector.tsx+++ b/frontend/editor/src/core/components/shared/ButtonSelector.tsx@@ -1,5 +1,6 @@-import { Button, Group, Stack, Text, Tooltip } from "@mantine/core";+import { Stack, Text, Tooltip } from "@mantine/core";import FitText from "@app/components/shared/FitText";+import { SegmentedControl } from "@app/ui/SegmentedControl";export interface ButtonOption<T> {value: T;@@ -15,7 +16,6 @@ interface ButtonSelectorProps<T> {label?: string;disabled?: boolean;fullWidth?: boolean;- buttonClassName?: string;textClassName?: string;}@@ -26,9 +26,43 @@ const ButtonSelector = <T extends string | number>({label = undefined,disabled = false,fullWidth = true,- buttonClassName,textClassName,}: ButtonSelectorProps<T>) => {+ const selectedValue = value === undefined ? "" : String(value);++ const segmentedOptions = options.map((option) => {+ const isDisabled = disabled || option.disabled;+ const fitText = (+ <FitText+ text={option.label}+ lines={1}+ minimumFontScale={0.5}+ fontSize={10}+ className={textClassName}+ />+ );++ return {+ value: String(option.value),+ disabled: isDisabled,+ label:+ option.tooltip && isDisabled ? (+ <Tooltip label={option.tooltip} position="top" withArrow>+ <span>{fitText}</span>+ </Tooltip>+ ) : (+ fitText+ ),+ };+ });++ const handleChange = (next: string) => {+ const matched = options.find((option) => String(option.value) === next);+ if (matched) {+ onChange(matched.value);+ }+ };+return (<Stack gap="var(--mantine-spacing-sm)">{/* Label (if it exists) */}@@ -44,69 +78,12 @@ const ButtonSelector = <T extends string | number>({</Text>)}- {/* Buttons */}- <Group gap="4px">- {options.map((option) => {- const isDisabled = disabled || option.disabled;- const button = (- <Button- variant={value === option.value ? "filled" : "outline"}- color={- value === option.value- ? "var(--color-primary-500)"- : "var(--text-muted)"- }- onClick={() => onChange(option.value)}- disabled={isDisabled}- className={buttonClassName}- style={{- flex: fullWidth ? 1 : undefined,- height: "auto",- minHeight: "2.5rem",- fontSize: "var(--mantine-font-size-sm)",- lineHeight: "1.4",- paddingTop: "0.5rem",- paddingBottom: "0.5rem",- }}- >- <FitText- text={option.label}- lines={1}- minimumFontScale={0.5}- fontSize={10}- className={textClassName}- />- </Button>- );-- // Wrap with tooltip if provided (useful for disabled state explanations)- if (option.tooltip && isDisabled) {- return (- <Tooltip- key={option.value}- label={option.tooltip}- position="top"- withArrow- >- <span- style={{ flex: fullWidth ? 1 : undefined, display: "flex" }}- >- {button}- </span>- </Tooltip>- );- }-- return (- <span- key={option.value}- style={{ flex: fullWidth ? 1 : undefined, display: "flex" }}- >- {button}- </span>- );- })}- </Group>+ <SegmentedControl+ options={segmentedOptions}+ value={selectedValue}+ onChange={handleChange}+ fullWidth={fullWidth}+ /></Stack>);};diff --git a/frontend/editor/src/core/components/shared/ButtonToggle.tsx b/frontend/editor/src/core/components/shared/ButtonToggle.tsxindex 5e02fb169b..9932c88062 100644--- a/frontend/editor/src/core/components/shared/ButtonToggle.tsx+++ b/frontend/editor/src/core/components/shared/ButtonToggle.tsx@@ -1,5 +1,4 @@-import { Button, Stack } from "@mantine/core";-import React from "react";+import { SegmentedControl } from "@app/ui/SegmentedControl";export interface ButtonToggleOption {value: string;@@ -13,70 +12,49 @@ export interface ButtonToggleProps {value: string;onChange: (value: string) => void;disabled?: boolean;- orientation?: "vertical" | "horizontal";size?: "xs" | "sm" | "md" | "lg";fullWidth?: boolean;}-export const ButtonToggle: React.FC<ButtonToggleProps> = ({+export const ButtonToggle = ({options,value,onChange,disabled = false,- orientation = "vertical",size = "md",fullWidth = true,-}) => {- const isVertical = orientation === "vertical";-- const buttonStyle: React.CSSProperties = {- justifyContent: "flex-start",- height: isVertical ? "auto" : undefined,- minHeight: isVertical ? "50px" : undefined,- padding: isVertical ? "12px 16px" : undefined,- textAlign: "left",- };-- const renderButton = (option: ButtonToggleOption) => {- const isSelected = value === option.value;- const isDisabled = disabled || option.disabled;-- return (- <Button- key={option.value}- variant={isSelected ? "filled" : "outline"}- onClick={() => !isDisabled && onChange(option.value)}- disabled={isDisabled}- size={size}- fullWidth={fullWidth}- style={buttonStyle}- >- <div style={{ width: "100%" }}>- <div style={{ fontWeight: 600 }}>{option.label}</div>- {option.description && (- <div- style={{- fontSize: "0.85em",- opacity: 0.8,- marginTop: "4px",- fontWeight: 400,- }}- >- {option.description}- </div>- )}- </div>- </Button>- );- };-- if (isVertical) {- return <Stack gap="xs">{options.map(renderButton)}</Stack>;- }+}: ButtonToggleProps) => {+ const segmentedSize = size === "xs" || size === "sm" ? "sm" : "md";++ const segmentedOptions = options.map((option) => ({+ value: option.value,+ disabled: disabled || option.disabled,+ label: (+ <div>+ <div style={{ fontWeight: 600 }}>{option.label}</div>+ {option.description && (+ <div+ style={{+ fontSize: "0.85em",+ opacity: 0.8,+ marginTop: 4,+ fontWeight: 400,+ }}+ >+ {option.description}+ </div>+ )}+ </div>+ ),+ }));return (- <div style={{ display: "flex", gap: "8px", flexWrap: "wrap" }}>- {options.map(renderButton)}- </div>+ <SegmentedControl+ options={segmentedOptions}+ value={value}+ onChange={onChange}+ size={segmentedSize}+ fullWidth={fullWidth}+ />);};diff --git a/frontend/editor/src/core/components/shared/DismissAllErrorsButton.tsx b/frontend/editor/src/core/components/shared/DismissAllErrorsButton.tsxindex 3bcc53daf7..5f3f4ada2a 100644--- a/frontend/editor/src/core/components/shared/DismissAllErrorsButton.tsx+++ b/frontend/editor/src/core/components/shared/DismissAllErrorsButton.tsx@@ -1,9 +1,9 @@import React from "react";-import { Button, Group } from "@mantine/core";+import { Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useFileState } from "@app/contexts/FileContext";import { useFileActions } from "@app/contexts/file/fileHooks";-import CloseIcon from "@mui/icons-material/Close";import { Z_INDEX_TOAST } from "@app/styles/zIndex";interface DismissAllErrorsButtonProps {@@ -32,10 +32,9 @@ const DismissAllErrorsButton: React.FC<DismissAllErrorsButtonProps> = ({return (<Group className={className}><Button- variant="light"- color="red"+ variant="secondary"+ accent="danger"size="sm"- leftSection={<CloseIcon fontSize="small" />}onClick={handleDismissAllErrors}style={{position: "absolute",diff --git a/frontend/editor/src/core/components/shared/DropdownListWithFooter.tsx b/frontend/editor/src/core/components/shared/DropdownListWithFooter.tsxindex c2f9ac6db2..8965c18af3 100644--- a/frontend/editor/src/core/components/shared/DropdownListWithFooter.tsx+++ b/frontend/editor/src/core/components/shared/DropdownListWithFooter.tsx@@ -16,7 +16,7 @@ import { Z_INDEX_AUTOMATE_DROPDOWN } from "@app/styles/zIndex";export interface DropdownItem {value: string;name: string;- leftIcon?: ReactNode;+ leftSection?: ReactNode;disabled?: boolean;}@@ -232,9 +232,9 @@ const DropdownListWithFooter: React.FC<DropdownListWithFooterProps> = ({}}><Group gap="sm" style={{ flex: 1 }}>- {item.leftIcon && (+ {item.leftSection && (<Box style={{ display: "flex", alignItems: "center" }}>- {item.leftIcon}+ {item.leftSection}</Box>)}<Text size="sm">{item.name}</Text>diff --git a/frontend/editor/src/core/components/shared/EditableSecretField.tsx b/frontend/editor/src/core/components/shared/EditableSecretField.tsxindex 88ee8cad95..24e6d881c3 100644--- a/frontend/editor/src/core/components/shared/EditableSecretField.tsx+++ b/frontend/editor/src/core/components/shared/EditableSecretField.tsx@@ -1,12 +1,7 @@import { useState, useRef, useEffect } from "react";-import {- PasswordInput,- Group,- ActionIcon,- Tooltip,- TextInput,-} from "@mantine/core";+import { PasswordInput, Group, Tooltip, TextInput } from "@mantine/core";import { useTranslation } from "react-i18next";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";interface EditableSecretFieldProps {@@ -95,7 +90,7 @@ export default function EditableSecretField({<TextInput value="••••••••" disabled style={{ flex: 1 }} readOnly /><Tooltip label={t("editSecret")} withArrow><ActionIcon- variant="light"+ variant="secondary"onClick={handleEdit}disabled={disabled}title={t("editableSecretField.edit", "Edit")}diff --git a/frontend/editor/src/core/components/shared/EncryptedPdfUnlockModal.tsx b/frontend/editor/src/core/components/shared/EncryptedPdfUnlockModal.tsxindex f713d1e526..f6aa3391d5 100644--- a/frontend/editor/src/core/components/shared/EncryptedPdfUnlockModal.tsx+++ b/frontend/editor/src/core/components/shared/EncryptedPdfUnlockModal.tsx@@ -1,11 +1,5 @@-import {- Modal,- Stack,- Text,- Button,- PasswordInput,- Group,-} from "@mantine/core";+import { Modal, Stack, Text, PasswordInput, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { type KeyboardEventHandler } from "react";import { Z_INDEX_OVER_FULLSCREEN_SURFACE } from "@app/styles/zIndex";@@ -87,8 +81,8 @@ const EncryptedPdfUnlockModal = ({<Group justify="space-between"><Button- variant="light"- color="var(--mantine-color-gray-8)"+ variant="secondary"+ accent="neutral"onClick={onSkip}disabled={isProcessing}>@@ -97,7 +91,7 @@ const EncryptedPdfUnlockModal = ({<Group gap="xs">{remainingCount > 0 && (<Button- variant="light"+ variant="secondary"onClick={onUnlockAll}loading={isProcessing}disabled={password.trim().length === 0}diff --git a/frontend/editor/src/core/components/shared/ErrorBoundary.tsx b/frontend/editor/src/core/components/shared/ErrorBoundary.tsxindex aa2f126287..a2003a7d61 100644--- a/frontend/editor/src/core/components/shared/ErrorBoundary.tsx+++ b/frontend/editor/src/core/components/shared/ErrorBoundary.tsx@@ -1,5 +1,6 @@import React from "react";-import { Text, Button, Stack } from "@mantine/core";+import { Text, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";interface ErrorBoundaryState {hasError: boolean;@@ -128,7 +129,11 @@ export default class ErrorBoundary extends React.Component<)}</>)}- <Button onClick={this.retry} variant="light" mt="md">+ <Button+ onClick={this.retry}+ variant="secondary"+ style={{ marginTop: "var(--mantine-spacing-md)" }}+ >Try Again</Button></Stack>diff --git a/frontend/editor/src/core/components/shared/FileCard.tsx b/frontend/editor/src/core/components/shared/FileCard.tsxindex 5d53418d7f..c731092459 100644--- a/frontend/editor/src/core/components/shared/FileCard.tsx+++ b/frontend/editor/src/core/components/shared/FileCard.tsx@@ -1,15 +1,7 @@import { useState } from "react";-import {- Card,- Stack,- Text,- Group,- Badge,- Button,- Box,- ActionIcon,- Tooltip,-} from "@mantine/core";+import { Card, Stack, Text, Group, Badge, Box, Tooltip } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import StorageIcon from "@mui/icons-material/Storage";import VisibilityIcon from "@mui/icons-material/Visibility";@@ -114,8 +106,8 @@ const FileCard = ({<Tooltip label={t("fileCard.viewInViewer", "View in Viewer")}><ActionIconsize="sm"- variant="subtle"- color="blue"+ variant="tertiary"+ aria-label={t("fileCard.viewInViewer", "View in Viewer")}onClick={(e) => {e.stopPropagation();onView();@@ -131,8 +123,12 @@ const FileCard = ({><ActionIconsize="sm"- variant="subtle"- color="orange"+ variant="tertiary"+ accent="warning"+ aria-label={t(+ "fileCard.openInFileEditor",+ "Open in File Editor",+ )}onClick={(e) => {e.stopPropagation();onEdit();@@ -182,14 +178,14 @@ const FileCard = ({</Group><Button- color="red"- size="xs"- variant="light"+ accent="danger"+ size="sm"+ variant="secondary"onClick={(e) => {e.stopPropagation();onRemove();}}- mt={4}+ style={{ marginTop: 4 }}>{t("delete", "Remove")}</Button>diff --git a/frontend/editor/src/core/components/shared/FileDropdownMenu.tsx b/frontend/editor/src/core/components/shared/FileDropdownMenu.tsxindex 519366b9d6..735d633fee 100644--- a/frontend/editor/src/core/components/shared/FileDropdownMenu.tsx+++ b/frontend/editor/src/core/components/shared/FileDropdownMenu.tsx@@ -1,5 +1,6 @@import React from "react";-import { Menu, Loader, Group, Text, ActionIcon, Tooltip } from "@mantine/core";+import { Menu, Loader, Group, Text, Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import InsertDriveFileIcon from "@mui/icons-material/InsertDriveFile";import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";@@ -102,10 +103,14 @@ export const FileDropdownMenu: React.FC<FileDropdownMenuProps> = ({withArrow><ActionIcon- component="div"- size="xs"- variant="subtle"- color="red"+ as="span"+ size="sm"+ variant="tertiary"+ accent="danger"+ aria-label={t(+ "fileDropdownMenu.closeFile",+ "Close file",+ )}onClick={(e) => {e.stopPropagation();onFileRemove(file.fileId as FileId);diff --git a/frontend/editor/src/core/components/shared/FileGrid.tsx b/frontend/editor/src/core/components/shared/FileGrid.tsxindex 2ade54426f..c1e87ab18a 100644--- a/frontend/editor/src/core/components/shared/FileGrid.tsx+++ b/frontend/editor/src/core/components/shared/FileGrid.tsx@@ -1,13 +1,6 @@import { useState } from "react";-import {- Box,- Flex,- Group,- Text,- Button,- TextInput,- Select,-} from "@mantine/core";+import { Box, Flex, Group, Text, TextInput, Select } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import SearchIcon from "@mui/icons-material/Search";import SortIcon from "@mui/icons-material/Sort";@@ -121,7 +114,7 @@ const FileGrid = ({</Group>{onDeleteAll && (- <Button color="red" size="sm" onClick={onDeleteAll}>+ <Button accent="danger" size="sm" onClick={onDeleteAll}>{t("fileManager.deleteAll", "Delete All")}</Button>)}@@ -179,7 +172,7 @@ const FileGrid = ({{/* Show All Button */}{hasMoreFiles && onShowAll && (<Group justify="center" mt="md">- <Button variant="light" onClick={onShowAll}>+ <Button variant="secondary" onClick={onShowAll}>{t("fileManager.showAll", "Show All")} ({sortedFiles.length} files)</Button></Group>diff --git a/frontend/editor/src/core/components/shared/FilePickerModal.tsx b/frontend/editor/src/core/components/shared/FilePickerModal.tsxindex da1bb91b6c..5e077d3437 100644--- a/frontend/editor/src/core/components/shared/FilePickerModal.tsx+++ b/frontend/editor/src/core/components/shared/FilePickerModal.tsx@@ -2,7 +2,6 @@ import { useState, useEffect } from "react";import {Modal,Text,- Button,Group,Stack,Checkbox,@@ -11,6 +10,7 @@ import {Badge,SimpleGrid,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import DocumentThumbnail from "@app/components/shared/filePreview/DocumentThumbnail";import { FileId } from "@app/types/file";@@ -151,10 +151,10 @@ const FilePickerModal = ({)}</Text><Group gap="xs">- <Button size="xs" variant="light" onClick={selectAll}>+ <Button size="sm" variant="secondary" onClick={selectAll}>{t("pageEdit.selectAll", "Select All")}</Button>- <Button size="xs" variant="light" onClick={selectNone}>+ <Button size="sm" variant="secondary" onClick={selectNone}>{t("pageEdit.deselectAll", "Select None")}</Button></Group>@@ -249,7 +249,7 @@ const FilePickerModal = ({{/* Action buttons */}<Group justify="flex-end" mt="md">- <Button variant="light" onClick={onClose}>+ <Button variant="secondary" onClick={onClose}>{t("close", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/core/components/shared/FileSelectorPicker.tsx b/frontend/editor/src/core/components/shared/FileSelectorPicker.tsxindex feaa5f6b9f..8c8123bd7d 100644--- a/frontend/editor/src/core/components/shared/FileSelectorPicker.tsx+++ b/frontend/editor/src/core/components/shared/FileSelectorPicker.tsx@@ -1,6 +1,7 @@import { useState, useEffect, useCallback, useMemo, useRef } from "react";import { createPortal } from "react-dom";import { Box, Popover, ScrollArea, Text, Loader } from "@mantine/core";+import { Button } from "@app/ui/Button";import AddIcon from "@mui/icons-material/Add";import { useTranslation } from "react-i18next";import {@@ -566,9 +567,10 @@ export function FileSelectorPicker({const meta = buildMeta(stub);const isItemLoading = loadingId === stub.id;return (- <button+ <Buttonkey={stub.id}- type="button"+ variant="tertiary"+ hover={false}className={styles.fileItem}onClick={() => void loadAndSelect(stub)}disabled={!!loadingId}@@ -579,6 +581,9 @@ export function FileSelectorPicker({})}onMouseLeave={() => setHoveredStub(null)}+ rightSection={+ isItemLoading ? <Loader size="xs" /> : undefined+ }><div className={styles.fileItemContent}><span className={styles.fileName} title={stub.name}>@@ -586,8 +591,7 @@ export function FileSelectorPicker({</span>{meta && <span className={styles.fileMeta}>{meta}</span>}</div>- {isItemLoading && <Loader size="xs" />}- </button>+ </Button>);}))}diff --git a/frontend/editor/src/core/components/shared/FileSidebar.tsx b/frontend/editor/src/core/components/shared/FileSidebar.tsxindex 1eb51b759b..db3820350e 100644--- a/frontend/editor/src/core/components/shared/FileSidebar.tsx+++ b/frontend/editor/src/core/components/shared/FileSidebar.tsx@@ -7,6 +7,7 @@ import React, {forwardRef,} from "react";import { Loader, Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import { useNavigate } from "react-router-dom";import { useFileState, useFileActions } from "@app/contexts/file/fileHooks";@@ -961,26 +962,31 @@ const FileSidebar = forwardRef<HTMLDivElement, FileSidebarProps>(<span className="file-sidebar-section-label">{t("fileSidebar.files", "Files")}</span>- <button+ <ActionIcon+ variant="quiet"className="file-sidebar-section-btn file-sidebar-section-btn-external"onClick={() => navigate("/files")}title={t("fileSidebar.openFileManager","Browse all files & folders",)}- type="button"+ aria-label={t(+ "fileSidebar.openFileManager",+ "Browse all files & folders",+ )}data-testid="open-files-page"><OpenInNewIcon sx={{ fontSize: "1rem" }} />- </button>- <button+ </ActionIcon>+ <ActionIcon+ variant="quiet"className="file-sidebar-section-btn file-sidebar-section-btn-add"onClick={() => nativeFileInputRef.current?.click()}title={t("fileSidebar.addFiles", "Add files")}- type="button"+ aria-label={t("fileSidebar.addFiles", "Add files")}><AddIcon sx={{ fontSize: "1rem" }} />- </button>+ </ActionIcon></div>{!stubsLoaded ? (@@ -989,35 +995,6 @@ const FileSidebar = forwardRef<HTMLDivElement, FileSidebarProps>(</div>) : filteredFileStubs.length > 0 ? (<div className="file-sidebar-file-list">- <button- type="button"- onClick={() => nativeFileInputRef.current?.click()}- data-testid="add-files-row"- style={{- background: "transparent",- border: "none",- cursor: "pointer",- color: "var(--text-muted)",- padding: "4px 6px",- marginBottom: 4,- display: "flex",- alignItems: "center",- gap: 6,- fontSize: 12,- width: "100%",- textAlign: "left",- borderRadius: 4,- }}- onMouseEnter={(e) => {- e.currentTarget.style.background = "var(--hover-bg)";- }}- onMouseLeave={(e) => {- e.currentTarget.style.background = "transparent";- }}- >- <AddIcon sx={{ fontSize: "0.9rem" }} />- {t("fileSidebar.addFiles", "Add files")}- </button>{filteredFileStubs.map((stub) => {const workbenchFileId = state.files.ids.find((id) => (id as string) === (stub.id as string),diff --git a/frontend/editor/src/core/components/shared/FileSidebarFileItem.css b/frontend/editor/src/core/components/shared/FileSidebarFileItem.cssindex cab9f589f2..af6d9e06cc 100644--- a/frontend/editor/src/core/components/shared/FileSidebarFileItem.css+++ b/frontend/editor/src/core/components/shared/FileSidebarFileItem.css@@ -91,7 +91,7 @@width: 20px;height: 20px;border-radius: 5px;- border: 1.5px solid var(--border-hover, #52525b);+ border: 1.5px solid var(--border-hover, var(--border-strong));}.file-sidebar-file-item:hover .file-sidebar-file-checkbox-hover {diff --git a/frontend/editor/src/core/components/shared/FileSidebarFileItem.tsx b/frontend/editor/src/core/components/shared/FileSidebarFileItem.tsxindex 58a318e0d8..ff48a9704d 100644--- a/frontend/editor/src/core/components/shared/FileSidebarFileItem.tsx+++ b/frontend/editor/src/core/components/shared/FileSidebarFileItem.tsx@@ -1,6 +1,7 @@import { useState, useCallback, useRef } from "react";import { createPortal } from "react-dom";import { Menu, Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import VisibilityOutlinedIcon from "@mui/icons-material/VisibilityOutlined";import VisibilityOffOutlinedIcon from "@mui/icons-material/VisibilityOffOutlined";@@ -369,14 +370,15 @@ export function FileItem({</span>)}</div>- <button+ <ActionIcon+ variant="tertiary"+ size="sm"className="file-sidebar-eye-btn"onClick={(e) => {e.stopPropagation();onEyeClick(fileId, e);}}tabIndex={-1}- type="button"aria-label={isViewedInViewer? t("fileSidebar.fileItem.closeViewer", "Close viewer")@@ -391,25 +393,25 @@ export function FileItem({className="file-sidebar-eye-closed"sx={{ fontSize: "1.1rem" }}/>- </button>-+ </ActionIcon>{(onDelete ||onSaveToCloud ||(hasVersionHistory && onVersionHistory)) && (<Menu position="bottom-end" withinPortal shadow="md" width={190}><Menu.Target>- <button+ <ActionIcon+ variant="tertiary"+ size="sm"className="file-sidebar-kebab-btn"onClick={(e) => e.stopPropagation()}tabIndex={-1}- type="button"aria-label={t("fileSidebar.fileItem.moreActions","More actions",)}><MoreVertIcon sx={{ fontSize: "1.1rem" }} />- </button>+ </ActionIcon></Menu.Target><Menu.Dropdown onClick={(e) => e.stopPropagation()}>{hasVersionHistory && onVersionHistory && (diff --git a/frontend/editor/src/core/components/shared/FileUploadButton.tsx b/frontend/editor/src/core/components/shared/FileUploadButton.tsxindex 000639f09c..b07fbd0271 100644--- a/frontend/editor/src/core/components/shared/FileUploadButton.tsx+++ b/frontend/editor/src/core/components/shared/FileUploadButton.tsx@@ -1,6 +1,32 @@import { useRef } from "react";-import { FileButton, Button } from "@mantine/core";import { useTranslation } from "react-i18next";+import { FilePicker } from "@app/ui/FilePicker";+import type { ButtonVariant } from "@app/ui/Button";++// Accept both shared DS variants and the legacy Mantine variant names that+// existing callers still pass, mapping the latter onto the DS equivalents.+type LegacyVariant =+ | "outline"+ | "filled"+ | "light"+ | "default"+ | "subtle"+ | "gradient";++const VARIANT_MAP: Record<LegacyVariant, ButtonVariant> = {+ filled: "primary",+ outline: "secondary",+ default: "secondary",+ light: "tertiary",+ subtle: "tertiary",+ gradient: "primary",+};++function resolveVariant(variant: ButtonVariant | LegacyVariant): ButtonVariant {+ return variant in VARIANT_MAP+ ? VARIANT_MAP[variant as LegacyVariant]+ : (variant as ButtonVariant);+}interface FileUploadButtonProps {file?: File;@@ -8,7 +34,7 @@ interface FileUploadButtonProps {accept?: string;disabled?: boolean;placeholder?: string;- variant?: "outline" | "filled" | "light" | "default" | "subtle" | "gradient";+ variant?: ButtonVariant | LegacyVariant;fullWidth?: boolean;}@@ -18,7 +44,7 @@ const FileUploadButton = ({accept,disabled = false,placeholder,- variant = "outline",+ variant = "secondary",fullWidth = true,}: FileUploadButtonProps) => {const { t } = useTranslation();@@ -27,18 +53,16 @@ const FileUploadButton = ({const defaultPlaceholder = t("chooseFile", "Choose File");return (- <FileButton+ <FilePickerresetRef={resetRef}onChange={onChange}accept={accept}disabled={disabled}+ variant={resolveVariant(variant)}+ fullWidth={fullWidth}>- {(props) => (- <Button {...props} variant={variant} fullWidth={fullWidth} color="blue">- {file ? file.name : placeholder || defaultPlaceholder}- </Button>- )}- </FileButton>+ {file ? file.name : placeholder || defaultPlaceholder}+ </FilePicker>);};diff --git a/frontend/editor/src/core/components/shared/FirstLoginModal.tsx b/frontend/editor/src/core/components/shared/FirstLoginModal.tsxindex 4d7764f91d..be91ccc03d 100644--- a/frontend/editor/src/core/components/shared/FirstLoginModal.tsx+++ b/frontend/editor/src/core/components/shared/FirstLoginModal.tsx@@ -1,12 +1,6 @@import { useState } from "react";-import {- Modal,- Stack,- Text,- PasswordInput,- Button,- Alert,-} from "@mantine/core";+import { Modal, Stack, Text, PasswordInput, Alert } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { accountService } from "@app/services/accountService";@@ -195,8 +189,8 @@ export default function FirstLoginModal({/><Button- type="submit"fullWidth+ type="submit"loading={loading}disabled={!currentPassword ||@@ -205,7 +199,7 @@ export default function FirstLoginModal({newPassword.length < 8 ||confirmPassword.length < 8}- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{t("firstLogin.changePassword", "Change Password")}</Button>diff --git a/frontend/editor/src/core/components/shared/Footer.tsx b/frontend/editor/src/core/components/shared/Footer.tsxindex e73a48fd2a..2fb7312fba 100644--- a/frontend/editor/src/core/components/shared/Footer.tsx+++ b/frontend/editor/src/core/components/shared/Footer.tsx@@ -2,6 +2,7 @@ import { Flex } from "@mantine/core";import { useTranslation } from "react-i18next";import { useCookieConsent } from "@app/hooks/useCookieConsent";import { useFooterInfo } from "@app/hooks/useFooterInfo";+import { Button } from "@app/ui/Button";interface FooterProps {privacyPolicy?: string;@@ -53,8 +54,8 @@ export default function Footer({<divstyle={{height: "var(--footer-height)",- backgroundColor: "var(--mantine-color-gray-1)",- borderTop: "1px solid var(--mantine-color-gray-2)",+ backgroundColor: "var(--bg-surface)",+ borderTop: "1px solid var(--border-subtle)",display: "flex",flexDirection: "column",justifyContent: "center",@@ -132,13 +133,14 @@ export default function Footer({</a>)}{finalAnalyticsEnabled && (- <button+ <Button+ variant="tertiary"className="footer-link px-3"id="cookieBanner"onClick={showCookiePreferences}>{t("legal.showCookieBanner", "Cookie Preferences")}- </button>+ </Button>)}</Flex></div>diff --git a/frontend/editor/src/core/components/shared/HoverActionMenu.tsx b/frontend/editor/src/core/components/shared/HoverActionMenu.tsxindex fafebdf8f2..a6b827bb1f 100644--- a/frontend/editor/src/core/components/shared/HoverActionMenu.tsx+++ b/frontend/editor/src/core/components/shared/HoverActionMenu.tsx@@ -1,5 +1,6 @@import React from "react";-import { ActionIcon, Tooltip } from "@mantine/core";+import { Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import styles from "@app/components/shared/HoverActionMenu.module.css";import { Z_INDEX_HOVER_ACTION_MENU } from "@app/styles/zIndex";@@ -60,10 +61,9 @@ const HoverActionMenu: React.FC<HoverActionMenuProps> = ({<Tooltip key={action.id} label={action.label}><ActionIconsize="md"- variant="subtle"+ variant="tertiary"disabled={action.disabled}onClick={action.onClick}- c={action.color}aria-label={action.label}style={{ color: action.color || "var(--text-secondary)" }}data-tour={action.dataTour}diff --git a/frontend/editor/src/core/components/shared/InfoBanner.tsx b/frontend/editor/src/core/components/shared/InfoBanner.tsxindex c46d5cd665..6572022299 100644--- a/frontend/editor/src/core/components/shared/InfoBanner.tsx+++ b/frontend/editor/src/core/components/shared/InfoBanner.tsx@@ -1,5 +1,7 @@import React, { ReactNode } from "react";-import { Paper, Group, Text, Button, ActionIcon, Stack } from "@mantine/core";+import { Paper, Group, Text, Stack } from "@mantine/core";+import { Button, type ButtonVariant, type ButtonAccent } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";@@ -31,6 +33,40 @@ const toneStyles: Record<},};+function toSharedButtonVariant(+ variant: "light" | "filled" | "white" | "outline" | "subtle",+): ButtonVariant {+ switch (variant) {+ case "filled":+ return "primary";+ case "outline":+ return "secondary";+ case "subtle":+ return "tertiary";+ case "light":+ case "white":+ default:+ return "secondary";+ }+}++function toSharedButtonAccent(color: string | undefined): ButtonAccent {+ // Mantine colours may carry a shade suffix (e.g. "orange.7"); use the hue.+ const hue = (color ?? "").split(".")[0];+ switch (hue) {+ case "red":+ return "danger";+ case "green":+ return "success";+ case "yellow":+ case "orange":+ return "warning";+ case "blue":+ default:+ return "default";+ }+}+interface InfoBannerProps {/*** Either a LocalIcon name (string) for the standard sized icon slot, or a@@ -98,7 +134,6 @@ export const InfoBanner: React.FC<InfoBannerProps> = ({const iconSize = compact ? "1rem" : "1.2rem";const textSize = compact ? "xs" : "sm";- const buttonSize = compact ? "xs" : "xs";return (<Paper@@ -167,11 +202,13 @@ export const InfoBanner: React.FC<InfoBannerProps> = ({<Group gap="xs" align="center" wrap="nowrap">{buttonText && onButtonClick && (<Button- variant={buttonVariant}- color={buttonColor ?? toneStyle.buttonColor}- size={buttonSize}- onClick={onButtonClick}+ variant={toSharedButtonVariant(buttonVariant)}+ accent={toSharedButtonAccent(+ buttonColor ?? toneStyle.buttonColor,+ )}+ size="sm"loading={loading}+ onClick={onButtonClick}leftSection={<LocalIconicon={buttonIcon}@@ -179,19 +216,15 @@ export const InfoBanner: React.FC<InfoBannerProps> = ({height={compact ? "0.75rem" : "0.9rem"}/>}- styles={- buttonTextColor- ? { label: { color: buttonTextColor } }- : undefined- }+ style={buttonTextColor ? { color: buttonTextColor } : undefined}>{buttonText}</Button>)}{dismissible && (<ActionIcon- variant="subtle"- color={closeIconColor ? undefined : "gray"}+ variant="tertiary"+ accent="neutral"size="sm"onClick={handleDismiss}aria-label={t("infoBanner.dismiss", "Dismiss")}diff --git a/frontend/editor/src/core/components/shared/LandingActions.tsx b/frontend/editor/src/core/components/shared/LandingActions.tsxindex 23faf275ce..3d801f82de 100644--- a/frontend/editor/src/core/components/shared/LandingActions.tsx+++ b/frontend/editor/src/core/components/shared/LandingActions.tsx@@ -1,5 +1,7 @@import React from "react";-import { Button, Group, Tooltip, ActionIcon } from "@mantine/core";+import { Group, Tooltip } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import { useFilesModalContext } from "@app/contexts/FilesModalContext";import { useFileActionTerminology } from "@app/hooks/useFileActionTerminology";@@ -30,7 +32,7 @@ export function LandingActions({<><Group gap="sm" justify="center" wrap="wrap" mb="xs"><Button- classNames={{ root: "landing-btn-primary" }}+ className="landing-btn-primary"leftSection={<LocalIconicon={icons.uploadIconName}@@ -48,8 +50,8 @@ export function LandingActions({</Button><Button- variant="default"- classNames={{ root: "landing-btn-secondary" }}+ variant="secondary"+ className="landing-btn-secondary"leftSection={<LocalIconicon="add"@@ -70,10 +72,9 @@ export function LandingActions({<Tooltip label={terminology.mobileUpload} position="bottom"><ActionIconsize="lg"- variant="default"- radius="md"+ variant="secondary"aria-label={terminology.mobileUpload}- classNames={{ root: "landing-btn-secondary landing-btn-icon" }}+ className="landing-btn-secondary landing-btn-icon"onClick={(e) => {e.stopPropagation();onMobileUploadClick();diff --git a/frontend/editor/src/core/components/shared/LandingPage.css b/frontend/editor/src/core/components/shared/LandingPage.cssindex 233b15cfee..a785418877 100644--- a/frontend/editor/src/core/components/shared/LandingPage.css+++ b/frontend/editor/src/core/components/shared/LandingPage.css@@ -5,11 +5,12 @@/* ── Hero text ───────────────────────────────────────────── */.landing-title {- display: block;- margin: 1.75rem auto 0.5rem;- height: 3rem;- width: auto;- max-width: 100%;+ margin: 1.75rem 0 0.5rem;+ text-align: center;+ font-size: 2rem;+ font-weight: 700;+ line-height: 1.25;+ color: var(--text-primary);}.landing-subtitle {diff --git a/frontend/editor/src/core/components/shared/LandingPage.tsx b/frontend/editor/src/core/components/shared/LandingPage.tsxindex 1f9f117f3e..efb54cd7b6 100644--- a/frontend/editor/src/core/components/shared/LandingPage.tsx+++ b/frontend/editor/src/core/components/shared/LandingPage.tsx@@ -8,7 +8,6 @@ import MobileUploadModal from "@app/components/shared/MobileUploadModal";import { openFilesFromDisk } from "@app/services/openFilesFromDisk";import { LandingDocumentStack } from "@app/components/shared/LandingDocumentStack";import { LandingActions } from "@app/components/shared/LandingActions";-import { Wordmark } from "@app/components/shared/Wordmark";import "@app/components/shared/LandingPage.css";const LandingPage = () => {@@ -80,10 +79,9 @@ const LandingPage = () => {><LandingDocumentStack />- <Wordmark- alt={t("landing.heroTitle", "Stirling PDF")}- className="landing-title"- />+ <h3 className="landing-title">+ {t("landing.workbenchEmptyStateHero", "Drop a PDF anywhere")}+ </h3><p className="landing-subtitle">{t("landing.heroSubtitle",diff --git a/frontend/editor/src/core/components/shared/LanguageSelector.tsx b/frontend/editor/src/core/components/shared/LanguageSelector.tsxindex d4ff7bbacb..aad6c714d7 100644--- a/frontend/editor/src/core/components/shared/LanguageSelector.tsx+++ b/frontend/editor/src/core/components/shared/LanguageSelector.tsx@@ -1,5 +1,7 @@import React, { useState, useEffect } from "react";-import { Menu, Button, ActionIcon } from "@mantine/core";+import { Menu } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { Tooltip } from "@app/components/shared/Tooltip";import { useTranslation } from "react-i18next";import { supportedLanguages, setUserLanguage } from "@app/i18n";@@ -73,50 +75,26 @@ const LanguageItem: React.FC<LanguageItemProps> = ({}}><Button- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"fullWidthonClick={disabled ? undefined : onClick}data-selected={isSelected}disabled={disabled}- styles={{- root: {- borderRadius: "4px",- minHeight: "32px",- padding: "4px 8px",- justifyContent: "flex-start",- position: "relative",- overflow: "hidden",- backgroundColor: isSelected- ? "light-dark(var(--mantine-color-blue-1), var(--mantine-color-blue-8))"- : "transparent",- color: disabled- ? "var(--text-muted)"- : isSelected- ? "light-dark(var(--mantine-color-blue-9), var(--mantine-color-blue-3))"- : "var(--text-primary)",- transition: "all 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94)",- cursor: disabled ? "not-allowed" : "pointer",- "&:hover": !disabled- ? {- backgroundColor: isSelected- ? "light-dark(var(--mantine-color-blue-2), var(--mantine-color-blue-7))"- : "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5))",- transform: "translateY(-1px)",- boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)",- }- : {},- },- label: {- fontSize: "13px",- fontWeight: isSelected ? 600 : 400,- textAlign: "left",- overflow: "hidden",- textOverflow: "ellipsis",- whiteSpace: "nowrap",- position: "relative",- zIndex: 2,- },+ style={{+ justifyContent: "flex-start",+ position: "relative",+ overflow: "hidden",+ fontWeight: isSelected ? 600 : 400,+ backgroundColor: isSelected+ ? "light-dark(var(--mantine-color-blue-1), var(--mantine-color-blue-8))"+ : undefined,+ color: disabled+ ? "var(--text-muted)"+ : isSelected+ ? "light-dark(var(--mantine-color-blue-9), var(--mantine-color-blue-3))"+ : "var(--text-primary)",}}>{label}@@ -272,43 +250,23 @@ const LanguageSelector: React.FC<LanguageSelectorProps> = ({<Menu.Target>{compact ? (<ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"+ accent="neutral"data-testid="language-selector-button"title={!opened && tooltip ? tooltip : undefined}- styles={{- root: {- color: "var(--text-secondary)",- "&:hover": {- backgroundColor:- "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5))",- },- },- }}+ aria-label={tooltip ?? currentLanguage}><LocalIcon icon="language" width="1.5rem" height="1.5rem" /></ActionIcon>) : (<Button- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"data-testid="language-selector-button"leftSection={<LocalIcon icon="language" width="1.5rem" height="1.5rem" />}- styles={{- root: {- border: "none",- color: "var(--text-primary)",- transition:- "background-color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94)",- "&:hover": {- backgroundColor:- "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5))",- },- },- label: { fontSize: "12px", fontWeight: 500 },- }}><span className={styles.languageText}>{currentLanguage}</span></Button>diff --git a/frontend/editor/src/core/components/shared/LoginAgreementModal.tsx b/frontend/editor/src/core/components/shared/LoginAgreementModal.tsxindex 8d419e7cc0..9fb7f7c925 100644--- a/frontend/editor/src/core/components/shared/LoginAgreementModal.tsx+++ b/frontend/editor/src/core/components/shared/LoginAgreementModal.tsx@@ -2,7 +2,6 @@ import { useEffect, useRef, useState } from "react";import { useLocation } from "react-router-dom";import {Box,- Button,Divider,Group,Modal,@@ -10,6 +9,7 @@ import {Stack,Text,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import Markdown, { type Components } from "react-markdown";import remarkGfm from "remark-gfm";@@ -188,10 +188,10 @@ export default function LoginAgreementModal() {)}</Text><Group gap="sm" wrap="nowrap">- <Button variant="default" onClick={handleDecline}>+ <Button variant="secondary" onClick={handleDecline}>{t("loginAgreementDecline", "Decline")}</Button>- <Button onClick={handleAccept}>+ <Button variant="primary" onClick={handleAccept}>{t("loginAgreementAccept", "Accept")}</Button></Group>diff --git a/frontend/editor/src/core/components/shared/MultiSelectControls.tsx b/frontend/editor/src/core/components/shared/MultiSelectControls.tsxindex 447662e9dd..160346dd1b 100644--- a/frontend/editor/src/core/components/shared/MultiSelectControls.tsx+++ b/frontend/editor/src/core/components/shared/MultiSelectControls.tsx@@ -1,4 +1,5 @@-import { Box, Group, Text, Button } from "@mantine/core";+import { Box, Group, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";interface MultiSelectControlsProps {@@ -36,20 +37,20 @@ const MultiSelectControls = ({{selectedCount} {t("fileManager.filesSelected", "files")}</Text><Group>- <Button size="xs" variant="light" onClick={onClearSelection}>+ <Button variant="secondary" size="sm" onClick={onClearSelection}>{t("fileManager.clearSelection", "Clear files")}</Button>{onAddToUpload && (- <Button size="xs" color="green" onClick={onAddToUpload}>+ <Button accent="success" size="sm" onClick={onAddToUpload}>{t("fileManager.addToUpload", "Add to Upload")}</Button>)}{onOpenInFileEditor && (<Button- size="xs"- color="orange"+ accent="warning"+ size="sm"onClick={onOpenInFileEditor}disabled={selectedCount === 0}>@@ -59,8 +60,7 @@ const MultiSelectControls = ({{onOpenInPageEditor && (<Button- size="xs"- color="blue"+ size="sm"onClick={onOpenInPageEditor}disabled={selectedCount === 0}>@@ -69,7 +69,7 @@ const MultiSelectControls = ({)}{onDeleteAll && (- <Button size="xs" color="red" onClick={onDeleteAll}>+ <Button accent="danger" size="sm" onClick={onDeleteAll}>{t("fileManager.deleteAll", "Delete All")}</Button>)}diff --git a/frontend/editor/src/core/components/shared/NavigationWarningModal.tsx b/frontend/editor/src/core/components/shared/NavigationWarningModal.tsxindex 9917f37ac5..7e3c675f3b 100644--- a/frontend/editor/src/core/components/shared/NavigationWarningModal.tsx+++ b/frontend/editor/src/core/components/shared/NavigationWarningModal.tsx@@ -1,5 +1,6 @@import { useRef, useEffect } from "react";-import { Modal, Text, Button, Group, Stack } from "@mantine/core";+import { Modal, Text, Group, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useNavigationGuard } from "@app/contexts/NavigationContext";import { useTranslation } from "react-i18next";import ArrowBackIcon from "@mui/icons-material/ArrowBack";@@ -103,10 +104,12 @@ const NavigationWarningModal = () => {<Group justify="space-between" gap="xl" visibleFrom="md"><Group gap="sm"><Button- variant="light"- color="var(--mantine-color-gray-8)"+ variant="secondary"+ accent="neutral"onClick={handleKeepWorking}- w={BUTTON_WIDTH}+ style={{+ width: BUTTON_WIDTH,+ }}leftSection={<ArrowBackIcon fontSize="small" />}>{t("keepWorking", "Keep Working")}@@ -114,19 +117,19 @@ const NavigationWarningModal = () => {</Group><Group gap="sm"><Button- variant="filled"- color="var(--mantine-color-red-9)"+ accent="danger"onClick={handleDiscardChanges}- w={BUTTON_WIDTH}+ style={{+ width: BUTTON_WIDTH,+ }}leftSection={<DeleteOutlineIcon fontSize="small" />}>{t("discardChanges", "Discard Changes")}</Button>{hasApply && (<Button- variant="filled"onClick={handleApplyAndContinue}- w={BUTTON_WIDTH}+ style={{ width: BUTTON_WIDTH }}leftSection={<CheckCircleOutlineIcon fontSize="small" />}>{t("applyAndContinue", "Apply & Leave")}@@ -134,9 +137,8 @@ const NavigationWarningModal = () => {)}{hasExport && (<Button- variant="filled"onClick={handleExportAndContinue}- w={BUTTON_WIDTH}+ style={{ width: BUTTON_WIDTH }}leftSection={<CheckCircleOutlineIcon fontSize="small" />}>{t("exportAndContinue", "Export & Leave")}@@ -148,28 +150,28 @@ const NavigationWarningModal = () => {{/* Mobile layout: centered stack of 4 buttons */}<Stack align="center" gap="sm" hiddenFrom="md"><Button- variant="light"- color="var(--mantine-color-gray-8)"+ variant="secondary"+ accent="neutral"onClick={handleKeepWorking}- w={BUTTON_WIDTH}+ style={{ width: BUTTON_WIDTH }}leftSection={<ArrowBackIcon fontSize="small" />}>{t("keepWorking", "Keep Working")}</Button><Button- variant="filled"- color="var(--mantine-color-red-9)"+ accent="danger"onClick={handleDiscardChanges}- w={BUTTON_WIDTH}+ style={{+ width: BUTTON_WIDTH,+ }}leftSection={<DeleteOutlineIcon fontSize="small" />}>{t("discardChanges", "Discard Changes")}</Button>{hasApply && (<Button- variant="filled"onClick={handleApplyAndContinue}- w={BUTTON_WIDTH}+ style={{ width: BUTTON_WIDTH }}leftSection={<CheckCircleOutlineIcon fontSize="small" />}>{t("applyAndContinue", "Apply & Leave")}@@ -177,9 +179,8 @@ const NavigationWarningModal = () => {)}{hasExport && (<Button- variant="filled"onClick={handleExportAndContinue}- w={BUTTON_WIDTH}+ style={{ width: BUTTON_WIDTH }}leftSection={<CheckCircleOutlineIcon fontSize="small" />}>{t("exportAndContinue", "Export & Leave")}diff --git a/frontend/editor/src/core/components/shared/ObscuredOverlay.tsx b/frontend/editor/src/core/components/shared/ObscuredOverlay.tsxindex ba8140d303..01f14e9be7 100644--- a/frontend/editor/src/core/components/shared/ObscuredOverlay.tsx+++ b/frontend/editor/src/core/components/shared/ObscuredOverlay.tsx@@ -1,4 +1,5 @@import React from "react";+import { Button } from "@app/ui/Button";import styles from "@app/components/shared/ObscuredOverlay/ObscuredOverlay.module.css";type ObscuredOverlayProps = {@@ -34,13 +35,13 @@ export default function ObscuredOverlay({<div className={styles.overlayMessage}>{overlayMessage}</div>)}{buttonText && onButtonClick && (- <button- type="button"+ <Button+ variant="tertiary"onClick={onButtonClick}className={styles.overlayButton}>{buttonText}- </button>+ </Button>)}</div></div>diff --git a/frontend/editor/src/core/components/shared/ShareFileModal.tsx b/frontend/editor/src/core/components/shared/ShareFileModal.tsxindex 2f205326e3..1430f9df20 100644--- a/frontend/editor/src/core/components/shared/ShareFileModal.tsx+++ b/frontend/editor/src/core/components/shared/ShareFileModal.tsx@@ -3,13 +3,13 @@ import {Modal,Stack,Text,- Button,Group,Alert,TextInput,Paper,Select,} from "@mantine/core";+import { Button } from "@app/ui/Button";import LinkIcon from "@mui/icons-material/Link";import ContentCopyRoundedIcon from "@mui/icons-material/ContentCopyRounded";import { useTranslation } from "react-i18next";@@ -253,8 +253,8 @@ const ShareFileModal: React.FC<ShareFileModalProps> = ({label={t("storageShare.linkLabel", "Share link")}rightSection={<Button- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"leftSection={<ContentCopyRoundedIcon style={{ fontSize: 16 }} />}@@ -307,7 +307,7 @@ const ShareFileModal: React.FC<ShareFileModalProps> = ({</Paper><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={onClose} disabled={isWorking}>+ <Button variant="secondary" onClick={onClose} disabled={isWorking}>{t("cancel", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/core/components/shared/ShareManagementModal.tsx b/frontend/editor/src/core/components/shared/ShareManagementModal.tsxindex 2498f902cb..e0e5899f8d 100644--- a/frontend/editor/src/core/components/shared/ShareManagementModal.tsx+++ b/frontend/editor/src/core/components/shared/ShareManagementModal.tsx@@ -3,7 +3,6 @@ import {Modal,Stack,Text,- Button,Group,Alert,TextInput,@@ -13,6 +12,7 @@ import {ScrollArea,Select,} from "@mantine/core";+import { Button } from "@app/ui/Button";import ContentCopyRoundedIcon from "@mui/icons-material/ContentCopyRounded";import DeleteIcon from "@mui/icons-material/Delete";import HistoryIcon from "@mui/icons-material/History";@@ -648,7 +648,7 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({</Text><Group justify="flex-end" gap="sm"><Button- variant="default"+ variant="secondary"onClick={() => setShowEmailWarning(false)}disabled={isLoading}>@@ -731,9 +731,8 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({{confirmRemoveUser === user.username ? (<Group gap="xs"><Button- variant="filled"- size="xs"- color="red"+ accent="danger"+ size="sm"onClick={() => {void handleRemoveUser(user.username);}}@@ -742,8 +741,8 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({{t("confirm", "Confirm")}</Button><Button- variant="default"- size="xs"+ variant="secondary"+ size="sm"onClick={() => setConfirmRemoveUser(null)}>{t("cancel", "Cancel")}@@ -751,9 +750,9 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({</Group>) : (<Button- variant="light"- size="xs"- color="red"+ variant="secondary"+ accent="danger"+ size="sm"leftSection={<DeleteIcon style={{ fontSize: 16 }} />}@@ -813,8 +812,8 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({label={t("storageShare.linkLabel", "Share link")}rightSection={<Button- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"leftSection={<ContentCopyRoundedIconstyle={{ fontSize: 16 }}@@ -874,8 +873,8 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({</Stack><Group gap="xs"><Button- variant={isSelected ? "filled" : "light"}- size="xs"+ variant={isSelected ? "secondary" : "primary"}+ size="sm"leftSection={<HistoryIcon style={{ fontSize: 16 }} />}@@ -898,9 +897,8 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({{confirmRevokeToken === link.token ? (<Group gap="xs"><Button- variant="filled"- size="xs"- color="red"+ accent="danger"+ size="sm"onClick={() => {void handleRevokeLink(link.token);}}@@ -909,8 +907,8 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({{t("confirm", "Confirm")}</Button><Button- variant="default"- size="xs"+ variant="secondary"+ size="sm"onClick={() => setConfirmRevokeToken(null)}>{t("cancel", "Cancel")}@@ -918,9 +916,9 @@ const ShareManagementModal: React.FC<ShareManagementModalProps> = ({</Group>) : (<Button- variant="light"- size="xs"- color="red"+ variant="secondary"+ accent="danger"+ size="sm"leftSection={<DeleteIcon style={{ fontSize: 16 }} />}diff --git a/frontend/editor/src/core/components/shared/TextInput.tsx b/frontend/editor/src/core/components/shared/TextInput.tsxindex f6f4eb632d..06147fb99b 100644--- a/frontend/editor/src/core/components/shared/TextInput.tsx+++ b/frontend/editor/src/core/components/shared/TextInput.tsx@@ -1,5 +1,6 @@import React, { forwardRef } from "react";import { useTranslation } from "react-i18next";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import styles from "@app/components/shared/textInput/TextInput.module.css";@@ -110,14 +111,14 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>({...props}/>{shouldShowClearButton && (- <button- type="button"+ <ActionIcon+ variant="tertiary"className={styles.clearButton}onClick={handleClear}aria-label={t("textInput.clear", "Clear input")}><LocalIcon icon="close-rounded" width="1.25rem" height="1.25rem" />- </button>+ </ActionIcon>)}</div>);diff --git a/frontend/editor/src/core/components/shared/ToolPanelHeader.tsx b/frontend/editor/src/core/components/shared/ToolPanelHeader.tsxindex e34ca4c6c2..9d5f921bec 100644--- a/frontend/editor/src/core/components/shared/ToolPanelHeader.tsx+++ b/frontend/editor/src/core/components/shared/ToolPanelHeader.tsx@@ -1,5 +1,5 @@import type { ReactNode } from "react";-import { ActionIcon } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import CloseIcon from "@mui/icons-material/Close";import "@app/components/shared/ToolPanelHeader.css";@@ -38,12 +38,12 @@ export function ToolPanelHeader({{onClose && (<ActionIconclassName="sui-panelhdr__close"- variant="subtle"- color="gray"- radius="xl"+ variant="tertiary"+ accent="neutral"+ shape="circle"size="md"onClick={onClose}- aria-label={closeLabel}+ aria-label={closeLabel ?? ""}><CloseIcon sx={{ fontSize: 18 }} /></ActionIcon>diff --git a/frontend/editor/src/core/components/shared/Tooltip.tsx b/frontend/editor/src/core/components/shared/Tooltip.tsxindex 12232effc1..9c94bc4726 100644--- a/frontend/editor/src/core/components/shared/Tooltip.tsx+++ b/frontend/editor/src/core/components/shared/Tooltip.tsx@@ -7,6 +7,7 @@ import React, {} from "react";import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import { addEventListenerWithCleanup } from "@app/utils/genericUtils";import { useTooltipPosition } from "@app/hooks/useTooltipPosition";@@ -396,7 +397,8 @@ export const Tooltip: React.FC<TooltipProps> = ({}>{shouldShowCloseButton && (- <button+ <ActionIcon+ variant="tertiary"className={styles["tooltip-pin-button"]}onClick={(e) => {e.stopPropagation();@@ -407,7 +409,7 @@ export const Tooltip: React.FC<TooltipProps> = ({aria-label={t("tooltip.close", "Close tooltip")}><LocalIcon icon="close-rounded" width="1.25rem" height="1.25rem" />- </button>+ </ActionIcon>)}{arrow && !sidebarTooltip && (<divdiff --git a/frontend/editor/src/core/components/shared/TopControls.tsx b/frontend/editor/src/core/components/shared/TopControls.tsxindex 8fc61183a8..de0b4766d4 100644--- a/frontend/editor/src/core/components/shared/TopControls.tsx+++ b/frontend/editor/src/core/components/shared/TopControls.tsx@@ -1,5 +1,6 @@import React, { useState, useCallback, useMemo } from "react";-import { SegmentedControl, Loader } from "@mantine/core";+import { Loader } from "@mantine/core";+import { SegmentedControl } from "@app/ui/SegmentedControl";import InsertDriveFileIcon from "@mui/icons-material/InsertDriveFile";import GridViewIcon from "@mui/icons-material/GridView";import FolderIcon from "@mui/icons-material/Folder";@@ -205,46 +206,16 @@ const TopControls = ({<div className="flex justify-center"><SegmentedControldata-tour="view-switcher"- data={viewOptions}+ options={viewOptions}value={currentView}onChange={handleViewChange}- color="blue"+ variant="secondary"fullWidthstyle={{transition: "all 0.2s ease",opacity: switchingTo ? 0.8 : 1,pointerEvents: "auto",}}- styles={{- root: {- borderRadius: "0 0 16px 16px",- height: "1.8rem",- backgroundColor: "var(--bg-toolbar)",- border: "1px solid var(--border-default)",- borderTop: "none",- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",- outline: "1px solid rgba(0, 0, 0, 0.1)",- outlineOffset: "-1px",- padding: "0 0",- gap: "0",- },- control: {- borderRadius: "0 0 16px 16px",- padding: "0",- border: "none",- },- indicator: {- borderRadius: "0 0 16px 16px",- height: "100%",- top: "0rem",- margin: "0",- border: "none",- },- label: {- paddingTop: "0",- paddingBottom: "0",- },- }}/></div></div>diff --git a/frontend/editor/src/core/components/shared/UpdateModal.tsx b/frontend/editor/src/core/components/shared/UpdateModal.tsxindex c18549360c..4a5e5b2404 100644--- a/frontend/editor/src/core/components/shared/UpdateModal.tsx+++ b/frontend/editor/src/core/components/shared/UpdateModal.tsx@@ -4,7 +4,6 @@ import {Stack,Text,Badge,- Button,Group,Loader,Center,@@ -13,9 +12,11 @@ import {Progress,Alert,Divider,- CloseButton,Anchor,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";+import LocalIcon from "@app/components/shared/LocalIcon";import { useTranslation } from "react-i18next";import {updateService,@@ -271,12 +272,14 @@ const UpdateModal: React.FC<UpdateModalProps> = ({</Box></Group>{canClose && (- <CloseButton+ <ActionIcononClick={onClose}size="lg"- variant="subtle"+ variant="tertiary"aria-label={t("update.closeModal", "Close update modal")}- />+ >+ <LocalIcon icon="close-rounded" width={20} height={20} />+ </ActionIcon>)}</Group></Box>@@ -520,12 +523,12 @@ const UpdateModal: React.FC<UpdateModalProps> = ({</Text></Group><Button- component="a"+ as="a"href={guide.url}target="_blank"onClick={handleExternalLink(guide.url)}- variant="default"- size="xs"+ variant="secondary"+ size="sm"rightSection={<OpenInNewIcon style={{ fontSize: 12 }} />}@@ -616,12 +619,11 @@ const UpdateModal: React.FC<UpdateModalProps> = ({</Group><Group gap={4}><Button- component="a"+ as="a"href={`https://github.com/Stirling-Tools/Stirling-PDF/releases/tag/v${version.version}`}target="_blank"- variant="subtle"- size="xs"- px={6}+ variant="tertiary"+ size="sm"onClick={handleExternalLink(`https://github.com/Stirling-Tools/Stirling-PDF/releases/tag/v${version.version}`,)}@@ -689,7 +691,7 @@ const UpdateModal: React.FC<UpdateModalProps> = ({</Text>{version.compatibility.migration_guide_url && (<Button- component="a"+ as="a"href={version.compatibility.migration_guide_url}@@ -698,10 +700,12 @@ const UpdateModal: React.FC<UpdateModalProps> = ({version.compatibility.migration_guide_url ?? "",)}- variant="light"- color="orange"- size="xs"- mt="xs"+ variant="secondary"+ accent="warning"+ size="sm"+ style={{+ marginTop: "var(--mantine-spacing-xs)",+ }}rightSection={<OpenInNewIcon style={{ fontSize: 14 }} />}@@ -724,8 +728,8 @@ const UpdateModal: React.FC<UpdateModalProps> = ({{sortedVersions.length > 10 && (<Center mt="sm"><Button- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"onClick={() => setShowAllVersions(!showAllVersions)}>{showAllVersions@@ -837,10 +841,9 @@ const UpdateModal: React.FC<UpdateModalProps> = ({><Group justify="flex-end" gap="sm"><Button- variant="default"+ variant="secondary"onClick={handleLater}disabled={!canClose}- radius="md"size="md">{t("update.later", "Later")}@@ -848,8 +851,6 @@ const UpdateModal: React.FC<UpdateModalProps> = ({{desktopInstall ? (desktopInstall.state === "ready-to-restart" ? (<Button- color="blue"- radius="md"size="md"leftSection={<RestartAltIcon style={{ fontSize: 20 }} />}onClick={() => void desktopInstall.actions.restartApp()}@@ -866,12 +867,11 @@ const UpdateModal: React.FC<UpdateModalProps> = ({{(installBlocked || desktopInstall.state === "error") &&downloadUrl && (<Button- component="a"+ as="a"href={downloadUrl}target="_blank"onClick={handleExternalLink(downloadUrl)}- variant="default"- radius="md"+ variant="secondary"size="md"leftSection={<DownloadIcon style={{ fontSize: 16 }} />}>@@ -879,16 +879,10 @@ const UpdateModal: React.FC<UpdateModalProps> = ({</Button>)}<Button- color="blue"- radius="md"- size="lg"+ size="md"leftSection={<DownloadIcon style={{ fontSize: 20 }} />}onClick={() => void desktopInstall.actions.startInstall()}disabled={installBlocked}- styles={{- root: { paddingLeft: 16, paddingRight: 20 },- inner: { gap: 10 },- }}><Box><Text size="sm" fw={700} lh={1.2}>@@ -907,13 +901,11 @@ const UpdateModal: React.FC<UpdateModalProps> = ({// unreachable, the pubkey is wrong, signatures don't match, etc.downloadUrl && (<Button- component="a"+ as="a"href={downloadUrl}target="_blank"onClick={handleExternalLink(downloadUrl)}- color="blue"- radius="md"- size="lg"+ size="md"leftSection={<DownloadIcon style={{ fontSize: 20 }} />}>{t("update.downloadLatest", "Download Latest")}diff --git a/frontend/editor/src/core/components/shared/UploadToServerModal.tsx b/frontend/editor/src/core/components/shared/UploadToServerModal.tsxindex 10cfc57dd8..55c4b61c4f 100644--- a/frontend/editor/src/core/components/shared/UploadToServerModal.tsx+++ b/frontend/editor/src/core/components/shared/UploadToServerModal.tsx@@ -1,5 +1,6 @@import React, { useCallback, useEffect, useState } from "react";-import { Modal, Stack, Text, Button, Group, Alert } from "@mantine/core";+import { Modal, Stack, Text, Group, Alert } from "@mantine/core";+import { Button } from "@app/ui/Button";import CloudUploadIcon from "@mui/icons-material/CloudUpload";import { useTranslation } from "react-i18next";@@ -120,7 +121,7 @@ const UploadToServerModal: React.FC<UploadToServerModalProps> = ({)}<Group justify="flex-end" gap="sm">- <Button variant="default" onClick={onClose} disabled={isUploading}>+ <Button variant="secondary" onClick={onClose} disabled={isUploading}>{t("cancel", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/core/components/shared/UserSelector.tsx b/frontend/editor/src/core/components/shared/UserSelector.tsxindex 956da0cff5..57d2a0dd76 100644--- a/frontend/editor/src/core/components/shared/UserSelector.tsx+++ b/frontend/editor/src/core/components/shared/UserSelector.tsx@@ -1,6 +1,7 @@import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { MultiSelect, Loader, Text, Button, Stack } from "@mantine/core";+import { MultiSelect, Loader, Text, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useNavigate } from "react-router-dom";import { alert } from "@app/components/toast";import { UserSummary } from "@app/types/signingSession";@@ -117,8 +118,8 @@ const UserSelector = ({{t("certSign.collab.userSelector.noUsers", "No other users found.")}</Text><Button- size="xs"- variant="light"+ size="sm"+ variant="secondary"onClick={() => navigate("/settings/people")}>{t("certSign.collab.userSelector.inviteUsers", "Add Users")}diff --git a/frontend/editor/src/core/components/shared/ViewerInlineControls.tsx b/frontend/editor/src/core/components/shared/ViewerInlineControls.tsxindex 9535926c02..bdaf4c6ade 100644--- a/frontend/editor/src/core/components/shared/ViewerInlineControls.tsx+++ b/frontend/editor/src/core/components/shared/ViewerInlineControls.tsx@@ -1,5 +1,6 @@import React, { useState, useEffect } from "react";-import { ActionIcon, Slider } from "@mantine/core";+import { Slider } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import { useViewer } from "@app/contexts/ViewerContext";import { useNavigationState } from "@app/contexts/NavigationContext";@@ -37,8 +38,7 @@ export function ViewerInlineControls() {{/* Zoom controls */}<ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"className="workbench-bar-action-icon"onClick={() => viewer.zoomActions.zoomOut()}aria-label={t("viewer.zoomOut", "Zoom out")}@@ -66,8 +66,7 @@ export function ViewerInlineControls() {</div><ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"className="workbench-bar-action-icon"onClick={() => viewer.zoomActions.zoomIn()}aria-label={t("viewer.zoomIn", "Zoom in")}diff --git a/frontend/editor/src/core/components/shared/WorkbenchBar.css b/frontend/editor/src/core/components/shared/WorkbenchBar.cssindex 76490fd2b5..2a61e8099c 100644--- a/frontend/editor/src/core/components/shared/WorkbenchBar.css+++ b/frontend/editor/src/core/components/shared/WorkbenchBar.css@@ -77,6 +77,14 @@line-height: 1;}+/* Segmented view switcher: size the icons to the pre-consolidation 16px+ * (centering + gap come from the shared SegmentedControl innerLabel). */+.workbench-bar-views .mantine-SegmentedControl-label svg {+ font-size: 16px;+ width: 16px;+ height: 16px;+}+/* ---- Center: tool buttons ---- *//* Single-row: center sits between views and globals */@@ -126,11 +134,17 @@margin-left: auto;}-/* Shared action icon style - applies to both center and global buttons */+/* Shared action icon style - applies to both center and global buttons.+ * Tight 24px hit-box and no hover background: these are quiet toolbar icons —+ * hover feedback comes from the icon colour darkening, not a bg tint. */.workbench-bar-action-icon {color: var(--text-secondary) !important;- width: 28px !important;- height: 28px !important;+ /* min-* too: Mantine's ActionIcon sets min-width/min-height from --ai-size+ * (36px), which floors the width and defeats the 24px clamp. */+ width: 24px !important;+ height: 24px !important;+ min-width: 24px !important;+ min-height: 24px !important;background: transparent !important;}@@ -142,7 +156,6 @@.workbench-bar-action-icon:hover {color: var(--text-primary) !important;- background-color: var(--hover-bg) !important;}.workbench-bar-action-icon[data-variant="filled"] {diff --git a/frontend/editor/src/core/components/shared/WorkbenchBar.tsx b/frontend/editor/src/core/components/shared/WorkbenchBar.tsxindex edfbdeba85..87e80a16c5 100644--- a/frontend/editor/src/core/components/shared/WorkbenchBar.tsx+++ b/frontend/editor/src/core/components/shared/WorkbenchBar.tsx@@ -5,7 +5,9 @@ import React, {useRef,useSyncExternalStore,} from "react";-import { ActionIcon } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import { useNavigate } from "react-router-dom";import ArrowBackIcon from "@mui/icons-material/ArrowBack";@@ -40,8 +42,8 @@ import {WorkbenchBarRenderContext,WorkbenchBarSection,} from "@app/types/workbenchBar";-import InsertDriveFileIcon from "@mui/icons-material/InsertDriveFile";-import FolderIcon from "@mui/icons-material/Folder";+import InsertDriveFileOutlinedIcon from "@mui/icons-material/InsertDriveFileOutlined";+import FolderOutlinedIcon from "@mui/icons-material/FolderOutlined";import CloseIcon from "@mui/icons-material/Close";import PrintIcon from "@mui/icons-material/Print";import "@app/components/shared/WorkbenchBar.css";@@ -316,17 +318,16 @@ export default function WorkbenchBar({const ariaLabel =btn.ariaLabel ||- (typeof btn.tooltip === "string" ? (btn.tooltip as string) : undefined);+ (typeof btn.tooltip === "string" ? (btn.tooltip as string) : btn.id);const buttonNode = (<ActionIcon- variant={isActive ? "filled" : "subtle"}- color={isActive ? "blue" : undefined}- radius="md"+ variant={isActive ? "primary" : "quiet"}className="workbench-bar-action-icon"onClick={triggerAction}disabled={disabled}aria-label={ariaLabel}aria-pressed={isActive ? true : undefined}+ hover={isActive ? true : false}>{btn.icon}</ActionIcon>@@ -341,12 +342,12 @@ export default function WorkbenchBar({{value: "viewer",label: t("workbenchBar.viewer", "Viewer"),- icon: <InsertDriveFileIcon fontSize="small" />,+ icon: <InsertDriveFileOutlinedIcon fontSize="small" />,},{value: "fileEditor",label: t("workbenchBar.activeFiles", "Active Files"),- icon: <FolderIcon fontSize="small" />,+ icon: <FolderOutlinedIcon fontSize="small" />,},...(selectedTool === "multiTool"? [@@ -368,7 +369,7 @@ export default function WorkbenchBar({.map((v) => ({value: v.workbenchId,label: v.label,- icon: v.icon ?? <InsertDriveFileIcon fontSize="small" />,+ icon: v.icon ?? <InsertDriveFileOutlinedIcon fontSize="small" />,})),];@@ -415,8 +416,8 @@ export default function WorkbenchBar({<div className="workbench-bar-views" data-tour="view-switcher">{returnRoute && hasFiles && (<>- <button- type="button"+ <Button+ variant="tertiary"className="workbench-bar-view-btn workbench-bar-back-btn"onClick={handleBackToFiles}aria-label={t(@@ -428,8 +429,8 @@ export default function WorkbenchBar({: "Back to My Files",{ folder: returnRoute.label ?? "" },)}+ leftSection={<ArrowBackIcon style={{ fontSize: "1.1rem" }} />}>- <ArrowBackIcon style={{ fontSize: "1.1rem" }} /><span className="workbench-bar-view-label">{returnRoute.label? t("filesPage.backToFolder", "Back to {{folder}}", {@@ -437,23 +438,28 @@ export default function WorkbenchBar({}): t("filesPage.backToMyFiles", "Back to My Files")}</span>- </button>+ </Button><div className="workbench-bar-divider" /></>)}- {(hasFiles || isCustomView) &&- viewOptions.map((opt) => (- <button- key={opt.value}- className={`workbench-bar-view-btn${currentView === opt.value ? " active" : ""}`}- onClick={() => setCurrentView(opt.value)}- aria-pressed={currentView === opt.value}- type="button"- >- {opt.icon}- <span className="workbench-bar-view-label">{opt.label}</span>- </button>- ))}+ {(hasFiles || isCustomView) && (+ <SegmentedControl<WorkbenchType>+ className="workbench-bar-views"+ size="sm"+ value={currentView}+ onChange={setCurrentView}+ variant="secondary"+ options={viewOptions.map((opt) => ({+ value: opt.value,+ label: (+ <>+ {opt.icon}+ <span className="workbench-bar-view-label">{opt.label}</span>+ </>+ ),+ }))}+ />+ )}</div>{/* Tool buttons - second row, only rendered when buttons exist */}@@ -493,8 +499,8 @@ export default function WorkbenchBar({{currentView === "viewer" &&renderWithTooltip(<ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"+ hover={false}className="workbench-bar-action-icon"onClick={handlePrint}disabled={@@ -511,13 +517,14 @@ export default function WorkbenchBar({{!isCustomView &&renderWithTooltip(<ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"+ hover={false}className="workbench-bar-action-icon"onClick={() => handleExportAll()}disabled={disableForFullscreen || totalItems === 0 || allButtonsDisabled}+ aria-label={downloadTooltip}><LocalIconicon={icons.downloadIconName}@@ -533,13 +540,14 @@ export default function WorkbenchBar({icons.saveAsIconName &&renderWithTooltip(<ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"+ hover={false}className="workbench-bar-action-icon"onClick={() => handleExportAll(true)}disabled={disableForFullscreen || totalItems === 0 || allButtonsDisabled}+ aria-label={t("workbenchBar.saveAs", "Save As")}><LocalIconicon={icons.saveAsIconName}@@ -559,8 +567,8 @@ export default function WorkbenchBar({{!isCustomView &&renderWithTooltip(<ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"+ hover={false}className="workbench-bar-action-icon"onClick={handleClose}disabled={diff --git a/frontend/editor/src/core/components/shared/ZipWarningModal.tsx b/frontend/editor/src/core/components/shared/ZipWarningModal.tsxindex 3e52a534fc..31c47f0ed7 100644--- a/frontend/editor/src/core/components/shared/ZipWarningModal.tsx+++ b/frontend/editor/src/core/components/shared/ZipWarningModal.tsx@@ -1,4 +1,5 @@-import { Modal, Text, Button, Group, Stack } from "@mantine/core";+import { Modal, Text, Group, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import WarningAmberIcon from "@mui/icons-material/WarningAmber";import CheckCircleOutlineIcon from "@mui/icons-material/CheckCircleOutlined";@@ -55,20 +56,22 @@ const ZipWarningModal = ({{/* Desktop layout: centered buttons */}<Group justify="center" gap="sm" visibleFrom="md"><Button- variant="light"- color="var(--mantine-color-gray-8)"+ variant="secondary"+ accent="neutral"onClick={onCancel}leftSection={<CancelIcon fontSize="small" />}- w="10rem"+ style={{+ width: "10rem",+ }}>{t("zipWarning.cancel", "Cancel")}</Button><Button- variant="filled"- color="var(--mantine-color-blue-9)"onClick={onConfirm}leftSection={<CheckCircleOutlineIcon fontSize="small" />}- w="10rem"+ style={{+ width: "10rem",+ }}>{t("zipWarning.confirm", "Extract")}</Button>@@ -77,20 +80,22 @@ const ZipWarningModal = ({{/* Mobile layout: vertical stack */}<Stack align="center" gap="sm" hiddenFrom="md"><Button- variant="light"- color="var(--mantine-color-gray-8)"+ variant="secondary"+ accent="neutral"onClick={onCancel}leftSection={<CancelIcon fontSize="small" />}- w="10rem"+ style={{+ width: "10rem",+ }}>{t("zipWarning.cancel", "Cancel")}</Button><Button- variant="filled"- color="var(--mantine-color-blue-9)"onClick={onConfirm}leftSection={<CheckCircleOutlineIcon fontSize="small" />}- w="10rem"+ style={{+ width: "10rem",+ }}>{t("zipWarning.confirm", "Extract")}</Button>diff --git a/frontend/editor/src/core/components/shared/config/RestartConfirmationModal.tsx b/frontend/editor/src/core/components/shared/config/RestartConfirmationModal.tsxindex af96918154..f4e9c47b0a 100644--- a/frontend/editor/src/core/components/shared/config/RestartConfirmationModal.tsx+++ b/frontend/editor/src/core/components/shared/config/RestartConfirmationModal.tsx@@ -1,4 +1,5 @@-import { Modal, Text, Group, Button, Stack } from "@mantine/core";+import { Modal, Text, Group, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import RefreshIcon from "@mui/icons-material/Refresh";import ScheduleIcon from "@mui/icons-material/Schedule";@@ -48,14 +49,13 @@ export default function RestartConfirmationModal({<Group justify="flex-end" gap="sm"><Button- variant="default"+ variant="secondary"leftSection={<ScheduleIcon style={{ fontSize: 16 }} />}onClick={onClose}>{t("admin.settings.restart.later", "Restart Later")}</Button><Button- color="blue"leftSection={<RefreshIcon style={{ fontSize: 16 }} />}onClick={onRestart}>diff --git a/frontend/editor/src/core/components/shared/config/SettingsStickyFooter.tsx b/frontend/editor/src/core/components/shared/config/SettingsStickyFooter.tsxindex a640bb1a22..f3a204b011 100644--- a/frontend/editor/src/core/components/shared/config/SettingsStickyFooter.tsx+++ b/frontend/editor/src/core/components/shared/config/SettingsStickyFooter.tsx@@ -1,4 +1,5 @@-import { Button, Group, Text } from "@mantine/core";+import { Group, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";interface SettingsStickyFooterProps {@@ -29,7 +30,7 @@ export function SettingsStickyFooter({{t("admin.settings.unsavedChanges.hint", "You have unsaved changes")}</Text><Group gap="sm">- <Button variant="default" onClick={onDiscard} size="sm">+ <Button variant="secondary" onClick={onDiscard} size="sm">{t("admin.settings.discard", "Discard")}</Button><Button onClick={onSave} loading={saving} size="sm">diff --git a/frontend/editor/src/core/components/shared/config/configSections/GeneralSection.tsx b/frontend/editor/src/core/components/shared/config/configSections/GeneralSection.tsxindex 598b705347..2ec530a2d5 100644--- a/frontend/editor/src/core/components/shared/config/configSections/GeneralSection.tsx+++ b/frontend/editor/src/core/components/shared/config/configSections/GeneralSection.tsx@@ -6,15 +6,15 @@ import {Text,Tooltip,NumberInput,- SegmentedControl,Select,Code,Group,Anchor,- ActionIcon,- Button,Badge,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import { usePreferences } from "@app/contexts/PreferencesContext";import { useAppConfig } from "@app/contexts/AppConfigContext";@@ -195,8 +195,7 @@ const GeneralSection: React.FC<GeneralSectionProps> = ({}}><ActionIcon- variant="subtle"- color="gray"+ variant="tertiary"size="sm"style={{ position: "absolute", top: "0.5rem", right: "0.5rem" }}onClick={handleDismissBanner}@@ -346,7 +345,7 @@ const GeneralSection: React.FC<GeneralSectionProps> = ({<Group gap="sm"><Buttonsize="sm"- variant="default"+ variant="secondary"onClick={checkForUpdate}loading={checkingUpdate}disabled={!currentVersion}@@ -366,8 +365,10 @@ const GeneralSection: React.FC<GeneralSectionProps> = ({{updateSummary && (<Buttonsize="sm"- color={- updateSummary.max_priority === "urgent" ? "red" : "blue"+ accent={+ updateSummary.max_priority === "urgent"+ ? "danger"+ : "default"}onClick={() => setUpdateModalOpened(true)}leftSection={@@ -488,7 +489,7 @@ const GeneralSection: React.FC<GeneralSectionProps> = ({<SegmentedControlvalue={themeMode}onChange={(val) => setTheme(val as ThemeMode)}- data={[+ options={[{label: t("settings.general.themeLight", "Light"),value: "light",@@ -555,7 +556,7 @@ const GeneralSection: React.FC<GeneralSectionProps> = ({onChange={(val: string) =>updatePreference("defaultToolPanelMode", val as ToolPanelMode)}- data={[+ options={[{label: t("settings.general.mode.sidebar", "Sidebar"),value: "sidebar",@@ -593,7 +594,7 @@ const GeneralSection: React.FC<GeneralSectionProps> = ({onChange={(val: string) =>updatePreference("defaultStartupView", val as StartupView)}- data={[+ options={[{label: t("settings.general.startupView.tools", "Tools"),value: "tools",diff --git a/frontend/editor/src/core/components/shared/config/configSections/HelpSection.tsx b/frontend/editor/src/core/components/shared/config/configSections/HelpSection.tsxindex 89299fe3d0..013db92d45 100644--- a/frontend/editor/src/core/components/shared/config/configSections/HelpSection.tsx+++ b/frontend/editor/src/core/components/shared/config/configSections/HelpSection.tsx@@ -1,5 +1,6 @@import React from "react";-import { Button, Group, Paper, Stack, Text } from "@mantine/core";+import { Group, Paper, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { requestStartTour } from "@app/constants/events";@@ -37,7 +38,7 @@ const HelpSection: React.FC<HelpSectionProps> = ({</Text></div><Button- variant="default"+ variant="secondary"size="sm"leftSection={<LocalIcon@@ -66,7 +67,7 @@ const HelpSection: React.FC<HelpSectionProps> = ({</Text></div><Button- variant="default"+ variant="secondary"size="sm"leftSection={<LocalIcon icon="person-rounded" width="1rem" height="1rem" />diff --git a/frontend/editor/src/core/components/shared/config/configSections/HotkeysSection.tsx b/frontend/editor/src/core/components/shared/config/configSections/HotkeysSection.tsxindex e7e15c9e89..563cd286f1 100644--- a/frontend/editor/src/core/components/shared/config/configSections/HotkeysSection.tsx+++ b/frontend/editor/src/core/components/shared/config/configSections/HotkeysSection.tsx@@ -3,7 +3,6 @@ import {Alert,Badge,Box,- Button,Divider,Group,Paper,@@ -11,6 +10,7 @@ import {Text,TextInput,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useToolWorkflow } from "@app/contexts/ToolWorkflowContext";import { useHotkeys } from "@app/contexts/HotkeyContext";@@ -215,9 +215,8 @@ const HotkeysSection: React.FC = () => {<Group gap="xs"><Button- size="xs"- variant={isEditing ? "filled" : "default"}- color={isEditing ? "blue" : undefined}+ size="sm"+ variant={isEditing ? "primary" : "secondary"}onClick={() => handleStartCapture(toolId)}>{isEditing@@ -228,8 +227,8 @@ const HotkeysSection: React.FC = () => {: t("settings.hotkeys.change", "Change shortcut")}</Button><Button- size="xs"- variant="subtle"+ size="sm"+ variant="tertiary"disabled={bindingEquals(currentBinding,defaultBinding,diff --git a/frontend/editor/src/core/components/shared/config/configSections/LegalSection.tsx b/frontend/editor/src/core/components/shared/config/configSections/LegalSection.tsxindex 9106930e27..40945f6fc7 100644--- a/frontend/editor/src/core/components/shared/config/configSections/LegalSection.tsx+++ b/frontend/editor/src/core/components/shared/config/configSections/LegalSection.tsx@@ -1,5 +1,6 @@import React from "react";-import { Anchor, Button, Group, Paper, Stack, Text } from "@mantine/core";+import { Anchor, Group, Paper, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { useAppConfig } from "@app/contexts/AppConfigContext";@@ -126,7 +127,7 @@ const LegalSection: React.FC = () => {</Text></div><Button- variant="default"+ variant="secondary"size="sm"id="cookieBanner"onClick={showCookiePreferences}diff --git a/frontend/editor/src/core/components/shared/config/configSections/ProviderCard.tsx b/frontend/editor/src/core/components/shared/config/configSections/ProviderCard.tsxindex bb157558ec..93999ce438 100644--- a/frontend/editor/src/core/components/shared/config/configSections/ProviderCard.tsx+++ b/frontend/editor/src/core/components/shared/config/configSections/ProviderCard.tsx@@ -3,7 +3,6 @@ import {Paper,Group,Text,- Button,Collapse,Stack,TextInput,@@ -13,6 +12,7 @@ import {TagsInput,Anchor,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import EditableSecretField from "@app/components/shared/EditableSecretField";@@ -225,8 +225,8 @@ export default function ProviderCard({<Group gap="xs" wrap="nowrap"><Button- variant={isConfigured ? "subtle" : "filled"}- size="xs"+ variant={isConfigured ? "tertiary" : "primary"}+ size="sm"onClick={isConfigured? () => setExpanded(!expanded)@@ -280,8 +280,8 @@ export default function ProviderCard({<Group justify="flex-end" mt="sm">{onDisconnect && (<Button- variant="outline"- color="red"+ variant="secondary"+ accent="danger"size="sm"onClick={onDisconnect}disabled={disabled}diff --git a/frontend/editor/src/core/components/shared/filePreview/NavigationArrows.tsx b/frontend/editor/src/core/components/shared/filePreview/NavigationArrows.tsxindex f8b416f275..28a537fd3f 100644--- a/frontend/editor/src/core/components/shared/filePreview/NavigationArrows.tsx+++ b/frontend/editor/src/core/components/shared/filePreview/NavigationArrows.tsx@@ -1,5 +1,7 @@import React from "react";-import { Box, ActionIcon } from "@mantine/core";+import { Box } from "@mantine/core";+import { useTranslation } from "react-i18next";+import { ActionIcon } from "@app/ui/ActionIcon";import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";import ChevronRightIcon from "@mui/icons-material/ChevronRight";@@ -16,6 +18,7 @@ const NavigationArrows: React.FC<NavigationArrowsProps> = ({disabled = false,children,}) => {+ const { t } = useTranslation();const navigationArrowStyle = {position: "absolute" as const,top: "50%",@@ -27,11 +30,11 @@ const NavigationArrows: React.FC<NavigationArrowsProps> = ({<Box style={{ position: "relative", width: "100%", height: "100%" }}>{/* Left Navigation Arrow */}<ActionIcon- variant="light"+ variant="secondary"size="sm"onClick={onPrevious}- color="blue"disabled={disabled}+ aria-label={t("common.previous", "Previous")}style={{...navigationArrowStyle,left: "0",@@ -55,11 +58,11 @@ const NavigationArrows: React.FC<NavigationArrowsProps> = ({{/* Right Navigation Arrow */}<ActionIcon- variant="light"+ variant="secondary"size="sm"onClick={onNext}- color="blue"disabled={disabled}+ aria-label={t("common.next", "Next")}style={{...navigationArrowStyle,right: "0",diff --git a/frontend/editor/src/core/components/shared/quickAccessBar/QuickAccessButton.tsx b/frontend/editor/src/core/components/shared/quickAccessBar/QuickAccessButton.tsxindex a047190783..9677d65618 100644--- a/frontend/editor/src/core/components/shared/quickAccessBar/QuickAccessButton.tsx+++ b/frontend/editor/src/core/components/shared/quickAccessBar/QuickAccessButton.tsx@@ -1,5 +1,5 @@import React from "react";-import { ActionIcon } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import FitText from "@app/components/shared/FitText";interface QuickAccessButtonProps {@@ -48,7 +48,7 @@ const QuickAccessButton: React.FC<QuickAccessButtonProps> = ({const actionIconProps =component === "a" && href? {- component: "a" as const,+ as: "a" as const,href,onClick,"aria-label": ariaLabel,@@ -63,7 +63,7 @@ const QuickAccessButton: React.FC<QuickAccessButtonProps> = ({<ActionIcon{...actionIconProps}size={buttonSize}- variant="subtle"+ variant="tertiary"disabled={disabled}style={{backgroundColor: bgColor,diff --git a/frontend/editor/src/core/components/shared/signing/SharedSigningLauncher.tsx b/frontend/editor/src/core/components/shared/signing/SharedSigningLauncher.tsxindex c8415b3127..a40313da37 100644--- a/frontend/editor/src/core/components/shared/signing/SharedSigningLauncher.tsx+++ b/frontend/editor/src/core/components/shared/signing/SharedSigningLauncher.tsx@@ -1,4 +1,5 @@-import { Badge, Button, Stack, Text } from "@mantine/core";+import { Badge, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import GroupAddOutlinedIcon from "@mui/icons-material/GroupAddOutlined";import { useGroupSigningEnabled } from "@app/hooks/useGroupSigningEnabled";@@ -35,7 +36,7 @@ export default function SharedSigningLauncher() {</Text><ButtonfullWidth- variant="light"+ variant="tertiary"leftSection={<GroupAddOutlinedIcon sx={{ fontSize: "1.1rem" }} />}rightSection={pendingCount > 0 ? (diff --git a/frontend/editor/src/core/components/shared/signing/steps/ConfigureSignatureDefaultsStep.tsx b/frontend/editor/src/core/components/shared/signing/steps/ConfigureSignatureDefaultsStep.tsxindex 901ae80732..d6685f6248 100644--- a/frontend/editor/src/core/components/shared/signing/steps/ConfigureSignatureDefaultsStep.tsx+++ b/frontend/editor/src/core/components/shared/signing/steps/ConfigureSignatureDefaultsStep.tsx@@ -1,4 +1,5 @@-import { Button, Stack, Text, Group, Paper } from "@mantine/core";+import { Stack, Text, Group, Paper } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import ArrowBackIcon from "@mui/icons-material/ArrowBack";import SignatureSettingsInput, {@@ -72,7 +73,7 @@ export const ConfigureSignatureDefaultsStep: React.FC<<Group gap="sm"><Button- variant="default"+ variant="secondary"onClick={onBack}leftSection={<ArrowBackIcon sx={{ fontSize: 16 }} />}>diff --git a/frontend/editor/src/core/components/shared/signing/steps/ReviewSessionStep.tsx b/frontend/editor/src/core/components/shared/signing/steps/ReviewSessionStep.tsxindex 66eeee0689..5e229ab9b3 100644--- a/frontend/editor/src/core/components/shared/signing/steps/ReviewSessionStep.tsx+++ b/frontend/editor/src/core/components/shared/signing/steps/ReviewSessionStep.tsx@@ -1,4 +1,5 @@-import { Button, Stack, Text, Group, Divider, TextInput } from "@mantine/core";+import { Stack, Text, Group, Divider, TextInput } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";import PeopleIcon from "@mui/icons-material/People";@@ -170,7 +171,7 @@ export const ReviewSessionStep: React.FC<ReviewSessionStepProps> = ({<Group gap="sm" mt="md"><Button- variant="default"+ variant="secondary"onClick={onBack}leftSection={<ArrowBackIcon sx={{ fontSize: 16 }} />}>@@ -179,18 +180,9 @@ export const ReviewSessionStep: React.FC<ReviewSessionStepProps> = ({<ButtononClick={onSubmit}disabled={disabled}- h="auto"style={{ flex: 1 }}leftSection={<SendIcon sx={{ fontSize: 16 }} />}- color="green"- styles={{- root: { paddingTop: 6, paddingBottom: 6 },- label: {- whiteSpace: "normal",- textAlign: "center",- lineHeight: 1.2,- },- }}+ accent="success">{t("groupSigning.steps.review.send", "Send Signing Requests")}</Button>diff --git a/frontend/editor/src/core/components/shared/signing/steps/SelectDocumentStep.tsx b/frontend/editor/src/core/components/shared/signing/steps/SelectDocumentStep.tsxindex aaedc076d3..14bd56f75c 100644--- a/frontend/editor/src/core/components/shared/signing/steps/SelectDocumentStep.tsx+++ b/frontend/editor/src/core/components/shared/signing/steps/SelectDocumentStep.tsx@@ -1,4 +1,5 @@-import { Button, Stack, Text } from "@mantine/core";+import { Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";import type { FileState } from "@app/types/file";diff --git a/frontend/editor/src/core/components/shared/signing/steps/SelectParticipantsStep.tsx b/frontend/editor/src/core/components/shared/signing/steps/SelectParticipantsStep.tsxindex 3baa15b7ba..99c0801519 100644--- a/frontend/editor/src/core/components/shared/signing/steps/SelectParticipantsStep.tsx+++ b/frontend/editor/src/core/components/shared/signing/steps/SelectParticipantsStep.tsx@@ -1,4 +1,5 @@-import { Button, Stack, Text, Group } from "@mantine/core";+import { Stack, Text, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import ArrowBackIcon from "@mui/icons-material/ArrowBack";import UserSelector from "@app/components/shared/UserSelector";@@ -53,7 +54,7 @@ export const SelectParticipantsStep: React.FC<SelectParticipantsStepProps> = ({<Group gap="sm"><Button- variant="default"+ variant="secondary"onClick={onBack}leftSection={<ArrowBackIcon sx={{ fontSize: 16 }} />}>diff --git a/frontend/editor/src/core/components/shared/wetSignature/DrawSignatureCanvas.tsx b/frontend/editor/src/core/components/shared/wetSignature/DrawSignatureCanvas.tsxindex d316dd521a..ef1cb54aa4 100644--- a/frontend/editor/src/core/components/shared/wetSignature/DrawSignatureCanvas.tsx+++ b/frontend/editor/src/core/components/shared/wetSignature/DrawSignatureCanvas.tsx@@ -1,5 +1,6 @@import { useRef, useEffect, useState } from "react";-import { Stack, Button, Group, ColorPicker, Slider, Text } from "@mantine/core";+import { Stack, Group, ColorPicker, Slider, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import DeleteIcon from "@mui/icons-material/Delete";@@ -153,8 +154,8 @@ export const DrawSignatureCanvas: React.FC<DrawSignatureCanvasProps> = ({</Group><Button- variant="light"- color="red"+ variant="secondary"+ accent="danger"leftSection={<DeleteIcon sx={{ fontSize: 16 }} />}onClick={clearCanvas}disabled={disabled || !signature}diff --git a/frontend/editor/src/core/components/shared/wetSignature/SignatureTypeSelector.tsx b/frontend/editor/src/core/components/shared/wetSignature/SignatureTypeSelector.tsxindex a0875aa7ae..7b4950f4aa 100644--- a/frontend/editor/src/core/components/shared/wetSignature/SignatureTypeSelector.tsx+++ b/frontend/editor/src/core/components/shared/wetSignature/SignatureTypeSelector.tsx@@ -1,4 +1,4 @@-import { SegmentedControl } from "@mantine/core";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";export type SignatureType = "draw" | "upload" | "type";@@ -20,11 +20,11 @@ export const SignatureTypeSelector: React.FC<SignatureTypeSelectorProps> = ({<SegmentedControlvalue={value}onChange={(val) => onChange(val as SignatureType)}- disabled={disabled}- data={[+ options={[{value: "draw",label: t("certSign.collab.signRequest.signatureType.draw", "Draw"),+ disabled,},{value: "upload",@@ -32,10 +32,12 @@ export const SignatureTypeSelector: React.FC<SignatureTypeSelectorProps> = ({"certSign.collab.signRequest.signatureType.upload","Upload",),+ disabled,},{value: "type",label: t("certSign.collab.signRequest.signatureType.type", "Type"),+ disabled,},]}fullWidthdiff --git a/frontend/editor/src/core/components/shared/wetSignature/UploadSignatureImage.tsx b/frontend/editor/src/core/components/shared/wetSignature/UploadSignatureImage.tsxindex 49d4c22ca4..2318b14cd1 100644--- a/frontend/editor/src/core/components/shared/wetSignature/UploadSignatureImage.tsx+++ b/frontend/editor/src/core/components/shared/wetSignature/UploadSignatureImage.tsx@@ -1,5 +1,6 @@import { useState, useRef } from "react";-import { Stack, Button, Text, Image } from "@mantine/core";+import { Stack, Text, Image } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import UploadFileIcon from "@mui/icons-material/UploadFile";import DeleteIcon from "@mui/icons-material/Delete";@@ -100,8 +101,8 @@ export const UploadSignatureImage: React.FC<UploadSignatureImageProps> = ({</div><Button- variant="light"- color="red"+ variant="secondary"+ accent="danger"leftSection={<DeleteIcon sx={{ fontSize: 16 }} />}onClick={handleClear}disabled={disabled}@@ -112,7 +113,7 @@ export const UploadSignatureImage: React.FC<UploadSignatureImageProps> = ({</Stack>) : (<Button- variant="outline"+ variant="secondary"leftSection={<UploadFileIcon sx={{ fontSize: 16 }} />}onClick={handleUploadClick}disabled={disabled}diff --git a/frontend/editor/src/core/components/toast/ToastRenderer.tsx b/frontend/editor/src/core/components/toast/ToastRenderer.tsxindex c13010e279..df2a871a5a 100644--- a/frontend/editor/src/core/components/toast/ToastRenderer.tsx+++ b/frontend/editor/src/core/components/toast/ToastRenderer.tsx@@ -3,6 +3,8 @@ import { useTranslation } from "react-i18next";import { useToast } from "@app/components/toast/ToastContext";import { ToastInstance, ToastLocation } from "@app/components/toast/types";import { LocalIcon } from "@app/components/shared/LocalIcon";+import { ActionIcon } from "@app/ui/ActionIcon";+import { Button } from "@app/ui/Button";import "@app/components/toast/ToastRenderer.css";const locationToClass: Record<ToastLocation, string> = {@@ -99,7 +101,8 @@ export default function ToastRenderer() {{/* Controls */}<div className="toast-controls">{t.expandable && (- <button+ <ActionIcon+ variant="tertiary"aria-label={translate("toast.toggleDetails","Toggle details",@@ -113,15 +116,16 @@ export default function ToastRenderer() {className={`toast-button toast-expand-button ${t.isExpanded ? "toast-expand-button--expanded" : ""}`}><LocalIcon icon="expand-more-rounded" />- </button>+ </ActionIcon>)}- <button+ <ActionIcon+ variant="tertiary"aria-label={translate("toast.dismiss", "Dismiss")}onClick={() => dismiss(t.id)}className="toast-button">- <LocalIcon icon="close" width={20} height={20} />- </button>+ ×+ </ActionIcon></div></div>{/* Progress bar - always show when present */}@@ -142,12 +146,12 @@ export default function ToastRenderer() {{/* Button - always show when present, positioned below body */}{t.buttonText && t.buttonCallback && (<div className="toast-action-container">- <button+ <ButtononClick={t.buttonCallback}className={getActionButtonClass(t)}>{t.buttonText}- </button>+ </Button></div>)}</div>diff --git a/frontend/editor/src/core/components/tools/RightSidebar.tsx b/frontend/editor/src/core/components/tools/RightSidebar.tsxindex 7e3aa04629..4333e263f1 100644--- a/frontend/editor/src/core/components/tools/RightSidebar.tsx+++ b/frontend/editor/src/core/components/tools/RightSidebar.tsx@@ -1,5 +1,4 @@import { useMemo, useState } from "react";-import { ActionIcon } from "@mantine/core";import { useTranslation } from "react-i18next";import { useToolWorkflow } from "@app/contexts/ToolWorkflowContext";import { useSidebarContext } from "@app/contexts/SidebarContext";@@ -21,6 +20,7 @@ import type { SubcategoryGroup } from "@app/hooks/useToolSections";import { ToolIcon } from "@app/components/shared/ToolIcon";import { ToolPanelHeader } from "@app/components/shared/ToolPanelHeader";import { Tooltip as AppTooltip } from "@app/components/shared/Tooltip";+import { ActionIcon } from "@app/ui/ActionIcon";import { withViewTransition } from "@app/utils/viewTransition";import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";import ChevronRightIcon from "@mui/icons-material/ChevronRight";@@ -224,13 +224,13 @@ export default function RightSidebar() {<div className="tool-panel__collapsed-strip"><div className="tool-panel__collapsed-top"><ActionIcon- variant="outline"- color="gray.4"- radius="xl"+ aria-label={t("toolPanel.expand", "Expand panel")}+ variant="secondary"+ accent="neutral"size="md"+ shape="circle"className="tool-panel__expand-btn tool-panel__toggle-vt"onClick={handleExpand}- aria-label={t("toolPanel.expand", "Expand panel")}><ChevronLeftIcon sx={{ fontSize: "1.1rem" }} /></ActionIcon>@@ -248,18 +248,18 @@ export default function RightSidebar() {arrowdelay={300}>- <button- type="button"+ <ActionIcon+ aria-label={tool.name}+ variant="tertiary"className="tool-panel__collapsed-tool-btn"data-selected={selectedToolKey === id}onClick={() => {handleExpand();handleToolSelectWithTransition(id);}}- aria-label={tool.name}><ToolIcon icon={tool.icon} marginRight="0" />- </button>+ </ActionIcon></AppTooltip>))}</div>@@ -322,10 +322,9 @@ export default function RightSidebar() {) : null}{showCloseButton ? (<ActionIcon- variant="subtle"- color="gray"- radius="xl"+ variant="tertiary"size="md"+ shape="circle"onClick={handleHeaderBack}aria-label={inToolView@@ -338,9 +337,9 @@ export default function RightSidebar() {</ActionIcon>) : (<ActionIcon- variant="outline"- radius="xl"+ variant="secondary"size="md"+ shape="circle"onClick={handleCollapse}aria-label={t("toolPanel.collapse", "Collapse panel")}className="tool-panel__expand-btn tool-panel__toggle-vt"@@ -355,11 +354,11 @@ export default function RightSidebar() {<PoliciesSectionleadingControl={<ActionIcon- variant="outline"- radius="xl"+ aria-label={t("toolPanel.collapse", "Collapse panel")}+ variant="secondary"size="md"+ shape="circle"onClick={handleCollapse}- aria-label={t("toolPanel.collapse", "Collapse panel")}className="tool-panel__expand-btn tool-panel__toggle-vt"><ChevronRightIcon sx={{ fontSize: "1.1rem" }} />diff --git a/frontend/editor/src/core/components/tools/ToolPanel.css b/frontend/editor/src/core/components/tools/ToolPanel.cssindex e5949e365a..a8ad41588f 100644--- a/frontend/editor/src/core/components/tools/ToolPanel.css+++ b/frontend/editor/src/core/components/tools/ToolPanel.css@@ -130,6 +130,7 @@width 0.3s ease,max-width 0.3s ease;view-transition-name: tool-rail;+ user-select: none;}.tool-panel__collapsed-strip {diff --git a/frontend/editor/src/core/components/tools/ToolPanelModePrompt.tsx b/frontend/editor/src/core/components/tools/ToolPanelModePrompt.tsxindex 3e3f072b69..f7f69ad2e7 100644--- a/frontend/editor/src/core/components/tools/ToolPanelModePrompt.tsx+++ b/frontend/editor/src/core/components/tools/ToolPanelModePrompt.tsx@@ -1,6 +1,7 @@import { useEffect, useState } from "react";-import { Badge, Button, Card, Group, Modal, Stack, Text } from "@mantine/core";+import { Badge, Card, Group, Modal, Stack, Text } from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";import { useToolWorkflow } from "@app/contexts/ToolWorkflowContext";import { usePreferences } from "@app/contexts/PreferencesContext";import "@app/components/tools/ToolPanelModePrompt.css";@@ -122,9 +123,6 @@ const ToolPanelModePrompt = ({</div></div><Button- variant={toolPanelMode === "sidebar" ? "filled" : "light"}- color="blue"- radius="md"className="tool-panel-mode-prompt__action"onClick={() => handleSelect("sidebar")}>@@ -174,9 +172,6 @@ const ToolPanelModePrompt = ({</div></div><Button- variant={toolPanelMode === "fullscreen" ? "filled" : "outline"}- color="blue"- radius="md"className="tool-panel-mode-prompt__action"onClick={() => handleSelect("fullscreen")}>@@ -189,9 +184,7 @@ const ToolPanelModePrompt = ({</Card></div><Button- variant="subtle"- color="gray"- radius="md"+ variant="tertiary"className="tool-panel-mode-prompt__maybe-later"onClick={handleDismiss}>diff --git a/frontend/editor/src/core/components/tools/ToolPanelViewerBar.tsx b/frontend/editor/src/core/components/tools/ToolPanelViewerBar.tsxindex 5e01b4f711..f67499aed5 100644--- a/frontend/editor/src/core/components/tools/ToolPanelViewerBar.tsx+++ b/frontend/editor/src/core/components/tools/ToolPanelViewerBar.tsx@@ -1,5 +1,5 @@import React, { useCallback } from "react";-import { ActionIcon } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useWorkbenchBar } from "@app/contexts/WorkbenchBarContext";import { useNavigationState } from "@app/contexts/NavigationContext";import { Tooltip } from "@app/components/shared/Tooltip";@@ -49,13 +49,11 @@ export function ToolPanelViewerBar() {(typeof btn.tooltip === "string" ? btn.tooltip : undefined);const buttonNode = (<ActionIcon- variant={isActive ? "filled" : "subtle"}- color={isActive ? "blue" : undefined}- radius="md"+ variant={isActive ? "primary" : "tertiary"}className="workbench-bar-action-icon"onClick={triggerAction}disabled={disabled}- aria-label={ariaLabel}+ aria-label={ariaLabel ?? ""}aria-pressed={isActive || undefined}>{btn.icon}diff --git a/frontend/editor/src/core/components/tools/ToolPicker.tsx b/frontend/editor/src/core/components/tools/ToolPicker.tsxindex af50c8ceab..27b0caf7d5 100644--- a/frontend/editor/src/core/components/tools/ToolPicker.tsx+++ b/frontend/editor/src/core/components/tools/ToolPicker.tsx@@ -1,6 +1,7 @@import React, { useMemo, useRef } from "react";-import { Box, Button, Stack } from "@mantine/core";+import { Box, Stack } from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";import { ToolRegistryEntry } from "@app/data/toolsTaxonomy";import "@app/components/tools/toolPicker/ToolPicker.css";import { useToolSections } from "@app/hooks/useToolSections";@@ -33,7 +34,7 @@ const EMPTY_FILTERED_TOOLS: ToolPickerProps["filteredTools"] = [];const HEADER_TEXT_STYLE: React.CSSProperties = {fontSize: "0.68rem",fontWeight: 600,- padding: "1rem 0 0.35rem 0.5rem",+ padding: "0.25rem 0 0.35rem 0.5rem",textTransform: "uppercase",letterSpacing: "0.06em",color: "var(--text-muted)",@@ -182,7 +183,7 @@ const ToolPicker = ({)}{onShowAllTools && (<Button- variant="subtle"+ variant="tertiary"size="sm"fullWidthonClick={onShowAllTools}diff --git a/frontend/editor/src/core/components/tools/addAttachments/AddAttachmentsSettings.tsx b/frontend/editor/src/core/components/tools/addAttachments/AddAttachmentsSettings.tsxindex 4eaca5caa6..73b42bd446 100644--- a/frontend/editor/src/core/components/tools/addAttachments/AddAttachmentsSettings.tsx+++ b/frontend/editor/src/core/components/tools/addAttachments/AddAttachmentsSettings.tsx@@ -3,21 +3,12 @@** Allows selecting files to attach to PDFs with optional PDF/A-3b conversion support.*/--import {- Stack,- Text,- Group,- ActionIcon,- ScrollArea,- Button,- Checkbox,-} from "@mantine/core";+import { Stack, Text, Group, ScrollArea, Checkbox } from "@mantine/core";import { useTranslation } from "react-i18next";import { AddAttachmentsParameters } from "@app/hooks/tools/addAttachments/useAddAttachmentsParameters";import LocalIcon from "@app/components/shared/LocalIcon";import { Tooltip } from "@app/components/shared/Tooltip";-+import { Button as DSButton } from "@app/ui/Button";interface AddAttachmentsSettingsProps {parameters: AddAttachmentsParameters;onParameterChange: <K extends keyof AddAttachmentsParameters>(@@ -55,10 +46,9 @@ const AddAttachmentsSettings = ({style={{ display: "none" }}id="attachments-input"/>- <Button- size="xs"- color="blue"- component="label"+ <DSButton+ size="sm"+ as="label"htmlFor="attachments-input"disabled={disabled}leftSection={<LocalIcon icon="add" width="14" height="14" />}@@ -66,7 +56,7 @@ const AddAttachmentsSettings = ({{parameters.attachments?.length > 0? t("AddAttachmentsRequest.addMoreFiles", "Add more files..."): t("AddAttachmentsRequest.placeholder", "Choose files...")}- </Button>+ </DSButton></Stack>{parameters.attachments?.length > 0 && (@@ -120,10 +110,17 @@ const AddAttachmentsSettings = ({({(file.size / 1024).toFixed(1)} KB)</Text></Group>- <ActionIcon+ <DSButton+ leftSection={+ <LocalIcon icon="close-rounded" width="14" height="14" />+ }+ aria-label={t(+ "AddAttachmentsRequest.removeFile",+ "Remove file",+ )}size="sm"- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"style={{ flexShrink: 0 }}onClick={() => {const newAttachments = (@@ -132,9 +129,7 @@ const AddAttachmentsSettings = ({onParameterChange("attachments", newAttachments);}}disabled={disabled}- >- <LocalIcon icon="close-rounded" width="14" height="14" />- </ActionIcon>+ /></Group>))}</Stack>diff --git a/frontend/editor/src/core/components/tools/addPageNumbers/PageNumberPreview.tsx b/frontend/editor/src/core/components/tools/addPageNumbers/PageNumberPreview.tsxindex 37247c863f..fe92d1ff42 100644--- a/frontend/editor/src/core/components/tools/addPageNumbers/PageNumberPreview.tsx+++ b/frontend/editor/src/core/components/tools/addPageNumbers/PageNumberPreview.tsx@@ -5,6 +5,7 @@ import { pdfWorkerManager } from "@app/services/pdfWorkerManager";import { useThumbnailGeneration } from "@app/hooks/useThumbnailGeneration";import styles from "@app/components/tools/addPageNumbers/PageNumberPreview.module.css";import { PrivateContent } from "@app/components/shared/PrivateContent";+import { Button } from "@app/ui/Button";// Simple utilities for page numbers (adapted from stamp)const A4_ASPECT_RATIO = 0.707;@@ -256,9 +257,9 @@ export default function PageNumberPreview({const idx = (i + 1) as 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;const selected = parameters.position === idx;return (- <button+ <Button+ variant="tertiary"key={idx}- type="button"className={`${styles.gridTile} ${selected || hoverTile === idx ? styles.gridTileSelected : ""} ${hoverTile === idx ? styles.gridTileHovered : ""}`}onClick={() =>onParameterChange(@@ -277,7 +278,7 @@ export default function PageNumberPreview({}}>{idx}- </button>+ </Button>);})}</div>diff --git a/frontend/editor/src/core/components/tools/addStamp/StampPositionFormattingSettings.tsx b/frontend/editor/src/core/components/tools/addStamp/StampPositionFormattingSettings.tsxindex 7912cd0bcd..76f8be4109 100644--- a/frontend/editor/src/core/components/tools/addStamp/StampPositionFormattingSettings.tsx+++ b/frontend/editor/src/core/components/tools/addStamp/StampPositionFormattingSettings.tsx@@ -4,7 +4,6 @@ import {Select,Stack,ColorInput,- Button,Slider,Text,NumberInput,@@ -13,6 +12,8 @@ import { AddStampParameters } from "@app/components/tools/addStamp/useAddStampPaimport LocalIcon from "@app/components/shared/LocalIcon";import styles from "@app/components/tools/addStamp/StampPreview.module.css";import { Tooltip } from "@app/components/shared/Tooltip";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { Z_INDEX_AUTOMATE_DROPDOWN } from "@app/styles/zIndex";interface StampPositionFormattingSettingsProps {@@ -55,7 +56,7 @@ const StampPositionFormattingSettings = ({return (<Buttonkey={idx}- variant={selected ? "filled" : "outline"}+ variant={selected ? "primary" : "secondary"}onClick={() => {onParameterChange("position", idx);// Ensure we're using grid positioning, not custom overrides@@ -63,11 +64,9 @@ const StampPositionFormattingSettings = ({onParameterChange("overrideY", -1 as any);}}disabled={disabled}- styles={{- root: {- height: "50px",- padding: "0",- },+ style={{+ height: "50px",+ padding: 0,}}>{idx}@@ -83,9 +82,10 @@ const StampPositionFormattingSettings = ({content={t("AddStampRequest.rotation", "Rotation")}position="top">- <Button+ <ActionIcon+ aria-label={t("AddStampRequest.rotation", "Rotation")}variant={- parameters._activePill === "rotation" ? "filled" : "outline"+ parameters._activePill === "rotation" ? "primary" : "secondary"}className="flex-1"onClick={() => onParameterChange("_activePill", "rotation")}@@ -95,21 +95,22 @@ const StampPositionFormattingSettings = ({width="1.1rem"height="1.1rem"/>- </Button>+ </ActionIcon></Tooltip><Tooltipcontent={t("AddStampRequest.opacity", "Opacity")}position="top">- <Button+ <ActionIcon+ aria-label={t("AddStampRequest.opacity", "Opacity")}variant={- parameters._activePill === "opacity" ? "filled" : "outline"+ parameters._activePill === "opacity" ? "primary" : "secondary"}className="flex-1"onClick={() => onParameterChange("_activePill", "opacity")}><LocalIcon icon="opacity" width="1.1rem" height="1.1rem" />- </Button>+ </ActionIcon></Tooltip><Tooltipcontent={@@ -119,9 +120,14 @@ const StampPositionFormattingSettings = ({}position="top">- <Button+ <ActionIcon+ aria-label={+ parameters.stampType === "image"+ ? t("AddStampRequest.imageSize", "Image Size")+ : t("AddStampRequest.fontSize", "Font Size")+ }variant={- parameters._activePill === "fontSize" ? "filled" : "outline"+ parameters._activePill === "fontSize" ? "primary" : "secondary"}className="flex-1"onClick={() => onParameterChange("_activePill", "fontSize")}@@ -131,7 +137,7 @@ const StampPositionFormattingSettings = ({width="1.1rem"height="1.1rem"/>- </Button>+ </ActionIcon></Tooltip></div>diff --git a/frontend/editor/src/core/components/tools/addStamp/StampPreview.tsx b/frontend/editor/src/core/components/tools/addStamp/StampPreview.tsxindex 9659c4317a..88f2d72f6c 100644--- a/frontend/editor/src/core/components/tools/addStamp/StampPreview.tsx+++ b/frontend/editor/src/core/components/tools/addStamp/StampPreview.tsx@@ -11,6 +11,7 @@ import {} from "@app/components/tools/addStamp/StampPreviewUtils";import styles from "@app/components/tools/addStamp/StampPreview.module.css";import { PrivateContent } from "@app/components/shared/PrivateContent";+import { Button } from "@app/ui/Button";type Props = {parameters: AddStampParameters;@@ -429,9 +430,9 @@ export default function StampPreview({parameters.position === idx &&(parameters.overrideX < 0 || parameters.overrideY < 0);return (- <button+ <Button+ variant="tertiary"key={idx}- type="button"className={`${styles.gridTile} ${selected || hoverTile === idx ? styles.gridTileSelected : ""} ${hoverTile === idx ? styles.gridTileHovered : ""}`}onClick={() => {// Clear overrides to use grid positioning and set position@@ -443,7 +444,7 @@ export default function StampPreview({onMouseLeave={() => setHoverTile(null)}>{idx}- </button>+ </Button>);})}</div>diff --git a/frontend/editor/src/core/components/tools/addStamp/StampSetupSettings.tsx b/frontend/editor/src/core/components/tools/addStamp/StampSetupSettings.tsxindex 1625affa59..4c7ee96c5b 100644--- a/frontend/editor/src/core/components/tools/addStamp/StampSetupSettings.tsx+++ b/frontend/editor/src/core/components/tools/addStamp/StampSetupSettings.tsx@@ -5,7 +5,6 @@ import {Textarea,TextInput,Select,- Button,Text,Divider,Accordion,@@ -15,6 +14,7 @@ import {Box,Paper,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { AddStampParameters } from "@app/components/tools/addStamp/useAddStampParameters";import ButtonSelector from "@app/components/shared/ButtonSelector";import styles from "@app/components/tools/addStamp/StampPreview.module.css";@@ -236,7 +236,6 @@ const StampSetupSettings = ({{ value: "image", label: t("watermark.type.2", "Image") },]}disabled={disabled}- buttonClassName={styles.modeToggleButton}textClassName={styles.modeToggleButtonText}/></div>@@ -673,8 +672,8 @@ const StampSetupSettings = ({id="stamp-image-input"/><Button- size="xs"- component="label"+ size="sm"+ as="label"htmlFor="stamp-image-input"disabled={disabled}>diff --git a/frontend/editor/src/core/components/tools/adjustPageScale/AdjustPageScaleSettings.tsx b/frontend/editor/src/core/components/tools/adjustPageScale/AdjustPageScaleSettings.tsxindex 4012909f2a..aeb874b58e 100644--- a/frontend/editor/src/core/components/tools/adjustPageScale/AdjustPageScaleSettings.tsx+++ b/frontend/editor/src/core/components/tools/adjustPageScale/AdjustPageScaleSettings.tsx@@ -1,4 +1,8 @@-import { Stack, NumberInput, Select, SegmentedControl } from "@mantine/core";+import { Stack, NumberInput, Select } from "@mantine/core";+import {+ SegmentedControl,+ type SegmentedOption,+} from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import {AdjustPageScaleParameters,@@ -47,14 +51,17 @@ const AdjustPageScaleSettings = ({},];- const orientationOptions = [+ const orientationDisabled = disabled || isKeepSelected;+ const orientationOptions: SegmentedOption<Orientation>[] = [{value: "PORTRAIT",label: t("adjustPageScale.orientation.portrait", "Portrait"),+ disabled: orientationDisabled,},{value: "LANDSCAPE",label: t("adjustPageScale.orientation.landscape", "Landscape"),+ disabled: orientationDisabled,},];@@ -99,8 +106,7 @@ const AdjustPageScaleSettings = ({onChange={(value) =>onParameterChange("orientation", value as Orientation)}- data={orientationOptions}- disabled={disabled || isKeepSelected}+ options={orientationOptions}fullWidth/></Stack>diff --git a/frontend/editor/src/core/components/tools/automate/AutomationCreation.tsx b/frontend/editor/src/core/components/tools/automate/AutomationCreation.tsxindex 69116e3a43..65c50a3481 100644--- a/frontend/editor/src/core/components/tools/automate/AutomationCreation.tsx+++ b/frontend/editor/src/core/components/tools/automate/AutomationCreation.tsx@@ -1,7 +1,6 @@import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";import {- Button,Text,Stack,Group,@@ -10,6 +9,7 @@ import {Divider,Modal,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { Z_INDEX_AUTOMATE_MODAL } from "@app/styles/zIndex";import CheckIcon from "@mui/icons-material/Check";import DownloadIcon from "@mui/icons-material/Download";@@ -302,16 +302,17 @@ export default function AutomationCreation({<Group gap="sm" grow><Button+ variant="secondary"leftSection={<DownloadIcon />}onClick={() => {downloadAutomationConfig(buildExportableAutomation());}}disabled={!canSaveAutomation()}- variant="light">{t("automate.creation.export", "Export")}</Button><Button+ variant="secondary"leftSection={<DownloadIcon />}onClick={() => {downloadFolderScanningConfig(@@ -320,7 +321,6 @@ export default function AutomationCreation({);}}disabled={!canSaveAutomation()}- variant="light">{t("automate.creation.exportForFolderScanning",@@ -360,10 +360,10 @@ export default function AutomationCreation({)}</Text><Group gap="md" justify="flex-end">- <Button variant="outline" onClick={handleCancelBack}>+ <Button variant="secondary" onClick={handleCancelBack}>{t("automate.creation.unsavedChanges.cancel", "Cancel")}</Button>- <Button color="red" onClick={handleConfirmBack}>+ <Button accent="danger" onClick={handleConfirmBack}>{t("automate.creation.unsavedChanges.confirm", "Go Back")}</Button></Group>diff --git a/frontend/editor/src/core/components/tools/automate/AutomationEntry.tsx b/frontend/editor/src/core/components/tools/automate/AutomationEntry.tsxindex de8c82d449..322d2d87fc 100644--- a/frontend/editor/src/core/components/tools/automate/AutomationEntry.tsx+++ b/frontend/editor/src/core/components/tools/automate/AutomationEntry.tsx@@ -1,6 +1,7 @@import React, { useState } from "react";import { useTranslation } from "react-i18next";-import { Group, Text, ActionIcon, Menu, Button, Box } from "@mantine/core";+import { Group, Text, Menu, Box } from "@mantine/core";+import { Button as SharedButton } from "@app/ui/Button";import MoreVertIcon from "@mui/icons-material/MoreVert";import EditIcon from "@mui/icons-material/Edit";import DeleteIcon from "@mui/icons-material/Delete";@@ -181,31 +182,24 @@ export default function AutomationEntry({onMouseEnter={() => setIsHovered(true)}onMouseLeave={() => setIsHovered(false)}>- <Button- variant="subtle"+ <SharedButton+ variant="tertiary"onClick={onClick}size="sm"- radius="md"fullWidth- justify="flex-start"+ justify="start"className="tool-button"- styles={{- root: {- borderRadius: 0,- color: "var(--tools-text-and-icon-color)",- overflow: "visible",- backgroundColor: shouldShowMenu- ? "var(--automation-entry-hover-bg)"- : undefined,- "&:hover": {- backgroundColor: "var(--automation-entry-hover-bg)",- },- },- label: { overflow: "visible" },+ style={{+ borderRadius: 0,+ color: "var(--tools-text-and-icon-color)",+ overflow: "visible",+ backgroundColor: shouldShowMenu+ ? "var(--automation-entry-hover-bg)"+ : undefined,}}>{buttonContent}- </Button>+ </SharedButton>{showMenu && (<Menuposition="bottom-end"@@ -214,9 +208,10 @@ export default function AutomationEntry({onClose={() => setIsMenuOpen(false)}><Menu.Target>- <ActionIcon- variant="subtle"- c="dimmed"+ <SharedButton+ leftSection={<MoreVertIcon style={{ fontSize: 20 }} />}+ variant="tertiary"+ accent="neutral"size="md"aria-label={t("automate.entryMenu.label",@@ -234,9 +229,7 @@ export default function AutomationEntry({transition: "opacity 0.2s ease",pointerEvents: shouldShowMenu ? "auto" : "none",}}- >- <MoreVertIcon style={{ fontSize: 20 }} />- </ActionIcon>+ /></Menu.Target><Menu.Dropdown>diff --git a/frontend/editor/src/core/components/tools/automate/AutomationImportModal.tsx b/frontend/editor/src/core/components/tools/automate/AutomationImportModal.tsxindex 95e85e8026..c8c20cf607 100644--- a/frontend/editor/src/core/components/tools/automate/AutomationImportModal.tsx+++ b/frontend/editor/src/core/components/tools/automate/AutomationImportModal.tsx@@ -3,13 +3,13 @@ import { useTranslation } from "react-i18next";import {Alert,Badge,- Button,Group,Modal,Stack,Text,Textarea,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { Dropzone } from "@mantine/dropzone";import UploadFileIcon from "@mui/icons-material/UploadFile";import { Z_INDEX_AUTOMATE_MODAL } from "@app/styles/zIndex";@@ -218,7 +218,7 @@ export default function AutomationImportModal({)}<Group gap="sm" justify="flex-end">- <Button variant="subtle" onClick={onCancel} disabled={submitting}>+ <Button variant="tertiary" onClick={onCancel} disabled={submitting}>{t("automate.importModal.cancel", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/core/components/tools/automate/AutomationRun.tsx b/frontend/editor/src/core/components/tools/automate/AutomationRun.tsxindex 3e3a4c0756..e59996ab8f 100644--- a/frontend/editor/src/core/components/tools/automate/AutomationRun.tsx+++ b/frontend/editor/src/core/components/tools/automate/AutomationRun.tsx@@ -1,14 +1,7 @@import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import {- Button,- Text,- Stack,- Group,- Card,- Progress,- Loader,-} from "@mantine/core";+import { Text, Stack, Group, Card, Progress, Loader } from "@mantine/core";+import { Button } from "@app/ui/Button";import PlayArrowIcon from "@mui/icons-material/PlayArrow";import CheckIcon from "@mui/icons-material/Check";import { useViewScopedFiles } from "@app/hooks/tools/shared/useViewScopedFiles";@@ -248,7 +241,7 @@ export default function AutomationRun({</Button>{hasResults && (- <Button variant="light" onClick={onComplete}>+ <Button variant="secondary" onClick={onComplete}>{t("automate.sequence.finish", "Finish")}</Button>)}diff --git a/frontend/editor/src/core/components/tools/automate/IconSelector.tsx b/frontend/editor/src/core/components/tools/automate/IconSelector.tsxindex cd67d1487f..1b0909cbc0 100644--- a/frontend/editor/src/core/components/tools/automate/IconSelector.tsx+++ b/frontend/editor/src/core/components/tools/automate/IconSelector.tsx@@ -1,14 +1,7 @@import React, { useState } from "react";import { useTranslation } from "react-i18next";-import {- Box,- Text,- Stack,- Button,- SimpleGrid,- Tooltip,- Popover,-} from "@mantine/core";+import { Box, Text, Stack, SimpleGrid, Tooltip, Popover } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";import { iconMap, iconOptions } from "@app/components/tools/automate/iconMap";import { Z_INDEX_AUTOMATE_DROPDOWN } from "@app/styles/zIndex";@@ -58,12 +51,13 @@ export default function IconSelector({zIndex={Z_INDEX_AUTOMATE_DROPDOWN}><Popover.Target>- <Button- variant="outline"+ <ActionIcon+ variant="secondary"size={size}+ aria-label={t("automate.creation.icon.label", "Icon")}onClick={() => setIsDropdownOpen(!isDropdownOpen)}style={{- width: size === "sm" ? "3.75rem" : "4.375rem",+ width: size === "sm" ? "2.5rem" : "3rem",position: "relative",display: "flex",justifyContent: "flex-start",@@ -84,7 +78,7 @@ export default function IconSelector({transform: "translateY(-50%)",}}/>- </Button>+ </ActionIcon></Popover.Target><Popover.Dropdown>diff --git a/frontend/editor/src/core/components/tools/automate/ToolConfigurationModal.tsx b/frontend/editor/src/core/components/tools/automate/ToolConfigurationModal.tsxindex b70f6b925e..93631e087c 100644--- a/frontend/editor/src/core/components/tools/automate/ToolConfigurationModal.tsx+++ b/frontend/editor/src/core/components/tools/automate/ToolConfigurationModal.tsx@@ -1,15 +1,7 @@import { Suspense, useState, useEffect } from "react";import { useTranslation } from "react-i18next";-import {- Modal,- Title,- Button,- Group,- Stack,- Text,- Alert,- Loader,-} from "@mantine/core";+import { Modal, Title, Group, Stack, Text, Alert, Loader } from "@mantine/core";+import { Button } from "@app/ui/Button";import { Z_INDEX_AUTOMATE_MODAL } from "@app/styles/zIndex";import SettingsIcon from "@mui/icons-material/Settings";import CheckIcon from "@mui/icons-material/Check";@@ -125,7 +117,7 @@ export default function ToolConfigurationModal({<Group justify="flex-end" gap="sm"><Button- variant="light"+ variant="secondary"leftSection={<CloseIcon />}onClick={onCancel}>diff --git a/frontend/editor/src/core/components/tools/automate/ToolList.tsx b/frontend/editor/src/core/components/tools/automate/ToolList.tsxindex e57e96daa3..ad67ed4aa9 100644--- a/frontend/editor/src/core/components/tools/automate/ToolList.tsx+++ b/frontend/editor/src/core/components/tools/automate/ToolList.tsx@@ -1,6 +1,7 @@import React from "react";import { useTranslation } from "react-i18next";-import { Text, Stack, Group, ActionIcon } from "@mantine/core";+import { Text, Stack, Group } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import SettingsIcon from "@mui/icons-material/Settings";import CloseIcon from "@mui/icons-material/Close";import AddCircleOutline from "@mui/icons-material/AddCircleOutlined";@@ -75,17 +76,23 @@ export default function ToolList({tool.operation && !tool.configured ? "0" : "1px",}}>- {/* Delete X in top right - only show for tools after the first 2 */}+ {/* Delete X - centered vertically, anchored right */}{index > 1 && (<ActionIcon- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"+ hover={false}onClick={() => onToolRemove(index)}+ aria-label={t(+ "automate.creation.tools.remove",+ "Remove tool",+ )}title={t("automate.creation.tools.remove", "Remove tool")}style={{position: "absolute",- top: "4px",- right: "4px",+ top: "50%",+ right: "8px",+ transform: "translateY(-50%)",zIndex: 1,color: "var(--mantine-color-gray-6)",}}@@ -94,7 +101,7 @@ export default function ToolList({</ActionIcon>)}- <div style={{ paddingRight: "1.25rem" }}>+ <div>{/* Tool Selection Dropdown with inline settings cog */}<Group gap="xs" align="center" wrap="nowrap"><div style={{ flex: 1, minWidth: 0 }}>@@ -113,9 +120,13 @@ export default function ToolList({{/* Settings cog - only show if tool is selected, aligned right */}{tool.operation && (<ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={() => onToolConfigure(index)}+ aria-label={t(+ "automate.creation.tools.configure",+ "Configure tool",+ )}title={t("automate.creation.tools.configure","Configure tool",diff --git a/frontend/editor/src/core/components/tools/bookletImposition/BookletImpositionSettings.tsx b/frontend/editor/src/core/components/tools/bookletImposition/BookletImpositionSettings.tsxindex 5c2c5059d3..fab1f3ff5e 100644--- a/frontend/editor/src/core/components/tools/bookletImposition/BookletImpositionSettings.tsx+++ b/frontend/editor/src/core/components/tools/bookletImposition/BookletImpositionSettings.tsx@@ -5,10 +5,10 @@ import {Text,Divider,Collapse,- Button,NumberInput,Checkbox,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { BookletImpositionParameters } from "@app/hooks/tools/bookletImposition/useBookletImpositionParameters";import ButtonSelector from "@app/components/shared/ButtonSelector";@@ -117,7 +117,7 @@ const BookletImpositionSettings = ({{/* Advanced Options */}<Stack gap="sm"><Button- variant="subtle"+ variant="tertiary"onClick={() => setAdvancedOpen(!advancedOpen)}disabled={disabled}>diff --git a/frontend/editor/src/core/components/tools/certSign/CertificateFormatSettings.tsx b/frontend/editor/src/core/components/tools/certSign/CertificateFormatSettings.tsxindex 135d564537..5be808b492 100644--- a/frontend/editor/src/core/components/tools/certSign/CertificateFormatSettings.tsx+++ b/frontend/editor/src/core/components/tools/certSign/CertificateFormatSettings.tsx@@ -1,4 +1,5 @@-import { Stack, Button } from "@mantine/core";+import { Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { CertSignParameters } from "@app/hooks/tools/certSign/useCertSignParameters";interface CertificateFormatSettingsProps {@@ -18,10 +19,7 @@ const CertificateFormatSettings = ({{/* First row - PKCS#12 and PFX */}<div style={{ display: "flex", gap: "4px" }}><Button- variant={parameters.certType === "PKCS12" ? "filled" : "outline"}- color={- parameters.certType === "PKCS12" ? "blue" : "var(--text-muted)"- }+ variant={parameters.certType === "PKCS12" ? "primary" : "secondary"}onClick={() => onParameterChange("certType", "PKCS12")}disabled={disabled}style={{@@ -42,8 +40,7 @@ const CertificateFormatSettings = ({</div></Button><Button- variant={parameters.certType === "PFX" ? "filled" : "outline"}- color={parameters.certType === "PFX" ? "blue" : "var(--text-muted)"}+ variant={parameters.certType === "PFX" ? "primary" : "secondary"}onClick={() => onParameterChange("certType", "PFX")}disabled={disabled}style={{@@ -67,8 +64,7 @@ const CertificateFormatSettings = ({{/* Second row - PEM and JKS */}<div style={{ display: "flex", gap: "4px" }}><Button- variant={parameters.certType === "PEM" ? "filled" : "outline"}- color={parameters.certType === "PEM" ? "blue" : "var(--text-muted)"}+ variant={parameters.certType === "PEM" ? "primary" : "secondary"}onClick={() => onParameterChange("certType", "PEM")}disabled={disabled}style={{@@ -89,8 +85,7 @@ const CertificateFormatSettings = ({</div></Button><Button- variant={parameters.certType === "JKS" ? "filled" : "outline"}- color={parameters.certType === "JKS" ? "blue" : "var(--text-muted)"}+ variant={parameters.certType === "JKS" ? "primary" : "secondary"}onClick={() => onParameterChange("certType", "JKS")}disabled={disabled}style={{diff --git a/frontend/editor/src/core/components/tools/certSign/CertificateSelector.tsx b/frontend/editor/src/core/components/tools/certSign/CertificateSelector.tsxindex be2f1d6102..0c09b8c5e6 100644--- a/frontend/editor/src/core/components/tools/certSign/CertificateSelector.tsx+++ b/frontend/editor/src/core/components/tools/certSign/CertificateSelector.tsx@@ -1,12 +1,5 @@-import {- Stack,- Radio,- Divider,- TextInput,- Text,- Group,- Button,-} from "@mantine/core";+import { Stack, Radio, Divider, TextInput, Text, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useEffect } from "react";import { useAppConfig } from "@app/contexts/AppConfigContext";@@ -158,8 +151,8 @@ export const CertificateSelector: React.FC<CertificateSelectorProps> = ({{(["PKCS12", "PFX", "PEM", "JKS"] as UploadFormat[]).map((fmt) => (<Buttonkey={fmt}- size="xs"- variant={uploadFormat === fmt ? "filled" : "light"}+ size="sm"+ variant={uploadFormat === fmt ? "primary" : "secondary"}onClick={() => handleFormatChange(fmt)}disabled={disabled}>diff --git a/frontend/editor/src/core/components/tools/certSign/CertificateTypeSettings.tsx b/frontend/editor/src/core/components/tools/certSign/CertificateTypeSettings.tsxindex a64474b7b8..4311c5f6ca 100644--- a/frontend/editor/src/core/components/tools/certSign/CertificateTypeSettings.tsx+++ b/frontend/editor/src/core/components/tools/certSign/CertificateTypeSettings.tsx@@ -1,5 +1,6 @@+import { Button } from "@app/ui/Button";import { useEffect } from "react";-import { Stack, Button } from "@mantine/core";+import { Stack } from "@mantine/core";import { useTranslation } from "react-i18next";import { CertSignParameters } from "@app/hooks/tools/certSign/useCertSignParameters";import { useAppConfig } from "@app/contexts/AppConfigContext";@@ -17,11 +18,6 @@ const sourceButtonStyle = {fontSize: "11px",} as const;-// Let labels wrap instead of clipping ("This device" was truncating to "This devi").-const sourceButtonStyles = {- label: { whiteSpace: "normal" as const, lineHeight: 1.15 },-} as const;-const CertificateTypeSettings = ({parameters,onParameterChange,@@ -73,45 +69,52 @@ const CertificateTypeSettings = ({onParameterChange("alias", undefined);};+ const hasAlternativeSources =+ isServerCertificateEnabled || isHardwareAvailable;++ if (!hasAlternativeSources) {+ return (+ <Stack gap="md">+ <div style={{ color: "var(--text-muted)", fontSize: "11px" }}>+ {t(+ "certSign.source.noOtherSources",+ "No other certificate sources are available.",+ )}+ </div>+ </Stack>+ );+ }+return (<Stack gap="md"><div style={{ display: "flex", gap: "4px" }}><Button- variant={parameters.signMode === "MANUAL" ? "filled" : "outline"}- color={- parameters.signMode === "MANUAL" ? "blue" : "var(--text-muted)"- }+ variant={parameters.signMode === "MANUAL" ? "primary" : "secondary"}+ accent={parameters.signMode === "MANUAL" ? "default" : "neutral"}onClick={selectUpload}disabled={disabled}style={sourceButtonStyle}- styles={sourceButtonStyles}>{t("certSign.source.upload", "Upload")}</Button>{isServerCertificateEnabled && (<Button- variant={parameters.signMode === "AUTO" ? "filled" : "outline"}- color={- parameters.signMode === "AUTO" ? "green" : "var(--text-muted)"- }+ variant={parameters.signMode === "AUTO" ? "primary" : "secondary"}+ accent={parameters.signMode === "AUTO" ? "default" : "neutral"}onClick={selectServer}disabled={disabled}style={sourceButtonStyle}- styles={sourceButtonStyles}>{t("certSign.source.server", "Server")}</Button>)}{isHardwareAvailable && (<Button- variant={parameters.signMode === "DEVICE" ? "filled" : "outline"}- color={- parameters.signMode === "DEVICE" ? "teal" : "var(--text-muted)"- }+ variant={parameters.signMode === "DEVICE" ? "primary" : "secondary"}+ accent={parameters.signMode === "DEVICE" ? "default" : "neutral"}onClick={selectDevice}disabled={disabled}style={sourceButtonStyle}- styles={sourceButtonStyles}>{t("certSign.source.device", "This device")}</Button>diff --git a/frontend/editor/src/core/components/tools/certSign/HardwareCertificateSettings.tsx b/frontend/editor/src/core/components/tools/certSign/HardwareCertificateSettings.tsxindex 820636af35..b384ce8d5c 100644--- a/frontend/editor/src/core/components/tools/certSign/HardwareCertificateSettings.tsx+++ b/frontend/editor/src/core/components/tools/certSign/HardwareCertificateSettings.tsx@@ -1,7 +1,6 @@import { useCallback, useEffect, useState } from "react";import {Alert,- Button,Group,Loader,NumberInput,@@ -10,6 +9,7 @@ import {Text,TextInput,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { CertSignParameters } from "@app/hooks/tools/certSign/useCertSignParameters";import {@@ -284,22 +284,34 @@ const HardwareCertificateSettings = ({{supported.windows && supported.pkcs11 && (<div style={{ display: "flex", gap: "4px" }}><Button- variant={isWindowsStore ? "filled" : "outline"}- color={isWindowsStore ? "teal" : "var(--text-muted)"}+ variant={isWindowsStore ? "primary" : "secondary"}+ accent={isWindowsStore ? "success" : "default"}onClick={() => selectKind("WINDOWS_STORE")}disabled={disabled || loading}- style={{ flex: 1, fontSize: "11px", minHeight: 40, height: "auto" }}- styles={{ label: { whiteSpace: "normal", lineHeight: 1.15 } }}+ style={{+ flex: 1,+ fontSize: "11px",+ minHeight: 40,+ height: "auto",+ whiteSpace: "normal",+ lineHeight: 1.15,+ }}>{t("certSign.format.windowsStore", "Windows certificate store")}</Button><Button- variant={!isWindowsStore ? "filled" : "outline"}- color={!isWindowsStore ? "teal" : "var(--text-muted)"}+ variant={!isWindowsStore ? "primary" : "secondary"}+ accent={!isWindowsStore ? "success" : "default"}onClick={() => selectKind("PKCS11")}disabled={disabled || loading}- style={{ flex: 1, fontSize: "11px", minHeight: 40, height: "auto" }}- styles={{ label: { whiteSpace: "normal", lineHeight: 1.15 } }}+ style={{+ flex: 1,+ fontSize: "11px",+ minHeight: 40,+ height: "auto",+ whiteSpace: "normal",+ lineHeight: 1.15,+ }}>{t("certSign.format.pkcs11", "USB Token")}</Button>@@ -332,7 +344,7 @@ const HardwareCertificateSettings = ({)}/><Button- variant="default"+ variant="secondary"onClick={loadWindowsCerts}disabled={disabled || loading}>@@ -408,7 +420,7 @@ const HardwareCertificateSettings = ({/></Group><Button- variant="default"+ variant="secondary"onClick={loadPkcs11Certs}disabled={disabled ||diff --git a/frontend/editor/src/core/components/tools/certSign/SignatureAppearanceSettings.tsx b/frontend/editor/src/core/components/tools/certSign/SignatureAppearanceSettings.tsxindex 07387613b5..75998b1c88 100644--- a/frontend/editor/src/core/components/tools/certSign/SignatureAppearanceSettings.tsx+++ b/frontend/editor/src/core/components/tools/certSign/SignatureAppearanceSettings.tsx@@ -1,4 +1,5 @@-import { Stack, Text, Button, TextInput, NumberInput } from "@mantine/core";+import { Stack, Text, TextInput, NumberInput } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { CertSignParameters } from "@app/hooks/tools/certSign/useCertSignParameters";@@ -21,8 +22,8 @@ const SignatureAppearanceSettings = ({<Stack gap="sm"><div style={{ display: "flex", gap: "4px" }}><Button- variant={!parameters.showSignature ? "filled" : "outline"}- color={!parameters.showSignature ? "blue" : "var(--text-muted)"}+ accent={!parameters.showSignature ? "default" : "neutral"}+ variant={!parameters.showSignature ? "primary" : "secondary"}onClick={() => onParameterChange("showSignature", false)}disabled={disabled}style={{@@ -43,8 +44,8 @@ const SignatureAppearanceSettings = ({</div></Button><Button- variant={parameters.showSignature ? "filled" : "outline"}- color={parameters.showSignature ? "blue" : "var(--text-muted)"}+ accent={parameters.showSignature ? "default" : "neutral"}+ variant={parameters.showSignature ? "primary" : "secondary"}onClick={() => onParameterChange("showSignature", true)}disabled={disabled}style={{@@ -110,8 +111,8 @@ const SignatureAppearanceSettings = ({</Text><div style={{ display: "flex", gap: "4px" }}><Button- variant={!parameters.showLogo ? "filled" : "outline"}- color={!parameters.showLogo ? "blue" : "var(--text-muted)"}+ accent={!parameters.showLogo ? "default" : "neutral"}+ variant={!parameters.showLogo ? "primary" : "secondary"}onClick={() => onParameterChange("showLogo", false)}disabled={disabled}style={{@@ -132,8 +133,8 @@ const SignatureAppearanceSettings = ({</div></Button><Button- variant={parameters.showLogo ? "filled" : "outline"}- color={parameters.showLogo ? "blue" : "var(--text-muted)"}+ accent={parameters.showLogo ? "default" : "neutral"}+ variant={parameters.showLogo ? "primary" : "secondary"}onClick={() => onParameterChange("showLogo", true)}disabled={disabled}style={{diff --git a/frontend/editor/src/core/components/tools/certSign/SignatureSettingsInput.tsx b/frontend/editor/src/core/components/tools/certSign/SignatureSettingsInput.tsxindex 812d34749c..d0e7a69d2f 100644--- a/frontend/editor/src/core/components/tools/certSign/SignatureSettingsInput.tsx+++ b/frontend/editor/src/core/components/tools/certSign/SignatureSettingsInput.tsx@@ -1,11 +1,5 @@-import {- Stack,- Text,- Button,- TextInput,- NumberInput,- Switch,-} from "@mantine/core";+import { Stack, Text, TextInput, NumberInput, Switch } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";export interface SignatureSettings {@@ -49,8 +43,8 @@ const SignatureSettingsInput = ({{/* Signature Visibility */}<div style={{ display: "flex", gap: "4px" }}><Button- variant={!value.showSignature ? "filled" : "outline"}- color={!value.showSignature ? "blue" : "var(--text-muted)"}+ accent={!value.showSignature ? "default" : "neutral"}+ variant={!value.showSignature ? "primary" : "secondary"}onClick={() => handleChange("showSignature", false)}disabled={disabled}style={{@@ -67,8 +61,8 @@ const SignatureSettingsInput = ({</div></Button><Button- variant={value.showSignature ? "filled" : "outline"}- color={value.showSignature ? "blue" : "var(--text-muted)"}+ accent={value.showSignature ? "default" : "neutral"}+ variant={value.showSignature ? "primary" : "secondary"}onClick={() => handleChange("showSignature", true)}disabled={disabled}style={{diff --git a/frontend/editor/src/core/components/tools/certSign/WetSignatureInput.tsx b/frontend/editor/src/core/components/tools/certSign/WetSignatureInput.tsxindex 57c0ec27ff..f87fda19fe 100644--- a/frontend/editor/src/core/components/tools/certSign/WetSignatureInput.tsx+++ b/frontend/editor/src/core/components/tools/certSign/WetSignatureInput.tsx@@ -2,13 +2,13 @@ import { useState, useCallback, useEffect } from "react";import { useTranslation } from "react-i18next";import {Stack,- SegmentedControl,Text,Radio,FileInput,PasswordInput,Divider,} from "@mantine/core";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { DrawingCanvas } from "@app/components/annotation/shared/DrawingCanvas";import { ImageUploader } from "@app/components/annotation/shared/ImageUploader";import { TextInputWithFont } from "@app/components/annotation/shared/TextInputWithFont";@@ -241,12 +241,11 @@ const WetSignatureInput = ({onChange={(value) =>handleSignatureTypeChange(value as SignatureType)}- data={[- { label: t("sign.type.canvas", "Draw"), value: "canvas" },- { label: t("sign.type.image", "Upload"), value: "image" },- { label: t("sign.type.text", "Type"), value: "text" },+ options={[+ { label: t("sign.type.canvas", "Draw"), value: "canvas", disabled },+ { label: t("sign.type.image", "Upload"), value: "image", disabled },+ { label: t("sign.type.text", "Type"), value: "text", disabled },]}- disabled={disabled}/></Stack>diff --git a/frontend/editor/src/core/components/tools/certSign/modals/AddParticipantsFlow.tsx b/frontend/editor/src/core/components/tools/certSign/modals/AddParticipantsFlow.tsxindex f9be2f9787..b7e514d1aa 100644--- a/frontend/editor/src/core/components/tools/certSign/modals/AddParticipantsFlow.tsx+++ b/frontend/editor/src/core/components/tools/certSign/modals/AddParticipantsFlow.tsx@@ -1,5 +1,6 @@import { useState } from "react";-import { Modal, Stack, TextInput, Button, Group } from "@mantine/core";+import { Modal, Stack, TextInput, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import AddIcon from "@mui/icons-material/Add";import UserSelector from "@app/components/shared/UserSelector";@@ -74,15 +75,15 @@ export const AddParticipantsFlow: React.FC<AddParticipantsFlowProps> = ({/><Group justify="flex-end">- <Button variant="default" onClick={handleClose}>+ <Button variant="secondary" onClick={handleClose}>{t("common.cancel", "Cancel")}</Button><Button+ accent="success"onClick={handleSubmit}loading={submitting}disabled={selectedUserIds.length === 0}leftSection={<AddIcon sx={{ fontSize: 16 }} />}- color="green">{t("certSign.collab.addParticipants.add",diff --git a/frontend/editor/src/core/components/tools/certSign/modals/CertificateConfigModal.tsx b/frontend/editor/src/core/components/tools/certSign/modals/CertificateConfigModal.tsxindex 0032f186e2..f11e24596c 100644--- a/frontend/editor/src/core/components/tools/certSign/modals/CertificateConfigModal.tsx+++ b/frontend/editor/src/core/components/tools/certSign/modals/CertificateConfigModal.tsx@@ -2,12 +2,12 @@ import {Modal,Stack,Group,- Button,Text,Collapse,TextInput,Loader,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useState, useEffect, useRef } from "react";import CheckCircleIcon from "@mui/icons-material/CheckCircle";@@ -286,8 +286,8 @@ export const CertificateConfigModal: React.FC<CertificateConfigModalProps> = ({{/* Advanced Settings - Optional */}<div><Button- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"onClick={() => setShowAdvanced(!showAdvanced)}disabled={disabled || signing}style={{ marginBottom: "8px" }}@@ -331,7 +331,7 @@ export const CertificateConfigModal: React.FC<CertificateConfigModalProps> = ({</div><Group justify="space-between" wrap="wrap" mt="md">- <Button variant="default" onClick={onClose} disabled={signing}>+ <Button variant="secondary" onClick={onClose} disabled={signing}>{t("cancel", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/core/components/tools/certSign/modals/SelectSignatureModal.tsx b/frontend/editor/src/core/components/tools/certSign/modals/SelectSignatureModal.tsxindex f14e3a31e5..c12c1e5a42 100644--- a/frontend/editor/src/core/components/tools/certSign/modals/SelectSignatureModal.tsx+++ b/frontend/editor/src/core/components/tools/certSign/modals/SelectSignatureModal.tsx@@ -1,13 +1,6 @@-import {- Modal,- Stack,- Button,- Text,- Group,- Box,- ActionIcon,- UnstyledButton,-} from "@mantine/core";+import { Modal, Stack, Text, Group, Box } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import {useSavedSignatures,@@ -136,7 +129,9 @@ export const SelectSignatureModal: React.FC<SelectSignatureModalProps> = ({overflow: "hidden",}}>- <UnstyledButton+ <Button+ variant="tertiary"+ hover={false}onClick={() => {onSignatureSelected(sig);onClose();@@ -144,10 +139,10 @@ export const SelectSignatureModal: React.FC<SelectSignatureModalProps> = ({style={{ flex: 1, padding: "12px" }}>{renderSignaturePreview(sig)}- </UnstyledButton>+ </Button><ActionIcon- color="red"- variant="subtle"+ variant="tertiary"+ accent="danger"size="sm"onClick={() => removeSignature(sig.id)}aria-label={t(@@ -177,7 +172,7 @@ export const SelectSignatureModal: React.FC<SelectSignatureModalProps> = ({<Group grow><Button- variant="outline"+ variant="secondary"leftSection={<DrawIcon />}onClick={() => {onCreateNew("canvas");@@ -187,7 +182,7 @@ export const SelectSignatureModal: React.FC<SelectSignatureModalProps> = ({{t("certSign.collab.signRequest.modeTabs.draw", "Draw")}</Button><Button- variant="outline"+ variant="secondary"leftSection={<TextFieldsIcon />}onClick={() => {onCreateNew("text");@@ -197,7 +192,7 @@ export const SelectSignatureModal: React.FC<SelectSignatureModalProps> = ({{t("certSign.collab.signRequest.modeTabs.text", "Type")}</Button><Button- variant="outline"+ variant="secondary"leftSection={<ImageIcon />}onClick={() => {onCreateNew("image");diff --git a/frontend/editor/src/core/components/tools/certSign/panels/ParticipantListPanel.tsx b/frontend/editor/src/core/components/tools/certSign/panels/ParticipantListPanel.tsxindex 47c6ac008f..5045a0544e 100644--- a/frontend/editor/src/core/components/tools/certSign/panels/ParticipantListPanel.tsx+++ b/frontend/editor/src/core/components/tools/certSign/panels/ParticipantListPanel.tsx@@ -1,4 +1,5 @@-import { Stack, Text, List, Group, Badge, ActionIcon } from "@mantine/core";+import { Stack, Text, List, Group, Badge } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import CheckCircleIcon from "@mui/icons-material/CheckCircle";import PendingIcon from "@mui/icons-material/Pending";@@ -84,13 +85,17 @@ export const ParticipantListPanel: React.FC<ParticipantListPanelProps> = ({{!finalized && !isSigned && !isDeclined && (<ActionIconsize="sm"- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"onClick={() => onRemove(participant.id)}title={t("certSign.collab.sessionDetail.removeParticipant","Remove",)}+ aria-label={t(+ "certSign.collab.sessionDetail.removeParticipant",+ "Remove",+ )}><DeleteIcon sx={{ fontSize: "1rem" }} /></ActionIcon>diff --git a/frontend/editor/src/core/components/tools/certSign/panels/SessionActionsPanel.tsx b/frontend/editor/src/core/components/tools/certSign/panels/SessionActionsPanel.tsxindex 51601cfaaf..7b98bf868b 100644--- a/frontend/editor/src/core/components/tools/certSign/panels/SessionActionsPanel.tsx+++ b/frontend/editor/src/core/components/tools/certSign/panels/SessionActionsPanel.tsx@@ -1,4 +1,5 @@-import { Stack, Text, Button, Divider, Paper } from "@mantine/core";+import { Stack, Text, Divider, Paper } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import CheckCircleIcon from "@mui/icons-material/CheckCircle";import AddIcon from "@mui/icons-material/Add";@@ -57,9 +58,9 @@ export const SessionActionsPanel: React.FC<SessionActionsPanelProps> = ({<><Divider /><Button+ variant="secondary"leftSection={<AddIcon />}onClick={onAddParticipants}- variant="light"fullWidth>{t(@@ -72,7 +73,7 @@ export const SessionActionsPanel: React.FC<SessionActionsPanelProps> = ({<ButtonleftSection={<CheckCircleIcon />}- color={allSigned ? "green.6" : "orange"}+ accent={allSigned ? "success" : "warning"}fullWidthonClick={onFinalize}loading={finalizing}@@ -94,7 +95,6 @@ export const SessionActionsPanel: React.FC<SessionActionsPanelProps> = ({<><ButtonleftSection={<CheckCircleIcon />}- color="blue"fullWidthonClick={onLoadSignedPdf}loading={loadingPdf}diff --git a/frontend/editor/src/core/components/tools/certSign/panels/SessionDetailPanel.tsx b/frontend/editor/src/core/components/tools/certSign/panels/SessionDetailPanel.tsxindex 04539d39b5..3ec2a9114e 100644--- a/frontend/editor/src/core/components/tools/certSign/panels/SessionDetailPanel.tsx+++ b/frontend/editor/src/core/components/tools/certSign/panels/SessionDetailPanel.tsx@@ -1,14 +1,7 @@import { useState, useEffect } from "react";import { useTranslation } from "react-i18next";-import {- Stack,- Text,- Group,- Badge,- Button,- Divider,- Modal,-} from "@mantine/core";+import { Stack, Text, Group, Badge, Divider, Modal } from "@mantine/core";+import { Button } from "@app/ui/Button";import { alert } from "@app/components/toast";import ArrowBackIcon from "@mui/icons-material/ArrowBack";import DeleteIcon from "@mui/icons-material/Delete";@@ -159,11 +152,10 @@ export const SessionDetailPanel = ({ data }: SessionDetailPanelProps) => {<Stack gap="md" p="md" h="100%" style={{ minHeight: 0 }}><ButtonleftSection={<ArrowBackIcon fontSize="small" />}- variant="subtle"+ variant="tertiary"size="sm"onClick={onBack}- justify="flex-start"- px={6}+ justify="start"style={{ alignSelf: "flex-start" }}>{t("certSign.collab.sessionDetail.backToList", "Back to Sessions")}@@ -220,8 +212,8 @@ export const SessionDetailPanel = ({ data }: SessionDetailPanelProps) => {{!session.finalized && (<ButtonleftSection={<DeleteIcon fontSize="small" />}- color="red"- variant="light"+ accent="danger"+ variant="tertiary"fullWidthonClick={() => setDeleteModalOpen(true)}>@@ -253,10 +245,13 @@ export const SessionDetailPanel = ({ data }: SessionDetailPanelProps) => {)}</Text><Group justify="flex-end">- <Button variant="subtle" onClick={() => setDeleteModalOpen(false)}>+ <Button+ variant="tertiary"+ onClick={() => setDeleteModalOpen(false)}+ >{t("cancel", "Cancel")}</Button>- <Button color="red" onClick={handleDelete} loading={deleting}>+ <Button accent="danger" onClick={handleDelete} loading={deleting}>{t("delete", "Delete")}</Button></Group>diff --git a/frontend/editor/src/core/components/tools/certSign/panels/SignControlsPanel.tsx b/frontend/editor/src/core/components/tools/certSign/panels/SignControlsPanel.tsxindex 7945c697f4..15fe50eb90 100644--- a/frontend/editor/src/core/components/tools/certSign/panels/SignControlsPanel.tsx+++ b/frontend/editor/src/core/components/tools/certSign/panels/SignControlsPanel.tsx@@ -1,15 +1,8 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";-import {- ActionIcon,- Box,- Button,- Group,- Menu,- Modal,- SegmentedControl,- Stack,- Text,-} from "@mantine/core";+import { Box, Group, Menu, Modal, Stack, Text } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";+import { Button } from "@app/ui/Button";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import DrawIcon from "@mui/icons-material/Draw";import OpenWithIcon from "@mui/icons-material/OpenWith";@@ -363,11 +356,10 @@ export default function SignControlsPanel({<Menu withinPortal position="bottom" shadow="md" width="target"><Menu.Target><Button- variant="default"+ variant="secondary"fullWidth- justify="space-between"+ justify="between"rightSection={<KeyboardArrowDownIcon sx={{ fontSize: "1.1rem" }} />}- styles={{ label: { flex: 1, overflow: "hidden" } }}aria-label={t("certSign.collab.signRequest.changeSignature","Change signature",@@ -396,10 +388,10 @@ export default function SignControlsPanel({<Group gap="sm" wrap="nowrap" justify="space-between">{renderSavedSignaturePreview(sig)}<ActionIcon- component="div"- size="xs"- color="red"- variant="subtle"+ as="div"+ size="sm"+ accent="danger"+ variant="tertiary"onClick={(e) => {e.stopPropagation();removeSignature(sig.id);@@ -441,7 +433,7 @@ export default function SignControlsPanel({fullWidthvalue={placementMode ? "place" : "move"}onChange={(value) => onPlacementModeChange(value === "place")}- data={[+ options={[{value: "place",label: (@@ -466,16 +458,15 @@ export default function SignControlsPanel({},]}size="xs"- radius="xl"- aria-label={t(+ ariaLabel={t("certSign.collab.signRequest.mode.title","Sign or move mode",)}/><Button- variant="light"- color="red"+ variant="tertiary"+ accent="danger"leftSection={<DeleteOutlineIcon sx={{ fontSize: "1.1rem" }} />}onClick={onDeleteSelected}disabled={!hasSelectedAnnotation}diff --git a/frontend/editor/src/core/components/tools/certSign/panels/SignRequestPanel.tsx b/frontend/editor/src/core/components/tools/certSign/panels/SignRequestPanel.tsxindex 7a5c021de8..2b128ebd11 100644--- a/frontend/editor/src/core/components/tools/certSign/panels/SignRequestPanel.tsx+++ b/frontend/editor/src/core/components/tools/certSign/panels/SignRequestPanel.tsx@@ -1,6 +1,7 @@import { useState, useRef, useEffect, useCallback } from "react";import { useTranslation } from "react-i18next";-import { Stack, Button, Text, Divider } from "@mantine/core";+import { Stack, Text, Divider } from "@mantine/core";+import { Button } from "@app/ui/Button";import ArrowBackIcon from "@mui/icons-material/ArrowBack";import CancelIcon from "@mui/icons-material/Cancel";import FolderOpenIcon from "@mui/icons-material/FolderOpen";@@ -272,11 +273,10 @@ const SignRequestPanel = ({ data }: SignRequestPanelProps) => {<Stack gap="md" p="md"><ButtonleftSection={<ArrowBackIcon fontSize="small" />}- variant="subtle"+ variant="tertiary"size="sm"onClick={onBack}- justify="flex-start"- px={6}+ justify="start"style={{ alignSelf: "flex-start" }}>{t("certSign.collab.signRequest.backToList", "Back to Sign Requests")}@@ -312,7 +312,7 @@ const SignRequestPanel = ({ data }: SignRequestPanelProps) => {)}<Button- variant="light"+ variant="tertiary"leftSection={<FolderOpenIcon fontSize="small" />}onClick={handleAddToActiveFiles}fullWidth@@ -328,8 +328,8 @@ const SignRequestPanel = ({ data }: SignRequestPanelProps) => {{signRequest.myStatus !== "SIGNED" &&signRequest.myStatus !== "DECLINED" && (<Button- variant="light"- color="red"+ variant="tertiary"+ accent="danger"leftSection={<CancelIcon fontSize="small" />}onClick={handleDecline}loading={declining}diff --git a/frontend/editor/src/core/components/tools/certSign/steps/AddSignaturesStep.tsx b/frontend/editor/src/core/components/tools/certSign/steps/AddSignaturesStep.tsxindex e08ff2361d..bde8102d19 100644--- a/frontend/editor/src/core/components/tools/certSign/steps/AddSignaturesStep.tsx+++ b/frontend/editor/src/core/components/tools/certSign/steps/AddSignaturesStep.tsx@@ -1,5 +1,6 @@import { useState } from "react";-import { Button, Stack, Text, Paper } from "@mantine/core";+import { Stack, Text, Paper } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import AddIcon from "@mui/icons-material/Add";import CancelIcon from "@mui/icons-material/Cancel";@@ -118,11 +119,11 @@ export const AddSignaturesStep: React.FC<AddSignaturesStepProps> = ({</Button>) : (<Button+ variant="secondary"+ accent="danger"leftSection={<CancelIcon />}onClick={onCancelPlacement}disabled={disabled}- variant="light"- color="red">{t("certSign.collab.signRequest.steps.cancelPlacement",diff --git a/frontend/editor/src/core/components/tools/certSign/steps/CertificateSelectionStep.tsx b/frontend/editor/src/core/components/tools/certSign/steps/CertificateSelectionStep.tsxindex 6df5368339..1566e20334 100644--- a/frontend/editor/src/core/components/tools/certSign/steps/CertificateSelectionStep.tsx+++ b/frontend/editor/src/core/components/tools/certSign/steps/CertificateSelectionStep.tsx@@ -1,4 +1,5 @@-import { Button, Stack, Group } from "@mantine/core";+import { Stack, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import ArrowBackIcon from "@mui/icons-material/ArrowBack";import {@@ -78,7 +79,7 @@ export const CertificateSelectionStep: React.FC<<Group gap="sm"><Button- variant="default"+ variant="secondary"onClick={onBack}leftSection={<ArrowBackIcon sx={{ fontSize: 16 }} />}>diff --git a/frontend/editor/src/core/components/tools/certSign/steps/ReviewSignatureStep.tsx b/frontend/editor/src/core/components/tools/certSign/steps/ReviewSignatureStep.tsxindex d46c780309..8d654a8896 100644--- a/frontend/editor/src/core/components/tools/certSign/steps/ReviewSignatureStep.tsx+++ b/frontend/editor/src/core/components/tools/certSign/steps/ReviewSignatureStep.tsx@@ -1,4 +1,5 @@-import { Button, Stack, Text, Group, Divider, Paper } from "@mantine/core";+import { Stack, Text, Group, Divider, Paper } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import ArrowBackIcon from "@mui/icons-material/ArrowBack";import DrawIcon from "@mui/icons-material/Draw";@@ -167,15 +168,15 @@ export const ReviewSignatureStep: React.FC<ReviewSignatureStepProps> = ({{/* Action Buttons */}<Group gap="sm" mt="md"><Button- variant="default"+ variant="secondary"onClick={onBack}leftSection={<ArrowBackIcon sx={{ fontSize: 16 }} />}>{t("certSign.collab.signRequest.steps.back", "Back")}</Button><Button- variant="light"- color="red"+ variant="secondary"+ accent="danger"onClick={onDecline}disabled={disabled}leftSection={<CancelIcon sx={{ fontSize: 16 }} />}@@ -183,10 +184,10 @@ export const ReviewSignatureStep: React.FC<ReviewSignatureStepProps> = ({{t("certSign.collab.signRequest.declineButton", "Decline")}</Button><Button+ accent="success"onClick={onSign}disabled={disabled}style={{ flex: 1 }}- color="green"leftSection={<CheckCircleIcon sx={{ fontSize: 16 }} />}>{t("certSign.collab.signRequest.signButton", "Sign Document")}diff --git a/frontend/editor/src/core/components/tools/certSign/steps/SignatureCreationStep.tsx b/frontend/editor/src/core/components/tools/certSign/steps/SignatureCreationStep.tsxindex 7f1ed24125..c24fa1241b 100644--- a/frontend/editor/src/core/components/tools/certSign/steps/SignatureCreationStep.tsx+++ b/frontend/editor/src/core/components/tools/certSign/steps/SignatureCreationStep.tsx@@ -1,4 +1,5 @@-import { Button, Stack } from "@mantine/core";+import { Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import {SignatureTypeSelector,diff --git a/frontend/editor/src/core/components/tools/certSign/steps/SignaturePlacementStep.tsx b/frontend/editor/src/core/components/tools/certSign/steps/SignaturePlacementStep.tsxindex c6010f27b3..a9dfb0cf03 100644--- a/frontend/editor/src/core/components/tools/certSign/steps/SignaturePlacementStep.tsx+++ b/frontend/editor/src/core/components/tools/certSign/steps/SignaturePlacementStep.tsx@@ -1,4 +1,5 @@-import { Button, Stack, Text, Group } from "@mantine/core";+import { Stack, Text, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import ArrowBackIcon from "@mui/icons-material/ArrowBack";@@ -41,7 +42,7 @@ export const SignaturePlacementStep: React.FC<SignaturePlacementStepProps> = ({<Group gap="sm"><Button- variant="default"+ variant="secondary"onClick={onBack}leftSection={<ArrowBackIcon sx={{ fontSize: 16 }} />}>diff --git a/frontend/editor/src/core/components/tools/changeMetadata/steps/CustomMetadataStep.tsx b/frontend/editor/src/core/components/tools/changeMetadata/steps/CustomMetadataStep.tsxindex ea6e85833a..66a608b4ee 100644--- a/frontend/editor/src/core/components/tools/changeMetadata/steps/CustomMetadataStep.tsx+++ b/frontend/editor/src/core/components/tools/changeMetadata/steps/CustomMetadataStep.tsx@@ -1,4 +1,5 @@-import { Stack, TextInput, Button, Group, Text } from "@mantine/core";+import { Stack, TextInput, Group, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { ChangeMetadataParameters } from "@app/hooks/tools/changeMetadata/useChangeMetadataParameters";@@ -30,8 +31,8 @@ const CustomMetadataStep = ({{t("changeMetadata.customFields.title", "Custom Metadata")}</Text><Button- size="xs"- variant="light"+ variant="secondary"+ size="sm"onClick={() => addCustomMetadata()}disabled={disabled}>@@ -73,9 +74,9 @@ const CustomMetadataStep = ({disabled={disabled}/><Button- size="xs"- variant="light"- color="red"+ variant="secondary"+ accent="danger"+ size="sm"onClick={() => removeCustomMetadata(entry.id)}disabled={disabled}>diff --git a/frontend/editor/src/core/components/tools/compare/ComparePixelWorkbenchView.tsx b/frontend/editor/src/core/components/tools/compare/ComparePixelWorkbenchView.tsxindex d0b16336a7..d6e3c55f71 100644--- a/frontend/editor/src/core/components/tools/compare/ComparePixelWorkbenchView.tsx+++ b/frontend/editor/src/core/components/tools/compare/ComparePixelWorkbenchView.tsx@@ -1,5 +1,6 @@import { useMemo, useState } from "react";-import { Badge, Group, SegmentedControl, Stack, Text } from "@mantine/core";+import { Badge, Group, Stack, Text } from "@mantine/core";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import type { TFunction } from "i18next";@@ -167,10 +168,10 @@ const ComparePixelWorkbenchView = ({</Badge></Group><SegmentedControl- size="xs"+ size="sm"value={viewMode}onChange={(value) => setViewMode(value as PixelViewMode)}- data={[+ options={[{value: "side-by-side",label: t("compare.pixel.sideBySide", "Side-by-side"),diff --git a/frontend/editor/src/core/components/tools/compare/compareView.css b/frontend/editor/src/core/components/tools/compare/compareView.cssindex d65c5fa866..e399f98b40 100644--- a/frontend/editor/src/core/components/tools/compare/compareView.css+++ b/frontend/editor/src/core/components/tools/compare/compareView.css@@ -550,7 +550,7 @@gap: 0.5rem;}-/* Full-height light bar to the right of both cards (reference UI) */+/* Full-height bar to the right of both cards */.compare-step-selection__swap {flex-shrink: 0;width: 36px;@@ -558,48 +558,15 @@align-self: stretch;margin: 0;padding: 0.5rem 0.2rem;- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;+ display: flex !important;+ flex-direction: column !important;+ align-items: center !important;+ justify-content: center !important;gap: 0.35rem;- border-radius: var(--radius-md);- border: 1px solid- color-mix(in srgb, var(--mantine-color-blue-4) 28%, var(--border-default));- background: color-mix(- in srgb,- var(--mantine-color-blue-0) 92%,- var(--mantine-color-body)- );- color: var(--mantine-color-blue-filled);- cursor: pointer;- font: inherit;- transition:- background 0.12s ease,- border-color 0.12s ease;-}--.compare-step-selection__swap:hover:not(:disabled) {- background: color-mix(- in srgb,- var(--mantine-color-blue-1) 75%,- var(--mantine-color-body)- );- border-color: color-mix(- in srgb,- var(--mantine-color-blue-5) 35%,- var(--border-default)- );-}--.compare-step-selection__swap:disabled {- opacity: 0.45;- cursor: not-allowed;}.compare-step-selection__swap-icon {font-size: 1.35rem !important;- color: var(--mantine-color-blue-filled);}.compare-step-selection__swap-label {@@ -607,36 +574,6 @@font-weight: 600;line-height: 1.15;text-align: center;- color: var(--mantine-color-blue-filled);- writing-mode: horizontal-tb;-}--[data-mantine-color-scheme="”dark”"] .compare-step-selection__swap {- background: color-mix(- in srgb,- var(--mantine-color-blue-9) 22%,- var(--mantine-color-dark-6)- );- border-color: color-mix(- in srgb,- var(--mantine-color-blue-4) 40%,- var(--border-default)- );- color: var(--mantine-color-blue-3);-}--[data-mantine-color-scheme="”dark”"]- .compare-step-selection__swap:hover:not(:disabled) {- background: color-mix(- in srgb,- var(--mantine-color-blue-9) 32%,- var(--mantine-color-dark-6)- );-}--[data-mantine-color-scheme="”dark”"] .compare-step-selection__swap-icon,-[data-mantine-color-scheme="”dark”"] .compare-step-selection__swap-label {- color: var(--mantine-color-blue-3);}/* Pixel compare mode */diff --git a/frontend/editor/src/core/components/tools/compress/CompressSettings.tsx b/frontend/editor/src/core/components/tools/compress/CompressSettings.tsxindex 1c5cb8ef4d..f0cd39b2c0 100644--- a/frontend/editor/src/core/components/tools/compress/CompressSettings.tsx+++ b/frontend/editor/src/core/components/tools/compress/CompressSettings.tsx@@ -6,10 +6,10 @@ import {Divider,Checkbox,Slider,- SegmentedControl,Tooltip,Box,} from "@mantine/core";+import { SegmentedControl } from "@app/ui/SegmentedControl";import SliderWithInput from "@app/components/shared/sliderWithInput/SliderWithInput";import { useTranslation } from "react-i18next";import { CompressParameters } from "@app/hooks/tools/compress/useCompressParameters";@@ -258,14 +258,22 @@ const CompressSettings = ({</Text><SegmentedControlfullWidth- disabled={disabled || imageMagickAvailable === false}- data={[- { value: "1", label: t("compress.lineArt.edgeLow", "Gentle") },+ options={[+ {+ value: "1",+ label: t("compress.lineArt.edgeLow", "Gentle"),+ disabled: disabled || imageMagickAvailable === false,+ },{value: "2",label: t("compress.lineArt.edgeMedium", "Balanced"),+ disabled: disabled || imageMagickAvailable === false,+ },+ {+ value: "3",+ label: t("compress.lineArt.edgeHigh", "Strong"),+ disabled: disabled || imageMagickAvailable === false,},- { value: "3", label: t("compress.lineArt.edgeHigh", "Strong") },]}value={parameters.lineArtEdgeLevel.toString()}onChange={(value) =>diff --git a/frontend/editor/src/core/components/tools/convert/ConvertSettings.tsx b/frontend/editor/src/core/components/tools/convert/ConvertSettings.tsxindex 5c0843660f..cc33ccbbb4 100644--- a/frontend/editor/src/core/components/tools/convert/ConvertSettings.tsx+++ b/frontend/editor/src/core/components/tools/convert/ConvertSettings.tsx@@ -1,12 +1,6 @@import { useMemo } from "react";-import {- Stack,- Text,- Group,- Divider,- UnstyledButton,- useMantineTheme,-} from "@mantine/core";+import { Stack, Text, Group, Divider, useMantineTheme } from "@mantine/core";+import { Button } from "@app/ui/Button";import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";import { useTranslation } from "react-i18next";import { useMultipleEndpointsEnabled } from "@app/hooks/useEndpointConfig";@@ -336,7 +330,11 @@ const ConvertSettings = ({{t("convert.convertTo", "Convert to")}:</Text>{!parameters.fromExtension ? (- <UnstyledButton+ <Button+ variant="tertiary"+ hover={false}+ fullWidth+ disabledstyle={{padding: "0.5rem 0.75rem",border: `0.0625rem solid ${theme.colors.gray[4]}`,@@ -346,7 +344,7 @@ const ConvertSettings = ({cursor: "not-allowed",}}>- <Group justify="space-between">+ <Group justify="space-between" style={{ width: "100%" }}><Text size="sm">{t("convert.selectSourceFormatFirst",@@ -360,7 +358,7 @@ const ConvertSettings = ({}}/></Group>- </UnstyledButton>+ </Button>) : (<GroupedFormatDropdownname="convert-to-dropdown"diff --git a/frontend/editor/src/core/components/tools/convert/GroupedFormatDropdown.tsx b/frontend/editor/src/core/components/tools/convert/GroupedFormatDropdown.tsxindex 296a91056a..7ffd30fa85 100644--- a/frontend/editor/src/core/components/tools/convert/GroupedFormatDropdown.tsx+++ b/frontend/editor/src/core/components/tools/convert/GroupedFormatDropdown.tsx@@ -3,12 +3,11 @@ import {Stack,Text,Group,- Button,Box,Popover,- UnstyledButton,useMantineTheme,} from "@mantine/core";+import { Button } from "@app/ui/Button";import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";import CloudOutlinedIcon from "@mui/icons-material/CloudOutlined";import { Z_INDEX_AUTOMATE_DROPDOWN } from "@app/styles/zIndex";@@ -87,7 +86,10 @@ const GroupedFormatDropdown = ({zIndex={zIndex}><Popover.Target>- <UnstyledButton+ <Button+ variant="tertiary"+ hover={false}+ fullWidthname={name}data-testid={name}onClick={() => setDropdownOpened(!dropdownOpened)}@@ -106,7 +108,7 @@ const GroupedFormatDropdown = ({: "var(--dropdown-trigger-text)",}}>- <Group justify="space-between">+ <Group justify="space-between" style={{ width: "100%" }}><Text size="sm" c={value ? undefined : "dimmed"}>{selectedLabel}</Text>@@ -119,7 +121,7 @@ const GroupedFormatDropdown = ({}}/></Group>- </UnstyledButton>+ </Button></Popover.Target><Popover.Dropdownstyle={{@@ -147,10 +149,21 @@ const GroupedFormatDropdown = ({<Buttonkey={option.value}data-testid={`format-option-${option.value}`}- variant={value === option.value ? "filled" : "outline"}+ variant={value === option.value ? "primary" : "secondary"}size="sm"onClick={() => handleOptionSelect(option.value)}disabled={option.enabled === false}+ rightSection={+ option.usesCloud ? (+ <CloudOutlinedIcon+ style={{+ fontSize: "0.625rem",+ marginLeft: "0.25rem",+ opacity: 0.7,+ }}+ />+ ) : undefined+ }style={{fontSize: "0.75rem",height: "2rem",@@ -160,15 +173,6 @@ const GroupedFormatDropdown = ({}}>{option.label}- {option.usesCloud && (- <CloudOutlinedIcon- style={{- fontSize: "0.625rem",- marginLeft: "0.25rem",- opacity: 0.7,- }}- />- )}</Button>))}</Group>diff --git a/frontend/editor/src/core/components/tools/crop/CropSettings.tsx b/frontend/editor/src/core/components/tools/crop/CropSettings.tsxindex 65b0e8f0fe..710391dd6c 100644--- a/frontend/editor/src/core/components/tools/crop/CropSettings.tsx+++ b/frontend/editor/src/core/components/tools/crop/CropSettings.tsx@@ -4,11 +4,11 @@ import {Text,Box,Group,- ActionIcon,Center,Alert,Checkbox,} from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import RestartAltIcon from "@mui/icons-material/RestartAlt";import { CropParametersHook } from "@app/hooks/tools/crop/useCropParameters";@@ -193,7 +193,7 @@ const CropSettings = ({ parameters, disabled = false }: CropSettingsProps) => {{t("crop.preview.title", "Crop Area Selection")}</Text><ActionIcon- variant="outline"+ variant="secondary"onClick={handleReset}disabled={disabled || isFullCrop}title={t("crop.reset", "Reset to full PDF")}diff --git a/frontend/editor/src/core/components/tools/editTableOfContents/BookmarkEditor.tsx b/frontend/editor/src/core/components/tools/editTableOfContents/BookmarkEditor.tsxindex 2dbde539ef..9b6152cf55 100644--- a/frontend/editor/src/core/components/tools/editTableOfContents/BookmarkEditor.tsx+++ b/frontend/editor/src/core/components/tools/editTableOfContents/BookmarkEditor.tsx@@ -1,9 +1,7 @@import { Fragment, useState } from "react";import { useTranslation } from "react-i18next";import {- ActionIcon,Badge,- Button,Flex,Group,NumberInput,@@ -13,6 +11,8 @@ import {TextInput,Tooltip,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import {BookmarkNode,@@ -227,8 +227,7 @@ export default function BookmarkEditor({<Flex align="flex-start" justify="space-between" gap="md"><Group gap="sm" align="flex-start"><ActionIcon- variant="subtle"- color="gray"+ variant="tertiary"onMouseDown={(e) => {e.preventDefault();if (hasChildren) handleToggle(bookmark.id);@@ -272,13 +271,17 @@ export default function BookmarkEditor({)}><ActionIcon- variant="subtle"- color="green"+ variant="tertiary"+ accent="success"onMouseDown={(e) => {e.preventDefault();handleAddChild(bookmark.id);}}disabled={disabled}+ aria-label={t(+ "editTableOfContents.editor.actions.addChild",+ "Add child bookmark",+ )}><LocalIcon icon="subdirectory-arrow-right-rounded" /></ActionIcon>@@ -290,13 +293,16 @@ export default function BookmarkEditor({)}><ActionIcon- variant="subtle"- color="blue"+ variant="tertiary"onMouseDown={(e) => {e.preventDefault();handleAddSibling(bookmark.id);}}disabled={disabled}+ aria-label={t(+ "editTableOfContents.editor.actions.addSibling",+ "Add sibling bookmark",+ )}><LocalIcon icon="add-rounded" /></ActionIcon>@@ -308,13 +314,17 @@ export default function BookmarkEditor({)}><ActionIcon- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"onMouseDown={(e) => {e.preventDefault();handleRemove(bookmark.id);}}disabled={disabled}+ aria-label={t(+ "editTableOfContents.editor.actions.remove",+ "Remove bookmark",+ )}><LocalIcon icon="delete-rounded" /></ActionIcon>@@ -399,8 +409,7 @@ export default function BookmarkEditor({</Text></div><Button- variant="default"- color="blue"+ variant="secondary"leftSection={<LocalIcon icon="bookmark-add-rounded" />}onMouseDown={(e) => {e.preventDefault();@@ -432,8 +441,7 @@ export default function BookmarkEditor({)}</Text><Button- variant="subtle"- color="blue"+ variant="tertiary"leftSection={<LocalIcon icon="add-rounded" />}onMouseDown={(e) => {e.preventDefault();diff --git a/frontend/editor/src/core/components/tools/editTableOfContents/EditTableOfContentsSettings.tsx b/frontend/editor/src/core/components/tools/editTableOfContents/EditTableOfContentsSettings.tsxindex 32c5087505..387e1ffe6e 100644--- a/frontend/editor/src/core/components/tools/editTableOfContents/EditTableOfContentsSettings.tsx+++ b/frontend/editor/src/core/components/tools/editTableOfContents/EditTableOfContentsSettings.tsx@@ -1,15 +1,8 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import {- Alert,- Button,- Divider,- FileButton,- Stack,- Switch,- Text,- Tooltip,-} from "@mantine/core";+import { Alert, Divider, Stack, Switch, Text, Tooltip } from "@mantine/core";+import { Button as DSButton } from "@app/ui/Button";+import { FilePicker } from "@app/ui/FilePicker";import LocalIcon from "@app/components/shared/LocalIcon";import { BookmarkNode } from "@app/utils/editTableOfContents";@@ -87,8 +80,8 @@ export default function EditTableOfContentsSettings({</Stack><Stack gap="sm">- <Button- variant="light"+ <DSButton+ variant="secondary"leftSection={<LocalIcon icon="folder-rounded" />}onClick={onSelectFiles}fullWidth@@ -96,8 +89,7 @@ export default function EditTableOfContentsSettings({{selectedFileName? t("editTableOfContents.workbench.changeFile", "Change PDF"): t("editTableOfContents.workbench.selectFile", "Select PDF")}- </Button>-+ </DSButton><Tooltiplabel={!selectedFileName@@ -109,8 +101,8 @@ export default function EditTableOfContentsSettings({}disabled={Boolean(selectedFileName)}>- <Button- variant="default"+ <DSButton+ variant="secondary"leftSection={<LocalIcon icon="picture-as-pdf-rounded" />}onClick={onLoadFromPdf}loading={isLoading}@@ -118,27 +110,18 @@ export default function EditTableOfContentsSettings({fullWidth>{t("editTableOfContents.actions.loadFromPdf", "Load from PDF")}- </Button>+ </DSButton></Tooltip>-- <FileButton+ <FilePickeronChange={(file) => file && onImportJson(file)}accept="application/json"disabled={disabled}+ variant="secondary"+ leftSection={<LocalIcon icon="upload-rounded" />}+ fullWidth>- {(props) => (- <Button- {...props}- variant="default"- leftSection={<LocalIcon icon="upload-rounded" />}- disabled={disabled}- fullWidth- >- {t("editTableOfContents.actions.importJson", "Import JSON")}- </Button>- )}- </FileButton>-+ {t("editTableOfContents.actions.importJson", "Import JSON")}+ </FilePicker><Tooltiplabel={canReadClipboard@@ -150,8 +133,8 @@ export default function EditTableOfContentsSettings({}disabled={canReadClipboard}>- <Button- variant="default"+ <DSButton+ variant="secondary"leftSection={<LocalIcon icon="content-paste-rounded" />}onClick={onImportClipboard}disabled={disabled || !canReadClipboard}@@ -161,7 +144,7 @@ export default function EditTableOfContentsSettings({"editTableOfContents.actions.importClipboard","Paste from clipboard",)}- </Button>+ </DSButton></Tooltip></Stack>@@ -184,16 +167,15 @@ export default function EditTableOfContentsSettings({</Stack><Stack gap="sm">- <Button- variant="default"+ <DSButton+ variant="secondary"leftSection={<LocalIcon icon="download-rounded" />}onClick={onExportJson}disabled={disabled || bookmarks.length === 0}fullWidth>{t("editTableOfContents.actions.exportJson", "Download JSON")}- </Button>-+ </DSButton><Tooltiplabel={canWriteClipboard@@ -205,8 +187,8 @@ export default function EditTableOfContentsSettings({}disabled={canWriteClipboard}>- <Button- variant="default"+ <DSButton+ variant="secondary"leftSection={<LocalIcon icon="content-copy-rounded" />}onClick={onExportClipboard}disabled={disabled || bookmarks.length === 0 || !canWriteClipboard}@@ -216,7 +198,7 @@ export default function EditTableOfContentsSettings({"editTableOfContents.actions.exportClipboard","Copy to clipboard",)}- </Button>+ </DSButton></Tooltip></Stack>diff --git a/frontend/editor/src/core/components/tools/editTableOfContents/EditTableOfContentsWorkbenchView.tsx b/frontend/editor/src/core/components/tools/editTableOfContents/EditTableOfContentsWorkbenchView.tsxindex 43702d5c65..148917dba6 100644--- a/frontend/editor/src/core/components/tools/editTableOfContents/EditTableOfContentsWorkbenchView.tsx+++ b/frontend/editor/src/core/components/tools/editTableOfContents/EditTableOfContentsWorkbenchView.tsx@@ -1,6 +1,7 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { Box, Button, Card, Divider, Group, Stack, Text } from "@mantine/core";+import { Box, Card, Divider, Group, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import LocalIcon from "@app/components/shared/LocalIcon";import { BookmarkNode } from "@app/utils/editTableOfContents";import ErrorNotification from "@app/components/tools/shared/ErrorNotification";@@ -150,7 +151,6 @@ const EditTableOfContentsWorkbenchView = ({<Group justify="flex-end"><ButtonleftSection={<LocalIcon icon="menu-book-rounded" />}- color="blue"onClick={onExecute}disabled={isExecuteDisabled}loading={isExecuting}@@ -213,7 +213,7 @@ const EditTableOfContentsWorkbenchView = ({</Button>)}<Button- variant="outline"+ variant="secondary"leftSection={<LocalIcon icon="rotate-left" />}onClick={onUndo}disabled={isExecuting}diff --git a/frontend/editor/src/core/components/tools/fullscreen/CompactToolItem.tsx b/frontend/editor/src/core/components/tools/fullscreen/CompactToolItem.tsxindex a6f4d257b3..37300cfeec 100644--- a/frontend/editor/src/core/components/tools/fullscreen/CompactToolItem.tsx+++ b/frontend/editor/src/core/components/tools/fullscreen/CompactToolItem.tsx@@ -15,6 +15,7 @@ import {useToolMeta,getDisabledLabel,} from "@app/components/tools/fullscreen/shared";+import { Button } from "@app/ui/Button";interface CompactToolItemProps {id: string;@@ -53,27 +54,31 @@ const CompactToolItem: React.FC<CompactToolItemProps> = ({iconNode = tool.icon;}+ const iconElement = tool.icon ? (+ <span+ className={iconClasses}+ aria-hidden+ style={{+ background: iconBg,+ ...getIconStyle(),+ }}+ >+ {iconNode}+ </span>+ ) : undefined;+const compactButton = (- <button- type="button"+ <Button+ variant="tertiary"+ justify="start"+ fullWidthclassName={`tool-panel__fullscreen-list-item ${getItemClasses(false)} ${isSelected ? "tool-panel__fullscreen-list-item--selected" : ""} ${!disabled ? "tool-panel__fullscreen-list-item--with-star" : ""}`}onClick={onClick}aria-disabled={disabled}disabled={disabled}data-tour={`tool-button-${id}`}+ leftSection={iconElement}>- {tool.icon ? (- <span- className={iconClasses}- aria-hidden- style={{- background: iconBg,- ...getIconStyle(),- }}- >- {iconNode}- </span>- ) : null}<span className="tool-panel__fullscreen-list-body"><div style={{ display: "flex", alignItems: "center", gap: "0.5rem" }}><Text className="tool-panel__fullscreen-name">{tool.name}</Text>@@ -93,7 +98,7 @@ const CompactToolItem: React.FC<CompactToolItemProps> = ({/></div>)}- </button>+ </Button>);const { key: disabledKey, fallback: disabledFallback } =diff --git a/frontend/editor/src/core/components/tools/fullscreen/DetailedToolItem.tsx b/frontend/editor/src/core/components/tools/fullscreen/DetailedToolItem.tsxindex 32fa181a16..464403e286 100644--- a/frontend/editor/src/core/components/tools/fullscreen/DetailedToolItem.tsx+++ b/frontend/editor/src/core/components/tools/fullscreen/DetailedToolItem.tsx@@ -14,6 +14,7 @@ import {useToolMeta,getDisabledLabel,} from "@app/components/tools/fullscreen/shared";+import { Button } from "@app/ui/Button";interface DetailedToolItemProps {id: string;@@ -56,8 +57,8 @@ const DetailedToolItem: React.FC<DetailedToolItemProps> = ({const disabledMessage = t(disabledKey, disabledFallback);return (- <button- type="button"+ <Button+ variant="tertiary"className={`tool-panel__fullscreen-item ${getItemClasses(true)} ${isSelected ? "tool-panel__fullscreen-item--selected" : ""} tool-panel__fullscreen-item--with-star`}onClick={onClick}aria-disabled={disabled}@@ -123,7 +124,7 @@ const DetailedToolItem: React.FC<DetailedToolItemProps> = ({/></div>)}- </button>+ </Button>);};diff --git a/frontend/editor/src/core/components/tools/getPdfInfo/GetPdfInfoResults.tsx b/frontend/editor/src/core/components/tools/getPdfInfo/GetPdfInfoResults.tsxindex 7c1c5fe423..487252ae81 100644--- a/frontend/editor/src/core/components/tools/getPdfInfo/GetPdfInfoResults.tsx+++ b/frontend/editor/src/core/components/tools/getPdfInfo/GetPdfInfoResults.tsx@@ -1,5 +1,6 @@import { useCallback, useMemo } from "react";-import { Alert, Button, Group, Loader, Stack, Text } from "@mantine/core";+import { Alert, Group, Loader, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import type { GetPdfInfoOperationHook } from "@app/hooks/tools/getPdfInfo/useGetPdfInfoOperation";import { downloadFile } from "@app/services/downloadService";@@ -72,7 +73,6 @@ const GetPdfInfoResults = ({{t("getPdfInfo.downloads", "Downloads")}</Text><Button- color="blue"onClick={() => selectedFile && handleDownload(selectedFile)}disabled={!selectedFile}fullWidthdiff --git a/frontend/editor/src/core/components/tools/merge/MergeFileSorter.tsx b/frontend/editor/src/core/components/tools/merge/MergeFileSorter.tsxindex 5a7e8c994f..61300fbb68 100644--- a/frontend/editor/src/core/components/tools/merge/MergeFileSorter.tsx+++ b/frontend/editor/src/core/components/tools/merge/MergeFileSorter.tsx@@ -1,5 +1,7 @@import React, { useState } from "react";-import { Group, Button, Text, ActionIcon, Stack, Select } from "@mantine/core";+import { Group, Text, Stack, Select } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import SortIcon from "@mui/icons-material/Sort";import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";@@ -67,7 +69,7 @@ const MergeFileSorter: React.FC<MergeFileSorterProps> = ({/><ActionIcon- variant="light"+ variant="secondary"size="md"onClick={handleDirectionToggle}disabled={disabled}@@ -76,14 +78,19 @@ const MergeFileSorter: React.FC<MergeFileSorterProps> = ({? t("merge.sortBy.ascending", "Ascending"): t("merge.sortBy.descending", "Descending")}+ aria-label={+ ascending+ ? t("merge.sortBy.ascending", "Ascending")+ : t("merge.sortBy.descending", "Descending")+ }>{ascending ? <ArrowUpwardIcon /> : <ArrowDownwardIcon />}</ActionIcon></Group><Button- variant="light"- size="xs"+ variant="secondary"+ size="sm"leftSection={<SortIcon />}onClick={handleSort}disabled={disabled}diff --git a/frontend/editor/src/core/components/tools/overlayPdfs/OverlayPdfsSettings.tsx b/frontend/editor/src/core/components/tools/overlayPdfs/OverlayPdfsSettings.tsxindex ce059c9204..2648990248 100644--- a/frontend/editor/src/core/components/tools/overlayPdfs/OverlayPdfsSettings.tsx+++ b/frontend/editor/src/core/components/tools/overlayPdfs/OverlayPdfsSettings.tsx@@ -3,12 +3,12 @@ import {Text,Group,Select,- SegmentedControl,NumberInput,- Button,- ActionIcon,Divider,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import {type OverlayPdfsParameters,@@ -121,17 +121,18 @@ export default function OverlayPdfsSettings({onChange={(v) =>onParameterChange("overlayPosition", (v === "1" ? 1 : 0) as 0 | 1)}- data={[+ options={[{label: t("overlay-pdfs.position.foreground", "Foreground"),value: "0",+ disabled,},{label: t("overlay-pdfs.position.background", "Background"),value: "1",+ disabled,},]}- disabled={disabled}/></Stack>@@ -183,8 +184,7 @@ export default function OverlayPdfsSettings({{t("overlay-pdfs.overlayFiles.label", "Overlay Files")}</Text><Button- size="xs"- color="blue"+ size="sm"onClick={handleOpenOverlayFilesModal}disabled={disabled}leftSection={<LocalIcon icon="add" width="14" height="14" />}@@ -219,8 +219,8 @@ export default function OverlayPdfsSettings({</Group><ActionIconsize="sm"- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"className={styles.removeButton}onClick={() => {const next = (parameters.overlayFiles || []).filter(@@ -229,6 +229,7 @@ export default function OverlayPdfsSettings({handleOverlayFilesChange(next);}}disabled={disabled}+ aria-label={t("remove", "Remove")}><LocalIconicon="close-rounded"diff --git a/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorSidebar.tsx b/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorSidebar.tsxindex 168d5ffced..1892aaa7f3 100644--- a/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorSidebar.tsx+++ b/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorSidebar.tsx@@ -1,19 +1,19 @@import React, { useCallback, useMemo, useState } from "react";import {- ActionIcon,Badge,- Button,Divider,Flex,Group,Menu,Modal,ScrollArea,- SegmentedControl,Stack,Switch,Text,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import AutorenewIcon from "@mui/icons-material/Autorenew";import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";@@ -148,7 +148,11 @@ const PdfTextEditorSidebar = ({ data }: PdfTextEditorSidebarProps) => {header={pdfTextEditorTips.header}pinOnClick>- <ActionIcon variant="subtle" color="blue" size="sm">+ <ActionIcon+ variant="tertiary"+ size="sm"+ aria-label={t("pdfTextEditor.title", "PDF Text Editor")}+ ><LocalIconicon="info-outline-rounded"width="1.25rem"@@ -194,9 +198,12 @@ const PdfTextEditorSidebar = ({ data }: PdfTextEditorSidebarProps) => {position="top"><ActionIcon- variant="subtle"- color="gray"+ variant="tertiary"size="sm"+ aria-label={t(+ "pdfTextEditor.options.autoScaleText.title",+ "Auto-scale text to fit boxes",+ )}style={{ flexShrink: 0 }}><InfoOutlinedIcon fontSize="small" />@@ -275,7 +282,7 @@ const PdfTextEditorSidebar = ({ data }: PdfTextEditorSidebarProps) => {onChange={(value) =>handleModeChangeRequest(value as GroupingMode)}- data={[+ options={[{label: t("pdfTextEditor.groupingMode.auto", "Auto"),value: "auto",@@ -316,9 +323,12 @@ const PdfTextEditorSidebar = ({ data }: PdfTextEditorSidebarProps) => {position="top"><ActionIcon- variant="subtle"- color="gray"+ variant="tertiary"size="sm"+ aria-label={t(+ "pdfTextEditor.options.forceSingleElement.title",+ "Lock edited text to a single PDF element",+ )}style={{ flexShrink: 0 }}><InfoOutlinedIcon fontSize="small" />@@ -357,7 +367,6 @@ const PdfTextEditorSidebar = ({ data }: PdfTextEditorSidebarProps) => {<Group gap="xs" wrap="nowrap" p="md"><Button- variant="filled"onClick={onSaveToWorkbench}loading={isSavingToWorkbench}disabled={!hasDocument || !hasChanges || isConverting}@@ -368,9 +377,13 @@ const PdfTextEditorSidebar = ({ data }: PdfTextEditorSidebarProps) => {<Menu position="bottom-end" withinPortal><Menu.Target><ActionIcon- variant="default"+ variant="secondary"size="lg"disabled={!hasDocument || isConverting}+ aria-label={t(+ "pdfTextEditor.actions.moreOptions",+ "More options",+ )}><MoreHorizIcon fontSize="small" /></ActionIcon>@@ -410,10 +423,10 @@ const PdfTextEditorSidebar = ({ data }: PdfTextEditorSidebarProps) => {)}</Text><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={handleCancelModeChange}>+ <Button variant="secondary" onClick={handleCancelModeChange}>{t("pdfTextEditor.modeChange.cancel", "Cancel")}</Button>- <Button color="red" onClick={handleConfirmModeChange}>+ <Button accent="danger" onClick={handleConfirmModeChange}>{t("pdfTextEditor.modeChange.confirm", "Reset and Change Mode")}</Button></Group>diff --git a/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorView.tsx b/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorView.tsxindex cc6389845a..0cbd88e619 100644--- a/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorView.tsx+++ b/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorView.tsx@@ -7,11 +7,9 @@ import React, {useState,} from "react";import {- ActionIcon,Alert,Badge,Box,- Button,Card,Divider,Group,@@ -24,6 +22,8 @@ import {Text,Tooltip,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { Dropzone } from "@mantine/dropzone";import { useTranslation } from "react-i18next";import AutorenewIcon from "@mui/icons-material/Autorenew";@@ -1553,10 +1553,10 @@ const PdfTextEditorView = ({ data }: PdfTextEditorViewProps) => {{resizeHandle}{activeGroupId === groupId && (<ActionIcon- size="xs"- variant="filled"- color="red"- radius="xl"+ aria-label={t("pdfTextEditor.actions.clearText", "Clear text")}+ size="sm"+ variant="tertiary"+ accent="danger"style={{position: "absolute",top: -8,@@ -2008,7 +2008,7 @@ const PdfTextEditorView = ({ data }: PdfTextEditorViewProps) => {</Text><Group justify="flex-end" gap="sm" mt="xs"><Button- variant="default"+ variant="secondary"onClick={handleDismissWelcomeBanner}>{t("pdfTextEditor.welcomeBanner.gotIt", "Got it")}@@ -2126,8 +2126,7 @@ const PdfTextEditorView = ({ data }: PdfTextEditorViewProps) => {><ActionIconsize="sm"- variant="light"- color="blue"+ variant="secondary"aria-label={t("pdfTextEditor.manual.merge","Merge selection",@@ -2147,8 +2146,7 @@ const PdfTextEditorView = ({ data }: PdfTextEditorViewProps) => {><ActionIconsize="sm"- variant="light"- color="blue"+ variant="secondary"aria-label={t("pdfTextEditor.manual.ungroup","Ungroup selection",@@ -2168,8 +2166,7 @@ const PdfTextEditorView = ({ data }: PdfTextEditorViewProps) => {<Menu.Target><ActionIconsize="sm"- variant="light"- color="blue"+ variant="secondary"aria-label={t("pdfTextEditor.manual.widthMenu","Width options",diff --git a/frontend/editor/src/core/components/tools/redact/ManualRedactionControls.tsx b/frontend/editor/src/core/components/tools/redact/ManualRedactionControls.tsxindex 867fac3399..49dc3b1da9 100644--- a/frontend/editor/src/core/components/tools/redact/ManualRedactionControls.tsx+++ b/frontend/editor/src/core/components/tools/redact/ManualRedactionControls.tsx@@ -1,6 +1,7 @@import { useTranslation } from "react-i18next";import { useEffect, useRef, useCallback } from "react";-import { Button, Stack, Text, Divider, ColorInput } from "@mantine/core";+import { Stack, Text, Divider, ColorInput } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useRedaction, useRedactionMode } from "@app/contexts/RedactionContext";import { useViewer } from "@app/contexts/ViewerContext";import { useSignature } from "@app/contexts/SignatureContext";@@ -154,10 +155,7 @@ export default function ManualRedactionControls({<ButtonfullWidthsize="md"- radius="md"- mt="sm"- variant="filled"- color="blue"+ style={{ marginTop: "0.75rem" }}disabled={!hasUnsavedChanges}onClick={handleSaveChanges}>diff --git a/frontend/editor/src/core/components/tools/redact/RedactSingleStepSettings.test.tsx b/frontend/editor/src/core/components/tools/redact/RedactSingleStepSettings.test.tsxindex fa320edeff..7f57b8299e 100644--- a/frontend/editor/src/core/components/tools/redact/RedactSingleStepSettings.test.tsx+++ b/frontend/editor/src/core/components/tools/redact/RedactSingleStepSettings.test.tsx@@ -34,10 +34,9 @@ describe("RedactSingleStepSettings", () => {);expect(screen.getByText("Mode")).toBeInTheDocument();- expect(- screen.getByRole("button", { name: "Automatic" }),- ).toBeInTheDocument();- expect(screen.getByRole("button", { name: "Manual" })).toBeInTheDocument();+ // Mode selector renders as a radio-group (shared SegmentedControl)+ expect(screen.getByText("Automatic")).toBeInTheDocument();+ expect(screen.getByText("Manual")).toBeInTheDocument();});test("should render automatic mode settings when mode is automatic", () => {@@ -126,7 +125,7 @@ describe("RedactSingleStepSettings", () => {});test("should disable all controls when disabled prop is true", () => {- render(+ const { container } = render(<TestWrapper><RedactSingleStepSettingsparameters={defaultParameters}@@ -136,9 +135,14 @@ describe("RedactSingleStepSettings", () => {</TestWrapper>,);- // Mode selector buttons should be disabled- expect(screen.getByRole("button", { name: "Automatic" })).toBeDisabled();- expect(screen.getByRole("button", { name: "Manual" })).toBeDisabled();+ // Mode selector renders as radio inputs (shared SegmentedControl); both+ // radios should be disabled when the control is disabled.+ expect(+ container.querySelector('input[type="radio"][value="automatic"]'),+ ).toBeDisabled();+ expect(+ container.querySelector('input[type="radio"][value="manual"]'),+ ).toBeDisabled();// Automatic settings controls should be disabledexpect(screen.getByPlaceholderText("Enter a word")).toBeDisabled();diff --git a/frontend/editor/src/core/components/tools/redact/WordsToRedactInput.tsx b/frontend/editor/src/core/components/tools/redact/WordsToRedactInput.tsxindex db346bd4ec..018a04a2b7 100644--- a/frontend/editor/src/core/components/tools/redact/WordsToRedactInput.tsx+++ b/frontend/editor/src/core/components/tools/redact/WordsToRedactInput.tsx@@ -1,13 +1,8 @@import React, { useState } from "react";import { useTranslation } from "react-i18next";-import {- Stack,- Text,- TextInput,- Button,- Group,- ActionIcon,-} from "@mantine/core";+import { Stack, Text, TextInput, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";interface WordsToRedactInputProps {wordsToRedact: string[];@@ -73,10 +68,11 @@ export default function WordsToRedactInput({</Text><ActionIconsize="sm"- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"onClick={() => removeWord(index)}disabled={disabled}+ aria-label={t("remove", "Remove")}>×</ActionIcon>@@ -99,7 +95,7 @@ export default function WordsToRedactInput({/><Buttonsize="sm"- variant="light"+ variant="secondary"onClick={addWord}disabled={disabled || !currentWord.trim()}>diff --git a/frontend/editor/src/core/components/tools/rotate/RotateSettings.tsx b/frontend/editor/src/core/components/tools/rotate/RotateSettings.tsxindex cae25c5a65..ba66790298 100644--- a/frontend/editor/src/core/components/tools/rotate/RotateSettings.tsx+++ b/frontend/editor/src/core/components/tools/rotate/RotateSettings.tsx@@ -1,5 +1,6 @@import { useMemo, useState, useEffect } from "react";-import { Stack, Text, Box, ActionIcon, Group, Center } from "@mantine/core";+import { Stack, Text, Box, Group, Center } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import RotateLeftIcon from "@mui/icons-material/RotateLeft";import RotateRightIcon from "@mui/icons-material/RotateRight";@@ -94,8 +95,8 @@ const RotateSettings = ({{/* Rotation Controls */}<Group justify="center" gap="lg"><ActionIcon- size="xl"- variant="outline"+ size="lg"+ variant="secondary"onClick={parameters.rotateAnticlockwise}disabled={disabled}aria-label={t("rotate.rotateLeft", "Rotate Anticlockwise")}@@ -105,8 +106,8 @@ const RotateSettings = ({</ActionIcon><ActionIcon- size="xl"- variant="outline"+ size="lg"+ variant="secondary"onClick={parameters.rotateClockwise}disabled={disabled}aria-label={t("rotate.rotateRight", "Rotate Clockwise")}diff --git a/frontend/editor/src/core/components/tools/shared/NavigationControls.tsx b/frontend/editor/src/core/components/tools/shared/NavigationControls.tsxindex c17e61f252..0692907f17 100644--- a/frontend/editor/src/core/components/tools/shared/NavigationControls.tsx+++ b/frontend/editor/src/core/components/tools/shared/NavigationControls.tsx@@ -1,6 +1,8 @@-import { Stack, Group, ActionIcon, Text } from "@mantine/core";+import { Stack, Group, Text } from "@mantine/core";+import { useTranslation } from "react-i18next";import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";import ChevronRightIcon from "@mui/icons-material/ChevronRight";+import { ActionIcon } from "@app/ui/ActionIcon";export interface NavigationControlsProps {currentIndex: number;@@ -15,13 +17,15 @@ const NavigationControls = ({onPrevious,onNext,}: NavigationControlsProps) => {+ const { t } = useTranslation();if (totalFiles <= 1) return null;return (<Stack align="center" gap="xs" mt="xs"><Group justify="center" gap="xs"><ActionIcon- variant="light"+ aria-label={t("common.previous", "Previous")}+ variant="secondary"size="sm"onClick={onPrevious}disabled={totalFiles <= 1}@@ -34,7 +38,8 @@ const NavigationControls = ({</Text><ActionIcon- variant="light"+ aria-label={t("common.next", "Next")}+ variant="secondary"size="sm"onClick={onNext}disabled={totalFiles <= 1}diff --git a/frontend/editor/src/core/components/tools/shared/OperationButton.tsx b/frontend/editor/src/core/components/tools/shared/OperationButton.tsxindex afe56a5d1c..9da4f03170 100644--- a/frontend/editor/src/core/components/tools/shared/OperationButton.tsx+++ b/frontend/editor/src/core/components/tools/shared/OperationButton.tsx@@ -1,5 +1,6 @@-import { Button, Box } from "@mantine/core";+import { Box } from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button, type ButtonVariant, type ButtonAccent } from "@app/ui/Button";import { Tooltip } from "@app/components/shared/Tooltip";import { useBackendHealth } from "@app/hooks/useBackendHealth";import { CloudBadge } from "@app/components/shared/CloudBadge";@@ -23,6 +24,26 @@ export interface OperationButtonProps {"data-tour"?: string;}+export const operationButtonVariantMap: Record<+ NonNullable<OperationButtonProps["variant"]>,+ ButtonVariant+> = {+ filled: "primary",+ outline: "secondary",+ subtle: "tertiary",+};++export const operationButtonAccentMap: Record<string, ButtonAccent> = {+ gray: "neutral",+ grey: "neutral",+ blue: "default",+ red: "danger",+ green: "success",+ yellow: "warning",+ violet: "premium",+ grape: "premium",+};+const OperationButton = ({onClick,isLoading = false,@@ -77,31 +98,29 @@ const OperationButton = ({? (reasonTooltip[disabledReason] ?? null): null;+ const sharedVariant: ButtonVariant =+ operationButtonVariantMap[variant] ?? "primary";+ const sharedAccent: ButtonAccent =+ operationButtonAccentMap[color] ?? "default";+const button = (<Buttontype={type}onClick={onClick}fullWidth={fullWidth || !!tooltipLabel}- mr={tooltipLabel ? 0 : "md"}- ml={tooltipLabel ? 0 : "md"}- mt={tooltipLabel ? 0 : mt}loading={isLoading}disabled={combinedDisabled}- variant={variant}- color={color}+ variant={sharedVariant}+ accent={sharedAccent}data-testid={dataTestId}data-tour={dataTour}- style={{ minHeight: "2.5rem", height: "auto", position: "relative" }}- styles={{- label: {- whiteSpace: "normal",- textAlign: "center",- lineHeight: 1.2,- },- inner: {- paddingTop: "0.25rem",- paddingBottom: "0.25rem",- },+ style={{+ minHeight: "2.5rem",+ height: "auto",+ position: "relative",+ marginLeft: tooltipLabel ? 0 : "1rem",+ marginRight: tooltipLabel ? 0 : "1rem",+ marginTop: tooltipLabel ? 0 : `var(--mantine-spacing-${mt})`,}}>{isLoadingdiff --git a/frontend/editor/src/core/components/tools/shared/ReviewToolStep.tsx b/frontend/editor/src/core/components/tools/shared/ReviewToolStep.tsxindex 82e936678e..8c89029913 100644--- a/frontend/editor/src/core/components/tools/shared/ReviewToolStep.tsx+++ b/frontend/editor/src/core/components/tools/shared/ReviewToolStep.tsx@@ -1,6 +1,7 @@import React, { useEffect, useRef } from "react";-import { Button, Stack } from "@mantine/core";+import { Stack } from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";import UndoIcon from "@mui/icons-material/Undo";import ErrorNotification from "@app/components/tools/shared/ErrorNotification";import ResultsPreview from "@app/components/tools/shared/ResultsPreview";@@ -128,8 +129,8 @@ function ReviewStepContent<TParams = unknown>({><ButtonleftSection={<UndoIcon />}- variant="outline"- color="var(--mantine-color-gray-6)"+ variant="secondary"+ accent="neutral"onClick={handleUndo}fullWidth>@@ -141,9 +142,8 @@ function ReviewStepContent<TParams = unknown>({<Buttondata-testid="download-result-button"leftSection={<DownloadIcon />}- color="blue"fullWidth- mb="md"+ style={{ marginBottom: "1rem" }}onClick={handleDownload}>{terminology.download}diff --git a/frontend/editor/src/core/components/tools/shared/ScopedOperationButton.tsx b/frontend/editor/src/core/components/tools/shared/ScopedOperationButton.tsxindex 1761c91e4b..0dd351e95e 100644--- a/frontend/editor/src/core/components/tools/shared/ScopedOperationButton.tsx+++ b/frontend/editor/src/core/components/tools/shared/ScopedOperationButton.tsx@@ -1,7 +1,10 @@-import { Text, Box, Button } from "@mantine/core";+import { Text, Box } from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button, type ButtonVariant, type ButtonAccent } from "@app/ui/Button";import OperationButton, {OperationButtonProps,+ operationButtonVariantMap,+ operationButtonAccentMap,} from "@app/components/tools/shared/OperationButton";import { StirlingFile } from "@app/types/fileContext";import { useAllFiles } from "@app/contexts/FileContext";@@ -73,6 +76,11 @@ export function ScopedOperationButton({allFiles.length > 0 &&selectedFiles.length === 0;+ const loadingVariant: ButtonVariant =+ operationButtonVariantMap[props.variant ?? "filled"] ?? "primary";+ const loadingAccent: ButtonAccent =+ operationButtonAccentMap[props.color ?? "blue"] ?? "default";+return (<>{isFilesHydrating ? (@@ -81,8 +89,8 @@ export function ScopedOperationButton({fullWidthdisabledloading={!isBulkLoading}- variant={props.variant ?? "filled"}- color={props.color ?? "blue"}+ variant={loadingVariant}+ accent={loadingAccent}style={{position: "relative",overflow: "hidden",diff --git a/frontend/editor/src/core/components/tools/showJS/ShowJSView.tsx b/frontend/editor/src/core/components/tools/showJS/ShowJSView.tsxindex 6585b1cddf..685d238e79 100644--- a/frontend/editor/src/core/components/tools/showJS/ShowJSView.tsx+++ b/frontend/editor/src/core/components/tools/showJS/ShowJSView.tsx@@ -5,16 +5,9 @@ import React, {useRef,useState,} from "react";-import {- ActionIcon,- Box,- Button,- Group,- Stack,- Text,- ScrollArea,- TextInput,-} from "@mantine/core";+import { Box, Group, Stack, Text, ScrollArea, TextInput } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import ContentCopyRoundedIcon from "@mui/icons-material/ContentCopyRounded";import ArrowUpwardRoundedIcon from "@mui/icons-material/ArrowUpwardRounded";import ArrowDownwardRoundedIcon from "@mui/icons-material/ArrowDownwardRounded";@@ -168,7 +161,7 @@ const ShowJSView: React.FC<ShowJSViewProps> = ({ data }) => {</Text><ActionIconsize="sm"- variant="subtle"+ variant="tertiary"onClick={() => {if (matches.length)setActive((p) => (p - 1 + matches.length) % matches.length);@@ -179,7 +172,7 @@ const ShowJSView: React.FC<ShowJSViewProps> = ({ data }) => {</ActionIcon><ActionIconsize="sm"- variant="subtle"+ variant="tertiary"onClick={() => {if (matches.length) setActive((p) => (p + 1) % matches.length);}}@@ -190,8 +183,8 @@ const ShowJSView: React.FC<ShowJSViewProps> = ({ data }) => {</Group><Group gap="xs" align="center" className="showjs-toolbar-controls"><Button- size="xs"- variant="subtle"+ variant="tertiary"+ size="sm"className="showjs-outline-button"onClick={handleDownload}disabled={!downloadUrl}@@ -200,8 +193,8 @@ const ShowJSView: React.FC<ShowJSViewProps> = ({ data }) => {{terminology.download}</Button><Button- size="xs"- variant="subtle"+ variant="tertiary"+ size="sm"className="showjs-outline-button"onClick={handleCopy}leftSection={<ContentCopyRoundedIcon fontSize="small" />}@@ -321,7 +314,8 @@ const ShowJSView: React.FC<ShowJSViewProps> = ({ data }) => {><div className="code-gutter">{end != null ? (- <button+ <Button+ variant="tertiary"className={`fold-toggle ${folded ? "fold-collapsed" : ""}`}onClick={() => toggleFold(ln)}aria-label={@@ -331,7 +325,7 @@ const ShowJSView: React.FC<ShowJSViewProps> = ({ data }) => {}>{folded ? "▸" : "▾"}- </button>+ </Button>) : (<span className="fold-placeholder" />)}diff --git a/frontend/editor/src/core/components/tools/sign/SavedSignaturesSection.tsx b/frontend/editor/src/core/components/tools/sign/SavedSignaturesSection.tsxindex 8b40b8721a..50cc3d2fe2 100644--- a/frontend/editor/src/core/components/tools/sign/SavedSignaturesSection.tsx+++ b/frontend/editor/src/core/components/tools/sign/SavedSignaturesSection.tsx@@ -1,7 +1,6 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import {- ActionIcon,Alert,Badge,Box,@@ -13,6 +12,7 @@ import {Tooltip,} from "@mantine/core";import { LocalIcon } from "@app/components/shared/LocalIcon";+import { ActionIcon } from "@app/ui/ActionIcon";import {SavedSignature,SavedSignatureType,@@ -301,7 +301,7 @@ export const SavedSignaturesSection = ({</Text><Group gap={4}><ActionIcon- variant="light"+ variant="secondary"aria-label={translate("saved.prev", "Previous")}onClick={() =>setActivePersonalIndex((prev) => Math.max(0, prev - 1))@@ -315,7 +315,7 @@ export const SavedSignaturesSection = ({/></ActionIcon><ActionIcon- variant="light"+ variant="secondary"aria-label={translate("saved.next", "Next")}onClick={() =>setActivePersonalIndex((prev) =>@@ -351,8 +351,7 @@ export const SavedSignaturesSection = ({</Badge><Group gap="xs"><ActionIcon- variant="subtle"- color="blue"+ variant="tertiary"aria-label={t("sign.saved.use", "Use signature")}onClick={() => onUseSignature(activePersonalSignature)}disabled={disabled}@@ -365,8 +364,8 @@ export const SavedSignaturesSection = ({</ActionIcon><Tooltip label={translate("saved.delete", "Remove")}><ActionIcon- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"aria-label={translate("saved.delete", "Remove")}onClick={() =>onDeleteSignature(activePersonalSignature)@@ -432,7 +431,7 @@ export const SavedSignaturesSection = ({</Text><Group gap={4}><ActionIcon- variant="light"+ variant="secondary"aria-label={translate("saved.prev", "Previous")}onClick={() =>setActiveSharedIndex((prev) => Math.max(0, prev - 1))@@ -446,7 +445,7 @@ export const SavedSignaturesSection = ({/></ActionIcon><ActionIcon- variant="light"+ variant="secondary"aria-label={translate("saved.next", "Next")}onClick={() =>setActiveSharedIndex((prev) =>@@ -478,8 +477,7 @@ export const SavedSignaturesSection = ({</Badge><Group gap="xs"><ActionIcon- variant="subtle"- color="blue"+ variant="tertiary"aria-label={t("sign.saved.use", "Use signature")}onClick={() => onUseSignature(activeSharedSignature)}disabled={disabled}@@ -493,8 +491,8 @@ export const SavedSignaturesSection = ({{isAdmin && (<Tooltip label={translate("saved.delete", "Remove")}><ActionIcon- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"aria-label={translate("saved.delete", "Remove")}onClick={() =>onDeleteSignature(activeSharedSignature)@@ -564,7 +562,7 @@ export const SavedSignaturesSection = ({</Text><Group gap={4}><ActionIcon- variant="light"+ variant="secondary"aria-label={translate("saved.prev", "Previous")}onClick={() =>setActiveLocalStorageIndex((prev) =>@@ -580,7 +578,7 @@ export const SavedSignaturesSection = ({/></ActionIcon><ActionIcon- variant="light"+ variant="secondary"aria-label={translate("saved.next", "Next")}onClick={() =>setActiveLocalStorageIndex((prev) =>@@ -616,8 +614,7 @@ export const SavedSignaturesSection = ({</Badge><Group gap="xs"><ActionIcon- variant="subtle"- color="blue"+ variant="tertiary"aria-label={t("sign.saved.use", "Use signature")}onClick={() =>onUseSignature(activeLocalStorageSignature)@@ -632,8 +629,8 @@ export const SavedSignaturesSection = ({</ActionIcon><Tooltip label={translate("saved.delete", "Remove")}><ActionIcon- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"aria-label={translate("saved.delete", "Remove")}onClick={() =>onDeleteSignature(activeLocalStorageSignature)diff --git a/frontend/editor/src/core/components/tools/sign/SignSettings.tsx b/frontend/editor/src/core/components/tools/sign/SignSettings.tsxindex de7a410b0d..648ada1c47 100644--- a/frontend/editor/src/core/components/tools/sign/SignSettings.tsx+++ b/frontend/editor/src/core/components/tools/sign/SignSettings.tsx@@ -2,16 +2,15 @@import { useTranslation } from "react-i18next";import {Stack,- Button,Text,Alert,- SegmentedControl,Divider,- ActionIcon,Tooltip,Group,Box,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { SignParameters } from "@app/hooks/tools/sign/useSignParameters";import { useSignature } from "@app/contexts/SignatureContext";import { useViewer } from "@app/contexts/ViewerContext";@@ -437,9 +436,9 @@ const SignSettings = ({const button = (<Button- size="xs"- variant="outline"- color={isSaved ? "green" : undefined}+ size="sm"+ variant="secondary"+ accent={isSaved ? "success" : undefined}onClick={() => onClick(scope)}disabled={!isReady || disabled || isSavedSignatureLimitReached || !hasChanges@@ -1122,49 +1121,33 @@ const SignSettings = ({onActivateSignaturePlacement || onDeactivateSignature ? (isPlacementMode ? (<Tooltip label={translate("mode.pause", "Pause placement")}>- <ActionIcon- variant="default"- size="lg"+ <Button+ variant="secondary"aria-label={translate("mode.pause", "Pause placement")}onClick={handlePausePlacement}disabled={disabled || !onDeactivateSignature}- style={{- width: "auto",- paddingInline: "0.75rem",- display: "inline-flex",- alignItems: "center",- gap: "0.4rem",- }}+ leftSection={+ <LocalIcon icon="pause-circle-rounded" width={20} height={20} />+ }>- <LocalIcon icon="pause-circle-rounded" width={20} height={20} />- <Text component="span" size="sm" fw={500}>- {translate("mode.pause", "Pause placement")}- </Text>- </ActionIcon>+ {translate("mode.pause", "Pause placement")}+ </Button></Tooltip>) : (<Tooltip label={translate("mode.resume", "Resume placement")}>- <ActionIcon- variant="default"- size="lg"+ <Button+ variant="secondary"aria-label={translate("mode.resume", "Resume placement")}onClick={handleResumePlacement}disabled={disabled || !isCurrentTypeReady || !onActivateSignaturePlacement}- style={{- width: "auto",- paddingInline: "0.75rem",- display: "inline-flex",- alignItems: "center",- gap: "0.4rem",- }}+ leftSection={+ <LocalIcon icon="play-arrow-rounded" width={20} height={20} />+ }>- <LocalIcon icon="play-arrow-rounded" width={20} height={20} />- <Text component="span" size="sm" fw={500}>- {translate("mode.resume", "Resume placement")}- </Text>- </ActionIcon>+ {translate("mode.resume", "Resume placement")}+ </Button></Tooltip>)) : null;@@ -1185,7 +1168,7 @@ const SignSettings = ({onChange={(value) =>handleSignatureSourceChange(value as SignatureSource)}- data={sourceOptions}+ options={sourceOptions}/>)}{renderSignatureBuilder()}@@ -1228,7 +1211,7 @@ const SignSettings = ({/>{onSave && (- <Button onClick={onSave} color="blue" variant="filled" fullWidth>+ <Button onClick={onSave} fullWidth>{translate("applySignatures", "Apply Signatures")}</Button>)}diff --git a/frontend/editor/src/core/components/tools/toolPicker/FavoriteStar.tsx b/frontend/editor/src/core/components/tools/toolPicker/FavoriteStar.tsxindex d951951421..10bd556df9 100644--- a/frontend/editor/src/core/components/tools/toolPicker/FavoriteStar.tsx+++ b/frontend/editor/src/core/components/tools/toolPicker/FavoriteStar.tsx@@ -1,31 +1,38 @@import React from "react";-import { ActionIcon } from "@mantine/core";-import type { MantineSize } from "@mantine/core";import { useTranslation } from "react-i18next";import StarRoundedIcon from "@mui/icons-material/StarRounded";import StarBorderRoundedIcon from "@mui/icons-material/StarBorderRounded";-+import { ActionIcon } from "@app/ui/ActionIcon";+import type { ActionIconSize } from "@app/ui/ActionIcon";+type FavoriteStarSize = "xs" | ActionIconSize;+const SIZE_MAP: Record<FavoriteStarSize, ActionIconSize> = {+ xs: "sm",+ sm: "sm",+ md: "md",+ lg: "lg",+ xl: "xl",+};interface FavoriteStarProps {isFavorite: boolean;onToggle: () => void;className?: string;- size?: MantineSize;+ size?: FavoriteStarSize;}const FavoriteStar: React.FC<FavoriteStarProps> = ({isFavorite,onToggle,className,- size = "xs",+ size = "sm",}) => {const { t } = useTranslation();return (<ActionIcon- component="span"- variant="subtle"- radius="xl"- size={size}+ as="span"+ variant="tertiary"+ shape="circle"+ size={SIZE_MAP[size]}onClick={(e: React.MouseEvent) => {e.stopPropagation();onToggle();diff --git a/frontend/editor/src/core/components/tools/toolPicker/ToolButton.tsx b/frontend/editor/src/core/components/tools/toolPicker/ToolButton.tsxindex e184ae6d58..efbe3bb2cb 100644--- a/frontend/editor/src/core/components/tools/toolPicker/ToolButton.tsx+++ b/frontend/editor/src/core/components/tools/toolPicker/ToolButton.tsx@@ -1,5 +1,6 @@import React, { memo } from "react";-import { Button, Badge } from "@mantine/core";+import { Badge } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { Tooltip } from "@app/components/shared/Tooltip";import { ToolIcon } from "@app/components/shared/ToolIcon";@@ -143,84 +144,83 @@ const ToolButton: React.FC<ToolButtonProps> = ({</div></div>);-+ const buttonIcon = (+ <ToolIcon icon={tool.icon} opacity={visuallyUnavailable ? 0.25 : 1} />+ );const buttonContent = (- <>- <ToolIcon icon={tool.icon} opacity={visuallyUnavailable ? 0.25 : 1} />+ <div+ style={{+ display: "flex",+ flexDirection: "column",+ alignItems: "flex-start",+ flex: 1,+ overflow: "visible",+ }}+ ><divstyle={{display: "flex",- flexDirection: "column",- alignItems: "flex-start",- flex: 1,- overflow: "visible",+ alignItems: "center",+ gap: "0.5rem",+ width: "100%",}}>- <div+ <FitText+ text={tool.name}+ lines={1}+ minimumFontScale={0.8}+ as="span"style={{- display: "flex",- alignItems: "center",- gap: "0.5rem",- width: "100%",+ display: "inline-block",+ maxWidth: "100%",+ opacity: visuallyUnavailable ? 0.25 : 1,}}- >- <FitText- text={tool.name}- lines={1}- minimumFontScale={0.8}- as="span"- style={{- display: "inline-block",- maxWidth: "100%",- opacity: visuallyUnavailable ? 0.25 : 1,- }}- />- {tool.versionStatus === "alpha" && (- <Badge- size="xs"- variant="light"- color="orange"- style={{ flexShrink: 0, opacity: visuallyUnavailable ? 0.25 : 1 }}- >- {t("toolPanel.alpha", "Alpha")}- </Badge>- )}- {typeof badgeCount === "number" && badgeCount > 0 && (- <Badge- size="sm"- variant="filled"- color="red"- style={{ flexShrink: 0 }}- >- {badgeCount}- </Badge>- )}- {usesCloud && !visuallyUnavailable && <CloudBadge />}- </div>- {showDescription && tool.description && (- <span- className="tool-button__description"- style={{ opacity: visuallyUnavailable ? 0.25 : 1 }}+ />+ {tool.versionStatus === "alpha" && (+ <Badge+ size="xs"+ variant="light"+ color="orange"+ style={{ flexShrink: 0, opacity: visuallyUnavailable ? 0.25 : 1 }}>- {tool.description}- </span>+ {t("toolPanel.alpha", "Alpha")}+ </Badge>)}- {matchedSynonym && (- <span- style={{- fontSize: "0.75rem",- color: "var(--mantine-color-dimmed)",- opacity: visuallyUnavailable ? 0.25 : 1,- marginTop: "1px",- overflow: "visible",- whiteSpace: "nowrap",- }}+ {typeof badgeCount === "number" && badgeCount > 0 && (+ <Badge+ size="sm"+ variant="filled"+ color="red"+ style={{ flexShrink: 0 }}>- {matchedSynonym}- </span>+ {badgeCount}+ </Badge>)}+ {usesCloud && !visuallyUnavailable && <CloudBadge />}</div>- </>+ {showDescription && tool.description && (+ <span+ className="tool-button__description"+ style={{ opacity: visuallyUnavailable ? 0.25 : 1 }}+ >+ {tool.description}+ </span>+ )}+ {matchedSynonym && (+ <span+ style={{+ fontSize: "0.75rem",+ color: "var(--mantine-color-dimmed)",+ opacity: visuallyUnavailable ? 0.25 : 1,+ marginTop: "1px",+ overflow: "visible",+ whiteSpace: "nowrap",+ }}+ >+ {matchedSynonym}+ </span>+ )}+ </div>);const handleExternalClick = (e: React.MouseEvent) => {@@ -234,24 +234,21 @@ const ToolButton: React.FC<ToolButtonProps> = ({const buttonElement = navProps ? (// For internal tools with URLs, render Button as an anchor for proper link behavior<Button- component="a"+ as="a"href={navProps.href}onClick={navProps.onClick}- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- radius="md"fullWidth- justify="flex-start"+ justify="start"className="tool-button"data-tour={`tool-button-${id}`}- styles={{- root: {- borderRadius: 0,- color: "var(--tools-text-and-icon-color)",- overflow: "visible",- ...selectedBg,- },- label: { overflow: "visible" },+ leftSection={buttonIcon}+ style={{+ borderRadius: 0,+ overflow: "visible",+ ...selectedBg,}}>{buttonContent}@@ -259,26 +256,23 @@ const ToolButton: React.FC<ToolButtonProps> = ({) : tool.link && !isUnavailable ? (// For external links, render Button as an anchor with proper href<Button- component="a"+ as="a"href={tool.link}target="_blank"rel="noopener noreferrer"onClick={handleExternalClick}- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- radius="md"fullWidth- justify="flex-start"+ justify="start"className="tool-button"data-tour={`tool-button-${id}`}- styles={{- root: {- borderRadius: 0,- color: "var(--tools-text-and-icon-color)",- overflow: "visible",- ...selectedBg,- },- label: { overflow: "visible" },+ leftSection={buttonIcon}+ style={{+ borderRadius: 0,+ overflow: "visible",+ ...selectedBg,}}>{buttonContent}@@ -286,23 +280,20 @@ const ToolButton: React.FC<ToolButtonProps> = ({) : (// For unavailable tools, use regular button<Button- variant="subtle"+ variant="tertiary"+ accent="neutral"onClick={() => handleClick(id)}size="sm"- radius="md"fullWidth- justify="flex-start"+ justify="start"className="tool-button"aria-disabled={isUnavailable}data-tour={`tool-button-${id}`}- styles={{- root: {- borderRadius: 0,- color: "var(--tools-text-and-icon-color)",- cursor: visuallyUnavailable ? "not-allowed" : undefined,- overflow: "visible",- },- label: { overflow: "visible" },+ leftSection={buttonIcon}+ style={{+ borderRadius: 0,+ cursor: visuallyUnavailable ? "not-allowed" : undefined,+ overflow: "visible",}}>{buttonContent}diff --git a/frontend/editor/src/core/components/tools/toolPicker/ToolPicker.css b/frontend/editor/src/core/components/tools/toolPicker/ToolPicker.cssindex 338afb095a..1a24278b4d 100644--- a/frontend/editor/src/core/components/tools/toolPicker/ToolPicker.css+++ b/frontend/editor/src/core/components/tools/toolPicker/ToolPicker.css@@ -72,7 +72,7 @@padding-left: 0.5rem;}-.tool-button .mantine-Button-label {+.tool-button .sui-btn__label {font-size: 0.84rem;font-weight: 500;line-height: 1.2;@@ -90,7 +90,8 @@.tool-button-star {position: absolute;- top: 0.35rem;+ top: 50%;+ transform: translateY(-50%);right: 0.35rem;opacity: 0;transition: opacity 0.2s ease;@@ -126,7 +127,7 @@height: auto;}-.tool-picker__compact .tool-button .mantine-Button-label {+.tool-picker__compact .tool-button .sui-btn__label {align-items: center;}diff --git a/frontend/editor/src/core/components/tools/toolPicker/ToolSearch.tsx b/frontend/editor/src/core/components/tools/toolPicker/ToolSearch.tsxindex ae136c4333..66463b9005 100644--- a/frontend/editor/src/core/components/tools/toolPicker/ToolSearch.tsx+++ b/frontend/editor/src/core/components/tools/toolPicker/ToolSearch.tsx@@ -1,5 +1,6 @@import { useState, useRef, useEffect, useMemo } from "react";-import { Stack, Button, Text } from "@mantine/core";+import { Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { ToolRegistryEntry } from "@app/data/toolsTaxonomy";@@ -141,7 +142,7 @@ const ToolSearch = ({{filteredTools.map(({ id, tool }) => (<Buttonkey={id}- variant="subtle"+ variant="tertiary"onClick={() => {onToolSelect?.(id as ToolId);setDropdownOpen(false);@@ -152,7 +153,7 @@ const ToolSearch = ({</div>}fullWidth- justify="flex-start"+ justify="start"style={{borderRadius: "6px",color: "var(--tools-text-and-icon-color)",diff --git a/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureResults.tsx b/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureResults.tsxindex e805a47636..22020ac6dc 100644--- a/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureResults.tsx+++ b/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureResults.tsx@@ -2,14 +2,14 @@ import { useCallback, useMemo, useState } from "react";import {Alert,Badge,- Button,Divider,Group,Loader,Stack,Text,- SegmentedControl,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import type { SignatureValidationReportEntry } from "@app/types/validateSignature";import type { ValidateSignatureOperationHook } from "@app/hooks/tools/validateSignature/useValidateSignatureOperation";@@ -119,10 +119,16 @@ const ValidateSignatureResults = ({return t("validateSignature.downloadJson", "Download JSON");}, [selectedType, t]);- const downloadTypeOptions = [+ const downloadTypeOptions: {+ label: string;+ value: "pdf" | "csv" | "json";+ }[] = [{ label: t("validateSignature.downloadType.pdf", "PDF"), value: "pdf" },{ label: t("validateSignature.downloadType.csv", "CSV"), value: "csv" },- { label: t("validateSignature.downloadType.json", "JSON"), value: "json" },+ {+ label: t("validateSignature.downloadType.json", "JSON"),+ value: "json",+ },];const handleDownload = useCallback((file: File) => {@@ -289,10 +295,9 @@ const ValidateSignatureResults = ({<SegmentedControlvalue={selectedType}onChange={(v) => setSelectedType(v as "pdf" | "csv" | "json")}- data={downloadTypeOptions}+ options={downloadTypeOptions}/><Button- color="blue"onClick={() => selectedFile && handleDownload(selectedFile)}disabled={!selectedFile}fullWidthdiff --git a/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureSettings.tsx b/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureSettings.tsxindex 018afc5fea..5e865551c0 100644--- a/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureSettings.tsx+++ b/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureSettings.tsx@@ -1,4 +1,5 @@-import { Card, Group, Stack, Text, Button } from "@mantine/core";+import { Card, Group, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import FileUploadButton from "@app/components/shared/FileUploadButton";import { ValidateSignatureParameters } from "@app/hooks/tools/validateSignature/useValidateSignatureParameters";@@ -52,8 +53,7 @@ const ValidateSignatureSettings = ({/>{certFile && (<Button- variant="subtle"- color="gray"+ variant="tertiary"onClick={() => handleCertFileChange(null)}disabled={disabled}>diff --git a/frontend/editor/src/core/components/viewer/AnnotationMenuButtons.tsx b/frontend/editor/src/core/components/viewer/AnnotationMenuButtons.tsxindex 2b6608d582..1ca0652483 100644--- a/frontend/editor/src/core/components/viewer/AnnotationMenuButtons.tsx+++ b/frontend/editor/src/core/components/viewer/AnnotationMenuButtons.tsx@@ -1,11 +1,4 @@-import {- ActionIcon,- Tooltip,- Popover,- TextInput,- Button,- Stack,-} from "@mantine/core";+import { Tooltip, Popover, TextInput, Stack } from "@mantine/core";import { useState } from "react";import { useTranslation } from "react-i18next";import DeleteIcon from "@mui/icons-material/Delete";@@ -14,41 +7,20 @@ import CommentIcon from "@mui/icons-material/ChatBubbleOutlineRounded";import AddCommentIcon from "@mui/icons-material/AddCommentOutlined";import OpenInNewIcon from "@mui/icons-material/OpenInNewRounded";import LocalIcon from "@app/components/shared/LocalIcon";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import type { FirstLinkTarget } from "@app/components/viewer/useAnnotationMenuHandlers";-export const commonButtonStyles = {- root: {- flexShrink: 0,- backgroundColor: "var(--bg-raised)",- border: "1px solid var(--border-default)",- color: "var(--text-secondary)",- "&:hover": {- backgroundColor: "var(--hover-bg)",- borderColor: "var(--border-strong)",- color: "var(--text-primary)",- },- },-};-export function DeleteButton({ onDelete }: { onDelete: () => void }) {const { t } = useTranslation();return (<Tooltip label={t("annotation.delete", "Delete")}><ActionIcon- variant="subtle"- color="red"+ aria-label={t("annotation.delete", "Delete")}+ variant="secondary"+ accent="danger"size="md"onClick={onDelete}- styles={{- root: {- ...commonButtonStyles.root,- "&:hover": {- backgroundColor: "var(--mantine-color-red-1)",- borderColor: "var(--mantine-color-red-4)",- color: "var(--mantine-color-red-7)",- },- },- }}><DeleteIcon style={{ fontSize: 18 }} /></ActionIcon>@@ -61,11 +33,11 @@ export function EditTextButton({ onEdit }: { onEdit: () => void }) {return (<Tooltip label={t("annotation.editText", "Edit Text")}><ActionIcon- variant="subtle"- color="gray"+ aria-label={t("annotation.editText", "Edit Text")}+ variant="secondary"+ accent="neutral"size="md"onClick={onEdit}- styles={commonButtonStyles}><EditIcon style={{ fontSize: 18 }} /></ActionIcon>@@ -85,20 +57,17 @@ export function AttachCommentButton({onAdd,}: AttachCommentButtonProps) {const { t } = useTranslation();+ const label = isInSidebar+ ? t("viewer.comments.viewComment", "View comment")+ : t("viewer.comments.addComment", "Add comment");return (- <Tooltip- label={- isInSidebar- ? t("viewer.comments.viewComment", "View comment")- : t("viewer.comments.addComment", "Add comment")- }- >+ <Tooltip label={label}><ActionIcon- variant={isInSidebar ? "filled" : "subtle"}- color={isInSidebar ? "blue" : "gray"}+ aria-label={label}+ variant={isInSidebar ? "primary" : "secondary"}+ accent={isInSidebar ? undefined : "neutral"}size="md"onClick={isInSidebar ? onView : onAdd}- styles={isInSidebar ? undefined : commonButtonStyles}><AddCommentIcon style={{ fontSize: 18 }} /></ActionIcon>@@ -113,20 +82,17 @@ interface CommentButtonProps {export function CommentButton({ hasContent, onClick }: CommentButtonProps) {const { t } = useTranslation();+ const label = hasContent+ ? t("viewer.comments.viewComment", "View comment")+ : t("viewer.comments.addComment", "Add comment");return (- <Tooltip- label={- hasContent- ? t("viewer.comments.viewComment", "View comment")- : t("viewer.comments.addComment", "Add comment")- }- >+ <Tooltip label={label}><ActionIcon- variant="subtle"- color="gray"+ aria-label={label}+ variant="secondary"+ accent="neutral"size="md"onClick={onClick}- styles={commonButtonStyles}><CommentIcon style={{ fontSize: 18 }} /></ActionIcon>@@ -153,11 +119,11 @@ export function LinkButton({return (<Tooltip label={t("viewer.comments.goToLink", "Go to link")}><ActionIcon- variant="subtle"- color="gray"+ aria-label={t("viewer.comments.goToLink", "Go to link")}+ variant="secondary"+ accent="neutral"size="md"onClick={onGoToLink}- styles={commonButtonStyles}><OpenInNewIcon style={{ fontSize: 18 }} /></ActionIcon>@@ -170,11 +136,11 @@ export function LinkButton({<Popover.Target><Tooltip label={t("viewer.comments.addLink", "Add link")}><ActionIcon- variant="subtle"- color="gray"+ aria-label={t("viewer.comments.addLink", "Add link")}+ variant="secondary"+ accent="neutral"size="md"onClick={() => setOpen((o) => !o)}- styles={commonButtonStyles}><LocalIcon icon="link" width="1.25rem" height="1.25rem" /></ActionIcon>@@ -190,7 +156,7 @@ export function LinkButton({style={{ minWidth: 220 }}/><Button- size="xs"+ size="sm"disabled={!url.trim()}onClick={() => {onAddLink(url);diff --git a/frontend/editor/src/core/components/viewer/AttachmentSidebar.tsx b/frontend/editor/src/core/components/viewer/AttachmentSidebar.tsxindex a858498bb6..4dcc61fe2b 100644--- a/frontend/editor/src/core/components/viewer/AttachmentSidebar.tsx+++ b/frontend/editor/src/core/components/viewer/AttachmentSidebar.tsx@@ -1,15 +1,8 @@import { useEffect, useMemo, useRef, useState, useCallback } from "react";-import {- Box,- ScrollArea,- Text,- ActionIcon,- Button,- Loader,- Stack,- TextInput,-} from "@mantine/core";+import { Box, ScrollArea, Text, Loader, Stack, TextInput } from "@mantine/core";import LocalIcon from "@app/components/shared/LocalIcon";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useViewer } from "@app/contexts/ViewerContext";import { useToolWorkflow } from "@app/contexts/ToolWorkflowContext";import { PdfAttachmentObject } from "@embedpdf/models";@@ -322,9 +315,10 @@ export const AttachmentSidebar = ({)}</div><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"className="attachment-item__download-icon"+ aria-label={t("viewer.attachments.download", "Download attachment")}onClick={(event) => handleDownload(attachment, event)}><DownloadIcon sx={{ fontSize: "1.2rem" }} />@@ -388,11 +382,14 @@ export const AttachmentSidebar = ({</div><Box style={{ display: "flex", alignItems: "center", gap: 2 }}><ActionIcon- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- color="gray"onClick={toggleAttachmentSidebar}- aria-label="Close attachments sidebar"+ aria-label={t(+ "viewer.attachments.closeSidebar",+ "Close attachments sidebar",+ )}title={t("viewer.attachments.close", "Close attachments")}><LocalIcon icon="close-rounded" width="1.1rem" height="1.1rem" />@@ -451,7 +448,11 @@ export const AttachmentSidebar = ({<Text size="sm" c="red" ta="center">{currentError}</Text>- <ActionIcon variant="light" onClick={requestReload}>+ <ActionIcon+ variant="secondary"+ aria-label={t("viewer.attachments.retry", "Retry")}+ onClick={requestReload}+ ><LocalIcon icon="refresh" /></ActionIcon></Stack>@@ -487,8 +488,8 @@ export const AttachmentSidebar = ({)}</Text><Button- variant="light"- size="xs"+ variant="secondary"+ size="sm"onClick={handleAddAttachment}leftSection={<LocalIcon icon="add" width="1rem" height="1rem" />@@ -502,20 +503,15 @@ export const AttachmentSidebar = ({{showAttachmentList && (<><Button- variant="subtle"- size="compact-xs"+ variant="tertiary"+ size="sm"fullWidth+ justify="start"onClick={handleAddAttachment}leftSection={<LocalIcon icon="add" width="0.9rem" height="0.9rem" />}- mb="xs"- styles={{- root: {- justifyContent: "flex-start",- paddingInline: 6,- },- }}+ style={{ marginBottom: "var(--space-xs)" }}>{t("viewer.attachments.addAttachment", "Add attachment")}</Button>diff --git a/frontend/editor/src/core/components/viewer/BookmarkSidebar.tsx b/frontend/editor/src/core/components/viewer/BookmarkSidebar.tsxindex 40bd9d3045..e9ae53183e 100644--- a/frontend/editor/src/core/components/viewer/BookmarkSidebar.tsx+++ b/frontend/editor/src/core/components/viewer/BookmarkSidebar.tsx@@ -3,16 +3,15 @@ import {Box,ScrollArea,Text,- ActionIcon,Loader,Stack,TextInput,NumberInput,- Button,Group,- UnstyledButton,} from "@mantine/core";import LocalIcon from "@app/components/shared/LocalIcon";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useViewer } from "@app/contexts/ViewerContext";import { useToolWorkflow } from "@app/contexts/ToolWorkflowContext";import { useFileContext } from "@app/contexts/FileContext";@@ -20,6 +19,7 @@ import { isStirlingFile, type FileId } from "@app/types/fileContext";import { createStirlingFilesAndStubs } from "@app/services/fileStubHelpers";import apiClient from "@app/services/apiClient";import { PdfBookmarkObject, PdfActionType } from "@embedpdf/models";+import { useTranslation } from "react-i18next";import BookmarksIcon from "@mui/icons-material/BookmarksRounded";import "@app/components/viewer/SidebarBase.css";import "@app/components/viewer/BookmarkSidebar.css";@@ -93,6 +93,7 @@ export const BookmarkSidebar = ({getScrollState,toggleBookmarkSidebar,} = useViewer();+ const { t } = useTranslation();const { handleToolSelectForced } = useToolWorkflow();const { selectors, actions: fileActions } = useFileContext();const [expanded, setExpanded] = useState<Record<string, boolean>>({});@@ -475,6 +476,34 @@ export const BookmarkSidebar = ({}));};+ const expandAll = useCallback(() => {+ const allExpanded: Record<string, boolean> = {};+ const expandRecursive = (nodes: BookmarkNode[]) => {+ nodes.forEach((node) => {+ if (node.children && node.children.length > 0) {+ allExpanded[node.id] = true;+ expandRecursive(node.children as BookmarkNode[]);+ }+ });+ };+ expandRecursive(bookmarksWithIds);+ setExpanded(allExpanded);+ }, [bookmarksWithIds]);++ const collapseAll = useCallback(() => {+ const allCollapsed: Record<string, boolean> = {};+ const collapseRecursive = (nodes: BookmarkNode[]) => {+ nodes.forEach((node) => {+ if (node.children && node.children.length > 0) {+ allCollapsed[node.id] = false;+ collapseRecursive(node.children as BookmarkNode[]);+ }+ });+ };+ collapseRecursive(bookmarksWithIds);+ setExpanded(allCollapsed);+ }, [bookmarksWithIds]);+const handleBookmarkClick = (bookmark: PdfBookmarkObject,event: React.MouseEvent,@@ -569,9 +598,10 @@ export const BookmarkSidebar = ({>{hasChildren ? (<ActionIcon- variant="subtle"+ variant="tertiary"size="sm"className="bookmark-item__expand-icon"+ aria-label={isNodeExpanded ? "Collapse" : "Expand"}onClick={(event) => {event.stopPropagation();toggleNode(node.id);@@ -654,12 +684,54 @@ export const BookmarkSidebar = ({</Text></div><Box style={{ display: "flex", alignItems: "center", gap: 2 }}>+ {bookmarkSupport && bookmarksWithIds.length > 0 && (+ <>+ {Object.values(expanded).some((val) => val === false) ? (+ <ActionIcon+ variant="tertiary"+ size="sm"+ onClick={expandAll}+ aria-label={t(+ "viewer.bookmarks.expandAll",+ "Expand all bookmarks",+ )}+ title="Expand all"+ >+ <LocalIcon+ icon="unfold-more"+ width="1.1rem"+ height="1.1rem"+ />+ </ActionIcon>+ ) : (+ <ActionIcon+ variant="tertiary"+ size="sm"+ onClick={collapseAll}+ aria-label={t(+ "viewer.bookmarks.collapseAll",+ "Collapse all bookmarks",+ )}+ title="Collapse all"+ >+ <LocalIcon+ icon="unfold-less"+ width="1.1rem"+ height="1.1rem"+ />+ </ActionIcon>+ )}+ </>+ )}<ActionIcon- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- color="gray"onClick={toggleBookmarkSidebar}- aria-label="Close bookmarks sidebar"+ aria-label={t(+ "viewer.bookmarks.closeSidebar",+ "Close bookmarks sidebar",+ )}title="Close bookmarks"><LocalIcon icon="close-rounded" width="1.1rem" height="1.1rem" />@@ -706,7 +778,7 @@ export const BookmarkSidebar = ({<Text size="sm" c="red" ta="center">{currentError}</Text>- <Button size="xs" variant="light" onClick={requestReload}>+ <Button variant="secondary" size="sm" onClick={requestReload}>Retry</Button></Stack>@@ -726,7 +798,6 @@ export const BookmarkSidebar = ({</Text></Stack>)}-{showEmptyState && !isAddingBookmark && (<Stack align="center" gap="sm" py="lg"><LocalIcon@@ -739,8 +810,8 @@ export const BookmarkSidebar = ({No bookmarks in this document</Text><Button- variant="light"- size="xs"+ variant="tertiary"+ size="sm"onClick={handleOpenAddBookmark}leftSection={<LocalIcon icon="add" width="1rem" height="1rem" />@@ -769,7 +840,10 @@ export const BookmarkSidebar = ({<TextInputsize="xs"placeholder="Bookmark title"- aria-label="Bookmark title"+ aria-label={t(+ "viewer.bookmarks.bookmarkTitle",+ "Bookmark title",+ )}value={newBookmarkTitle}onChange={(e) => setNewBookmarkTitle(e.currentTarget.value)}autoFocus@@ -793,16 +867,16 @@ export const BookmarkSidebar = ({)}<Group justify="flex-end" gap="xs"><Button- size="xs"- variant="default"+ size="sm"+ variant="secondary"onClick={handleCancelAddBookmark}disabled={isSavingBookmark}>Cancel</Button><Button- size="xs"- color="blue"+ size="sm"+ variant="primary"onClick={handleSubmitAddBookmark}loading={isSavingBookmark}disabled={!newBookmarkTitle.trim()}@@ -813,25 +887,19 @@ export const BookmarkSidebar = ({</Stack></Box>)}-{showBookmarkList && (<>{!isAddingBookmark && (<Button- variant="subtle"- size="compact-xs"+ variant="tertiary"+ size="sm"fullWidth+ justify="start"onClick={handleOpenAddBookmark}leftSection={<LocalIcon icon="add" width="0.9rem" height="0.9rem" />}- mb="xs"- styles={{- root: {- justifyContent: "flex-start",- paddingInline: 6,- },- }}+ style={{ marginBottom: "var(--space-xs)" }}>Add bookmark</Button>@@ -862,9 +930,12 @@ export const BookmarkSidebar = ({flexShrink: 0,}}>- <UnstyledButton+ <Button+ variant="tertiary"+ hover={false}type="button"onClick={handleFallbackToTool}+ fullWidthstyle={{ width: "100%" }}><Group gap="xs" justify="center" wrap="nowrap">@@ -883,7 +954,7 @@ export const BookmarkSidebar = ({Need to reorder or nest? Open the Bookmark Editor</Text></Group>- </UnstyledButton>+ </Button></Box>)}</Box>diff --git a/frontend/editor/src/core/components/viewer/CommentsSidebar.tsx b/frontend/editor/src/core/components/viewer/CommentsSidebar.tsxindex cc470b3ea6..e25f9671d9 100644--- a/frontend/editor/src/core/components/viewer/CommentsSidebar.tsx+++ b/frontend/editor/src/core/components/viewer/CommentsSidebar.tsx@@ -5,16 +5,15 @@ import {Text,Textarea,Stack,- ActionIcon,Group,Tooltip,TextInput,Menu,Modal,- Button,- UnstyledButton,} from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import DeleteIcon from "@mui/icons-material/Delete";import CheckIcon from "@mui/icons-material/CheckRounded";import MoreHorizIcon from "@mui/icons-material/MoreHoriz";@@ -120,7 +119,6 @@ function getCommentDisplayContent(entry: {/** Placeholder authors we never show; use current user's name from context instead. */const PLACEHOLDER_AUTHORS = new Set(["Guest", "Digital Signature", ""]);-function getAuthorName(obj: Pick<PdfAnnotationObject, "author">,currentDisplayName: string,@@ -188,7 +186,6 @@ function getIconByType(type: number | undefined): string {if (type === 15) return "edit";return "comment";}-function isCommentAnnotation(ann: PdfAnnotationObject): boolean {const customData = getStirlingAnnotationMetadata(ann).customData;const toolId = customData?.toolId ?? customData?.annotationToolId;@@ -252,7 +249,6 @@ function getAnnotationToolId(ann: PdfAnnotationObject): string {const customData = getStirlingAnnotationMetadata(ann).customData;return customData?.toolId ?? customData?.annotationToolId ?? "";}-function getAnnotationTypeLabel(ann: PdfAnnotationObject,t: (key: string, fallback: string) => string,@@ -285,7 +281,6 @@ function getAnnotationTypeLabel(if (type === 1) return t("viewer.comments.typeComment", "Comment");return t("viewer.comments.typeComment", "Comment");}-function AnnotationTypeIcon({ ann }: { ann: PdfAnnotationObject }) {const toolId = getAnnotationToolId(ann);const iconName = TOOL_ICON_MAP[toolId] ?? getIconByType(ann?.type);@@ -714,9 +709,10 @@ export function CommentsSidebar({<Group gap={2} wrap="nowrap" style={{ flexShrink: 0 }}><Tooltip label={t("viewer.comments.addComment", "Add comment")}><ActionIcon- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- color="gray"+ aria-label={t("viewer.comments.addComment", "Add comment")}onClick={handleAddComment}><LocalIcon icon="add" width="1.25rem" height="1.25rem" />@@ -727,7 +723,15 @@ export function CommentsSidebar({<Tooltiplabel={t("viewer.comments.moreActions", "More actions")}>- <ActionIcon variant="subtle" size="sm" color="gray">+ <ActionIcon+ variant="tertiary"+ accent="neutral"+ size="sm"+ aria-label={t(+ "viewer.comments.moreActions",+ "More actions",+ )}+ ><MoreHorizIcon style={{ fontSize: 20 }} /></ActionIcon></Tooltip>@@ -746,11 +750,14 @@ export function CommentsSidebar({)}{toggleCommentsSidebar && (<ActionIcon- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- color="gray"onClick={toggleCommentsSidebar}- aria-label="Close comments sidebar"+ aria-label={t(+ "viewer.comments.closeSidebar",+ "Close comments sidebar",+ )}title={t("viewer.comments.close", "Close comments")}><LocalIcon icon="close-rounded" width="1.1rem" height="1.1rem" />@@ -775,9 +782,9 @@ export function CommentsSidebar({</Text>{isPlacingComment ? (<Button- variant="light"- color="orange"- size="xs"+ variant="tertiary"+ accent="warning"+ size="sm"onClick={handleCancelPlacingComment}leftSection={<LocalIcon@@ -794,8 +801,8 @@ export function CommentsSidebar({</Button>) : (<Button- variant="light"- size="xs"+ variant="tertiary"+ size="sm"onClick={handleAddComment}leftSection={<LocalIcon icon="add" width="1rem" height="1rem" />@@ -809,10 +816,11 @@ export function CommentsSidebar({<>{isPlacingComment ? (<Button- variant="light"- color="orange"- size="compact-xs"+ variant="tertiary"+ accent="warning"+ size="sm"fullWidth+ justify="start"onClick={handleCancelPlacingComment}leftSection={<LocalIcon@@ -821,12 +829,7 @@ export function CommentsSidebar({height="0.9rem"/>}- styles={{- root: {- justifyContent: "flex-start",- paddingInline: 6,- },- }}+ style={{ paddingInline: 6 }}>{t("viewer.comments.placingHint",@@ -835,19 +838,15 @@ export function CommentsSidebar({</Button>) : (<Button- variant="subtle"- size="compact-xs"+ variant="tertiary"+ size="sm"fullWidth+ justify="start"onClick={handleAddComment}leftSection={<LocalIcon icon="add" width="0.9rem" height="0.9rem" />}- styles={{- root: {- justifyContent: "flex-start",- paddingInline: 6,- },- }}+ style={{ paddingInline: 6 }}>{t("viewer.comments.addComment", "Add comment")}</Button>@@ -943,9 +942,13 @@ export function CommentsSidebar({)}><ActionIcon- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- color="gray"+ aria-label={t(+ "viewer.comments.locateAnnotation",+ "Locate in document",+ )}onClick={() =>handleLocateAnnotation(pageIndex, ann)}@@ -962,9 +965,13 @@ export function CommentsSidebar({)}><ActionIcon- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- color="gray"+ aria-label={t(+ "viewer.comments.moreActions",+ "More actions",+ )}><MoreHorizIconstyle={{ fontSize: 20 }}@@ -1030,9 +1037,12 @@ export function CommentsSidebar({)}><ActionIcon- variant="filled"+ variant="primary"size="sm"- color="blue"+ aria-label={t(+ "viewer.comments.addComment",+ "Add comment",+ )}onClick={() => {handleSendMainComment(pageIndex,@@ -1043,9 +1053,7 @@ export function CommentsSidebar({}}disabled={!(draft ?? "").trim()}>- <CheckIcon- style={{ fontSize: 18, color: "white" }}- />+ <CheckIcon style={{ fontSize: 18 }} /></ActionIcon></Tooltip></Group>@@ -1112,7 +1120,9 @@ export function CommentsSidebar({>{canEditReply &&!isEditingReply ? (- <UnstyledButton+ <Button+ variant="tertiary"+ hover={false}type="button"onClick={() => {setEditingReplyKey(@@ -1135,7 +1145,7 @@ export function CommentsSidebar({"Edit",)}</Text>- </UnstyledButton>+ </Button>) : null}{rTimestamp ? (<Text size="xs" c="dimmed">@@ -1178,9 +1188,12 @@ export function CommentsSidebar({)}><ActionIcon- variant="filled"+ variant="primary"size="sm"- color="blue"+ aria-label={t(+ "viewer.comments.saveReply",+ "Save reply",+ )}onClick={() =>handleSaveReplyEdit(replyEditKey,@@ -1196,7 +1209,6 @@ export function CommentsSidebar({<CheckIconstyle={{fontSize: 18,- color: "white",}}/></ActionIcon>@@ -1252,13 +1264,12 @@ export function CommentsSidebar({)}><ActionIcon- variant="filled"+ variant="primary"size="md"- color="blue"- style={{- backgroundColor:- "var(--mantine-color-blue-6)",- }}+ aria-label={t(+ "viewer.comments.addComment",+ "Add comment",+ )}onClick={() =>handleSendReply(pageIndex,@@ -1268,9 +1279,7 @@ export function CommentsSidebar({}disabled={!replyDraft.trim()}>- <CheckIcon- style={{ fontSize: 20, color: "white" }}- />+ <CheckIcon style={{ fontSize: 20 }} /></ActionIcon></Tooltip></Group>@@ -1305,10 +1314,10 @@ export function CommentsSidebar({)}</Text><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={handleRemoveFromSidebar}>+ <Button variant="secondary" onClick={handleRemoveFromSidebar}>{t("viewer.comments.removeCommentOnly", "Remove comment only")}</Button>- <Button color="red" onClick={handleDeleteAnnotation}>+ <Button accent="danger" onClick={handleDeleteAnnotation}>{t("viewer.comments.deleteAnnotationAndComment","Delete annotation & comment",@@ -1331,10 +1340,13 @@ export function CommentsSidebar({)}</Text><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={() => setClearAllModalOpen(false)}>+ <Button+ variant="secondary"+ onClick={() => setClearAllModalOpen(false)}+ >{t("viewer.comments.cancelClearAll", "Cancel")}</Button>- <Button color="red" onClick={handleClearAllComments}>+ <Button accent="danger" onClick={handleClearAllComments}>{t("viewer.comments.clearAll", "Clear all comments")}</Button></Group>diff --git a/frontend/editor/src/core/components/viewer/EmbedPdfViewer.tsx b/frontend/editor/src/core/components/viewer/EmbedPdfViewer.tsxindex 24bc42b02e..555f93df9d 100644--- a/frontend/editor/src/core/components/viewer/EmbedPdfViewer.tsx+++ b/frontend/editor/src/core/components/viewer/EmbedPdfViewer.tsx@@ -6,7 +6,9 @@ import React, {useState,} from "react";import { useTranslation } from "react-i18next";-import { Box, Center, Text, ActionIcon, Button, Stack } from "@mantine/core";+import { Box, Center, Text, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import CloseIcon from "@mui/icons-material/Close";import LockIcon from "@mui/icons-material/Lock";@@ -1225,15 +1227,14 @@ const EmbedPdfViewerContent = ({{/* Close Button - Only show in preview mode */}{onClose && previewFile && (<ActionIcon- variant="filled"- color="gray"+ variant="secondary"size="lg"+ aria-label={t("common.close", "Close")}style={{position: "absolute",top: "1rem",right: "1rem",zIndex: 1000,- borderRadius: "50%",}}onClick={onClose}>@@ -1261,7 +1262,6 @@ const EmbedPdfViewerContent = ({)}</Text><Button- variant="filled"onClick={() => {if (currentFile && isStirlingFile(currentFile)) {actions.openEncryptedUnlockPrompt(currentFile.fileId);diff --git a/frontend/editor/src/core/components/viewer/LayerSidebar.tsx b/frontend/editor/src/core/components/viewer/LayerSidebar.tsxindex 91eaac01bd..126da6f016 100644--- a/frontend/editor/src/core/components/viewer/LayerSidebar.tsx+++ b/frontend/editor/src/core/components/viewer/LayerSidebar.tsx@@ -6,13 +6,14 @@ import {Checkbox,Stack,Loader,- ActionIcon,Tooltip,} from "@mantine/core";import LayersIcon from "@mui/icons-material/Layers";+import { ActionIcon } from "@app/ui/ActionIcon";import VisibilityIcon from "@mui/icons-material/Visibility";import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";import LocalIcon from "@app/components/shared/LocalIcon";+import { useTranslation } from "react-i18next";import { useViewer } from "@app/contexts/ViewerContext";import "@app/components/viewer/SidebarBase.css";import "@app/components/viewer/LayerSidebar.css";@@ -51,6 +52,7 @@ export function LayerSidebar({onApplyLayers,onLayersDetected,}: LayerSidebarProps) {+ const { t } = useTranslation();const { toggleLayerSidebar } = useViewer();const [layers, setLayers] = useState<LayerInfo[]>([]);const [visibility, setVisibility] = useState<Record<string, boolean>>({});@@ -339,26 +341,25 @@ export function LayerSidebar({</Text>{isApplying && <Loader size="xs" type="dots" />}</div>-<div className="layer-sidebar__header-actions">{status === "ready" && leafIds.length > 0 && (<><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={showAll}disabled={allVisible || isApplying}- aria-label="Show all layers"+ aria-label={t("viewer.layers.showAll", "Show all layers")}title="Show all"><VisibilityIcon sx={{ fontSize: "1rem" }} /></ActionIcon><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={hideAll}disabled={allHidden || isApplying}- aria-label="Hide all layers"+ aria-label={t("viewer.layers.hideAll", "Hide all layers")}title="Hide all"><VisibilityOffIcon sx={{ fontSize: "1rem" }} />@@ -366,11 +367,11 @@ export function LayerSidebar({</>)}<ActionIcon- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- color="gray"onClick={toggleLayerSidebar}- aria-label="Close layers sidebar"+ aria-label={t("viewer.layers.closeSidebar", "Close layers sidebar")}title="Close layers"><LocalIcon icon="close-rounded" width="1.1rem" height="1.1rem" />diff --git a/frontend/editor/src/core/components/viewer/LinkLayer.tsx b/frontend/editor/src/core/components/viewer/LinkLayer.tsxindex 227045ebb9..e1a2aeb8f0 100644--- a/frontend/editor/src/core/components/viewer/LinkLayer.tsx+++ b/frontend/editor/src/core/components/viewer/LinkLayer.tsx@@ -17,7 +17,8 @@ import {type PdfLinkAnnoObject,} from "@embedpdf/models";import { Z_INDEX_VIEWER_FLOATING_MENU } from "@app/styles/zIndex";-+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";// ---------------------------------------------------------------------------// Inline SVG icons (thin-stroke, modern)// ---------------------------------------------------------------------------@@ -206,8 +207,8 @@ const LinkToolbar: React.FC<LinkToolbarProps> = React.memo(onMouseLeave={onMouseLeave}>{/* Delete */}- <button- type="button"+ <ActionIcon+ variant="tertiary"className="pdf-link-toolbar-btn pdf-link-toolbar-btn--delete"onClick={(e) => {e.stopPropagation();@@ -217,13 +218,12 @@ const LinkToolbar: React.FC<LinkToolbarProps> = React.memo(title={t("viewer.link.delete", "Delete link")}><TrashIcon />- </button>-+ </ActionIcon><span className="pdf-link-toolbar-sep" />{/* Navigate / Open */}- <button- type="button"+ <Button+ variant="tertiary"className="pdf-link-toolbar-btn pdf-link-toolbar-btn--go"onClick={(e) => {e.stopPropagation();@@ -234,7 +234,7 @@ const LinkToolbar: React.FC<LinkToolbarProps> = React.memo(>{internal ? <PageIcon /> : <ExternalLinkIcon />}<span className="pdf-link-toolbar-label">{label}</span>- </button>+ </Button></div>);},diff --git a/frontend/editor/src/core/components/viewer/NonPdfViewer.tsx b/frontend/editor/src/core/components/viewer/NonPdfViewer.tsxindex 1b54fa1680..ed4a2e2263 100644--- a/frontend/editor/src/core/components/viewer/NonPdfViewer.tsx+++ b/frontend/editor/src/core/components/viewer/NonPdfViewer.tsx@@ -1,5 +1,6 @@import { useCallback, useMemo } from "react";-import { Box, Button, Center, Stack, Text } from "@mantine/core";+import { Box, Center, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import ArticleIcon from "@mui/icons-material/Article";import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";@@ -81,8 +82,8 @@ export function NonPdfViewer({ file }: NonPdfViewerProps) {</Text>{isConvertAvailable && (<Button- variant="light"- color="orange"+ variant="secondary"+ accent="warning"leftSection={<PictureAsPdfIcon />}onClick={handleConvertToPdf}>diff --git a/frontend/editor/src/core/components/viewer/PdfViewerToolbar.tsx b/frontend/editor/src/core/components/viewer/PdfViewerToolbar.tsxindex b3bab51953..893cd35d44 100644--- a/frontend/editor/src/core/components/viewer/PdfViewerToolbar.tsx+++ b/frontend/editor/src/core/components/viewer/PdfViewerToolbar.tsx@@ -1,17 +1,10 @@import { useState, useEffect } from "react";-import {- ActionIcon,- Button,- Paper,- Group,- Menu,- NumberInput,- Slider,-} from "@mantine/core";+import { Paper, Group, Menu, NumberInput, Slider } from "@mantine/core";import { useTranslation } from "react-i18next";import { useViewer } from "@app/contexts/ViewerContext";import { useIsPhone } from "@app/hooks/useIsMobile";import { Tooltip } from "@app/components/shared/Tooltip";+import { ActionIcon } from "@app/ui/ActionIcon";import FirstPageIcon from "@mui/icons-material/FirstPage";import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";@@ -161,35 +154,31 @@ export function PdfViewerToolbar({>{/* First Page Button */}{!isPhone && (- <Button- variant="subtle"- color="blue"+ <ActionIcon+ variant="tertiary"size={buttonSize}- px={8}- radius="xl"onClick={handleFirstPage}disabled={scrollState.currentPage === 1}style={{ minWidth: buttonMinWidth }}title={t("viewer.firstPage", "First Page")}+ aria-label={t("viewer.firstPage", "First Page")}><FirstPageIcon fontSize="small" />- </Button>+ </ActionIcon>)}{/* Previous Page Button */}- <Button- variant="subtle"- color="blue"+ <ActionIcon+ variant="tertiary"size={buttonSize}- px={8}- radius="xl"onClick={handlePreviousPage}disabled={scrollState.currentPage === 1}style={{ minWidth: buttonMinWidth }}title={t("viewer.previousPage", "Previous Page")}+ aria-label={t("viewer.previousPage", "Previous Page")}><ArrowBackIosIcon fontSize="small" />- </Button>+ </ActionIcon>{/* Page Input */}<NumberInput@@ -219,35 +208,31 @@ export function PdfViewerToolbar({</span>{/* Next Page Button */}- <Button- variant="subtle"- color="blue"+ <ActionIcon+ variant="tertiary"size={buttonSize}- px={8}- radius="xl"onClick={handleNextPage}disabled={scrollState.currentPage === scrollState.totalPages}style={{ minWidth: buttonMinWidth }}title={t("viewer.nextPage", "Next Page")}+ aria-label={t("viewer.nextPage", "Next Page")}><ArrowForwardIosIcon fontSize="small" />- </Button>+ </ActionIcon>{/* Last Page Button */}{!isPhone && (- <Button- variant="subtle"- color="blue"+ <ActionIcon+ variant="tertiary"size={buttonSize}- px={8}- radius="xl"onClick={handleLastPage}disabled={scrollState.currentPage === scrollState.totalPages}style={{ minWidth: buttonMinWidth }}title={t("viewer.lastPage", "Last Page")}+ aria-label={t("viewer.lastPage", "Last Page")}><LastPageIcon fontSize="small" />- </Button>+ </ActionIcon>)}{/* Dual Page Toggle */}@@ -261,21 +246,24 @@ export function PdfViewerToolbar({position="top"arrow>- <Button- variant={isDualPageActive ? "filled" : "light"}- color="blue"+ <ActionIcon+ variant={isDualPageActive ? "primary" : "secondary"}size={buttonSize}- radius="xl"onClick={handleDualPageToggle}disabled={scrollState.totalPages <= 1}style={{ minWidth: buttonMinWidth }}+ aria-label={+ isDualPageActive+ ? t("viewer.singlePageView", "Single Page View")+ : t("viewer.dualPageView", "Dual Page View")+ }>{isDualPageActive ? (<DescriptionIcon fontSize="small" />) : (<ViewWeekIcon fontSize="small" />)}- </Button>+ </ActionIcon></Tooltip>)}@@ -292,11 +280,9 @@ export function PdfViewerToolbar({position="top"arrow>- <Button- variant={pdfRenderMode !== "normal" ? "filled" : "light"}- color="blue"+ <ActionIcon+ variant={pdfRenderMode !== "normal" ? "primary" : "secondary"}size={buttonSize}- radius="xl"onClick={cyclePdfRenderMode}style={{ minWidth: buttonMinWidth }}aria-label={@@ -310,7 +296,7 @@ export function PdfViewerToolbar({{pdfRenderMode === "normal" && <DarkModeIcon fontSize="small" />}{pdfRenderMode === "dark" && <WbTwilightIcon fontSize="small" />}{pdfRenderMode === "sepia" && <WbSunnyIcon fontSize="small" />}- </Button>+ </ActionIcon></Tooltip>)}@@ -323,9 +309,7 @@ export function PdfViewerToolbar({style={{ marginLeft: 16, flexShrink: 0 }}><ActionIcon- variant="subtle"- color="blue"- radius="md"+ variant="tertiary"onClick={handleZoomOut}aria-label={t("viewer.zoomOut", "Zoom out")}>@@ -346,9 +330,7 @@ export function PdfViewerToolbar({label={null}/><ActionIcon- variant="subtle"- color="blue"- radius="md"+ variant="tertiary"onClick={handleZoomIn}aria-label={t("viewer.zoomIn", "Zoom in")}>@@ -376,9 +358,7 @@ export function PdfViewerToolbar({><Menu.Target><ActionIcon- variant="light"- color="blue"- radius="md"+ variant="secondary"size="lg"aria-label={t("viewer.moreOptions", "More")}style={{ marginLeft: 4 }}diff --git a/frontend/editor/src/core/components/viewer/RedactionSelectionMenu.tsx b/frontend/editor/src/core/components/viewer/RedactionSelectionMenu.tsxindex 3e1af1fa71..24a1fc8763 100644--- a/frontend/editor/src/core/components/viewer/RedactionSelectionMenu.tsx+++ b/frontend/editor/src/core/components/viewer/RedactionSelectionMenu.tsx@@ -3,7 +3,9 @@ import {RedactionSelectionMenuProps,} from "@embedpdf/plugin-redaction/react";import { PdfAnnotationSubtype } from "@embedpdf/models";-import { ActionIcon, Tooltip, Button, Group } from "@mantine/core";+import { Tooltip, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import { createPortal } from "react-dom";import { useEffect, useState, useRef, useCallback } from "react";@@ -141,23 +143,11 @@ function RedactionSelectionMenuInner({<Group gap="sm" wrap="nowrap" justify="center"><Tooltip label={t("viewer.redaction.removeMark", "Remove this mark")}><ActionIcon- variant="subtle"- color="gray"+ aria-label={t("viewer.redaction.removeMark", "Remove this mark")}+ variant="secondary"+ accent="neutral"size="md"onClick={handleRemove}- styles={{- root: {- flexShrink: 0,- backgroundColor: "var(--bg-raised)",- border: "1px solid var(--border-default)",- color: "var(--text-secondary)",- "&:hover": {- backgroundColor: "var(--hover-bg)",- borderColor: "var(--border-strong)",- color: "var(--text-primary)",- },- },- }}><DeleteIcon style={{ fontSize: 18 }} /></ActionIcon>@@ -172,14 +162,11 @@ function RedactionSelectionMenuInner({position="top"><Button- variant="filled"- color="red"- size="xs"+ accent="danger"+ size="sm"onClick={handleApply}leftSection={<CheckCircleIcon style={{ fontSize: 16 }} />}- styles={{- root: { flexShrink: 0, whiteSpace: "nowrap" },- }}+ style={{ flexShrink: 0, whiteSpace: "nowrap" }}>Apply (permanent)</Button>diff --git a/frontend/editor/src/core/components/viewer/SearchInterface.tsx b/frontend/editor/src/core/components/viewer/SearchInterface.tsxindex f111837860..2c93aff17c 100644--- a/frontend/editor/src/core/components/viewer/SearchInterface.tsx+++ b/frontend/editor/src/core/components/viewer/SearchInterface.tsx@@ -1,7 +1,8 @@import React, { useState, useEffect, useRef } from "react";-import { Box, TextInput, ActionIcon, Text, Group } from "@mantine/core";+import { Box, TextInput, Text, Group } from "@mantine/core";import { useTranslation } from "react-i18next";import { LocalIcon } from "@app/components/shared/LocalIcon";+import { ActionIcon } from "@app/ui/ActionIcon";import { ViewerContext } from "@app/contexts/ViewerContext";interface SearchInterfaceProps {@@ -200,7 +201,7 @@ export function SearchInterface({ visible, onClose }: SearchInterfaceProps) {{t("search.title", "Search PDF")}</Text><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={handleCloseClick}aria-label={t("viewer.search.close", "Close search")}@@ -225,7 +226,7 @@ export function SearchInterface({ visible, onClose }: SearchInterfaceProps) {rightSection={searchQuery.trim() && (<ActionIcon- variant="subtle"+ variant="tertiary"onClick={handleClearSearch}aria-label={t("viewer.search.clear", "Clear search")}>@@ -275,7 +276,7 @@ export function SearchInterface({ visible, onClose }: SearchInterfaceProps) {<Group gap="xs"><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={handlePrevious}disabled={!resultInfo || resultInfo.currentIndex <= 1}@@ -284,7 +285,7 @@ export function SearchInterface({ visible, onClose }: SearchInterfaceProps) {<LocalIcon icon="keyboard-arrow-up" width="1rem" height="1rem" /></ActionIcon><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={handleNext}disabled={diff --git a/frontend/editor/src/core/components/viewer/SignaturePreviewLayer.tsx b/frontend/editor/src/core/components/viewer/SignaturePreviewLayer.tsxindex 73479a826f..930790a59e 100644--- a/frontend/editor/src/core/components/viewer/SignaturePreviewLayer.tsx+++ b/frontend/editor/src/core/components/viewer/SignaturePreviewLayer.tsx@@ -1,6 +1,7 @@import { memo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { ActionIcon, Tooltip } from "@mantine/core";+import { Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import CloseIcon from "@mui/icons-material/Close";import { useInteractionManagerCapability } from "@embedpdf/plugin-interaction-manager/react";import {@@ -162,9 +163,9 @@ export const SignaturePreviewLayer = memo(function SignaturePreviewLayer({{!readOnly && (<ActionIconsize="sm"- radius="xl"- variant="filled"- color="red"+ shape="circle"+ variant="primary"+ accent="danger"style={{position: "absolute",top: -10,diff --git a/frontend/editor/src/core/components/viewer/TextSelectionMenu.tsx b/frontend/editor/src/core/components/viewer/TextSelectionMenu.tsxindex af3399e38d..322dd4806f 100644--- a/frontend/editor/src/core/components/viewer/TextSelectionMenu.tsx+++ b/frontend/editor/src/core/components/viewer/TextSelectionMenu.tsx@@ -1,4 +1,5 @@-import { ActionIcon, Tooltip } from "@mantine/core";+import { Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import ContentCopyIcon from "@mui/icons-material/ContentCopy";import { useCallback, useEffect, useRef, useState } from "react";import { createPortal } from "react-dom";@@ -72,14 +73,12 @@ export function TextSelectionMenu({><Tooltip label={t("viewer.copyText", "Copy")} withArrow><ActionIcon- variant="filled"+ variant="secondary"+ accent="neutral"size="md"onClick={handleCopy}aria-label={t("viewer.copyText", "Copy")}style={{- backgroundColor: "var(--mantine-color-body)",- border: "1px solid var(--mantine-color-default-border)",- color: "var(--text-primary)",boxShadow: "0 2px 12px rgba(0, 0, 0, 0.25)",}}>diff --git a/frontend/editor/src/core/components/viewer/ThumbnailSidebar.tsx b/frontend/editor/src/core/components/viewer/ThumbnailSidebar.tsxindex 94919eb4f2..3fb62df970 100644--- a/frontend/editor/src/core/components/viewer/ThumbnailSidebar.tsx+++ b/frontend/editor/src/core/components/viewer/ThumbnailSidebar.tsx@@ -1,5 +1,7 @@import { useState, useEffect, useRef } from "react";-import { Box, ScrollArea, Text, ActionIcon } from "@mantine/core";+import { Box, ScrollArea, Text } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";+import { useTranslation } from "react-i18next";import { useViewer } from "@app/contexts/ViewerContext";import { PrivateContent } from "@app/components/shared/PrivateContent";import LocalIcon from "@app/components/shared/LocalIcon";@@ -17,6 +19,7 @@ export function ThumbnailSidebar({onToggle,activeFileId,}: ThumbnailSidebarProps) {+ const { t } = useTranslation();const { getScrollState, scrollActions, getThumbnailAPI } = useViewer();const [thumbnails, setThumbnails] = useState<{ [key: number]: string }>({});@@ -182,11 +185,14 @@ export function ThumbnailSidebar({</Text></div><ActionIcon- variant="subtle"+ variant="tertiary"+ accent="neutral"size="sm"- color="gray"onClick={onToggle}- aria-label="Close thumbnails sidebar"+ aria-label={t(+ "viewer.thumbnails.closeSidebar",+ "Close thumbnails sidebar",+ )}title="Close thumbnails"><LocalIcon icon="close-rounded" width="1.1rem" height="1.1rem" />diff --git a/frontend/editor/src/core/components/viewer/ViewerAnnotationControls.tsx b/frontend/editor/src/core/components/viewer/ViewerAnnotationControls.tsxindex 78888f4188..32b4b1ce11 100644--- a/frontend/editor/src/core/components/viewer/ViewerAnnotationControls.tsx+++ b/frontend/editor/src/core/components/viewer/ViewerAnnotationControls.tsx@@ -1,7 +1,7 @@import React, { useCallback } from "react";-import { ActionIcon } from "@mantine/core";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";+import { ActionIcon } from "@app/ui/ActionIcon";import { Tooltip } from "@app/components/shared/Tooltip";import { ViewerContext } from "@app/contexts/ViewerContext";import { useSignature } from "@app/contexts/SignatureContext";@@ -186,12 +186,15 @@ export default function ViewerAnnotationControls({portalTarget={document.body}><ActionIcon- variant={isRedactMode ? "filled" : "subtle"}- color={isRedactMode ? "blue" : undefined}- radius="md"+ variant={isRedactMode ? "primary" : "tertiary"}className="workbench-bar-action-icon"onClick={handleRedactionToggle}disabled={disabled || currentView !== "viewer"}+ aria-label={+ isRedactMode+ ? t("workbenchBar.exitRedaction", "Exit Redaction Mode")+ : t("workbenchBar.redact", "Redact")+ }><LocalIconicon="scan-delete-rounded"@@ -212,9 +215,7 @@ export default function ViewerAnnotationControls({portalTarget={document.body}><ActionIcon- variant={annotationsHidden ? "filled" : "subtle"}- color={annotationsHidden ? "blue" : undefined}- radius="md"+ variant={annotationsHidden ? "primary" : "tertiary"}className="workbench-bar-action-icon"onClick={handleToggleAnnotationsVisibility}disabled={@@ -225,6 +226,10 @@ export default function ViewerAnnotationControls({}data-active={annotationsHidden ? "true" : undefined}aria-pressed={annotationsHidden}+ aria-label={t(+ "workbenchBar.toggleAnnotations",+ "Toggle Annotations Visibility",+ )}><LocalIconicon={diff --git a/frontend/editor/src/core/components/viewer/ViewerShareButton.tsx b/frontend/editor/src/core/components/viewer/ViewerShareButton.tsxindex 36a2701d14..bb3f8aa909 100644--- a/frontend/editor/src/core/components/viewer/ViewerShareButton.tsx+++ b/frontend/editor/src/core/components/viewer/ViewerShareButton.tsx@@ -1,5 +1,7 @@import { useState } from "react";-import { ActionIcon, Button, Group, Modal, Stack, Text } from "@mantine/core";+import { Group, Modal, Stack, Text } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import ShareIcon from "@mui/icons-material/Share";import CloudUploadIcon from "@mui/icons-material/CloudUpload";@@ -131,8 +133,7 @@ export default function ViewerShareButton({><div className="workbench-bar-tooltip-wrapper"><ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"className="workbench-bar-action-icon"onClick={handleClick}disabled={isDisabled}@@ -172,17 +173,17 @@ export default function ViewerShareButton({</Stack><Group justify="center" gap="sm"><Button- variant="light"- color="var(--mantine-color-gray-8)"- w={BUTTON_WIDTH}+ variant="secondary"+ accent="neutral"+ style={{ width: BUTTON_WIDTH }}onClick={() => setConfirmOpen(false)}disabled={saving}>{t("cancel", "Cancel")}</Button><Button- variant="filled"- w={BUTTON_WIDTH}+ variant="primary"+ style={{ width: BUTTON_WIDTH }}leftSection={<CloudUploadIcon fontSize="small" />}onClick={handleSaveAndShare}loading={saving}diff --git a/frontend/editor/src/core/components/viewer/nonpdf/MarkdownRenderer.tsx b/frontend/editor/src/core/components/viewer/nonpdf/MarkdownRenderer.tsxindex 5856326096..7cd69a2330 100644--- a/frontend/editor/src/core/components/viewer/nonpdf/MarkdownRenderer.tsx+++ b/frontend/editor/src/core/components/viewer/nonpdf/MarkdownRenderer.tsx@@ -2,11 +2,13 @@ import React, { useState } from "react";import ReactMarkdown from "react-markdown";import type { Components } from "react-markdown";import remarkGfm from "remark-gfm";+import { Button } from "@app/ui/Button";function CopyButton({ text }: { text: string }) {const [copied, setCopied] = useState(false);return (- <button+ <Button+ variant="tertiary"onClick={() =>navigator.clipboard.writeText(text).then(() => {setCopied(true);@@ -31,7 +33,7 @@ function CopyButton({ text }: { text: string }) {}}>{copied ? "✓ Copied" : "Copy"}- </button>+ </Button>);}diff --git a/frontend/editor/src/core/components/viewer/nonpdf/NonPdfBanner.tsx b/frontend/editor/src/core/components/viewer/nonpdf/NonPdfBanner.tsxindex e1f169b85b..2d73a0f558 100644--- a/frontend/editor/src/core/components/viewer/nonpdf/NonPdfBanner.tsx+++ b/frontend/editor/src/core/components/viewer/nonpdf/NonPdfBanner.tsx@@ -1,4 +1,4 @@-import { Button } from "@mantine/core";+import { Button } from "@app/ui/Button";import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";import { useTranslation } from "react-i18next";@@ -13,9 +13,9 @@ export function NonPdfBanner({ onConvertToPdf }: NonPdfBannerProps) {return (<Button- size="xs"- variant="light"- color="orange"+ size="sm"+ variant="secondary"+ accent="warning"leftSection={<PictureAsPdfIcon style={{ fontSize: "0.9rem" }} />}onClick={onConvertToPdf}style={{diff --git a/frontend/editor/src/core/components/viewer/useViewerWorkbenchBarButtons.tsx b/frontend/editor/src/core/components/viewer/useViewerWorkbenchBarButtons.tsxindex 4960672dd9..14a308e0f3 100644--- a/frontend/editor/src/core/components/viewer/useViewerWorkbenchBarButtons.tsx+++ b/frontend/editor/src/core/components/viewer/useViewerWorkbenchBarButtons.tsx@@ -1,5 +1,6 @@import { useMemo, useState, useEffect, useCallback } from "react";-import { ActionIcon, Slider, Popover, Select } from "@mantine/core";+import { Slider, Popover, Select } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import { supportedLanguages } from "@app/i18n";import { useViewer } from "@app/contexts/ViewerContext";@@ -169,14 +170,13 @@ export function useViewerWorkbenchBarButtons(<Popover.Target><div style={{ display: "inline-flex" }}><ActionIcon- variant="subtle"- radius="md"+ variant="tertiary"className="workbench-bar-action-icon"disabled={disabled}aria-label={searchLabel}onClick={viewer.searchInterfaceActions.toggle}>- <LocalIcon icon="search" width="1.25rem" height="1.25rem" />+ <LocalIcon icon="search" width="1rem" height="1rem" /></ActionIcon></div></Popover.Target>@@ -194,9 +194,7 @@ export function useViewerWorkbenchBarButtons(},{id: "viewer-pan-mode",- icon: (- <LocalIcon icon="pan-tool-rounded" width="1.25rem" height="1.25rem" />- ),+ icon: <LocalIcon icon="pan-tool-rounded" width="1rem" height="1rem" />,tooltip:!isPanning && pendingCount > 0 && redactionActiveType !== null? applyRedactionsLabel@@ -221,7 +219,7 @@ export function useViewerWorkbenchBarButtons(},{id: "viewer-ruler",- icon: <StraightenIcon sx={{ fontSize: "1.25rem" }} />,+ icon: <StraightenIcon sx={{ fontSize: "1rem" }} />,tooltip: rulerLabel,ariaLabel: rulerLabel,section: "top" as const,@@ -238,7 +236,7 @@ export function useViewerWorkbenchBarButtons(},{id: "viewer-rotate-left",- icon: <LocalIcon icon="rotate-left" width="1.25rem" height="1.25rem" />,+ icon: <LocalIcon icon="rotate-left" width="1rem" height="1rem" />,tooltip: rotateLeftLabel,ariaLabel: rotateLeftLabel,section: "top" as const,@@ -249,9 +247,7 @@ export function useViewerWorkbenchBarButtons(},{id: "viewer-rotate-right",- icon: (- <LocalIcon icon="rotate-right" width="1.25rem" height="1.25rem" />- ),+ icon: <LocalIcon icon="rotate-right" width="1rem" height="1rem" />,tooltip: rotateRightLabel,ariaLabel: rotateRightLabel,section: "top" as const,@@ -262,7 +258,7 @@ export function useViewerWorkbenchBarButtons(},{id: "viewer-toggle-sidebar",- icon: <LocalIcon icon="view-list" width="1.25rem" height="1.25rem" />,+ icon: <LocalIcon icon="view-list" width="1rem" height="1rem" />,tooltip: sidebarLabel,ariaLabel: sidebarLabel,section: "top" as const,@@ -312,7 +308,7 @@ export function useViewerWorkbenchBarButtons(? [{id: "viewer-toggle-layers",- icon: <LayersIcon sx={{ fontSize: "1.25rem" }} />,+ icon: <LayersIcon sx={{ fontSize: "1rem" }} />,tooltip: layersLabel,ariaLabel: layersLabel,section: "top" as const,@@ -326,7 +322,7 @@ export function useViewerWorkbenchBarButtons(: []),{id: "viewer-toggle-comments",- icon: <LocalIcon icon="comment" width="1.25rem" height="1.25rem" />,+ icon: <LocalIcon icon="comment" width="1rem" height="1rem" />,tooltip: commentsLabel,ariaLabel: commentsLabel,section: "top" as const,@@ -363,8 +359,7 @@ export function useViewerWorkbenchBarButtons(portalTarget={document.body}><ActionIcon- variant={isReadingAloud ? "filled" : "subtle"}- radius="md"+ variant={isReadingAloud ? "primary" : "tertiary"}className="workbench-bar-action-icon"disabled={disabled ||@@ -373,12 +368,11 @@ export function useViewerWorkbenchBarButtons(}aria-label={readAloudLabel}onClick={handleReadAloud}- color={isReadingAloud ? "blue" : undefined}>{isReadingAloud ? (- <StopIcon sx={{ fontSize: "1.25rem" }} />+ <StopIcon sx={{ fontSize: "1rem" }} />) : (- <VolumeUpIcon sx={{ fontSize: "1.25rem" }} />+ <VolumeUpIcon sx={{ fontSize: "1rem" }} />)}</ActionIcon></Tooltip>@@ -451,8 +445,7 @@ export function useViewerWorkbenchBarButtons(portalTarget={document.body}><ActionIcon- variant={isAnnotationsActive ? "filled" : "subtle"}- radius="md"+ variant={isAnnotationsActive ? "primary" : "tertiary"}className="workbench-bar-action-icon"onClick={() => {if (disabled || isAnnotationsActive) return;@@ -479,9 +472,9 @@ export function useViewerWorkbenchBarButtons(}}disabled={disabled}aria-pressed={isAnnotationsActive}- color={isAnnotationsActive ? "blue" : undefined}+ aria-label={annotationsLabel}>- <LocalIcon icon="edit" width="1.25rem" height="1.25rem" />+ <LocalIcon icon="edit" width="1rem" height="1rem" /></ActionIcon></Tooltip>),@@ -509,8 +502,7 @@ export function useViewerWorkbenchBarButtons(portalTarget={document.body}><ActionIcon- variant={isFormFillActive ? "filled" : "subtle"}- radius="md"+ variant={isFormFillActive ? "primary" : "tertiary"}className="workbench-bar-action-icon"onClick={() => {if (disabled) return;@@ -522,9 +514,9 @@ export function useViewerWorkbenchBarButtons(}}disabled={disabled}aria-pressed={isFormFillActive}- color={isFormFillActive ? "blue" : undefined}+ aria-label={formFillLabel}>- <TextFieldsIcon sx={{ fontSize: "1.25rem" }} />+ <TextFieldsIcon sx={{ fontSize: "1rem" }} /></ActionIcon></Tooltip>),diff --git a/frontend/editor/src/core/contexts/FileManagerContext.tsx b/frontend/editor/src/core/contexts/FileManagerContext.tsxindex 5e8bcf93ca..a557a9d31b 100644--- a/frontend/editor/src/core/contexts/FileManagerContext.tsx+++ b/frontend/editor/src/core/contexts/FileManagerContext.tsx@@ -7,7 +7,8 @@ import React, {useEffect,useMemo,} from "react";-import { Button, Group, Modal, Stack, Text } from "@mantine/core";+import { Group, Modal, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { fileStorage } from "@app/services/fileStorage";import { useFileActions, useFileManagement } from "@app/contexts/FileContext";import { zipFileService } from "@app/services/zipFileService";@@ -1210,14 +1211,14 @@ export const FileManagerProvider: React.FC<FileManagerProviderProps> = ({</Text><Group justify="flex-end" gap="sm"><Button- variant="default"+ variant="secondary"onClick={() => resolveDeleteChoice("cancel")}>{t("cancel", "Cancel")}</Button>{!deletePromptIsServerOnly && (<Button- variant="light"+ variant="secondary"onClick={() => resolveDeleteChoice("local")}>{t("fileManager.removeLocalOnly", "This device only")}@@ -1225,7 +1226,7 @@ export const FileManagerProvider: React.FC<FileManagerProviderProps> = ({)}{deletePromptCanLeaveShare && (<Button- variant="light"+ variant="secondary"onClick={() => resolveDeleteChoice("leave")}>{t("fileManager.leaveShare", "Remove from my list")}@@ -1234,14 +1235,14 @@ export const FileManagerProvider: React.FC<FileManagerProviderProps> = ({{deletePromptFile?.remoteOwnedByCurrentUser !== false && (<><Button- variant="light"+ variant="secondary"onClick={() => resolveDeleteChoice("server")}>{t("fileManager.removeServerOnly", "Server only")}</Button>{!deletePromptIsServerOnly && (<Button- color="red"+ accent="danger"onClick={() => resolveDeleteChoice("both")}>{t("fileManager.removeBoth", "Remove from both")}diff --git a/frontend/editor/src/core/contexts/UnsavedChangesContext.tsx b/frontend/editor/src/core/contexts/UnsavedChangesContext.tsxindex 51ca85371d..8497731d6d 100644--- a/frontend/editor/src/core/contexts/UnsavedChangesContext.tsx+++ b/frontend/editor/src/core/contexts/UnsavedChangesContext.tsx@@ -5,7 +5,8 @@ import React, {useCallback,ReactNode,} from "react";-import { Modal, Text, Button, Group, Stack } from "@mantine/core";+import { Modal, Text, Group, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";interface UnsavedChangesContextType {@@ -89,10 +90,10 @@ export function UnsavedChangesProvider({)}</Text><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={handleCancel}>+ <Button variant="secondary" onClick={handleCancel}>{t("admin.settings.unsavedChanges.cancel", "Keep Editing")}</Button>- <Button color="red" onClick={handleDiscard}>+ <Button accent="danger" onClick={handleDiscard}>{t("admin.settings.unsavedChanges.discard", "Discard Changes")}</Button></Group>diff --git a/frontend/editor/src/core/pages/HomePage.tsx b/frontend/editor/src/core/pages/HomePage.tsxindex 2e5d2aa08d..c1b4f572bc 100644--- a/frontend/editor/src/core/pages/HomePage.tsx+++ b/frontend/editor/src/core/pages/HomePage.tsx@@ -38,6 +38,7 @@ import { useFileHandler } from "@app/hooks/useFileHandler";import { FolderTreePanel } from "@app/components/filesPage/FolderTreePanel";import type { FileSidebarProps } from "@app/components/shared/FileSidebar";+import { Button } from "@app/ui/Button";import "@app/pages/HomePage.css";const SIDEBAR_COLLAPSED_STORAGE_KEY = "stirling.fileSidebarCollapsed";@@ -404,7 +405,8 @@ export default function HomePage() {</div>)}<div className="mobile-bottom-bar">- <button+ <Button+ variant="tertiary"className="mobile-bottom-button"aria-label={t("quickAccess.allTools", "Tools")}onClick={() => {@@ -418,9 +420,10 @@ export default function HomePage() {<span className="mobile-bottom-button-label">{t("quickAccess.allTools", "Tools")}</span>- </button>+ </Button>{toolAvailability["automate"]?.available !== false && (- <button+ <Button+ variant="tertiary"className="mobile-bottom-button"aria-label={t("quickAccess.automate", "Automate")}onClick={() => {@@ -438,9 +441,10 @@ export default function HomePage() {<span className="mobile-bottom-button-label">{t("quickAccess.automate", "Automate")}</span>- </button>+ </Button>)}- <button+ <Button+ variant="tertiary"className="mobile-bottom-button"aria-label={t("home.mobile.openFiles", "Open files")}onClick={() => navigate("/files")}@@ -453,8 +457,9 @@ export default function HomePage() {<span className="mobile-bottom-button-label">{t("quickAccess.files", "Files")}</span>- </button>- <button+ </Button>+ <Button+ variant="tertiary"className="mobile-bottom-button"aria-label={t("quickAccess.config", "Config")}onClick={() => setConfigModalOpen(true)}@@ -467,7 +472,7 @@ export default function HomePage() {<span className="mobile-bottom-button-label">{t("quickAccess.config", "Config")}</span>- </button>+ </Button></div><FileManager selectedTool={selectedTool} /><AppConfigModaldiff --git a/frontend/editor/src/core/pages/MobileScannerPage.tsx b/frontend/editor/src/core/pages/MobileScannerPage.tsxindex 0d14ce7ee8..cf4e3e3564 100644--- a/frontend/editor/src/core/pages/MobileScannerPage.tsx+++ b/frontend/editor/src/core/pages/MobileScannerPage.tsx@@ -2,7 +2,6 @@ import { useState, useRef, useEffect, useCallback } from "react";import { useSearchParams, useNavigate } from "react-router-dom";import {Box,- Button,Stack,Text,Group,@@ -11,6 +10,7 @@ import {Switch,Card,} from "@mantine/core";+import { Button as DSButton } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { LogoIcon } from "@app/components/shared/LogoIcon";import { Wordmark } from "@app/components/shared/Wordmark";@@ -1172,9 +1172,9 @@ export default function MobileScannerPage() {}}>{/* Back button - floating top left */}- <Button+ <DSButtononClick={() => setMode("choice")}- variant="filled"+ variant="primary"size="sm"style={{position: "absolute",@@ -1187,8 +1187,7 @@ export default function MobileScannerPage() {}}>← {t("mobileScanner.back", "Back")}- </Button>-+ </DSButton>{/* Video feed - fills available space */}<Boxstyle={{@@ -1266,18 +1265,17 @@ export default function MobileScannerPage() {</Group>{/* Capture button */}- <Button+ <DSButtonfullWidth- size="lg"+ size="md"onClick={captureImage}loading={isProcessing}- variant="filled"- radius="xl"+ variant="primary">{isProcessing? t("mobileScanner.processing", "Processing..."): t("mobileScanner.capture", "Capture")}- </Button>+ </DSButton></Stack></Box></Box>@@ -1291,15 +1289,14 @@ export default function MobileScannerPage() {align="center"style={{ maxWidth: "500px", margin: "0 auto" }}>- <Button+ <DSButtononClick={() => setMode("choice")}- variant="subtle"+ variant="tertiary"size="sm"style={{ alignSelf: "flex-start" }}>← {t("mobileScanner.back", "Back")}- </Button>-+ </DSButton><Cardshadow="sm"padding="xl"@@ -1325,15 +1322,14 @@ export default function MobileScannerPage() {style={{ display: "none" }}onChange={handleFileSelect}/>- <Button+ <DSButtonsize="lg"- variant="filled"fullWidthonClick={() => fileInputRef.current?.click()}leftSection={<AddPhotoAlternateRoundedIcon />}>{t("mobileScanner.selectImage", "Select Image")}- </Button>+ </DSButton></Stack></Card></Stack>@@ -1383,23 +1379,22 @@ export default function MobileScannerPage() {><Stack gap="sm"><Group grow>- <Button variant="default" onClick={retake} size="lg">+ <DSButton variant="secondary" onClick={retake} size="md">{t("mobileScanner.retake", "Retake")}- </Button>- <Button variant="filled" onClick={addToBatch} size="lg">+ </DSButton>+ <DSButton variant="primary" onClick={addToBatch} size="md">{t("mobileScanner.addToBatch", "Add to Batch")}- </Button>+ </DSButton></Group>- <Button+ <DSButtonfullWidth- variant="filled"- size="lg"+ variant="primary"+ size="md"onClick={uploadImages}loading={isUploading}- radius="xl">{t("mobileScanner.upload", "Upload")}- </Button>+ </DSButton></Stack></Box></Box>@@ -1413,17 +1408,22 @@ export default function MobileScannerPage() {)</Text><Group gap="xs">- <Button- size="xs"- variant="outline"+ <DSButton+ size="sm"+ variant="secondary"+ accent="danger"onClick={clearBatch}- color="red">{t("mobileScanner.clearBatch", "Clear")}- </Button>- <Button size="xs" onClick={uploadImages} loading={isUploading}>+ </DSButton>+ <DSButton+ variant="primary"+ size="sm"+ onClick={uploadImages}+ loading={isUploading}+ >{t("mobileScanner.uploadAll", "Upload All")}- </Button>+ </DSButton></Group></Group><Boxdiff --git a/frontend/editor/src/core/styles/cookieconsent.css b/frontend/editor/src/core/styles/cookieconsent.cssindex 0f51c768cb..4c226e6d0d 100644--- a/frontend/editor/src/core/styles/cookieconsent.css+++ b/frontend/editor/src/core/styles/cookieconsent.css@@ -11,41 +11,30 @@z-index: 999999 !important;}-/* Dark mode styling */-.cc--darkmode .cm {- background: #2d2d2d !important;- color: #ffffff !important;- border-top: 1px solid #444 !important;-}-+/* Dark mode styling — use the app's dark-theme design tokens so the banner+ * matches the rest of the UI (navy-indigo surfaces) instead of a flat grey. */+.cc--darkmode .cm,.cc--darkmode .pm {- background: #2d2d2d !important;- color: #ffffff !important;+ background: var(--bg-surface) !important;+ color: var(--text-primary) !important;+ border: 1px solid var(--border-subtle) !important;}.cc--darkmode .pm-overlay {- background: rgba(0, 0, 0, 0.7) !important;-}--/* Button styling */-.cc--darkmode .cm__btn {- background: #444 !important;- color: #ffffff !important;- border: 1px solid #666 !important;-}--.cc--darkmode .cm__btn:hover {- background: #555 !important;+ background: rgba(0, 0, 0, 0.6) !important;}+/* Buttons — match the shared neutral surface treatment. */+.cc--darkmode .cm__btn,.cc--darkmode .pm__btn {- background: #444 !important;- color: #ffffff !important;- border: 1px solid #666 !important;+ background: var(--bg-muted) !important;+ color: var(--text-primary) !important;+ border: 1px solid var(--border-default) !important;}+.cc--darkmode .cm__btn:hover,.cc--darkmode .pm__btn:hover {- background: #555 !important;+ background: var(--hover-bg) !important;}/* Ensure ScrollArea doesn't interfere */diff --git a/frontend/editor/src/core/styles/theme.css b/frontend/editor/src/core/styles/theme.cssindex 0e5242e362..e5b744695e 100644--- a/frontend/editor/src/core/styles/theme.css+++ b/frontend/editor/src/core/styles/theme.css@@ -185,6 +185,7 @@--border-subtle: #e5e7eb;--border-default: #e2e8f0;--border-strong: #9ca3af;+ --border-hover: #9ca3af;--hover-bg: #f9fafb;--active-bg: #f3f4f6;--automation-entry-hover-bg: var(--color-gray-100);@@ -344,8 +345,6 @@--api-keys-card-shadow: rgba(0, 0, 0, 0.06);--api-keys-input-bg: #f8f8f8;--api-keys-input-border: #e0e0e0;- --api-keys-button-bg: #f5f5f5;- --api-keys-button-color: #333333;/* PDF Report Colors (always light) */--pdf-light-header-bg: 239 246 255;@@ -410,32 +409,27 @@:root {--onboarding-title: #0a0a0a;--onboarding-body: #4a5565;- --onboarding-primary-button-bg: #101828;- --onboarding-primary-button-text: #ffffff;- --onboarding-secondary-button-bg: #ffffff;- --onboarding-secondary-button-text: #6a7282;- --onboarding-secondary-button-border: #e5e5e5;--onboarding-step-active: #1e2939;--onboarding-step-inactive: #d1d5dc;}[data-mantine-color-scheme="dark"] {- /* Dark theme gray scale (inverted) */- --gray-50: 17 24 39;- --gray-100: 31 35 41;- --gray-200: 42 47 54;- --gray-300: 55 65 81;- --gray-400: 75 85 99;- --gray-500: 107 114 128;- --gray-600: 156 163 175;- --gray-700: 209 213 219;- --gray-800: 229 231 235;- --gray-900: 243 244 246;+ /* Dark theme gray scale (inverted) — navy-indigo tinted */+ --gray-50: 9 11 24;+ --gray-100: 13 16 32;+ --gray-200: 19 23 41;+ --gray-300: 28 35 64;+ --gray-400: 45 55 96;+ --gray-500: 90 98 128;+ --gray-600: 144 153 185;+ --gray-700: 195 200 230;+ --gray-800: 218 222 245;+ --gray-900: 238 241 252;/* Dark semantic colors for Tailwind */- --surface: 31 35 41;- --background: 42 47 54;- --border: 55 65 81;+ --surface: 19 23 41;+ --background: 9 11 24;+ --border: 28 35 64;/* Dark theme Mantine colors */--color-red-50: #2d1b1b;@@ -500,61 +494,62 @@--color-yellow-800: #fef08a;--color-yellow-900: #fef9c3;- /* Dark theme semantic colors */- --bg-surface: #2a2f36;- --bg-raised: #1f2329;- --bg-muted: #1f2329;- --bg-background: #2a2f36;- --bg-toolbar: #1f2329;- --bg-file-manager: #1f2329;- --bg-file-list: #2a2f36;- --btn-open-file: #0a8bff;- --text-primary: #f9fafb;- --text-secondary: #d1d5db;- --text-muted: #9ca3af;+ /* Dark theme semantic colors — deep navy/indigo palette */+ --bg-surface: #131729;+ --bg-raised: #0d1020;+ --bg-muted: #0d1020;+ --bg-background: #090b18;+ --bg-toolbar: #090b18;+ --bg-file-manager: #090b18;+ --bg-file-list: #131729;+ --btn-open-file: #4f8ef5;+ --text-primary: #e8eaf6;+ --text-secondary: #9299b0;+ --text-muted: #5b6280;/* Always-dark text (for use on light backgrounds like alerts) - does not change in dark mode */--text-always-dark: #1f2937;--text-always-dark-muted: #6b7280;- --border-subtle: rgba(255, 255, 255, 0.08);- --border-default: #3a4047;- --border-strong: #4b5563;- --hover-bg: #374151;- --active-bg: #4b5563;+ --border-subtle: rgba(255, 255, 255, 0.05);+ --border-default: #1c2340;+ --border-strong: #2d3560;+ --border-hover: #3a4680;+ --hover-bg: #181d38;+ --active-bg: #232a50;--automation-entry-hover-bg: var(--color-gray-200);/* Icon colors for dark mode */- --icon-user-bg: #2a2f36;- --icon-user-color: #6e7581;- --icon-notifications-bg: #2a2f36;- --icon-notifications-color: #6e7581;- --icon-tools-bg: #4b525a;- --icon-tools-color: #eaeaea;- --icon-read-bg: #4b525a;- --icon-read-color: #eaeaea;- --icon-sign-bg: #4b525a;- --icon-sign-color: #eaeaea;- --icon-automate-bg: #4b525a;- --icon-automate-color: #eaeaea;- --icon-files-bg: #4b525a;- --icon-files-color: #eaeaea;- --icon-activity-bg: #4b525a;- --icon-activity-color: #eaeaea;- --icon-config-bg: #4b525a;- --icon-config-color: #eaeaea;+ --icon-user-bg: #131729;+ --icon-user-color: #6e7898;+ --icon-notifications-bg: #131729;+ --icon-notifications-color: #6e7898;+ --icon-tools-bg: #1c2340;+ --icon-tools-color: #e0e3f8;+ --icon-read-bg: #1c2340;+ --icon-read-color: #e0e3f8;+ --icon-sign-bg: #1c2340;+ --icon-sign-color: #e0e3f8;+ --icon-automate-bg: #1c2340;+ --icon-automate-color: #e0e3f8;+ --icon-files-bg: #1c2340;+ --icon-files-color: #e0e3f8;+ --icon-activity-bg: #1c2340;+ --icon-activity-color: #e0e3f8;+ --icon-config-bg: #1c2340;+ --icon-config-color: #e0e3f8;/* Inactive icon colors for dark mode */- --icon-inactive-bg: #2a2f36;- --icon-inactive-color: #6e7581;+ --icon-inactive-bg: #131729;+ --icon-inactive-color: #6e7898;/* Dark mode tooltip colors */- --tooltip-title-bg: #4b525a;- --tooltip-title-color: #fff;+ --tooltip-title-bg: #1c2340;+ --tooltip-title-color: #e8eaf6;--tooltip-header-bg: var(--bg-raised);--tooltip-header-color: var(--text-primary);--tooltip-border: var(--border-default);- --accent-interactive: #ffffff;- --text-instruction: #ffffff;+ --accent-interactive: #e8eaf6;+ --text-instruction: #e8eaf6;--text-brand: var(--color-gray-800);--text-brand-accent: #ef4444;@@ -563,77 +558,77 @@--spdf-compare-added-badge-fg: var(--color-green-500);/* container */- --landing-paper-bg: #171a1f;+ --landing-paper-bg: #090b18;--landing-inner-paper-bg: var(--bg-raised);- --landing-inner-paper-border: #2d3237;+ --landing-inner-paper-border: #1c2340;/* landing dark overrides */--landing-stack-glow-bg: radial-gradient(circle,- rgba(30, 136, 229, 0.22) 0%,+ rgba(50, 90, 210, 0.22) 0%,transparent 70%);--landing-doc-shadow-back-idle:- 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);+ 0 4px 20px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35);--landing-doc-shadow-back-hover:- 0 14px 44px rgba(0, 0, 0, 0.55), 0 6px 16px rgba(0, 0, 0, 0.35);+ 0 14px 44px rgba(0, 0, 0, 0.65), 0 6px 16px rgba(0, 0, 0, 0.45);--landing-doc-shadow-front-idle:- 0 8px 30px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.3),+ 0 8px 30px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.4),0 0 0 1px rgba(255, 255, 255, 0.04);--landing-doc-shadow-front-hover:- 0 20px 52px rgba(0, 0, 0, 0.6), 0 10px 24px rgba(0, 0, 0, 0.4),+ 0 20px 52px rgba(0, 0, 0, 0.7), 0 10px 24px rgba(0, 0, 0, 0.5),0 0 0 1px rgba(255, 255, 255, 0.06);- --landing-button-color: #ffffff;+ --landing-button-color: #e8eaf6;--landing-button-hover-bg: var(--bg-raised);/* selected file header colors for dark */- --header-selected-bg: #1e88e5;+ --header-selected-bg: #2040a0;--header-selected-fg: #ffffff;/* file card background (dark) */- --file-card-bg: #1f2329;- --accordion-item-bg: #373d45; /* accordion item background - more distinguishable */+ --file-card-bg: #0d1020;+ --accordion-item-bg: #1c2340; /* accordion item background - more distinguishable *//* shadows */- --drop-shadow-color: rgba(255, 255, 255, 0.08);- --drop-shadow-color-strong: rgba(255, 255, 255, 0.04);- --drop-shadow-filter: drop-shadow(0 0.2rem 0.4rem rgba(200, 200, 200, 0.08))- drop-shadow(0 0.6rem 0.6rem rgba(200, 200, 200, 0.06))- drop-shadow(0 1.2rem 1rem rgba(200, 200, 200, 0.04));+ --drop-shadow-color: rgba(255, 255, 255, 0.05);+ --drop-shadow-color-strong: rgba(255, 255, 255, 0.03);+ --drop-shadow-filter: drop-shadow(0 0.2rem 0.4rem rgba(0, 0, 0, 0.3))+ drop-shadow(0 0.6rem 0.6rem rgba(0, 0, 0, 0.2))+ drop-shadow(0 1.2rem 1rem rgba(0, 0, 0, 0.15));/* Adjust shadows for dark mode */- --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);- --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);- --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);- --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);- --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);+ --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);+ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);+ --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);+ --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);+ --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);--tools-text-and-icon-color: var(--text-primary);/* Tool picker sticky header variables (dark mode) */- --tool-header-bg: #2a2f36;- --tool-header-border: #3a4047;- --tool-header-text: #d0d6dc;- --tool-header-badge-bg: #4b525a;- --tool-header-badge-text: #ffffff;+ --tool-header-bg: #131729;+ --tool-header-border: #1c2340;+ --tool-header-text: #c2c8e0;+ --tool-header-badge-bg: #1c2340;+ --tool-header-badge-text: #e8eaf6;/* Subcategory title styling (dark mode) */- --tool-subcategory-text-color: #9ca3af; /* lighter text in dark mode as well */- --tool-subcategory-rule-color: #3a4047; /* doubly lighter (relative) line in dark */+ --tool-subcategory-text-color: #5b6280;+ --tool-subcategory-rule-color: #1c2340;/* PDF text selection colors (dark mode) */- --pdf-selection-bg: rgba(96, 165, 250, 0.25);- --pdf-selection-ring: rgba(96, 165, 250, 0.28);+ --pdf-selection-bg: rgba(96, 130, 250, 0.25);+ --pdf-selection-ring: rgba(96, 130, 250, 0.28);/* Placeholder text colors (dark mode) */- --search-text-and-icon-color: #ffffff !important;- --input-bg: #4b525a;+ --search-text-and-icon-color: #e8eaf6 !important;+ --input-bg: #1c2340;/* Tool panel search bar background colors (dark mode) */- --tool-panel-search-bg: #1f2329;- --tool-panel-search-border-bottom: #4b525a;+ --tool-panel-search-bg: #0d1020;+ --tool-panel-search-border-bottom: #1c2340;- --information-text-bg: #292e34;- --information-text-color: #ececec;+ --information-text-bg: #131729;+ --information-text-color: #e0e3f8;/* Bulk selection panel specific colors (dark mode) */--bulk-panel-bg: var(--bg-raised); /* dark background for parent container */@@ -642,36 +637,29 @@--border-default); /* default border for cards and buttons */--bulk-card-hover-border: var(--border-strong); /* stronger border on hover */- --unsupported-bar-bg: #1f2329;- --unsupported-bar-border: #4b525a;+ --unsupported-bar-bg: #0d1020;+ --unsupported-bar-border: #1c2340;/* Config Modal colors (dark mode) */- --modal-nav-bg: #1f2329;- --modal-nav-section-title: #9ca3af;- --modal-nav-item: #d0d6dc;- --modal-nav-item-active: #0a8bff;- --modal-nav-item-active-bg: rgba(10, 139, 255, 0.15);- --modal-content-bg: #2a2f36;- --modal-header-border: rgba(255, 255, 255, 0.08);+ --modal-nav-bg: #0d1020;+ --modal-nav-section-title: #5b6280;+ --modal-nav-item: #c2c8e0;+ --modal-nav-item-active: #4f8ef5;+ --modal-nav-item-active-bg: rgba(79, 142, 245, 0.15);+ --modal-content-bg: #131729;+ --modal-header-border: rgba(255, 255, 255, 0.05);/* Onboarding (dark mode) */- --onboarding-title: #f9fafb;- --onboarding-body: #d1d5db;- --onboarding-primary-button-bg: #ffffff;- --onboarding-primary-button-text: #0b1220;- --onboarding-secondary-button-bg: transparent;- --onboarding-secondary-button-text: #e5e7eb;- --onboarding-secondary-button-border: #3a4047;- --onboarding-step-active: #e5e7eb;- --onboarding-step-inactive: #4b5563;+ --onboarding-title: #e8eaf6;+ --onboarding-body: #9299b0;+ --onboarding-step-active: #d8dcf0;+ --onboarding-step-inactive: #2d3560;/* API Keys section colors (dark mode) */- --api-keys-card-bg: #2a2f36;- --api-keys-card-border: #3a4047;+ --api-keys-card-bg: #131729;+ --api-keys-card-border: #1c2340;--api-keys-card-shadow: none;- --api-keys-input-bg: #1f2329;- --api-keys-input-border: #3a4047;- --api-keys-button-bg: #3a4047;- --api-keys-button-color: #d0d6dc;+ --api-keys-input-bg: #0d1020;+ --api-keys-input-border: #1c2340;/* Code token colors (dark mode - Cursor-like) */--code-kw-color: #c792ea; /* purple */@@ -679,21 +667,21 @@--code-num-color: #f78c6c; /* orange */--code-com-color: #697098; /* muted gray-blue *//* Compare tool specific colors (dark mode) - only for colors that don't have existing theme pairs */- --compare-upload-dropzone-bg: rgba(31, 35, 41, 0.45);- --compare-upload-dropzone-border: rgba(75, 85, 99, 0.6);- --compare-upload-icon-bg: rgba(75, 85, 99, 0.2);- --compare-upload-icon-color: rgba(243, 244, 246, 0.75);- --compare-upload-divider: rgba(75, 85, 99, 0.5);+ --compare-upload-dropzone-bg: rgba(9, 11, 24, 0.45);+ --compare-upload-dropzone-border: rgba(28, 35, 64, 0.6);+ --compare-upload-icon-bg: rgba(28, 35, 64, 0.2);+ --compare-upload-icon-color: rgba(232, 234, 246, 0.75);+ --compare-upload-divider: rgba(28, 35, 64, 0.5);/* Compare page label chip (dark mode): slightly darker than surrounding rows */- --compare-page-label-bg: #1f2329;+ --compare-page-label-bg: #0d1020;--compare-page-label-fg: var(--text-secondary);/* Status indicator dot ring shadow (dark) */- --status-dot-ring: 0 0 0 2px rgba(255, 255, 255, 0.18);+ --status-dot-ring: 0 0 0 2px rgba(255, 255, 255, 0.15);/* Input element styling (dark) */- --input-bg: #4b525a;+ --input-bg: #1c2340;/* Select/dropdown placeholder state (dark) */--select-placeholder-bg: var(--mantine-color-dark-5);@@ -717,11 +705,11 @@/* Plan section card borders - only override in dark mode */[data-mantine-color-scheme="dark"] .plan-card {- --paper-border-color: rgb(158, 158, 158) !important;+ --paper-border-color: rgb(44, 52, 120) !important;}[data-mantine-color-scheme="dark"] .plan-card [data-size="sm"] {- color: rgb(221, 221, 221) !important;+ color: rgb(194, 200, 224) !important;}/* Current plan badge - use light mode green in dark mode */@@ -736,7 +724,7 @@[data-mantine-color-scheme="dark"].plan-button:not(:disabled):not([data-disabled]) {- background-color: #1c598e !important;+ background-color: #2040a0 !important;}/* Lighter grey for disabled plan buttons */@@ -810,16 +798,15 @@}[data-mantine-color-scheme="dark"] {- --link-hover-bg: rgba(59, 170, 255, 0.14);- --link-hover-border: rgba(59, 170, 255, 0.38);+ --link-hover-bg: rgba(79, 130, 245, 0.14);+ --link-hover-border: rgba(79, 130, 245, 0.38);--link-hover-shadow:- inset 0 0 0 1px rgba(255, 255, 255, 0.14),- 0 1px 4px rgba(10, 139, 255, 0.18);- --link-focus-ring: rgba(59, 170, 255, 0.3);- --link-toolbar-bg: rgba(15, 23, 42, 0.92);- --link-toolbar-border: rgba(255, 255, 255, 0.08);+ inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 1px 4px rgba(79, 142, 245, 0.18);+ --link-focus-ring: rgba(79, 130, 245, 0.3);+ --link-toolbar-bg: rgba(9, 11, 24, 0.94);+ --link-toolbar-border: rgba(255, 255, 255, 0.07);--link-toolbar-shadow:- 0 12px 40px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.25),+ 0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35),0 0 0 0.5px rgba(255, 255, 255, 0.04);}@@ -1004,7 +991,7 @@}[data-theme="dark"] {- --shadow-color: rgba(0, 0, 0, 0.75);+ --shadow-color: rgba(0, 0, 0, 0.88);}/* ---- Wordmark light/dark switching (use instead of JS colorScheme checks) ---- */diff --git a/frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.ts b/frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.tsindex 0f97121b66..df3ce94b23 100644--- a/frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.ts+++ b/frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.ts@@ -126,7 +126,9 @@ test.describe("Viewer sidebar add buttons - real PDF round-trip", () => {});const attachments = doc.getAttachments();expect(attachments.length).toBeGreaterThan(0);- expect(attachments.map((a) => a.name)).toContain(attachmentName);+ expect(attachments.map((a: { name?: string }) => a.name)).toContain(+ attachmentName,+ );});test("Add bookmark from viewer sidebar adds the bookmark to the produced PDF outline", async ({diff --git a/frontend/editor/src/core/tests/stubbed/cert-sign-wizard.spec.ts b/frontend/editor/src/core/tests/stubbed/cert-sign-wizard.spec.tsindex f72d642a8e..9b66fec1d9 100644--- a/frontend/editor/src/core/tests/stubbed/cert-sign-wizard.spec.ts+++ b/frontend/editor/src/core/tests/stubbed/cert-sign-wizard.spec.ts@@ -59,7 +59,7 @@ async function mockHardwareEndpoints(page: Page) {}test.describe("CertSign tool - certificate source model", () => {- test("renders, accepts a PDF, and exposes the Upload source", async ({+ test("renders, accepts a PDF, and defaults to upload when no other sources exist", async ({page,}) => {await page.route("**/api/v1/security/cert-sign", (route) =>@@ -76,10 +76,14 @@ test.describe("CertSign tool - certificate source model", () => {await uploadFiles(page, SAMPLE_PDF);await expect(page).toHaveURL(/\/cert-sign/);- // Source step always offers "Upload" (the former "Manual" mode).+ // With no server/hardware sources, the picker collapses to a hint and the+ // flow proceeds in the default MANUAL (upload) mode — no lone Upload CTA.await expect(- page.getByRole("button", { name: /^upload$/i }).first(),- ).toBeAttached({ timeout: 10_000 });+ page.getByText(/no other certificate sources are available/i).first(),+ ).toBeVisible({ timeout: 10_000 });+ await expect(page.getByRole("button", { name: /^upload$/i })).toHaveCount(+ 0,+ );});test("does NOT offer 'This device' when not running as desktop", async ({@@ -89,9 +93,10 @@ test.describe("CertSign tool - certificate source model", () => {await page.waitForLoadState("domcontentloaded");await uploadFiles(page, SAMPLE_PDF);+ // No alternative sources: the picker is a hint, and hardware is never offered.await expect(- page.getByRole("button", { name: /^upload$/i }).first(),- ).toBeAttached({ timeout: 10_000 });+ page.getByText(/no other certificate sources are available/i).first(),+ ).toBeVisible({ timeout: 10_000 });await expect(page.getByRole("button", { name: /this device/i }),).toHaveCount(0);diff --git a/frontend/editor/src/core/tests/stubbed/page-editor-rotation.spec.ts b/frontend/editor/src/core/tests/stubbed/page-editor-rotation.spec.tsindex aeb6eb0de2..f24e13f312 100644--- a/frontend/editor/src/core/tests/stubbed/page-editor-rotation.spec.ts+++ b/frontend/editor/src/core/tests/stubbed/page-editor-rotation.spec.ts@@ -93,7 +93,11 @@ test.describe("PageEditor (multitool) rotation save", () => {// 4. The exported /Rotate must match what the editor showed: page 3 upright// (0), the untouched pages keeping their source rotation.const outDoc = await PDFDocument.load(fs.readFileSync(tmpOut));- const outRotations = outDoc.getPages().map((p) => p.getRotation().angle);+ const outRotations = outDoc+ .getPages()+ .map(+ (p: { getRotation: () => { angle: number } }) => p.getRotation().angle,+ );fs.rmSync(tmpOut, { force: true });expect(outRotations).toEqual([0, 90, 0, 180]);});diff --git a/frontend/editor/src/core/tests/stubbed/watermark-tool.spec.ts b/frontend/editor/src/core/tests/stubbed/watermark-tool.spec.tsindex e2d3ffcb71..c72fbadba0 100644--- a/frontend/editor/src/core/tests/stubbed/watermark-tool.spec.ts+++ b/frontend/editor/src/core/tests/stubbed/watermark-tool.spec.ts@@ -33,11 +33,11 @@ test.describe("Watermark tool — mode selection after upload", () => {test("post-upload UI renders mode cards or settings (whatever the chooser is)", async ({page,}) => {- // The chooser may render as Mantine cards or buttons depending on the build.- // Either flavour is fine; what we want to catch is "post-upload watermark- // page is empty / errored".+ // The chooser may render as Mantine cards, buttons, or a segmented control+ // depending on the build. Either flavour is fine; what we want to catch is+ // "post-upload watermark page is empty / errored".const choices = page.locator(- '.mantine-Card-root, button:has-text("Text"), button:has-text("Image"), button:has-text("File")',+ '.mantine-Card-root, .mantine-SegmentedControl-root label, button:has-text("Text"), button:has-text("Image"), button:has-text("File")',);await expect.poll(async () => choices.count(), { timeout: 10_000 })diff --git a/frontend/editor/src/core/theme/mantineTheme.ts b/frontend/editor/src/core/theme/mantineTheme.tsindex 061ac0e819..374c3c1a79 100644--- a/frontend/editor/src/core/theme/mantineTheme.ts+++ b/frontend/editor/src/core/theme/mantineTheme.ts@@ -58,6 +58,23 @@ const gray: MantineColorsTuple = ["var(--color-gray-900)",];+// Navy-indigo dark scale — replaces Mantine's neutral gray defaults so all+// dark-mode components (SegmentedControl, inputs, dropdowns, etc.) use the+// portal palette automatically via --mantine-color-dark-*.+// dark-0..3 = text/icon shades, dark-4..7 = surface elevations, dark-8..9 = deepest bg.+const dark: MantineColorsTuple = [+ "#c2c8e0", // dark-0 — primary text on dark bg+ "#9299b0", // dark-1 — secondary text+ "#6e7898", // dark-2 — muted text / icons+ "#4a5282", // dark-3 — subtle text / dividers+ "#1c2340", // dark-4 — elevated surface / selected bg (e.g. SegmentedControl indicator)+ "#131729", // dark-5 — card / panel surface+ "#0d1020", // dark-6 — toolbar / sidebar bg (e.g. SegmentedControl root)+ "#090b18", // dark-7 — page background (deepest reachable surface)+ "#07091a", // dark-8+ "#050714", // dark-9+];+export const mantineTheme = createTheme({// Primary colorprimaryColor: "primary",@@ -68,6 +85,7 @@ export const mantineTheme = createTheme({green,yellow,gray,+ dark,},// Spacing system - uses CSS variablesdiff --git a/frontend/editor/src/core/tokens/tokens.css b/frontend/editor/src/core/tokens/tokens.cssindex c8ba2171a0..189b88cb8e 100644--- a/frontend/editor/src/core/tokens/tokens.css+++ b/frontend/editor/src/core/tokens/tokens.css@@ -117,6 +117,8 @@--color-toggle-off: #cbd5e1;--color-badge-red: #ef4444;+ /* Segmented control — semantic tokens so dark mode can decouple from blue surfaces */+/* Shadows */--shadow-sm: inset 0 0 0 1px #e3e8ee;--shadow-md: inset 0 0 0 1px #e3e8ee, 0 1px 2px rgba(15, 23, 42, 0.04);@@ -241,6 +243,8 @@--color-toggle-off: #3d4f6a;+ /* Segmented control — blue-toned dark to match app surface colors */+--shadow-sm: inset 0 0 0 1px #283248;--shadow-md: inset 0 0 0 1px #283248, 0 1px 3px rgba(0, 0, 0, 0.3);--shadow-lg: inset 0 0 0 1px #283248, 0 8px 24px rgba(0, 0, 0, 0.4);@@ -405,6 +409,15 @@}}+/* Default transition set (avoids text-colour transitions); not !important so components can override. */+*,+*::before,+*::after {+ transition-property:+ background, background-color, border, border-color, box-shadow, opacity,+ transform, fill, stroke, outline-color;+}+/* Visually-hidden utility for content meant only for screen readers. */.sr-only {position: absolute;diff --git a/frontend/editor/src/core/tools/AddStamp.tsx b/frontend/editor/src/core/tools/AddStamp.tsxindex 9a7422188e..6070ae5e89 100644--- a/frontend/editor/src/core/tools/AddStamp.tsx+++ b/frontend/editor/src/core/tools/AddStamp.tsx@@ -126,7 +126,6 @@ const AddStamp = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => {},]}disabled={endpointLoading}- buttonClassName={styles.modeToggleButton}textClassName={styles.modeToggleButtonText}/>)}diff --git a/frontend/editor/src/core/tools/Compare.tsx b/frontend/editor/src/core/tools/Compare.tsxindex 81cf263ded..b555ecfb9b 100644--- a/frontend/editor/src/core/tools/Compare.tsx+++ b/frontend/editor/src/core/tools/Compare.tsx@@ -2,15 +2,9 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import CompareRoundedIcon from "@mui/icons-material/CompareRounded";import CloseIcon from "@mui/icons-material/Close";-import {- Box,- Group,- Stack,- Text,- Button,- Modal,- ActionIcon,-} from "@mantine/core";+import { Box, Group, Stack, Text, Modal } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import SwapVertRoundedIcon from "@mui/icons-material/SwapVertRounded";import { createToolFlow } from "@app/components/tools/shared/createToolFlow";import { useBaseTool } from "@app/hooks/tools/shared/useBaseTool";@@ -33,7 +27,7 @@ import type { CompareWorkbenchData } from "@app/types/compare";import { getDefaultWorkbench } from "@app/types/workbench";import { truncateCenter } from "@app/utils/textUtils";import {- FileSelectorPicker,+ FileSelectorPicker as PopoverFileSelector,FileSelectorResult,} from "@app/components/shared/FileSelectorPicker";import "@app/components/tools/compare/compareView.css";@@ -373,9 +367,14 @@ const Compare = (props: BaseToolProps) => {}}><ActionIcon- variant="subtle"- size="xs"- style={{ position: "absolute", top: "0.5rem", right: "0.5rem" }}+ variant="tertiary"+ accent="neutral"+ size="sm"+ style={{+ position: "absolute",+ top: "0.5rem",+ right: "0.5rem",+ }}onClick={() => clearSlot(role)}aria-label={t("compare.clearSlot", "Remove file")}>@@ -421,7 +420,7 @@ const Compare = (props: BaseToolProps) => {data-slot-state="empty"style={{ width: "100%" }}>- <FileSelectorPicker+ <PopoverFileSelectortestId={`compare-slot-${role}-add`}placeholder={isDisabled@@ -479,12 +478,12 @@ const Compare = (props: BaseToolProps) => {<Stack gap="sm" className="compare-step-selection"><div className="compare-step-selection__clear-row"><Button- variant="subtle"- size="compact-xs"+ variant="tertiary"+ size="sm"onClick={() => setClearConfirmOpen(true)}disabled={!hasAnySelected}- styles={{ root: { textDecoration: "underline" } }}style={{+ textDecoration: "underline",background: !hasAnySelected ? "transparent" : undefined,color: !hasAnySelected? "var(--spdf-clear-disabled-text)"@@ -509,8 +508,7 @@ const Compare = (props: BaseToolProps) => {</Stack>{hasBothSelected && (- <button- type="button"+ <ButtonclassName="compare-step-selection__swap"onClick={handleSwap}disabled={base.operation.isLoading}@@ -523,7 +521,7 @@ const Compare = (props: BaseToolProps) => {<span className="compare-step-selection__swap-label">{t("compare.swap.label", "Swap")}</span>- </button>+ </Button>)}</div>@@ -543,13 +541,12 @@ const Compare = (props: BaseToolProps) => {</Text><Group justify="flex-end" gap="sm"><Button- variant="light"+ variant="secondary"onClick={() => setSwapConfirmOpen(false)}>{t("cancel", "Cancel")}</Button><Button- variant="filled"onClick={() => {setSwapConfirmOpen(false);performSwap();@@ -577,13 +574,13 @@ const Compare = (props: BaseToolProps) => {</Text><Group justify="flex-end" gap="sm"><Button- variant="light"+ variant="secondary"onClick={() => setClearConfirmOpen(false)}>{t("cancel", "Cancel")}</Button><Button- variant="filled"+ accent="danger"onClick={() => {setClearConfirmOpen(false);performClearSelected();diff --git a/frontend/editor/src/core/tools/GetPdfInfo.tsx b/frontend/editor/src/core/tools/GetPdfInfo.tsxindex 9a9d4b4b63..7407c064ec 100644--- a/frontend/editor/src/core/tools/GetPdfInfo.tsx+++ b/frontend/editor/src/core/tools/GetPdfInfo.tsx@@ -2,7 +2,8 @@ import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";import LinkIcon from "@mui/icons-material/Link";-import { Stack, Group, Divider, Text, UnstyledButton } from "@mantine/core";+import { Stack, Divider, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { createToolFlow } from "@app/components/tools/shared/createToolFlow";import { useBaseTool } from "@app/hooks/tools/shared/useBaseTool";import { BaseToolProps, ToolComponent } from "@app/types/tool";@@ -177,7 +178,10 @@ const GetPdfInfo = (props: BaseToolProps) => {<Stack gap={0}>{CHAPTERS.map((c, idx) => (<Stack key={c.id} gap={0}>- <UnstyledButton+ <Button+ variant="tertiary"+ fullWidth+ justify="start"onClick={() => {if (!reportData) return;setCustomWorkbenchViewData(REPORT_VIEW_ID, {@@ -188,19 +192,15 @@ const GetPdfInfo = (props: BaseToolProps) => {navigationActions.setWorkbench(REPORT_WORKBENCH_ID);}}}- style={{- width: "100%",- textAlign: "left",- padding: "8px 4px",- }}- >- <Group justify="flex-start" gap="sm">+ style={{ padding: "8px 4px" }}+ leftSection={<LinkIcon fontSize="small" style={{ opacity: 0.7 }} />- <Text size="md" c="dimmed">- {t(c.labelKey, c.fallback)}- </Text>- </Group>- </UnstyledButton>+ }+ >+ <Text size="md" c="dimmed">+ {t(c.labelKey, c.fallback)}+ </Text>+ </Button>{idx < CHAPTERS.length - 1 && <Divider my={6} />}</Stack>))}diff --git a/frontend/editor/src/core/tools/Merge.tsx b/frontend/editor/src/core/tools/Merge.tsxindex 9138dfa4f0..ae2bed26fe 100644--- a/frontend/editor/src/core/tools/Merge.tsx+++ b/frontend/editor/src/core/tools/Merge.tsx@@ -1,6 +1,7 @@import { useCallback, useEffect, useRef } from "react";import { useTranslation } from "react-i18next";-import { Button, Stack, Text } from "@mantine/core";+import { Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { createToolFlow } from "@app/components/tools/shared/createToolFlow";import MergeSettings from "@app/components/tools/merge/MergeSettings";import MergeFileSorter from "@app/components/tools/merge/MergeFileSorter";@@ -181,8 +182,8 @@ const Merge = (props: BaseToolProps) => {)}</Text><Button- variant="light"- size="xs"+ variant="secondary"+ size="sm"onClick={() => navActions.setWorkbench("fileEditor")}>{t("merge.goToFileEditor", "Go to file editor")}diff --git a/frontend/editor/src/core/tools/SharedSign.tsx b/frontend/editor/src/core/tools/SharedSign.tsxindex 82b5787c41..5131db40c3 100644--- a/frontend/editor/src/core/tools/SharedSign.tsx+++ b/frontend/editor/src/core/tools/SharedSign.tsx@@ -2,16 +2,16 @@ import { useMemo, useState } from "react";import {Alert,Badge,- Button,Center,- Chip,Group,Loader,Paper,- SegmentedControl,Stack,Text,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { Chip } from "@app/ui/Chip";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import AddIcon from "@mui/icons-material/Add";import ArrowBackIcon from "@mui/icons-material/ArrowBack";@@ -164,8 +164,8 @@ const SharedSign = (_props: BaseToolProps) => {<Stack p="md" gap="md"><Group><Button- variant="subtle"- size="compact-sm"+ variant="tertiary"+ size="sm"leftSection={<ArrowBackIcon sx={{ fontSize: "1rem" }} />}onClick={() => setShowCreate(false)}>@@ -248,7 +248,7 @@ const SharedSign = (_props: BaseToolProps) => {fullWidthvalue={tab}onChange={(value) => changeTab(value as Tab)}- data={[+ options={[{ label: t("sharedSign.tab.active", "Active"), value: "active" },{label: t("sharedSign.tab.completed", "Completed"),@@ -258,22 +258,34 @@ const SharedSign = (_props: BaseToolProps) => {/><Button- variant="light"+ variant="tertiary"leftSection={<AddIcon sx={{ fontSize: "1.1rem" }} />}onClick={() => setShowCreate(true)}>{t("sharedSign.newRequest", "Request signatures")}</Button>- <Chip.Group multiple value={filters} onChange={setFilters}>- <Group gap="xs">- {filterOptions.map((f) => (- <Chip key={f.key} value={f.key} size="xs" radius="sm">+ <Group gap="xs">+ {filterOptions.map((f) => {+ const active = filters.includes(f.key);+ return (+ <Chip+ key={f.key}+ size="xs"+ variant={active ? "primary" : "secondary"}+ onClick={() =>+ setFilters((prev) =>+ prev.includes(f.key)+ ? prev.filter((k) => k !== f.key)+ : [...prev, f.key],+ )+ }+ >{f.label}</Chip>- ))}- </Group>- </Chip.Group>+ );+ })}+ </Group>{controller.loading && items.length === 0 ? (<Center py="xl">diff --git a/frontend/editor/src/core/tools/annotate/AnnotationPanel.tsx b/frontend/editor/src/core/tools/annotate/AnnotationPanel.tsxindex 17f2e028c0..6986f4d7e4 100644--- a/frontend/editor/src/core/tools/annotate/AnnotationPanel.tsx+++ b/frontend/editor/src/core/tools/annotate/AnnotationPanel.tsx@@ -4,17 +4,17 @@ import { useTranslation } from "react-i18next";import {Text,Group,- ActionIcon,Stack,Slider,Box,Tooltip as MantineTooltip,- Button,Tooltip,Paper,Menu,Modal,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import {ColorPicker,@@ -365,12 +365,10 @@ export function AnnotationPanel(props: AnnotationPanelProps) {<MantineTooltip key={tool.id} label={tool.label} withArrow><ActionIconvariant={- activeTool === tool.id && annotationsVisible ? "filled" : "subtle"+ activeTool === tool.id && annotationsVisible+ ? "primary"+ : "tertiary"}- color={- activeTool === tool.id && annotationsVisible ? "blue" : undefined- }- radius="md"onClick={() => activateAnnotationTool(tool.id)}disabled={!annotationsVisible}aria-label={tool.label}@@ -641,9 +639,12 @@ export function AnnotationPanel(props: AnnotationPanelProps) {</Text><Group gap="xs"><ActionIcon- variant={textAlignment === "left" ? "filled" : "default"}+ variant={+ textAlignment === "left" ? "primary" : "secondary"+ }onClick={() => setTextAlignment("left")}size="md"+ aria-label={t("annotation.alignLeft", "Align left")}><LocalIconicon="format-align-left"@@ -653,10 +654,11 @@ export function AnnotationPanel(props: AnnotationPanelProps) {</ActionIcon><ActionIconvariant={- textAlignment === "center" ? "filled" : "default"+ textAlignment === "center" ? "primary" : "secondary"}onClick={() => setTextAlignment("center")}size="md"+ aria-label={t("annotation.alignCenter", "Align center")}><LocalIconicon="format-align-center"@@ -665,9 +667,12 @@ export function AnnotationPanel(props: AnnotationPanelProps) {/></ActionIcon><ActionIcon- variant={textAlignment === "right" ? "filled" : "default"}+ variant={+ textAlignment === "right" ? "primary" : "secondary"+ }onClick={() => setTextAlignment("right")}size="md"+ aria-label={t("annotation.alignRight", "Align right")}><LocalIconicon="format-align-right"@@ -691,8 +696,8 @@ export function AnnotationPanel(props: AnnotationPanelProps) {}}/><Button- size="xs"- variant={textBackgroundColor ? "light" : "default"}+ size="sm"+ variant="secondary"onClick={() => {setTextBackgroundColor("");annotationApiRef?.current?.setAnnotationStyle?.(@@ -739,8 +744,8 @@ export function AnnotationPanel(props: AnnotationPanelProps) {}}/><Button- size="xs"- variant={noteBackgroundColor ? "light" : "default"}+ size="sm"+ variant="secondary"onClick={() => {setNoteBackgroundColor("");annotationApiRef?.current?.setAnnotationStyle?.(@@ -814,8 +819,8 @@ export function AnnotationPanel(props: AnnotationPanelProps) {/></Box><Button- size="xs"- variant={shapeThickness === 0 ? "filled" : "light"}+ size="sm"+ variant={shapeThickness === 0 ? "primary" : "tertiary"}onClick={() =>setShapeThickness(shapeThickness === 0 ? 1 : 0)}@@ -1179,30 +1184,22 @@ export function AnnotationPanel(props: AnnotationPanelProps) {<Tooltiplabel={t("annotation.selectAndMove", "Select and edit annotations")}>- <ActionIcon+ <Buttonvariant={activeTool === "select" && annotationsVisible- ? "filled"- : "default"+ ? "primary"+ : "secondary"}- size="lg"disabled={!annotationsVisible}onClick={() => {activateAnnotationTool("select");}}- style={{- width: "auto",- paddingInline: "0.75rem",- display: "inline-flex",- alignItems: "center",- gap: "0.4rem",- }}+ leftSection={+ <LocalIcon icon="touch-app-rounded" width={20} height={20} />+ }>- <LocalIcon icon="touch-app-rounded" width={20} height={20} />- <Text component="span" size="sm" fw={500}>- {t("annotation.selectAndMove", "Select and Edit")}- </Text>- </ActionIcon>+ {t("annotation.selectAndMove", "Select and Edit")}+ </Button></Tooltip><DrawingControls@@ -1216,7 +1213,7 @@ export function AnnotationPanel(props: AnnotationPanelProps) {<Menu.Target><Tooltip label={t("annotation.moreActions", "More actions")}><ActionIcon- variant="subtle"+ variant="tertiary"size="lg"disabled={isApplyingChanges}aria-label={t("annotation.moreActions", "More actions")}@@ -1287,15 +1284,12 @@ export function AnnotationPanel(props: AnnotationPanelProps) {<ButtonfullWidthsize="md"- radius="md"- mt="sm"- variant="filled"- color="blue"disabled={applyDisabled || isApplyingChanges || isClearingDocumentAnnotations}loading={isApplyingChanges}onClick={() => void handleApplyChangesClick()}+ style={{ marginTop: "0.75rem" }}>{t("annotation.saveChanges", "Save Changes")}</Button>@@ -1324,14 +1318,13 @@ export function AnnotationPanel(props: AnnotationPanelProps) {</Text><Group justify="flex-end"><Button- variant="default"disabled={isClearingDocumentAnnotations}onClick={() => setIsClearDocumentModalOpen(false)}>{t("common.cancel", "Cancel")}</Button><Button- color="red"+ accent="danger"loading={isClearingDocumentAnnotations}disabled={isApplyingChanges}leftSection={diff --git a/frontend/editor/src/core/tools/formFill/FormFieldSidebar.tsx b/frontend/editor/src/core/tools/formFill/FormFieldSidebar.tsxindex 3623757c66..2e49991ceb 100644--- a/frontend/editor/src/core/tools/formFill/FormFieldSidebar.tsx+++ b/frontend/editor/src/core/tools/formFill/FormFieldSidebar.tsx@@ -8,14 +8,8 @@* - Better visual hierarchy and spacing*/import React, { useCallback, useEffect, useRef } from "react";-import {- Box,- Text,- ScrollArea,- Badge,- Tooltip,- ActionIcon,-} from "@mantine/core";+import { Box, Text, ScrollArea, Badge, Tooltip } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import { useFormFill } from "@app/tools/formFill/FormFillContext";import { FieldInput } from "@app/tools/formFill/FieldInput";@@ -116,7 +110,7 @@ export function FormFieldSidebar({ visible, onToggle }: FormFieldSidebarProps) {</Badge></div><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"onClick={onToggle}aria-label={t("formFill.sidebar.close", "Close sidebar")}diff --git a/frontend/editor/src/core/tools/formFill/FormFill.tsx b/frontend/editor/src/core/tools/formFill/FormFill.tsxindex 0e4829df69..a99f990f33 100644--- a/frontend/editor/src/core/tools/formFill/FormFill.tsx+++ b/frontend/editor/src/core/tools/formFill/FormFill.tsx@@ -17,7 +17,6 @@ import React, {useMemo,} from "react";import {- Button,Text,Alert,Switch,@@ -25,8 +24,9 @@ import {ScrollArea,Progress,Tooltip,- ActionIcon,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import { isAxiosError } from "axios";import {@@ -510,7 +510,7 @@ const FormFill = (_props: BaseToolProps) => {<div className={styles.primaryActions}><ButtonleftSection={<SaveIcon sx={{ fontSize: 14 }} />}- size="xs"+ size="sm"onClick={handleSave}loading={saving}disabled={!formState.isDirty && !flattenChanged}@@ -524,7 +524,7 @@ const FormFill = (_props: BaseToolProps) => {position="bottom"><ActionIcon- variant="light"+ variant="secondary"size="md"onClick={handleRefresh}aria-label={t(@@ -539,34 +539,31 @@ const FormFill = (_props: BaseToolProps) => {<div className={styles.secondaryActions}><Button- variant="light"- color="blue"+ variant="secondary"leftSection={<FileDownloadIcon sx={{ fontSize: 14 }} />}loading={extracting}onClick={handleExtractJson}- size="xs"+ size="sm">JSON</Button><Button- variant="light"- color="blue"+ variant="secondary"leftSection={<FileDownloadIcon sx={{ fontSize: 14 }} />}loading={extracting}onClick={handleExtractCsv}- size="xs"+ size="sm">CSV</Button><Button- variant="light"- color="blue"+ variant="secondary"leftSection={<FileDownloadIcon sx={{ fontSize: 14 }} />}loading={extracting}onClick={handleExtractXlsx}- size="xs"+ size="sm">XLSX</Button>diff --git a/frontend/editor/src/core/tools/formFill/FormSaveBar.tsx b/frontend/editor/src/core/tools/formFill/FormSaveBar.tsxindex d6186af566..da8cfc785a 100644--- a/frontend/editor/src/core/tools/formFill/FormSaveBar.tsx+++ b/frontend/editor/src/core/tools/formFill/FormSaveBar.tsx@@ -10,20 +10,14 @@* save UX that users expect from browser PDF viewers.*/import React, { useCallback, useState } from "react";-import {- Stack,- Group,- Text,- Button,- Transition,- CloseButton,- Paper,- Badge,-} from "@mantine/core";+import { Stack, Group, Text, Transition, Paper, Badge } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import DownloadIcon from "@mui/icons-material/Download";import SaveIcon from "@mui/icons-material/Save";import EditNoteIcon from "@mui/icons-material/EditNote";+import CloseIcon from "@mui/icons-material/Close";import { useFormFill } from "@app/tools/formFill/FormFillContext";import { downloadFileWithPolicy } from "@app/services/exportWithPolicy";@@ -160,37 +154,36 @@ export function FormSaveBar({</Text></div></Group>- <CloseButton+ <ActionIconsize="sm"- variant="subtle"+ variant="tertiary"onClick={() => setDismissed(true)}aria-label={t("viewer.formBar.dismiss", "Dismiss")}- />+ >+ <CloseIcon sx={{ fontSize: 16 }} />+ </ActionIcon></Group>{isDirty && (<Group gap="xs" mt="xs"><Buttonsize="sm"- variant="light"- color="blue"+ variant="secondary"leftSection={<SaveIcon sx={{ fontSize: 18 }} />}loading={applying}disabled={saving}onClick={handleApply}- flex={1}+ style={{ flex: 1 }}>{t("viewer.formBar.apply", "Apply Changes")}</Button><Buttonsize="sm"- variant="filled"- color="blue"leftSection={<DownloadIcon sx={{ fontSize: 18 }} />}loading={saving}disabled={applying}onClick={handleDownload}- flex={1}+ style={{ flex: 1 }}>{t("viewer.formBar.download", "Download PDF")}</Button>diff --git a/frontend/editor/src/core/ui/ActionIcon.css b/frontend/editor/src/core/ui/ActionIcon.cssnew file mode 100644index 0000000000..1a56a484e2--- /dev/null+++ b/frontend/editor/src/core/ui/ActionIcon.css@@ -0,0 +1,21 @@+/* Mantine ActionIcon-backed — colour driven by the shared accent palette (accents.css). */+@import "./accents.css";++/* ---- shape ---- */+.sui-ai--circle.mantine-ActionIcon-root {+ --ai-radius: 50%;+}+.sui-ai--pill.mantine-ActionIcon-root {+ --ai-radius: 9999px;+}++/* ---- gradient accents: brighten on hover instead of a hard bg swap ---- */+.sui-acc-ai.sui-ai--primary:not([data-disabled]):hover,+.sui-acc-premium.sui-ai--primary:not([data-disabled]):hover {+ filter: brightness(1.06);+}++/* no-hover: !important to beat Mantine's own :hover background rule. */+.sui-ai--no-hover:not([data-disabled]):hover {+ background: var(--ai-bg, transparent) !important;+}diff --git a/frontend/editor/src/core/ui/ActionIcon.stories.tsx b/frontend/editor/src/core/ui/ActionIcon.stories.tsxnew file mode 100644index 0000000000..a4df1359dc--- /dev/null+++ b/frontend/editor/src/core/ui/ActionIcon.stories.tsx@@ -0,0 +1,132 @@+import type { Meta, StoryObj } from "@storybook/react";+import { ActionIcon } from "@app/ui/ActionIcon";++const Plus = () => (+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" aria-hidden>+ <path+ d="M12 5v14M5 12h14"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ />+ </svg>+);+const Trash = () => (+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" aria-hidden>+ <path+ d="M5 7h14M10 7V5h4v2m-8 0 1 13h6l1-13"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+);++const ACCENTS = [+ "default",+ "neutral",+ "brand",+ "ai",+ "premium",+ "danger",+ "success",+ "warning",+] as const;++const meta: Meta<typeof ActionIcon> = {+ title: "Primitives/ActionIcon",+ component: ActionIcon,+ parameters: { layout: "centered" },+ args: {+ variant: "primary",+ accent: "default",+ size: "md",+ "aria-label": "Add",+ },+ argTypes: {+ variant: {+ control: "inline-radio",+ options: ["primary", "secondary", "tertiary", "quiet"],+ },+ accent: { control: "inline-radio", options: ACCENTS },+ size: { control: "inline-radio", options: ["sm", "md", "lg", "xl"] },+ shape: { control: "inline-radio", options: ["default", "circle", "pill"] },+ },+};+export default meta;+type Story = StoryObj<typeof ActionIcon>;++const Wrap = ({ children }: { children: React.ReactNode }) => (+ <div style={{ display: "flex", gap: 12, alignItems: "center" }}>+ {children}+ </div>+);++export const Playground: Story = {+ render: (args) => (+ <ActionIcon {...args}>+ <Plus />+ </ActionIcon>+ ),+};++/** The three variants × every accent. */+export const Accents: Story = {+ render: () => (+ <div+ style={{+ display: "grid",+ gridTemplateColumns: "repeat(8, auto)",+ gap: 10,+ }}+ >+ {(["primary", "secondary", "tertiary"] as const).flatMap((variant) =>+ ACCENTS.map((accent) => (+ <ActionIcon+ key={`${variant}-${accent}`}+ variant={variant}+ accent={accent}+ aria-label={accent}+ >+ <Plus />+ </ActionIcon>+ )),+ )}+ </div>+ ),+};++/** Square at every size; the icon scales with `1em`. */+export const Sizes: Story = {+ render: () => (+ <Wrap>+ {(["sm", "md", "lg", "xl"] as const).map((size) => (+ <ActionIcon key={size} size={size} aria-label={`Add ${size}`}>+ <Plus />+ </ActionIcon>+ ))}+ </Wrap>+ ),+};++export const Shapes: Story = {+ render: () => (+ <Wrap>+ <ActionIcon shape="default" aria-label="Add">+ <Plus />+ </ActionIcon>+ <ActionIcon shape="circle" variant="secondary" aria-label="Add">+ <Plus />+ </ActionIcon>+ <ActionIcon+ shape="circle"+ variant="tertiary"+ accent="danger"+ aria-label="Delete"+ >+ <Trash />+ </ActionIcon>+ </Wrap>+ ),+};diff --git a/frontend/editor/src/core/ui/ActionIcon.tsx b/frontend/editor/src/core/ui/ActionIcon.tsxnew file mode 100644index 0000000000..44584be569--- /dev/null+++ b/frontend/editor/src/core/ui/ActionIcon.tsx@@ -0,0 +1,140 @@+import { ActionIcon as MantineActionIcon } from "@mantine/core";+import { forwardRef } from "react";+import type {+ ComponentPropsWithoutRef,+ CSSProperties,+ ElementType,+ ReactNode,+} from "react";+import { CONTROL_HEIGHT } from "@app/ui/controlSizes";+import "@app/ui/ActionIcon.css";++/** Icon-only button (square) — same variant/accent dials as Button. */+export type ActionIconVariant = "primary" | "secondary" | "tertiary" | "quiet";+export type ActionIconAccent =+ | "default"+ | "neutral"+ | "brand"+ | "ai"+ | "premium"+ | "danger"+ | "success"+ | "warning";+export type ActionIconSize = "sm" | "md" | "lg" | "xl";+export type ActionIconShape = "default" | "circle" | "pill";++type ActionIconOwnProps = {+ variant?: ActionIconVariant;+ accent?: ActionIconAccent;+ size?: ActionIconSize;+ shape?: ActionIconShape;+ /** Required — an icon-only control must have an accessible name. */+ "aria-label": string;+ loading?: boolean;+ /** false = no hover background change. */+ hover?: boolean;+ /** Polymorphic root element (e.g. `"a"` or a router Link). */+ as?: ElementType;+ style?: CSSProperties;+ /** The icon. */+ children?: ReactNode;+};++export type ActionIconProps = ActionIconOwnProps &+ Omit<+ ComponentPropsWithoutRef<"button">,+ keyof ActionIconOwnProps | "color"+ > & {+ href?: string;+ target?: string;+ rel?: string;+ };++const MANTINE_VARIANT: Record<ActionIconVariant, string> = {+ primary: "filled",+ secondary: "outline",+ tertiary: "subtle",+ quiet: "subtle",+};++export const ActionIcon = forwardRef<HTMLButtonElement, ActionIconProps>(+ function ActionIcon(+ {+ variant = "primary",+ accent = "default",+ size = "md",+ shape = "default",+ loading = false,+ hover = true,+ as,+ disabled,+ className,+ style,+ children,+ ...rest+ },+ ref,+ ) {+ const classes = [+ "sui-ai",+ `sui-acc-${accent}`,+ `sui-ai--${variant}`,+ shape !== "default" ? `sui-ai--${shape}` : "",+ !hover ? "sui-ai--no-hover" : "",+ className ?? "",+ ]+ .filter(Boolean)+ .join(" ");++ // Accent palette → Mantine ActionIcon vars (inline to win). --ai-bd is a full `border` shorthand.+ const accentVars =+ variant === "primary"+ ? {+ "--ai-bg": "var(--_solid)",+ "--ai-hover": "var(--_solid-hover)",+ "--ai-color": "var(--_on)",+ "--ai-bd": "1px solid transparent",+ }+ : variant === "quiet"+ ? {+ "--ai-bg": "transparent",+ "--ai-hover": "transparent",+ "--ai-color": "var(--_text)",+ "--ai-hover-color": "var(--color-text-1)",+ "--ai-bd": "1px solid transparent",+ }+ : {+ "--ai-bg": "transparent",+ "--ai-hover": "var(--_tint)",+ "--ai-color": "var(--_text)",+ "--ai-bd":+ variant === "secondary"+ ? "1px solid var(--_bd)"+ : "1px solid transparent",+ };++ // Loosely-typed alias so the polymorphic `component={as}` doesn't fight Mantine's typing.+ const Comp = MantineActionIcon as ElementType;++ return (+ <Comp+ {...rest}+ ref={ref}+ component={as}+ variant={MANTINE_VARIANT[variant]}+ size={size}+ loading={loading}+ disabled={disabled}+ className={classes}+ style={{+ ...(accentVars as CSSProperties),+ // Match Button's height per size (inline so it beats Mantine's --ai-size).+ ...({ "--ai-size": CONTROL_HEIGHT[size] } as CSSProperties),+ ...style,+ }}+ >+ {children}+ </Comp>+ );+ },+);diff --git a/frontend/editor/src/proprietary/ui/Avatar.css b/frontend/editor/src/core/ui/Avatar.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Avatar.cssrename to frontend/editor/src/core/ui/Avatar.cssdiff --git a/frontend/editor/src/proprietary/ui/Avatar.stories.tsx b/frontend/editor/src/core/ui/Avatar.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Avatar.stories.tsxrename to frontend/editor/src/core/ui/Avatar.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/Avatar.tsx b/frontend/editor/src/core/ui/Avatar.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Avatar.tsxrename to frontend/editor/src/core/ui/Avatar.tsxdiff --git a/frontend/editor/src/proprietary/ui/Banner.css b/frontend/editor/src/core/ui/Banner.csssimilarity index 85%rename from frontend/editor/src/proprietary/ui/Banner.cssrename to frontend/editor/src/core/ui/Banner.cssindex 7d249295b4..937905a915 100644--- a/frontend/editor/src/proprietary/ui/Banner.css+++ b/frontend/editor/src/core/ui/Banner.css@@ -76,19 +76,10 @@align-items: center;}+/* Sizing/background/hover are owned by the ActionIcon; this just keeps it from+ * stretching and sizes the × glyph. */.sui-banner__close {flex: 0 0 auto;- width: 1.5rem;- height: 1.5rem;- display: inline-flex;- align-items: center;- justify-content: center;- border-radius: var(--radius-sm);- color: var(--color-text-4);- font-size: 1rem;+ font-size: 1.125rem;line-height: 1;}-.sui-banner__close:hover {- background: rgba(0, 0, 0, 0.06);- color: var(--color-text-1);-}diff --git a/frontend/editor/src/proprietary/ui/Banner.stories.tsx b/frontend/editor/src/core/ui/Banner.stories.tsxsimilarity index 96%rename from frontend/editor/src/proprietary/ui/Banner.stories.tsxrename to frontend/editor/src/core/ui/Banner.stories.tsxindex c6b8ddfd1e..891cf66b78 100644--- a/frontend/editor/src/proprietary/ui/Banner.stories.tsx+++ b/frontend/editor/src/core/ui/Banner.stories.tsx@@ -39,7 +39,7 @@ export const WithAction: Story = {title: "Approaching cap",description: "389k of 500k docs processed.",action: (- <Button size="sm" variant="outline" accent="amber">+ <Button size="sm" variant="secondary" accent="warning">Upgrade</Button>),diff --git a/frontend/editor/src/proprietary/ui/Banner.tsx b/frontend/editor/src/core/ui/Banner.tsxsimilarity index 71%rename from frontend/editor/src/proprietary/ui/Banner.tsxrename to frontend/editor/src/core/ui/Banner.tsxindex b7db925740..ca89f57aab 100644--- a/frontend/editor/src/proprietary/ui/Banner.tsx+++ b/frontend/editor/src/core/ui/Banner.tsx@@ -1,4 +1,5 @@import type { ReactNode } from "react";+import { ActionIcon } from "@app/ui/ActionIcon";import "@app/ui/Banner.css";export type BannerTone = "info" | "success" | "warning" | "danger" | "neutral";@@ -7,21 +8,15 @@ export interface BannerProps {tone?: BannerTone;title?: ReactNode;description?: ReactNode;- /** Right-aligned action — typically a button. */action?: ReactNode;- /** When set, shows an × button that calls this handler. */onDismiss?: () => void;- /** Optional leading icon (caller supplies — keeps the primitive icon-set-agnostic). */+ /** Caller-supplied icon keeps this component icon-set-agnostic. */icon?: ReactNode;className?: string;children?: ReactNode;}-/**- * Inline alert. Use `tone` to convey severity; pair with `action` for- * "Approaching cap → Upgrade" style flows. Use `Toast` (separate primitive)- * for transient/dismissible notifications layered over the UI.- */+/** Inline alert. Use Toast for transient overlay notifications instead. */export function Banner({tone = "info",title,@@ -51,14 +46,17 @@ export function Banner({</div>{action && <div className="sui-banner__action">{action}</div>}{onDismiss && (- <button- type="button"+ <ActionIcon+ variant="tertiary"+ accent="neutral"+ size="sm"+ shape="circle"className="sui-banner__close"onClick={onDismiss}aria-label="Dismiss">- ×- </button>+ <span aria-hidden>×</span>+ </ActionIcon>)}</div>);diff --git a/frontend/editor/src/core/ui/Button.css b/frontend/editor/src/core/ui/Button.cssnew file mode 100644index 0000000000..5592711979--- /dev/null+++ b/frontend/editor/src/core/ui/Button.css@@ -0,0 +1,41 @@+/* Mantine-backed Button — colour driven by the shared accent palette (accents.css). */+@import "./accents.css";++/* ---- icon-only: square, no horizontal padding ---- */+.sui-btn--icon.mantine-Button-root {+ --button-padding-x: 0;+ width: var(--button-height);+ min-width: var(--button-height);+}+/* Zero the section margin / hide the empty label so the lone icon centres. */+.sui-btn--icon .mantine-Button-section {+ margin-inline: 0;+}+.sui-btn--icon .mantine-Button-label {+ display: none;+}++/* ---- shape ---- */+.sui-btn--circle.mantine-Button-root {+ --button-radius: 50%;+}+.sui-btn--pill.mantine-Button-root {+ --button-radius: 9999px;+}++/* ---- gradient accents: brighten on hover instead of a hard bg swap ---- */+/* [data-disabled] too: :disabled never matches polymorphic (as="a") roots. */+.sui-acc-ai.sui-btn--primary:not(:disabled):not([data-disabled]):hover,+.sui-acc-premium.sui-btn--primary:not(:disabled):not([data-disabled]):hover {+ filter: brightness(1.06);+}++/* ---- overflow: default wraps the label; Mantine's label is nowrap ---- */+.sui-btn--wrap .mantine-Button-label {+ white-space: normal;+}++/* no-hover: !important to beat Mantine's own :hover background rule. */+.sui-btn--no-hover:not(:disabled):not([data-disabled]):hover {+ background: var(--button-bg, transparent) !important;+}diff --git a/frontend/editor/src/core/ui/Button.stories.tsx b/frontend/editor/src/core/ui/Button.stories.tsxnew file mode 100644index 0000000000..2def9e099f--- /dev/null+++ b/frontend/editor/src/core/ui/Button.stories.tsx@@ -0,0 +1,293 @@+import type { ReactNode } from "react";+import type { Meta, StoryObj } from "@storybook/react";+import { Button } from "@app/ui/Button";++/* tiny inline icons for the demos */+const Plus = () => (+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" aria-hidden>+ <path+ d="M12 5v14M5 12h14"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ />+ </svg>+);+const Arrow = () => (+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" aria-hidden>+ <path+ d="M5 12h14m0 0-5-5m5 5-5 5"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+);+const Trash = () => (+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" aria-hidden>+ <path+ d="M5 7h14M10 7V5h4v2m-8 0 1 13h6l1-13"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+);+const Sparkle = () => (+ <svg+ width="1em"+ height="1em"+ viewBox="0 0 24 24"+ fill="currentColor"+ aria-hidden+ >+ <path d="M12 2l1.9 5.1L19 9l-5.1 1.9L12 16l-1.9-5.1L5 9l5.1-1.9L12 2z" />+ <path d="M19 14l.9 2.4L22 17l-2.1.8L19 20l-.9-2.2L16 17l2.1-.6L19 14z" />+ </svg>+);++const meta: Meta<typeof Button> = {+ title: "Primitives/Button",+ component: Button,+ parameters: { layout: "centered" },+ args: { text: "Button", variant: "primary", accent: "default", size: "md" },+ argTypes: {+ variant: {+ control: "inline-radio",+ options: ["primary", "secondary", "tertiary", "quiet"],+ },+ accent: {+ control: "inline-radio",+ options: [+ "default",+ "neutral",+ "brand",+ "ai",+ "premium",+ "danger",+ "success",+ "warning",+ ],+ },+ size: { control: "inline-radio", options: ["sm", "md", "lg", "xl"] },+ justify: {+ control: "inline-radio",+ options: ["center", "start", "end", "between"],+ },+ shape: { control: "inline-radio", options: ["default", "circle", "pill"] },+ text: { control: "text" },+ },+};+export default meta;+type Story = StoryObj<typeof Button>;++const Wrap = ({ children }: { children: ReactNode }) => (+ <div+ style={{ display: "flex", flexWrap: "wrap", gap: 12, alignItems: "center" }}+ >+ {children}+ </div>+);++/** Tweak every prop live with the controls. */+export const Playground: Story = {};++/** The three fill treatments. */+export const Variants: Story = {+ render: (args) => (+ <Wrap>+ <Button {...args} variant="primary" text="Primary" />+ <Button {...args} variant="secondary" text="Secondary" />+ <Button {...args} variant="tertiary" text="Tertiary" />+ </Wrap>+ ),+};++/** Every accent × the three variants. Unset = `default` (blue). */+export const Accents: Story = {+ render: () => (+ <div+ style={{+ display: "grid",+ gridTemplateColumns: "repeat(8, auto)",+ gap: 10,+ justifyContent: "start",+ }}+ >+ {(["primary", "secondary", "tertiary"] as const).flatMap((variant) =>+ (+ [+ "default",+ "neutral",+ "brand",+ "ai",+ "premium",+ "danger",+ "success",+ "warning",+ ] as const+ ).map((accent) => (+ <Button+ key={`${variant}-${accent}`}+ variant={variant}+ accent={accent}+ text={accent}+ />+ )),+ )}+ </div>+ ),+};++/** Real size differences. */+export const Sizes: Story = {+ render: (args) => (+ <Wrap>+ {(["sm", "md", "lg", "xl"] as const).map((size) => (+ <Button key={size} {...args} size={size} text={size} />+ ))}+ </Wrap>+ ),+};++/** Icons are optional and positional: `leftSection`, `rightSection`, or both. */+export const WithIcons: Story = {+ render: (args) => (+ <Wrap>+ <Button {...args} leftSection={<Plus />} text="Left icon" />+ <Button {...args} rightSection={<Arrow />} text="Right icon" />+ <Button+ {...args}+ leftSection={<Plus />}+ rightSection={<Arrow />}+ text="Both"+ />+ </Wrap>+ ),+};++/** Pass an icon and NO text — that's all an "icon-only" button is. No separate component. */+export const IconOnly: Story = {+ render: () => (+ <Wrap>+ {(["sm", "md", "lg", "xl"] as const).map((size) => (+ <Button+ key={size}+ size={size}+ leftSection={<Plus />}+ aria-label="Add"+ />+ ))}+ <Button variant="secondary" leftSection={<Plus />} aria-label="Add" />+ <Button+ variant="tertiary"+ accent="danger"+ leftSection={<Trash />}+ aria-label="Delete"+ />+ </Wrap>+ ),+};++/** How content sits across the width (only visible when wider than the content,+ * e.g. `fullWidth`). `between` pins icons to the edges and keeps the label dead-+ * centre — the toolbar/nav row pattern. */+export const Justify: Story = {+ render: () => (+ <div+ style={{ display: "flex", flexDirection: "column", gap: 12, width: 280 }}+ >+ {(["center", "start", "end", "between"] as const).map((justify) => (+ <Button+ key={justify}+ fullWidth+ justify={justify}+ variant="secondary"+ leftSection={<Plus />}+ rightSection={<Arrow />}+ text={justify}+ />+ ))}+ </div>+ ),+};++/** `circle` makes a round control (pair it with an icon-only button); `pill` fully rounds a text button. */+export const Shape: Story = {+ render: () => (+ <Wrap>+ <Button+ shape="circle"+ variant="secondary"+ leftSection={<Plus />}+ aria-label="Add"+ />+ <Button+ shape="circle"+ variant="tertiary"+ leftSection={<Arrow />}+ aria-label="Next"+ />+ <Button+ shape="circle"+ variant="primary"+ leftSection={<Trash />}+ aria-label="Delete"+ />+ <Button shape="pill" variant="primary" text="Pill" />+ <Button shape="default" variant="secondary" text="Default" />+ </Wrap>+ ),+};++/** `accent="premium"` — a gradient CTA for upgrade moments. The gradient lives+ * on the `filled` variant (subtle brighten on hover, nothing flashy);+ * outlined/ghost fall back to a calm violet. */+export const Premium: Story = {+ render: () => (+ <div+ style={{ display: "flex", flexDirection: "column", gap: 16, width: 320 }}+ >+ <Button+ accent="premium"+ size="lg"+ fullWidth+ leftSection={<Sparkle />}+ text="Upgrade to Processor Plan"+ />+ <Wrap>+ <Button accent="premium" text="Upgrade" />+ <Button accent="premium" leftSection={<Sparkle />} text="Go Pro" />+ <Button+ accent="premium"+ shape="pill"+ rightSection={<Arrow />}+ text="Get Pro"+ />+ <Button+ accent="premium"+ leftSection={<Sparkle />}+ aria-label="Upgrade"+ />+ </Wrap>+ <Wrap>+ <Button accent="premium" variant="secondary" text="Outlined" />+ <Button accent="premium" variant="tertiary" text="Ghost" />+ <Button accent="premium" disabled text="Disabled" />+ </Wrap>+ <Wrap>+ {(["sm", "md", "lg", "xl"] as const).map((size) => (+ <Button+ key={size}+ accent="premium"+ size={size}+ leftSection={<Sparkle />}+ text={size}+ />+ ))}+ </Wrap>+ </div>+ ),+};diff --git a/frontend/editor/src/core/ui/Button.tsx b/frontend/editor/src/core/ui/Button.tsxnew file mode 100644index 0000000000..08dbeeddd8--- /dev/null+++ b/frontend/editor/src/core/ui/Button.tsx@@ -0,0 +1,205 @@+import { Button as MantineButton } from "@mantine/core";+import { forwardRef } from "react";+import type {+ ComponentPropsWithoutRef,+ CSSProperties,+ ElementType,+ ReactNode,+} from "react";+import { CONTROL_HEIGHT } from "@app/ui/controlSizes";+import "@app/ui/Button.css";++/** primary=solid, secondary=outlined, tertiary=ghost (tinted hover), quiet=plain (no bg, hovers to text colour). */+export type ButtonVariant = "primary" | "secondary" | "tertiary" | "quiet";+/** default(blue) | neutral | brand | ai | premium | danger | success | warning. */+export type ButtonAccent =+ | "default"+ | "neutral"+ | "brand"+ | "ai"+ | "premium"+ | "danger"+ | "success"+ | "warning";+export type ButtonSize = "sm" | "md" | "lg" | "xl";+/** `between` pins leftSection/label/rightSection to left/center/right (toolbar rows). */+export type ButtonJustify = "center" | "start" | "end" | "between";+export type ButtonShape = "default" | "circle" | "pill";++type ButtonOwnProps = {+ variant?: ButtonVariant;+ accent?: ButtonAccent;+ size?: ButtonSize;+ justify?: ButtonJustify;+ shape?: ButtonShape;+ /** Alternative to children; use one or the other. */+ text?: ReactNode;+ leftSection?: ReactNode;+ rightSection?: ReactNode;+ loading?: boolean;+ fullWidth?: boolean;+ /** false = no hover background change. */+ hover?: boolean;+ overflow?: "wrap" | "hidden";+ /** Polymorphic root element (e.g. `"a"` or a router Link). */+ as?: ElementType;+ style?: CSSProperties;+ children?: ReactNode;+};++export type ButtonProps = ButtonOwnProps &+ Omit<ComponentPropsWithoutRef<"button">, keyof ButtonOwnProps | "color"> & {+ href?: string;+ target?: string;+ rel?: string;+ htmlFor?: string;+ };++export interface ButtonGroupProps {+ children?: ReactNode;+ className?: string;+ style?: CSSProperties;+ orientation?: "horizontal" | "vertical";+ /** Border width between attached buttons (Mantine `--button-border-width`). */+ borderWidth?: number | string;+}++function ButtonGroup({+ children,+ className,+ style,+ orientation,+ borderWidth,+}: ButtonGroupProps) {+ return (+ <MantineButton.Group+ className={className}+ style={style}+ orientation={orientation}+ borderWidth={borderWidth}+ >+ {children}+ </MantineButton.Group>+ );+}++const MANTINE_VARIANT: Record<ButtonVariant, string> = {+ primary: "filled",+ secondary: "outline",+ tertiary: "subtle",+ quiet: "subtle",+};++const MANTINE_JUSTIFY: Record<ButtonJustify, string> = {+ center: "center",+ start: "flex-start",+ end: "flex-end",+ between: "space-between",+};++const ButtonRoot = forwardRef<HTMLButtonElement, ButtonProps>(+ function ButtonRoot(+ {+ variant = "primary",+ accent = "default",+ size = "md",+ justify = "center",+ shape = "default",+ text,+ leftSection,+ rightSection,+ loading = false,+ fullWidth = false,+ hover = true,+ overflow = "wrap",+ as,+ disabled,+ className,+ style,+ children,+ ...rest+ },+ ref,+ ) {+ const label = text ?? children;+ const hasLabel = label != null && label !== false && label !== "";+ const iconOnly = !hasLabel && (!!leftSection || !!rightSection || loading);++ // Sections flank a label → spread them without requiring justify="between".+ const effectiveJustify =+ justify === "center" && hasLabel && !!leftSection && !!rightSection+ ? "between"+ : justify;++ const classes = [+ "sui-btn",+ `sui-acc-${accent}`,+ `sui-btn--${variant}`,+ iconOnly ? "sui-btn--icon" : "",+ shape !== "default" ? `sui-btn--${shape}` : "",+ overflow === "wrap" ? "sui-btn--wrap" : "",+ !hover ? "sui-btn--no-hover" : "",+ className ?? "",+ ]+ .filter(Boolean)+ .join(" ");++ // Accent palette → Mantine button vars (inline to win). --button-bd is a full `border` shorthand.+ const accentVars =+ variant === "primary"+ ? {+ "--button-bg": "var(--_solid)",+ "--button-hover": "var(--_solid-hover)",+ "--button-color": "var(--_on)",+ "--button-bd": "1px solid transparent",+ }+ : variant === "quiet"+ ? {+ "--button-bg": "transparent",+ "--button-hover": "transparent",+ "--button-color": "var(--_text)",+ "--button-hover-color": "var(--color-text-1)",+ "--button-bd": "1px solid transparent",+ }+ : {+ "--button-bg": "transparent",+ "--button-hover": "var(--_tint)",+ "--button-color": "var(--_text)",+ "--button-bd":+ variant === "secondary"+ ? "1px solid var(--_bd)"+ : "1px solid transparent",+ };++ // Loosely-typed alias so the polymorphic `component={as}` doesn't fight Mantine's typing.+ const Comp = MantineButton as ElementType;++ return (+ <Comp+ {...rest}+ ref={ref}+ component={as}+ variant={MANTINE_VARIANT[variant]}+ size={size}+ justify={MANTINE_JUSTIFY[effectiveJustify]}+ leftSection={leftSection}+ rightSection={rightSection}+ loading={loading}+ fullWidth={fullWidth}+ disabled={disabled}+ className={classes}+ style={{+ ...(accentVars as CSSProperties),+ ...({ "--button-height": CONTROL_HEIGHT[size] } as CSSProperties),+ // Icon-only: zero the size padding inline so the lone icon centres.+ ...(iconOnly ? ({ "--button-padding-x": "0" } as CSSProperties) : {}),+ ...style,+ }}+ >+ {label}+ </Comp>+ );+ },+);++export const Button = Object.assign(ButtonRoot, { Group: ButtonGroup });diff --git a/frontend/editor/src/proprietary/ui/Card.css b/frontend/editor/src/core/ui/Card.csssimilarity index 74%rename from frontend/editor/src/proprietary/ui/Card.cssrename to frontend/editor/src/core/ui/Card.cssindex f38e2adac4..bfc49be935 100644--- a/frontend/editor/src/proprietary/ui/Card.css+++ b/frontend/editor/src/core/ui/Card.css@@ -32,11 +32,11 @@transform: translateY(-0.0625rem);}-.sui-card--accent-blue::before,-.sui-card--accent-purple::before,-.sui-card--accent-green::before,-.sui-card--accent-amber::before,-.sui-card--accent-red::before {+.sui-card--accent-default::before,+.sui-card--accent-premium::before,+.sui-card--accent-success::before,+.sui-card--accent-warning::before,+.sui-card--accent-danger::before {content: "";position: absolute;top: 0;@@ -45,18 +45,18 @@width: 0.25rem;border-radius: var(--radius-lg) 0 0 var(--radius-lg);}-.sui-card--accent-blue::before {+.sui-card--accent-default::before {background: var(--color-blue);}-.sui-card--accent-purple::before {+.sui-card--accent-premium::before {background: var(--color-purple);}-.sui-card--accent-green::before {+.sui-card--accent-success::before {background: var(--color-green);}-.sui-card--accent-amber::before {+.sui-card--accent-warning::before {background: var(--color-amber);}-.sui-card--accent-red::before {+.sui-card--accent-danger::before {background: var(--color-red);}diff --git a/frontend/editor/src/proprietary/ui/Card.stories.tsx b/frontend/editor/src/core/ui/Card.stories.tsxsimilarity index 82%rename from frontend/editor/src/proprietary/ui/Card.stories.tsxrename to frontend/editor/src/core/ui/Card.stories.tsxindex df445fd89a..8f480e2bf3 100644--- a/frontend/editor/src/proprietary/ui/Card.stories.tsx+++ b/frontend/editor/src/core/ui/Card.stories.tsx@@ -36,7 +36,14 @@ const meta: Meta<typeof Card> = {argTypes: {accent: {control: "inline-radio",- options: [undefined, "blue", "purple", "green", "amber", "red"],+ options: [+ undefined,+ "default",+ "premium",+ "success",+ "warning",+ "danger",+ ],},padding: {control: "inline-radio",@@ -79,13 +86,20 @@ export const AccentMatrix: Story = {gap: 12,}}>- {(["blue", "purple", "green", "amber", "red", undefined] as const).map(- (accent) => (- <Card key={accent ?? "none"} accent={accent}>- <CardBody color={accent ?? "neutral"} />- </Card>- ),- )}+ {(+ [+ "default",+ "premium",+ "success",+ "warning",+ "danger",+ undefined,+ ] as const+ ).map((accent) => (+ <Card key={accent ?? "none"} accent={accent}>+ <CardBody color={accent ?? "neutral"} />+ </Card>+ ))}</div>),};@@ -106,7 +120,7 @@ export const InContext_ProductGrid: Story = {gap: 14,}}>- <Card accent="purple" padding="loose" interactive>+ <Card accent="premium" padding="loose" interactive><h3 style={{ margin: 0, fontSize: 16 }}>Sources</h3><pstyle={{@@ -117,11 +131,11 @@ export const InContext_ProductGrid: Story = {>Attach pipelines where PDFs already live.</p>- <Button variant="outline" accent="purple" size="sm">+ <Button variant="secondary" accent="neutral" size="sm">Connect a source</Button></Card>- <Card accent="blue" padding="loose" interactive>+ <Card accent="default" padding="loose" interactive><divstyle={{display: "flex",@@ -144,11 +158,11 @@ export const InContext_ProductGrid: Story = {>Compose document workflows from typed operations.</p>- <Button variant="outline" accent="blue" size="sm">+ <Button variant="secondary" accent="neutral" size="sm">Build a pipeline</Button></Card>- <Card accent="purple" padding="loose" interactive>+ <Card accent="premium" padding="loose" interactive><h3 style={{ margin: 0, fontSize: 16 }}>Agents</h3><pstyle={{@@ -159,7 +173,7 @@ export const InContext_ProductGrid: Story = {>Wire your agent via MCP, REST, or tool definitions.</p>- <Button variant="outline" accent="purple" size="sm">+ <Button variant="secondary" accent="neutral" size="sm">Connect an agent</Button></Card>diff --git a/frontend/editor/src/proprietary/ui/Card.tsx b/frontend/editor/src/core/ui/Card.tsxsimilarity index 86%rename from frontend/editor/src/proprietary/ui/Card.tsxrename to frontend/editor/src/core/ui/Card.tsxindex 27eb7aed62..dbdb1a393a 100644--- a/frontend/editor/src/proprietary/ui/Card.tsx+++ b/frontend/editor/src/core/ui/Card.tsx@@ -1,9 +1,17 @@import type { HTMLAttributes, ReactNode } from "react";import "@app/ui/Card.css";+/** Subset of the shared accent dial that has a styled strip (see Card.css). */+export type CardAccent =+ | "default"+ | "premium"+ | "danger"+ | "success"+ | "warning";+export interface CardProps extends HTMLAttributes<HTMLDivElement> {/** Adds an accent strip on the left edge of the card. */- accent?: "blue" | "purple" | "green" | "amber" | "red";+ accent?: CardAccent;/*** Padding profile. `tight` = 0.75rem, `default` = 1.125rem, `loose` = 1.5rem.* `none` removes padding so the card surface can host edge-to-edge contentdiff --git a/frontend/editor/src/proprietary/ui/ChatFABButton.css b/frontend/editor/src/core/ui/ChatFABButton.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/ChatFABButton.cssrename to frontend/editor/src/core/ui/ChatFABButton.cssdiff --git a/frontend/editor/src/proprietary/ui/ChatFABButton.stories.tsx b/frontend/editor/src/core/ui/ChatFABButton.stories.tsxsimilarity index 90%rename from frontend/editor/src/proprietary/ui/ChatFABButton.stories.tsxrename to frontend/editor/src/core/ui/ChatFABButton.stories.tsxindex c6986dad14..5e85738b57 100644--- a/frontend/editor/src/proprietary/ui/ChatFABButton.stories.tsx+++ b/frontend/editor/src/core/ui/ChatFABButton.stories.tsx@@ -6,7 +6,7 @@ const meta: Meta<typeof ChatFABButton> = {component: ChatFABButton,parameters: { layout: "centered" },argTypes: {- isLoading: { control: "boolean" },+ loading: { control: "boolean" },showTick: { control: "boolean" },onClick: { action: "clicked" },},@@ -19,7 +19,7 @@ export const Default: Story = {};/** Agent is actively working — the logo paths animate and a green pulse dot appears. */export const Loading: Story = {- args: { isLoading: true },+ args: { loading: true },};/** Agent finished while the panel was closed — tick badge pops in to signal an unread result. */@@ -33,5 +33,5 @@ export const Tick: Story = {* In practice this transition is handled by the parent via `hasUnviewedResult`.*/export const TickWhileLoading: Story = {- args: { isLoading: true, showTick: true },+ args: { loading: true, showTick: true },};diff --git a/frontend/editor/src/proprietary/ui/ChatFABButton.tsx b/frontend/editor/src/core/ui/ChatFABButton.tsxsimilarity index 84%rename from frontend/editor/src/proprietary/ui/ChatFABButton.tsxrename to frontend/editor/src/core/ui/ChatFABButton.tsxindex 8ee8e74d7a..5ba3c8113b 100644--- a/frontend/editor/src/proprietary/ui/ChatFABButton.tsx+++ b/frontend/editor/src/core/ui/ChatFABButton.tsx@@ -2,21 +2,21 @@ import type { ButtonHTMLAttributes } from "react";import "@app/ui/ChatFABButton.css";export interface ChatFABButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {- /** Shows a green pulse dot to indicate the agent is actively working. */- isLoading?: boolean;- /** Shows a green tick badge to indicate an unread result is waiting. */+ /** Green pulse dot — agent is working. */+ loading?: boolean;+ /** Green tick badge — unread result waiting. */showTick?: boolean;}export function ChatFABButton({- isLoading = false,+ loading = false,showTick = false,className,...rest}: ChatFABButtonProps) {const classes = ["chat-fab-btn",- isLoading ? "chat-fab-btn--loading" : "",+ loading ? "chat-fab-btn--loading" : "",showTick ? "chat-fab-btn--tick" : "",className ?? "",]@@ -39,7 +39,7 @@ export function ChatFABButton({/><path d="M7.26 95.83 L123.37 0 L123.37 89.5 L7.26 185.33 Z" /></svg>- {isLoading && !showTick && (+ {loading && !showTick && (<span className="chat-fab-btn__pulse" aria-hidden="true" />)}{showTick && (diff --git a/frontend/editor/src/proprietary/ui/ChatFABWindow.css b/frontend/editor/src/core/ui/ChatFABWindow.csssimilarity index 93%rename from frontend/editor/src/proprietary/ui/ChatFABWindow.cssrename to frontend/editor/src/core/ui/ChatFABWindow.cssindex 1f59d2444f..b5dbb4f451 100644--- a/frontend/editor/src/proprietary/ui/ChatFABWindow.css+++ b/frontend/editor/src/core/ui/ChatFABWindow.css@@ -15,7 +15,7 @@/* Closed state: collapsed toward bottom-right origin */opacity: 0;- transform: scale(0.9) translateY(14px);+ transform: scale(0.9);pointer-events: none;transform-origin: bottom right;transition:@@ -25,7 +25,7 @@.chat-fab-window--open {opacity: 1;- transform: scale(1) translateY(0);+ transform: scale(1);pointer-events: auto;}diff --git a/frontend/editor/src/proprietary/ui/ChatFABWindow.stories.tsx b/frontend/editor/src/core/ui/ChatFABWindow.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ChatFABWindow.stories.tsxrename to frontend/editor/src/core/ui/ChatFABWindow.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/ChatFABWindow.tsx b/frontend/editor/src/core/ui/ChatFABWindow.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ChatFABWindow.tsxrename to frontend/editor/src/core/ui/ChatFABWindow.tsxdiff --git a/frontend/editor/src/proprietary/ui/Checkbox.css b/frontend/editor/src/core/ui/Checkbox.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Checkbox.cssrename to frontend/editor/src/core/ui/Checkbox.cssdiff --git a/frontend/editor/src/proprietary/ui/Checkbox.tsx b/frontend/editor/src/core/ui/Checkbox.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Checkbox.tsxrename to frontend/editor/src/core/ui/Checkbox.tsxdiff --git a/frontend/editor/src/core/ui/Chip.css b/frontend/editor/src/core/ui/Chip.cssnew file mode 100644index 0000000000..c341bb8e5c--- /dev/null+++ b/frontend/editor/src/core/ui/Chip.css@@ -0,0 +1,49 @@+/* Mantine Pill-backed chip/tag — colour from the shared accent palette (accents.css). */+@import "./accents.css";++.sui-chip.mantine-Pill-root {+ display: inline-flex;+ align-items: center;+ gap: 0.35em;+ border: 1px solid transparent;+ font-weight: 500;+ width: auto;+}+.sui-chip--primary.mantine-Pill-root {+ background: var(--_solid);+ color: var(--_on);+}+.sui-chip--secondary.mantine-Pill-root {+ background: var(--_tint);+ color: var(--_text);+ border-color: var(--_bd);+}+.sui-chip--interactive {+ cursor: pointer;+}+.sui-chip--loading {+ opacity: 0.6;+ pointer-events: none;+}++.sui-chip__dot {+ width: 0.5em;+ height: 0.5em;+ border-radius: 50%;+ background: currentColor;+}+.sui-chip__icon {+ display: inline-flex;+ align-items: center;+}+.sui-chip__label {+ display: inline-block;+}+.sui-chip__spinner {+ width: 0.75em;+ height: 0.75em;+ border-radius: 50%;+ border: 2px solid currentColor;+ border-right-color: transparent;+ animation: spin 0.7s linear infinite;+}diff --git a/frontend/editor/src/core/ui/Chip.stories.tsx b/frontend/editor/src/core/ui/Chip.stories.tsxnew file mode 100644index 0000000000..0d54da3891--- /dev/null+++ b/frontend/editor/src/core/ui/Chip.stories.tsx@@ -0,0 +1,91 @@+import type { Meta, StoryObj } from "@storybook/react-vite";+import { Chip } from "@app/ui/Chip";++const ACCENTS = [+ "default",+ "neutral",+ "brand",+ "ai",+ "premium",+ "danger",+ "success",+ "warning",+] as const;++const meta: Meta<typeof Chip> = {+ title: "Primitives/Chip",+ component: Chip,+ tags: ["autodocs"],+ parameters: { layout: "centered" },+ args: {+ children: "us-east-1",+ accent: "default",+ variant: "secondary",+ size: "md",+ showDot: false,+ },+ argTypes: {+ accent: { control: "inline-radio", options: ACCENTS },+ variant: { control: "inline-radio", options: ["primary", "secondary"] },+ size: { control: "inline-radio", options: ["xs", "sm", "md", "lg"] },+ showDot: { control: "boolean" },+ onClick: { action: "clicked" },+ onRemove: { action: "removed" },+ },+};+export default meta;+type Story = StoryObj<typeof Chip>;++/** Flip accent / variant / size / dot / interactive / removable in controls. */+export const Playground: Story = {};++export const Accents: Story = {+ render: () => (+ <div style={{ display: "flex", flexDirection: "column", gap: 8 }}>+ {(["secondary", "primary"] as const).map((variant) => (+ <div key={variant} style={{ display: "flex", gap: 8 }}>+ {ACCENTS.map((a) => (+ <Chip key={a} accent={a} variant={variant}>+ {a}+ </Chip>+ ))}+ </div>+ ))}+ </div>+ ),+};++export const InContext_OpChain: Story = {+ render: () => (+ <div+ style={{+ display: "flex",+ flexWrap: "wrap",+ gap: 6,+ maxWidth: "32rem",+ }}+ >+ <Chip accent="success" showDot>+ ocr+ </Chip>+ <Chip accent="success" showDot>+ classify+ </Chip>+ <Chip accent="success" showDot>+ extract+ </Chip>+ <Chip accent="default" showDot>+ validate+ </Chip>+ <Chip accent="danger" showDot>+ redact+ </Chip>+ <Chip accent="danger" showDot>+ encrypt-rest+ </Chip>+ <Chip accent="premium" showDot>+ store-primary+ </Chip>+ </div>+ ),+};diff --git a/frontend/editor/src/core/ui/Chip.tsx b/frontend/editor/src/core/ui/Chip.tsxnew file mode 100644index 0000000000..49478d84c6--- /dev/null+++ b/frontend/editor/src/core/ui/Chip.tsx@@ -0,0 +1,113 @@+import { Pill as MantinePill } from "@mantine/core";+import type {+ CSSProperties,+ HTMLAttributes,+ KeyboardEvent,+ ReactNode,+} from "react";+import "@app/ui/Chip.css";++/** Same accent dial as Button. */+export type ChipAccent =+ | "default"+ | "neutral"+ | "brand"+ | "ai"+ | "premium"+ | "danger"+ | "success"+ | "warning";+export type ChipSize = "xs" | "sm" | "md" | "lg";+/** primary = solid fill; secondary = soft tinted tag (the default tag look). */+export type ChipVariant = "primary" | "secondary";++export interface ChipProps extends Omit<+ HTMLAttributes<HTMLElement>,+ "onClick"+> {+ accent?: ChipAccent;+ variant?: ChipVariant;+ size?: ChipSize;+ leadingIcon?: ReactNode;+ trailingIcon?: ReactNode;+ /** Shows a spinner and dims the chip. */+ loading?: boolean;+ onRemove?: () => void;+ onClick?: () => void;+ /** Leading status dot. Use for status-style chips. */+ showDot?: boolean;+ style?: CSSProperties;+ children?: ReactNode;+ className?: string;+}++/** Open-ended chip/tag (Mantine Pill-backed). For semantic status use StatusBadge. */+export function Chip({+ accent = "default",+ variant = "secondary",+ size = "md",+ leadingIcon,+ trailingIcon,+ loading = false,+ onRemove,+ onClick,+ showDot,+ style,+ children,+ className,+ ...rest+}: ChipProps) {+ const classes = [+ "sui-chip",+ `sui-acc-${accent}`,+ `sui-chip--${variant}`,+ onClick ? "sui-chip--interactive" : "",+ loading ? "sui-chip--loading" : "",+ className ?? "",+ ]+ .filter(Boolean)+ .join(" ");++ // Interactive chips are a <span>, so add button semantics + Enter/Space activation.+ const interactive = !!onClick && !loading;+ const interactiveProps = interactive+ ? {+ role: "button",+ tabIndex: 0,+ onClick,+ onKeyDown: (e: KeyboardEvent<HTMLElement>) => {+ if (e.key === "Enter" || e.key === " ") {+ e.preventDefault();+ onClick();+ }+ },+ }+ : {};++ return (+ <MantinePill+ {...rest}+ className={classes}+ style={style}+ size={size}+ withRemoveButton={!!onRemove && !loading}+ onRemove={onRemove}+ {...interactiveProps}+ >+ {showDot && <span className="sui-chip__dot" aria-hidden />}+ {loading ? (+ <span className="sui-chip__spinner" aria-hidden />+ ) : leadingIcon ? (+ <span className="sui-chip__icon" aria-hidden>+ {leadingIcon}+ </span>+ ) : null}+ <span className="sui-chip__label">{children}</span>+ {trailingIcon && !onRemove && (+ <span className="sui-chip__icon" aria-hidden>+ {trailingIcon}+ </span>+ )}+ </MantinePill>+ );+}diff --git a/frontend/editor/src/proprietary/ui/ChipFlow.css b/frontend/editor/src/core/ui/ChipFlow.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/ChipFlow.cssrename to frontend/editor/src/core/ui/ChipFlow.cssdiff --git a/frontend/editor/src/proprietary/ui/ChipFlow.stories.tsx b/frontend/editor/src/core/ui/ChipFlow.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ChipFlow.stories.tsxrename to frontend/editor/src/core/ui/ChipFlow.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/ChipFlow.tsx b/frontend/editor/src/core/ui/ChipFlow.tsxsimilarity index 65%rename from frontend/editor/src/proprietary/ui/ChipFlow.tsxrename to frontend/editor/src/core/ui/ChipFlow.tsxindex 4af337e308..528796ece8 100644--- a/frontend/editor/src/proprietary/ui/ChipFlow.tsx+++ b/frontend/editor/src/core/ui/ChipFlow.tsx@@ -1,24 +1,18 @@import { Fragment } from "react";import type { ReactNode } from "react";import { Chip } from "@app/ui/Chip";-import type { ChipTone, ChipSize } from "@app/ui/Chip";+import type { ChipAccent, ChipSize } from "@app/ui/Chip";import "@app/ui/ChipFlow.css";export interface ChipFlowProps {- /** Items rendered as chips, in order. */items: ReactNode[];- /** `arrow` joins chips with a → connector (pipeline look); `none` just wraps. */+ /** `arrow` joins chips with a → connector. */separator?: "arrow" | "none";- tone?: ChipTone;+ tone?: ChipAccent;size?: ChipSize;className?: string;}-/**- * A sequence of {@link Chip}s, optionally joined by arrows to read as a- * pipeline (A → B → C). Use `separator="arrow"` for flows, `none` for a plain- * wrapped chip list.- */export function ChipFlow({items,separator = "none",@@ -37,7 +31,7 @@ export function ChipFlow({→</span>)}- <Chip tone={tone} size={size}>+ <Chip accent={tone} size={size}>{item}</Chip></Fragment>diff --git a/frontend/editor/src/proprietary/ui/CodeBlock.css b/frontend/editor/src/core/ui/CodeBlock.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/CodeBlock.cssrename to frontend/editor/src/core/ui/CodeBlock.cssdiff --git a/frontend/editor/src/proprietary/ui/CodeBlock.stories.tsx b/frontend/editor/src/core/ui/CodeBlock.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/CodeBlock.stories.tsxrename to frontend/editor/src/core/ui/CodeBlock.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/CodeBlock.tsx b/frontend/editor/src/core/ui/CodeBlock.tsxsimilarity index 66%rename from frontend/editor/src/proprietary/ui/CodeBlock.tsxrename to frontend/editor/src/core/ui/CodeBlock.tsxindex 4e0dc645e1..1a05b23e4f 100644--- a/frontend/editor/src/proprietary/ui/CodeBlock.tsx+++ b/frontend/editor/src/core/ui/CodeBlock.tsx@@ -1,4 +1,5 @@import { useState, type ReactNode } from "react";+import { Button } from "@app/ui/Button";import "@app/ui/CodeBlock.css";export type CodeLang =@@ -12,27 +13,18 @@ export type CodeLang =| "plain";export interface CodeBlockProps {- /** The code content. */code: string;- /** Language label shown in the chrome bar. Highlight wiring is out of scope here — bring Shiki/Prism. */+ /** Shown in the chrome bar. Syntax highlighting is not included — wire Shiki/Prism at the call site. */lang?: CodeLang;- /** Optional caption text shown in the chrome bar (e.g. a file path). */+ /** Caption in the chrome bar (e.g. a file path). */caption?: ReactNode;- /** Show a copy-to-clipboard button. Defaults to true. */+ /** Defaults to true. */copyable?: boolean;- /** Max height in pixels; longer content scrolls. */+ /** Longer content scrolls vertically. */maxHeight?: number;className?: string;}-/**- * Always-dark code block, matched to the prototype's CODE palette.- *- * Highlighting is intentionally not wired here — drop in Shiki at the call- * site and feed pre-highlighted HTML through `dangerouslySetInnerHTML` on a- * fork of this component if you need it. For most surfaces the raw- * monospaced text plus copy button is sufficient (and ~80% lighter).- */export function CodeBlock({code,lang = "plain",@@ -64,14 +56,16 @@ export function CodeBlock({{caption && <span className="sui-code__caption">{caption}</span>}<span className="sui-code__lang">{lang}</span>{copyable && (- <button- type="button"+ <Button+ variant="tertiary"+ size="sm"+ shape="pill"className="sui-code__copy"onClick={copy}aria-label="Copy code">{copied ? "Copied" : "Copy"}- </button>+ </Button>)}</div><pre className="sui-code__pre" style={{ maxHeight }}>diff --git a/frontend/editor/src/proprietary/ui/Collapsible.css b/frontend/editor/src/core/ui/Collapsible.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Collapsible.cssrename to frontend/editor/src/core/ui/Collapsible.cssdiff --git a/frontend/editor/src/proprietary/ui/Collapsible.stories.tsx b/frontend/editor/src/core/ui/Collapsible.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Collapsible.stories.tsxrename to frontend/editor/src/core/ui/Collapsible.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/Collapsible.tsx b/frontend/editor/src/core/ui/Collapsible.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Collapsible.tsxrename to frontend/editor/src/core/ui/Collapsible.tsxdiff --git a/frontend/editor/src/proprietary/ui/ColorInput.tsx b/frontend/editor/src/core/ui/ColorInput.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ColorInput.tsxrename to frontend/editor/src/core/ui/ColorInput.tsxdiff --git a/frontend/editor/src/proprietary/ui/DataRow.css b/frontend/editor/src/core/ui/DataRow.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/DataRow.cssrename to frontend/editor/src/core/ui/DataRow.cssdiff --git a/frontend/editor/src/proprietary/ui/DataRow.stories.tsx b/frontend/editor/src/core/ui/DataRow.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/DataRow.stories.tsxrename to frontend/editor/src/core/ui/DataRow.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/DataRow.tsx b/frontend/editor/src/core/ui/DataRow.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/DataRow.tsxrename to frontend/editor/src/core/ui/DataRow.tsxdiff --git a/frontend/editor/src/proprietary/ui/Drawer.css b/frontend/editor/src/core/ui/Drawer.csssimilarity index 83%rename from frontend/editor/src/proprietary/ui/Drawer.cssrename to frontend/editor/src/core/ui/Drawer.cssindex d2b90f26a7..8972bbefc2 100644--- a/frontend/editor/src/proprietary/ui/Drawer.css+++ b/frontend/editor/src/core/ui/Drawer.css@@ -75,22 +75,10 @@color: var(--color-text-4);}+/* Sizing/background/hover are owned by the Button; this just keeps it from+ * stretching. */.sui-drawer__close {flex: 0 0 auto;- width: 1.75rem;- height: 1.75rem;- display: inline-flex;- align-items: center;- justify-content: center;- border-radius: var(--radius-sm);- color: var(--color-text-4);- transition:- background var(--motion-fast),- color var(--motion-fast);-}-.sui-drawer__close:hover {- background: var(--color-bg-hover);- color: var(--color-text-1);}.sui-drawer__body {diff --git a/frontend/editor/src/proprietary/ui/Drawer.stories.tsx b/frontend/editor/src/core/ui/Drawer.stories.tsxsimilarity index 91%rename from frontend/editor/src/proprietary/ui/Drawer.stories.tsxrename to frontend/editor/src/core/ui/Drawer.stories.tsxindex 3600d774a2..c1df90536b 100644--- a/frontend/editor/src/proprietary/ui/Drawer.stories.tsx+++ b/frontend/editor/src/core/ui/Drawer.stories.tsx@@ -71,11 +71,11 @@ export const WithFooter: Story = {subtitle="COI Compliance · us-east-1"footer={<>- <Button variant="ghost" onClick={() => setOpen(false)}>+ <Button variant="tertiary" onClick={() => setOpen(false)}>Close</Button>- <Button variant="outline">Edit composition</Button>- <Button variant="gradient">View runs</Button>+ <Button variant="secondary">Edit composition</Button>+ <Button>View runs</Button></>}>diff --git a/frontend/editor/src/proprietary/ui/Drawer.tsx b/frontend/editor/src/core/ui/Drawer.tsxsimilarity index 75%rename from frontend/editor/src/proprietary/ui/Drawer.tsxrename to frontend/editor/src/core/ui/Drawer.tsxindex 20279c3c59..7327b854dc 100644--- a/frontend/editor/src/proprietary/ui/Drawer.tsx+++ b/frontend/editor/src/core/ui/Drawer.tsx@@ -1,6 +1,7 @@import { useEffect, useId, type ReactNode } from "react";import { createPortal } from "react-dom";import { FocusTrap } from "@mantine/core";+import { Button } from "@app/ui/Button";import "@app/ui/Drawer.css";export type DrawerSide = "right" | "left";@@ -10,11 +11,10 @@ export interface DrawerProps {open: boolean;onClose: () => void;side?: DrawerSide;- /** Width preset. sm=22rem, md=27.5rem, lg=36rem. */+ /** sm=22rem, md=27.5rem, lg=36rem. */width?: DrawerWidth;title?: ReactNode;subtitle?: ReactNode;- /** Sticky footer slot below the body. */footer?: ReactNode;disableBackdropClose?: boolean;disableEscapeClose?: boolean;@@ -23,12 +23,7 @@ export interface DrawerProps {children?: ReactNode;}-/**- * Side drawer — sibling to {@link Modal}, with our own brand shell. Tab focus- * trapping, initial focus, and focus restoration on close are delegated to- * Mantine's <FocusTrap>; we keep the slide-in chrome, scroll lock, and ESC /- * backdrop dismissal.- */+/** Tab focus trapping and restoration are delegated to Mantine's FocusTrap. */export function Drawer({open,onClose,@@ -104,27 +99,31 @@ export function Drawer({)}{subtitle && <div className="sui-drawer__sub">{subtitle}</div>}</div>- <button- type="button"+ <Button+ variant="tertiary"+ accent="neutral"+ size="sm"+ shape="circle"className="sui-drawer__close"onClick={onClose}aria-label="Close"- >- <svg- viewBox="0 0 24 24"- width="16"- height="16"- fill="none"- stroke="currentColor"- strokeWidth={1.75}- strokeLinecap="round"- strokeLinejoin="round"- aria-hidden- >- <line x1="18" y1="6" x2="6" y2="18" />- <line x1="6" y1="6" x2="18" y2="18" />- </svg>- </button>+ leftSection={+ <svg+ viewBox="0 0 24 24"+ width="16"+ height="16"+ fill="none"+ stroke="currentColor"+ strokeWidth={1.75}+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <line x1="18" y1="6" x2="6" y2="18" />+ <line x1="6" y1="6" x2="18" y2="18" />+ </svg>+ }+ /></header>)}<div className="sui-drawer__body">{children}</div>diff --git a/frontend/editor/src/proprietary/ui/Dropdown.css b/frontend/editor/src/core/ui/Dropdown.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Dropdown.cssrename to frontend/editor/src/core/ui/Dropdown.cssdiff --git a/frontend/editor/src/proprietary/ui/Dropdown.stories.tsx b/frontend/editor/src/core/ui/Dropdown.stories.tsxsimilarity index 90%rename from frontend/editor/src/proprietary/ui/Dropdown.stories.tsxrename to frontend/editor/src/core/ui/Dropdown.stories.tsxindex 7e05785ee6..ad84a09fb1 100644--- a/frontend/editor/src/proprietary/ui/Dropdown.stories.tsx+++ b/frontend/editor/src/core/ui/Dropdown.stories.tsx@@ -20,7 +20,7 @@ export const Basic: Story = {render: () => (<Dropdown.Root><Dropdown.Trigger>- <Button variant="outline">Open menu</Button>+ <Button variant="secondary">Open menu</Button></Dropdown.Trigger><Dropdown.Menu><Dropdown.Item onSelect={() => console.log("a")}>Item A</Dropdown.Item>@@ -37,7 +37,7 @@ export const WithDivider: Story = {render: () => (<Dropdown.Root><Dropdown.Trigger>- <Button variant="outline">Account</Button>+ <Button variant="secondary">Account</Button></Dropdown.Trigger><Dropdown.Menu width="13rem"><Dropdown.Item>Profile</Dropdown.Item>@@ -53,7 +53,7 @@ export const WithTrailingHints: Story = {render: () => (<Dropdown.Root><Dropdown.Trigger>- <Button variant="outline">Commands</Button>+ <Button variant="secondary">Commands</Button></Dropdown.Trigger><Dropdown.Menu width="16rem"><Dropdown.Item trailing="⌘ K">Search</Dropdown.Item>@@ -71,7 +71,7 @@ export const AlignStart: Story = {render: () => (<Dropdown.Root align="start"><Dropdown.Trigger>- <Button variant="outline">Aligned to start</Button>+ <Button variant="secondary">Aligned to start</Button></Dropdown.Trigger><Dropdown.Menu><Dropdown.Item>One</Dropdown.Item>diff --git a/frontend/editor/src/proprietary/ui/Dropdown.tsx b/frontend/editor/src/core/ui/Dropdown.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Dropdown.tsxrename to frontend/editor/src/core/ui/Dropdown.tsxdiff --git a/frontend/editor/src/proprietary/ui/EmptyState.css b/frontend/editor/src/core/ui/EmptyState.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/EmptyState.cssrename to frontend/editor/src/core/ui/EmptyState.cssdiff --git a/frontend/editor/src/proprietary/ui/EmptyState.stories.tsx b/frontend/editor/src/core/ui/EmptyState.stories.tsxsimilarity index 90%rename from frontend/editor/src/proprietary/ui/EmptyState.stories.tsxrename to frontend/editor/src/core/ui/EmptyState.stories.tsxindex ac153ec0b0..859b498c5f 100644--- a/frontend/editor/src/proprietary/ui/EmptyState.stories.tsx+++ b/frontend/editor/src/core/ui/EmptyState.stories.tsx@@ -31,10 +31,10 @@ export const WithCTAs: Story = {"The fastest way in is forking a pre-bundled pipeline like PII Sweep or Compliance Pack.",actions: (<>- <Button variant="gradient" trailingIcon={<span aria-hidden>→</span>}>+ <Button rightSection={<span aria-hidden>→</span>}>Browse templates</Button>- <Button variant="outline">Build from scratch</Button>+ <Button variant="secondary">Build from scratch</Button></>),},diff --git a/frontend/editor/src/proprietary/ui/EmptyState.tsx b/frontend/editor/src/core/ui/EmptyState.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/EmptyState.tsxrename to frontend/editor/src/core/ui/EmptyState.tsxdiff --git a/frontend/editor/src/core/ui/FilePicker.tsx b/frontend/editor/src/core/ui/FilePicker.tsxnew file mode 100644index 0000000000..3e33b20e46--- /dev/null+++ b/frontend/editor/src/core/ui/FilePicker.tsx@@ -0,0 +1,55 @@+import { FileButton as MantineFileButton } from "@mantine/core";+import type { ForwardedRef, ReactNode } from "react";+import { Button } from "@app/ui/Button";+import type { ButtonProps } from "@app/ui/Button";++type TriggerButtonProps = Omit<+ ButtonProps,+ "onClick" | "onChange" | "children"+>;++export interface FilePickerProps<+ Multiple extends boolean = false,+> extends TriggerButtonProps {+ /** Called with the picked file(s); null when the dialog is dismissed. */+ onChange: (payload: Multiple extends true ? File[] : File | null) => void;+ accept?: string;+ multiple?: Multiple;+ /** Ref to a function that clears the current selection (Mantine resetRef). */+ resetRef?: ForwardedRef<() => void>;+ name?: string;+ capture?: boolean | "user" | "environment";+ /** Trigger label. */+ children?: ReactNode;+}++/** File-picker button: a shared Button trigger over a hidden file input (Mantine FileButton). */+export function FilePicker<Multiple extends boolean = false>({+ onChange,+ accept,+ multiple,+ resetRef,+ name,+ capture,+ disabled,+ children,+ ...buttonProps+}: FilePickerProps<Multiple>) {+ return (+ <MantineFileButton<Multiple>+ onChange={onChange}+ accept={accept}+ multiple={multiple}+ resetRef={resetRef}+ name={name}+ capture={capture}+ disabled={disabled}+ >+ {(props) => (+ <Button {...buttonProps} {...props} disabled={disabled}>+ {children}+ </Button>+ )}+ </MantineFileButton>+ );+}diff --git a/frontend/editor/src/proprietary/ui/FormField.css b/frontend/editor/src/core/ui/FormField.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/FormField.cssrename to frontend/editor/src/core/ui/FormField.cssdiff --git a/frontend/editor/src/proprietary/ui/FormField.tsx b/frontend/editor/src/core/ui/FormField.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/FormField.tsxrename to frontend/editor/src/core/ui/FormField.tsxdiff --git a/frontend/editor/src/proprietary/ui/Forms.stories.tsx b/frontend/editor/src/core/ui/Forms.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Forms.stories.tsxrename to frontend/editor/src/core/ui/Forms.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/IconBadge.css b/frontend/editor/src/core/ui/IconBadge.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/IconBadge.cssrename to frontend/editor/src/core/ui/IconBadge.cssdiff --git a/frontend/editor/src/proprietary/ui/IconBadge.stories.tsx b/frontend/editor/src/core/ui/IconBadge.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/IconBadge.stories.tsxrename to frontend/editor/src/core/ui/IconBadge.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/IconBadge.tsx b/frontend/editor/src/core/ui/IconBadge.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/IconBadge.tsxrename to frontend/editor/src/core/ui/IconBadge.tsxdiff --git a/frontend/editor/src/proprietary/ui/Inline.css b/frontend/editor/src/core/ui/Inline.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Inline.cssrename to frontend/editor/src/core/ui/Inline.cssdiff --git a/frontend/editor/src/proprietary/ui/Inline.stories.tsx b/frontend/editor/src/core/ui/Inline.stories.tsxsimilarity index 88%rename from frontend/editor/src/proprietary/ui/Inline.stories.tsxrename to frontend/editor/src/core/ui/Inline.stories.tsxindex b6e4ed54eb..10233e1371 100644--- a/frontend/editor/src/proprietary/ui/Inline.stories.tsx+++ b/frontend/editor/src/core/ui/Inline.stories.tsx@@ -15,9 +15,9 @@ type Story = StoryObj<typeof Inline>;export const Default: Story = {render: () => (<Inline gap="2">- <Button variant="gradient">Primary</Button>- <Button variant="outline">Secondary</Button>- <Button variant="ghost">Cancel</Button>+ <Button>Primary</Button>+ <Button variant="secondary">Secondary</Button>+ <Button variant="tertiary">Cancel</Button></Inline>),};diff --git a/frontend/editor/src/proprietary/ui/Inline.tsx b/frontend/editor/src/core/ui/Inline.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Inline.tsxrename to frontend/editor/src/core/ui/Inline.tsxdiff --git a/frontend/editor/src/proprietary/ui/Input.css b/frontend/editor/src/core/ui/Input.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Input.cssrename to frontend/editor/src/core/ui/Input.cssdiff --git a/frontend/editor/src/proprietary/ui/Input.tsx b/frontend/editor/src/core/ui/Input.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Input.tsxrename to frontend/editor/src/core/ui/Input.tsxdiff --git a/frontend/editor/src/proprietary/ui/ListRow.css b/frontend/editor/src/core/ui/ListRow.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/ListRow.cssrename to frontend/editor/src/core/ui/ListRow.cssdiff --git a/frontend/editor/src/proprietary/ui/ListRow.stories.tsx b/frontend/editor/src/core/ui/ListRow.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ListRow.stories.tsxrename to frontend/editor/src/core/ui/ListRow.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/ListRow.tsx b/frontend/editor/src/core/ui/ListRow.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ListRow.tsxrename to frontend/editor/src/core/ui/ListRow.tsxdiff --git a/frontend/editor/src/proprietary/ui/MantineForms.css b/frontend/editor/src/core/ui/MantineForms.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/MantineForms.cssrename to frontend/editor/src/core/ui/MantineForms.cssdiff --git a/frontend/editor/src/proprietary/ui/MantineForms.stories.tsx b/frontend/editor/src/core/ui/MantineForms.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/MantineForms.stories.tsxrename to frontend/editor/src/core/ui/MantineForms.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/MethodBadge.css b/frontend/editor/src/core/ui/MethodBadge.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/MethodBadge.cssrename to frontend/editor/src/core/ui/MethodBadge.cssdiff --git a/frontend/editor/src/proprietary/ui/MethodBadge.stories.tsx b/frontend/editor/src/core/ui/MethodBadge.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/MethodBadge.stories.tsxrename to frontend/editor/src/core/ui/MethodBadge.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/MethodBadge.tsx b/frontend/editor/src/core/ui/MethodBadge.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/MethodBadge.tsxrename to frontend/editor/src/core/ui/MethodBadge.tsxdiff --git a/frontend/editor/src/proprietary/ui/MetricCard.css b/frontend/editor/src/core/ui/MetricCard.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/MetricCard.cssrename to frontend/editor/src/core/ui/MetricCard.cssdiff --git a/frontend/editor/src/proprietary/ui/MetricCard.stories.tsx b/frontend/editor/src/core/ui/MetricCard.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/MetricCard.stories.tsxrename to frontend/editor/src/core/ui/MetricCard.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/MetricCard.tsx b/frontend/editor/src/core/ui/MetricCard.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/MetricCard.tsxrename to frontend/editor/src/core/ui/MetricCard.tsxdiff --git a/frontend/editor/src/proprietary/ui/MetricStrip.css b/frontend/editor/src/core/ui/MetricStrip.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/MetricStrip.cssrename to frontend/editor/src/core/ui/MetricStrip.cssdiff --git a/frontend/editor/src/proprietary/ui/MetricStrip.stories.tsx b/frontend/editor/src/core/ui/MetricStrip.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/MetricStrip.stories.tsxrename to frontend/editor/src/core/ui/MetricStrip.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/MetricStrip.tsx b/frontend/editor/src/core/ui/MetricStrip.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/MetricStrip.tsxrename to frontend/editor/src/core/ui/MetricStrip.tsxdiff --git a/frontend/editor/src/proprietary/ui/Modal.css b/frontend/editor/src/core/ui/Modal.csssimilarity index 83%rename from frontend/editor/src/proprietary/ui/Modal.cssrename to frontend/editor/src/core/ui/Modal.cssindex d63985d97d..7d9ef68746 100644--- a/frontend/editor/src/proprietary/ui/Modal.css+++ b/frontend/editor/src/core/ui/Modal.css@@ -67,23 +67,10 @@color: var(--color-text-4);}+/* Sizing/background/hover are owned by the Button; this just keeps it from+ * stretching. */.sui-modal__close {flex: 0 0 auto;- width: 1.75rem;- height: 1.75rem;- display: inline-flex;- align-items: center;- justify-content: center;- border-radius: var(--radius-sm);- color: var(--color-text-4);- transition:- background var(--motion-fast),- color var(--motion-fast);-}--.sui-modal__close:hover {- background: var(--color-bg-hover);- color: var(--color-text-1);}.sui-modal__body {diff --git a/frontend/editor/src/proprietary/ui/Modal.tsx b/frontend/editor/src/core/ui/Modal.tsxsimilarity index 66%rename from frontend/editor/src/proprietary/ui/Modal.tsxrename to frontend/editor/src/core/ui/Modal.tsxindex c0de1d475c..09b019e0ef 100644--- a/frontend/editor/src/proprietary/ui/Modal.tsx+++ b/frontend/editor/src/core/ui/Modal.tsx@@ -1,6 +1,7 @@import { useEffect, useId, type ReactNode } from "react";import { createPortal } from "react-dom";import { FocusTrap } from "@mantine/core";+import { Button } from "@app/ui/Button";import "@app/ui/Modal.css";export type ModalWidth = "sm" | "md" | "lg" | "xl";@@ -8,31 +9,20 @@ export type ModalWidth = "sm" | "md" | "lg" | "xl";export interface ModalProps {open: boolean;onClose: () => void;- /** Optional heading slot rendered above the body. */title?: ReactNode;- /** Optional sub-heading rendered under the title. */subtitle?: ReactNode;- /** Optional footer slot rendered below the body. */footer?: ReactNode;- /** Width preset. sm=24rem, md=32rem, lg=48rem, xl=64rem. Defaults to md. */+ /** sm=24rem, md=32rem, lg=48rem, xl=64rem. */width?: ModalWidth;- /** Disable click-on-backdrop dismissal. Defaults to false. */disableBackdropClose?: boolean;- /** Disable Escape-key dismissal. Defaults to false. */disableEscapeClose?: boolean;- /** Accessible name when no visible `title` is provided. */+ /** Accessible name when no visible title is provided. */ariaLabel?: string;className?: string;children?: ReactNode;}-/**- * Portal-rendered modal with our own brand shell (header / body / footer,- * width presets, backdrop). The hard part — trapping Tab focus inside the- * dialog, initial focus, and restoring focus to the opener on close — is- * delegated to Mantine's <FocusTrap> rather than hand-rolled. ESC and- * backdrop click close by default; the caller owns the open state.- */+/** Tab focus trapping and restoration are delegated to Mantine's FocusTrap. */export function Modal({open,onClose,@@ -102,27 +92,31 @@ export function Modal({)}{subtitle && <div className="sui-modal__sub">{subtitle}</div>}</div>- <button- type="button"+ <Button+ variant="tertiary"+ accent="neutral"+ size="sm"+ shape="circle"className="sui-modal__close"onClick={onClose}aria-label="Close"- >- <svg- viewBox="0 0 24 24"- width="16"- height="16"- fill="none"- stroke="currentColor"- strokeWidth={1.75}- strokeLinecap="round"- strokeLinejoin="round"- aria-hidden- >- <line x1="18" y1="6" x2="6" y2="18" />- <line x1="6" y1="6" x2="18" y2="18" />- </svg>- </button>+ leftSection={+ <svg+ viewBox="0 0 24 24"+ width="16"+ height="16"+ fill="none"+ stroke="currentColor"+ strokeWidth={1.75}+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <line x1="18" y1="6" x2="6" y2="18" />+ <line x1="6" y1="6" x2="18" y2="18" />+ </svg>+ }+ /></header>)}<div className="sui-modal__body">{children}</div>diff --git a/frontend/editor/src/proprietary/ui/MultiSelect.tsx b/frontend/editor/src/core/ui/MultiSelect.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/MultiSelect.tsxrename to frontend/editor/src/core/ui/MultiSelect.tsxdiff --git a/frontend/editor/src/proprietary/ui/NavItem.css b/frontend/editor/src/core/ui/NavItem.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/NavItem.cssrename to frontend/editor/src/core/ui/NavItem.cssdiff --git a/frontend/editor/src/proprietary/ui/NavItem.stories.tsx b/frontend/editor/src/core/ui/NavItem.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/NavItem.stories.tsxrename to frontend/editor/src/core/ui/NavItem.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/NavItem.tsx b/frontend/editor/src/core/ui/NavItem.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/NavItem.tsxrename to frontend/editor/src/core/ui/NavItem.tsxdiff --git a/frontend/editor/src/proprietary/ui/NumberInput.tsx b/frontend/editor/src/core/ui/NumberInput.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/NumberInput.tsxrename to frontend/editor/src/core/ui/NumberInput.tsxdiff --git a/frontend/editor/src/proprietary/ui/PanelHeader.css b/frontend/editor/src/core/ui/PanelHeader.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/PanelHeader.cssrename to frontend/editor/src/core/ui/PanelHeader.cssdiff --git a/frontend/editor/src/proprietary/ui/PanelHeader.stories.tsx b/frontend/editor/src/core/ui/PanelHeader.stories.tsxsimilarity index 75%rename from frontend/editor/src/proprietary/ui/PanelHeader.stories.tsxrename to frontend/editor/src/core/ui/PanelHeader.stories.tsxindex 36f193e1d8..715adbab65 100644--- a/frontend/editor/src/proprietary/ui/PanelHeader.stories.tsx+++ b/frontend/editor/src/core/ui/PanelHeader.stories.tsx@@ -1,8 +1,8 @@import type { Meta, StoryObj } from "@storybook/react-vite";import ShieldOutlinedIcon from "@mui/icons-material/ShieldOutlined";-import DeleteSweepIcon from "@mui/icons-material/DeleteSweep";import { PanelHeader } from "@app/ui/PanelHeader";import { StatusBadge } from "@app/ui/StatusBadge";+import { Button } from "@app/ui/Button";const meta: Meta<typeof PanelHeader> = {title: "Primitives/PanelHeader",@@ -31,16 +31,11 @@ export const Accented: Story = {* the menu (e.g. the chat header's "Clear chat"). */export const WithMenu: Story = {args: {- title: "Stirling",- menuLabel: "Stirling agent options",menuItems: [- {- key: "clear",- icon: <DeleteSweepIcon sx={{ fontSize: 18 }} />,- label: "Clear chat",- onClick: () => {},- },+ { label: "Clear chat", onClick: () => {} },+ { label: "Export history", onClick: () => {} },],+ menuLabel: "Chat options",},};@@ -54,9 +49,17 @@ export const WithActions: Story = {args: {accent: "purple",actions: (- <StatusBadge tone="success" showDot pulse>- Active- </StatusBadge>+ <>+ <StatusBadge tone="success" pulse>+ Healthy+ </StatusBadge>+ <Button size="sm" variant="secondary">+ Edit composition+ </Button>+ <Button size="sm" variant="primary">+ View runs+ </Button>+ </>),},};diff --git a/frontend/editor/src/proprietary/ui/PanelHeader.tsx b/frontend/editor/src/core/ui/PanelHeader.tsxsimilarity index 94%rename from frontend/editor/src/proprietary/ui/PanelHeader.tsxrename to frontend/editor/src/core/ui/PanelHeader.tsxindex 26ba1b738c..3d9a0383ba 100644--- a/frontend/editor/src/proprietary/ui/PanelHeader.tsx+++ b/frontend/editor/src/core/ui/PanelHeader.tsx@@ -69,9 +69,6 @@ export function PanelHeader({}: PanelHeaderProps) {const hasMenu = menuItems != null && menuItems.length > 0;- // Tint the icon badge with the category colour when an accent is given. Inline- // so it wins over the default blue treatment in both light and dark mode; the- // --color-* tokens are theme-aware and match the badge tint used elsewhere.const iconStyle: CSSProperties | undefined = accent? {color: `var(--color-${accent})`,diff --git a/frontend/editor/src/proprietary/ui/ProgressBar.css b/frontend/editor/src/core/ui/ProgressBar.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/ProgressBar.cssrename to frontend/editor/src/core/ui/ProgressBar.cssdiff --git a/frontend/editor/src/proprietary/ui/ProgressBar.stories.tsx b/frontend/editor/src/core/ui/ProgressBar.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ProgressBar.stories.tsxrename to frontend/editor/src/core/ui/ProgressBar.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/ProgressBar.tsx b/frontend/editor/src/core/ui/ProgressBar.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ProgressBar.tsxrename to frontend/editor/src/core/ui/ProgressBar.tsxdiff --git a/frontend/editor/src/proprietary/ui/Radio.css b/frontend/editor/src/core/ui/Radio.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Radio.cssrename to frontend/editor/src/core/ui/Radio.cssdiff --git a/frontend/editor/src/proprietary/ui/Radio.tsx b/frontend/editor/src/core/ui/Radio.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Radio.tsxrename to frontend/editor/src/core/ui/Radio.tsxdiff --git a/frontend/editor/src/proprietary/ui/SectionDivider.css b/frontend/editor/src/core/ui/SectionDivider.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/SectionDivider.cssrename to frontend/editor/src/core/ui/SectionDivider.cssdiff --git a/frontend/editor/src/proprietary/ui/SectionDivider.stories.tsx b/frontend/editor/src/core/ui/SectionDivider.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/SectionDivider.stories.tsxrename to frontend/editor/src/core/ui/SectionDivider.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/SectionDivider.tsx b/frontend/editor/src/core/ui/SectionDivider.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/SectionDivider.tsxrename to frontend/editor/src/core/ui/SectionDivider.tsxdiff --git a/frontend/editor/src/proprietary/ui/SectionHeader.css b/frontend/editor/src/core/ui/SectionHeader.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/SectionHeader.cssrename to frontend/editor/src/core/ui/SectionHeader.cssdiff --git a/frontend/editor/src/proprietary/ui/SectionHeader.stories.tsx b/frontend/editor/src/core/ui/SectionHeader.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/SectionHeader.stories.tsxrename to frontend/editor/src/core/ui/SectionHeader.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/SectionHeader.tsx b/frontend/editor/src/core/ui/SectionHeader.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/SectionHeader.tsxrename to frontend/editor/src/core/ui/SectionHeader.tsxdiff --git a/frontend/editor/src/core/ui/SegmentedControl.css b/frontend/editor/src/core/ui/SegmentedControl.cssnew file mode 100644index 0000000000..62e05c1941--- /dev/null+++ b/frontend/editor/src/core/ui/SegmentedControl.css@@ -0,0 +1,38 @@+/* Mantine-backed SegmentedControl — colour from the shared accent palette (accents.css). */+@import "./accents.css";++/* Compact the track and let labels fill the fixed height (matches Button/ActionIcon). */+.sui-seg.mantine-SegmentedControl-root {+ --sc-padding: 0.1875rem; /* 3px track inset */+ align-items: stretch;+}+.sui-seg .mantine-SegmentedControl-control {+ display: flex;+}+.sui-seg .mantine-SegmentedControl-label {+ display: flex;+ align-items: center;+ justify-content: center;+ height: 100%;+ padding-block: 0;+}+/* Mantine wraps label content in .innerLabel; flex it so an icon + text sit+ * centered together with a consistent gap. Without this the inline-block icon+ * aligns to the text baseline and rides ~3px high. */+.sui-seg .mantine-SegmentedControl-innerLabel {+ display: flex;+ align-items: center;+ justify-content: center;+ gap: 0.375rem;+}++/* secondary: strip the boxed track AND the inter-segment separators so only the+ * tinted active pill reads — no track chrome at all. */+.sui-seg--secondary.mantine-SegmentedControl-root {+ background: transparent !important;+ border-color: transparent !important;+ box-shadow: none !important;+}+.sui-seg--secondary .mantine-SegmentedControl-control::before {+ background-color: transparent !important;+}diff --git a/frontend/editor/src/core/ui/SegmentedControl.stories.tsx b/frontend/editor/src/core/ui/SegmentedControl.stories.tsxnew file mode 100644index 0000000000..0f16141a5a--- /dev/null+++ b/frontend/editor/src/core/ui/SegmentedControl.stories.tsx@@ -0,0 +1,135 @@+import { useState } from "react";+import type { Meta, StoryObj } from "@storybook/react";+import InsertDriveFileOutlinedIcon from "@mui/icons-material/InsertDriveFileOutlined";+import FolderOutlinedIcon from "@mui/icons-material/FolderOutlined";+import { SegmentedControl } from "@app/ui/SegmentedControl";++const meta: Meta<typeof SegmentedControl> = {+ title: "Primitives/SegmentedControl",+ component: SegmentedControl,+ parameters: { layout: "centered" },+};+export default meta;+type Story = StoryObj<typeof SegmentedControl>;++export const Default: Story = {+ render: () => {+ const [v, setV] = useState("medium");+ return (+ <SegmentedControl+ value={v}+ onChange={setV}+ options={[+ { label: "Low", value: "low" },+ { label: "Medium", value: "medium" },+ { label: "High", value: "high" },+ ]}+ />+ );+ },+};++export const FullWidth: Story = {+ render: () => {+ const [v, setV] = useState("pdf");+ return (+ <div style={{ width: 320 }}>+ <SegmentedControl+ fullWidth+ value={v}+ onChange={setV}+ options={[+ { label: "PDF", value: "pdf" },+ { label: "Image", value: "image" },+ { label: "Word", value: "word" },+ ]}+ />+ </div>+ );+ },+};++/** `primary` (default) shows an accent-filled active pill; `secondary` drops the+ * track chrome and tints the active pill + label in the accent colour. The+ * highlight slides between segments. */+export const Variants: Story = {+ render: () => {+ const [a, setA] = useState("viewer");+ const [b, setB] = useState("viewer");+ const options = [+ { label: "Viewer", value: "viewer" },+ { label: "Page Editor", value: "pages" },+ { label: "Active Files", value: "files" },+ ];+ return (+ <div style={{ display: "flex", flexDirection: "column", gap: 24 }}>+ <SegmentedControl+ variant="primary"+ value={a}+ onChange={setA}+ options={options}+ />+ <SegmentedControl+ variant="secondary"+ accent="default"+ value={b}+ onChange={setB}+ options={options}+ />+ </div>+ );+ },+};++export const Small: Story = {+ render: () => {+ const [v, setV] = useState("pages");+ return (+ <SegmentedControl+ size="sm"+ value={v}+ onChange={setV}+ options={[+ { label: "Pages", value: "pages" },+ { label: "Files", value: "files" },+ ]}+ />+ );+ },+};++/** Icon + label per segment (mirrors the workbench view switcher). Icons and+ * labels should sit centered together in each segment. */+export const WithIcons: Story = {+ render: () => {+ const [v, setV] = useState("viewer");+ return (+ <SegmentedControl+ size="sm"+ variant="secondary"+ value={v}+ onChange={setV}+ options={[+ {+ value: "viewer",+ label: (+ <>+ <InsertDriveFileOutlinedIcon fontSize="small" />+ <span>Viewer</span>+ </>+ ),+ },+ {+ value: "files",+ label: (+ <>+ <FolderOutlinedIcon fontSize="small" />+ <span>Active Files</span>+ </>+ ),+ },+ ]}+ />+ );+ },+};diff --git a/frontend/editor/src/core/ui/SegmentedControl.tsx b/frontend/editor/src/core/ui/SegmentedControl.tsxnew file mode 100644index 0000000000..a82874cc45--- /dev/null+++ b/frontend/editor/src/core/ui/SegmentedControl.tsx@@ -0,0 +1,103 @@+import { SegmentedControl as MantineSegmentedControl } from "@mantine/core";+import type { CSSProperties, ReactNode } from "react";+import { CONTROL_HEIGHT } from "@app/ui/controlSizes";+import "@app/ui/SegmentedControl.css";++/** Same accent dial as Button. Only the active segment is accented. */+export type SegmentedAccent =+ | "default"+ | "neutral"+ | "brand"+ | "ai"+ | "premium"+ | "danger"+ | "success"+ | "warning";+export type SegmentedSize = "xs" | "sm" | "md" | "lg";+/** primary = accent-filled active pill; secondary = subtle tinted pill, no track chrome. */+export type SegmentedVariant = "primary" | "secondary";++// Overall height, in sync with Button/ActionIcon via CONTROL_HEIGHT (xs is segmented-only).+const SEG_HEIGHT: Record<SegmentedSize, string> = {+ xs: "26px",+ sm: CONTROL_HEIGHT.sm,+ md: CONTROL_HEIGHT.md,+ lg: CONTROL_HEIGHT.lg,+};++export interface SegmentedOption<T extends string> {+ label: ReactNode;+ value: T;+ disabled?: boolean;+}++export interface SegmentedControlProps<T extends string> {+ options: SegmentedOption<T>[];+ value: T;+ onChange: (value: T) => void;+ accent?: SegmentedAccent;+ size?: SegmentedSize;+ variant?: SegmentedVariant;+ fullWidth?: boolean;+ disabled?: boolean;+ /** Alias of `disabled`; also disables the control. */+ loading?: boolean;+ /** Accessible name for the radiogroup. */+ ariaLabel?: string;+ className?: string;+ style?: CSSProperties;+}++/** Single-select control with a sliding highlight (Mantine-backed). */+export function SegmentedControl<T extends string>({+ options,+ value,+ onChange,+ accent = "default",+ size = "md",+ variant = "primary",+ fullWidth = false,+ disabled = false,+ loading = false,+ ariaLabel,+ className,+ style,+}: SegmentedControlProps<T>) {+ const classes = [+ "sui-seg",+ `sui-acc-${accent}`,+ `sui-seg--${variant}`,+ className ?? "",+ ]+ .filter(Boolean)+ .join(" ");++ // Drive Mantine's indicator/label colour vars from the accent palette.+ const accentVars =+ variant === "primary"+ ? { "--sc-color": "var(--_solid)", "--sc-label-color": "var(--_on)" }+ : { "--sc-color": "var(--_tint)", "--sc-label-color": "var(--_text)" };++ return (+ <MantineSegmentedControl+ className={classes}+ style={{+ ...(accentVars as CSSProperties),+ // Fixed height (matches Button/ActionIcon per size); CSS fills the labels.+ height: SEG_HEIGHT[size],+ ...style,+ }}+ data={options.map((o) => ({+ label: o.label,+ value: o.value,+ disabled: o.disabled,+ }))}+ value={value}+ onChange={(v) => onChange(v as T)}+ size={size}+ fullWidth={fullWidth}+ disabled={disabled || loading}+ aria-label={ariaLabel}+ />+ );+}diff --git a/frontend/editor/src/proprietary/ui/Select.css b/frontend/editor/src/core/ui/Select.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Select.cssrename to frontend/editor/src/core/ui/Select.cssdiff --git a/frontend/editor/src/proprietary/ui/Select.tsx b/frontend/editor/src/core/ui/Select.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Select.tsxrename to frontend/editor/src/core/ui/Select.tsxdiff --git a/frontend/editor/src/proprietary/ui/SettingsRow.css b/frontend/editor/src/core/ui/SettingsRow.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/SettingsRow.cssrename to frontend/editor/src/core/ui/SettingsRow.cssdiff --git a/frontend/editor/src/proprietary/ui/SettingsRow.stories.tsx b/frontend/editor/src/core/ui/SettingsRow.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/SettingsRow.stories.tsxrename to frontend/editor/src/core/ui/SettingsRow.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/SettingsRow.tsx b/frontend/editor/src/core/ui/SettingsRow.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/SettingsRow.tsxrename to frontend/editor/src/core/ui/SettingsRow.tsxdiff --git a/frontend/editor/src/proprietary/ui/SettingsShell.css b/frontend/editor/src/core/ui/SettingsShell.csssimilarity index 88%rename from frontend/editor/src/proprietary/ui/SettingsShell.cssrename to frontend/editor/src/core/ui/SettingsShell.cssindex 5e56a7934e..5d0e591c8b 100644--- a/frontend/editor/src/proprietary/ui/SettingsShell.css+++ b/frontend/editor/src/core/ui/SettingsShell.css@@ -109,24 +109,10 @@align-items: center;gap: 0.5rem;}+/* Sizing/background/hover are owned by the Button; this just keeps it from+ * stretching. */.sui-settings-shell__close {- display: inline-flex;- align-items: center;- justify-content: center;- width: 1.75rem;- height: 1.75rem;- border: none;- border-radius: var(--radius-sm);- background: none;- color: var(--color-text-3);- cursor: pointer;- transition:- background var(--motion-fast),- color var(--motion-fast);-}-.sui-settings-shell__close:hover {- background: var(--color-bg-hover);- color: var(--color-text-1);+ flex: 0 0 auto;}.sui-settings-shell__body {diff --git a/frontend/editor/src/proprietary/ui/SettingsShell.stories.tsx b/frontend/editor/src/core/ui/SettingsShell.stories.tsxsimilarity index 94%rename from frontend/editor/src/proprietary/ui/SettingsShell.stories.tsxrename to frontend/editor/src/core/ui/SettingsShell.stories.tsxindex 4d14cd98c9..cd266c95a1 100644--- a/frontend/editor/src/proprietary/ui/SettingsShell.stories.tsx+++ b/frontend/editor/src/core/ui/SettingsShell.stories.tsx@@ -58,8 +58,8 @@ export const Default: Story = {onClose={() => {}}footer={<>- <Button variant="ghost">Cancel</Button>- <Button variant="gradient">Save changes</Button>+ <Button variant="tertiary">Cancel</Button>+ <Button>Save changes</Button></>}>diff --git a/frontend/editor/src/proprietary/ui/SettingsShell.tsx b/frontend/editor/src/core/ui/SettingsShell.tsxsimilarity index 65%rename from frontend/editor/src/proprietary/ui/SettingsShell.tsxrename to frontend/editor/src/core/ui/SettingsShell.tsxindex 77dd36e2ca..8e86715d80 100644--- a/frontend/editor/src/proprietary/ui/SettingsShell.tsx+++ b/frontend/editor/src/core/ui/SettingsShell.tsx@@ -1,18 +1,17 @@import type { ReactNode } from "react";+import { Button } from "@app/ui/Button";import "@app/ui/SettingsShell.css";export interface SettingsNavItem {key: string;label: string;- /** Optional leading glyph. */icon?: ReactNode;- /** Optional trailing badge (e.g. a plan gate or count). */+ /** Trailing badge (e.g. plan gate or count). */badge?: ReactNode;disabled?: boolean;}export interface SettingsNavSection {- /** Uppercase group heading above its items. */title: string;items: SettingsNavItem[];}@@ -21,28 +20,17 @@ export interface SettingsShellProps {sections: SettingsNavSection[];activeKey: string;onSelect: (key: string) => void;- /** Heading for the content pane — usually the active item's label. */title: ReactNode;- /** Renders a close button at the top-right of the content header. */onClose?: () => void;- /** Extra header controls (e.g. a search field) left of the close button. */+ /** Rendered left of the close button. */headerActions?: ReactNode;- /** Sticky footer, e.g. Save / Cancel. */+ /** Sticky footer (e.g. Save / Cancel). */footer?: ReactNode;- /** Active section content. */children: ReactNode;className?: string;}-/**- * Two-pane settings layout: a grouped left navigation rail and a content pane- * with a sticky header (active title + actions) and an optional sticky footer.- *- * Layout chrome only — the caller owns section state and renders the active- * panel as `children`. Host it inside any modal/dialog frame (it fills its- * container's height and scrolls the two panes independently). Shared so the- * portal and the editor can present account settings the same way.- */+/** Two-pane settings layout. Fills its container; both panes scroll independently. */export function SettingsShell({sections,activeKey,@@ -103,27 +91,31 @@ export function SettingsShell({<div className="sui-settings-shell__header-actions">{headerActions}{onClose && (- <button- type="button"+ <Button+ variant="tertiary"+ accent="neutral"+ size="sm"+ shape="circle"className="sui-settings-shell__close"onClick={onClose}aria-label="Close"- >- <svg- viewBox="0 0 24 24"- width="16"- height="16"- fill="none"- stroke="currentColor"- strokeWidth={1.75}- strokeLinecap="round"- strokeLinejoin="round"- aria-hidden- >- <line x1="18" y1="6" x2="6" y2="18" />- <line x1="6" y1="6" x2="18" y2="18" />- </svg>- </button>+ leftSection={+ <svg+ viewBox="0 0 24 24"+ width="16"+ height="16"+ fill="none"+ stroke="currentColor"+ strokeWidth={1.75}+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden+ >+ <line x1="18" y1="6" x2="6" y2="18" />+ <line x1="6" y1="6" x2="18" y2="18" />+ </svg>+ }+ />)}</div></header>diff --git a/frontend/editor/src/proprietary/ui/Skeleton.css b/frontend/editor/src/core/ui/Skeleton.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Skeleton.cssrename to frontend/editor/src/core/ui/Skeleton.cssdiff --git a/frontend/editor/src/proprietary/ui/Skeleton.stories.tsx b/frontend/editor/src/core/ui/Skeleton.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Skeleton.stories.tsxrename to frontend/editor/src/core/ui/Skeleton.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/Skeleton.tsx b/frontend/editor/src/core/ui/Skeleton.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Skeleton.tsxrename to frontend/editor/src/core/ui/Skeleton.tsxdiff --git a/frontend/editor/src/proprietary/ui/Slider.css b/frontend/editor/src/core/ui/Slider.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Slider.cssrename to frontend/editor/src/core/ui/Slider.cssdiff --git a/frontend/editor/src/proprietary/ui/Slider.tsx b/frontend/editor/src/core/ui/Slider.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Slider.tsxrename to frontend/editor/src/core/ui/Slider.tsxdiff --git a/frontend/editor/src/proprietary/ui/Spinner.css b/frontend/editor/src/core/ui/Spinner.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Spinner.cssrename to frontend/editor/src/core/ui/Spinner.cssdiff --git a/frontend/editor/src/proprietary/ui/Spinner.stories.tsx b/frontend/editor/src/core/ui/Spinner.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Spinner.stories.tsxrename to frontend/editor/src/core/ui/Spinner.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/Spinner.tsx b/frontend/editor/src/core/ui/Spinner.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Spinner.tsxrename to frontend/editor/src/core/ui/Spinner.tsxdiff --git a/frontend/editor/src/proprietary/ui/Stack.css b/frontend/editor/src/core/ui/Stack.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Stack.cssrename to frontend/editor/src/core/ui/Stack.cssdiff --git a/frontend/editor/src/proprietary/ui/Stack.stories.tsx b/frontend/editor/src/core/ui/Stack.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Stack.stories.tsxrename to frontend/editor/src/core/ui/Stack.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/Stack.tsx b/frontend/editor/src/core/ui/Stack.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Stack.tsxrename to frontend/editor/src/core/ui/Stack.tsxdiff --git a/frontend/editor/src/proprietary/ui/StatTile.css b/frontend/editor/src/core/ui/StatTile.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/StatTile.cssrename to frontend/editor/src/core/ui/StatTile.cssdiff --git a/frontend/editor/src/proprietary/ui/StatTile.stories.tsx b/frontend/editor/src/core/ui/StatTile.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/StatTile.stories.tsxrename to frontend/editor/src/core/ui/StatTile.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/StatTile.tsx b/frontend/editor/src/core/ui/StatTile.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/StatTile.tsxrename to frontend/editor/src/core/ui/StatTile.tsxdiff --git a/frontend/editor/src/proprietary/ui/StatusBadge.css b/frontend/editor/src/core/ui/StatusBadge.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/StatusBadge.cssrename to frontend/editor/src/core/ui/StatusBadge.cssdiff --git a/frontend/editor/src/proprietary/ui/StatusBadge.stories.tsx b/frontend/editor/src/core/ui/StatusBadge.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/StatusBadge.stories.tsxrename to frontend/editor/src/core/ui/StatusBadge.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/StatusBadge.tsx b/frontend/editor/src/core/ui/StatusBadge.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/StatusBadge.tsxrename to frontend/editor/src/core/ui/StatusBadge.tsxdiff --git a/frontend/editor/src/proprietary/ui/StepIndicator.css b/frontend/editor/src/core/ui/StepIndicator.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/StepIndicator.cssrename to frontend/editor/src/core/ui/StepIndicator.cssdiff --git a/frontend/editor/src/proprietary/ui/StepIndicator.stories.tsx b/frontend/editor/src/core/ui/StepIndicator.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/StepIndicator.stories.tsxrename to frontend/editor/src/core/ui/StepIndicator.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/StepIndicator.tsx b/frontend/editor/src/core/ui/StepIndicator.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/StepIndicator.tsxrename to frontend/editor/src/core/ui/StepIndicator.tsxdiff --git a/frontend/editor/src/proprietary/ui/Table.css b/frontend/editor/src/core/ui/Table.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Table.cssrename to frontend/editor/src/core/ui/Table.cssdiff --git a/frontend/editor/src/proprietary/ui/Table.stories.tsx b/frontend/editor/src/core/ui/Table.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Table.stories.tsxrename to frontend/editor/src/core/ui/Table.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/Table.tsx b/frontend/editor/src/core/ui/Table.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Table.tsxrename to frontend/editor/src/core/ui/Table.tsxdiff --git a/frontend/editor/src/proprietary/ui/Tabs.css b/frontend/editor/src/core/ui/Tabs.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/Tabs.cssrename to frontend/editor/src/core/ui/Tabs.cssdiff --git a/frontend/editor/src/proprietary/ui/Tabs.stories.tsx b/frontend/editor/src/core/ui/Tabs.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Tabs.stories.tsxrename to frontend/editor/src/core/ui/Tabs.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/Tabs.tsx b/frontend/editor/src/core/ui/Tabs.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Tabs.tsxrename to frontend/editor/src/core/ui/Tabs.tsxdiff --git a/frontend/editor/src/proprietary/ui/Toast.css b/frontend/editor/src/core/ui/Toast.csssimilarity index 81%rename from frontend/editor/src/proprietary/ui/Toast.cssrename to frontend/editor/src/core/ui/Toast.cssindex ab52d37d3e..a1ca3a67bf 100644--- a/frontend/editor/src/proprietary/ui/Toast.css+++ b/frontend/editor/src/core/ui/Toast.css@@ -52,19 +52,10 @@line-height: 1.45;}+/* Sizing/background/hover are owned by the Button; this just keeps it from+ * stretching and sizes the × glyph. */.sui-toast__close {flex: 0 0 auto;- width: 1.25rem;- height: 1.25rem;- display: inline-flex;- align-items: center;- justify-content: center;- border-radius: var(--radius-sm);- color: var(--color-text-4);font-size: 1rem;line-height: 1;}-.sui-toast__close:hover {- background: var(--color-bg-hover);- color: var(--color-text-1);-}diff --git a/frontend/editor/src/proprietary/ui/Toast.stories.tsx b/frontend/editor/src/core/ui/Toast.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/Toast.stories.tsxrename to frontend/editor/src/core/ui/Toast.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/Toast.tsx b/frontend/editor/src/core/ui/Toast.tsxsimilarity index 90%rename from frontend/editor/src/proprietary/ui/Toast.tsxrename to frontend/editor/src/core/ui/Toast.tsxindex 055f5ec08d..12dcc16990 100644--- a/frontend/editor/src/proprietary/ui/Toast.tsx+++ b/frontend/editor/src/core/ui/Toast.tsx@@ -9,6 +9,7 @@ import {type ReactNode,} from "react";import { createPortal } from "react-dom";+import { Button } from "@app/ui/Button";import "@app/ui/Toast.css";export type ToastTone = "info" | "success" | "warning" | "danger";@@ -84,8 +85,7 @@ function ToastViewport({entries: ToastEntry[];onDismiss: (id: number) => void;}) {- // Render through a portal so toasts always sit above any in-flow stacking- // context. SSR-safe by checking for document existence.+ // Portal keeps toasts above any stacking context; document check is SSR safety.if (typeof document === "undefined") return null;return createPortal(<div@@ -109,7 +109,7 @@ function ToastItem({onDismiss: (id: number) => void;}) {useEffect(() => {- // Allow Escape to dismiss the most recently focused toast.+ // Escape dismisses the focused toast.function onKey(e: KeyboardEvent) {if (e.key === "Escape") onDismiss(entry.id);}@@ -128,14 +128,16 @@ function ToastItem({<div className="sui-toast__desc">{entry.description}</div>)}</div>- <button- type="button"+ <Button+ variant="tertiary"+ accent="neutral"+ size="sm"+ shape="circle"className="sui-toast__close"onClick={() => onDismiss(entry.id)}aria-label="Dismiss"- >- ×- </button>+ leftSection={<span>×</span>}+ /></div>);}diff --git a/frontend/editor/src/proprietary/ui/ToggleSwitch.css b/frontend/editor/src/core/ui/ToggleSwitch.csssimilarity index 100%rename from frontend/editor/src/proprietary/ui/ToggleSwitch.cssrename to frontend/editor/src/core/ui/ToggleSwitch.cssdiff --git a/frontend/editor/src/proprietary/ui/ToggleSwitch.stories.tsx b/frontend/editor/src/core/ui/ToggleSwitch.stories.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ToggleSwitch.stories.tsxrename to frontend/editor/src/core/ui/ToggleSwitch.stories.tsxdiff --git a/frontend/editor/src/proprietary/ui/ToggleSwitch.tsx b/frontend/editor/src/core/ui/ToggleSwitch.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ToggleSwitch.tsxrename to frontend/editor/src/core/ui/ToggleSwitch.tsxdiff --git a/frontend/editor/src/core/ui/accents.css b/frontend/editor/src/core/ui/accents.cssnew file mode 100644index 0000000000..75001f6777--- /dev/null+++ b/frontend/editor/src/core/ui/accents.css@@ -0,0 +1,101 @@+/* Shared accent palette for Button/ActionIcon/SegmentedControl/Chip; standard+ * accents derive from --color-* tokens (auto dark), neutral/brand/ai are explicit. */++.sui-acc-default {+ --_solid: var(--color-blue);+ --_solid-hover: var(--color-blue-dark);+ --_on: #ffffff;+ --_text: var(--color-blue-dark);+ --_bd: var(--color-blue-border);+ --_tint: color-mix(in srgb, var(--color-blue) 12%, transparent);+}+.sui-acc-danger {+ --_solid: var(--color-red);+ --_solid-hover: var(--color-red-dark);+ --_on: #ffffff;+ --_text: var(--color-red-dark);+ --_bd: var(--color-red-border);+ --_tint: color-mix(in srgb, var(--color-red) 12%, transparent);+}+.sui-acc-success {+ --_solid: var(--color-green);+ --_solid-hover: var(--color-green-dark);+ --_on: #ffffff;+ --_text: var(--color-green-dark);+ --_bd: var(--color-green-border);+ --_tint: color-mix(in srgb, var(--color-green) 12%, transparent);+}+.sui-acc-warning {+ --_solid: var(--color-amber);+ --_solid-hover: var(--color-amber-dark);+ --_on: #ffffff;+ --_text: var(--color-amber-dark);+ --_bd: var(--color-amber-border);+ --_tint: color-mix(in srgb, var(--color-amber) 12%, transparent);+}+/* premium: purple upgrade CTA — gradient fill (token), violet text/border. */+.sui-acc-premium {+ --_solid: var(--grad-purple-btn);+ --_solid-hover: var(--grad-purple-btn);+ --_on: #ffffff;+ --_text: var(--color-purple-dark);+ --_bd: var(--color-purple-border);+ --_tint: color-mix(in srgb, var(--color-purple) 12%, transparent);+}++/* neutral: low-emphasis grey — no palette token, so explicit. */+.sui-acc-neutral {+ --_solid: #475569;+ --_solid-hover: #334155;+ --_on: #ffffff;+ --_text: #475569;+ --_bd: #cbd5e1;+ --_tint: rgba(71, 85, 105, 0.1);+}+[data-theme="dark"] .sui-acc-neutral {+ --_solid: #64748b;+ --_solid-hover: #475569;+ --_text: #cbd5e1;+ --_bd: #334155;+ --_tint: rgba(148, 163, 184, 0.16);+}+/* brand: Stirling red — a bespoke brand colour, not part of the token palette. */+.sui-acc-brand {+ --_solid: #8e3131;+ --_solid-hover: #7a2929;+ --_on: #ffffff;+ --_text: #8e3131;+ --_bd: #d9a8a8;+ --_tint: rgba(142, 49, 49, 0.09);+}+[data-theme="dark"] .sui-acc-brand {+ --_text: #d98a8a;+ --_bd: #5a2424;+ --_tint: rgba(217, 138, 138, 0.16);+}+/* ai: multi-hue gradient for AI features — no single-colour token. */+.sui-acc-ai {+ --_solid: linear-gradient(+ 135deg,+ #8b5cf6 0%,+ #6366f1 38%,+ #3b82f6 72%,+ #22d3ee 100%+ );+ --_solid-hover: linear-gradient(+ 135deg,+ #8b5cf6 0%,+ #6366f1 38%,+ #3b82f6 72%,+ #22d3ee 100%+ );+ --_on: #ffffff;+ --_text: #6366f1;+ --_bd: #c7d2fe;+ --_tint: rgba(99, 102, 241, 0.1);+}+[data-theme="dark"] .sui-acc-ai {+ --_text: #a5b4fc;+ --_bd: #3730a3;+ --_tint: rgba(129, 140, 248, 0.18);+}diff --git a/frontend/editor/src/proprietary/ui/ariaForwarding.test.tsx b/frontend/editor/src/core/ui/ariaForwarding.test.tsxsimilarity index 100%rename from frontend/editor/src/proprietary/ui/ariaForwarding.test.tsxrename to frontend/editor/src/core/ui/ariaForwarding.test.tsxdiff --git a/frontend/editor/src/proprietary/ui/ariaForwarding.ts b/frontend/editor/src/core/ui/ariaForwarding.tssimilarity index 100%rename from frontend/editor/src/proprietary/ui/ariaForwarding.tsrename to frontend/editor/src/core/ui/ariaForwarding.tsdiff --git a/frontend/editor/src/core/ui/controlSizes.ts b/frontend/editor/src/core/ui/controlSizes.tsnew file mode 100644index 0000000000..44347ce99d--- /dev/null+++ b/frontend/editor/src/core/ui/controlSizes.ts@@ -0,0 +1,9 @@+/** Shared control height scale (px) — Button, ActionIcon and SegmentedControl all use it. */+export const CONTROL_HEIGHT = {+ sm: "30px",+ md: "36px",+ lg: "42px",+ xl: "48px",+} as const;++export type ControlSize = keyof typeof CONTROL_HEIGHT;diff --git a/frontend/editor/src/proprietary/ui/index.ts b/frontend/editor/src/core/ui/index.tssimilarity index 92%rename from frontend/editor/src/proprietary/ui/index.tsrename to frontend/editor/src/core/ui/index.tsindex e6c4864c52..39b305f358 100644--- a/frontend/editor/src/proprietary/ui/index.ts+++ b/frontend/editor/src/core/ui/index.ts@@ -1,4 +1,7 @@export * from "@app/ui/Button";+export * from "@app/ui/ActionIcon";+export * from "@app/ui/FilePicker";+export * from "@app/ui/SegmentedControl";export * from "@app/ui/StatusBadge";export * from "@app/ui/MethodBadge";export * from "@app/ui/ToggleSwitch";diff --git a/frontend/editor/src/desktop/components/ConnectionSettings.tsx b/frontend/editor/src/desktop/components/ConnectionSettings.tsxindex aec2d2bad6..746af00b25 100644--- a/frontend/editor/src/desktop/components/ConnectionSettings.tsx+++ b/frontend/editor/src/desktop/components/ConnectionSettings.tsx@@ -1,5 +1,6 @@import React, { useState, useEffect } from "react";-import { Stack, Card, Badge, Button, Text, Group } from "@mantine/core";+import { Stack, Card, Badge, Text, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import {connectionModeService,@@ -153,14 +154,14 @@ export const ConnectionSettings: React.FC = () => {<Group mt="md">{config.mode === "local" ? (- <Button onClick={handleSignIn} color="blue" variant="light">+ <Button onClick={handleSignIn} variant="secondary">{t("settings.connection.signIn", "Sign In")}</Button>) : (<ButtononClick={handleLogout}- color="red"- variant="light"+ accent="danger"+ variant="secondary"disabled={loading}>{t("settings.connection.logout", "Log Out")}diff --git a/frontend/editor/src/desktop/components/DesktopOnboardingModal.tsx b/frontend/editor/src/desktop/components/DesktopOnboardingModal.tsxindex 0a07c8127c..96bddff2af 100644--- a/frontend/editor/src/desktop/components/DesktopOnboardingModal.tsx+++ b/frontend/editor/src/desktop/components/DesktopOnboardingModal.tsx@@ -1,5 +1,7 @@import { useState, useMemo } from "react";-import { Modal, Stack, Group, Button, ActionIcon } from "@mantine/core";+import { Modal, Stack, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import CloseIcon from "@mui/icons-material/Close";import LocalIcon from "@app/components/shared/LocalIcon";@@ -105,8 +107,9 @@ export function DesktopOnboardingModal() {/><ActionIcononClick={handleClose}- radius="md"- size={36}+ variant="tertiary"+ size="md"+ aria-label={t("close", "Close")}style={{position: "absolute",top: 16,@@ -116,11 +119,6 @@ export function DesktopOnboardingModal() {backdropFilter: "blur(4px)",zIndex: 10,}}- styles={{- root: {- "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.3)" },- },- }}><CloseIcon fontSize="small" /></ActionIcon>@@ -165,15 +163,7 @@ export function DesktopOnboardingModal() {<OnboardingStepper totalSteps={totalSteps} activeStep={step} /><div className={styles.buttonContainer}><Group justify="flex-end">- <Button- onClick={() => setStep(1)}- styles={{- root: {- background: "var(--onboarding-primary-button-bg)",- color: "var(--onboarding-primary-button-text)",- },- }}- >+ <Button onClick={() => setStep(1)} accent="neutral">{t("onboarding.buttons.next", "Next →")}</Button></Group>diff --git a/frontend/editor/src/desktop/components/SetupWizard/DesktopOAuthButtons.tsx b/frontend/editor/src/desktop/components/SetupWizard/DesktopOAuthButtons.tsxindex c9813d818e..6d4940e178 100644--- a/frontend/editor/src/desktop/components/SetupWizard/DesktopOAuthButtons.tsx+++ b/frontend/editor/src/desktop/components/SetupWizard/DesktopOAuthButtons.tsx@@ -4,6 +4,7 @@ import { authService, UserInfo } from "@app/services/authService";import { buildOAuthCallbackHtml } from "@app/utils/oauthCallbackHtml";import { oauthIconUrl } from "@app/auth/ui/oauthIcons";import { STIRLING_SAAS_URL } from "@app/constants/connection";+import { Button } from "@app/ui/Button";import "@app/components/SetupWizard/desktopOAuth.css";type KnownProviderId =@@ -149,7 +150,8 @@ export const DesktopOAuthButtons: React.FC<DesktopOAuthButtonsProps> = ({providerEntry.id.slice(1): t("setup.login.sso", "Single Sign-On"));return (- <button+ <Button+ variant="secondary"key={providerEntry.id}onClick={() => handleOAuthLogin(providerEntry)}disabled={isDisabled || oauthLoading}@@ -168,7 +170,7 @@ export const DesktopOAuthButtons: React.FC<DesktopOAuthButtonsProps> = ({</span><span className="oauth-button-text-desktop">{label}</span></span>- </button>+ </Button>);})}{oauthLoading && (diff --git a/frontend/editor/src/desktop/components/SetupWizard/SaaSLoginScreen.tsx b/frontend/editor/src/desktop/components/SetupWizard/SaaSLoginScreen.tsxindex dc346ef9ac..a698611d52 100644--- a/frontend/editor/src/desktop/components/SetupWizard/SaaSLoginScreen.tsx+++ b/frontend/editor/src/desktop/components/SetupWizard/SaaSLoginScreen.tsx@@ -7,6 +7,7 @@ import DividerWithText from "@app/components/shared/DividerWithText";import { DesktopOAuthButtons } from "@app/components/SetupWizard/DesktopOAuthButtons";import { SelfHostedLink } from "@app/components/SetupWizard/SelfHostedLink";import { UserInfo } from "@app/services/authService";+import { Button } from "@app/ui/Button";import "@app/auth/ui/auth.css";interface SaaSLoginScreenProps {@@ -107,8 +108,8 @@ export const SaaSLoginScreen: React.FC<SaaSLoginScreenProps> = ({className="navigation-link-container"style={{ marginTop: "0.5rem", textAlign: "right" }}>- <button- type="button"+ <Button+ variant="tertiary"onClick={() => {setValidationError(null);onSwitchToSignup();@@ -117,7 +118,7 @@ export const SaaSLoginScreen: React.FC<SaaSLoginScreenProps> = ({disabled={loading}>{t("signup.signUp", "Sign Up")}- </button>+ </Button></div><SelfHostedLink onClick={onSelfHostedClick} disabled={loading} />@@ -127,14 +128,14 @@ export const SaaSLoginScreen: React.FC<SaaSLoginScreenProps> = ({className="navigation-link-container"style={{ marginTop: "0.5rem", textAlign: "center" }}>- <button- type="button"+ <Button+ variant="tertiary"onClick={onSkipSignIn}className="navigation-link-button"disabled={loading}>{t("setup.login.skipSignIn", "Continue without signing in")}- </button>+ </Button></div>)}</>diff --git a/frontend/editor/src/desktop/components/SetupWizard/SelfHostedLink.tsx b/frontend/editor/src/desktop/components/SetupWizard/SelfHostedLink.tsxindex 8d5c98fe6e..4d3f688179 100644--- a/frontend/editor/src/desktop/components/SetupWizard/SelfHostedLink.tsx+++ b/frontend/editor/src/desktop/components/SetupWizard/SelfHostedLink.tsx@@ -1,5 +1,6 @@import React from "react";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";import "@app/auth/ui/auth.css";interface SelfHostedLinkProps {@@ -15,14 +16,14 @@ export const SelfHostedLink: React.FC<SelfHostedLinkProps> = ({return (<div className="navigation-link-container" style={{ marginTop: "1.5rem" }}>- <button- type="button"+ <Button+ variant="tertiary"onClick={onClick}disabled={disabled}className="navigation-link-button">{t("setup.selfhosted.link", "or connect to a self hosted account")}- </button>+ </Button></div>);};diff --git a/frontend/editor/src/desktop/components/SetupWizard/ServerSelection.tsx b/frontend/editor/src/desktop/components/SetupWizard/ServerSelection.tsxindex 10746a66ea..cda4f2f4fc 100644--- a/frontend/editor/src/desktop/components/SetupWizard/ServerSelection.tsx+++ b/frontend/editor/src/desktop/components/SetupWizard/ServerSelection.tsx@@ -1,5 +1,6 @@import React, { useState } from "react";-import { Stack, Button, TextInput, Alert, Text } from "@mantine/core";+import { Stack, TextInput, Alert, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import {ServerConfig,@@ -316,8 +317,8 @@ export const ServerSelection: React.FC<ServerSelectionProps> = ({{serverUrl && (<div className="navigation-link-container">- <button- type="button"+ <Button+ variant="tertiary"className="navigation-link-button"disabled={testing || loading}onClick={() => {@@ -331,7 +332,7 @@ export const ServerSelection: React.FC<ServerSelectionProps> = ({{t("setup.server.useLast", "Last used server: {{serverUrl}}", {serverUrl: serverUrl,})}- </button>+ </Button></div>)}@@ -339,9 +340,11 @@ export const ServerSelection: React.FC<ServerSelectionProps> = ({type="submit"loading={testing || loading}disabled={loading}- mt="md"fullWidth- color="#AF3434"+ accent="danger"+ style={{+ marginTop: "var(--mantine-spacing-md)",+ }}>{testing? t("setup.server.testing", "Testing connection...")diff --git a/frontend/editor/src/desktop/components/SetupWizard/index.tsx b/frontend/editor/src/desktop/components/SetupWizard/index.tsxindex 2f6ddaba2b..b0779e6b78 100644--- a/frontend/editor/src/desktop/components/SetupWizard/index.tsx+++ b/frontend/editor/src/desktop/components/SetupWizard/index.tsx@@ -1,6 +1,7 @@import React, { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { Stack, Text, Button, Alert, Loader, Center } from "@mantine/core";+import { Stack, Text, Alert, Loader, Center } from "@mantine/core";+import { Button } from "@app/ui/Button";import { DesktopAuthLayout } from "@app/components/SetupWizard/DesktopAuthLayout";import { SaaSLoginScreen } from "@app/components/SetupWizard/SaaSLoginScreen";import { SaaSSignupScreen } from "@app/components/SetupWizard/SaaSSignupScreen";@@ -476,8 +477,6 @@ export const SetupWizard: React.FC<SetupWizardProps> = ({</Text></Alert><Button- variant="filled"- color="blue"fullWidthloading={loading}onClick={() => void loadLockedConfig()}@@ -498,8 +497,7 @@ export const SetupWizard: React.FC<SetupWizardProps> = ({</DisabledButtonWithTooltip>) : (<Button- variant="light"- color="blue"+ variant="secondary"fullWidthloading={loading}onClick={() => {@@ -514,8 +512,8 @@ export const SetupWizard: React.FC<SetupWizardProps> = ({</Button>)}<Button- variant="subtle"- color="white"+ variant="tertiary"+ accent="neutral"fullWidthonClick={handleLocalMode}>@@ -547,14 +545,14 @@ export const SetupWizard: React.FC<SetupWizardProps> = ({className="navigation-link-container"style={{ marginTop: "1.5rem" }}>- <button- type="button"+ <Button+ variant="tertiary"onClick={handleLocalMode}className="navigation-link-button"disabled={loading}>{t("setup.selfhosted.switchToLocal", "Use local tools instead")}- </button>+ </Button></div></>)}@@ -565,13 +563,13 @@ export const SetupWizard: React.FC<SetupWizardProps> = ({className="navigation-link-container"style={{ marginTop: "1.5rem" }}>- <button- type="button"+ <Button+ variant="tertiary"onClick={handleBack}className="navigation-link-button">{t("common.back", "Back")}- </button>+ </Button></div>)}</>diff --git a/frontend/editor/src/desktop/components/shared/SelfHostedOfflineBanner.tsx b/frontend/editor/src/desktop/components/shared/SelfHostedOfflineBanner.tsxindex ca75b03ec9..9f11296b56 100644--- a/frontend/editor/src/desktop/components/shared/SelfHostedOfflineBanner.tsx+++ b/frontend/editor/src/desktop/components/shared/SelfHostedOfflineBanner.tsx@@ -1,14 +1,7 @@import { useState, useEffect, useMemo } from "react";-import {- Paper,- Group,- Text,- ActionIcon,- UnstyledButton,- Popover,- List,- ScrollArea,-} from "@mantine/core";+import { Paper, Group, Text, Popover, List, ScrollArea } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { useToolWorkflow } from "@app/contexts/ToolWorkflowContext";@@ -260,7 +253,8 @@ export function SelfHostedOfflineBanner() {width={260}><Popover.Target>- <UnstyledButton+ <Button+ variant="tertiary"onClick={() => setExpanded((e) => !e)}style={{color: BANNER_LINK,@@ -279,7 +273,7 @@ export function SelfHostedOfflineBanner() {"selfHosted.offline.showTools","View unavailable tools ▾",)}- </UnstyledButton>+ </Button></Popover.Target><Popover.Dropdown p="xs"><ScrollArea.Autosize mah={300}>@@ -293,8 +287,8 @@ export function SelfHostedOfflineBanner() {</Popover>)}<ActionIcon- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"onClick={() => setDismissed(true)}aria-label={t("close", "Close")}style={{ color: BANNER_TEXT }}diff --git a/frontend/editor/src/desktop/components/shared/config/configSections/DefaultAppSettings.tsx b/frontend/editor/src/desktop/components/shared/config/configSections/DefaultAppSettings.tsxindex f4ca397032..247fda74d3 100644--- a/frontend/editor/src/desktop/components/shared/config/configSections/DefaultAppSettings.tsx+++ b/frontend/editor/src/desktop/components/shared/config/configSections/DefaultAppSettings.tsx@@ -1,5 +1,6 @@import React from "react";-import { Paper, Text, Button, Group } from "@mantine/core";+import { Paper, Text, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useDefaultApp } from "@app/hooks/useDefaultApp";@@ -29,8 +30,7 @@ export const DefaultAppSettings: React.FC = () => {</Text></div><Button- variant={isDefault ? "light" : "filled"}- color="blue"+ variant={isDefault ? "secondary" : "primary"}size="sm"onClick={handleSetDefault}loading={isLoading}diff --git a/frontend/editor/src/desktop/components/tools/toolPicker/ToolPickerFooterExtensions.tsx b/frontend/editor/src/desktop/components/tools/toolPicker/ToolPickerFooterExtensions.tsxindex 259b74e523..1dc41e9497 100644--- a/frontend/editor/src/desktop/components/tools/toolPicker/ToolPickerFooterExtensions.tsx+++ b/frontend/editor/src/desktop/components/tools/toolPicker/ToolPickerFooterExtensions.tsx@@ -1,5 +1,6 @@import { useState, useEffect } from "react";-import { Group, Text, Button } from "@mantine/core";+import { Group, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import {connectionModeService,@@ -48,9 +49,8 @@ export function ToolPickerFooterExtensions() {{t("localMode.toolPicker.message", "Sign in to unlock all tools.")}</Text><Button- size="compact-xs"- variant="light"- color="blue"+ size="sm"+ variant="secondary"style={{ flexShrink: 0 }}onClick={() =>window.dispatchEvent(new CustomEvent(OPEN_SIGN_IN_EVENT))diff --git a/frontend/editor/src/desktop/routes/login/LoginHeader.tsx b/frontend/editor/src/desktop/routes/login/LoginHeader.tsxindex d842ff6e86..fc715e6696 100644--- a/frontend/editor/src/desktop/routes/login/LoginHeader.tsx+++ b/frontend/editor/src/desktop/routes/login/LoginHeader.tsx@@ -1,5 +1,6 @@-import { ActionIcon } from "@mantine/core";import CloseIcon from "@mui/icons-material/Close";+import { useTranslation } from "react-i18next";+import { ActionIcon } from "@app/ui/ActionIcon";import { useLogoAssets } from "@app/hooks/useLogoAssets";interface LoginHeaderProps {@@ -19,6 +20,7 @@ export default function LoginHeader({centerOnly = false,onClose,}: LoginHeaderProps) {+ const { t } = useTranslation();const { tooltipLogo } = useLogoAssets();return (@@ -57,9 +59,8 @@ export default function LoginHeader({{onClose && (<ActionIcononClick={onClose}- radius="md"- size={32}- variant="subtle"+ variant="tertiary"+ aria-label={t("common.close", "Close")}style={{flexShrink: 0,color: "var(--text-secondary)",diff --git a/frontend/editor/src/portal/components/AssistantButton.tsx b/frontend/editor/src/portal/components/AssistantButton.tsxindex 7f3586c8cc..d1d264aac4 100644--- a/frontend/editor/src/portal/components/AssistantButton.tsx+++ b/frontend/editor/src/portal/components/AssistantButton.tsx@@ -1,14 +1,15 @@import { useTranslation } from "react-i18next";import { useUI } from "@portal/contexts/UIContext";import { SparklesIcon } from "@portal/components/icons";+import { Button } from "@app/ui/Button";import "@portal/components/AssistantButton.css";export function AssistantButton() {const { assistantOpen, toggleAssistant } = useUI();const { t } = useTranslation();return (- <button- type="button"+ <Button+ variant="tertiary"className={"portal-assistant-btn" + (assistantOpen ? " is-active" : "")}onClick={toggleAssistant}aria-label={@@ -35,6 +36,6 @@ export function AssistantButton() {) : (<SparklesIcon size={22} />)}- </button>+ </Button>);}diff --git a/frontend/editor/src/portal/components/AssistantPanel.tsx b/frontend/editor/src/portal/components/AssistantPanel.tsxindex 521f46f621..b31e6bec86 100644--- a/frontend/editor/src/portal/components/AssistantPanel.tsx+++ b/frontend/editor/src/portal/components/AssistantPanel.tsx@@ -1,4 +1,5 @@import { useEffect, useRef, useState } from "react";+import { ActionIcon, Button } from "@app/ui";import { useTranslation } from "react-i18next";import { useUI } from "@portal/contexts/UIContext";import { useAsync } from "@portal/hooks/useAsync";@@ -95,14 +96,14 @@ export function AssistantPanel() {{t("portal.assistant.title")}</span></div>- <button- type="button"+ <ActionIcon+ variant="tertiary"className="portal-assistant__close"onClick={closeAssistant}- aria-label={t("portal.assistant.close")}+ aria-label={t("portal.assistant.close", "Close assistant")}><CloseIcon size={16} />- </button>+ </ActionIcon></header><div className="portal-assistant__messages" ref={messagesRef}>@@ -113,15 +114,16 @@ export function AssistantPanel() {</div><div className="portal-assistant__suggestions-list">{suggestions.map((s) => (- <button+ <Buttonkey={s}- type="button"+ variant="secondary"+ size="sm"className="portal-assistant__suggestion"onClick={() => send(s)}disabled={typing}>{s}- </button>+ </Button>))}</div></div>@@ -166,14 +168,14 @@ export function AssistantPanel() {className="portal-assistant__input"disabled={typing}/>- <button+ <ActionIcontype="submit"className="portal-assistant__send"disabled={!input.trim() || typing}aria-label={t("portal.assistant.send")}><SendIcon size={14} />- </button>+ </ActionIcon></form></aside>);diff --git a/frontend/editor/src/portal/components/ChatFABWidget.stories.tsx b/frontend/editor/src/portal/components/ChatFABWidget.stories.tsxindex db9b006173..b6124bbd25 100644--- a/frontend/editor/src/portal/components/ChatFABWidget.stories.tsx+++ b/frontend/editor/src/portal/components/ChatFABWidget.stories.tsx@@ -1,5 +1,6 @@import type { Meta, StoryObj } from "@storybook/react-vite";import { useRef, useState } from "react";+import { Button } from "@app/ui/Button";import { ChatFABButton } from "@app/ui/ChatFABButton";import { ChatFABWindow } from "@app/ui/ChatFABWindow";@@ -59,21 +60,15 @@ function MockChatContent({}}><span style={{ fontWeight: 600 }}>Stirling</span>- <button- type="button"+ <Button+ variant="tertiary"+ shape="circle"onClick={onClose}aria-label="Close chat"- style={{- background: "none",- border: "none",- cursor: "pointer",- padding: 4,- borderRadius: 6,- color: "var(--color-text-4, #64748b)",- }}+ style={{ color: "var(--color-text-4, #64748b)" }}>✕- </button>+ </Button></div>{/* Messages */}@@ -158,8 +153,10 @@ function ChatFABWidgetDemo({}}>{/* FAB button */}- <button- type="button"+ <ChatFABButton+ loading={agentLoading}+ showTick={hasUnviewedResult && !agentLoading}+ tabIndex={open ? -1 : 0}onClick={() => {setOpen(true);setHasUnviewedResult(false);@@ -171,22 +168,13 @@ function ChatFABWidgetDemo({right: 16,bottom: 16,padding: 0,- border: "none",- background: "none",- cursor: "pointer",opacity: open ? 0 : 1,transform: open ? "scale(0.78)" : "scale(1)",transition:"opacity 160ms ease, transform 180ms cubic-bezier(0.32, 0.72, 0, 1)",pointerEvents: open ? "none" : "auto",}}- >- <ChatFABButton- isLoading={agentLoading}- showTick={hasUnviewedResult && !agentLoading}- tabIndex={open ? -1 : 0}- />- </button>+ />{/* Chat panel */}<div@@ -272,29 +260,21 @@ function ChatFABFullFlowDemo() {{s === "open" && "④ Viewed — tick cleared"}</div>))}- <button- type="button"+ <Button+ accent="success"+ size="sm"onClick={simulateAgentRun}disabled={isLoading || open}- style={{- marginTop: 4,- padding: "6px 12px",- borderRadius: 6,- border: "none",- background: "#22c55e",- color: "#fff",- cursor: isLoading || open ? "not-allowed" : "pointer",- opacity: isLoading || open ? 0.5 : 1,- fontSize: 13,- }}+ style={{ marginTop: 4 }}>Simulate agent run- </button>+ </Button></div>{/* FAB button */}- <button- type="button"+ <ChatFABButton+ loading={isLoading}+ showTick={hasUnviewedResult && !isLoading}onClick={handleOpen}aria-label="Open Stirling AI assistant"style={{@@ -302,21 +282,13 @@ function ChatFABFullFlowDemo() {right: 16,bottom: 16,padding: 0,- border: "none",- background: "none",- cursor: "pointer",opacity: open ? 0 : 1,transform: open ? "scale(0.78)" : "scale(1)",transition:"opacity 160ms ease, transform 180ms cubic-bezier(0.32, 0.72, 0, 1)",pointerEvents: open ? "none" : "auto",}}- >- <ChatFABButton- isLoading={isLoading}- showTick={hasUnviewedResult && !isLoading}- />- </button>+ />{/* Chat panel */}<divdiff --git a/frontend/editor/src/portal/components/ErrorBoundary.test.tsx b/frontend/editor/src/portal/components/ErrorBoundary.test.tsxindex 4e84344e77..dc815c0d8f 100644--- a/frontend/editor/src/portal/components/ErrorBoundary.test.tsx+++ b/frontend/editor/src/portal/components/ErrorBoundary.test.tsx@@ -1,8 +1,18 @@import { useState } from "react";import { describe, expect, it, vi } from "vitest";-import { fireEvent, render, screen } from "@testing-library/react";+import {+ fireEvent,+ render as baseRender,+ screen,+} from "@testing-library/react";+import { MantineProvider } from "@mantine/core";import { ErrorBoundary } from "@portal/components/ErrorBoundary";+const render = (+ ui: Parameters<typeof baseRender>[0],+ options?: Parameters<typeof baseRender>[1],+) => baseRender(ui, { wrapper: MantineProvider, ...options });+// Deterministic i18n: return the key so assertions don't depend on the async// TOML backend ever loading. Mirrors the editor's test setup convention.vi.mock("react-i18next", () => ({diff --git a/frontend/editor/src/portal/components/Header.tsx b/frontend/editor/src/portal/components/Header.tsxindex 7194094171..6ba062e577 100644--- a/frontend/editor/src/portal/components/Header.tsx+++ b/frontend/editor/src/portal/components/Header.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { Avatar, Dropdown } from "@app/ui";+import { ActionIcon, Avatar, Button, Dropdown } from "@app/ui";import { useAuth } from "@app/auth";import { useTheme } from "@portal/contexts/ThemeContext";import { useTier, TIER_INFO, type Tier } from "@portal/contexts/TierContext";@@ -19,8 +19,9 @@ function ThemeToggle() {const { theme, toggle } = useTheme();const { t } = useTranslation();return (- <button+ <ActionIcontype="button"+ variant="quiet"className="portal-header__icon-btn"onClick={toggle}aria-label={@@ -35,7 +36,7 @@ function ThemeToggle() {}>{theme === "light" ? <MoonIcon size={16} /> : <SunIcon size={16} />}- </button>+ </ActionIcon>);}@@ -49,7 +50,11 @@ function TierSwitcher() {return (<Dropdown.Root align="end"><Dropdown.Trigger>- <button type="button" className="portal-header__tier-btn">+ <Button+ type="button"+ variant="quiet"+ className="portal-header__tier-btn"+ ><spanclassName="portal-header__tier-dot"style={{ background: info.dotColor }}@@ -57,7 +62,7 @@ function TierSwitcher() {/><span className="portal-header__tier-label">{info.label}</span><ChevronDownIcon size={14} />- </button>+ </Button></Dropdown.Trigger><Dropdown.Menu width="12rem">{(Object.keys(TIER_INFO) as Tier[]).map((id) => (@@ -89,14 +94,15 @@ function UserMenu() {return (<Dropdown.Root align="end"><Dropdown.Trigger>- <button+ <ActionIcontype="button"+ variant="quiet"className="portal-header__user"aria-label={t("portal.shell.header.accountMenu", "Account menu")}title={name}><Avatar name={name} size="md" tone="blue" />- </button>+ </ActionIcon></Dropdown.Trigger><Dropdown.Menu width="12rem"><Dropdown.Item disabled>{name}</Dropdown.Item>@@ -120,8 +126,9 @@ export function Header() {</span></div>- <button+ <Buttontype="button"+ variant="quiet"className="portal-header__search"aria-label={t("portal.shell.header.search")}onClick={openSearch}@@ -133,7 +140,7 @@ export function Header() {<span className="portal-header__search-kbd" aria-hidden>⌘K</span>- </button>+ </Button><div className="portal-header__right"><MocksToggle />diff --git a/frontend/editor/src/portal/components/MocksToggle.tsx b/frontend/editor/src/portal/components/MocksToggle.tsxindex 83fce02c21..a0a12d062e 100644--- a/frontend/editor/src/portal/components/MocksToggle.tsx+++ b/frontend/editor/src/portal/components/MocksToggle.tsx@@ -6,6 +6,7 @@ import {writeMocksPreference,} from "@portal/mocks/preference";import "@portal/components/MocksToggle.css";+import { Button } from "@app/ui/Button";/*** Dev-only header chip that flips MSW interception on and off. Persists the@@ -32,8 +33,8 @@ export function MocksToggle() {}return (- <button- type="button"+ <Button+ variant="tertiary"className={"portal-mocks-toggle" +(enabled ? " is-on" : " is-off") +@@ -49,6 +50,6 @@ export function MocksToggle() {<span className="portal-mocks-toggle__label">{enabled ? t("portal.mocks.label.on") : t("portal.mocks.label.off")}</span>- </button>+ </Button>);}diff --git a/frontend/editor/src/portal/components/NotificationsDropdown.tsx b/frontend/editor/src/portal/components/NotificationsDropdown.tsxindex 4a0d84d5c3..1401837e53 100644--- a/frontend/editor/src/portal/components/NotificationsDropdown.tsx+++ b/frontend/editor/src/portal/components/NotificationsDropdown.tsx@@ -1,6 +1,6 @@import { useState } from "react";import { useTranslation } from "react-i18next";-import { Dropdown, EmptyState, Skeleton } from "@app/ui";+import { ActionIcon, Button, Dropdown, EmptyState, Skeleton } from "@app/ui";import { BellIcon } from "@portal/components/icons";import { useAsync, useSectionFlags } from "@portal/hooks/useAsync";import {@@ -45,8 +45,9 @@ export function NotificationsDropdown() {return (<Dropdown.Root align="end"><Dropdown.Trigger>- <button+ <ActionIcontype="button"+ variant="quiet"className="portal-header__icon-btn portal-header__icon-btn--badge"aria-label={hasUnread@@ -60,7 +61,7 @@ export function NotificationsDropdown() {{hasUnread && (<span className="portal-header__bell-dot" aria-hidden />)}- </button>+ </ActionIcon></Dropdown.Trigger><Dropdown.Menu width="22.5rem" className="portal-notif__menu"><div className="portal-notif__header">@@ -115,17 +116,22 @@ export function NotificationsDropdown() {</ul>)}<div className="portal-notif__footer">- <button+ <Buttontype="button"+ variant="quiet"className="portal-notif__action"onClick={onMarkAllRead}disabled={!hasUnread}>{t("portal.notifications.markAllRead")}- </button>- <button type="button" className="portal-notif__action">+ </Button>+ <Button+ type="button"+ variant="quiet"+ className="portal-notif__action"+ >{t("portal.notifications.viewAll")}- </button>+ </Button></div></Dropdown.Menu></Dropdown.Root>diff --git a/frontend/editor/src/portal/components/PipelineForkWizard.tsx b/frontend/editor/src/portal/components/PipelineForkWizard.tsxindex 838afda3db..3a27b5984a 100644--- a/frontend/editor/src/portal/components/PipelineForkWizard.tsx+++ b/frontend/editor/src/portal/components/PipelineForkWizard.tsx@@ -85,9 +85,9 @@ export function PipelineForkWizard() {{phase === "pick" && (<div className="portal-fork__templates">{PIPELINE_TEMPLATES.map((t) => (- <button+ <Buttonkey={t.id}- type="button"+ variant="tertiary"className="portal-fork__template"data-accent={t.accent}onClick={() => fork(t)}@@ -96,12 +96,12 @@ export function PipelineForkWizard() {<span className="portal-fork__template-blurb">{t.blurb}</span><span className="portal-fork__template-types">{t.docTypes.map((d) => (- <Chip key={d} size="sm" tone="neutral">+ <Chip key={d} size="sm">{d}</Chip>))}</span>- </button>+ </Button>))}</div>)}@@ -139,17 +139,16 @@ export function PipelineForkWizard() {</ol><div className="portal-fork__build-actions">- <Button variant="ghost" size="sm" onClick={reset}>+ <Button variant="tertiary" size="sm" onClick={reset}>{phase === "ready"? t("portal.forkWizard.action.pickAnother"): t("portal.forkWizard.action.cancel")}</Button><Button- variant="gradient"size="sm"onClick={deploy}disabled={phase !== "ready"}- trailingIcon={<span aria-hidden>→</span>}+ rightSection={<span aria-hidden>→</span>}>{phase === "ready"? t("portal.forkWizard.action.deploy")diff --git a/frontend/editor/src/portal/components/PolicySummary.tsx b/frontend/editor/src/portal/components/PolicySummary.tsxindex 084e7e5b69..29d93cda3c 100644--- a/frontend/editor/src/portal/components/PolicySummary.tsx+++ b/frontend/editor/src/portal/components/PolicySummary.tsx@@ -105,7 +105,7 @@ export function PolicySummary() {render: ({ state }) => {if (state === "locked") {return (- <Button size="sm" variant="ghost" onClick={goToPolicies}>+ <Button size="sm" variant="tertiary" onClick={goToPolicies}>{t("portal.policySummary.action.comingSoon")}</Button>);@@ -113,7 +113,7 @@ export function PolicySummary() {return (<Buttonsize="sm"- variant={state === "active" ? "ghost" : "outline"}+ variant={state === "active" ? "tertiary" : "secondary"}onClick={goToPolicies}>{state === "active"diff --git a/frontend/editor/src/portal/components/PopularUseCases.tsx b/frontend/editor/src/portal/components/PopularUseCases.tsxindex b85912761f..85ccc90c72 100644--- a/frontend/editor/src/portal/components/PopularUseCases.tsx+++ b/frontend/editor/src/portal/components/PopularUseCases.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { Card, type CardProps } from "@app/ui";+import { Button, Card, type CardProps } from "@app/ui";import { useView } from "@portal/contexts/ViewContext";import "@portal/components/PopularUseCases.css";@@ -11,12 +11,12 @@ interface UseCase {accent: Accent;}-const ACCENT_COLOR: Record<Accent, string> = {- blue: "var(--color-blue)",- purple: "var(--color-purple)",- green: "var(--color-green)",- amber: "var(--color-amber)",- red: "var(--color-red)",+const ACCENT_COLOR: Partial<Record<Accent, string>> = {+ default: "var(--color-blue)",+ premium: "var(--color-purple)",+ success: "var(--color-green)",+ warning: "var(--color-amber)",+ danger: "var(--color-red)",};/**@@ -26,10 +26,10 @@ const ACCENT_COLOR: Record<Accent, string> = {* copy (eyebrow, title, blurb, cta) is keyed into useCases.items.<key>.*/const USE_CASES: UseCase[] = [- { key: "autoRouting", accent: "blue" },- { key: "piiRedaction", accent: "red" },- { key: "trainingData", accent: "purple" },- { key: "authenticity", accent: "green" },+ { key: "autoRouting", accent: "default" },+ { key: "piiRedaction", accent: "danger" },+ { key: "trainingData", accent: "premium" },+ { key: "authenticity", accent: "success" },];export function PopularUseCases() {@@ -42,13 +42,14 @@ export function PopularUseCases() {><header className="portal-usecases__head"><h2 className="portal-usecases__title">{t("portal.useCases.title")}</h2>- <button+ <Button+ variant="quiet"type="button"className="portal-usecases__viewall"onClick={() => setActiveView("pipelines")}>{t("portal.useCases.viewAll")} <span aria-hidden>→</span>- </button>+ </Button></header><div className="portal-usecases__grid">{USE_CASES.map((uc) => (@@ -70,7 +71,8 @@ export function PopularUseCases() {<p className="portal-usecases__blurb">{t(`portal.useCases.items.${uc.key}.blurb`)}</p>- <button+ <Button+ variant="quiet"type="button"className="portal-usecases__cta"style={{ color: ACCENT_COLOR[uc.accent] }}@@ -78,7 +80,7 @@ export function PopularUseCases() {>{t(`portal.useCases.items.${uc.key}.cta`)}{" "}<span aria-hidden>→</span>- </button>+ </Button></Card>))}</div>diff --git a/frontend/editor/src/portal/components/ProcessingStatusStrip.tsx b/frontend/editor/src/portal/components/ProcessingStatusStrip.tsxindex 9aa3025f98..1ef41f5e0f 100644--- a/frontend/editor/src/portal/components/ProcessingStatusStrip.tsx+++ b/frontend/editor/src/portal/components/ProcessingStatusStrip.tsx@@ -57,7 +57,7 @@ export function ProcessingStatusStrip() {nearCap ? (<Buttonsize="sm"- variant="outline"+ variant="secondary"onClick={() => setActiveView("usage")}>{t("portal.processingStatus.upgrade")}@@ -104,7 +104,7 @@ export function ProcessingStatusStrip() {</span><Buttonsize="sm"- variant="ghost"+ variant="tertiary"className="portal-statusstrip__manage"onClick={() => setActiveView("usage")}>diff --git a/frontend/editor/src/portal/components/RecentActivity.tsx b/frontend/editor/src/portal/components/RecentActivity.tsxindex 8934a5f0bd..11d27a9770 100644--- a/frontend/editor/src/portal/components/RecentActivity.tsx+++ b/frontend/editor/src/portal/components/RecentActivity.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { Card, EmptyState, Skeleton, StatusBadge } from "@app/ui";+import { Button, Card, EmptyState, Skeleton, StatusBadge } from "@app/ui";import { useAsync, useSectionFlags } from "@portal/hooks/useAsync";import {fetchRecentActivity,@@ -33,9 +33,9 @@ export function RecentActivity() {<h2 className="portal-activity__title">{t("portal.recentActivity.title")}</h2>- <button type="button" className="portal-activity__more">+ <Button variant="quiet" type="button" className="portal-activity__more">{t("portal.recentActivity.viewAll")} →- </button>+ </Button></header>{isLoading && (diff --git a/frontend/editor/src/portal/components/SearchModal.tsx b/frontend/editor/src/portal/components/SearchModal.tsxindex ca66f9365e..6aac7e99d4 100644--- a/frontend/editor/src/portal/components/SearchModal.tsx+++ b/frontend/editor/src/portal/components/SearchModal.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef, useState } from "react";+import { Button, EmptyState, Modal, Skeleton } from "@app/ui";import { useTranslation } from "react-i18next";-import { EmptyState, Modal, Skeleton } from "@app/ui";import { useUI } from "@portal/contexts/UIContext";import { useAsync, useSectionFlags } from "@portal/hooks/useAsync";import { fetchQuickActions, type QuickAction } from "@portal/api/search";@@ -100,9 +100,11 @@ export function SearchModal() {<div key={group} className="portal-search__group"><div className="portal-search__group-label">{group}</div>{items.map((item) => (- <button+ <Buttonkey={item.label}- type="button"+ variant="tertiary"+ justify="start"+ fullWidthclassName="portal-search__item"onClick={closeSearch}>@@ -112,7 +114,7 @@ export function SearchModal() {<span className="portal-search__item-hint">{item.hint}</span>- </button>+ </Button>))}</div>))}diff --git a/frontend/editor/src/portal/components/SettingsModal.tsx b/frontend/editor/src/portal/components/SettingsModal.tsxindex c6a40f3389..3073d243f0 100644--- a/frontend/editor/src/portal/components/SettingsModal.tsx+++ b/frontend/editor/src/portal/components/SettingsModal.tsx@@ -260,10 +260,10 @@ export function SettingsModal({<span className="portal-settings__footer-note">{t("portal.settings.footerNote")}</span>- <Button variant="ghost" onClick={onClose}>+ <Button variant="tertiary" onClick={onClose}>{t("portal.settings.cancel")}</Button>- <Button variant="gradient" onClick={onClose}>+ <Button variant="primary" accent="premium" onClick={onClose}>{t("portal.settings.saveChanges")}</Button></>@@ -401,7 +401,7 @@ function ProfilePanel({</div><span className="portal-settings__identity-email">{email}</span></div>- <Button variant="outline" size="sm" disabled>+ <Button variant="secondary" size="sm" disabled>{t("portal.settings.profile.changePhoto")}</Button></div>@@ -458,9 +458,10 @@ function AppearancePanel({aria-label={t("portal.settings.appearance.themeTitle")}>{THEME_OPTIONS.map((opt) => (- <button+ <Buttonkey={opt.value}type="button"+ variant="quiet"role="radio"aria-checked={theme === opt.value}className={@@ -482,7 +483,7 @@ function AppearancePanel({</strong><span>{t(`portal.settings.appearance.${opt.value}.hint`)}</span></span>- </button>+ </Button>))}</div></div>@@ -639,7 +640,7 @@ function WorkspacePanel({</span></div>)}- <Button variant="outline" size="sm" disabled>+ <Button variant="secondary" size="sm" disabled>{t("portal.settings.workspace.manageBilling")}</Button></div>@@ -811,7 +812,7 @@ function SessionsPanel({</StatusBadge>) : (// TODO(backend): DELETE /v1/settings/sessions/{id}- <Button variant="ghost" size="sm">+ <Button variant="tertiary" size="sm">{t("portal.settings.sessions.revoke")}</Button>)}diff --git a/frontend/editor/src/portal/components/Sidebar.tsx b/frontend/editor/src/portal/components/Sidebar.tsxindex 0deb3c0dda..675e48561f 100644--- a/frontend/editor/src/portal/components/Sidebar.tsx+++ b/frontend/editor/src/portal/components/Sidebar.tsx@@ -1,5 +1,5 @@+import { Button, Dropdown, NavItem } from "@app/ui";import { useTranslation } from "react-i18next";-import { Dropdown, NavItem } from "@app/ui";import { useView, type ViewId } from "@portal/contexts/ViewContext";import { useTier } from "@portal/contexts/TierContext";import { useTheme } from "@portal/contexts/ThemeContext";@@ -172,13 +172,13 @@ export function Sidebar() {<Dropdown.Root align="end" className="portal-sidebar__app-switch"><Dropdown.Trigger>- <button- type="button"+ <Button+ variant="tertiary"className="portal-sidebar__app-switch-btn"aria-label={t("portal.shell.sidebar.switchApp")}><ChevronDownIcon size={14} />- </button>+ </Button></Dropdown.Trigger><Dropdown.Menu width="11rem"><Dropdown.Itemdiff --git a/frontend/editor/src/portal/components/SingleOpRunner.tsx b/frontend/editor/src/portal/components/SingleOpRunner.tsxindex 2ac89450ec..3abb9f9850 100644--- a/frontend/editor/src/portal/components/SingleOpRunner.tsx+++ b/frontend/editor/src/portal/components/SingleOpRunner.tsx@@ -161,28 +161,28 @@ export function SingleOpRunner({</StatusBadge>)}</div>- <Button variant="ghost" onClick={onClose}>+ <Button variant="tertiary" onClick={onClose}>{t("portal.opRunner.action.close")}</Button>{phase === "done" ? (<>- <Button variant="outline" onClick={reset}>+ <Button variant="secondary" onClick={reset}>{t("portal.opRunner.action.runAgain")}</Button><Button- variant="gradient"+ accent="premium"onClick={buildPipelineWithOp}- trailingIcon={<span aria-hidden>→</span>}+ rightSection={<span aria-hidden>→</span>}>{t("portal.opRunner.action.openBuilder")}</Button></>) : (<Button- variant="gradient"+ accent="premium"onClick={run}disabled={phase === "running" || !selectedOp}- trailingIcon={<span aria-hidden>→</span>}+ rightSection={<span aria-hidden>→</span>}>{phase === "running"? t("portal.opRunner.action.running")@@ -233,15 +233,16 @@ export function SingleOpRunner({</>)}</div>- <button+ <Buttontype="button"+ variant="quiet"className="portal-runner__sample-btn"onClick={pickSample}>{sample? t("portal.opRunner.drop.pickAnother"): t("portal.opRunner.drop.useSample")}- </button>+ </Button></div><div>@@ -269,9 +270,10 @@ export function SingleOpRunner({/>)}{ops?.map((op) => (- <button+ <Buttonkey={op.id}type="button"+ variant="quiet"className={"portal-runner__op" +(selectedOpId === op.id ? " is-selected" : "")@@ -290,7 +292,7 @@ export function SingleOpRunner({{op.endpoint}</span><span className="portal-runner__op-blurb">{op.blurb}</span>- </button>+ </Button>))}</div></div>diff --git a/frontend/editor/src/portal/components/WelcomeCarousel.tsx b/frontend/editor/src/portal/components/WelcomeCarousel.tsxindex d0b01708e6..42af5a6abb 100644--- a/frontend/editor/src/portal/components/WelcomeCarousel.tsx+++ b/frontend/editor/src/portal/components/WelcomeCarousel.tsx@@ -185,14 +185,13 @@ export function WelcomeCarousel({ onTryOp }: WelcomeCarouselProps) {</p><div className="portal-carousel__cta"><Button- variant="gradient"onClick={() => runAction(slide.primary)}- trailingIcon={<span aria-hidden>→</span>}+ rightSection={<span aria-hidden>→</span>}>{t(slide.primary.labelKey)}</Button><Button- variant="outline"+ variant="secondary"onClick={() => runAction(slide.secondary)}>{t(slide.secondary.labelKey)}@@ -213,9 +212,9 @@ export function WelcomeCarousel({ onTryOp }: WelcomeCarouselProps) {aria-label={t("portal.welcome.pagination")}>{SLIDES.map((s, i) => (- <button+ <Buttonkey={s.id}- type="button"+ variant="tertiary"aria-current={i === index ? "true" : undefined}aria-label={t("portal.welcome.slideLabel", {number: i + 1,diff --git a/frontend/editor/src/portal/components/account-link/LinkAccountCard.tsx b/frontend/editor/src/portal/components/account-link/LinkAccountCard.tsxindex 1bf8a65bf2..fa79ed2c72 100644--- a/frontend/editor/src/portal/components/account-link/LinkAccountCard.tsx+++ b/frontend/editor/src/portal/components/account-link/LinkAccountCard.tsx@@ -83,8 +83,8 @@ export function LinkAccountCard({ link }: Props) {)}</span><Button- variant="outline"- accent="red"+ variant="secondary"+ accent="danger"loading={linking}onClick={link.unlink}>diff --git a/frontend/editor/src/portal/components/account-link/LinkAccountModal.tsx b/frontend/editor/src/portal/components/account-link/LinkAccountModal.tsxindex 2b07e12b3a..3f8da872c8 100644--- a/frontend/editor/src/portal/components/account-link/LinkAccountModal.tsx+++ b/frontend/editor/src/portal/components/account-link/LinkAccountModal.tsx@@ -106,7 +106,7 @@ export function LinkAccountModal({</Banner>{import.meta.env.DEV && (<Button- variant="outline"+ variant="secondary"onClick={async () => {await onLinked({ access_token: "dev-stub-jwt" });onClose();diff --git a/frontend/editor/src/portal/components/account-link/LinkedInstancesTable.tsx b/frontend/editor/src/portal/components/account-link/LinkedInstancesTable.tsxindex f6839596d3..63defa92ac 100644--- a/frontend/editor/src/portal/components/account-link/LinkedInstancesTable.tsx+++ b/frontend/editor/src/portal/components/account-link/LinkedInstancesTable.tsx@@ -98,8 +98,8 @@ export function LinkedInstancesTable({render: (i) =>i.revoked ? null : (<Button- variant="outline"- accent="red"+ variant="secondary"+ accent="danger"size="sm"loading={revokingId === i.instanceId}onClick={() => onRevoke(i)}diff --git a/frontend/editor/src/portal/components/agent-builder/AgentSelector.tsx b/frontend/editor/src/portal/components/agent-builder/AgentSelector.tsxindex f6734721b8..9891c10d03 100644--- a/frontend/editor/src/portal/components/agent-builder/AgentSelector.tsx+++ b/frontend/editor/src/portal/components/agent-builder/AgentSelector.tsx@@ -1,6 +1,6 @@import { useTranslation } from "react-i18next";import { type Agent, AGENT_STATUS_TONE } from "@portal/api/agents";-import { StatusBadge } from "@app/ui";+import { Button, StatusBadge } from "@app/ui";import "@portal/views/AgentBuilder.css";interface AgentSelectorProps {@@ -22,9 +22,11 @@ export function AgentSelector({aria-label={t("portal.agentBuilder.selectorAriaLabel")}>{agents.map((a) => (- <button+ <Buttonkey={a.id}- type="button"+ variant="tertiary"+ justify="start"+ fullWidthclassName={"portal-agents__selector-item" +(a.id === selectedId ? " is-selected" : "")@@ -42,7 +44,7 @@ export function AgentSelector({</StatusBadge><code className="portal-agents__selector-version">{a.version}</code></span>- </button>+ </Button>))}</nav>);diff --git a/frontend/editor/src/portal/components/agent-builder/BootstrapDialog.tsx b/frontend/editor/src/portal/components/agent-builder/BootstrapDialog.tsxindex 24bf1205f7..a6b28688e6 100644--- a/frontend/editor/src/portal/components/agent-builder/BootstrapDialog.tsx+++ b/frontend/editor/src/portal/components/agent-builder/BootstrapDialog.tsx@@ -37,7 +37,7 @@ export function BootstrapDialog({ open, onClose }: BootstrapDialogProps) {subtitle={t("portal.agentBuilder.bootstrap.subtitle")}footer={<div className="portal-agents__dialog-footer">- <Button variant="ghost" size="sm" onClick={close}>+ <Button variant="tertiary" size="sm" onClick={close}>{t("portal.agentBuilder.bootstrap.cancel")}</Button><Button size="sm" onClick={bootstrap} disabled={!fileName}>diff --git a/frontend/editor/src/portal/components/agent-builder/EvalsPanel.tsx b/frontend/editor/src/portal/components/agent-builder/EvalsPanel.tsxindex 3f1580652f..4654f10635 100644--- a/frontend/editor/src/portal/components/agent-builder/EvalsPanel.tsx+++ b/frontend/editor/src/portal/components/agent-builder/EvalsPanel.tsx@@ -86,7 +86,7 @@ export function EvalsPanel({ agent }: EvalsPanelProps) {value={`${agent.evalsPassing} / ${agent.evalsTotal}`}/></div>- <Button size="sm" variant="outline" onClick={runEvals}>+ <Button size="sm" variant="secondary" onClick={runEvals}>{t("portal.agentBuilder.evals.runEvals")}</Button></div>diff --git a/frontend/editor/src/portal/components/agent-builder/ScenariosPanel.tsx b/frontend/editor/src/portal/components/agent-builder/ScenariosPanel.tsxindex f4057ea2b6..d3a2822838 100644--- a/frontend/editor/src/portal/components/agent-builder/ScenariosPanel.tsx+++ b/frontend/editor/src/portal/components/agent-builder/ScenariosPanel.tsx@@ -68,7 +68,7 @@ export function ScenariosPanel({ agent }: ScenariosPanelProps) {</div><Buttonsize="sm"- variant="ghost"+ variant="tertiary"onClick={() => toggleEnabled(s.id)}>{s.enabled@@ -80,7 +80,7 @@ export function ScenariosPanel({ agent }: ScenariosPanelProps) {</ul><div className="portal-agents__scenario-add">- <Chip tone="blue" size="sm">+ <Chip accent="default" size="sm">{t("portal.agentBuilder.scenarios.addScenario")}</Chip><div className="portal-agents__scenario-form">diff --git a/frontend/editor/src/portal/components/agent-builder/ToolsPanel.tsx b/frontend/editor/src/portal/components/agent-builder/ToolsPanel.tsxindex 4dde8ff54d..6c0d3030ac 100644--- a/frontend/editor/src/portal/components/agent-builder/ToolsPanel.tsx+++ b/frontend/editor/src/portal/components/agent-builder/ToolsPanel.tsx@@ -47,7 +47,7 @@ export function ToolsPanel({ agent, governanceUnlocked }: ToolsPanelProps) {: t("portal.agentBuilder.tools.governanceGate")}/>- <Chip tone={restricted ? "amber" : "green"} size="sm">+ <Chip accent={restricted ? "warning" : "success"} size="sm">{restricted? t("portal.agentBuilder.tools.restricted"): t("portal.agentBuilder.tools.broadAccess")}@@ -68,7 +68,7 @@ export function ToolsPanel({ agent, governanceUnlocked }: ToolsPanelProps) {return (<Chipkey={tool}- tone={isDenied ? "red" : "neutral"}+ accent={isDenied ? "danger" : "neutral"}size="sm"onClick={governanceUnlocked ? () => toggleDenied(tool) : undefineddiff --git a/frontend/editor/src/portal/components/agent-builder/VersionsPanel.tsx b/frontend/editor/src/portal/components/agent-builder/VersionsPanel.tsxindex 88edc7993c..20d71dbfbc 100644--- a/frontend/editor/src/portal/components/agent-builder/VersionsPanel.tsx+++ b/frontend/editor/src/portal/components/agent-builder/VersionsPanel.tsx@@ -69,7 +69,7 @@ export function VersionsPanel({ agent, historyUnlocked }: VersionsPanelProps) {{v.status === "draft" && (<Buttonsize="sm"- variant="outline"+ variant="secondary"onClick={() => publish(v.version)}>{t("portal.agentBuilder.versions.publish")}@@ -78,7 +78,7 @@ export function VersionsPanel({ agent, historyUnlocked }: VersionsPanelProps) {{v.status === "published" && !isCurrent && (<Buttonsize="sm"- variant="ghost"+ variant="tertiary"onClick={() => rollback(v.version)}>{t("portal.agentBuilder.versions.rollBack")}diff --git a/frontend/editor/src/portal/components/billing/EnterpriseUpsell.tsx b/frontend/editor/src/portal/components/billing/EnterpriseUpsell.tsxindex 6525e66970..f27f62097e 100644--- a/frontend/editor/src/portal/components/billing/EnterpriseUpsell.tsx+++ b/frontend/editor/src/portal/components/billing/EnterpriseUpsell.tsx@@ -35,11 +35,7 @@ export function EnterpriseUpsell({ bare = false }: Props) {)}</p></div>- <Button- variant="gradient"- size="sm"- onClick={() => setActiveView("procurement")}- >+ <Button size="sm" onClick={() => setActiveView("procurement")}>{t("portal.billing.enterpriseUpsell.cta","Build your Enterprise quote",diff --git a/frontend/editor/src/portal/components/billing/FreePdfEditorsCard.tsx b/frontend/editor/src/portal/components/billing/FreePdfEditorsCard.tsxindex 77cbdbad5b..d06dfd23a6 100644--- a/frontend/editor/src/portal/components/billing/FreePdfEditorsCard.tsx+++ b/frontend/editor/src/portal/components/billing/FreePdfEditorsCard.tsx@@ -72,9 +72,9 @@ export function FreePdfEditorsCard() {</MetricStrip>{/* Opens the Users tab with its invite-member modal (via the ?invite param). */}<Button- variant="outline"+ variant="secondary"size="sm"- leadingIcon={<PersonAddIcon sx={{ fontSize: 16 }} />}+ leftSection={<PersonAddIcon sx={{ fontSize: 16 }} />}onClick={() => navigate("/users?invite=1")}>{t("portal.billing.freeEditors.inviteTeammates", "Invite teammates")}diff --git a/frontend/editor/src/portal/components/billing/FreePlanView.tsx b/frontend/editor/src/portal/components/billing/FreePlanView.tsxindex 7132e6dfa1..0192d5761e 100644--- a/frontend/editor/src/portal/components/billing/FreePlanView.tsx+++ b/frontend/editor/src/portal/components/billing/FreePlanView.tsx@@ -56,7 +56,8 @@ export function FreePlanView({ wallet, unsynced, onSubscribed }: Props) {const switchOnAction = isLeader ? (<Button- variant="gradient"+ variant="primary"+ accent="premium"onClick={openCheckout}disabled={wallet.teamId == null}>diff --git a/frontend/editor/src/portal/components/billing/InvoicesList.tsx b/frontend/editor/src/portal/components/billing/InvoicesList.tsxindex 1a9f015f5e..8e4c8a8540 100644--- a/frontend/editor/src/portal/components/billing/InvoicesList.tsx+++ b/frontend/editor/src/portal/components/billing/InvoicesList.tsx@@ -218,7 +218,7 @@ export function InvoicesList() {{hasMore && (<div className="portal-billing__invoice-footer"><Button- variant="ghost"+ variant="tertiary"size="sm"onClick={() => setShowAll((v) => !v)}>diff --git a/frontend/editor/src/portal/components/billing/LinkAccountPrompt.tsx b/frontend/editor/src/portal/components/billing/LinkAccountPrompt.tsxindex 522fcc17c3..e21fec3591 100644--- a/frontend/editor/src/portal/components/billing/LinkAccountPrompt.tsx+++ b/frontend/editor/src/portal/components/billing/LinkAccountPrompt.tsx@@ -23,7 +23,11 @@ export function LinkAccountPrompt() {"Manual PDF editing — view, sign, merge, split, watermark, compress, convert, manual OCR — is always free, linked or not. Link to claim 500 free PDFs of metered processing (automation, AI, and the API); when you need more, turn on the Processor plan and only pay for what you use.",)}actions={- <Button variant="gradient" onClick={() => openLinkModal()}>+ <Button+ variant="primary"+ accent="premium"+ onClick={() => openLinkModal()}+ >{t("portal.billing.linkPrompt.cta", "Link Stirling account")}</Button>}diff --git a/frontend/editor/src/portal/components/billing/PaymentMethodCard.tsx b/frontend/editor/src/portal/components/billing/PaymentMethodCard.tsxindex cd3b094a5e..4904e8364b 100644--- a/frontend/editor/src/portal/components/billing/PaymentMethodCard.tsx+++ b/frontend/editor/src/portal/components/billing/PaymentMethodCard.tsx@@ -96,7 +96,7 @@ export function PaymentMethodCard({ onManage, managing }: Props) {)}</div><Button- variant="outline"+ variant="secondary"size="sm"loading={managing}onClick={onManage}diff --git a/frontend/editor/src/portal/components/billing/SpendLimitCard.tsx b/frontend/editor/src/portal/components/billing/SpendLimitCard.tsxindex d117f3d9bc..9ee2fa1f5e 100644--- a/frontend/editor/src/portal/components/billing/SpendLimitCard.tsx+++ b/frontend/editor/src/portal/components/billing/SpendLimitCard.tsx@@ -145,7 +145,8 @@ export function SpendLimitCard({/>{proj && draftCap !== proj.suggestedMajor && (- <button+ <Button+ variant="quiet"type="button"className="portal-billing__suggested"onClick={() => setDraftCap(proj.suggestedMajor)}@@ -157,7 +158,7 @@ export function SpendLimitCard({amount: formatMoneyMajor(proj.suggestedMajor, wallet.currency),},)}- </button>+ </Button>)}<div className="portal-billing__guardrail">@@ -184,13 +185,13 @@ export function SpendLimitCard({<div className="portal-billing__edit-actions"><Button- variant="outline"+ variant="secondary"size="sm"onClick={() => onAdjustingChange(false)}>{t("portal.billing.spendLimit.cancel", "Cancel")}</Button>- <Button variant="gradient" size="sm" loading={saving} onClick={save}>+ <Button accent="premium" size="sm" loading={saving} onClick={save}>{t("portal.billing.spendLimit.save", "Save limit")}</Button></div>@@ -223,7 +224,7 @@ export function SpendLimitCard({</div>{isLeader && (<Button- variant="outline"+ variant="secondary"size="sm"onClick={() => onAdjustingChange(true)}>diff --git a/frontend/editor/src/portal/components/billing/StripeCheckoutModal.tsx b/frontend/editor/src/portal/components/billing/StripeCheckoutModal.tsxindex 2b8048ebcc..7e8e55e70a 100644--- a/frontend/editor/src/portal/components/billing/StripeCheckoutModal.tsx+++ b/frontend/editor/src/portal/components/billing/StripeCheckoutModal.tsx@@ -91,7 +91,7 @@ function CheckoutActivationSlow({ onClose }: { onClose: () => void }) {"Your payment succeeded, but activation is taking a little longer than usual. It'll switch on automatically - close this and it'll appear here shortly.",)}</p>- <Button variant="outline" onClick={onClose}>+ <Button variant="secondary" onClick={onClose}>{t("portal.billing.checkout.activationSlow.close", "Close")}</Button></div>diff --git a/frontend/editor/src/portal/components/catalogue/ComponentCard.tsx b/frontend/editor/src/portal/components/catalogue/ComponentCard.tsxindex 07d3af75c1..2e19223ce8 100644--- a/frontend/editor/src/portal/components/catalogue/ComponentCard.tsx+++ b/frontend/editor/src/portal/components/catalogue/ComponentCard.tsx@@ -69,7 +69,7 @@ export function ComponentCard({<div className="portal-components__frameworks">{component.frameworks.map((fw) => (- <Chip key={fw} size="sm" tone="neutral">+ <Chip key={fw} size="sm">{fw}</Chip>))}diff --git a/frontend/editor/src/portal/components/catalogue/ComponentDetailModal.tsx b/frontend/editor/src/portal/components/catalogue/ComponentDetailModal.tsxindex 1959e10b1d..b2d8a3f173 100644--- a/frontend/editor/src/portal/components/catalogue/ComponentDetailModal.tsx+++ b/frontend/editor/src/portal/components/catalogue/ComponentDetailModal.tsx@@ -98,7 +98,7 @@ export function ComponentDetailModal({) : (<Buttonsize="sm"- accent="purple"+ accent="premium"// TODO(backend): route to the upgrade / contact-sales flow.onClick={() => onClose()}>@@ -147,7 +147,7 @@ export function ComponentDetailModal({</p><div className="portal-components__frameworks">{component.frameworks.map((fw) => (- <Chip key={fw} size="sm" tone="blue">+ <Chip key={fw} size="sm">{fw}</Chip>))}diff --git a/frontend/editor/src/portal/components/catalogue/ComponentPropsTable.tsx b/frontend/editor/src/portal/components/catalogue/ComponentPropsTable.tsxindex 8ff5155b63..9a87fc3c0d 100644--- a/frontend/editor/src/portal/components/catalogue/ComponentPropsTable.tsx+++ b/frontend/editor/src/portal/components/catalogue/ComponentPropsTable.tsx@@ -32,7 +32,7 @@ export function ComponentPropsTable({ props: rows }: ComponentPropsTableProps) {header: t("portal.catalogue.props.columns.required"),render: (p) =>p.required ? (- <Chip size="sm" tone="amber">+ <Chip size="sm" accent="warning">{t("portal.catalogue.props.required")}</Chip>) : (diff --git a/frontend/editor/src/portal/components/docs/AuthenticationSection.tsx b/frontend/editor/src/portal/components/docs/AuthenticationSection.tsxindex e15e04592c..25481f8cf7 100644--- a/frontend/editor/src/portal/components/docs/AuthenticationSection.tsx+++ b/frontend/editor/src/portal/components/docs/AuthenticationSection.tsx@@ -18,13 +18,13 @@ export function AuthenticationSection() {/><div className="portal-docs__keytable"><div className="portal-docs__keyrow">- <Chip tone="green" size="sm" showDot>+ <Chip accent="success" size="sm" showDot>sk_live_</Chip><span>{t("portal.docs.authentication.liveKey")}</span></div><div className="portal-docs__keyrow">- <Chip tone="amber" size="sm" showDot>+ <Chip accent="warning" size="sm" showDot>sk_test_</Chip><span>{t("portal.docs.authentication.testKey")}</span>diff --git a/frontend/editor/src/portal/components/docs/ComponentsSection.tsx b/frontend/editor/src/portal/components/docs/ComponentsSection.tsxindex 5ad8c4b502..6bb9326ab8 100644--- a/frontend/editor/src/portal/components/docs/ComponentsSection.tsx+++ b/frontend/editor/src/portal/components/docs/ComponentsSection.tsx@@ -21,7 +21,7 @@ export function ComponentsSection({<Card key={c.name} padding="default"><div className="portal-docs__component-head"><code className="portal-docs__component-name">{c.name}</code>- <Chip tone="purple" size="sm">+ <Chip accent="premium" size="sm">{c.tag}</Chip></div>diff --git a/frontend/editor/src/portal/components/docs/DocsNav.tsx b/frontend/editor/src/portal/components/docs/DocsNav.tsxindex cbd45e7d6c..48d325e9ae 100644--- a/frontend/editor/src/portal/components/docs/DocsNav.tsx+++ b/frontend/editor/src/portal/components/docs/DocsNav.tsx@@ -1,5 +1,5 @@+import { Button, Skeleton, StatusBadge } from "@app/ui";import { useTranslation } from "react-i18next";-import { Skeleton, StatusBadge } from "@app/ui";import type { DocsNavSection } from "@portal/api/docs";/** Left-hand documentation nav tree; each leaf selects an in-page section. */@@ -31,8 +31,10 @@ export function DocsNav({const isActive = item.id === active;return (<li key={item.id}>- <button- type="button"+ <Button+ variant="tertiary"+ justify="start"+ fullWidthclassName={"portal-docs__nav-link" + (isActive ? " is-active" : "")}@@ -48,7 +50,7 @@ export function DocsNav({{item.badge}</StatusBadge>)}- </button>+ </Button></li>);})}diff --git a/frontend/editor/src/portal/components/docs/GettingStartedSection.tsx b/frontend/editor/src/portal/components/docs/GettingStartedSection.tsxindex 1f94361380..b28929005a 100644--- a/frontend/editor/src/portal/components/docs/GettingStartedSection.tsx+++ b/frontend/editor/src/portal/components/docs/GettingStartedSection.tsx@@ -56,7 +56,7 @@ export function GettingStartedSection({</li></ol>- <Card className="portal-docs__callout" accent="blue" padding="loose">+ <Card className="portal-docs__callout" accent="default" padding="loose"><strong>{t("portal.docs.quickstart.callout.label")}</strong>{" "}{t("portal.docs.quickstart.callout.bodyBeforeLink")}{" "}<em>{t("portal.docs.quickstart.callout.link")}</em>{" "}diff --git a/frontend/editor/src/portal/components/docs/PlaybooksSection.tsx b/frontend/editor/src/portal/components/docs/PlaybooksSection.tsxindex f48c90a251..10c5cdc7f6 100644--- a/frontend/editor/src/portal/components/docs/PlaybooksSection.tsx+++ b/frontend/editor/src/portal/components/docs/PlaybooksSection.tsx@@ -20,7 +20,7 @@ export function PlaybooksSection({ playbooks }: { playbooks: Playbook[] }) {<div className="portal-docs__playbook-flow">{p.steps.map((step, i) => (<span key={step} className="portal-docs__playbook-step">- <Chip size="sm" tone="neutral">+ <Chip size="sm" accent="neutral">{step}</Chip>{i < p.steps.length - 1 && (@@ -33,7 +33,7 @@ export function PlaybooksSection({ playbooks }: { playbooks: Playbook[] }) {</div>{/* TODO(backend): POST /v1/pipelines/clone-from-playbook to seed adraft pipeline from this recipe, then route to the composer. */}- <Button variant="outline" accent={p.accent} size="sm">+ <Button variant="secondary" accent={p.accent} size="sm">{t("portal.docs.recipes.cloneButton")}</Button></Card>diff --git a/frontend/editor/src/portal/components/docs/WebhooksSection.tsx b/frontend/editor/src/portal/components/docs/WebhooksSection.tsxindex ee50704a2f..84ec30a6e0 100644--- a/frontend/editor/src/portal/components/docs/WebhooksSection.tsx+++ b/frontend/editor/src/portal/components/docs/WebhooksSection.tsx@@ -25,7 +25,7 @@ export function WebhooksSection() {}}`}/>- <Card className="portal-docs__callout" accent="amber" padding="loose">+ <Card className="portal-docs__callout" accent="warning" padding="loose">{t("portal.docs.webhooks.callout.beforeSignature")}{" "}<code>Stirling-Signature</code>{" "}{t("portal.docs.webhooks.callout.beforeHelper")}{" "}diff --git a/frontend/editor/src/portal/components/editor-admin/CredentialRotationCard.tsx b/frontend/editor/src/portal/components/editor-admin/CredentialRotationCard.tsxindex a3351b0d28..c4e80c1db1 100644--- a/frontend/editor/src/portal/components/editor-admin/CredentialRotationCard.tsx+++ b/frontend/editor/src/portal/components/editor-admin/CredentialRotationCard.tsx@@ -64,8 +64,8 @@ export function CredentialRotationCard({ serviceToken }: Props) {<div className="portal-editor__panel-actions"><Button- variant="outline"- accent="amber"+ variant="secondary"+ accent="warning"loading={rotating}onClick={rotate}>diff --git a/frontend/editor/src/portal/components/editor-admin/DeploymentTargets.tsx b/frontend/editor/src/portal/components/editor-admin/DeploymentTargets.tsxindex 9920b12d03..7add4fd8b5 100644--- a/frontend/editor/src/portal/components/editor-admin/DeploymentTargets.tsx+++ b/frontend/editor/src/portal/components/editor-admin/DeploymentTargets.tsx@@ -79,10 +79,7 @@ export function DeploymentTargets({ targets, onUpgrade }: Props) {<p className="portal-editor__lock-copy">{lockCopy(target)}</p><Buttonsize="sm"- variant="outline"- accent={- target.requiresTier === "enterprise" ? "purple" : "blue"- }+ variant="secondary"onClick={onUpgrade}disabled={tier === "enterprise"}>diff --git a/frontend/editor/src/portal/components/editor-admin/InstanceHealthTable.tsx b/frontend/editor/src/portal/components/editor-admin/InstanceHealthTable.tsxindex 4cf664288d..f7923b1272 100644--- a/frontend/editor/src/portal/components/editor-admin/InstanceHealthTable.tsx+++ b/frontend/editor/src/portal/components/editor-admin/InstanceHealthTable.tsx@@ -2,6 +2,7 @@ import { useTranslation } from "react-i18next";import {Card,Chip,+ type ChipAccent,EmptyState,StatusBadge,Table,@@ -20,6 +21,13 @@ const TARGET_LABEL: Record<EditorInstance["target"], string> = {kubernetes: "K8s",};+/** Map the target palette tone onto the shared Chip accent set. */+const TARGET_CHIP_ACCENT: Record<"neutral" | "blue" | "purple", ChipAccent> = {+ neutral: "neutral",+ blue: "default",+ purple: "premium",+};+interface Props {instances: EditorInstance[];}@@ -36,7 +44,10 @@ export function InstanceHealthTable({ instances }: Props) {<div className="portal-editor__cell-stack"><span className="portal-editor__cell-strong">{i.host}</span><span className="portal-editor__cell-muted">- <Chip size="sm" tone={TARGET_META[i.target].tone}>+ <Chip+ size="sm"+ accent={TARGET_CHIP_ACCENT[TARGET_META[i.target].tone]}+ >{TARGET_LABEL[i.target]}</Chip></span>diff --git a/frontend/editor/src/portal/components/editor-admin/OfflineActivationCard.tsx b/frontend/editor/src/portal/components/editor-admin/OfflineActivationCard.tsxindex 302fe74812..ff780ea516 100644--- a/frontend/editor/src/portal/components/editor-admin/OfflineActivationCard.tsx+++ b/frontend/editor/src/portal/components/editor-admin/OfflineActivationCard.tsx@@ -30,7 +30,7 @@ export function OfflineActivationCard({ available, onUpgrade }: Props) {}return (- <Card padding="default" accent="purple" className="portal-editor__panel">+ <Card padding="default" accent="premium" className="portal-editor__panel"><div className="portal-editor__panel-head"><div><h3 className="portal-editor__panel-title">@@ -51,8 +51,8 @@ export function OfflineActivationCard({ available, onUpgrade }: Props) {{t("portal.editorAdmin.offlineActivation.lockCopy")}</p><Button- variant="outline"- accent="purple"+ variant="secondary"+ accent="premium"size="sm"onClick={onUpgrade}>@@ -75,8 +75,8 @@ export function OfflineActivationCard({ available, onUpgrade }: Props) {)}<div className="portal-editor__panel-actions"><Button- variant="outline"- accent="purple"+ variant="secondary"+ accent="premium"loading={generating}onClick={generate}>diff --git a/frontend/editor/src/portal/components/editor-admin/PairingPanel.tsx b/frontend/editor/src/portal/components/editor-admin/PairingPanel.tsxindex bde1f09aa8..6544ab1967 100644--- a/frontend/editor/src/portal/components/editor-admin/PairingPanel.tsx+++ b/frontend/editor/src/portal/components/editor-admin/PairingPanel.tsx@@ -59,8 +59,8 @@ export function PairingPanel({ pairings, onUpgrade }: Props) {</p><Buttonsize="sm"- variant="outline"- accent="purple"+ variant="secondary"+ accent="premium"onClick={onUpgrade}>{t("portal.editorAdmin.pairing.talkToSales")}@@ -77,13 +77,13 @@ export function PairingPanel({ pairings, onUpgrade }: Props) {)}<div className="portal-editor__pairing-foot">{p.expires && (- <Chip size="sm" tone="neutral">+ <Chip size="sm" accent="neutral">{p.expires}</Chip>)}<Buttonsize="sm"- variant="outline"+ variant="secondary"onClick={() => rotate(p.method)}>{rotated === p.methoddiff --git a/frontend/editor/src/portal/components/infrastructure/ApiKeyCard.tsx b/frontend/editor/src/portal/components/infrastructure/ApiKeyCard.tsxindex c1a1c8f247..58008b0837 100644--- a/frontend/editor/src/portal/components/infrastructure/ApiKeyCard.tsx+++ b/frontend/editor/src/portal/components/infrastructure/ApiKeyCard.tsx@@ -1,6 +1,6 @@import { useState } from "react";+import { Button, Card, Chip, StatusBadge } from "@app/ui";import { useTranslation } from "react-i18next";-import { Card, Chip, StatusBadge } from "@app/ui";import type { ApiKey } from "@portal/api/infrastructure";import {KEY_LABEL,@@ -13,8 +13,8 @@ export function ApiKeyCard({ apiKey }: { apiKey: ApiKey }) {const [open, setOpen] = useState(false);return (<Card padding="default" className="portal-infra__key">- <button- type="button"+ <Button+ variant="tertiary"className="portal-infra__key-head"onClick={() => setOpen((v) => !v)}aria-expanded={open}@@ -34,7 +34,7 @@ export function ApiKeyCard({ apiKey }: { apiKey: ApiKey }) {›</span></span>- </button>+ </Button>{open && (<div className="portal-infra__key-body">@@ -71,7 +71,7 @@ export function ApiKeyCard({ apiKey }: { apiKey: ApiKey }) {<dt>{t("portal.infrastructure.apiKeys.card.permissions")}</dt><dd className="portal-infra__chips">{apiKey.permissions.map((p) => (- <Chip key={p} tone="blue" size="sm">+ <Chip key={p} size="sm">{p}</Chip>))}@@ -86,7 +86,7 @@ export function ApiKeyCard({ apiKey }: { apiKey: ApiKey }) {</span>) : (apiKey.allowedIps.map((ip) => (- <Chip key={ip} tone="neutral" size="sm">+ <Chip key={ip} size="sm"><span className="portal-infra__mono">{ip}</span></Chip>))diff --git a/frontend/editor/src/portal/components/infrastructure/ApiKeysTab.tsx b/frontend/editor/src/portal/components/infrastructure/ApiKeysTab.tsxindex a41dca0d20..a93b2c0c56 100644--- a/frontend/editor/src/portal/components/infrastructure/ApiKeysTab.tsx+++ b/frontend/editor/src/portal/components/infrastructure/ApiKeysTab.tsx@@ -24,10 +24,9 @@ export function ApiKeysTab() {sub={t("portal.infrastructure.apiKeys.subheading")}/><Button- variant="gradient"size="sm"onClick={() => setModalOpen(true)}- leadingIcon={<span aria-hidden>+</span>}+ leftSection={<span aria-hidden>+</span>}>{t("portal.infrastructure.apiKeys.createKey")}</Button>diff --git a/frontend/editor/src/portal/components/infrastructure/CreateKeyModal.tsx b/frontend/editor/src/portal/components/infrastructure/CreateKeyModal.tsxindex 7e4fc0b723..613eb97377 100644--- a/frontend/editor/src/portal/components/infrastructure/CreateKeyModal.tsx+++ b/frontend/editor/src/portal/components/infrastructure/CreateKeyModal.tsx@@ -72,16 +72,17 @@ export function CreateKeyModal({}footer={created ? (- <Button variant="gradient" onClick={close}>+ <Button variant="primary" accent="premium" onClick={close}>{t("portal.infrastructure.createKey.done")}</Button>) : (<div className="portal-infra__modal-actions">- <Button variant="ghost" onClick={close}>+ <Button variant="tertiary" onClick={close}>{t("portal.infrastructure.createKey.cancel")}</Button><Button- variant="gradient"+ variant="primary"+ accent="premium"disabled={name.trim() === "" || perms.length === 0}onClick={createKey}>diff --git a/frontend/editor/src/portal/components/infrastructure/DeploymentsTab.tsx b/frontend/editor/src/portal/components/infrastructure/DeploymentsTab.tsxindex 9c2037b13f..18967c2aaa 100644--- a/frontend/editor/src/portal/components/infrastructure/DeploymentsTab.tsx+++ b/frontend/editor/src/portal/components/infrastructure/DeploymentsTab.tsx@@ -141,11 +141,11 @@ export function DeploymentsTab() {header: t("portal.infrastructure.deployments.deployColumns.environment"),render: (d) => (<Chip- tone={+ accent={d.environment === "production"- ? "blue"+ ? "default": d.environment === "canary"- ? "purple"+ ? "premium": "neutral"}size="sm"diff --git a/frontend/editor/src/portal/components/infrastructure/ModelsTab.tsx b/frontend/editor/src/portal/components/infrastructure/ModelsTab.tsxindex c6ba26d4b1..56f0583cdb 100644--- a/frontend/editor/src/portal/components/infrastructure/ModelsTab.tsx+++ b/frontend/editor/src/portal/components/infrastructure/ModelsTab.tsx@@ -46,7 +46,7 @@ export function ModelsTab() {render: (m) => (<div className="portal-infra__cell-stack"><span className="portal-infra__cell-strong">{m.name}</span>- <Chip tone="neutral" size="sm">+ <Chip accent="neutral" size="sm">{MODEL_PROVIDER_LABEL[m.provider]}</Chip></div>@@ -56,7 +56,7 @@ export function ModelsTab() {key: "type",header: t("portal.infrastructure.models.columns.type"),render: (m) => (- <Chip tone={MODEL_TYPE_TONE[m.type]} size="sm">+ <Chip accent={MODEL_TYPE_TONE[m.type]} size="sm">{MODEL_TYPE_LABEL[m.type]}</Chip>),@@ -134,7 +134,7 @@ export function ModelsTab() {<div className="portal-infra__cell-stack"><span className="portal-infra__cell-strong">{r.operation}</span>{r.isDefault && (- <Chip tone="blue" size="sm">+ <Chip accent="default" size="sm">{t("portal.infrastructure.models.routingColumns.default")}</Chip>)}diff --git a/frontend/editor/src/portal/components/infrastructure/SecurityTab.tsx b/frontend/editor/src/portal/components/infrastructure/SecurityTab.tsxindex 457313eb29..0d299d7032 100644--- a/frontend/editor/src/portal/components/infrastructure/SecurityTab.tsx+++ b/frontend/editor/src/portal/components/infrastructure/SecurityTab.tsx@@ -191,7 +191,7 @@ export function SecurityTab() {{/* Rotation is a privileged backend action; disabled where Stirlingholds the keys (managed tiers can't rotate customer keys). */}<Button- variant="outline"+ variant="secondary"size="sm"disabled={!data.keyManagement.customerManaged}onClick={() => {@@ -286,9 +286,7 @@ export function SecurityTab() {{ATTESTATION_LABEL[a.status]}</StatusBadge></div>- <Chip tone="neutral" size="sm">- {a.framework}- </Chip>+ <Chip size="sm">{a.framework}</Chip><p className="portal-infra__cert-detail">{a.detail}</p>{a.reportUrl ? (<adiff --git a/frontend/editor/src/portal/components/infrastructure/StorageTab.tsx b/frontend/editor/src/portal/components/infrastructure/StorageTab.tsxindex 7b2ecaa441..a1f3b91869 100644--- a/frontend/editor/src/portal/components/infrastructure/StorageTab.tsx+++ b/frontend/editor/src/portal/components/infrastructure/StorageTab.tsx@@ -166,7 +166,7 @@ export function StorageTab() {) : (// TODO(backend): launch the provider OAuth/credential flow,// then POST /v1/infrastructure/storage/providers/{id}/connect- <Button variant="outline" size="sm">+ <Button variant="secondary" size="sm">{t("portal.infrastructure.storage.providers.connect")}</Button>)}diff --git a/frontend/editor/src/portal/components/infrastructure/infraFormat.ts b/frontend/editor/src/portal/components/infrastructure/infraFormat.tsindex 43980b4dba..2cf7c2e028 100644--- a/frontend/editor/src/portal/components/infrastructure/infraFormat.ts+++ b/frontend/editor/src/portal/components/infrastructure/infraFormat.ts@@ -1,4 +1,4 @@-import type { ChipTone, StatusTone } from "@app/ui";+import type { ChipAccent, StatusTone } from "@app/ui";import type {ApiKeyStatus,AttestationStatus,@@ -135,11 +135,11 @@ export const MODEL_TYPE_LABEL: Record<ModelType, string> = {llm: "LLM",};-export const MODEL_TYPE_TONE: Record<ModelType, ChipTone> = {- extraction: "blue",- classification: "purple",- ocr: "green",- llm: "amber",+export const MODEL_TYPE_TONE: Record<ModelType, ChipAccent> = {+ extraction: "default",+ classification: "premium",+ ocr: "success",+ llm: "warning",};export const MODEL_PROVIDER_LABEL: Record<ModelProvider, string> = {diff --git a/frontend/editor/src/portal/components/pipelines/PipelineComposer.tsx b/frontend/editor/src/portal/components/pipelines/PipelineComposer.tsxindex 5040a97ac0..fe0546a606 100644--- a/frontend/editor/src/portal/components/pipelines/PipelineComposer.tsx+++ b/frontend/editor/src/portal/components/pipelines/PipelineComposer.tsx@@ -1,6 +1,7 @@import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";import {+ ActionIcon,Banner,Button,Checkbox,@@ -280,7 +281,7 @@ export function PipelineComposer({footer={<div className="portal-pipelines__composer-footer"><Button- variant="ghost"+ variant="tertiary"size="sm"disabled={submitting}onClick={onClose}@@ -397,29 +398,29 @@ export function PipelineComposer({{humanizeOperation(step.operation)}</span><div className="portal-pipelines__chain-actions">- <button+ <ActionIcontype="button"aria-label={t("portal.pipelines.composer.moveUp")}disabled={i === 0}onClick={() => moveStep(i, -1)}>↑- </button>- <button+ </ActionIcon>+ <ActionIcontype="button"aria-label={t("portal.pipelines.composer.moveDown")}disabled={i === steps.length - 1}onClick={() => moveStep(i, 1)}>↓- </button>- <button+ </ActionIcon>+ <ActionIcontype="button"aria-label={t("portal.pipelines.composer.removeStep")}onClick={() => removeStep(i)}>×- </button>+ </ActionIcon></div></li>))}@@ -429,7 +430,7 @@ export function PipelineComposer({{PIPELINE_OPERATIONS.map((op) => (<Chipkey={op.operation}- tone="blue"+ accent="default"size="sm"onClick={() => addStep(op.operation, op.parameters)}>diff --git a/frontend/editor/src/portal/components/pipelines/PipelineDetailCard.tsx b/frontend/editor/src/portal/components/pipelines/PipelineDetailCard.tsxindex 6bfc39d510..ea72ddfc53 100644--- a/frontend/editor/src/portal/components/pipelines/PipelineDetailCard.tsx+++ b/frontend/editor/src/portal/components/pipelines/PipelineDetailCard.tsx@@ -1,6 +1,6 @@import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Banner, Button, Chip } from "@app/ui";+import { ActionIcon, Banner, Button, Chip } from "@app/ui";import { errorMessage } from "@portal/api/http";import {fetchRun,@@ -116,14 +116,14 @@ export function PipelineDetailCard({})}</span></div>- <button+ <ActionIcontype="button"className="portal-pipelines__expanded-close"onClick={onClose}aria-label={t("portal.pipelines.detail.closeAriaLabel")}>×- </button>+ </ActionIcon></header><div className="portal-pipelines__detail">@@ -138,7 +138,7 @@ export function PipelineDetailCard({) : (<div className="portal-pipelines__chips">{pipeline.steps.map((step, i) => (- <Chip key={`${step}-${i}`} tone="blue" size="sm">+ <Chip key={`${step}-${i}`} size="sm">{`${i + 1}. ${humanizeOperation(step)}`}</Chip>))}@@ -157,7 +157,7 @@ export function PipelineDetailCard({) : (<div className="portal-pipelines__chips">{pipeline.sources.map((source) => (- <Chip key={source.id} tone="neutral" size="sm">+ <Chip key={source.id} accent="neutral" size="sm">{source.name}</Chip>))}@@ -169,7 +169,7 @@ export function PipelineDetailCard({<span className="portal-pipelines__detail-heading">{t("portal.pipelines.detail.output")}</span>- <Chip tone="purple" size="sm">+ <Chip accent="premium" size="sm">{t(`portal.pipelines.output.${pipeline.output}`, {defaultValue: pipeline.output,})}@@ -186,14 +186,14 @@ export function PipelineDetailCard({{t("portal.pipelines.detail.run")}</Button><Button- variant="outline"+ variant="secondary"disabled={busy || running}onClick={() => onEdit(pipeline)}>{t("portal.pipelines.detail.edit")}</Button><Button- variant="outline"+ variant="secondary"disabled={busy || running}onClick={() => onTogglePause(pipeline)}>@@ -202,8 +202,8 @@ export function PipelineDetailCard({: t("portal.pipelines.detail.pause")}</Button><Button- accent="red"- variant="outline"+ accent="danger"+ variant="secondary"disabled={busy || running}onClick={() => onDelete(pipeline)}>diff --git a/frontend/editor/src/portal/components/pipelines/PipelinesTable.tsx b/frontend/editor/src/portal/components/pipelines/PipelinesTable.tsxindex a39f1c5e95..d2fda82fdc 100644--- a/frontend/editor/src/portal/components/pipelines/PipelinesTable.tsx+++ b/frontend/editor/src/portal/components/pipelines/PipelinesTable.tsx@@ -39,7 +39,7 @@ export function PipelinesTable({</span><div className="portal-pipelines__name-text"><strong>{p.name}</strong>- <Chip tone="neutral" size="sm">+ <Chip accent="neutral" size="sm">{t(`portal.pipelines.trigger.${p.trigger}`, {defaultValue: p.trigger,})}diff --git a/frontend/editor/src/portal/components/policies/PolicyCategoryCard.tsx b/frontend/editor/src/portal/components/policies/PolicyCategoryCard.tsxindex 21aef179a1..3ec4a72f78 100644--- a/frontend/editor/src/portal/components/policies/PolicyCategoryCard.tsx+++ b/frontend/editor/src/portal/components/policies/PolicyCategoryCard.tsx@@ -50,7 +50,7 @@ export function PolicyCategoryCard({ entry, onOpen }: PolicyCategoryCardProps) {</div>{comingSoon ? (- <Chip tone="neutral" size="sm">+ <Chip accent="neutral" size="sm">{t("portal.policies.card.comingSoon")}</Chip>) : policy ? (@@ -82,7 +82,7 @@ export function PolicyCategoryCard({ entry, onOpen }: PolicyCategoryCardProps) {</StatusBadge></div>) : (- <Chip tone="blue" size="sm">+ <Chip accent="default" size="sm">{t("portal.policies.card.notSetUp")}</Chip>)}diff --git a/frontend/editor/src/portal/components/policies/PolicyDetailPanel.tsx b/frontend/editor/src/portal/components/policies/PolicyDetailPanel.tsxindex fd10a0a8d6..d638cc4b7a 100644--- a/frontend/editor/src/portal/components/policies/PolicyDetailPanel.tsx+++ b/frontend/editor/src/portal/components/policies/PolicyDetailPanel.tsx@@ -84,15 +84,16 @@ function ActivityError({ message }: { message: string }) {>{message}</span>- <button+ <Buttontype="button"+ variant="quiet"className="portal-policies__link portal-policies__activity-error-toggle"onClick={() => setExpanded((v) => !v)}>{expanded? t("portal.policies.detail.showLess"): t("portal.policies.detail.showMore")}- </button>+ </Button></span>);}@@ -139,8 +140,8 @@ export function PolicyDetailPanel({<div className="portal-policies__detail-foot">{canDelete && (<Button- variant="ghost"- accent="red"+ variant="tertiary"+ accent="danger"size="sm"onClick={onDelete}disabled={busy}@@ -151,7 +152,7 @@ export function PolicyDetailPanel({)}{onRun && (<Button- variant="outline"+ variant="secondary"size="sm"onClick={onRun}disabled={busy}@@ -161,7 +162,7 @@ export function PolicyDetailPanel({</Button>)}<Button- variant="outline"+ variant="secondary"size="sm"onClick={onTogglePause}disabled={busy}@@ -278,13 +279,14 @@ export function PolicyDetailPanel({{item.time}</span>{item.status === "flagged" && onRetry && (- <button+ <Buttontype="button"+ variant="quiet"className="portal-policies__link portal-policies__activity-retry"onClick={() => onRetry(item)}>{t("portal.policies.detail.retry")}- </button>+ </Button>)}</div>))}diff --git a/frontend/editor/src/portal/components/policies/PolicyFieldRow.tsx b/frontend/editor/src/portal/components/policies/PolicyFieldRow.tsxindex 4024cce5e3..bad56b0541 100644--- a/frontend/editor/src/portal/components/policies/PolicyFieldRow.tsx+++ b/frontend/editor/src/portal/components/policies/PolicyFieldRow.tsx@@ -45,7 +45,7 @@ export function PolicyFieldRow({{(field.options ?? []).map((opt) => (<Chipkey={opt}- tone={selected.includes(opt) ? "blue" : "neutral"}+ accent={selected.includes(opt) ? "default" : "neutral"}size="sm"onClick={() => toggle(opt)}>diff --git a/frontend/editor/src/portal/components/policies/PolicySetupWizard.tsx b/frontend/editor/src/portal/components/policies/PolicySetupWizard.tsxindex 96a9d377f2..13f0dab8ac 100644--- a/frontend/editor/src/portal/components/policies/PolicySetupWizard.tsx+++ b/frontend/editor/src/portal/components/policies/PolicySetupWizard.tsx@@ -251,7 +251,7 @@ function PolicySetupWizardBody({subtitle={config.summary}footer={<div className="portal-policies__wizard-foot">- <Button variant="ghost" size="sm" onClick={onClose}>+ <Button variant="tertiary" size="sm" onClick={onClose}>{t("portal.policies.wizard.actions.cancel")}</Button>{step === "workflow" ? (@@ -265,7 +265,7 @@ function PolicySetupWizardBody({) : (<><Button- variant="outline"+ variant="secondary"size="sm"style={{ marginLeft: "auto" }}onClick={() => setStep("workflow")}@@ -367,9 +367,10 @@ function PolicySetupWizardBody({/>) : (availableSources.map((src) => (- <button+ <Buttonkey={src.id}type="button"+ variant="quiet"className={"portal-policies__source" +(sources.includes(src.id)@@ -389,7 +390,7 @@ function PolicySetupWizardBody({{src.type}</span></span>- </button>+ </Button>)))}</div>@@ -413,22 +414,23 @@ function PolicySetupWizardBody({count: scopeTypes.length,})}</span>- <button+ <Buttontype="button"+ variant="quiet"className="portal-policies__link"onClick={() => setScopeNarrow((v) => !v)}>{scopeNarrow? t("portal.policies.wizard.docTypes.clear"): t("portal.policies.wizard.docTypes.narrow")}- </button>+ </Button></div>{scopeNarrow && (<div className="portal-policies__doctypes">{POLICY_DOC_TYPES.map((dt) => (<Chipkey={dt}- tone={scopeTypes.includes(dt) ? "blue" : "neutral"}+ accent={scopeTypes.includes(dt) ? "default" : "neutral"}size="sm"onClick={() => toggleScopeType(dt)}>diff --git a/frontend/editor/src/portal/components/procurement/ActionModal.tsx b/frontend/editor/src/portal/components/procurement/ActionModal.tsxindex e05ee15fbf..0a74f71370 100644--- a/frontend/editor/src/portal/components/procurement/ActionModal.tsx+++ b/frontend/editor/src/portal/components/procurement/ActionModal.tsx@@ -124,12 +124,12 @@ export function ActionModal({subtitle={copy.subtitle}footer={<div className="portal-proc__modal-actions">- <Button variant="ghost" onClick={onClose}>+ <Button variant="tertiary" onClick={onClose}>{t("portal.procurement.modal.cancel")}</Button><Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"loading={submitting}disabled={needsFile && !file}onClick={submit}@@ -150,7 +150,7 @@ export function ActionModal({onChange={(e) => setFile(e.target.files?.[0] ?? null)}/><Button- variant="outline"+ variant="secondary"size="sm"onClick={() => fileRef.current?.click()}>diff --git a/frontend/editor/src/portal/components/procurement/DealJourney.tsx b/frontend/editor/src/portal/components/procurement/DealJourney.tsxindex 96588f3c21..6e01d5c0f7 100644--- a/frontend/editor/src/portal/components/procurement/DealJourney.tsx+++ b/frontend/editor/src/portal/components/procurement/DealJourney.tsx@@ -85,8 +85,8 @@ export function DealJourney({</div>{!isTerminal && currentStep && (<Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"loading={advancing}onClick={() => onAdvance(currentStage)}>diff --git a/frontend/editor/src/portal/components/procurement/DealStatusHero.tsx b/frontend/editor/src/portal/components/procurement/DealStatusHero.tsxindex 296ccc1a52..730fb768ec 100644--- a/frontend/editor/src/portal/components/procurement/DealStatusHero.tsx+++ b/frontend/editor/src/portal/components/procurement/DealStatusHero.tsx@@ -143,8 +143,8 @@ export function DealStatusHero({</span><div className="portal-hero__next-actions"><Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"loading={busy}onClick={onExpand}>diff --git a/frontend/editor/src/portal/components/procurement/DocRow.tsx b/frontend/editor/src/portal/components/procurement/DocRow.tsxindex ff6d27716e..b4329fbfa4 100644--- a/frontend/editor/src/portal/components/procurement/DocRow.tsx+++ b/frontend/editor/src/portal/components/procurement/DocRow.tsx@@ -10,15 +10,15 @@ import {/** Maps a document's action to the button accent + variant. */function buttonStyle(doc: LedgerDoc): {- variant: "gradient" | "outline";- accent: "purple" | "blue";+ variant: "primary" | "secondary";+ accent: "premium" | "default";} {// The agreement signature and online payment are the deal-advancing actions;- // give them the filled accent CTA. Everything else is a quieter outline.+ // give them the filled premium CTA. Everything else is a quieter outline.if (doc.action === "sign" || doc.action === "pay") {- return { variant: "gradient", accent: "purple" };+ return { variant: "primary", accent: "premium" };}- return { variant: "outline", accent: "blue" };+ return { variant: "secondary", accent: "default" };}/**@@ -52,12 +52,12 @@ export function DocRow({<div className="portal-proc__doc-name-row"><span className="portal-proc__doc-name">{doc.name}</span>{doc.optional && (- <Chip tone="neutral" size="sm">+ <Chip accent="neutral" size="sm">{t("portal.procurement.docs.optional")}</Chip>)}{doc.fee !== undefined && (- <Chip tone="amber" size="sm">+ <Chip accent="warning" size="sm">{t("portal.procurement.docs.paidAddon")}</Chip>)}diff --git a/frontend/editor/src/portal/components/procurement/DocumentLedger.tsx b/frontend/editor/src/portal/components/procurement/DocumentLedger.tsxindex 69333325e8..8189d006f8 100644--- a/frontend/editor/src/portal/components/procurement/DocumentLedger.tsx+++ b/frontend/editor/src/portal/components/procurement/DocumentLedger.tsx@@ -81,12 +81,12 @@ export function DocumentLedger({<span className="portal-proc__stage-hint">· {blurb}</span>)}{cur && (- <Chip tone="purple" size="sm">+ <Chip accent="premium" size="sm">{t("portal.procurement.docs.here")}</Chip>)}{done && (- <Chip tone="green" size="sm">+ <Chip accent="success" size="sm">{t("portal.procurement.docs.done")}</Chip>)}diff --git a/frontend/editor/src/portal/components/procurement/LockedState.tsx b/frontend/editor/src/portal/components/procurement/LockedState.tsxindex 90a61c987a..8e70ba18c4 100644--- a/frontend/editor/src/portal/components/procurement/LockedState.tsx+++ b/frontend/editor/src/portal/components/procurement/LockedState.tsx@@ -23,7 +23,7 @@ export function LockedState({title={t("portal.procurement.locked.title")}description={t("portal.procurement.locked.description")}actions={- <Button variant="gradient" accent="purple" onClick={onTalkToSales}>+ <Button variant="primary" accent="premium" onClick={onTalkToSales}>{t("portal.procurement.locked.talkToSales")}</Button>}diff --git a/frontend/editor/src/portal/components/procurement/ProcurementAgreement.tsx b/frontend/editor/src/portal/components/procurement/ProcurementAgreement.tsxindex bd00a93904..640fcdb2e3 100644--- a/frontend/editor/src/portal/components/procurement/ProcurementAgreement.tsx+++ b/frontend/editor/src/portal/components/procurement/ProcurementAgreement.tsx@@ -112,8 +112,8 @@ export function ProcurementAgreement({<div className="portal-proc__payment-actions"><Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"loading={busy}disabled={!checked}onClick={onAgree}diff --git a/frontend/editor/src/portal/components/procurement/ProcurementExtras.tsx b/frontend/editor/src/portal/components/procurement/ProcurementExtras.tsxindex ce6620da78..d1f13ca0ee 100644--- a/frontend/editor/src/portal/components/procurement/ProcurementExtras.tsx+++ b/frontend/editor/src/portal/components/procurement/ProcurementExtras.tsx@@ -276,8 +276,8 @@ export function TrialManageModal({{t("portal.procurement.trial.cancel")}</button><Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"loading={busy}disabled={maxed}onClick={onExtend}diff --git a/frontend/editor/src/portal/components/procurement/ProcurementHome.tsx b/frontend/editor/src/portal/components/procurement/ProcurementHome.tsxindex a10057a3d8..3c0498b71b 100644--- a/frontend/editor/src/portal/components/procurement/ProcurementHome.tsx+++ b/frontend/editor/src/portal/components/procurement/ProcurementHome.tsx@@ -164,8 +164,8 @@ export function ProcurementHome({ autoOpen = false }: { autoOpen?: boolean }) {</p></div><Button- variant="outline"- accent="blue"+ variant="secondary"+ accent="default"loading={busy}disabled={!isLinked}onClick={onStartTrial}@@ -201,8 +201,8 @@ export function ProcurementHome({ autoOpen = false }: { autoOpen?: boolean }) {description={t("portal.procurement.link.description")}actions={<Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"onClick={() => openLinkModal()}>{t("portal.procurement.link.cta")}diff --git a/frontend/editor/src/portal/components/procurement/ProcurementModal.stories.tsx b/frontend/editor/src/portal/components/procurement/ProcurementModal.stories.tsxindex 7074e390e7..6c57c501c7 100644--- a/frontend/editor/src/portal/components/procurement/ProcurementModal.stories.tsx+++ b/frontend/editor/src/portal/components/procurement/ProcurementModal.stories.tsx@@ -31,10 +31,10 @@ export const Open: Story = {contract and go live.</p><div style={{ display: "flex", gap: "0.6rem" }}>- <Button variant="gradient" accent="purple">+ <Button variant="primary" accent="premium">Continue to checkout</Button>- <Button variant="outline">Edit quote</Button>+ <Button variant="secondary">Edit quote</Button></div></Card>),diff --git a/frontend/editor/src/portal/components/procurement/ProcurementStages.tsx b/frontend/editor/src/portal/components/procurement/ProcurementStages.tsxindex fdebad61f6..174ed91154 100644--- a/frontend/editor/src/portal/components/procurement/ProcurementStages.tsx+++ b/frontend/editor/src/portal/components/procurement/ProcurementStages.tsx@@ -72,17 +72,17 @@ export function QuoteMilestoneCard({</div><div className="portal-proc__payment-actions"><Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"loading={busy}onClick={onAccept}>{t("portal.procurement.milestone.accept")}</Button>- <Button variant="outline" loading={downloading} onClick={onDownload}>+ <Button variant="secondary" loading={downloading} onClick={onDownload}>{t("portal.procurement.milestone.download")}</Button>- <Button variant="ghost" onClick={onEdit}>+ <Button variant="tertiary" onClick={onEdit}>{t("portal.procurement.milestone.edit")}</Button></div>@@ -115,8 +115,8 @@ export function PaymentStageCard({<div className="portal-proc__payment-actions">{invoiceUrl && (<Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"onClick={() => window.open(invoiceUrl, "_blank", "noopener")}>{t("portal.procurement.payment.viewInvoice")}@@ -124,7 +124,7 @@ export function PaymentStageCard({)}{invoicePdf && (<Button- variant="outline"+ variant="secondary"onClick={() => window.open(invoicePdf, "_blank", "noopener")}>{t("portal.procurement.payment.downloadInvoice")}diff --git a/frontend/editor/src/portal/components/procurement/QuoteBuilder.tsx b/frontend/editor/src/portal/components/procurement/QuoteBuilder.tsxindex b180c986bf..d13aaaff06 100644--- a/frontend/editor/src/portal/components/procurement/QuoteBuilder.tsx+++ b/frontend/editor/src/portal/components/procurement/QuoteBuilder.tsx@@ -283,14 +283,14 @@ export function QuoteBuilder({</span><div className="portal-qb__foot-btns">{step > 0 && (- <Button variant="outline" onClick={() => setStep(step - 1)}>+ <Button variant="secondary" onClick={() => setStep(step - 1)}>{t("portal.procurement.builder.back")}</Button>)}{step === 0 && (<Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"disabled={cfg.volume <= 0}onClick={() => setStep(1)}>@@ -299,8 +299,8 @@ export function QuoteBuilder({)}{step === 1 && (<Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"onClick={() => setStep(2)}>{t("portal.procurement.builder.continue")}@@ -308,8 +308,8 @@ export function QuoteBuilder({)}{step === 2 && (<Button- variant="gradient"- accent="purple"+ variant="primary"+ accent="premium"loading={busy}disabled={!eula}onClick={generate}diff --git a/frontend/editor/src/portal/components/sources/ConnectWizard.tsx b/frontend/editor/src/portal/components/sources/ConnectWizard.tsxindex 2c6e9263b7..afb3982545 100644--- a/frontend/editor/src/portal/components/sources/ConnectWizard.tsx+++ b/frontend/editor/src/portal/components/sources/ConnectWizard.tsx@@ -153,7 +153,7 @@ export function ConnectWizard({footer={<div className="portal-sources__wizard-footer"><Button- variant="ghost"+ variant="tertiary"size="sm"disabled={submitting}onClick={() =>@@ -169,7 +169,7 @@ export function ConnectWizard({onClick={advance}loading={submitting}disabled={!canContinue}- trailingIcon={!isLast ? <span aria-hidden>→</span> : undefined}+ rightSection={!isLast ? <span aria-hidden>→</span> : undefined}>{!isLast? t("portal.sources.wizard.continue")@@ -200,9 +200,9 @@ export function ConnectWizard({{stepId === "type" && (<div className="portal-sources__type-grid">{CREATABLE_SOURCE_TYPES.map((ct) => (- <button+ <Buttonkey={ct.type}- type="button"+ variant="tertiary"className={"portal-sources__type-card" +(type.type === ct.type ? " is-selected" : "")@@ -215,7 +215,7 @@ export function ConnectWizard({<span className="portal-sources__type-name">{t(ct.labelKey)}</span>- </button>+ </Button>))}</div>)}diff --git a/frontend/editor/src/portal/components/sources/SourceDetailCard.tsx b/frontend/editor/src/portal/components/sources/SourceDetailCard.tsxindex e1ab6a3503..ca659ec9d5 100644--- a/frontend/editor/src/portal/components/sources/SourceDetailCard.tsx+++ b/frontend/editor/src/portal/components/sources/SourceDetailCard.tsx@@ -1,9 +1,10 @@import { useTranslation } from "react-i18next";-import { Button } from "@app/ui";+import { ActionIcon, Button } from "@app/ui";import type { SourceView } from "@portal/api/sources";import { SourceDetailPanel } from "@portal/components/sources/SourceDetailPanel";import { sourceTypeMeta } from "@portal/components/sources/sourceTypes";import "@portal/views/Sources.css";+import CloseIcon from "@mui/icons-material/Close";interface SourceDetailCardProps {source: SourceView;@@ -33,7 +34,7 @@ export function SourceDetailCard({<section className="portal-sources__expanded"><header className="portal-sources__expanded-head"><span- className={`portal-sources__type-dot portal-sources__type-dot--${meta.tone}`}+ className={`portal-sources__type-dot portal-sources__type-dot--${meta.accent}`}aria-hidden>{meta.icon}@@ -47,28 +48,28 @@ export function SourceDetailCard({})}</span></div>- <button- type="button"+ <ActionIcon+ variant="tertiary"className="portal-sources__expanded-close"onClick={onClose}aria-label={t("portal.sources.detail.closeAriaLabel")}>- ×- </button>+ <CloseIcon />+ </ActionIcon></header><SourceDetailPanel source={source} docSeries={docSeries} /><div className="portal-sources__detail-actions"><Button- variant="outline"+ variant="secondary"disabled={busy}onClick={() => onEdit(source)}>{t("portal.sources.detail.edit")}</Button><Button- variant="outline"+ variant="secondary"disabled={busy}onClick={() => onTogglePause(source)}>@@ -77,8 +78,8 @@ export function SourceDetailCard({: t("portal.sources.detail.pause")}</Button><Button- accent="red"- variant="outline"+ accent="danger"+ variant="secondary"disabled={busy}onClick={() => onDelete(source)}>diff --git a/frontend/editor/src/portal/components/sources/SourceDetailPanel.tsx b/frontend/editor/src/portal/components/sources/SourceDetailPanel.tsxindex 836d72ba81..f4ee827575 100644--- a/frontend/editor/src/portal/components/sources/SourceDetailPanel.tsx+++ b/frontend/editor/src/portal/components/sources/SourceDetailPanel.tsx@@ -41,7 +41,7 @@ export function SourceDetailPanel({) : (<div className="portal-sources__chips">{source.referencingPolicies.map((policy) => (- <Chip key={policy.id} tone="blue" size="sm">+ <Chip key={policy.id} size="sm">{policy.name}</Chip>))}diff --git a/frontend/editor/src/portal/components/sources/SourcesTable.tsx b/frontend/editor/src/portal/components/sources/SourcesTable.tsxindex 45ca391575..be66fa350e 100644--- a/frontend/editor/src/portal/components/sources/SourcesTable.tsx+++ b/frontend/editor/src/portal/components/sources/SourcesTable.tsx@@ -40,14 +40,14 @@ export function SourcesTable({return (<div className="portal-sources__name-cell"><span- className={`portal-sources__type-dot portal-sources__type-dot--${meta.tone}`}+ className={`portal-sources__type-dot portal-sources__type-dot--${meta.accent}`}aria-hidden>{meta.icon}</span><div className="portal-sources__name-text"><strong>{s.name}</strong>- <Chip tone={meta.tone} size="sm">+ <Chip accent={meta.accent} size="sm">{t(meta.labelKey)}</Chip></div>diff --git a/frontend/editor/src/portal/components/sources/sourceTypes.ts b/frontend/editor/src/portal/components/sources/sourceTypes.tsindex 59fb91fcd2..f3e128ef55 100644--- a/frontend/editor/src/portal/components/sources/sourceTypes.ts+++ b/frontend/editor/src/portal/components/sources/sourceTypes.ts@@ -1,4 +1,4 @@-import type { ChipTone } from "@app/ui";+import type { ChipAccent } from "@app/ui";/*** Per-type presentation + create-form metadata. User-facing copy is stored as@@ -12,26 +12,26 @@ import type { ChipTone } from "@app/ui";export interface SourceTypeMeta {labelKey: string;icon: string;- tone: ChipTone;+ accent: ChipAccent;}const SOURCE_TYPE_META: Record<string, SourceTypeMeta> = {folder: {labelKey: "portal.sources.types.folder.label",icon: "⛁",- tone: "blue",+ accent: "default",},editor: {labelKey: "portal.sources.types.editor.label",icon: "✏",- tone: "green",+ accent: "success",},};const UNKNOWN_TYPE_META: SourceTypeMeta = {labelKey: "portal.sources.types.unknown.label",icon: "◇",- tone: "neutral",+ accent: "neutral",};export function sourceTypeMeta(type: string): SourceTypeMeta {diff --git a/frontend/editor/src/portal/components/users/AccessControls.tsx b/frontend/editor/src/portal/components/users/AccessControls.tsxindex d45d43bbaf..9744e13141 100644--- a/frontend/editor/src/portal/components/users/AccessControls.tsx+++ b/frontend/editor/src/portal/components/users/AccessControls.tsx@@ -142,7 +142,7 @@ export function AccessControls({ access }: AccessControlsProps) {value={access.sso.domains.join(", ") || "—"}/></div>- <Button variant="ghost" size="sm">+ <Button variant="tertiary" size="sm">{t("portal.users.access.sso.manage")}</Button></Card>@@ -188,7 +188,7 @@ export function AccessControls({ access }: AccessControlsProps) {title={t("portal.users.access.upgrade.title")}description={access.upgradeHint}action={- <Button size="sm" accent="purple">+ <Button size="sm" accent="premium">{t("portal.users.access.upgrade.action")}</Button>}diff --git a/frontend/editor/src/portal/components/users/InviteMemberModal.tsx b/frontend/editor/src/portal/components/users/InviteMemberModal.tsxindex ad98077ba4..fe90105cf5 100644--- a/frontend/editor/src/portal/components/users/InviteMemberModal.tsx+++ b/frontend/editor/src/portal/components/users/InviteMemberModal.tsx@@ -60,7 +60,7 @@ export function InviteMemberModal({ open, onClose }: InviteMemberModalProps) {subtitle={t("portal.users.invite.subtitle")}footer={<div className="portal-users__modal-footer">- <Button variant="ghost" size="sm" onClick={close}>+ <Button variant="tertiary" size="sm" onClick={close}>{t("portal.users.invite.cancel")}</Button><Button size="sm" onClick={submit} disabled={touched && !emailValid}>diff --git a/frontend/editor/src/portal/components/users/MembersTable.tsx b/frontend/editor/src/portal/components/users/MembersTable.tsxindex deda005d1f..6a918813b5 100644--- a/frontend/editor/src/portal/components/users/MembersTable.tsx+++ b/frontend/editor/src/portal/components/users/MembersTable.tsx@@ -1,15 +1,24 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";import { Menu } from "@mantine/core";-import { Avatar, Chip, StatusBadge, Table, type TableColumn } from "@app/ui";+import {+ ActionIcon,+ Avatar,+ Chip,+ StatusBadge,+ Table,+ type TableColumn,+} from "@app/ui";import {type Member,type RoleId,MEMBER_STATUS_TONE,ROLE_LABEL,- ROLE_TONE,} from "@portal/api/users";-import { avatarToneForRole } from "@portal/components/users/format";+import {+ avatarToneForRole,+ chipAccentForRole,+} from "@portal/components/users/format";import "@portal/views/Users.css";interface MembersTableProps {@@ -57,7 +66,7 @@ export function MembersTable({key: "role",header: t("portal.users.table.role"),render: (m) => (- <Chip tone={ROLE_TONE[m.role]} size="sm">+ <Chip accent={chipAccentForRole(m.role)} size="sm">{ROLE_LABEL[m.role]}</Chip>),@@ -92,16 +101,16 @@ export function MembersTable({// a row-action menu needs; SUI has no equivalent.<Menu position="bottom-end" withinPortal shadow="md" width={200}><Menu.Target>- <button- type="button"+ <ActionIconclassName="portal-users__row-action"aria-label={t("portal.users.table.actionsFor", {name: m.name,})}onClick={(e) => e.stopPropagation()}+ variant="tertiary">⋯- </button>+ </ActionIcon></Menu.Target><Menu.Dropdown><Menu.Label>{t("portal.users.table.changeRole")}</Menu.Label>diff --git a/frontend/editor/src/portal/components/users/RolesGrid.tsx b/frontend/editor/src/portal/components/users/RolesGrid.tsxindex 522c264e82..24527f35be 100644--- a/frontend/editor/src/portal/components/users/RolesGrid.tsx+++ b/frontend/editor/src/portal/components/users/RolesGrid.tsx@@ -1,6 +1,7 @@import { useTranslation } from "react-i18next";import { Card, Chip } from "@app/ui";import type { Role } from "@portal/api/users";+import { chipAccentForRole } from "@portal/components/users/format";import "@portal/views/Users.css";interface RolesGridProps {@@ -24,7 +25,7 @@ export function RolesGrid({ roles }: RolesGridProps) {{roles.map((role) => (<Card key={role.id} padding="default" className="portal-users__role"><div className="portal-users__role-head">- <Chip tone={role.tone} size="sm">+ <Chip accent={chipAccentForRole(role.id)} size="sm">{role.label}</Chip></div>diff --git a/frontend/editor/src/portal/components/users/format.ts b/frontend/editor/src/portal/components/users/format.tsindex 4dff015986..3308a6441d 100644--- a/frontend/editor/src/portal/components/users/format.ts+++ b/frontend/editor/src/portal/components/users/format.ts@@ -1,7 +1,24 @@-import type { AvatarTone } from "@app/ui";+import type { AvatarTone, ChipAccent } from "@app/ui";import type { RoleId } from "@portal/api/users";import { ROLE_TONE } from "@portal/api/users";+/** Map the role palette onto the shared Chip accent set. */+const ROLE_CHIP_ACCENT: Record<+ "purple" | "blue" | "green" | "amber" | "neutral",+ ChipAccent+> = {+ purple: "premium",+ blue: "default",+ green: "success",+ amber: "warning",+ neutral: "neutral",+};++/** Chip accent for a role, derived from its palette tone. */+export function chipAccentForRole(role: RoleId): ChipAccent {+ return ROLE_CHIP_ACCENT[ROLE_TONE[role] ?? "neutral"];+}+/** Seats used / limit as display copy; null limit → "Unlimited". */export function seatsLabel(used: number, limit: number | null): string {return limit === null ? `${used} · Unlimited` : `${used} / ${limit}`;diff --git a/frontend/editor/src/portal/mocks/docs.ts b/frontend/editor/src/portal/mocks/docs.tsindex 18a1084c06..2b54d0c17c 100644--- a/frontend/editor/src/portal/mocks/docs.ts+++ b/frontend/editor/src/portal/mocks/docs.ts@@ -17,6 +17,7 @@* fixtures can be deleted (or kept as test seeds).*/+import type { CardAccent } from "@app/ui";import type { Tier } from "@portal/contexts/TierContext";import type { CodeLang } from "@app/ui";@@ -145,7 +146,7 @@ export interface Playbook {blurb: string;/** Ordered stages rendered as a chip flow. */steps: string[];- accent: "blue" | "purple" | "green";+ accent: CardAccent;}/** A bundled, named agent capability — a deterministic op chain. */@@ -337,28 +338,28 @@ const PLAYBOOKS: Playbook[] = ["Three-way match","POST to ERP",],- accent: "blue",+ accent: "default",},{title: "PII redaction at scale",blurb:"Sweep a document set for PII and write redacted copies to cold storage.",steps: ["S3 source", "Detect PII", "Redact", "Store to bucket"],- accent: "purple",+ accent: "premium",},{title: "Compliance evidence pack",blurb:"Bundle SOC 2 and audit reports into a verified, timestamped archive.",steps: ["Batch upload", "Classify", "Validate schema", "Sign & archive"],- accent: "green",+ accent: "success",},{title: "Agent document tool",blurb:"Expose extraction as an MCP tool your agent can call deterministically.",steps: ["Define tool", "Bind endpoint", "Run evals", "Ship to agent"],- accent: "purple",+ accent: "premium",},];diff --git a/frontend/editor/src/portal/views/AgentBuilder.tsx b/frontend/editor/src/portal/views/AgentBuilder.tsxindex cd7638ee40..efa319c146 100644--- a/frontend/editor/src/portal/views/AgentBuilder.tsx+++ b/frontend/editor/src/portal/views/AgentBuilder.tsx@@ -41,7 +41,7 @@ export function AgentBuilder() {</div><ButtononClick={() => setBootstrapOpen(true)}- leadingIcon={<span aria-hidden>⇪</span>}+ leftSection={<span aria-hidden>⇪</span>}>{t("portal.agentBuilder.bootstrapFromDocument")}</Button>diff --git a/frontend/editor/src/portal/views/Home.tsx b/frontend/editor/src/portal/views/Home.tsxindex 92d7f69318..fef96810e1 100644--- a/frontend/editor/src/portal/views/Home.tsx+++ b/frontend/editor/src/portal/views/Home.tsx@@ -38,7 +38,7 @@ import "@portal/views/Home.css";/* ──────────────────────────────────────────────────────────────────────── */interface ProductCardProps {- accent: "blue" | "purple";+ accent: "default" | "premium";badge?: string;title: string;blurb: string;@@ -60,18 +60,21 @@ function ProductCard({<div className="portal-home__product-head"><h3 className="portal-home__product-title">{title}</h3>{badge && (- <StatusBadge tone={accent === "blue" ? "info" : "purple"} size="sm">+ <StatusBadge+ tone={accent === "default" ? "info" : "purple"}+ size="sm"+ >{badge}</StatusBadge>)}</div><p className="portal-home__product-blurb">{blurb}</p><Button- variant="outline"+ variant="secondary"accent={accent}size="sm"onClick={() => setActiveView(target)}- trailingIcon={<span aria-hidden>→</span>}+ rightSection={<span aria-hidden>→</span>}>{cta}</Button>@@ -87,14 +90,14 @@ function ProductGrid() {aria-label={t("portal.home.productGrid.ariaLabel")}><ProductCard- accent="purple"+ accent="premium"title={t("portal.home.productGrid.sources.title")}blurb={t("portal.home.productGrid.sources.blurb")}cta={t("portal.home.productGrid.sources.cta")}target="sources"/><ProductCard- accent="blue"+ accent="default"badge={t("portal.home.productGrid.pipelines.badge")}title={t("portal.home.productGrid.pipelines.title")}blurb={t("portal.home.productGrid.pipelines.blurb")}@@ -102,7 +105,7 @@ function ProductGrid() {target="pipelines"/><ProductCard- accent="purple"+ accent="premium"title={t("portal.home.productGrid.agents.title")}blurb={t("portal.home.productGrid.agents.blurb")}cta={t("portal.home.productGrid.agents.cta")}@@ -130,7 +133,8 @@ function QuickActions({ onTryOp }: { onTryOp: () => void }) {</span></div><div className="portal-home__quick-list">- <button+ <Button+ variant="quiet"type="button"className="portal-home__quick-row"onClick={onTryOp}@@ -152,8 +156,9 @@ function QuickActions({ onTryOp }: { onTryOp: () => void }) {<span className="portal-home__quick-arrow" aria-hidden>→</span>- </button>- <button+ </Button>+ <Button+ variant="quiet"type="button"className="portal-home__quick-row"onClick={() => setActiveView("pipelines")}@@ -175,8 +180,9 @@ function QuickActions({ onTryOp }: { onTryOp: () => void }) {<span className="portal-home__quick-arrow" aria-hidden>→</span>- </button>- <button+ </Button>+ <Button+ variant="quiet"type="button"className="portal-home__quick-row"onClick={() => setActiveView("sources")}@@ -198,8 +204,9 @@ function QuickActions({ onTryOp }: { onTryOp: () => void }) {<span className="portal-home__quick-arrow" aria-hidden>→</span>- </button>- <button+ </Button>+ <Button+ variant="quiet"type="button"className="portal-home__quick-row"onClick={() => setActiveView("infrastructure")}@@ -221,7 +228,7 @@ function QuickActions({ onTryOp }: { onTryOp: () => void }) {<span className="portal-home__quick-arrow" aria-hidden>→</span>- </button>+ </Button></div></Card>);@@ -243,7 +250,7 @@ function FreeOnboarding({ onTryOp }: { onTryOp: () => void }) {function renderCta(step: OnboardingStep) {if (step.done) {return (- <Button size="sm" variant="ghost" onClick={onTryOp}>+ <Button size="sm" variant="tertiary" onClick={onTryOp}>{t("portal.home.onboarding.runAgain")}</Button>);@@ -251,7 +258,7 @@ function FreeOnboarding({ onTryOp }: { onTryOp: () => void }) {if (!step.cta) return null;if (step.cta.kind === "try-op") {return (- <Button size="sm" variant="outline" onClick={onTryOp}>+ <Button size="sm" variant="secondary" onClick={onTryOp}>{t("portal.home.onboarding.start")}</Button>);@@ -260,7 +267,7 @@ function FreeOnboarding({ onTryOp }: { onTryOp: () => void }) {return (<Buttonsize="sm"- variant="outline"+ variant="secondary"onClick={() => setActiveView(target as ViewId)}>{t("portal.home.onboarding.start")}diff --git a/frontend/editor/src/portal/views/Infrastructure.tsx b/frontend/editor/src/portal/views/Infrastructure.tsxindex eebea50483..bc0920382c 100644--- a/frontend/editor/src/portal/views/Infrastructure.tsx+++ b/frontend/editor/src/portal/views/Infrastructure.tsx@@ -44,7 +44,7 @@ export function Infrastructure() {</p></div><Button- variant="outline"+ variant="secondary"size="sm"onClick={() => setActiveView("editor")}>diff --git a/frontend/editor/src/portal/views/Pipelines.test.tsx b/frontend/editor/src/portal/views/Pipelines.test.tsxindex 6b69d8ca33..ece7a2d87e 100644--- a/frontend/editor/src/portal/views/Pipelines.test.tsx+++ b/frontend/editor/src/portal/views/Pipelines.test.tsx@@ -1,7 +1,18 @@import { beforeEach, describe, expect, it, vi } from "vitest";-import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import {+ fireEvent,+ render as baseRender,+ screen,+ waitFor,+} from "@testing-library/react";+import { MantineProvider } from "@mantine/core";import { MemoryRouter } from "react-router-dom";import { HttpError } from "@portal/api/http";++const render = (+ ui: Parameters<typeof baseRender>[0],+ options?: Parameters<typeof baseRender>[1],+) => baseRender(ui, { wrapper: MantineProvider, ...options });import type { PipelinesOverviewResponse, Policy } from "@portal/api/pipelines";import type { SourcesResponse } from "@portal/api/sources";import { Pipelines } from "@portal/views/Pipelines";diff --git a/frontend/editor/src/portal/views/Pipelines.tsx b/frontend/editor/src/portal/views/Pipelines.tsxindex d87e697446..8781778ced 100644--- a/frontend/editor/src/portal/views/Pipelines.tsx+++ b/frontend/editor/src/portal/views/Pipelines.tsx@@ -114,7 +114,7 @@ export function Pipelines() {{t("portal.pipelines.subtitle")}</p></div>- <Button onClick={openCreate} leadingIcon={<span aria-hidden>+</span>}>+ <Button onClick={openCreate} leftSection={<span aria-hidden>+</span>}>{t("portal.pipelines.actions.newPipeline")}</Button></header>@@ -179,7 +179,7 @@ export function Pipelines() {footer={<div className="portal-pipelines__composer-footer"><Button- variant="ghost"+ variant="tertiary"size="sm"disabled={deleting}onClick={() => setPendingDelete(null)}@@ -188,7 +188,7 @@ export function Pipelines() {</Button><Buttonsize="sm"- accent="red"+ accent="danger"loading={deleting}onClick={confirmDelete}>diff --git a/frontend/editor/src/portal/views/Policies.css b/frontend/editor/src/portal/views/Policies.cssindex 5744b2ff42..6bad9365c5 100644--- a/frontend/editor/src/portal/views/Policies.css+++ b/frontend/editor/src/portal/views/Policies.css@@ -36,6 +36,31 @@gap: 0.375rem;}+/* Category row — locked (coming soon) */+.portal-policies__row {+ display: flex;+ align-items: center;+ gap: 0.75rem;+ padding: 0.25rem 0.75rem;+ min-height: 2.25rem;+}++.portal-policies__row-name {+ flex: 1;+ font-size: 0.9375rem;+ font-weight: 600;+ color: var(--color-text-3);+}++/* "Set up" underline link inside the active-row button's rightSection */+.portal-policies__setup-link {+ font-size: 0.8125rem;+ font-weight: 600;+ color: var(--color-blue);+ text-decoration: underline;+ text-underline-offset: 2px;+}+/* Category card — horizontal table row */.portal-policies__card {display: flex;@@ -109,6 +134,55 @@color: var(--color-text-1);}+.portal-policies__card-blurb {+ font-size: 0.75rem;+ color: var(--color-text-4);+ line-height: 1.4;+}++.portal-policies__card-summary {+ margin: 0;+ font-size: 0.8125rem;+ line-height: 1.5;+ color: var(--color-text-2);+}++.portal-policies__card-foot {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 0.5rem;+ margin-top: auto;+ flex-wrap: wrap;+}++.portal-policies__card-rules {+ display: flex;+ flex-wrap: wrap;+ gap: 0.375rem;+}++.portal-policies__card-cta {+ font-size: 0.75rem;+ font-weight: 600;+ color: var(--color-blue);+}++.portal-policies__chevron-right {+ transform: rotate(-90deg);+ display: block;+}++/* Configured-card stat footer */+.portal-policies__card-stats {+ display: grid;+ grid-template-columns: repeat(3, 1fr);+ gap: 0.5rem;+ margin-top: auto;+ padding-top: 0.75rem;+ border-top: 1px solid var(--color-border-light);+}+/* Wizard + detail shared chrome */.portal-policies__wizard-title {display: inline-flex;diff --git a/frontend/editor/src/portal/views/Policies.tsx b/frontend/editor/src/portal/views/Policies.tsxindex d0c4e05d49..609f7b2bfc 100644--- a/frontend/editor/src/portal/views/Policies.tsx+++ b/frontend/editor/src/portal/views/Policies.tsx@@ -133,7 +133,7 @@ export function Policies() {title={t("portal.policies.offline.title")}description={t("portal.policies.offline.description")}action={- <Button variant="outline" size="sm" onClick={refetch}>+ <Button variant="secondary" size="sm" onClick={refetch}>{t("portal.policies.offline.retry")}</Button>}diff --git a/frontend/editor/src/portal/views/Sources.css b/frontend/editor/src/portal/views/Sources.cssindex d265a17135..d8cc6897af 100644--- a/frontend/editor/src/portal/views/Sources.css+++ b/frontend/editor/src/portal/views/Sources.css@@ -74,23 +74,23 @@background: var(--color-bg-subtle);color: var(--color-text-3);}-.portal-sources__type-dot--blue {+.portal-sources__type-dot--default {background: var(--color-blue-light);color: var(--color-blue);}-.portal-sources__type-dot--purple {+.portal-sources__type-dot--premium {background: var(--color-purple-light);color: var(--color-purple);}-.portal-sources__type-dot--green {+.portal-sources__type-dot--success {background: var(--color-green-light);color: var(--color-green-dark);}-.portal-sources__type-dot--amber {+.portal-sources__type-dot--warning {background: var(--color-amber-light);color: var(--color-amber-dark);}-.portal-sources__type-dot--red {+.portal-sources__type-dot--danger {background: var(--color-red-light);color: var(--color-red);}diff --git a/frontend/editor/src/portal/views/Sources.test.tsx b/frontend/editor/src/portal/views/Sources.test.tsxindex a68399d588..7226c2e017 100644--- a/frontend/editor/src/portal/views/Sources.test.tsx+++ b/frontend/editor/src/portal/views/Sources.test.tsx@@ -1,7 +1,18 @@import { beforeEach, describe, expect, it, vi } from "vitest";-import { fireEvent, render, screen, waitFor } from "@testing-library/react";+import {+ fireEvent,+ render as baseRender,+ screen,+ waitFor,+} from "@testing-library/react";+import { MantineProvider } from "@mantine/core";import { MemoryRouter } from "react-router-dom";import { HttpError } from "@portal/api/http";++const render = (+ ui: Parameters<typeof baseRender>[0],+ options?: Parameters<typeof baseRender>[1],+) => baseRender(ui, { wrapper: MantineProvider, ...options });import type { SourcesResponse } from "@portal/api/sources";import { Sources } from "@portal/views/Sources";diff --git a/frontend/editor/src/portal/views/Sources.tsx b/frontend/editor/src/portal/views/Sources.tsxindex b44eacb2ec..91191805ab 100644--- a/frontend/editor/src/portal/views/Sources.tsx+++ b/frontend/editor/src/portal/views/Sources.tsx@@ -127,13 +127,13 @@ export function Sources() {</div><div className="portal-sources__actions"><Button- variant="outline"+ variant="secondary"onClick={() => setActiveView("agent-builder")}- leadingIcon={<AgentBuilderIcon size={16} />}+ leftSection={<AgentBuilderIcon size={16} />}>{t("portal.sources.actions.agentBuilder")}</Button>- <Button onClick={openCreate} leadingIcon={<span aria-hidden>+</span>}>+ <Button onClick={openCreate} leftSection={<span aria-hidden>+</span>}>{t("portal.sources.actions.connectSource")}</Button></div>@@ -200,7 +200,7 @@ export function Sources() {footer={<div className="portal-sources__wizard-footer"><Button- variant="ghost"+ variant="tertiary"size="sm"disabled={deleting}onClick={() => setPendingDelete(null)}@@ -209,7 +209,7 @@ export function Sources() {</Button><Buttonsize="sm"- accent="red"+ accent="danger"loading={deleting}onClick={confirmDelete}>diff --git a/frontend/editor/src/portal/views/Usage.tsx b/frontend/editor/src/portal/views/Usage.tsxindex d1f6ede78a..4a4493aa2c 100644--- a/frontend/editor/src/portal/views/Usage.tsx+++ b/frontend/editor/src/portal/views/Usage.tsx@@ -181,7 +181,7 @@ export function Usage() {</div>{wallet?.status === "subscribed" && (<Button- variant="outline"+ variant="secondary"size="sm"loading={portal.opening}onClick={portal.open}diff --git a/frontend/editor/src/portal/views/Users.tsx b/frontend/editor/src/portal/views/Users.tsxindex 4337436b8e..7d210e9831 100644--- a/frontend/editor/src/portal/views/Users.tsx+++ b/frontend/editor/src/portal/views/Users.tsx@@ -64,7 +64,7 @@ export function Users() {</div><ButtononClick={() => setInviteOpen(true)}- leadingIcon={<span aria-hidden>+</span>}+ leftSection={<span aria-hidden>+</span>}>{t("portal.common.inviteMember")}</Button>diff --git a/frontend/editor/src/proprietary/auth/ui/EmailPasswordForm.tsx b/frontend/editor/src/proprietary/auth/ui/EmailPasswordForm.tsxindex 7fa97ecc09..08236c12c4 100644--- a/frontend/editor/src/proprietary/auth/ui/EmailPasswordForm.tsx+++ b/frontend/editor/src/proprietary/auth/ui/EmailPasswordForm.tsx@@ -1,6 +1,7 @@import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";import "@app/auth/ui/auth.css";-import { TextInput, PasswordInput, Button } from "@mantine/core";+import { TextInput, PasswordInput } from "@mantine/core";// Force light mode styles for auth inputsconst authInputStyles = {@@ -128,18 +129,11 @@ export default function EmailPasswordForm({(showPasswordField && !password) ||(requiresMfa && !mfaCode.trim())}- className="auth-button"fullWidthloading={isSubmitting}- styles={{- // Own the brand colour inline so the host app's Mantine primaryColor- // can't win over .auth-button (editor vs portal Mantine themes- // differ). The fallback keeps it red even if auth-theme.css is absent.- root: {- backgroundColor: "var(--auth-button-bg-light-only, #af3434)",- color: "var(--auth-button-text-light-only, #ffffff)",- },- }}+ // Stirling-red brand CTA; the brand accent sets the colour inline so the+ // host app's Mantine primaryColor can't win (editor vs portal differ).+ accent="brand">{submitButtonText}</Button>diff --git a/frontend/editor/src/proprietary/auth/ui/LoginRightCarousel.tsx b/frontend/editor/src/proprietary/auth/ui/LoginRightCarousel.tsxindex 7a2d76d129..f6ad17ec7e 100644--- a/frontend/editor/src/proprietary/auth/ui/LoginRightCarousel.tsx+++ b/frontend/editor/src/proprietary/auth/ui/LoginRightCarousel.tsx@@ -1,4 +1,5 @@import { memo, useEffect, useMemo, useRef, useState } from "react";+import { Button } from "@app/ui/Button";import bgDefault from "@app/assets/login/LoginBackgroundPanel.png";export type ImageSlide = {@@ -208,13 +209,14 @@ function LoginRightCarousel({}}>{Array.from({ length: totalSlides }).map((_, i) => (- <button+ <Buttonkey={i}+ variant="tertiary"aria-label={`Go to slide ${i + 1}`}onClick={() => setIndex(i)}style={{- width: "10px",- height: "12px",+ width: "5px",+ height: "5px",borderRadius: "50%",border: "none",cursor: "pointer",@@ -223,6 +225,9 @@ function LoginRightCarousel({boxShadow: "0 2px 6px rgba(0,0,0,0.25)",display: "block",flexShrink: 0,+ padding: 0,+ minWidth: 0,+ minHeight: 0,}}/>))}diff --git a/frontend/editor/src/proprietary/auth/ui/OAuthButtons.tsx b/frontend/editor/src/proprietary/auth/ui/OAuthButtons.tsxindex ad1a3b82f7..3644ed91bc 100644--- a/frontend/editor/src/proprietary/auth/ui/OAuthButtons.tsx+++ b/frontend/editor/src/proprietary/auth/ui/OAuthButtons.tsx@@ -1,6 +1,6 @@import { useTranslation } from "react-i18next";import { type OAuthProvider } from "@app/auth/spring/oauthTypes";-import { Button } from "@mantine/core";+import { Button as DSButton } from "@app/ui/Button";import { oauthIconUrl, GENERIC_PROVIDER_ICON } from "@app/auth/ui/oauthIcons";// Debug flag to show all providers for UI testing@@ -107,80 +107,77 @@ export default function OAuthButtons({key={p.id}title={`${t("login.signInWith", "Sign in with")} ${p.label}`}>- <Button+ <DSButtononClick={() => onProviderClick(p.id)}disabled={isSubmitting}className="oauth-button-icon"aria-label={`${t("login.signInWith", "Sign in with")} ${p.label}`}- variant="default"+ variant="tertiary"><imgsrc={oauthIconUrl(p.file)}alt={p.label}className="oauth-icon-small"/>- </Button>+ </DSButton></div>))}</div>);}-- if (layout === "fullwidth") {- // Mirrors the SaaS editor login: rounded pill buttons stacked vertically,- // each with the provider's icon + "Sign in with X" label.+ if (layout === "grid") {return (- <div className="oauth-container-fullwidth">+ <div className="oauth-container-grid">{providers.map((p) => (- <button+ <divkey={p.id}- type="button"- onClick={() => onProviderClick(p.id)}- disabled={isSubmitting}- className="oauth-button-fullwidth"- title={p.label}- aria-label={`${ctaPrefix ?? ""}${p.label}`}+ title={`${t("login.signInWith", "Sign in with")} ${p.label}`}>- <span className="oauth-btn-group">+ <DSButton+ onClick={() => onProviderClick(p.id)}+ disabled={isSubmitting}+ className="oauth-button-grid"+ aria-label={`${t("login.signInWith", "Sign in with")} ${p.label}`}+ variant="tertiary"+ ><imgsrc={oauthIconUrl(p.file)}alt={p.label}className="oauth-icon-medium"- style={{ marginRight: "0.5rem", flexShrink: 0 }}/>- <span className="oauth-btn-label">- {ctaPrefix ?? ""}- {p.label}- </span>- </span>- </button>+ </DSButton>+ </div>))}</div>);}-- if (layout === "grid") {+ if (layout === "fullwidth") {+ // Mirrors the SaaS editor login: rounded pill buttons stacked vertically,+ // each with the provider's icon + "Sign in with X" label.return (- <div className="oauth-container-grid">+ <div className="oauth-container-fullwidth">{providers.map((p) => (- <div+ <DSButtonkey={p.id}- title={`${t("login.signInWith", "Sign in with")} ${p.label}`}+ variant="secondary"+ onClick={() => onProviderClick(p.id)}+ disabled={isSubmitting}+ className="oauth-button-fullwidth"+ title={p.label}+ aria-label={ctaPrefix ? `${ctaPrefix} ${p.label}` : p.label}>- <Button- onClick={() => onProviderClick(p.id)}- disabled={isSubmitting}- className="oauth-button-grid"- aria-label={`${t("login.signInWith", "Sign in with")} ${p.label}`}- variant="default"- >+ <span className="oauth-btn-group"><imgsrc={oauthIconUrl(p.file)}alt={p.label}- className="oauth-icon-medium"+ className={`oauth-icon-medium oauth-icon--${p.providerId}`}+ style={{ marginRight: "0.5rem", flexShrink: 0 }}/>- </Button>- </div>+ <span className="oauth-btn-label">+ {ctaPrefix ? `${ctaPrefix} ${p.label}` : p.label}+ </span>+ </span>+ </DSButton>))}</div>);@@ -195,12 +192,12 @@ export default function OAuthButtons({key={p.id}title={`${t("login.signInWith", "Sign in with")} ${p.label}`}>- <Button+ <DSButtononClick={() => onProviderClick(p.id)}disabled={!demoMode && isSubmitting}className={`oauth-button-vertical${useNewStyle && isSingleProvider ? " oauth-button-vertical-single" : ""}${!useNewStyle ? " oauth-button-vertical-legacy" : ""}${isTinted ? " oauth-button-vertical-tinted" : ""}${isOutline ? " oauth-button-vertical-outline" : ""}${isLight ? " oauth-button-vertical-light" : ""}`}aria-label={`${t("login.signInWith", "Sign in with")} ${p.label}`}- variant="default"+ variant="tertiary"style={isTinted? ({@@ -238,7 +235,7 @@ export default function OAuthButtons({</svg></span>)}- </Button>+ </DSButton></div>))}</div>diff --git a/frontend/editor/src/proprietary/auth/ui/SpringLoginForm.tsx b/frontend/editor/src/proprietary/auth/ui/SpringLoginForm.tsxindex f6c616fd77..ca8deb3c32 100644--- a/frontend/editor/src/proprietary/auth/ui/SpringLoginForm.tsx+++ b/frontend/editor/src/proprietary/auth/ui/SpringLoginForm.tsx@@ -102,11 +102,10 @@ export default function SpringLoginForm({<OAuthButtonsonProviderClick={signInWithProvider}isSubmitting={isSubmitting}- layout="vertical"+ layout="fullwidth"enabledProviders={providers}- ctaPrefix={oauthCtaPrefix}+ ctaPrefix={oauthCtaPrefix ?? "Continue with"}useNewStyle={oauthUseNewStyle}- styleVariant="light"/>)}diff --git a/frontend/editor/src/proprietary/auth/ui/auth-theme.css b/frontend/editor/src/proprietary/auth/ui/auth-theme.cssindex 79c7ec6acd..f62691f518 100644--- a/frontend/editor/src/proprietary/auth/ui/auth-theme.css+++ b/frontend/editor/src/proprietary/auth/ui/auth-theme.css@@ -39,8 +39,8 @@--auth-magic-button-text-light-only: var(--text-primary);--auth-text-primary-light-only: var(--text-primary);--auth-text-secondary-light-only: var(--text-secondary);- --text-divider-rule-rgb-light: 58, 64, 71;- --text-divider-label-rgb-light: 107, 114, 128;+ --text-divider-rule-rgb-light: 28, 35, 64;+ --text-divider-label-rgb-light: 91, 98, 128;--tool-subcategory-rule-color-light: var(--border-default);--tool-subcategory-text-color-light: var(--text-secondary);}diff --git a/frontend/editor/src/proprietary/auth/ui/auth.css b/frontend/editor/src/proprietary/auth/ui/auth.cssindex 3fce26f7ce..249d6cdda5 100644--- a/frontend/editor/src/proprietary/auth/ui/auth.css+++ b/frontend/editor/src/proprietary/auth/ui/auth.css@@ -707,6 +707,61 @@min-height: 0;}+.oauth-container-fullwidth {+ display: flex;+ flex-direction: column;+ gap: 0.75rem;+}++.oauth-button-fullwidth {+ width: 100%;+ display: flex;+ align-items: center;+ justify-content: center;+ padding: 0.75rem 1rem;+ border: 1px solid #d1d5db;+ border-radius: 100px;+ background-color: #ffffff;+ font-size: 1rem;+ font-weight: 600;+ color: #000000;+ cursor: pointer;+ gap: 0.5rem;+ box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.04);+ transition:+ background-color 150ms ease,+ box-shadow 150ms ease,+ border-color 150ms ease;+}++.oauth-button-fullwidth:disabled {+ cursor: not-allowed;+ opacity: 0.6;+}++.oauth-button-fullwidth:hover:not(:disabled) {+ background-color: #fafafa;+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);+}++[data-mantine-color-scheme="dark"] .oauth-button-fullwidth {+ background-color: var(--bg-surface);+ color: var(--text-primary);+ border-color: var(--border-default);+ box-shadow: none;+}++[data-mantine-color-scheme="dark"]+ .oauth-button-fullwidth:hover:not(:disabled) {+ background-color: var(--bg-raised);+ box-shadow: none;+}++/* ── Dark-mode icon inversion for monochrome OAuth logos ────────────── */+[data-mantine-color-scheme="dark"] .oauth-icon--github {+ filter: invert(1);+}+/* ── Icon+label group — keeps icons vertically aligned across buttons ── */.oauth-btn-group {display: inline-flex;diff --git a/frontend/editor/src/proprietary/billing/SpendCapControl.tsx b/frontend/editor/src/proprietary/billing/SpendCapControl.tsxindex c5589133f3..d6c267a099 100644--- a/frontend/editor/src/proprietary/billing/SpendCapControl.tsx+++ b/frontend/editor/src/proprietary/billing/SpendCapControl.tsx@@ -123,8 +123,9 @@ export function SpendCapControl({<div className="scc"><div className="scc-row">{presets.map((preset) => (- <button+ <Buttonkey={preset}+ variant="quiet"type="button"className="scc-chip"data-selected={capUsd === preset ? "true" : "false"}@@ -133,7 +134,7 @@ export function SpendCapControl({>{sym}{preset.toLocaleString()}- </button>+ </Button>))}<label@@ -154,7 +155,8 @@ export function SpendCapControl({/></label>- <button+ <Button+ variant="quiet"type="button"className={`scc-chip${onSave ? "" : " scc-row__spacer"}`}data-selected={isNoCap ? "true" : "false"}@@ -162,12 +164,12 @@ export function SpendCapControl({disabled={busy}>{L.noCap}- </button>+ </Button>{onSave && (<div className="scc-row__spacer"><Button- variant="outline"+ variant="secondary"size="sm"loading={saving}disabled={!dirty || busy}diff --git a/frontend/editor/src/proprietary/components/chat/ChatFAB.css b/frontend/editor/src/proprietary/components/chat/ChatFAB.cssindex efa55ea67c..01e713429a 100644--- a/frontend/editor/src/proprietary/components/chat/ChatFAB.css+++ b/frontend/editor/src/proprietary/components/chat/ChatFAB.css@@ -7,6 +7,14 @@overflow: hidden;}+/* Bounds element — inset by FAB_GAP_PX, used as react-rnd drag+resize limit ── */++.chat-fab-bounds {+ position: absolute;+ inset: 16px;+ pointer-events: none;+}+/* FAB trigger button ─────────────────────────────────────────────────────── */.chat-fab-trigger {diff --git a/frontend/editor/src/proprietary/components/chat/ChatFAB.tsx b/frontend/editor/src/proprietary/components/chat/ChatFAB.tsxindex 06674d811f..490a7784cb 100644--- a/frontend/editor/src/proprietary/components/chat/ChatFAB.tsx+++ b/frontend/editor/src/proprietary/components/chat/ChatFAB.tsx@@ -1,4 +1,10 @@-import { useEffect, useLayoutEffect, useRef, useState } from "react";+import {+ useEffect,+ useLayoutEffect,+ useRef,+ useState,+ useCallback,+} from "react";import {createTheme,MantineProvider,@@ -68,6 +74,13 @@ export function ChatFAB() {}, [isLoading]);const overlayRef = useRef<HTMLDivElement>(null);+ // Separate bounds element inset by FAB_GAP_PX — react-rnd enforces this+ // during both drag and resize, keeping the panel off the overlay edges.+ const [boundsEl, setBoundsEl] = useState<HTMLDivElement | null>(null);+ const boundsRef = useCallback(+ (el: HTMLDivElement | null) => setBoundsEl(el),+ [],+ );const [rndPos, setRndPos] = useState<{ x: number; y: number } | null>(null);const [rndSize, setRndSize] = useState({width: PANEL_WIDTH_PX,@@ -102,8 +115,7 @@ export function ChatFAB() {const pos = getDefaultPos();if (pos) setRndPos(pos);}, [enabled]);-- // bounds="parent" only clamps during active drag/resize; ResizeObserver keeps position valid when the overlay changes size.+ // ResizeObserver keeps position valid when the overlay changes size (e.g. window resize, sidebar toggle).useEffect(() => {if (!enabled) return;const el = overlayRef.current;@@ -170,6 +182,8 @@ export function ChatFAB() {className="chat-fab-overlay"style={{ zIndex: Z_INDEX_CHAT_FAB_OVERLAY }}>+ {/* Inset boundary element — react-rnd uses this to constrain drag+resize */}+ <div ref={boundsRef} className="chat-fab-bounds" />{/* Trigger button — fades out while panel is open */}<ChatFABButtonclassName={`chat-fab-trigger${isOpen ? " chat-fab-trigger--hidden" : ""}`}@@ -185,19 +199,19 @@ export function ChatFAB() {}}aria-label={t("chat.fab.open", "Open Stirling AI assistant")}aria-expanded={isOpen}- isLoading={isLoading}+ loading={isLoading}showTick={hasUnviewedResult && !isLoading}/>{/* Draggable / resizable panel */}- {rndPos !== null && (+ {rndPos !== null && boundsEl !== null && (<RndclassName="chat-fab-panel-rnd"position={rndPos}size={rndSize}minWidth={PANEL_MIN_WIDTH_PX}minHeight={PANEL_MIN_HEIGHT_PX}- bounds="parent"+ bounds={boundsEl}enableResizing={true}// Drag from the header; cancel keeps buttons inside it clickabledragHandleClassName="chat-panel__header"diff --git a/frontend/editor/src/proprietary/components/chat/ChatPanel.css b/frontend/editor/src/proprietary/components/chat/ChatPanel.cssindex 19b6cdbfc0..58c3ea4619 100644--- a/frontend/editor/src/proprietary/components/chat/ChatPanel.css+++ b/frontend/editor/src/proprietary/components/chat/ChatPanel.css@@ -25,7 +25,22 @@flex-shrink: 0;}-.chat-panel__agent-pill-vt {+.chat-panel__agent-pill {+ display: inline-flex;+ gap: 0.5rem;+ flex: 1;+ min-width: 0;+ padding: 0.4rem 0.75rem 0.4rem 0.4rem;+ border: 1px solid var(--border-subtle);+ border-radius: 9999px;+ background: var(--mantine-color-body);+ cursor: pointer;+ transition:+ background 120ms ease-out,+ border-color 120ms ease-out;+}++.chat-fab-window--open .chat-panel__agent-pill {view-transition-name: stirling-agent;}@@ -37,6 +52,96 @@animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);}+.chat-panel__agent-pill:hover {+ background: var(--mantine-color-default-hover);+}++.chat-panel__agent-pill-icon {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ width: 1.75rem;+ height: 1.75rem;+ border-radius: 9999px;+ background: var(--mantine-color-blue-light);+ color: var(--mantine-color-blue-filled);+ flex-shrink: 0;+ position: relative;+}++/* Running / in-progress status dot, anchored to the agent pill icon. */+.agent-status-dot {+ position: absolute;+ bottom: 0;+ right: 0;+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: var(--mantine-color-blue-5);+ border: 1.5px solid var(--mantine-color-body);+ animation: agent-dot-pulse 2.4s ease-in-out infinite;+ pointer-events: none;+}++@keyframes agent-dot-pulse {+ 0%,+ 100% {+ opacity: 1;+ }+ 50% {+ opacity: 0.45;+ }+}++@media (prefers-reduced-motion: reduce) {+ .agent-status-dot {+ animation: none;+ }+}++.chat-panel__agent-pill--loading {+ border-color: color-mix(+ in srgb,+ var(--mantine-color-blue-5) 60%,+ var(--border-subtle)+ );+}++[data-mantine-color-scheme="dark"] .chat-panel__agent-pill--loading {+ border-color: color-mix(+ in srgb,+ var(--mantine-color-blue-4) 55%,+ var(--border-subtle)+ );+}++/* Dark-mode: let the pill blend into the rail. Just a thin border, no fill —+ so it doesn't read as a clashing lighter card on the dark toolbar. */+[data-mantine-color-scheme="dark"] .chat-panel__agent-pill {+ background: transparent;+ border-color: var(--border-subtle);+}++/* The default tertiary accent is blue — use the surface text colour instead so+ the pill label and close icon don't look like interactive links. Overrides+ the Mantine button colour var the shared Button sets inline. */+.chat-panel__header .sui-btn--tertiary {+ --button-color: var(--text-primary) !important;+}++[data-mantine-color-scheme="dark"] .chat-panel__agent-pill:hover {+ background: rgba(255, 255, 255, 0.04);+}++[data-mantine-color-scheme="dark"] .chat-panel__agent-pill-icon {+ background: color-mix(+ in srgb,+ var(--mantine-color-blue-filled) 18%,+ transparent+ );+ color: var(--mantine-color-blue-3, var(--mantine-color-blue-filled));+}+/* Same treatment for the input pill and quick-action cards. */[data-mantine-color-scheme="dark"] .chat-panel-input {background: transparent;diff --git a/frontend/editor/src/proprietary/components/chat/ChatPanel.tsx b/frontend/editor/src/proprietary/components/chat/ChatPanel.tsxindex 18ff7c50ec..d0ff7e19e3 100644--- a/frontend/editor/src/proprietary/components/chat/ChatPanel.tsx+++ b/frontend/editor/src/proprietary/components/chat/ChatPanel.tsx@@ -10,7 +10,6 @@ import { renderMarkdown } from "@app/components/viewer/nonpdf/MarkdownRenderer";import { TFunction } from "i18next";import { useTranslation } from "react-i18next";import {- ActionIcon,Box,Collapse,Group,@@ -19,8 +18,9 @@ import {Stack,Text,Textarea,- UnstyledButton,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";import ArticleOutlinedIcon from "@mui/icons-material/ArticleOutlined";import BuildOutlinedIcon from "@mui/icons-material/BuildOutlined";@@ -266,7 +266,10 @@ function CompletedProgressLogDropdown({return (<div className="chat-completed-log">- <UnstyledButton+ <Button+ type="button"+ variant="tertiary"+ hover={false}className="chat-completed-log__toggle"onClick={() => setExpanded((v) => !v)}aria-expanded={expanded}@@ -281,7 +284,7 @@ function CompletedProgressLogDropdown({{label}</Text></Group>- </UnstyledButton>+ </Button><Collapse in={expanded}><ol className="chat-completed-log__tools">{toolSteps.map((step, i) => {@@ -333,14 +336,16 @@ function ChatMessageBubble({const actions = (<div className="chat-message-actions">- <button+ <ActionIcontype="button"+ variant="tertiary"className={`chat-message-action-btn${copied ? " chat-message-action-btn--active" : ""}`}onClick={handleCopy}title={t("chat.actions.copy", "Copy message")}+ aria-label={t("chat.actions.copy", "Copy message")}><ContentCopyIcon sx={{ fontSize: 13 }} />- </button>+ </ActionIcon><span className="chat-message-timestamp">{formatRelativeTime(timestamp, t)}</span>@@ -551,9 +556,6 @@ export function ChatPanel({ onBack, backLabel }: ChatPanelProps) {<div className="chat-panel-input"><ActionIconclassName="chat-panel-input__send"- variant="filled"- color="blue"- radius="xl"size="sm"onClick={() => handleSend()}disabled={!input.trim() || isLoading}diff --git a/frontend/editor/src/proprietary/components/chat/ChatQuickActions.tsx b/frontend/editor/src/proprietary/components/chat/ChatQuickActions.tsxindex 1905433037..f650c953fd 100644--- a/frontend/editor/src/proprietary/components/chat/ChatQuickActions.tsx+++ b/frontend/editor/src/proprietary/components/chat/ChatQuickActions.tsx@@ -1,6 +1,8 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { Box, Group, Stack, Text, UnstyledButton } from "@mantine/core";+import { Box, Group, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import CloseIcon from "@mui/icons-material/Close";import CompressIcon from "@mui/icons-material/Compress";import ContentCutIcon from "@mui/icons-material/ContentCut";@@ -26,7 +28,10 @@ interface QuickAction {function QuickActionCard({ action }: { action: QuickAction }) {return (- <UnstyledButton+ <Button+ type="button"+ variant="tertiary"+ hover={false}className="chat-quick-action"onClick={action.onClick}aria-label={action.title}@@ -51,7 +56,7 @@ function QuickActionCard({ action }: { action: QuickAction }) {}}/></Group>- </UnstyledButton>+ </Button>);}@@ -81,23 +86,27 @@ function WorkbenchFilePills({<span className="chat-file-pill__label" title={stub.name}>{stub.name}</span>- <button+ <ActionIcontype="button"+ variant="tertiary"className="chat-file-pill__remove"onClick={() => onRemove(stub.id)}aria-label={removeLabel(stub.name)}><CloseIcon sx={{ fontSize: 12 }} />- </button>+ </ActionIcon></span>))}{overflow > 0 && (- <UnstyledButton+ <Button+ type="button"+ variant="tertiary"+ hover={false}className="chat-file-pill chat-file-pill--more"onClick={onOpenFilesModal}>{moreLabel(overflow)}- </UnstyledButton>+ </Button>)}</div>);diff --git a/frontend/editor/src/proprietary/components/policies/Policies.css b/frontend/editor/src/proprietary/components/policies/Policies.cssindex 7785702a98..37b92a5830 100644--- a/frontend/editor/src/proprietary/components/policies/Policies.css+++ b/frontend/editor/src/proprietary/components/policies/Policies.css@@ -178,6 +178,11 @@color: var(--color-text-4);text-decoration: none;white-space: nowrap;+ cursor: pointer;+ transition: color var(--motion-fast);+}+.pol-row-upgrade:hover {+ color: var(--color-text-1);}.pol-row-upgrade:hover {text-decoration: underline;diff --git a/frontend/editor/src/proprietary/components/policies/PoliciesSidebar.tsx b/frontend/editor/src/proprietary/components/policies/PoliciesSidebar.tsxindex 2a3616bafd..15b494c3f6 100644--- a/frontend/editor/src/proprietary/components/policies/PoliciesSidebar.tsx+++ b/frontend/editor/src/proprietary/components/policies/PoliciesSidebar.tsx@@ -33,6 +33,8 @@ import type {import type { WatchedFolder } from "@app/types/watchedFolders";import { POLICIES_ENABLED } from "@app/constants/featureFlags";import { Tooltip as AppTooltip } from "@app/components/shared/Tooltip";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { IconBadge } from "@app/ui/IconBadge";import {deriveRowStatus,@@ -167,8 +169,9 @@ export function PoliciesSection({sidebarTooltippinOnClick>- <button+ <ActionIcontype="button"+ variant="tertiary"className="pol-info-btn"aria-label={t("policies.sidebar.infoAriaLabel",@@ -181,7 +184,7 @@ export function PoliciesSection({height="1.25rem"style={{ color: "var(--icon-files-color)" }}/>- </button>+ </ActionIcon></AppTooltip></div>@@ -199,26 +202,34 @@ export function PoliciesSection({{t(`policies.catalog.${cat.id}`, cat.label)}</span><span className="pol-row-trail">- <a- className="pol-row-upgrade"- href="https://stirling.com/contact"- target="_blank"- rel="noopener noreferrer"+ <Button+ variant="tertiary"+ size="sm"+ accent="neutral"+ onClick={() =>+ window.open(+ "https://stirling.com/contact",+ "_blank",+ "noopener,noreferrer",+ )+ }>{t("policies.sidebar.upgradeToEnterprise","Upgrade to enterprise",)}- </a>+ </Button></span></div>);}const status = deriveRowStatus(pol.policies[cat.id]);return (- <button+ <Buttonkey={cat.id}type="button"+ variant="tertiary"+ hover={false}className="pol-row"onClick={() =>guestBlocked ? promptGuestSignup() : selectPolicy(cat.id)@@ -248,7 +259,7 @@ export function PoliciesSection({sx={{ fontSize: "1rem" }}/></span>- </button>+ </Button>);})}</div>@@ -508,8 +519,10 @@ export function PoliciesCollapsedButton({arrowdelay={300}>- <button+ <Buttontype="button"+ variant="tertiary"+ hover={false}className="pol-crail-btn"data-status={status}aria-label={t(@@ -530,7 +543,7 @@ export function PoliciesCollapsedButton({{(status === "active" || status === "paused") && (<span className="pol-crail-dot" data-status={status} />)}- </button>+ </Button></AppTooltip>);})}diff --git a/frontend/editor/src/proprietary/components/policies/PolicyDeleteConfirmModal.tsx b/frontend/editor/src/proprietary/components/policies/PolicyDeleteConfirmModal.tsxindex 0d40660d19..89d3dde57a 100644--- a/frontend/editor/src/proprietary/components/policies/PolicyDeleteConfirmModal.tsx+++ b/frontend/editor/src/proprietary/components/policies/PolicyDeleteConfirmModal.tsx@@ -1,5 +1,6 @@-import { Modal, Text, Button, Stack, Group } from "@mantine/core";+import { Modal, Text, Stack, Group } from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";interface PolicyDeleteConfirmModalProps {opened: boolean;@@ -35,10 +36,10 @@ export function PolicyDeleteConfirmModal({)}</Text><Group gap="sm" justify="flex-end">- <Button variant="outline" size="sm" onClick={onCancel}>+ <Button variant="secondary" size="sm" onClick={onCancel}>{t("cancel", "Cancel")}</Button>- <Button color="red" size="sm" onClick={onConfirm}>+ <Button accent="danger" size="sm" onClick={onConfirm}>{t("delete", "Delete")}</Button></Group>diff --git a/frontend/editor/src/proprietary/components/policies/PolicyDetailPanel.tsx b/frontend/editor/src/proprietary/components/policies/PolicyDetailPanel.tsxindex 1193111c8a..4afcf5891c 100644--- a/frontend/editor/src/proprietary/components/policies/PolicyDetailPanel.tsx+++ b/frontend/editor/src/proprietary/components/policies/PolicyDetailPanel.tsx@@ -84,15 +84,15 @@ function ActivityError({>{message}</span>- <button- type="button"+ <Button+ variant="tertiary"className="pol-activity-error__toggle"onClick={() => setExpanded((v) => !v)}>{expanded? t("policies.detail.showLess", "Show less"): t("policies.detail.showMore", "Show more")}- </button>+ </Button></span>);}@@ -221,7 +221,7 @@ export function PolicyDetailPanel({trailing={item.status === "flagged" && onRetry ? (<Button- variant="ghost"+ variant="tertiary"size="sm"onClick={() => onRetry(item)}>@@ -290,22 +290,22 @@ export function PolicyDetailPanel({<div className={`pol-footer${canDelete ? "" : " pol-footer-end"}`}>{canDelete && (<Button- variant="ghost"- accent="red"+ variant="tertiary"+ accent="danger"size="sm"- leadingIcon={<DeleteOutlineIcon sx={{ fontSize: "0.9rem" }} />}+ leftSection={<DeleteOutlineIcon sx={{ fontSize: "0.9rem" }} />}onClick={onDelete}style={{ marginRight: "auto" }}>{t("delete", "Delete")}</Button>)}- <Button variant="outline" size="sm" onClick={onTogglePause}>+ <Button variant="secondary" size="sm" onClick={onTogglePause}>{isPaused? t("policies.detail.resume", "Resume"): t("policies.detail.pause", "Pause")}</Button>- <Button variant="gradient" size="sm" onClick={onEditSettings}>+ <Button size="sm" onClick={onEditSettings}>{t("policies.detail.editSettings", "Edit Settings")}</Button></div>diff --git a/frontend/editor/src/proprietary/components/policies/PolicyFieldRow.tsx b/frontend/editor/src/proprietary/components/policies/PolicyFieldRow.tsxindex 4049533290..1210b997ca 100644--- a/frontend/editor/src/proprietary/components/policies/PolicyFieldRow.tsx+++ b/frontend/editor/src/proprietary/components/policies/PolicyFieldRow.tsx@@ -51,12 +51,7 @@ export function PolicyFieldRow({</div><div className="pol-field-chips">{(field.options ?? []).map((opt) => (- <Chip- key={opt}- tone={selected.includes(opt) ? "blue" : "neutral"}- size="sm"- onClick={() => toggle(opt)}- >+ <Chip key={opt} size="sm" onClick={() => toggle(opt)}>{t(`policies.fieldOption.${field.key}.${opt}`, opt)}</Chip>))}diff --git a/frontend/editor/src/proprietary/components/policies/PolicySetupWizard.tsx b/frontend/editor/src/proprietary/components/policies/PolicySetupWizard.tsxindex abd1f6d8df..d096b8327e 100644--- a/frontend/editor/src/proprietary/components/policies/PolicySetupWizard.tsx+++ b/frontend/editor/src/proprietary/components/policies/PolicySetupWizard.tsx@@ -630,7 +630,7 @@ export function PolicySetupWizard({)}action={<Button- variant="ghost"+ variant="tertiary"size="sm"onClick={onSetupClassification}>@@ -656,14 +656,15 @@ export function PolicySetupWizard({{ count: scopeTypes.length },)}</span>- <button+ <Button+ variant="tertiary"className="pol-link"onClick={() => setScopeNarrow((v) => !v)}>{scopeNarrow? t("policies.wizard.clear", "Clear"): t("policies.wizard.edit", "Edit")}- </button>+ </Button></div>{scopeNarrow && (<div className="pol-doctypes">@@ -690,12 +691,11 @@ export function PolicySetupWizard({</div><div className="pol-footer">- <Button variant="ghost" size="sm" onClick={back}>+ <Button variant="tertiary" size="sm" onClick={back}>{step > 1 ? t("policies.wizard.back", "Back") : t("cancel", "Cancel")}</Button>{step < TOTAL_STEPS ? (<Button- variant="gradient"size="sm"style={{ marginLeft: "auto" }}onClick={() => setStep((s) => Math.min(TOTAL_STEPS, s + 1))}@@ -704,7 +704,6 @@ export function PolicySetupWizard({</Button>) : (<Button- variant="gradient"size="sm"style={{ marginLeft: "auto" }}onClick={submit}diff --git a/frontend/editor/src/proprietary/components/policies/PolicyToolConfig.tsx b/frontend/editor/src/proprietary/components/policies/PolicyToolConfig.tsxindex 78e7c1a491..591ea1386f 100644--- a/frontend/editor/src/proprietary/components/policies/PolicyToolConfig.tsx+++ b/frontend/editor/src/proprietary/components/policies/PolicyToolConfig.tsx@@ -2,6 +2,7 @@ import { Suspense } from "react";import { useTranslation } from "react-i18next";import { Loader } from "@mantine/core";import { ToggleSwitch } from "@app/ui/ToggleSwitch";+import { ActionIcon } from "@app/ui/ActionIcon";import { Card } from "@app/ui/Card";import LocalIcon from "@app/components/shared/LocalIcon";import { Tooltip as AppTooltip } from "@app/components/shared/Tooltip";@@ -85,8 +86,9 @@ export function PolicyToolConfig({sidebarTooltippinOnClick>- <button+ <ActionIcontype="button"+ variant="tertiary"className="pol-info-btn"aria-label={t("policies.toolConfig.infoAriaLabel",@@ -100,7 +102,7 @@ export function PolicyToolConfig({height="1rem"style={{ color: "var(--icon-files-color)" }}/>- </button>+ </ActionIcon></AppTooltip>)}<ToggleSwitchdiff --git a/frontend/editor/src/proprietary/components/shared/ChangeUserPasswordModal.tsx b/frontend/editor/src/proprietary/components/shared/ChangeUserPasswordModal.tsxindex aa116fff63..047d0be273 100644--- a/frontend/editor/src/proprietary/components/shared/ChangeUserPasswordModal.tsx+++ b/frontend/editor/src/proprietary/components/shared/ChangeUserPasswordModal.tsx@@ -2,10 +2,7 @@ import { useEffect, useMemo, useState } from "react";import { isAxiosError } from "axios";import { useTranslation } from "react-i18next";import {- ActionIcon,- Button,Checkbox,- CloseButton,Group,Modal,PasswordInput,@@ -13,6 +10,8 @@ import {Text,Tooltip,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import { alert } from "@app/components/toast";import {@@ -225,7 +224,9 @@ export default function ChangeUserPasswordModal({withCloseButton={false}><div style={{ position: "relative" }}>- <CloseButton+ <ActionIcon+ aria-label={t("common.close", "Close")}+ variant="tertiary"onClick={handleClose}size="lg"disabled={processing}@@ -235,7 +236,9 @@ export default function ChangeUserPasswordModal({right: -8,zIndex: 1,}}- />+ >+ <LocalIcon icon="close-rounded" />+ </ActionIcon><Stack gap="lg" pt="md"><Stack gap="md" align="center"><LocalIcon@@ -338,9 +341,12 @@ export default function ChangeUserPasswordModal({)}><ActionIcon+ aria-label={t(+ "workspace.people.changePassword.copyTooltip",+ "Copy to clipboard",+ )}size="sm"- variant="subtle"- color="gray"+ variant="tertiary"onClick={handleCopyPassword}disabled={processing}>@@ -425,7 +431,7 @@ export default function ChangeUserPasswordModal({fullWidthsize="md"disabled={disabled}- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{t("workspace.people.changePassword.submit", "Update password")}</Button>diff --git a/frontend/editor/src/proprietary/components/shared/InviteMembersModal.tsx b/frontend/editor/src/proprietary/components/shared/InviteMembersModal.tsxindex 6e2f503fa3..e57f60395f 100644--- a/frontend/editor/src/proprietary/components/shared/InviteMembersModal.tsx+++ b/frontend/editor/src/proprietary/components/shared/InviteMembersModal.tsx@@ -5,18 +5,18 @@ import {Modal,Stack,Text,- Button,TextInput,Select,Paper,Checkbox,Textarea,- SegmentedControl,Tooltip,- CloseButton,Box,Group,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";+import { SegmentedControl } from "@app/ui/SegmentedControl";import LocalIcon from "@app/components/shared/LocalIcon";import { alert } from "@app/components/toast";import { userManagementService } from "@app/services/userManagementService";@@ -362,7 +362,9 @@ export default function InviteMembersModal({withCloseButton={false}><Box pos="relative">- <CloseButton+ <ActionIcon+ aria-label={t("common.close", "Close")}+ variant="tertiary"onClick={handleClose}size="lg"style={{@@ -371,7 +373,9 @@ export default function InviteMembersModal({right: -8,zIndex: 1,}}- />+ >+ <LocalIcon icon="close-rounded" />+ </ActionIcon><Stack gap="lg" pt="md">{/* Header with Icon */}<Stack gap="md" align="center">@@ -421,7 +425,11 @@ export default function InviteMembersModal({</Text></Group>{licenseInfo.availableSlots === 0 && (- <Button size="xs" variant="light" onClick={handleGoToPlan}>+ <Button+ size="sm"+ variant="secondary"+ onClick={handleGoToPlan}+ >{t("workspace.people.actions.upgrade", "Upgrade")}</Button>)}@@ -455,7 +463,7 @@ export default function InviteMembersModal({setInviteMode(value as "email" | "direct" | "link");setGeneratedInviteLink(null);}}- data={[+ options={[{label: t("workspace.people.inviteMode.username",@@ -587,7 +595,7 @@ export default function InviteMembersModal({style={{ flex: 1 }}/><Button- variant="light"+ variant="secondary"onClick={async () => {try {await navigator.clipboard.writeText(@@ -850,7 +858,7 @@ export default function InviteMembersModal({loading={!hasNoSlots && processing}fullWidthsize="md"- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{inviteMode === "email"? t("workspace.people.emailInvite.submit", "Send Invites")diff --git a/frontend/editor/src/proprietary/components/shared/ManageBillingButton.tsx b/frontend/editor/src/proprietary/components/shared/ManageBillingButton.tsxindex 179479bcd3..22450f441e 100644--- a/frontend/editor/src/proprietary/components/shared/ManageBillingButton.tsx+++ b/frontend/editor/src/proprietary/components/shared/ManageBillingButton.tsx@@ -1,5 +1,5 @@import React, { useState } from "react";-import { Button } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import licenseService from "@app/services/licenseService";import { alert } from "@app/components/toast";@@ -50,7 +50,7 @@ export const ManageBillingButton: React.FC<ManageBillingButtonProps> = ({};return (- <Button variant="outline" onClick={handleClick} loading={loading}>+ <Button variant="secondary" onClick={handleClick} loading={loading}>{t("billing.manageBilling", "Manage Billing")}</Button>);diff --git a/frontend/editor/src/proprietary/components/shared/UpdateSeatsButton.tsx b/frontend/editor/src/proprietary/components/shared/UpdateSeatsButton.tsxindex f950495a5d..d46b566a1f 100644--- a/frontend/editor/src/proprietary/components/shared/UpdateSeatsButton.tsx+++ b/frontend/editor/src/proprietary/components/shared/UpdateSeatsButton.tsx@@ -1,11 +1,11 @@import React from "react";-import { Button, ButtonProps } from "@mantine/core";+import { Button, type ButtonProps } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useUpdateSeats } from "@app/contexts/UpdateSeatsContext";interface UpdateSeatsButtonProps extends Omit<ButtonProps,- "onClick" | "loading"+ "onClick" | "loading" | "onError" | "onSuccess"> {onSuccess?: () => void;onError?: (error: string) => void;@@ -28,7 +28,7 @@ export const UpdateSeatsButton: React.FC<UpdateSeatsButtonProps> = ({return (<Button- variant="outline"+ variant="secondary"onClick={handleClick}loading={isLoading}{...buttonProps}diff --git a/frontend/editor/src/proprietary/components/shared/UpdateSeatsModal.tsx b/frontend/editor/src/proprietary/components/shared/UpdateSeatsModal.tsxindex a375fa42cc..689f9a7fab 100644--- a/frontend/editor/src/proprietary/components/shared/UpdateSeatsModal.tsx+++ b/frontend/editor/src/proprietary/components/shared/UpdateSeatsModal.tsx@@ -1,7 +1,6 @@import React, { useState, useEffect } from "react";import {Modal,- Button,Text,Alert,Loader,@@ -9,6 +8,7 @@ import {Group,NumberInput,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { Z_INDEX_OVER_CONFIG_MODAL } from "@app/styles/zIndex";@@ -186,7 +186,7 @@ const UpdateSeatsModal: React.FC<UpdateSeatsModalProps> = ({</Alert><Group justify="flex-end" gap="sm">- <Button variant="outline" onClick={handleClose}>+ <Button variant="secondary" onClick={handleClose}>{t("common.cancel", "Cancel")}</Button><Buttondiff --git a/frontend/editor/src/proprietary/components/shared/UpgradeBanner.tsx b/frontend/editor/src/proprietary/components/shared/UpgradeBanner.tsxindex 649416f205..c3b5ae0307 100644--- a/frontend/editor/src/proprietary/components/shared/UpgradeBanner.tsx+++ b/frontend/editor/src/proprietary/components/shared/UpgradeBanner.tsx@@ -358,7 +358,7 @@ const UpgradeBanner: React.FC = () => {textColor="#fff"iconColor="#fff"closeIconColor="#fff"- buttonVariant="white"+ buttonVariant="filled"buttonColor="blue"minHeight={48}compactdiff --git a/frontend/editor/src/proprietary/components/shared/config/OverviewHeader.tsx b/frontend/editor/src/proprietary/components/shared/config/OverviewHeader.tsxindex 2307ed78bd..0b96811e18 100644--- a/frontend/editor/src/proprietary/components/shared/config/OverviewHeader.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/OverviewHeader.tsx@@ -1,4 +1,5 @@-import { Text, Button } from "@mantine/core";+import { Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useAuth } from "@app/auth/UseSession";@@ -45,7 +46,7 @@ export function OverviewHeader() {)}</div>{user && (- <Button color="red" variant="filled" onClick={handleLogout}>+ <Button accent="danger" onClick={handleLogout}>{t("account.overview.logOut", "Log out")}</Button>)}diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AccountSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AccountSection.tsxindex 40d16cfc56..457a02fef1 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/AccountSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AccountSection.tsx@@ -1,7 +1,6 @@import React, { useCallback, useEffect, useMemo, useState } from "react";import {Alert,- Button,Box,Group,Modal,@@ -11,6 +10,7 @@ import {Text,TextInput,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { alert as showToast } from "@app/components/toast";@@ -391,7 +391,7 @@ const AccountSection: React.FC = () => {{!isSsoUser && (<Button- variant="light"+ variant="secondary"leftSection={<LocalIcon icon="edit-rounded" />}onClick={() => setUsernameModalOpen(true)}>@@ -400,8 +400,8 @@ const AccountSection: React.FC = () => {)}<Button- variant="outline"- color="red"+ variant="secondary"+ accent="danger"leftSection={<LocalIcon icon="logout-rounded" />}onClick={handleLogout}>@@ -452,8 +452,8 @@ const AccountSection: React.FC = () => {</Button>) : (<Button- variant="outline"- color="red"+ variant="secondary"+ accent="danger"leftSection={<LocalIcon icon="close-rounded" />}onClick={() => {setMfaError("");@@ -546,7 +546,7 @@ const AccountSection: React.FC = () => {<Group justify="flex-end" gap="sm"><Button- variant="default"+ variant="secondary"onClick={() => setPasswordModalOpen(false)}>{t("common.cancel", "Cancel")}@@ -641,7 +641,7 @@ const AccountSection: React.FC = () => {required/><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={handleCloseMfaSetupModal}>+ <Button variant="secondary" onClick={handleCloseMfaSetupModal}>{t("common.cancel", "Cancel")}</Button><Button type="submit" loading={mfaLoading}>@@ -699,10 +699,10 @@ const AccountSection: React.FC = () => {required/><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={handleCloseMfaDisableModal}>+ <Button variant="secondary" onClick={handleCloseMfaDisableModal}>{t("common.cancel", "Cancel")}</Button>- <Button type="submit" color="red" loading={mfaLoading}>+ <Button accent="danger" type="submit" loading={mfaLoading}>{t("account.mfa.confirmDisable", "Disable")}</Button></Group>@@ -760,7 +760,7 @@ const AccountSection: React.FC = () => {<Group justify="flex-end" gap="sm"><Button- variant="default"+ variant="secondary"onClick={() => setUsernameModalOpen(false)}>{t("common.cancel", "Cancel")}diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminAdvancedSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminAdvancedSection.tsxindex e0b6a75e7c..9c81199ed5 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminAdvancedSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminAdvancedSection.tsx@@ -4,7 +4,6 @@ import { useTranslation } from "react-i18next";import {NumberInput,Switch,- Button,Stack,Paper,Text,@@ -14,6 +13,7 @@ import {TextInput,MultiSelect,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { alert } from "@app/components/toast";import RestartConfirmationModal from "@app/components/shared/config/RestartConfirmationModal";import { useRestartServer } from "@app/components/shared/config/useRestartServer";@@ -752,8 +752,8 @@ export default function AdminAdvancedSection() {)}<Group justify="flex-end"><Button- size="xs"- variant="light"+ size="sm"+ variant="secondary"onClick={handleDownloadTessdataLanguages}loading={downloadLanguagesLoading}disabled={diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminAuditSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminAuditSection.tsxindex 734334cdee..fe1fcb725d 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminAuditSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminAuditSection.tsx@@ -6,10 +6,10 @@ import {Alert,Stack,Text,- Button,Accordion,Center,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useNavigate } from "react-router-dom";import auditService, {@@ -174,8 +174,8 @@ const AdminAuditSection: React.FC = () => {)}</Text><Button- variant="light"- size="xs"+ variant="secondary"+ size="sm"onClick={() => navigate("/settings/adminSecurity#auditLogging")}rightSection={<LocalIcondiff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminDatabaseSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminDatabaseSection.tsxindex 102f7f8f25..6b34e79fa6 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminDatabaseSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminDatabaseSection.tsx@@ -5,7 +5,6 @@ import { useTranslation } from "react-i18next";import {NumberInput,Switch,- Button,Stack,Paper,Text,@@ -15,7 +14,6 @@ import {Select,Badge,Table,- ActionIcon,Tooltip,FileInput,Alert,@@ -23,6 +21,8 @@ import {Box,Modal,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { alert } from "@app/components/toast";import RestartConfirmationModal from "@app/components/shared/config/RestartConfirmationModal";import { useRestartServer } from "@app/components/shared/config/useRestartServer";@@ -804,7 +804,7 @@ export default function AdminDatabaseSection() {</Group><Group gap="xs"><Button- variant="light"+ variant="secondary"leftSection={<LocalIcon icon="refresh" width="1rem" height="1rem" />}@@ -849,7 +849,7 @@ export default function AdminDatabaseSection() {styles={{ input: { minWidth: 280 } }}/><Button- variant="outline"+ variant="secondary"onClick={handleUploadImport}loading={importingUpload}disabled={!loginEnabled || !isEmbeddedH2}@@ -927,11 +927,15 @@ export default function AdminDatabaseSection() {withArrow><ActionIcon- variant="subtle"+ variant="tertiary"onClick={() =>handleDownload(backup.fileName)}disabled={!loginEnabled || !isEmbeddedH2}+ aria-label={t(+ "admin.settings.database.download",+ "Download",+ )}>{downloadingFile === backup.fileName ? (<Loader size="xs" />@@ -952,11 +956,15 @@ export default function AdminDatabaseSection() {withArrow><ActionIcon- variant="subtle"+ variant="tertiary"onClick={() =>handleImportExisting(backup.fileName)}disabled={!loginEnabled || !isEmbeddedH2}+ aria-label={t(+ "admin.settings.database.import",+ "Import",+ )}>{importingBackupFile === backup.fileName ? (<Loader size="xs" />@@ -977,12 +985,16 @@ export default function AdminDatabaseSection() {withArrow><ActionIcon- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"onClick={() =>handleDeleteClick(backup.fileName)}disabled={!loginEnabled || !isEmbeddedH2}+ aria-label={t(+ "admin.settings.database.delete",+ "Delete",+ )}>{deletingFile === backup.fileName ? (<Loader size="xs" />@@ -1068,14 +1080,14 @@ export default function AdminDatabaseSection() {</Stack><Group justify="flex-end" gap="sm"><Button- variant="default"+ variant="secondary"onClick={closeConfirmImportModal}disabled={importingUpload}>{t("cancel", "Cancel")}</Button><Button- color="red"+ accent="danger"onClick={handleConfirmImport}loading={importingUpload}disabled={confirmInput.length === 0}@@ -1112,14 +1124,14 @@ export default function AdminDatabaseSection() {</Alert><Group justify="flex-end" gap="sm"><Button- variant="default"+ variant="secondary"onClick={() => setDeleteConfirmFile(null)}disabled={deletingFile !== null}>{t("cancel", "Cancel")}</Button><Button- color="red"+ accent="danger"onClick={() =>deleteConfirmFile && handleDelete(deleteConfirmFile)}diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsxindex aaf73ec281..5e78d21a22 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx@@ -12,9 +12,9 @@ import {Group,MultiSelect,Badge,- SegmentedControl,Select,} from "@mantine/core";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { alert } from "@app/components/toast";import RestartConfirmationModal from "@app/components/shared/config/RestartConfirmationModal";import { useRestartServer } from "@app/components/shared/config/useRestartServer";@@ -499,7 +499,7 @@ export default function AdminGeneralSection() {<SegmentedControlvalue={logoStyleValue}onChange={handleLogoStyleChange}- data={[+ options={[{value: "classic",label: (diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminUsageSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminUsageSection.tsxindex e077fe36fd..6b46789bdd 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminUsageSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminUsageSection.tsx@@ -1,14 +1,7 @@import React, { useState, useEffect, useCallback } from "react";-import {- Stack,- Group,- Text,- Button,- SegmentedControl,- Loader,- Alert,- Card,-} from "@mantine/core";+import { Stack, Group, Text, Loader, Alert, Card } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import { useNavigate } from "react-router-dom";import usageAnalyticsService, {@@ -300,8 +293,8 @@ const AdminUsageSection: React.FC = () => {</Text><Group gap="sm"><Button- variant="light"- size="xs"+ variant="secondary"+ size="sm"onClick={() => navigate("/settings/adminSecurity")}rightSection={<LocalIcon@@ -314,8 +307,8 @@ const AdminUsageSection: React.FC = () => {{t("usage.configureSettings", "Configure Analytics Settings")}</Button><Button- variant="light"- size="xs"+ variant="secondary"+ size="sm"onClick={() => navigate("/settings/adminSecurity#auditLogging")}rightSection={<LocalIcon@@ -342,24 +335,26 @@ const AdminUsageSection: React.FC = () => {onChange={(value) =>setDisplayMode(value as "top10" | "top20" | "all")}- disabled={showDemoData}- data={[+ options={[{value: "top10",label: t("usage.controls.top10", "Top 10"),+ disabled: showDemoData,},{value: "top20",label: t("usage.controls.top20", "Top 20"),+ disabled: showDemoData,},{value: "all",label: t("usage.controls.all", "All"),+ disabled: showDemoData,},]}/><Button- variant="outline"+ variant="secondary"leftSection={<LocalIcon icon="refresh" width="1rem" height="1rem" />}@@ -379,19 +374,21 @@ const AdminUsageSection: React.FC = () => {<SegmentedControlvalue={dataType}onChange={(value) => setDataType(value as "all" | "api" | "ui")}- disabled={showDemoData}- data={[+ options={[{value: "all",label: t("usage.controls.dataType.all", "All"),+ disabled: showDemoData,},{value: "api",label: t("usage.controls.dataType.api", "API"),+ disabled: showDemoData,},{value: "ui",label: t("usage.controls.dataType.ui", "UI"),+ disabled: showDemoData,},]}/>diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/LoginAgreementEditor.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/LoginAgreementEditor.tsxindex a6c3af0bd2..9af89dedad 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/LoginAgreementEditor.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/LoginAgreementEditor.tsx@@ -3,7 +3,6 @@ import { useNavigate } from "react-router-dom";import { useTranslation } from "react-i18next";import {Anchor,- Button,Group,Loader,Paper,@@ -14,6 +13,7 @@ import {Textarea,Tooltip,} from "@mantine/core";+import { Button } from "@app/ui/Button";import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";import Markdown from "react-markdown";import remarkGfm from "remark-gfm";@@ -201,6 +201,7 @@ export default function LoginAgreementEditor({style={{ flex: 1, maxWidth: 340 }}/><Button+ variant="primary"onClick={handleSave}loading={saving}disabled={disabled || loading || loadFailed || !dirty}diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/PeopleSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/PeopleSection.tsxindex 454b9e138c..68c2f49536 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/PeopleSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/PeopleSection.tsx@@ -4,10 +4,8 @@ import { Trans, useTranslation } from "react-i18next";import {Stack,Text,- Button,TextInput,Table,- ActionIcon,Menu,Badge,Loader,@@ -15,11 +13,12 @@ import {Modal,Select,Tooltip,- CloseButton,Avatar,Box,type ComboboxItem,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import { alert } from "@app/components/toast";import {@@ -507,8 +506,8 @@ export default function PeopleSection() {)}</Badge><Button- size="compact-sm"- variant="outline"+ size="sm"+ variant="secondary"onClick={() => navigate("/settings/adminPlan")}>{t("workspace.people.actions.upgrade", "Upgrade")}@@ -550,7 +549,7 @@ export default function PeopleSection() {<Text size="sm" c="dimmed" span>•</Text>- <UpdateSeatsButton size="xs" onSuccess={fetchData} />+ <UpdateSeatsButton size="sm" onSuccess={fetchData} /></>)}</Group>@@ -583,7 +582,7 @@ export default function PeopleSection() {(licenseInfo ? licenseInfo.availableSlots === 0 : false)}>- {t("workspace.people.addMembers")}+ {t("workspace.people.addMembers", "Add Members")}</Button></Tooltip></Group>@@ -783,7 +782,11 @@ export default function PeopleSection() {withArrowzIndex={Z_INDEX_OVER_CONFIG_MODAL + 10}>- <ActionIcon variant="subtle" size="sm">+ <ActionIcon+ variant="tertiary"+ size="sm"+ aria-label={t("workspace.people.userInfo", "User info")}+ ><LocalIcon icon="info" width="1rem" height="1rem" /></ActionIcon></Tooltip>@@ -792,7 +795,14 @@ export default function PeopleSection() {{!isCurrentUser(user) && (<Menu position="bottom-end" withinPortal><Menu.Target>- <ActionIcon variant="subtle" disabled={!loginEnabled}>+ <ActionIcon+ variant="tertiary"+ disabled={!loginEnabled}+ aria-label={t(+ "workspace.people.memberActions",+ "Member actions",+ )}+ ><LocalIconicon="more-vert"width="1rem"@@ -993,16 +1003,20 @@ export default function PeopleSection() {withCloseButton={false}><Box pos="relative">- <CloseButton+ <ActionIcononClick={closeEditModal}size="lg"+ variant="tertiary"+ aria-label={t("close", "Close")}style={{position: "absolute",top: -8,right: -8,zIndex: 1,}}- />+ >+ <LocalIcon icon="close" width="1.25rem" height="1.25rem" />+ </ActionIcon><Stack gap="lg" pt="md">{/* Header with Icon */}<Stack gap="md" align="center">@@ -1077,7 +1091,7 @@ export default function PeopleSection() {loading={processing}fullWidthsize="md"- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{t("workspace.people.editMember.submit")}</Button>diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/TeamDetailsSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/TeamDetailsSection.tsxindex 90f4fda9e0..cabdfb642c 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/TeamDetailsSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/TeamDetailsSection.tsx@@ -4,20 +4,19 @@ import { useTranslation } from "react-i18next";import {Stack,Text,- Button,Table,- ActionIcon,Badge,Loader,Group,Modal,Select,- CloseButton,Tooltip,Menu,Avatar,Box,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import { alert } from "@app/components/toast";import { teamService, Team } from "@app/services/teamService";@@ -354,7 +353,7 @@ export default function TeamDetailsSection({<Text size="sm" c="red">{t("workspace.teams.teamNotFound", "Team not found")}</Text>- <Button variant="light" onClick={onBack}>+ <Button variant="secondary" onClick={onBack}>{t("workspace.teams.backToTeams", "Back to Teams")}</Button></Stack>@@ -365,7 +364,11 @@ export default function TeamDetailsSection({<Stack gap="lg">{/* Header with back button */}<Group>- <ActionIcon variant="subtle" onClick={onBack}>+ <ActionIcon+ variant="tertiary"+ onClick={onBack}+ aria-label={t("common.back", "Back")}+ ><LocalIcon icon="arrow-back" width="1.2rem" height="1.2rem" /></ActionIcon><div style={{ flex: 1 }}>@@ -562,7 +565,14 @@ export default function TeamDetailsSection({withArrowzIndex={Z_INDEX_OVER_CONFIG_MODAL + 10}>- <ActionIcon variant="subtle" color="gray" size="sm">+ <ActionIcon+ variant="tertiary"+ size="sm"+ aria-label={t(+ "workspace.people.userInfo",+ "User info",+ )}+ ><LocalIcon icon="info" width="1rem" height="1rem" /></ActionIcon></Tooltip>@@ -570,7 +580,13 @@ export default function TeamDetailsSection({{/* Actions menu */}<Menu position="bottom-end" withinPortal><Menu.Target>- <ActionIcon variant="subtle" color="gray">+ <ActionIcon+ variant="tertiary"+ aria-label={t(+ "workspace.people.memberActions",+ "Member actions",+ )}+ ><LocalIconicon="more-vert"width="1rem"@@ -695,16 +711,20 @@ export default function TeamDetailsSection({withCloseButton={false}><div style={{ position: "relative" }}>- <CloseButton+ <ActionIcononClick={() => setAddMemberModalOpened(false)}size="lg"+ variant="tertiary"+ aria-label={t("common.close", "Close")}style={{position: "absolute",top: -8,right: -8,zIndex: 1,}}- />+ >+ <LocalIcon icon="close-rounded" />+ </ActionIcon><Stack gap="lg" pt="md">{/* Header with Icon */}<Stack gap="md" align="center">@@ -755,7 +775,7 @@ export default function TeamDetailsSection({loading={processing}fullWidthsize="md"- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{t("workspace.teams.addMemberToTeam.submit")}</Button>@@ -774,16 +794,20 @@ export default function TeamDetailsSection({withCloseButton={false}><div style={{ position: "relative" }}>- <CloseButton+ <ActionIcononClick={() => setChangeTeamModalOpened(false)}size="lg"+ variant="tertiary"+ aria-label={t("common.close", "Close")}style={{position: "absolute",top: -8,right: -8,zIndex: 1,}}- />+ >+ <LocalIcon icon="close-rounded" />+ </ActionIcon><Stack gap="lg" pt="md">{/* Header with Icon */}<Stack gap="md" align="center">@@ -828,7 +852,7 @@ export default function TeamDetailsSection({loading={processing}fullWidthsize="md"- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{t("workspace.teams.changeTeam.submit", "Change Team")}</Button>diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/TeamsSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/TeamsSection.tsxindex e3cd79be02..4559296afe 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/TeamsSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/TeamsSection.tsx@@ -4,19 +4,18 @@ import { useTranslation } from "react-i18next";import {Stack,Text,- Button,TextInput,Table,- ActionIcon,Menu,Badge,Loader,Group,Modal,Select,- CloseButton,Tooltip,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import LocalIcon from "@app/components/shared/LocalIcon";import { alert } from "@app/components/toast";import { teamService, Team } from "@app/services/teamService";@@ -380,9 +379,12 @@ export default function TeamsSection() {<Menu position="bottom-end" withinPortal><Menu.Target><ActionIcon- variant="subtle"- color="gray"+ variant="tertiary"disabled={!loginEnabled}+ aria-label={t(+ "workspace.teams.teamActions",+ "Team actions",+ )}><LocalIconicon="more-vert"@@ -456,16 +458,20 @@ export default function TeamsSection() {withCloseButton={false}><div style={{ position: "relative" }}>- <CloseButton+ <ActionIcononClick={() => setCreateModalOpened(false)}size="lg"+ variant="tertiary"+ aria-label={t("close", "Close")}style={{position: "absolute",top: -8,right: -8,zIndex: 1,}}- />+ >+ <LocalIcon icon="close" width="1.25rem" height="1.25rem" />+ </ActionIcon><Stack gap="lg" pt="md">{/* Header with Icon */}<Stack gap="md" align="center">@@ -493,7 +499,7 @@ export default function TeamsSection() {loading={processing}fullWidthsize="md"- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{t("workspace.teams.createTeam.submit")}</Button>@@ -512,16 +518,20 @@ export default function TeamsSection() {withCloseButton={false}><div style={{ position: "relative" }}>- <CloseButton+ <ActionIcononClick={() => setRenameModalOpened(false)}size="lg"+ variant="tertiary"+ aria-label={t("close", "Close")}style={{position: "absolute",top: -8,right: -8,zIndex: 1,}}- />+ >+ <LocalIcon icon="close" width="1.25rem" height="1.25rem" />+ </ActionIcon><Stack gap="lg" pt="md">{/* Header with Icon */}<Stack gap="md" align="center">@@ -555,7 +565,7 @@ export default function TeamsSection() {loading={processing}fullWidthsize="md"- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{t("workspace.teams.renameTeam.submit")}</Button>@@ -574,16 +584,20 @@ export default function TeamsSection() {withCloseButton={false}><div style={{ position: "relative" }}>- <CloseButton+ <ActionIcononClick={() => setAddMemberModalOpened(false)}size="lg"+ variant="tertiary"+ aria-label={t("close", "Close")}style={{position: "absolute",top: -8,right: -8,zIndex: 1,}}- />+ >+ <LocalIcon icon="close" width="1.25rem" height="1.25rem" />+ </ActionIcon><Stack gap="lg" pt="md">{/* Header with Icon */}<Stack gap="md" align="center">@@ -634,7 +648,7 @@ export default function TeamsSection() {loading={processing}fullWidthsize="md"- mt="md"+ style={{ marginTop: "var(--mantine-spacing-md)" }}>{t("workspace.teams.addMemberToTeam.submit")}</Button>diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/apiKeys/ApiKeySection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/apiKeys/ApiKeySection.tsxindex 8fc8b6cdd4..f05817a957 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/apiKeys/ApiKeySection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/apiKeys/ApiKeySection.tsx@@ -1,5 +1,6 @@import React from "react";-import { Box, Button, Group, Paper } from "@mantine/core";+import { Box, Group, Paper } from "@mantine/core";+import { Button } from "@app/ui/Button";import LocalIcon from "@app/components/shared/LocalIcon";import FitText from "@app/components/shared/FitText";import { useTranslation } from "react-i18next";@@ -56,18 +57,14 @@ export default function ApiKeySection({</Box><Buttonsize="sm"- variant="light"+ variant="secondary"+ accent="neutral"onClick={() => onCopy(publicKey, "public")}leftSection={<LocalIcon icon="content-copy-rounded" width={14} height={14} />}- styles={{- root: {- background: "var(--api-keys-button-bg)",- color: "var(--api-keys-button-color)",- border: "none",- marginLeft: 12,- },+ style={{+ marginLeft: 12,}}aria-label={t("config.apiKeys.copyKeyAriaLabel", "Copy API key")}>@@ -77,18 +74,14 @@ export default function ApiKeySection({</Button><Buttonsize="sm"- variant="light"+ variant="secondary"+ accent="neutral"onClick={onRefresh}leftSection={<LocalIcon icon="refresh-rounded" width={14} height={14} />}- styles={{- root: {- background: "var(--api-keys-button-bg)",- color: "var(--api-keys-button-color)",- border: "none",- marginLeft: 8,- },+ style={{+ marginLeft: 8,}}disabled={disabled}aria-label={t("config.apiKeys.refreshAriaLabel", "Refresh API key")}diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/apiKeys/RefreshModal.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/apiKeys/RefreshModal.tsxindex ea3539d95a..11f90f4d76 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/apiKeys/RefreshModal.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/apiKeys/RefreshModal.tsx@@ -1,5 +1,6 @@import React from "react";-import { Modal, Stack, Text, Group, Button } from "@mantine/core";+import { Modal, Stack, Text, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { Z_INDEX_OVER_CONFIG_MODAL } from "@app/styles/zIndex";@@ -44,10 +45,10 @@ export default function RefreshModal({)}</Text><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={onClose}>+ <Button variant="secondary" onClick={onClose}>{t("common.cancel", "Cancel")}</Button>- <Button color="red" onClick={onConfirm}>+ <Button accent="danger" onClick={onConfirm}>{t("config.apiKeys.refreshModal.confirmCta", "Refresh Keys")}</Button></Group>diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditChartsSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditChartsSection.tsxindex 742c0ceb21..cf205a9ccc 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditChartsSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditChartsSection.tsx@@ -4,12 +4,12 @@ import {Text,Group,Stack,- SegmentedControl,Loader,Alert,Box,SimpleGrid,} from "@mantine/core";+import { SegmentedControl } from "@app/ui/SegmentedControl";import {AreaChart,Area,@@ -161,13 +161,24 @@ const AuditChartsSection: React.FC<AuditChartsSectionProps> = ({<SegmentedControlvalue={timePeriod}onChange={(value) => {- onTimePeriodChange?.(value as "day" | "week" | "month");+ onTimePeriodChange?.(value);}}- disabled={!loginEnabled}- data={[- { label: t("audit.charts.day", "Day"), value: "day" },- { label: t("audit.charts.week", "Week"), value: "week" },- { label: t("audit.charts.month", "Month"), value: "month" },+ options={[+ {+ label: t("audit.charts.day", "Day"),+ value: "day",+ disabled: !loginEnabled,+ },+ {+ label: t("audit.charts.week", "Week"),+ value: "week",+ disabled: !loginEnabled,+ },+ {+ label: t("audit.charts.month", "Month"),+ value: "month",+ disabled: !loginEnabled,+ },]}/></Group>diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditClearDataSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditClearDataSection.tsxindex a2d26aecf0..c166e2fc5b 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditClearDataSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditClearDataSection.tsx@@ -4,12 +4,12 @@ import {Stack,Text,PasswordInput,- Button,Group,Alert,Code,Badge,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import auditService from "@app/services/auditService";import LocalIcon from "@app/components/shared/LocalIcon";@@ -172,11 +172,15 @@ const AuditClearDataSection: React.FC<AuditClearDataSectionProps> = ({)}<Group justify="space-between">- <Button variant="default" onClick={resetForm} disabled={clearing}>+ <Button+ variant="secondary"+ onClick={resetForm}+ disabled={clearing}+ >{t("audit.clearData.cancel", "Cancel")}</Button><Button- color="red"+ accent="danger"onClick={handleClearData}loading={clearing}disabled={@@ -229,7 +233,7 @@ const AuditClearDataSection: React.FC<AuditClearDataSectionProps> = ({</Group><Button- color="red"+ accent="danger"onClick={handleInitiateDeletion}disabled={!loginEnabled}fullWidthdiff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditEventsTable.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditEventsTable.tsxindex 756117214a..feca3696d4 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditEventsTable.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditEventsTable.tsx@@ -4,7 +4,6 @@ import {Text,Group,Stack,- Button,Pagination,Modal,Code,@@ -12,8 +11,8 @@ import {Alert,Table,Badge,- UnstyledButton,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import auditService, {AuditEvent,@@ -276,7 +275,10 @@ const AuditEventsTable: React.FC<AuditEventsTableProps> = ({}}fz="sm">- <UnstyledButton+ <Button+ type="button"+ variant="tertiary"+ hover={false}onClick={() => toggleSort("timestamp")}style={{display: "flex",@@ -292,7 +294,7 @@ const AuditEventsTable: React.FC<AuditEventsTableProps> = ({width="0.9rem"height="0.9rem"/>- </UnstyledButton>+ </Button></Table.Th><Table.Thstyle={{@@ -302,7 +304,10 @@ const AuditEventsTable: React.FC<AuditEventsTableProps> = ({}}fz="sm">- <UnstyledButton+ <Button+ type="button"+ variant="tertiary"+ hover={false}onClick={() => toggleSort("eventType")}style={{display: "flex",@@ -318,7 +323,7 @@ const AuditEventsTable: React.FC<AuditEventsTableProps> = ({width="0.9rem"height="0.9rem"/>- </UnstyledButton>+ </Button></Table.Th><Table.Thstyle={{@@ -328,7 +333,10 @@ const AuditEventsTable: React.FC<AuditEventsTableProps> = ({}}fz="sm">- <UnstyledButton+ <Button+ type="button"+ variant="tertiary"+ hover={false}onClick={() => toggleSort("username")}style={{display: "flex",@@ -344,7 +352,7 @@ const AuditEventsTable: React.FC<AuditEventsTableProps> = ({width="0.9rem"height="0.9rem"/>- </UnstyledButton>+ </Button></Table.Th><Table.Thstyle={{@@ -482,8 +490,8 @@ const AuditEventsTable: React.FC<AuditEventsTableProps> = ({)}<Table.Td ta="center"><Button- variant="subtle"- size="xs"+ variant="tertiary"+ size="sm"onClick={() => setSelectedEvent(event)}disabled={!loginEnabled}>diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditExportSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditExportSection.tsxindex a0ad482779..4e0f808649 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditExportSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditExportSection.tsx@@ -1,13 +1,7 @@import React, { useState } from "react";-import {- Card,- Text,- Group,- Stack,- Button,- SegmentedControl,- Checkbox,-} from "@mantine/core";+import { Card, Text, Group, Stack, Checkbox } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import auditService from "@app/services/auditService";import LocalIcon from "@app/components/shared/LocalIcon";@@ -103,12 +97,11 @@ const AuditExportSection: React.FC<AuditExportSectionProps> = ({value={exportFormat}onChange={(value) => {if (!loginEnabled) return;- setExportFormat(value as "csv" | "json");+ setExportFormat(value);}}- disabled={!loginEnabled}- data={[- { label: "CSV", value: "csv" },- { label: "JSON", value: "json" },+ options={[+ { label: "CSV", value: "csv", disabled: !loginEnabled },+ { label: "JSON", value: "json", disabled: !loginEnabled },]}/></div>diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditFiltersForm.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditFiltersForm.tsxindex da7c46ec59..5cc4313dbf 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditFiltersForm.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/audit/AuditFiltersForm.tsx@@ -1,12 +1,6 @@import React from "react";-import {- Group,- MultiSelect,- Button,- Stack,- SimpleGrid,- Text,-} from "@mantine/core";+import { Group, MultiSelect, Stack, SimpleGrid, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { DateInput } from "@mantine/dates";import { useTranslation } from "react-i18next";import { AuditFilters } from "@app/services/auditService";@@ -102,32 +96,32 @@ const AuditFiltersForm: React.FC<AuditFiltersFormProps> = ({</Text><Group gap="xs"><Button- variant={isPresetActive("today") ? "filled" : "light"}- size="xs"+ variant={isPresetActive("today") ? "primary" : "secondary"}+ size="sm"onClick={() => handleQuickPreset("today")}disabled={disabled}>{t("audit.filters.today", "Today")}</Button><Button- variant={isPresetActive("last7") ? "filled" : "light"}- size="xs"+ variant={isPresetActive("last7") ? "primary" : "secondary"}+ size="sm"onClick={() => handleQuickPreset("last7")}disabled={disabled}>{t("audit.filters.last7Days", "Last 7 days")}</Button><Button- variant={isPresetActive("last30") ? "filled" : "light"}- size="xs"+ variant={isPresetActive("last30") ? "primary" : "secondary"}+ size="sm"onClick={() => handleQuickPreset("last30")}disabled={disabled}>{t("audit.filters.last30Days", "Last 30 days")}</Button><Button- variant={isPresetActive("thisMonth") ? "filled" : "light"}- size="xs"+ variant={isPresetActive("thisMonth") ? "primary" : "secondary"}+ size="sm"onClick={() => handleQuickPreset("thisMonth")}disabled={disabled}>@@ -216,7 +210,7 @@ const AuditFiltersForm: React.FC<AuditFiltersFormProps> = ({{/* Clear Button */}<Group justify="flex-end"><Button- variant="outline"+ variant="secondary"size="sm"onClick={onClearFilters}disabled={disabled}diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/AvailablePlansSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/AvailablePlansSection.tsxindex 6ac4feb2e2..16e2bafa5e 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/AvailablePlansSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/AvailablePlansSection.tsx@@ -1,5 +1,6 @@import React, { useState, useMemo } from "react";-import { Button, Collapse, Select, Group } from "@mantine/core";+import { Collapse, Select, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import licenseService, {PlanTier,@@ -128,7 +129,7 @@ const AvailablePlansSection: React.FC<AvailablePlansSectionProps> = ({<div style={{ textAlign: "center" }}><Button- variant="subtle"+ variant="tertiary"onClick={() => setShowComparison(!showComparison)}>{showComparisondiff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/LicenseKeySection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/LicenseKeySection.tsxindex ffd89ec7b0..4b890e683a 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/LicenseKeySection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/LicenseKeySection.tsx@@ -1,6 +1,5 @@import React, { useState } from "react";import {- Button,Collapse,Alert,TextInput,@@ -8,9 +7,10 @@ import {Stack,Group,Text,- SegmentedControl,- FileButton,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { FilePicker } from "@app/ui/FilePicker";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { alert } from "@app/components/toast";@@ -113,7 +113,7 @@ const LicenseKeySection: React.FC<LicenseKeySectionProps> = ({return (<div><Button- variant="subtle"+ variant="tertiary"leftSection={<LocalIconicon={@@ -238,13 +238,14 @@ const LicenseKeySection: React.FC<LicenseKeySectionProps> = ({if (value === "text") setLicenseFile(null);if (value === "file") setLicenseKeyInput("");}}- data={[+ options={[{label: t("admin.settings.premium.inputMethod.text","License Key",),value: "text",+ disabled: !loginEnabled || savingLicense,},{label: t(@@ -252,9 +253,9 @@ const LicenseKeySection: React.FC<LicenseKeySectionProps> = ({"Certificate File",),value: "file",+ disabled: !loginEnabled || savingLicense,},]}- disabled={!loginEnabled || savingLicense}/>{/* Input area */}@@ -292,33 +293,26 @@ const LicenseKeySection: React.FC<LicenseKeySectionProps> = ({"Upload your .lic or .cert license file",)}</Text>- <FileButton+ <FilePickeronChange={setLicenseFile}accept=".lic,.cert"disabled={!loginEnabled || savingLicense}+ variant="secondary"+ leftSection={+ <LocalIcon+ icon="upload-file-rounded"+ width="1rem"+ height="1rem"+ />+ }>- {(props) => (- <Button- {...props}- variant="outline"- leftSection={- <LocalIcon- icon="upload-file-rounded"- width="1rem"- height="1rem"- />- }- disabled={!loginEnabled || savingLicense}- >- {licenseFile- ? licenseFile.name- : t(- "admin.settings.premium.file.choose",- "Choose License File",- )}- </Button>- )}- </FileButton>+ {licenseFile+ ? licenseFile.name+ : t(+ "admin.settings.premium.file.choose",+ "Choose License File",+ )}+ </FilePicker>{licenseFile && (<Text size="xs" c="dimmed" mt="xs">{t(diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/PlanCard.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/PlanCard.tsxindex 84a8abe5e5..747448f913 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/PlanCard.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/PlanCard.tsx@@ -1,5 +1,6 @@import React from "react";-import { Button, Card, Text, Stack, Divider, Tooltip } from "@mantine/core";+import { Card, Text, Stack, Divider, Tooltip } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { PlanTierGroup, LicenseInfo } from "@app/services/licenseService";import { PricingBadge } from "@app/components/shared/stripeCheckout/components/PricingBadge";@@ -78,7 +79,7 @@ const PlanCard: React.FC<PlanCardProps> = ({<div style={{ flexGrow: 1 }} />- <Button variant="filled" disabled fullWidth className="plan-button">+ <Button disabled fullWidth className="plan-button">{isCurrentTier? t("plan.current", "Current Plan"): t("plan.free.included", "Included")}@@ -190,7 +191,6 @@ const PlanCard: React.FC<PlanCardProps> = ({withArrow><Button- variant="filled"fullWidthonClick={() =>isCurrentTier && onManageClickdiff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/StaticCheckoutModal.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/StaticCheckoutModal.tsxindex dbac0833ce..05c0e0ec7f 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/StaticCheckoutModal.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/StaticCheckoutModal.tsx@@ -3,14 +3,14 @@ import {Modal,Text,Group,- ActionIcon,Stack,Paper,Grid,TextInput,- Button,Alert,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import { EmailStage } from "@app/components/shared/stripeCheckout/stages/EmailStage";@@ -314,7 +314,7 @@ const StaticCheckoutModal: React.FC<StaticCheckoutModalProps> = ({<Group justify="space-between"><Button- variant="subtle"+ variant="tertiary"onClick={handleClose}disabled={savingLicense}>@@ -362,7 +362,7 @@ const StaticCheckoutModal: React.FC<StaticCheckoutModalProps> = ({<Group gap="sm" wrap="nowrap">{canGoBack && (<ActionIcon- variant="subtle"+ variant="tertiary"size="lg"onClick={handleGoBack}aria-label={t("common.back", "Back")}diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/StaticPlanSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/StaticPlanSection.tsxindex f0ab62a20d..ccceaaf16c 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/StaticPlanSection.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/StaticPlanSection.tsx@@ -1,13 +1,6 @@import React, { useState } from "react";-import {- Card,- Text,- Stack,- Button,- Collapse,- Divider,- Tooltip,-} from "@mantine/core";+import { Card, Text, Stack, Collapse, Divider, Tooltip } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { alert } from "@app/components/toast";import { LicenseInfo, mapLicenseToTier } from "@app/services/licenseService";@@ -222,7 +215,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({if (plan.id === "free") {return (<Button- variant="filled"+ variant="primary"disabledfullWidthclassName="plan-button"@@ -239,7 +232,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({if (currentTier === "free") {return (<Button- variant="filled"+ variant="primary"fullWidthonClick={() => handleOpenCheckout("server", false)}className="plan-button"@@ -251,7 +244,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({if (isCurrent) {return (<Button- variant="filled"+ variant="primary"fullWidthonClick={handleManageBilling}className="plan-button"@@ -263,7 +256,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({if (isDowngradePlan) {return (<Button- variant="filled"+ variant="primary"disabledfullWidthclassName="plan-button"@@ -287,7 +280,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({withArrow><Button- variant="filled"+ variant="primary"disabledfullWidthclassName="plan-button"@@ -304,7 +297,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({// TODO: Re-enable checkout flow when account syncing is ready// return (// <Button- // variant="filled"+ // variant="primary"// fullWidth// onClick={() => handleOpenCheckout('enterprise', true)}// className="plan-button"@@ -314,7 +307,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({// );return (<Button- variant="filled"+ variant="primary"fullWidthdisabledclassName="plan-button"@@ -326,7 +319,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({if (isCurrent) {return (<Button- variant="filled"+ variant="primary"fullWidthonClick={handleManageBilling}className="plan-button"@@ -347,7 +340,7 @@ const StaticPlanSection: React.FC<StaticPlanSectionProps> = ({{/* Feature Comparison Toggle */}<div style={{ textAlign: "center", marginTop: "1rem" }}><Button- variant="subtle"+ variant="tertiary"onClick={() => setShowComparison(!showComparison)}>{showComparisondiff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/StripeCheckout.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/StripeCheckout.tsxindex 80772c8c97..e0b2c1a361 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/StripeCheckout.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/StripeCheckout.tsx@@ -1,5 +1,6 @@import React, { useEffect } from "react";-import { Modal, Text, Group, ActionIcon } from "@mantine/core";+import { Modal, Text, Group } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import LocalIcon from "@app/components/shared/LocalIcon";import licenseService from "@app/services/licenseService";@@ -275,7 +276,7 @@ const StripeCheckout: React.FC<StripeCheckoutProps> = ({<Group gap="sm" wrap="nowrap">{canGoBack && (<ActionIcon- variant="subtle"+ variant="tertiary"size="lg"onClick={navigation.goBack}aria-label={t("common.back", "Back")}diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/EmailStage.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/EmailStage.tsxindex 4758d5d4d1..38efa7b308 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/EmailStage.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/EmailStage.tsx@@ -1,5 +1,6 @@import React from "react";-import { Stack, Text, TextInput, Button } from "@mantine/core";+import { Stack, Text, TextInput } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";interface EmailStageProps {@@ -44,7 +45,7 @@ export const EmailStage: React.FC<EmailStageProps> = ({}}/>- <Button size="lg" onClick={onSubmit} disabled={!emailInput.trim()}>+ <Button onClick={onSubmit} disabled={!emailInput.trim()}>{t("payment.emailStage.continue", "Continue")}</Button></Stack>diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/ErrorStage.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/ErrorStage.tsxindex 3881ab25fa..fc31369079 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/ErrorStage.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/ErrorStage.tsx@@ -1,5 +1,6 @@import React from "react";-import { Alert, Stack, Text, Button } from "@mantine/core";+import { Alert, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";interface ErrorStageProps {@@ -14,7 +15,7 @@ export const ErrorStage: React.FC<ErrorStageProps> = ({ error, onClose }) => {<Alert color="red" title={t("payment.error", "Payment Error")}><Stack gap="md"><Text size="sm">{error}</Text>- <Button variant="outline" onClick={onClose}>+ <Button variant="secondary" onClick={onClose}>{t("common.close", "Close")}</Button></Stack>diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PlanSelectionStage.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PlanSelectionStage.tsxindex 4928ee4fa8..d74afc4d99 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PlanSelectionStage.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PlanSelectionStage.tsx@@ -1,13 +1,6 @@import React from "react";-import {- Stack,- Button,- Text,- Grid,- Paper,- Alert,- Divider,-} from "@mantine/core";+import { Stack, Text, Grid, Paper, Alert, Divider } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { PlanTierGroup } from "@app/services/licenseService";import { SavingsCalculation } from "@app/components/shared/stripeCheckout/types/checkout";@@ -87,7 +80,7 @@ export const PlanSelectionStage: React.FC<PlanSelectionStageProps> = ({)}<div style={{ marginTop: "auto", paddingTop: "1rem" }}>- <Button variant="light" fullWidth size="lg">+ <Button variant="secondary" fullWidth>{t("payment.planStage.selectMonthly", "Select Monthly")}</Button></div>@@ -200,7 +193,7 @@ export const PlanSelectionStage: React.FC<PlanSelectionStageProps> = ({)}<div style={{ marginTop: "auto", paddingTop: "1rem" }}>- <Button variant="filled" fullWidth size="lg">+ <Button fullWidth>{t("payment.planStage.selectYearly", "Select Yearly")}</Button></div>diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/SuccessStage.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/SuccessStage.tsxindex 9f0bff06df..a25f2d9705 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/SuccessStage.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/SuccessStage.tsx@@ -1,14 +1,6 @@import React from "react";-import {- Alert,- Stack,- Text,- Paper,- Code,- Button,- Group,- Loader,-} from "@mantine/core";+import { Alert, Stack, Text, Paper, Code, Group, Loader } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { PollingStatus } from "@app/components/shared/stripeCheckout/types/checkout";@@ -63,7 +55,7 @@ export const SuccessStage: React.FC<SuccessStageProps> = ({</Text><Code block>{licenseKey}</Code><Button- variant="light"+ variant="secondary"size="sm"onClick={() => navigator.clipboard.writeText(licenseKey)}>@@ -113,7 +105,10 @@ export const SuccessStage: React.FC<SuccessStageProps> = ({</Text>)}- <Button onClick={onClose} mt="md">+ <Button+ onClick={onClose}+ style={{ marginTop: "var(--mantine-spacing-md)" }}+ >{t("common.close", "Close")}</Button></Stack>diff --git a/frontend/editor/src/proprietary/components/watchedFolders/CardExpansionModal.tsx b/frontend/editor/src/proprietary/components/watchedFolders/CardExpansionModal.tsxindex dd4bfa41fe..f5fc841689 100644--- a/frontend/editor/src/proprietary/components/watchedFolders/CardExpansionModal.tsx+++ b/frontend/editor/src/proprietary/components/watchedFolders/CardExpansionModal.tsx@@ -1,7 +1,8 @@import React, { useState, useEffect } from "react";import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";-import { Text, ActionIcon, ScrollArea } from "@mantine/core";+import { Text, ScrollArea } from "@mantine/core";+import { ActionIcon } from "@app/ui/ActionIcon";import CloseIcon from "@mui/icons-material/Close";import {CardModalPhase,@@ -198,9 +199,8 @@ export function CardExpansionModal({</div><ActionIcon- variant="subtle"+ variant="tertiary"size="lg"- color="gray"onClick={onClose}aria-label={t("close", "Close")}style={{diff --git a/frontend/editor/src/proprietary/components/watchedFolders/DeleteFolderConfirmModal.tsx b/frontend/editor/src/proprietary/components/watchedFolders/DeleteFolderConfirmModal.tsxindex bd398858a7..35b5bd95e9 100644--- a/frontend/editor/src/proprietary/components/watchedFolders/DeleteFolderConfirmModal.tsx+++ b/frontend/editor/src/proprietary/components/watchedFolders/DeleteFolderConfirmModal.tsx@@ -1,4 +1,5 @@-import { Modal, Text, Button, Stack, Group } from "@mantine/core";+import { Modal, Text, Stack, Group } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { WatchedFolder } from "@app/types/watchedFolders";@@ -43,10 +44,15 @@ export function DeleteFolderConfirmModal({)}</Text><Group gap="sm" justify="flex-end">- <Button variant="outline" size="sm" onClick={onCancel}>+ <Button variant="secondary" size="sm" onClick={onCancel}>{t("cancel", "Cancel")}</Button>- <Button color="red" size="sm" onClick={onConfirm}>+ <Button+ variant="primary"+ accent="danger"+ size="sm"+ onClick={onConfirm}+ >{t("delete", "Delete")}</Button></Group>diff --git a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderCard.tsx b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderCard.tsxindex 0e1612f447..44b2b0c657 100644--- a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderCard.tsx+++ b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderCard.tsx@@ -1,5 +1,7 @@import { useState } from "react";-import { Box, Button, Text, ActionIcon, Group, Loader } from "@mantine/core";+import { Box, Text, Group, Loader } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import EditIcon from "@mui/icons-material/Edit";import DeleteIcon from "@mui/icons-material/Delete";@@ -83,11 +85,17 @@ export function WatchedFolderCard({}><Button- variant={isActive ? "light" : "subtle"}+ variant="tertiary"+ accent="neutral"+ size="sm"className="tool-button"fullWidth- justify="flex-start"- px="sm"+ justify="start"+ style={+ isActive+ ? { backgroundColor: "var(--tool-button-selected-bg)" }+ : undefined+ }leftSection={<Boxstyle={{@@ -110,8 +118,9 @@ export function WatchedFolderCard({isHovered ? (<Group gap={2} onClick={(e) => e.stopPropagation()}><ActionIcon- size="xs"- variant="subtle"+ as="span"+ size="sm"+ variant="tertiary"onClick={onEdit}aria-label={t("watchedFolders.card.edit", "Edit folder")}>@@ -119,9 +128,10 @@ export function WatchedFolderCard({</ActionIcon>{!folder.isDefault && (<ActionIcon- size="xs"- variant="subtle"- color="red"+ as="span"+ size="sm"+ variant="tertiary"+ accent="danger"onClick={onDelete}aria-label={t("watchedFolders.card.delete", "Delete folder")}>diff --git a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderHomePage.tsx b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderHomePage.tsxindex 798d340567..f1110c9a2a 100644--- a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderHomePage.tsx+++ b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderHomePage.tsx@@ -1,14 +1,7 @@import { useState, useCallback, useEffect } from "react";-import {- Box,- Text,- Stack,- Group,- ActionIcon,- Button,- Loader,- ScrollArea,-} from "@mantine/core";+import { Box, Text, Stack, Group, Loader, ScrollArea } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useTranslation } from "react-i18next";import AddIcon from "@mui/icons-material/Add";import EditIcon from "@mui/icons-material/Edit";@@ -243,7 +236,7 @@ function FolderCard({<div className="wf-card-actions" onClick={(e) => e.stopPropagation()}><ActionIconsize="md"- variant="subtle"+ variant="tertiary"onClick={() => onTogglePause(folder)}aria-label={isPaused@@ -264,7 +257,7 @@ function FolderCard({</ActionIcon><ActionIconsize="md"- variant="subtle"+ variant="tertiary"onClick={() => onEdit(folder)}aria-label={t("watchedFolders.home.editFolder", "Edit folder")}>@@ -272,8 +265,8 @@ function FolderCard({</ActionIcon><ActionIconsize="md"- variant="subtle"- color="red"+ variant="tertiary"+ accent="danger"onClick={() => onDelete(folder)}aria-label={t("watchedFolders.home.deleteFolder", "Delete folder")}>@@ -343,9 +336,8 @@ function HowItWorks() {</Text></Group><ActionIcon- size="xs"- variant="subtle"- color="gray"+ size="sm"+ variant="tertiary"onClick={() => {sessionStorage.setItem("wf_howItWorks_dismissed", "1");setDismissed(true);@@ -353,7 +345,10 @@ function HowItWorks() {aria-label={t("watchedFolders.actions.dismiss", "Dismiss")}><CloseIcon- style={{ fontSize: "0.75rem", color: "var(--mantine-color-text)" }}+ style={{+ fontSize: "0.75rem",+ color: "var(--mantine-color-text)",+ }}/></ActionIcon></Group>@@ -418,9 +413,10 @@ function EmptyState({ onCreate }: { onCreate: () => void }) {<Buttonsize="md"+ variant="primary"leftSection={<AddIcon style={{ fontSize: "1.125rem" }} />}onClick={onCreate}- mt="sm"+ style={{ marginTop: "var(--mantine-spacing-sm)" }}>{t("watchedFolders.home.create", "Create your first Watched Folder")}</Button>diff --git a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderManagementModal.tsx b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderManagementModal.tsxindex daba774bfb..362d4cf7b0 100644--- a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderManagementModal.tsx+++ b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderManagementModal.tsx@@ -1,6 +1,5 @@import { useState, useCallback, useRef, useEffect } from "react";import {- Button,Stack,Group,TextInput,@@ -15,6 +14,7 @@ import {Tooltip,Modal,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { WatchedFolder } from "@app/types/watchedFolders";import { AutomationConfig, AutomationMode } from "@app/types/automation";@@ -478,8 +478,8 @@ export function WatchedFolderManagementModal({</Text></Stack><Button- size="xs"- variant="subtle"+ size="sm"+ variant="tertiary"onClick={async () => {try {const handle = await (@@ -505,9 +505,9 @@ export function WatchedFolderManagementModal({</Button>{inputDirName && (<Button- size="xs"- variant="subtle"- color="red"+ size="sm"+ variant="tertiary"+ accent="danger"onClick={() => {pendingInputDirHandle.current = null;setInputDirName(null);@@ -575,8 +575,8 @@ export function WatchedFolderManagementModal({zIndex={Z_INDEX_AUTOMATE_DROPDOWN}><Button- size="xs"- variant="subtle"+ size="sm"+ variant="tertiary"disabled={!canWriteLocalFolder}onClick={async () => {try {@@ -601,9 +601,9 @@ export function WatchedFolderManagementModal({</Tooltip>{outputDirName && (<Button- size="xs"- variant="subtle"- color="red"+ size="sm"+ variant="tertiary"+ accent="danger"onClick={() => {pendingDirHandle.current = null;setOutputDirName(null);@@ -619,15 +619,13 @@ export function WatchedFolderManagementModal({{/* ── Advanced (collapsible) ── */}<div>- <button+ <Button+ variant="tertiary"onClick={() => setShowAdvanced((v) => !v)}style={{display: "flex",alignItems: "center",gap: "0.35rem",- background: "none",- border: "none",- cursor: "pointer",padding: "0.25rem 0",width: "100%",color: "var(--tool-subcategory-text-color)",@@ -645,7 +643,7 @@ export function WatchedFolderManagementModal({}}/>{t("watchedFolders.modal.advanced", "Advanced")}- </button>+ </Button><Collapse in={showAdvanced} transitionDuration={180}><Stack gap="sm" mt="sm">@@ -828,15 +826,11 @@ export function WatchedFolderManagementModal({</Alert>)}<Group justify="flex-end" gap="sm">- <Button- variant="subtle"- size="sm"- color="gray"- onClick={handleClose}- >+ <Button variant="tertiary" size="sm" onClick={handleClose}>{t("cancel", "Cancel")}</Button><Button+ variant="primary"size="sm"onClick={handleSave}loading={saving}diff --git a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderSection.tsx b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderSection.tsxindex 5b3345608d..67073a023a 100644--- a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderSection.tsx+++ b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderSection.tsx@@ -1,5 +1,6 @@import { useState } from "react";-import { Box, Button, Text, Stack } from "@mantine/core";+import { Box, Text, Stack } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import AddIcon from "@mui/icons-material/Add";import { useWatchedFolders } from "@app/hooks/useWatchedFolders";@@ -132,11 +133,12 @@ export function WatchedFolderSection() {))}<Button- variant="subtle"+ variant="tertiary"+ accent="neutral"+ size="sm"className="tool-button"fullWidth- justify="flex-start"- px="sm"+ justify="start"leftSection={<AddIconstyle={{ fontSize: 14, color: "var(--mantine-color-gray-5)" }}diff --git a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderWorkbenchView.tsx b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderWorkbenchView.tsxindex 0492949301..4954cebfc3 100644--- a/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderWorkbenchView.tsx+++ b/frontend/editor/src/proprietary/components/watchedFolders/WatchedFolderWorkbenchView.tsx@@ -10,14 +10,14 @@ import {Text,Stack,Group,- Button,- ActionIcon,Modal,ScrollArea,Loader,TextInput,Select,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { Z_INDEX_OVER_FILE_MANAGER_MODAL } from "@app/styles/zIndex";import { useCardModalAnimation } from "@app/hooks/useCardModalAnimation";@@ -860,9 +860,8 @@ export function WatchedFolderWorkbenchView({<Group justify="space-between" align="center"><Group gap="md" align="center"><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={goHome}aria-label={t("watchedFolders.actions.back", "Back")}>@@ -977,9 +976,9 @@ export function WatchedFolderWorkbenchView({<Group gap="sm" align="center">{folder.isPaused ? (<Button- size="xs"- variant="light"- color="green"+ size="sm"+ variant="secondary"+ accent="success"onClick={handlePauseResume}leftSection={<PlayArrowIcon style={{ fontSize: "0.875rem" }} />}>@@ -987,9 +986,8 @@ export function WatchedFolderWorkbenchView({</Button>) : (<Button- size="xs"- variant="subtle"- color="gray"+ size="sm"+ variant="tertiary"onClick={handlePauseResume}leftSection={<PauseIcon style={{ fontSize: "0.875rem" }} />}>@@ -997,8 +995,8 @@ export function WatchedFolderWorkbenchView({</Button>)}<Button- size="xs"- variant="light"+ size="sm"+ variant="secondary"onClick={() =>document.getElementById(`folder-file-input-${folderId}`)@@ -1277,8 +1275,8 @@ export function WatchedFolderWorkbenchView({{activityStatusFilter === "error" &&filteredActivityIds.length > 0 && (<Button- size="xs"- variant="outline"+ size="sm"+ variant="secondary"onClick={handleRetryAllFiltered}leftSection={<ReplayIcon style={{ fontSize: "0.75rem" }} />}>@@ -1289,8 +1287,8 @@ export function WatchedFolderWorkbenchView({filteredActivityIds.length > 0 && (<><Button- size="xs"- variant="outline"+ size="sm"+ variant="secondary"onClick={() =>void handleBatchDownload(filteredActivityIds)}@@ -1301,8 +1299,8 @@ export function WatchedFolderWorkbenchView({{t("watchedFolders.workbench.exportZip", "Export zip")}</Button><Button- size="xs"- variant="outline"+ size="sm"+ variant="secondary"onClick={() =>void handleBatchDownloadSeparate(filteredActivityIds)}@@ -1384,8 +1382,8 @@ export function WatchedFolderWorkbenchView({</Text>{selectedActivityIds.size < filteredActivityIds.length && (<Button- size="xs"- variant="subtle"+ size="sm"+ variant="tertiary"onClick={() =>setSelectedActivityIds(new Set(filteredActivityIds))}@@ -1399,8 +1397,8 @@ export function WatchedFolderWorkbenchView({<Box style={{ flex: 1 }} />{showRetry && (<Button- size="xs"- variant="outline"+ size="sm"+ variant="secondary"onClick={handleBatchRetry}leftSection={<ReplayIcon style={{ fontSize: "0.75rem" }} />@@ -1412,8 +1410,8 @@ export function WatchedFolderWorkbenchView({{showExport && (<><Button- size="xs"- variant="outline"+ size="sm"+ variant="secondary"onClick={() => void handleBatchDownload()}leftSection={<DownloadIcon style={{ fontSize: "0.75rem" }} />@@ -1422,8 +1420,8 @@ export function WatchedFolderWorkbenchView({{t("watchedFolders.workbench.exportZip", "Export zip")}</Button><Button- size="xs"- variant="outline"+ size="sm"+ variant="secondary"onClick={() => void handleBatchDownloadSeparate()}leftSection={<DownloadIcon style={{ fontSize: "0.75rem" }} />@@ -1437,9 +1435,9 @@ export function WatchedFolderWorkbenchView({</>)}<Button- size="xs"- variant="outline"- color="red"+ size="sm"+ variant="secondary"+ accent="danger"onClick={() => void handleBatchDelete()}leftSection={<DeleteOutlineIcon style={{ fontSize: "0.75rem" }} />@@ -1448,9 +1446,8 @@ export function WatchedFolderWorkbenchView({{t("watchedFolders.workbench.delete", "Delete")}</Button><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={() => setSelectedActivityIds(new Set())}aria-label={t("watchedFolders.workbench.clearSelection",@@ -1536,9 +1533,8 @@ export function WatchedFolderWorkbenchView({}><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"style={{ flexShrink: 0 }}onClick={(e) => {e.stopPropagation();@@ -1666,9 +1662,8 @@ export function WatchedFolderWorkbenchView({>{!isExpanded && primaryFile && (<ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={(e) => {e.stopPropagation();handleView(primaryFile);@@ -1685,9 +1680,8 @@ export function WatchedFolderWorkbenchView({)}{!isExpanded && primaryFile && (<ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={(e) => {e.stopPropagation();void handleDownload(@@ -1706,9 +1700,8 @@ export function WatchedFolderWorkbenchView({</ActionIcon>)}<ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={(e) => {e.stopPropagation();void handleDeleteOne(fileId);@@ -1777,9 +1770,8 @@ export function WatchedFolderWorkbenchView({{formatBytes(inputFile.size)}</Text><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={(e) => {e.stopPropagation();handleView(inputFile);@@ -1794,9 +1786,8 @@ export function WatchedFolderWorkbenchView({/></ActionIcon><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={(e) => {e.stopPropagation();handleDownload(inputFile, inputFile.name);@@ -1852,9 +1843,8 @@ export function WatchedFolderWorkbenchView({{formatBytes(out.size)}</Text><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={(e) => {e.stopPropagation();handleView(out);@@ -1869,9 +1859,8 @@ export function WatchedFolderWorkbenchView({/></ActionIcon><ActionIcon- variant="subtle"+ variant="tertiary"size="sm"- color="gray"onClick={(e) => {e.stopPropagation();handleDownload(out, out.name);@@ -1915,8 +1904,8 @@ export function WatchedFolderWorkbenchView({)}{inputFile && (<Button- size="xs"- variant="light"+ size="sm"+ variant="secondary"style={{ flexShrink: 0 }}leftSection={<ReplayIcon@@ -2000,9 +1989,8 @@ export function WatchedFolderWorkbenchView({{(["24h", "7d", "30d", "all"] as const).map((p) => (<Buttonkey={p}- size="xs"- variant={statsPeriod === p ? "light" : "subtle"}- color={statsPeriod === p ? "blue" : "gray"}+ size="sm"+ variant={statsPeriod === p ? "secondary" : "tertiary"}onClick={() => setStatsPeriod(p)}>{p === "all"@@ -2412,11 +2400,11 @@ export function WatchedFolderWorkbenchView({)}</Text><Group justify="flex-end">- <Button variant="default" onClick={() => setDeleteConfirm(null)}>+ <Button variant="secondary" onClick={() => setDeleteConfirm(null)}>{t("watchedFolders.workbench.cancel", "Cancel")}</Button><Button- variant="default"+ variant="secondary"onClick={() =>deleteConfirm && void execDelete(deleteConfirm.ids, false)}@@ -2427,7 +2415,8 @@ export function WatchedFolderWorkbenchView({)}</Button><Button- color="red"+ variant="primary"+ accent="danger"onClick={() =>deleteConfirm && void execDelete(deleteConfirm.ids, true)}diff --git a/frontend/editor/src/proprietary/components/workflow/ParticipantView.tsx b/frontend/editor/src/proprietary/components/workflow/ParticipantView.tsxindex 20191a8b57..c8d000a5dc 100644--- a/frontend/editor/src/proprietary/components/workflow/ParticipantView.tsx+++ b/frontend/editor/src/proprietary/components/workflow/ParticipantView.tsx@@ -6,13 +6,13 @@ import {Text,Badge,Group,- Button,Loader,Alert,TextInput,FileInput,Select,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useParticipantSession } from "@app/hooks/workflow/useParticipantSession";import InfoIcon from "@mui/icons-material/Info";import DownloadIcon from "@mui/icons-material/Download";@@ -314,7 +314,7 @@ const ParticipantView: React.FC<ParticipantViewProps> = ({ token }) => {size="sm"leftSection={<DownloadIcon fontSize="small" />}onClick={() => downloadDocument(token)}- variant="light"+ variant="secondary">{t("workflow.participant.downloadDocument", "Download Document")}</Button>@@ -489,7 +489,7 @@ const ParticipantView: React.FC<ParticipantViewProps> = ({ token }) => {disabled={isSubmitting || certValidation.status === "validating"}- color="green"+ accent="success"data-testid="submit-signature-button">{t("workflow.participant.submitSignature", "Submit Signature")}@@ -498,8 +498,8 @@ const ParticipantView: React.FC<ParticipantViewProps> = ({ token }) => {<ButtonleftSection={<CancelIcon fontSize="small" />}onClick={handleDecline}- color="red"- variant="light"+ variant="secondary"+ accent="danger"data-testid="decline-button">{t("workflow.participant.decline", "Decline")}diff --git a/frontend/editor/src/proprietary/routes/InviteAccept.tsx b/frontend/editor/src/proprietary/routes/InviteAccept.tsxindex 76ed0df90b..080cf4275a 100644--- a/frontend/editor/src/proprietary/routes/InviteAccept.tsx+++ b/frontend/editor/src/proprietary/routes/InviteAccept.tsx@@ -18,7 +18,7 @@ import LoginHeader from "@app/routes/login/LoginHeader";import ErrorMessage from "@app/auth/ui/ErrorMessage";import { BASE_PATH } from "@app/constants/app";import apiClient from "@app/services/apiClient";-+import { Button } from "@app/ui/Button";interface InviteData {email: string | null;role: string;@@ -163,13 +163,13 @@ export default function InviteAccept() {/><ErrorMessage error={error} /><div className="auth-section">- <button+ <Buttontype="button"onClick={() => navigate("/login")}className="w-full px-4 py-[0.75rem] rounded-[0.625rem] text-base font-semibold cursor-pointer border-0 auth-cta-button">{t("invite.goToLogin", "Go to Login")}- </button>+ </Button></div></AuthLayout>);@@ -259,7 +259,7 @@ export default function InviteAccept() {/><div className="auth-section">- <button+ <Buttontype="submit"disabled={submitting}className="w-full px-4 py-[0.75rem] rounded-[0.625rem] text-base font-semibold cursor-pointer border-0 disabled:opacity-50 disabled:cursor-not-allowed auth-cta-button"@@ -267,7 +267,7 @@ export default function InviteAccept() {{submitting? t("invite.creating", "Creating Account..."): t("invite.createAccount", "Create Account")}- </button>+ </Button></div></Stack></form>diff --git a/frontend/editor/src/proprietary/routes/Landing.tsx b/frontend/editor/src/proprietary/routes/Landing.tsxindex 91b79bbf8a..d22acbba56 100644--- a/frontend/editor/src/proprietary/routes/Landing.tsx+++ b/frontend/editor/src/proprietary/routes/Landing.tsx@@ -7,6 +7,7 @@ import { useBackendProbe } from "@app/hooks/useBackendProbe";import AuthLayout from "@app/routes/authShared/AuthLayout";import LoginHeader from "@app/routes/login/LoginHeader";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";/*** Landing component - Smart router based on authentication status@@ -149,14 +150,14 @@ export default function Landing() {"The application cannot currently connect to the backend. Verify the backend status and network connectivity, then try again.",)}</p>- <button+ <Buttontype="button"onClick={handleRetry}className="auth-cta-button px-4 py-[0.75rem] rounded-[0.625rem] text-base font-semibold mt-5 border-0 cursor-pointer"style={{ width: "fit-content" }}>{t("backendStartup.retry", "Retry")}- </button>+ </Button></div></AuthLayout>);diff --git a/frontend/editor/src/proprietary/routes/Login.test.tsx b/frontend/editor/src/proprietary/routes/Login.test.tsxindex 0360da737c..7a232d0fde 100644--- a/frontend/editor/src/proprietary/routes/Login.test.tsx+++ b/frontend/editor/src/proprietary/routes/Login.test.tsx@@ -326,13 +326,13 @@ describe("Login", () => {// Wait for OAuth button to appearawait waitFor(() => {- const button = screen.queryByText("Authentik");+ const button = screen.queryByText(/Authentik/);expect(button).toBeTruthy();},{ timeout: 3000 },);- const oauthButton = screen.getByText("Authentik");+ const oauthButton = screen.getByText(/Authentik/);await user.click(oauthButton);await waitFor(() => {@@ -372,13 +372,13 @@ describe("Login", () => {// Wait for OAuth button to appear (will show 'Mycompany' as label)await waitFor(() => {- const button = screen.queryByText("Mycompany");+ const button = screen.queryByText(/Mycompany/);expect(button).toBeTruthy();},{ timeout: 3000 },);- const oauthButton = screen.getByText("Mycompany");+ const oauthButton = screen.getByText(/Mycompany/);await user.click(oauthButton);await waitFor(() => {@@ -419,13 +419,13 @@ describe("Login", () => {// Wait for OAuth button to appearawait waitFor(() => {- const button = screen.queryByText("OIDC");+ const button = screen.queryByText(/OIDC/);expect(button).toBeTruthy();},{ timeout: 3000 },);- const oauthButton = screen.getByText("OIDC");+ const oauthButton = screen.getByText(/OIDC/);await user.click(oauthButton);await waitFor(() => {@@ -761,12 +761,12 @@ describe("Login", () => {await waitFor(() => {- expect(screen.getByText("Authentik")).toBeTruthy();+ expect(screen.getByText(/Authentik/)).toBeTruthy();},{ timeout: 3000 },);- await user.click(screen.getByText("Authentik"));+ await user.click(screen.getByText(/Authentik/));await waitFor(() => {expect(springAuth.signInWithOAuth).toHaveBeenCalled();diff --git a/frontend/editor/src/proprietary/routes/Login.tsx b/frontend/editor/src/proprietary/routes/Login.tsxindex 1e12f73e89..47920f6c62 100644--- a/frontend/editor/src/proprietary/routes/Login.tsx+++ b/frontend/editor/src/proprietary/routes/Login.tsx@@ -6,6 +6,7 @@ import {useSearchParams,} from "react-router-dom";import { Text, Stack, Alert } from "@mantine/core";+import { Button } from "@app/ui/Button";import { setPostLoginRedirectPath } from "@app/auth/spring/springAuthClient";import { useAuth } from "@app/auth/UseSession";import { useAppConfig } from "@app/contexts/AppConfigContext";@@ -435,14 +436,14 @@ export default function Login() {"The application cannot currently connect to the backend. Verify the backend status and network connectivity, then try again.",)}</p>- <button+ <Buttontype="button"onClick={handleRetry}className="auth-cta-button px-4 py-[0.75rem] rounded-[0.625rem] text-base font-semibold mt-5 border-0 cursor-pointer"style={{ width: "fit-content" }}>{t("backendStartup.retry", "Retry")}- </button>+ </Button></div></AuthLayout>);@@ -486,14 +487,16 @@ export default function Login() {beforeEmailForm={hasSSOProviders && !showEmailForm && isUserPassAllowed ? (<div className="auth-section">- <button+ <Buttontype="button"+ variant="tertiary"+ hover={false}onClick={() => setShowEmailForm(true)}disabled={login.isSubmitting}className="w-full px-4 py-[0.75rem] rounded-[0.625rem] text-base font-semibold mb-2 cursor-pointer border-0 disabled:opacity-50 disabled:cursor-not-allowed auth-cta-button">{t("login.useEmailInstead", "Login with email")}- </button>+ </Button></div>) : undefined}diff --git a/frontend/editor/src/proprietary/routes/ShareLinkPage.tsx b/frontend/editor/src/proprietary/routes/ShareLinkPage.tsxindex 915ec3c07d..aef9b6f4f7 100644--- a/frontend/editor/src/proprietary/routes/ShareLinkPage.tsx+++ b/frontend/editor/src/proprietary/routes/ShareLinkPage.tsx@@ -4,7 +4,6 @@ import { useNavigate, useParams } from "react-router-dom";import {Alert,Badge,- Button,Group,Loader,Paper,@@ -13,6 +12,7 @@ import {Title,} from "@mantine/core";import { useTranslation } from "react-i18next";+import { Button } from "@app/ui/Button";import DownloadIcon from "@mui/icons-material/Download";import LoginIcon from "@mui/icons-material/Login";import OpenInNewIcon from "@mui/icons-material/OpenInNew";@@ -232,7 +232,7 @@ export default function ShareLinkPage() {{t("storageShare.openInApp", "Open in Stirling PDF")}</Button><Button- variant="light"+ variant="secondary"leftSection={<DownloadIcon style={{ fontSize: 18 }} />}onClick={handleDownload}loading={isWorking}diff --git a/frontend/editor/src/proprietary/routes/Signup.tsx b/frontend/editor/src/proprietary/routes/Signup.tsxindex dab0ac2624..68be029969 100644--- a/frontend/editor/src/proprietary/routes/Signup.tsx+++ b/frontend/editor/src/proprietary/routes/Signup.tsx@@ -16,6 +16,7 @@ import {SignupFieldErrors,} from "@app/routes/signup/SignupFormValidation";import { useAuthService } from "@app/routes/signup/AuthService";+import { Button } from "@app/ui/Button";import loginHeader from "@app/assets/brand/modern-logo/LoginLightModeHeader.svg";export default function Signup() {@@ -130,13 +131,13 @@ export default function Signup() {{/* Bottom row - centered */}<div style={{ textAlign: "center", margin: "0.5rem 0 0.25rem" }}>- <button- type="button"+ <Button+ variant="tertiary"onClick={() => navigate("/login")}className="auth-link-black">{t("login.logIn", "Log In")}- </button>+ </Button></div></AuthLayout>);diff --git a/frontend/editor/src/proprietary/routes/login/NavigationLink.tsx b/frontend/editor/src/proprietary/routes/login/NavigationLink.tsxindex dcb5bd9380..0ca283af2d 100644--- a/frontend/editor/src/proprietary/routes/login/NavigationLink.tsx+++ b/frontend/editor/src/proprietary/routes/login/NavigationLink.tsx@@ -1,5 +1,4 @@-import { Button } from "@mantine/core";-+import { Button } from "@app/ui/Button";interface NavigationLinkProps {onClick: () => void;text: string;@@ -17,7 +16,7 @@ export default function NavigationLink({onClick={onClick}disabled={isDisabled}className="navigation-link-button"- variant="subtle"+ variant="tertiary">{text}</Button>diff --git a/frontend/editor/src/proprietary/routes/login/OAuthButtons.stories.tsx b/frontend/editor/src/proprietary/routes/login/OAuthButtons.stories.tsxnew file mode 100644index 0000000000..c60ce89feb--- /dev/null+++ b/frontend/editor/src/proprietary/routes/login/OAuthButtons.stories.tsx@@ -0,0 +1,33 @@+import type { Meta, StoryObj } from "@storybook/react";+import OAuthButtons from "@app/auth/ui/OAuthButtons";+import "@app/auth/ui/auth.css";++/**+ * The OAuth provider buttons the login page renders+ */+const meta: Meta<typeof OAuthButtons> = {+ title: "Auth/OAuth Buttons",+ component: OAuthButtons,+ parameters: { layout: "centered" },+ args: {+ onProviderClick: () => {},+ isSubmitting: false,+ enabledProviders: ["google", "github", "apple", "azure"],+ },+};+export default meta;+type Story = StoryObj<typeof OAuthButtons>;++export const Vertical: Story = {+ render: (args) => (+ <div style={{ width: 320 }}>+ <OAuthButtons {...args} layout="vertical" />+ </div>+ ),+};+export const Grid: Story = {+ render: (args) => <OAuthButtons {...args} layout="grid" />,+};+export const Icons: Story = {+ render: (args) => <OAuthButtons {...args} layout="icons" />,+};diff --git a/frontend/editor/src/proprietary/routes/signup/SignupForm.tsx b/frontend/editor/src/proprietary/routes/signup/SignupForm.tsxindex a47d6e6600..8b6ef3d272 100644--- a/frontend/editor/src/proprietary/routes/signup/SignupForm.tsx+++ b/frontend/editor/src/proprietary/routes/signup/SignupForm.tsx@@ -1,7 +1,8 @@import { useEffect } from "react";import "@app/auth/ui/auth.css";import { useTranslation } from "react-i18next";-import { Checkbox, TextInput, PasswordInput, Button } from "@mantine/core";+import { Checkbox, TextInput, PasswordInput } from "@mantine/core";+import { Button } from "@app/ui/Button";import { SignupFieldErrors } from "@app/routes/signup/SignupFormValidation";interface SignupFormProps {diff --git a/frontend/editor/src/proprietary/ui/Button.css b/frontend/editor/src/proprietary/ui/Button.cssdeleted file mode 100644index 8b474e7f42..0000000000--- a/frontend/editor/src/proprietary/ui/Button.css+++ /dev/null@@ -1,118 +0,0 @@-.sui-btn {- display: inline-flex;- align-items: center;- gap: 0.5rem;- border: 1px solid transparent;- border-radius: var(--radius-md);- font-family: var(--font-sans);- font-weight: 500;- cursor: pointer;- transition:- transform var(--motion-fast),- box-shadow var(--motion-fast),- background var(--motion-fast),- color var(--motion-fast),- border-color var(--motion-fast);- white-space: nowrap;- user-select: none;-}-.sui-btn:disabled {- cursor: not-allowed;- opacity: 0.55;-}-.sui-btn:focus-visible {- outline: 2px solid var(--color-blue);- outline-offset: 2px;-}--/* sizes */-.sui-btn--md {- font-size: 0.8125rem;- padding: 0.4375rem 0.875rem;- min-height: 2rem;-}-.sui-btn--sm {- font-size: 0.75rem;- padding: 0.3125rem 0.625rem;- min-height: 1.625rem;- border-radius: var(--radius-sm);-}--.sui-btn--full {- width: 100%;- justify-content: center;-}--/* gradient (primary) */-.sui-btn--gradient {- color: var(--color-text-on-accent);- background: var(--grad-blue-btn);- box-shadow: var(--shadow-blue);-}-.sui-btn--gradient.sui-btn--purple {- background: var(--grad-purple-btn);-}-.sui-btn--gradient.sui-btn--green {- background: var(--grad-green-btn);-}-.sui-btn--gradient:hover:not(:disabled) {- box-shadow: var(--shadow-blue-hover);- transform: translateY(-0.0625rem);-}-.sui-btn--gradient:active:not(:disabled) {- transform: translateY(0);-}--/* outline (secondary) */-.sui-btn--outline {- color: var(--color-text-2);- background: var(--color-surface);- border-color: var(--color-border);-}-.sui-btn--outline.sui-btn--blue {- color: var(--color-blue);- border-color: var(--color-blue-border);-}-.sui-btn--outline.sui-btn--purple {- color: var(--color-purple);- border-color: var(--color-purple-border);-}-.sui-btn--outline.sui-btn--green {- color: var(--color-green);- border-color: var(--color-green-border);-}-.sui-btn--outline.sui-btn--amber {- color: var(--color-amber);- border-color: var(--color-amber-border);-}-.sui-btn--outline.sui-btn--red {- color: var(--color-red);- border-color: var(--color-red-border);-}-.sui-btn--outline:hover:not(:disabled) {- background: var(--color-bg-hover);- border-color: var(--color-border-hover);-}--/* ghost (tertiary) */-.sui-btn--ghost {- color: var(--color-text-3);- background: transparent;-}-.sui-btn--ghost:hover:not(:disabled) {- color: var(--color-text-1);- background: var(--color-bg-hover);-}--/* spinner */-.sui-btn__spinner {- width: 0.875rem;- height: 0.875rem;- border-radius: 50%;- border: 2px solid currentColor;- border-right-color: transparent;- animation: spin 0.7s linear infinite;-}-.sui-btn__label {- display: inline-block;-}diff --git a/frontend/editor/src/proprietary/ui/Button.stories.tsx b/frontend/editor/src/proprietary/ui/Button.stories.tsxdeleted file mode 100644index 66b203ec3b..0000000000--- a/frontend/editor/src/proprietary/ui/Button.stories.tsx+++ /dev/null@@ -1,57 +0,0 @@-import type { Meta, StoryObj } from "@storybook/react";-import { Button } from "@app/ui/Button";--const meta: Meta<typeof Button> = {- title: "Primitives/Button",- component: Button,- parameters: { layout: "centered" },- args: { children: "Connect agent" },- argTypes: {- variant: {- control: "inline-radio",- options: ["gradient", "outline", "ghost"],- },- accent: {- control: "inline-radio",- options: ["blue", "purple", "green", "amber", "red"],- },- size: { control: "inline-radio", options: ["sm", "md"] },- },-};-export default meta;-type Story = StoryObj<typeof Button>;--export const Gradient: Story = { args: { variant: "gradient" } };-export const Outline: Story = { args: { variant: "outline" } };-export const Ghost: Story = { args: { variant: "ghost" } };--export const WithTrailingArrow: Story = {- args: {- variant: "gradient",- children: "Build a pipeline",- trailingIcon: <span aria-hidden>→</span>,- },-};--export const Loading: Story = { args: { variant: "gradient", loading: true } };-export const Disabled: Story = {- args: { variant: "gradient", disabled: true },-};--export const AccentMatrix: Story = {- render: () => (- <div style={{ display: "flex", flexWrap: "wrap", gap: 8 }}>- {(["gradient", "outline"] as const).flatMap((variant) =>- (["blue", "purple", "green", "amber", "red"] as const).map((accent) => (- <Button- key={`${variant}-${accent}`}- variant={variant}- accent={accent}- >- {variant} · {accent}- </Button>- )),- )}- </div>- ),-};diff --git a/frontend/editor/src/proprietary/ui/Button.tsx b/frontend/editor/src/proprietary/ui/Button.tsxdeleted file mode 100644index f3dc73e933..0000000000--- a/frontend/editor/src/proprietary/ui/Button.tsx+++ /dev/null@@ -1,68 +0,0 @@-import type { ButtonHTMLAttributes, ReactNode } from "react";-import "@app/ui/Button.css";--export type ButtonVariant = "gradient" | "outline" | "ghost";-export type ButtonSize = "sm" | "md";-export type ButtonAccent = "blue" | "purple" | "green" | "amber" | "red";--export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {- /** Visual variant. `gradient` is the primary CTA; `outline` is secondary; `ghost` is tertiary/text. */- variant?: ButtonVariant;- /** Optional accent colour. Currently affects `gradient` and `outline` variants. */- accent?: ButtonAccent;- size?: ButtonSize;- /** Icon node rendered before the label. */- leadingIcon?: ReactNode;- /** Icon node rendered after the label (arrow → for "next" CTAs). */- trailingIcon?: ReactNode;- /** Show a spinner and disable interactivity. */- loading?: boolean;- /** Stretches to fill its parent container. */- fullWidth?: boolean;- children?: ReactNode;-}--/**- * Stirling's two-button system: a gradient primary CTA and an outlined- * secondary action. Ghost is reserved for tertiary links inside a row.- *- * Buttons compose with the existing CSS variables — they re-skin cleanly in- * dark mode without per-variant overrides.- */-export function Button({- variant = "gradient",- accent = "blue",- size = "md",- leadingIcon,- trailingIcon,- loading = false,- fullWidth = false,- disabled,- className,- children,- ...rest-}: ButtonProps) {- const classes = [- "sui-btn",- `sui-btn--${variant}`,- `sui-btn--${accent}`,- `sui-btn--${size}`,- fullWidth ? "sui-btn--full" : "",- loading ? "sui-btn--loading" : "",- className ?? "",- ]- .filter(Boolean)- .join(" ");-- return (- <button {...rest} disabled={disabled || loading} className={classes}>- {loading ? (- <span className="sui-btn__spinner" aria-hidden />- ) : (- leadingIcon- )}- {children && <span className="sui-btn__label">{children}</span>}- {!loading && trailingIcon}- </button>- );-}diff --git a/frontend/editor/src/proprietary/ui/Chip.css b/frontend/editor/src/proprietary/ui/Chip.cssdeleted file mode 100644index 78c18800e8..0000000000--- a/frontend/editor/src/proprietary/ui/Chip.css+++ /dev/null@@ -1,96 +0,0 @@-.sui-chip {- display: inline-flex;- align-items: center;- gap: var(--space-1_5);- border-radius: var(--radius-pill);- font-family: var(--font-sans);- font-weight: 500;- white-space: nowrap;- border: 1px solid transparent;- transition:- background var(--motion-fast),- border-color var(--motion-fast),- transform var(--motion-fast);-}--.sui-chip--sm {- padding: var(--space-0_5) var(--space-2);- font-size: 0.6875rem;-}-.sui-chip--md {- padding: var(--space-1) var(--space-2_5, 0.5rem);- font-size: 0.75rem;-}-.sui-chip--md {- padding: var(--space-1) 0.625rem;- font-size: 0.75rem;-}--.sui-chip--neutral {- background: var(--color-bg-muted);- color: var(--color-text-2);- border-color: var(--color-border);-}-.sui-chip--blue {- background: var(--color-blue-light);- color: var(--color-blue);- border-color: var(--color-blue-border);-}-.sui-chip--purple {- background: var(--color-purple-light);- color: var(--color-purple);- border-color: var(--color-purple-border);-}-.sui-chip--green {- background: var(--color-green-light);- color: var(--color-green);- border-color: var(--color-green-border);-}-.sui-chip--amber {- background: var(--color-amber-light);- color: var(--color-amber-dark);- border-color: var(--color-amber-border);-}-.sui-chip--red {- background: var(--color-red-light);- color: var(--color-red);- border-color: var(--color-red-border);-}--.sui-chip--interactive {- cursor: pointer;-}-.sui-chip--interactive:hover {- transform: translateY(-0.0625rem);- filter: brightness(1.05);-}--.sui-chip__dot {- width: 0.4375rem;- height: 0.4375rem;- border-radius: 50%;- background: currentColor;- opacity: 0.85;-}--.sui-chip__icon {- display: inline-flex;- line-height: 1;-}--.sui-chip__remove {- display: inline-flex;- align-items: center;- justify-content: center;- width: 1rem;- height: 1rem;- border-radius: 50%;- color: inherit;- opacity: 0.6;- font-size: 0.875rem;- line-height: 1;-}-.sui-chip__remove:hover {- opacity: 1;- background: rgba(0, 0, 0, 0.08);-}diff --git a/frontend/editor/src/proprietary/ui/Chip.stories.tsx b/frontend/editor/src/proprietary/ui/Chip.stories.tsxdeleted file mode 100644index a19e0eff96..0000000000--- a/frontend/editor/src/proprietary/ui/Chip.stories.tsx+++ /dev/null@@ -1,79 +0,0 @@-import type { Meta, StoryObj } from "@storybook/react-vite";-import { Chip } from "@app/ui/Chip";--const meta: Meta<typeof Chip> = {- title: "Primitives/Chip",- component: Chip,- tags: ["autodocs"],- parameters: { layout: "centered" },- args: {- children: "us-east-1",- tone: "neutral",- size: "md",- showDot: false,- },- argTypes: {- tone: {- control: "inline-radio",- options: ["neutral", "blue", "purple", "green", "amber", "red"],- },- size: { control: "inline-radio", options: ["sm", "md"] },- showDot: { control: "boolean" },- onClick: { action: "clicked" },- onRemove: { action: "removed" },- },-};-export default meta;-type Story = StoryObj<typeof Chip>;--/** Flip tone / size / dot / interactive / removable in controls. */-export const Playground: Story = {};--export const ToneRow: Story = {- render: () => (- <div style={{ display: "flex", gap: 8 }}>- {(["neutral", "blue", "purple", "green", "amber", "red"] as const).map(- (t) => (- <Chip key={t} tone={t}>- {t}- </Chip>- ),- )}- </div>- ),-};--export const InContext_OpChain: Story = {- render: () => (- <div- style={{- display: "flex",- flexWrap: "wrap",- gap: 6,- maxWidth: "32rem",- }}- >- <Chip tone="green" showDot>- ocr- </Chip>- <Chip tone="green" showDot>- classify- </Chip>- <Chip tone="green" showDot>- extract- </Chip>- <Chip tone="blue" showDot>- validate- </Chip>- <Chip tone="red" showDot>- redact- </Chip>- <Chip tone="red" showDot>- encrypt-rest- </Chip>- <Chip tone="purple" showDot>- store-primary- </Chip>- </div>- ),-};diff --git a/frontend/editor/src/proprietary/ui/Chip.tsx b/frontend/editor/src/proprietary/ui/Chip.tsxdeleted file mode 100644index 340b4a493d..0000000000--- a/frontend/editor/src/proprietary/ui/Chip.tsx+++ /dev/null@@ -1,88 +0,0 @@-import type { ReactNode } from "react";-import "@app/ui/Chip.css";--export type ChipTone =- | "neutral"- | "blue"- | "purple"- | "green"- | "amber"- | "red";--export type ChipSize = "sm" | "md";--export interface ChipProps {- tone?: ChipTone;- size?: ChipSize;- leadingIcon?: ReactNode;- trailingIcon?: ReactNode;- /** Show a `×` button. Calls `onRemove` when clicked. */- onRemove?: () => void;- /** Renders as a button when set. */- onClick?: () => void;- /** Show the leading dot affordance. Defaults to false (set true for status-style chips). */- showDot?: boolean;- children?: ReactNode;- className?: string;-}--/**- * Generic chip / tag — `StatusBadge` has a fixed taxonomy (success/warning/…),- * `MethodBadge` is HTTP-method-only; this is the open-ended one for tag rows- * (selected ops, document regions, kbd hints, sort chips, etc).- */-export function Chip({- tone = "neutral",- size = "md",- leadingIcon,- trailingIcon,- onRemove,- onClick,- showDot,- children,- className,-}: ChipProps) {- const Tag = onClick ? "button" : "span";- const classes = [- "sui-chip",- `sui-chip--${tone}`,- `sui-chip--${size}`,- onClick ? "sui-chip--interactive" : "",- className ?? "",- ]- .filter(Boolean)- .join(" ");- return (- <Tag- className={classes}- onClick={onClick}- type={onClick ? "button" : undefined}- >- {showDot && <span className="sui-chip__dot" aria-hidden />}- {leadingIcon && (- <span className="sui-chip__icon" aria-hidden>- {leadingIcon}- </span>- )}- <span className="sui-chip__label">{children}</span>- {trailingIcon && !onRemove && (- <span className="sui-chip__icon" aria-hidden>- {trailingIcon}- </span>- )}- {onRemove && (- <button- type="button"- className="sui-chip__remove"- onClick={(e) => {- e.stopPropagation();- onRemove();- }}- aria-label="Remove"- >- ×- </button>- )}- </Tag>- );-}diff --git a/frontend/editor/src/saas/components/SignupRequiredBootstrap.tsx b/frontend/editor/src/saas/components/SignupRequiredBootstrap.tsxindex 43e388587d..b9028ce22b 100644--- a/frontend/editor/src/saas/components/SignupRequiredBootstrap.tsx+++ b/frontend/editor/src/saas/components/SignupRequiredBootstrap.tsx@@ -1,5 +1,6 @@import { useEffect, useState, useMemo } from "react";-import { Modal, Stack, Button, Text } from "@mantine/core";+import { Modal, Stack, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";import PersonAddIcon from "@mui/icons-material/PersonAdd";import { useTranslation } from "react-i18next";import { withBasePath } from "@app/constants/app";@@ -112,7 +113,7 @@ export default function SignupRequiredBootstrap() {gap: "0.5rem",}}>- <Button variant="default" onClick={() => setOpened(false)}>+ <Button variant="secondary" onClick={() => setOpened(false)}>{t("payg.signupRequired.cancel", "Not now")}</Button><Buttondiff --git a/frontend/editor/src/saas/components/auth/GuestUserBanner.css b/frontend/editor/src/saas/components/auth/GuestUserBanner.cssindex d714bd858f..40ef91adc7 100644--- a/frontend/editor/src/saas/components/auth/GuestUserBanner.css+++ b/frontend/editor/src/saas/components/auth/GuestUserBanner.css@@ -47,38 +47,6 @@flex-shrink: 0;}-.guest-banner-dismiss {- padding: 6px;- border-radius: 8px;- background: transparent;- color: var(--mantine-color-dimmed);- border: none;- cursor: pointer;-}--.guest-banner-dismiss:hover {- background: var(--mantine-color-gray-1, rgba(255, 255, 255, 0.05));-}--.guest-banner-signup {- white-space: nowrap;- padding: 6px 12px;- border-radius: 8px;- background: var(--blue-6, #2563eb);- color: #fff;- border: none;- font-size: 12px;- font-weight: 600;- display: inline-flex;- align-items: center;- gap: 6px;- cursor: pointer;-}--.guest-banner-signup:hover {- background: var(--blue-7, #1d4ed8);-}-.guest-banner-icon {width: 16px;height: 16px;diff --git a/frontend/editor/src/saas/components/auth/GuestUserBanner.tsx b/frontend/editor/src/saas/components/auth/GuestUserBanner.tsxindex 160b0c56a1..1f8e137c88 100644--- a/frontend/editor/src/saas/components/auth/GuestUserBanner.tsx+++ b/frontend/editor/src/saas/components/auth/GuestUserBanner.tsx@@ -2,6 +2,8 @@ import React, { useEffect, useState } from "react";import { useTranslation } from "react-i18next";import CloseIcon from "@mui/icons-material/Close";import PersonAddIcon from "@mui/icons-material/PersonAdd";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useAuth } from "@app/auth/UseSession";import { isUserAnonymous } from "@app/auth/supabase";import { withBasePath } from "@app/constants/app";@@ -81,17 +83,20 @@ export function GuestUserBanner({ className = "" }: GuestUserBannerProps) {</div></div><div className="guest-banner-actions">- <button+ <ActionIcon+ variant="tertiary"onClick={handleDismiss}aria-label={t("guestBanner.dismiss", "Dismiss banner")}- className="guest-banner-dismiss"><CloseIcon className="guest-banner-icon" />- </button>- <button onClick={handleSignUp} className="guest-banner-signup">- <PersonAddIcon className="guest-banner-signup-icon" />+ </ActionIcon>+ <Button+ size="sm"+ onClick={handleSignUp}+ leftSection={<PersonAddIcon className="guest-banner-signup-icon" />}+ >{t("guestBanner.signUp", "Sign Up Free")}- </button>+ </Button></div></div></div>diff --git a/frontend/editor/src/saas/components/shared/AppConfigModal.tsx b/frontend/editor/src/saas/components/shared/AppConfigModal.tsxindex 0fa14721d7..b691244e68 100644--- a/frontend/editor/src/saas/components/shared/AppConfigModal.tsx+++ b/frontend/editor/src/saas/components/shared/AppConfigModal.tsx@@ -1,5 +1,7 @@import React, { useCallback, useMemo, useState, useEffect } from "react";-import { Modal, Button, Text, ActionIcon } from "@mantine/core";+import { Modal, Text } from "@mantine/core";+import { Button } from "@app/ui/Button";+import { ActionIcon } from "@app/ui/ActionIcon";import { useMediaQuery } from "@mantine/hooks";import { useAuth } from "@app/auth/UseSession";import { isUserAnonymous } from "@app/auth/supabase";@@ -253,9 +255,9 @@ const AppConfigModal: React.FC<AppConfigModalProps> = ({ opened, onClose }) => {) : null}</Text><ActionIcon- variant="subtle"+ variant="tertiary"onClick={onClose}- aria-label="Close"+ aria-label={t("common.close", "Close")}><LocalIcon icon="close-rounded" width={18} height={18} /></ActionIcon>@@ -276,11 +278,11 @@ const AppConfigModal: React.FC<AppConfigModalProps> = ({ opened, onClose }) => {<div className="confirm-modal-content"><Text>Are you sure you want to sign out?</Text><div className="confirm-modal-buttons">- <Button variant="default" onClick={() => setConfirmOpen(false)}>+ <Button variant="secondary" onClick={() => setConfirmOpen(false)}>Cancel</Button><Button- color="red"+ accent="danger"onClick={async () => {try {await signOut();diff --git a/frontend/editor/src/saas/components/shared/config/ProfilePictureCropper.tsx b/frontend/editor/src/saas/components/shared/config/ProfilePictureCropper.tsxindex 0148da621b..8230184a2c 100644--- a/frontend/editor/src/saas/components/shared/config/ProfilePictureCropper.tsx+++ b/frontend/editor/src/saas/components/shared/config/ProfilePictureCropper.tsx@@ -1,5 +1,6 @@import React, { useState, useCallback, useEffect } from "react";-import { Modal, Button, Stack, Slider, Alert, Text, Box } from "@mantine/core";+import { Modal, Stack, Slider, Alert, Text, Box } from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import Cropper from "react-easy-crop";import { getCroppedImage, type Area } from "@app/utils/cropImage";@@ -182,7 +183,7 @@ export const ProfilePictureCropper: React.FC<ProfilePictureCropperProps> = ({<divstyle={{ display: "flex", justifyContent: "flex-end", gap: "8px" }}>- <Button variant="subtle" onClick={onClose} disabled={processing}>+ <Button variant="tertiary" onClick={onClose} disabled={processing}>{t("common.cancel", "Cancel")}</Button><Button onClick={handleSave} loading={processing}>diff --git a/frontend/editor/src/saas/components/shared/config/configSections/ApiKeys.tsx b/frontend/editor/src/saas/components/shared/config/configSections/ApiKeys.tsxindex bee502e70d..4d65073f71 100644--- a/frontend/editor/src/saas/components/shared/config/configSections/ApiKeys.tsx+++ b/frontend/editor/src/saas/components/shared/config/configSections/ApiKeys.tsx@@ -1,5 +1,6 @@import React, { useState } from "react";-import { Anchor, Group, Stack, Text, Button, Paper } from "@mantine/core";+import { Anchor, Group, Stack, Text, Paper } from "@mantine/core";+import { Button } from "@app/ui/Button";import ApiKeySection from "@app/components/shared/config/configSections/apiKeys/ApiKeySection";import RefreshModal from "@app/components/shared/config/configSections/apiKeys/RefreshModal";import useApiKey from "@app/components/shared/config/configSections/apiKeys/hooks/useApiKey";diff --git a/frontend/editor/src/saas/components/shared/config/configSections/McpSection.tsx b/frontend/editor/src/saas/components/shared/config/configSections/McpSection.tsxindex 6a6ea06b6e..705032da58 100644--- a/frontend/editor/src/saas/components/shared/config/configSections/McpSection.tsx+++ b/frontend/editor/src/saas/components/shared/config/configSections/McpSection.tsx@@ -7,12 +7,12 @@ import {Group,Alert,Code,- Button,CopyButton,Tabs,Tooltip,ThemeIcon,} from "@mantine/core";+import { Button } from "@app/ui/Button";import LocalIcon from "@app/components/shared/LocalIcon";import { useAppConfig } from "@app/contexts/AppConfigContext";import { openAppSettings } from "@app/utils/appSettings";@@ -41,9 +41,9 @@ function CopyInline({ value, label }: { value: string; label: string }) {withArrow><Button- size="compact-xs"- variant={copied ? "light" : "default"}- color={copied ? "teal" : "gray"}+ size="sm"+ variant="secondary"+ accent={copied ? "success" : undefined}onClick={copy}leftSection={<LocalIcon@@ -180,6 +180,7 @@ export default function McpSection() {</Text><Buttonsize="sm"+ variant="primary"onClick={goToAccount}style={{ flexShrink: 0 }}>@@ -277,8 +278,8 @@ export default function McpSection() {)}</Text><Button- size="xs"- variant="light"+ size="sm"+ variant="secondary"style={{ flexShrink: 0 }}leftSection={<LocalIcon icon="key-rounded" width={14} height={14} />diff --git a/frontend/editor/src/saas/components/shared/config/configSections/Overview.tsx b/frontend/editor/src/saas/components/shared/config/configSections/Overview.tsxindex 6033b5cd90..fac87148fe 100644--- a/frontend/editor/src/saas/components/shared/config/configSections/Overview.tsx+++ b/frontend/editor/src/saas/components/shared/config/configSections/Overview.tsx@@ -2,9 +2,7 @@ import React, { useState } from "react";import {Alert,Avatar,- Button,Divider,- FileButton,Group,Image,LoadingOverlay,@@ -13,6 +11,8 @@ import {TextInput,Modal,} from "@mantine/core";+import { Button as DSButton } from "@app/ui/Button";+import { FilePicker } from "@app/ui/FilePicker";import { useTranslation } from "react-i18next";import { useAuth } from "@app/auth/UseSession";import {@@ -363,9 +363,9 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {</p>)}</div>- <Button color="red" variant="filled" onClick={onLogoutClick}>+ <DSButton variant="primary" accent="danger" onClick={onLogoutClick}>{t("logOut", "Log out")}- </Button>+ </DSButton></div></div>@@ -434,8 +434,8 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {},)}</Text>- <Button- variant="outline"+ <DSButton+ variant="secondary"onClick={handleUseCustomPicture}disabled={profileUploading}>@@ -443,7 +443,7 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {"config.account.profilePicture.useCustom","Use custom picture",)}- </Button>+ </DSButton></div></Group>) : (@@ -464,24 +464,21 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {}}><Group gap="sm">- <FileButton+ <FilePickeronChange={handleProfileUpload}accept="image/png,image/jpeg,image/webp"disabled={!user || profileUploading}+ loading={profileUploading}>- {(props) => (- <Button {...props} loading={profileUploading}>- {t("config.account.profilePicture.upload", "Upload")}- </Button>- )}- </FileButton>- <Button- variant="outline"+ {t("config.account.profilePicture.upload", "Upload")}+ </FilePicker>+ <DSButton+ variant="secondary"onClick={handleProfileRemove}disabled={!profilePictureUrl || profileUploading}>{t("config.account.profilePicture.remove", "Remove")}- </Button>+ </DSButton></Group><Text size="xs" c="var(--mantine-color-dimmed)">{t(@@ -559,8 +556,8 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {key={provider.id}content={`${t("config.account.upgrade.linkWith", "Link with")} ${provider.label}`}>- <Button- variant="outline"+ <DSButton+ variant="secondary"size="sm"leftSection={<Image@@ -581,7 +578,7 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {disabled={isLoading}>{provider.label}- </Button>+ </DSButton></Tooltip>))}</div>@@ -624,9 +621,9 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {)}style={{ flex: 1 }}/>- <Button type="submit" disabled={isLoading}>+ <DSButton type="submit" variant="primary" disabled={isLoading}>{t("config.account.upgrade.upgradeButton", "Upgrade Account")}- </Button>+ </DSButton></Group></form></div>@@ -644,13 +641,13 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {borderTop: "1px solid var(--mantine-color-default-border)",}}>- <Button- color="red"- variant="outline"+ <DSButton+ variant="secondary"+ accent="danger"onClick={() => setDeleteModalOpen(true)}>{t("config.account.overview.deleteAccount", "Delete Account")}- </Button>+ </DSButton></div>)}@@ -693,11 +690,16 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {mb="md"/><Group justify="flex-end" gap="sm">- <Button variant="default" onClick={closeDeleteModal} type="button">+ <DSButton+ variant="secondary"+ onClick={closeDeleteModal}+ type="button"+ >{t("cancel", "Cancel")}- </Button>- <Button- color="red"+ </DSButton>+ <DSButton+ variant="primary"+ accent="danger"disabled={confirmEmail.toLowerCase() !== user?.email?.toLowerCase()}@@ -705,7 +707,7 @@ const Overview: React.FC<OverviewProps> = ({ onLogoutClick }) => {loading={isDeletingAccount}>{t("config.account.overview.confirmDelete", "Delete My Account")}- </Button>+ </DSButton></Group></form></Modal>diff --git a/frontend/editor/src/saas/components/shared/config/configSections/PasswordSecurity.tsx b/frontend/editor/src/saas/components/shared/config/configSections/PasswordSecurity.tsxindex 8010b5482a..d38e46e1a7 100644--- a/frontend/editor/src/saas/components/shared/config/configSections/PasswordSecurity.tsx+++ b/frontend/editor/src/saas/components/shared/config/configSections/PasswordSecurity.tsx@@ -1,6 +1,5 @@import React, { useState } from "react";import {- Button,PasswordInput,Group,Alert,@@ -8,6 +7,7 @@ import {Modal,Divider,} from "@mantine/core";+import { Button } from "@app/ui/Button";import { useTranslation } from "react-i18next";import { useAuth } from "@app/auth/UseSession";import { supabase } from "@app/auth/supabase";@@ -116,7 +116,7 @@ const PasswordSecurity: React.FC = () => {)}</p></div>- <Button type="button" onClick={() => setOpened(true)} variant="filled">+ <Button type="button" onClick={() => setOpened(true)}>{t("config.account.security.changePassword", "Change password")}</Button></div>@@ -166,7 +166,7 @@ const PasswordSecurity: React.FC = () => {<Group justify="flex-end"><Buttontype="button"- variant="default"+ variant="secondary"onClick={() => setOpened(false)}>{t("common.cancel", "Cancel")}diff --git a/frontend/editor/src/saas/components/tools/sign/SignSettings.tsx b/frontend/editor/src/saas/components/tools/sign/SignSettings.tsxindex a6e406a410..b8691df30d 100644--- a/frontend/editor/src/saas/components/tools/sign/SignSettings.tsx+++ b/frontend/editor/src/saas/components/tools/sign/SignSettings.tsx@@ -2,16 +2,15 @@import { useTranslation } from "react-i18next";import {Stack,- Button,Text,Alert,- SegmentedControl,Divider,- ActionIcon,Tooltip,Group,Box,} from "@mantine/core";+import { Button } from "@app/ui/Button";+import { SegmentedControl } from "@app/ui/SegmentedControl";import { SignParameters } from "@app/hooks/tools/sign/useSignParameters";import { useSignature } from "@app/contexts/SignatureContext";import { useViewer } from "@app/contexts/ViewerContext";@@ -440,9 +439,9 @@ const SignSettings = ({const button = (<Button- size="xs"- variant="outline"- color={isSaved ? "green" : undefined}+ size="sm"+ variant="secondary"+ accent={isSaved ? "success" : undefined}onClick={() => onClick(scope)}disabled={!isReady || disabled || isSavedSignatureLimitReached || !hasChanges@@ -1154,49 +1153,33 @@ const SignSettings = ({onActivateSignaturePlacement || onDeactivateSignature ? (isPlacementMode ? (<Tooltip label={translate("mode.pause", "Pause placement")}>- <ActionIcon- variant="default"- size="lg"+ <Button+ variant="secondary"aria-label={translate("mode.pause", "Pause placement")}onClick={handlePausePlacement}disabled={disabled || !onDeactivateSignature}- style={{- width: "auto",- paddingInline: "0.75rem",- display: "inline-flex",- alignItems: "center",- gap: "0.4rem",- }}+ leftSection={+ <LocalIcon icon="pause-circle-rounded" width={20} height={20} />+ }>- <LocalIcon icon="pause-circle-rounded" width={20} height={20} />- <Text component="span" size="sm" fw={500}>- {translate("mode.pause", "Pause placement")}- </Text>- </ActionIcon>+ {translate("mode.pause", "Pause placement")}+ </Button></Tooltip>) : (<Tooltip label={translate("mode.resume", "Resume placement")}>- <ActionIcon- variant="default"- size="lg"+ <Button+ variant="secondary"aria-label={translate("mode.resume", "Resume placement")}onClick={handleResumePlacement}disabled={disabled || !isCurrentTypeReady || !onActivateSignaturePlacement}- style={{- width: "auto",- paddingInline: "0.75rem",- display: "inline-flex",- alignItems: "center",- gap: "0.4rem",- }}+ leftSection={+ <LocalIcon icon="play-arrow-rounded" width={20} height={20} />+ }>- <LocalIcon icon="play-arrow-rounded" width={20} height={20} />- <Text component="span" size="sm" fw={500}>- {translate("mode.resume", "Resume placement")}- </Text>- </ActionIcon>+ {translate("mode.resume", "Resume placement")}+ </Button></Tooltip>)) : null;@@ -1217,7 +1200,7 @@ const SignSettings = ({onChange={(value) =>handleSignatureSourceChange(value as SignatureSource)}- data={sourceOptions}+ options={sourceOptions}/>)}{renderSignatureBuilder()}@@ -1260,7 +1243,7 @@ const SignSettings = ({/>{onSave && (- <Button onClick={onSave} color="blue" variant="filled" fullWidth>+ <Button onClick={onSave} fullWidth>{translate("applySignatures", "Apply Signatures")}</Button>)}diff --git a/frontend/editor/src/saas/routes/AuthCallback.tsx b/frontend/editor/src/saas/routes/AuthCallback.tsxindex 1701163f9d..ee16d8ce36 100644--- a/frontend/editor/src/saas/routes/AuthCallback.tsx+++ b/frontend/editor/src/saas/routes/AuthCallback.tsx@@ -1,7 +1,7 @@import { useEffect, useState } from "react";import { useNavigate } from "react-router-dom";import { supabase } from "@app/auth/supabase";-import { Button } from "@mantine/core";+import { Button } from "@app/ui/Button";import { withBasePath } from "@app/constants/app";interface CallbackState {@@ -206,8 +206,8 @@ export default function AuthCallback() {if (state.status === "error") {return (<Button+ accent="danger"onClick={() => navigate("/login", { replace: true })}- className="inline-flex items-center rounded-md bg-rose-600 px-4 py-2 text-sm font-medium text-white shadow hover:bg-rose-700 focus:outline-none focus:ring-2 focus:ring-rose-500">Back to login</Button>diff --git a/frontend/editor/src/saas/routes/Login.tsx b/frontend/editor/src/saas/routes/Login.tsxindex 4395bef998..dcf7b454a2 100644--- a/frontend/editor/src/saas/routes/Login.tsx+++ b/frontend/editor/src/saas/routes/Login.tsx@@ -1,6 +1,7 @@import { useEffect, useMemo, useState } from "react";import { useNavigate } from "react-router-dom";import { supabase, signInAnonymously } from "@app/auth/supabase";+import { Button } from "@app/ui/Button";import { useAuth } from "@app/auth/UseSession";import { useTranslation } from "@app/hooks/useTranslation";import { useDocumentMeta } from "@app/hooks/useDocumentMeta";@@ -299,8 +300,8 @@ export default function Login() {{/* Magic link button + its expandable form as one unit */}<div>- <button- type="button"+ <Button+ variant="secondary"disabled={isSigningIn}onClick={toggleMagicLink}className={`oauth-button-fullwidth auth-expandable-trigger ${showMagicLinkForm ? "auth-expandable-trigger--active" : ""}`}@@ -318,7 +319,7 @@ export default function Login() {{t("login.useMagicLink", "Use magic link")}</span></span>- </button>+ </Button><divclassName={`auth-expand-grid ${showMagicLinkForm ? "auth-expand-grid--open" : ""}`}@@ -352,7 +353,7 @@ export default function Login() {}className="auth-input"/>- <button+ <ButtononClick={signInWithMagicLink}disabled={isSigningIn || !magicLinkEmail}className="auth-magic-button"@@ -360,7 +361,7 @@ export default function Login() {{isSigningIn? t("login.sending"): t("login.sendMagicLink")}- </button>+ </Button></div>)}</div>@@ -370,8 +371,8 @@ export default function Login() {</div>{/* Email & Password button */}- <button- type="button"+ <Button+ variant="secondary"disabled={isSigningIn}onClick={toggleEmailForm}className={`oauth-button-fullwidth auth-expandable-trigger ${showEmailForm ? "auth-expandable-trigger--active" : ""}`}@@ -381,7 +382,7 @@ export default function Login() {<span className="auth-at-icon">@</span><span className="oauth-btn-label">{`${t("login.signInWith", "Sign in with")} email`}</span></span>- </button>+ </Button>{/* Email form — animated expand */}<div@@ -400,22 +401,22 @@ export default function Login() {isSigningIn ? t("login.loggingIn") : t("login.login")}/>- <button- type="button"+ <Button+ variant="tertiary"onClick={() => navigate("/auth/reset")}className="auth-link-black"style={{ fontSize: "0.8125rem", marginTop: "0.25rem" }}>{t("login.forgotPassword", "Forgot your password?")}- </button>+ </Button></div></div></div>{/* Skip */}<div style={{ textAlign: "center", margin: "1rem 0" }}>- <button- type="button"+ <Button+ variant="tertiary"onClick={handleAnonymousSignIn}disabled={isSigningIn}style={{@@ -424,13 +425,13 @@ export default function Login() {cursor: "pointer",fontSize: "1rem",fontWeight: 700,- color: "#000000",+ color: "var(--text-primary)",}}>{isSigningIn? t("login.signingIn", "Signing in..."): `${t("signup.skip", "Skip")} →`}- </button>+ </Button></div>{/* Bottom */}@@ -441,8 +442,8 @@ export default function Login() {paddingTop: "1rem",}}>- <button- type="button"+ <Button+ variant="tertiary"onClick={() => navigate("/signup")}style={{background: "none",@@ -453,7 +454,7 @@ export default function Login() {}}>{t("login.createAccount", "Create an account")}- </button>+ </Button></div></AuthLayout>);diff --git a/frontend/editor/src/saas/routes/OAuthConsent.tsx b/frontend/editor/src/saas/routes/OAuthConsent.tsxindex e36f4d371b..d851a91a53 100644--- a/frontend/editor/src/saas/routes/OAuthConsent.tsx+++ b/frontend/editor/src/saas/routes/OAuthConsent.tsx@@ -1,5 +1,6 @@import { useCallback, useEffect, useMemo, useState } from "react";import { useLocation, useNavigate } from "react-router-dom";+import { Button } from "@app/ui/Button";import { useAuth } from "@app/auth/UseSession";import { useTranslation } from "@app/hooks/useTranslation";import { useDocumentMeta } from "@app/hooks/useDocumentMeta";@@ -236,13 +237,13 @@ export default function OAuthConsent() {"Sign in to your Stirling PDF account to continue connecting the app.",)}</p>- <button- type="button"+ <Button+ variant="secondary"className="oauth-button-fullwidth"onClick={() => navigate(`/login?next=${encodeURIComponent(next)}`)}>{t("oauthConsent.signInButton", "Sign in to continue")}- </button>+ </Button></AuthLayout>);}@@ -358,8 +359,7 @@ export default function OAuthConsent() {<ErrorMessage error={error} /><div style={{ display: "flex", flexDirection: "column", gap: "0.75rem" }}>- <button- type="button"+ <Buttondisabled={deciding !== null}onClick={() => decide("approve")}style={{@@ -378,9 +378,9 @@ export default function OAuthConsent() {{deciding === "approve"? t("oauthConsent.approving", "Allowing..."): t("oauthConsent.approve", "Allow access")}- </button>- <button- type="button"+ </Button>+ <Button+ variant="secondary"disabled={deciding !== null}onClick={() => decide("deny")}className="oauth-button-fullwidth"@@ -388,7 +388,7 @@ export default function OAuthConsent() {{deciding === "deny"? t("oauthConsent.denying", "Denying..."): t("oauthConsent.deny", "Deny")}- </button>+ </Button></div>{displayName && (diff --git a/frontend/editor/src/saas/routes/ResetPassword.tsx b/frontend/editor/src/saas/routes/ResetPassword.tsxindex f17e82bd68..b0a1273199 100644--- a/frontend/editor/src/saas/routes/ResetPassword.tsx+++ b/frontend/editor/src/saas/routes/ResetPassword.tsx@@ -9,6 +9,7 @@ import NavigationLink from "@app/routes/login/NavigationLink";import { supabase } from "@app/auth/supabase";import { absoluteWithBasePath } from "@app/constants/app";import { useTranslation } from "@app/hooks/useTranslation";+import { Button } from "@app/ui/Button";export default function ResetPassword() {const { t } = useTranslation();@@ -233,7 +234,7 @@ export default function ResetPassword() {/></div></div>- <button+ <ButtononClick={handleUpdatePassword}disabled={isSubmitting || !password || !confirmPassword}className="auth-button"@@ -241,7 +242,7 @@ export default function ResetPassword() {{isSubmitting? t("login.sending", "Sending…"): t("login.updatePassword", "Update password")}- </button>+ </Button><NavigationLinkonClick={() => navigate("/login")}text={t("login.backToSignIn", "Back to sign in")}diff --git a/frontend/editor/src/saas/routes/Signup.tsx b/frontend/editor/src/saas/routes/Signup.tsxindex 36d162a549..3836c60ac1 100644--- a/frontend/editor/src/saas/routes/Signup.tsx+++ b/frontend/editor/src/saas/routes/Signup.tsx@@ -9,6 +9,7 @@ import AuthLayout from "@app/routes/authShared/AuthLayout";import "@app/auth/ui/auth.css";import "@app/routes/authShared/saas-auth.css";import { alert } from "@app/components/toast";+import { Button } from "@app/ui/Button";// Import signup componentsimport ErrorMessage from "@app/auth/ui/ErrorMessage";@@ -209,8 +210,8 @@ export default function Signup() {</div>{/* Email & Password button */}- <button- type="button"+ <Button+ variant="secondary"disabled={isSigningUp}onClick={() => setShowEmailForm((v) => !v)}className={`oauth-button-fullwidth auth-expandable-trigger ${showEmailForm ? "auth-expandable-trigger--active" : ""}`}@@ -220,7 +221,7 @@ export default function Signup() {<span className="auth-at-icon">@</span><span className="oauth-btn-label">{`${t("signup.signUpWith", "Sign up with")} email`}</span></span>- </button>+ </Button>{/* Email form — animated expand */}<div@@ -249,8 +250,8 @@ export default function Signup() {{/* Skip */}<div style={{ textAlign: "center", margin: "1rem 0" }}>- <button- type="button"+ <Button+ variant="tertiary"onClick={handleAnonymousSignIn}disabled={isSigningUp}style={{@@ -259,13 +260,13 @@ export default function Signup() {cursor: "pointer",fontSize: "1rem",fontWeight: 700,- color: "#000000",+ color: "var(--text-primary)",}}>{isSigningUp? t("login.signingIn", "Signing in..."): `${t("signup.skip", "Skip")} →`}- </button>+ </Button></div>{/* Bottom */}@@ -276,8 +277,8 @@ export default function Signup() {paddingTop: "1rem",}}>- <button- type="button"+ <Button+ variant="tertiary"onClick={() => navigate("/login")}style={{background: "none",@@ -288,7 +289,7 @@ export default function Signup() {}}>{t("signup.alreadyHaveAccount", "I already have an account")}- </button>+ </Button></div></AuthLayout>);diff --git a/frontend/editor/src/saas/routes/authShared/GuestSignInButton.tsx b/frontend/editor/src/saas/routes/authShared/GuestSignInButton.tsxindex 31bbc35ca0..273bb17dfd 100644--- a/frontend/editor/src/saas/routes/authShared/GuestSignInButton.tsx+++ b/frontend/editor/src/saas/routes/authShared/GuestSignInButton.tsx@@ -1,4 +1,7 @@import React from "react";+import { Button } from "@app/ui/Button";++// TODO: add saas-auth.css to the same location as auth.cssimport "@app/auth/ui/auth.css";import "@app/routes/authShared/saas-auth.css";@@ -14,13 +17,13 @@ export default function GuestSignInButton({disabled,}: GuestSignInButtonProps) {return (- <button- type="button"+ <Button+ variant="secondary"onClick={onClick}disabled={disabled}className="w-full px-4 py-[0.75rem] rounded-[0.625rem] text-base font-semibold mb-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed auth-guest-button">{label}- </button>+ </Button>);}diff --git a/frontend/editor/src/saas/routes/authShared/saas-auth.css b/frontend/editor/src/saas/routes/authShared/saas-auth.cssindex 535d72d3dd..96d97f695c 100644--- a/frontend/editor/src/saas/routes/authShared/saas-auth.css+++ b/frontend/editor/src/saas/routes/authShared/saas-auth.css@@ -129,6 +129,11 @@text-align: center;}+/* ── Dark-mode icon inversion for monochrome OAuth logos ────────────── */+[data-mantine-color-scheme="dark"] .oauth-icon--github {+ filter: invert(1);+}+/* ── Icon helpers inside oauth-button-fullwidth ─────────────────────── */.auth-at-icon {font-size: 1.25rem;diff --git a/frontend/editor/src/saas/routes/login/EmailPasswordForm.tsx b/frontend/editor/src/saas/routes/login/EmailPasswordForm.tsxindex ecc8cbd209..a7435eb43b 100644--- a/frontend/editor/src/saas/routes/login/EmailPasswordForm.tsx+++ b/frontend/editor/src/saas/routes/login/EmailPasswordForm.tsx@@ -1,6 +1,7 @@import { useTranslation } from "react-i18next";import "@app/auth/ui/auth.css";import "@app/routes/authShared/saas-auth.css";+import { Button } from "@app/ui/Button";interface EmailPasswordFormProps {email: string;@@ -78,13 +79,14 @@ export default function EmailPasswordForm({)}</div>- <button+ <Buttontype="submit"disabled={isSubmitting || !email || (showPasswordField && !password)}- className="auth-button"+ accent="brand"+ fullWidth>{submitButtonText}- </button>+ </Button></form>);}diff --git a/frontend/editor/src/saas/routes/login/MagicLinkForm.tsx b/frontend/editor/src/saas/routes/login/MagicLinkForm.tsxindex 9833928247..2a669595de 100644--- a/frontend/editor/src/saas/routes/login/MagicLinkForm.tsx+++ b/frontend/editor/src/saas/routes/login/MagicLinkForm.tsx@@ -1,3 +1,4 @@+import { Button } from "@app/ui/Button";import { useTranslation } from "@app/hooks/useTranslation";import "@app/auth/ui/auth.css";import "@app/routes/authShared/saas-auth.css";@@ -24,7 +25,8 @@ export default function MagicLinkForm({if (!showMagicLink) {return (<div className="auth-toggle-wrapper">- <button+ <Button+ variant="tertiary"onClick={() => {setShowMagicLink(true);}}@@ -32,7 +34,7 @@ export default function MagicLinkForm({className="auth-toggle-link">{t("login.useMagicLink")}- </button>+ </Button></div>);}@@ -47,13 +49,13 @@ export default function MagicLinkForm({onKeyPress={(e) => e.key === "Enter" && !isSubmitting && onSubmit()}className="auth-input"/>- <button+ <ButtononClick={onSubmit}disabled={isSubmitting || !magicLinkEmail}className="auth-magic-button">{isSubmitting ? t("login.sending") : t("login.sendMagicLink")}- </button>+ </Button></div>);}diff --git a/frontend/editor/src/saas/routes/login/OAuthButtons.tsx b/frontend/editor/src/saas/routes/login/OAuthButtons.tsxindex 21e76348f9..202a1c9d3c 100644--- a/frontend/editor/src/saas/routes/login/OAuthButtons.tsx+++ b/frontend/editor/src/saas/routes/login/OAuthButtons.tsx@@ -1,6 +1,7 @@import { oauthProviders } from "@app/constants/authProviders";import { useTranslation } from "@app/hooks/useTranslation";import { Tooltip } from "@app/components/shared/Tooltip";+import { Button } from "@app/ui/Button";import { oauthIconUrl } from "@app/auth/ui/oauthIcons";// Exports for compatibility with proprietary code@@ -38,7 +39,8 @@ export default function OAuthButtons({content={`${t("login.signInWith", "Sign in with")} ${p.label}`}position="top">- <button+ <Button+ variant="secondary"onClick={() => onProviderClick(p.id as "github" | "google")}disabled={isSubmitting || p.isDisabled}className="oauth-button-icon"@@ -47,9 +49,9 @@ export default function OAuthButtons({<imgsrc={oauthIconUrl(p.file)}alt={p.label}- className={`oauth-icon-small ${p.isDisabled ? "opacity-20" : ""}`}+ className={`oauth-icon-small oauth-icon--${p.id} ${p.isDisabled ? "opacity-20" : ""}`}/>- </button>+ </Button></Tooltip>))}</div>@@ -65,7 +67,8 @@ export default function OAuthButtons({content={`${t("login.signInWith", "Sign in with")} ${p.label}`}position="top">- <button+ <Button+ variant="secondary"onClick={() => onProviderClick(p.id as "github" | "google")}disabled={isSubmitting || p.isDisabled}className="oauth-button-grid"@@ -74,9 +77,9 @@ export default function OAuthButtons({<imgsrc={oauthIconUrl(p.file)}alt={p.label}- className={`oauth-icon-medium ${p.isDisabled ? "opacity-20" : ""}`}+ className={`oauth-icon-medium oauth-icon--${p.id} ${p.isDisabled ? "opacity-20" : ""}`}/>- </button>+ </Button></Tooltip>))}</div>@@ -87,8 +90,9 @@ export default function OAuthButtons({return (<div className="oauth-container-fullwidth">{oauthProviders.map((p) => (- <button+ <Buttonkey={p.id}+ variant="secondary"onClick={() => onProviderClick(p.id as "github" | "google")}disabled={isSubmitting || p.isDisabled}className="oauth-button-fullwidth"@@ -98,7 +102,7 @@ export default function OAuthButtons({<imgsrc={oauthIconUrl(p.file)}alt={p.label}- className={`oauth-icon-medium ${p.isDisabled ? "opacity-20" : ""}`}+ className={`oauth-icon-medium oauth-icon--${p.id} ${p.isDisabled ? "opacity-20" : ""}`}style={{ marginRight: "0.5rem", flexShrink: 0 }}/><span className="oauth-btn-label">@@ -106,7 +110,7 @@ export default function OAuthButtons({{p.label}</span></span>- </button>+ </Button>))}</div>);@@ -115,8 +119,9 @@ export default function OAuthButtons({return (<div className="oauth-container-vertical">{oauthProviders.map((p) => (- <button+ <Buttonkey={p.id}+ variant="secondary"onClick={() => onProviderClick(p.id as "github" | "google")}disabled={isSubmitting || p.isDisabled}className="oauth-button-vertical"@@ -125,10 +130,10 @@ export default function OAuthButtons({<imgsrc={oauthIconUrl(p.file)}alt={p.label}- className={`oauth-icon-tiny ${p.isDisabled ? "opacity-20" : ""}`}+ className={`oauth-icon-tiny oauth-icon--${p.id} ${p.isDisabled ? "opacity-20" : ""}`}/>{p.label}- </button>+ </Button>))}</div>);diff --git a/frontend/editor/src/saas/styles/saas-theme.css b/frontend/editor/src/saas/styles/saas-theme.cssindex 3cbce19761..654fe5fe17 100644--- a/frontend/editor/src/saas/styles/saas-theme.css+++ b/frontend/editor/src/saas/styles/saas-theme.css@@ -76,8 +76,6 @@--api-keys-card-shadow: rgba(0, 0, 0, 0.06);--api-keys-input-bg: #f8f8f8;--api-keys-input-border: #e0e0e0;- --api-keys-button-bg: #f5f5f5;- --api-keys-button-color: #333333;}[data-mantine-color-scheme="dark"] {@@ -90,8 +88,8 @@--spdf-compare-added-badge-fg: var(--color-green-500);--spdf-compare-inline-removed-bg: rgba(255, 59, 48, 0.25);--spdf-compare-inline-added-bg: rgba(52, 199, 89, 0.25);- --compare-page-label-bg: #2a2f36;- --compare-page-label-fg: #d0d6dc;+ --compare-page-label-bg: #0d1020;+ --compare-page-label-fg: #c2c8e0;/* Orange scale (dark mode mirrors light values to match UI) */--color-orange-50: #fff4ed;@@ -122,29 +120,27 @@--tool-subcategory-text-color-light: #9ca3af;/* API usage progress bar colors (dark mode) */- --usage-weekly-active: #60a5fa;+ --usage-weekly-active: #4f8ef5;--usage-bought-active: #34d399;- --usage-total-used: #ffffff;- --usage-inactive: #43464b;+ --usage-total-used: #e8eaf6;+ --usage-inactive: #1c2340;/* API Keys section colors (dark mode) */- --api-keys-card-bg: #2a2f36;- --api-keys-card-border: #3a4047;+ --api-keys-card-bg: #131729;+ --api-keys-card-border: #1c2340;--api-keys-card-shadow: none;- --api-keys-input-bg: #1f2329;- --api-keys-input-border: #3a4047;- --api-keys-button-bg: #3a4047;- --api-keys-button-color: #d0d6dc;+ --api-keys-input-bg: #0d1020;+ --api-keys-input-border: #1c2340;--text-divider-rule-color: var(--tool-subcategory-rule-color);--text-divider-label-color: var(--text-muted);/* App Config Modal colors (dark mode) */- --modal-nav-bg: #1f2329;- --modal-nav-section-title: #9ca3af;- --modal-nav-item: #d0d6dc;- --modal-nav-item-active: #0a8bff;- --modal-nav-item-active-bg: rgba(10, 139, 255, 0.15);- --modal-content-bg: #2a2f36;- --modal-header-border: rgba(255, 255, 255, 0.08);+ --modal-nav-bg: #0d1020;+ --modal-nav-section-title: #5b6280;+ --modal-nav-item: #c2c8e0;+ --modal-nav-item-active: #4f8ef5;+ --modal-nav-item-active-bg: rgba(79, 142, 245, 0.15);+ --modal-content-bg: #131729;+ --modal-header-border: rgba(255, 255, 255, 0.05);}diff --git a/frontend/editor/tsconfig.portal.vite.json b/frontend/editor/tsconfig.portal.vite.jsonindex 8a63033eb6..93337d1dcc 100644--- a/frontend/editor/tsconfig.portal.vite.json+++ b/frontend/editor/tsconfig.portal.vite.json@@ -1,6 +1,6 @@{"extends": "./tsconfig.json",- "comment": "Path resolution for the portal's vitest project (referenced by vitest.config.ts). Broad include ('src', via the base) so vite-tsconfig-paths rewrites @app/* in every editor/src file the portal tests pull in (e.g. proprietary/ui), not just the portal layer. The portal's own typecheck uses src/portal/tsconfig.json.",+ "comment": "Path resolution for the portal's vitest project (referenced by vitest.config.ts). Broad include ('src', via the base) so vite-tsconfig-paths rewrites @app/* in every editor/src file the portal tests pull in (e.g. core/ui), not just the portal layer. The portal's own typecheck uses src/portal/tsconfig.json.","compilerOptions": {"paths": {"@app/*": [diff --git a/frontend/editor/vitest.config.ts b/frontend/editor/vitest.config.tsindex 5a0fc50651..e4dfd76277 100644--- a/frontend/editor/vitest.config.ts+++ b/frontend/editor/vitest.config.ts@@ -57,7 +57,7 @@ export default defineConfig({react(),tsconfigPaths({// Broad project so @app/@portal resolve in every editor file the- // portal tests pull in (proprietary/ui, core, ...).+ // portal tests pull in (core/ui, core, ...).projects: ["./tsconfig.portal.vite.json"],}),],diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjsindex 81698ddde6..02f1c68132 100644--- a/frontend/eslint.config.mjs+++ b/frontend/eslint.config.mjs@@ -30,6 +30,42 @@ const baseRestrictedImportPatterns = [},];+// Button/SegmentedControl/Chip must come from the shared DS (@app/ui), not Mantine.+// If no variant fits, extend @app/ui — that layer (editor/src/core/ui) is exempt below.+const mantineComponentImportRestrictions = [+ {+ selector:+ "ImportDeclaration[source.value='@mantine/core'] > ImportSpecifier[imported.name=/^(Button|ActionIcon|UnstyledButton|CloseButton|FileButton)$/]",+ message:+ 'Use the shared Button (@app/ui/Button) instead of the Mantine button family. variant=primary|secondary|tertiary, accent=default|neutral|brand|ai|premium|danger|success|warning; an icon-only button is `<Button leftSection={…} aria-label="…" />`. If no variant fits, extend the shared Button rather than importing Mantine.',+ },+ {+ selector:+ "ImportDeclaration[source.value='@mantine/core'] > ImportSpecifier[imported.name='SegmentedControl']",+ message:+ "Use the shared SegmentedControl (@app/ui/SegmentedControl) instead of Mantine's.",+ },+ {+ selector:+ "ImportDeclaration[source.value='@mantine/core'] > ImportSpecifier[imported.name=/^(Chip|Pill)$/]",+ message:+ "Use the shared Chip (@app/ui/Chip) instead of Mantine's Chip/Pill.",+ },+];++// Raw <button> should be a shared Button too — but bespoke CSS-styled controls+// (tabs, nav rows, preset chips) can be exempted from this selector alone.+const rawButtonSyntaxRestriction = {+ selector: "JSXOpeningElement[name.name='button']",+ message:+ "Use the shared Button (@app/ui/Button) instead of a raw <button> element. If no variant fits, extend the shared Button.",+};++const sharedComponentSyntaxRestrictions = [+ ...mantineComponentImportRestrictions,+ rawButtonSyntaxRestriction,+];+export default defineConfig({// Everything that contains 3rd party code that we don't want to lint@@ -146,6 +182,7 @@ export default defineConfig(],"no-restricted-syntax": ["error",+ ...sharedComponentSyntaxRestrictions,{selector:"MemberExpression[object.name='window'][property.name='location']",@@ -161,6 +198,46 @@ export default defineConfig(],},},+ // app code must use shared DS Button/SegmentedControl/Chip; cloud/ covered above.+ {+ files: ["editor/src/**/*.{js,mjs,jsx,ts,tsx}"],+ ignores: [+ "editor/src/cloud/**/*.{js,mjs,jsx,ts,tsx}", // covered by cloud/ block above+ "editor/src/core/ui/**/*.{js,mjs,jsx,ts,tsx}", // the shared DS itself — wraps Mantine/raw elements+ "**/*.stories.{js,mjs,jsx,ts,tsx}", // stories may demo Mantine directly+ "**/*.test.{js,mjs,jsx,ts,tsx}", // tests may use raw elements as fixtures+ "editor/src/prototypes/**/*.{js,mjs,jsx,ts,tsx}", // not shipped+ ],+ rules: {+ "no-restricted-syntax": ["error", ...sharedComponentSyntaxRestrictions],+ },+ },+ // Intentional exceptions: ARIA tablist tabs and sub-26px segmented header —+ // semantically not buttons; shared Button sizing can't represent them.+ // Do NOT add ordinary buttons here.+ {+ files: [+ "editor/src/core/components/shared/FileSelectorPicker.tsx",+ "editor/src/core/components/filesPage/FileManagerView.tsx",+ "editor/src/core/pages/HomePage.tsx",+ ],+ rules: {+ "no-restricted-syntax": "off",+ },+ },+ // TEMPORARY: the procurement feature was merged in from main and still uses+ // bespoke CSS-styled raw <button>s. Exempt ONLY the raw-<button> rule here —+ // the Mantine import bans stay in force so this feature can't regress to+ // Mantine's Button/Chip/SegmentedControl — and migrate these to the shared+ // Button in a follow-up PR. Do NOT add other folders to this block.+ {+ files: [+ "editor/src/portal/components/procurement/**/*.{js,mjs,jsx,ts,tsx}",+ ],+ rules: {+ "no-restricted-syntax": ["error", ...mantineComponentImportRestrictions],+ },+ },// Stricter rules that not all sub-folders are conformant to yet.{files: srcGlobs,diff --git a/frontend/scripts/find-unused-css.mjs b/frontend/scripts/find-unused-css.mjsnew file mode 100644index 0000000000..358965a729--- /dev/null+++ b/frontend/scripts/find-unused-css.mjs@@ -0,0 +1,129 @@+// Conservative unused-CSS detector (no deps).+// Reports CSS class selectors + custom properties that have ZERO references+// anywhere in the frontend source (className strings, `styles.x` module access,+// template-literal tokens, `var(--x)`, inline `"--x":` custom props, `composes:`).+// Conservative by design: if a token appears ANYWHERE outside its own selector+// definition, it's treated as USED (so dynamically-built classes are kept).+//+// Usage: cd frontend && node scripts/find-unused-css.mjs [filterSubstring]++import { readFileSync, readdirSync } from "node:fs";+import { join, extname, isAbsolute } from "node:path";++const ROOTS = ["editor/src", "shared", "portal/src"];+const SRC_EXT = new Set([+ ".ts",+ ".tsx",+ ".js",+ ".jsx",+ ".mjs",+ ".cjs",+ ".html",+ ".mdx",+]);+const filter = process.argv[2] ?? "";++function walk(dir, acc = []) {+ let entries;+ try {+ entries = readdirSync(dir, { withFileTypes: true });+ } catch {+ return acc;+ }+ for (const e of entries) {+ if (+ e.name === "node_modules" ||+ e.name === "dist" ||+ e.name.startsWith(".")+ )+ continue;+ // Dirents from readdirSync are always single path components, but guard+ // anyway so a name can never escape `dir` (satisfies Aikido's path-traversal+ // check on the readFile below).+ if (e.name.includes("..") || isAbsolute(e.name)) continue;+ const p = join(dir, e.name);+ if (e.isDirectory()) walk(p, acc);+ // Exclude the temporary button-catalog gallery so its reproduced classes+ // don't mask genuinely-dead CSS.+ else if (!p.includes("_buttonGallery")) acc.push(p);+ }+ return acc;+}++const allFiles = ROOTS.flatMap((r) => walk(r));+const cssFiles = allFiles.filter((f) => extname(f) === ".css");+const srcFiles = allFiles.filter((f) => SRC_EXT.has(extname(f)));++const srcCorpus = srcFiles.map((f) => readFileSync(f, "utf8")).join("\n");+const cssCorpus = cssFiles.map((f) => readFileSync(f, "utf8")).join("\n");++const esc = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");++// --- collect definitions ---------------------------------------------------+const classDef = new Map(); // class -> Set(file)+const varDef = new Map(); // --var -> Set(file)++for (const f of cssFiles) {+ const clean = readFileSync(f, "utf8").replace(/\/\*[\s\S]*?\*\//g, "");+ // class names only from SELECTOR preludes (text before each `{`), so we don't+ // pick up `.png`/`.svg` etc. inside property values.+ for (const rule of clean.matchAll(/([^{}]*)\{/g)) {+ for (const m of rule[1].matchAll(/\.(-?[a-zA-Z_][\w-]*)/g)) {+ if (!classDef.has(m[1])) classDef.set(m[1], new Set());+ classDef.get(m[1]).add(f);+ }+ }+ for (const m of clean.matchAll(/(--[a-zA-Z][\w-]*)\s*:/g)) {+ if (!varDef.has(m[1])) varDef.set(m[1], new Set());+ varDef.get(m[1]).add(f);+ }+}++// --- usage checks ----------------------------------------------------------+function classUsed(c) {+ // token in any source file (className="..", clsx, `tpl-${}`, styles.camel, etc.)+ if (new RegExp(`(^|[^\\w-])${esc(c)}([^\\w-]|$)`).test(srcCorpus))+ return true;+ // composed by another stylesheet+ if (new RegExp(`composes:[^;]*\\b${esc(c)}\\b`).test(cssCorpus)) return true;+ // dynamically constructed: a `-`/`_`-bounded prefix of `c` is immediately+ // followed by a template `${...}` in source, e.g. `sui-btn--${variant}`.+ for (let i = c.length - 1; i >= 3; i--) {+ if (c[i] === "-" || c[i] === "_") {+ if (new RegExp(`${esc(c.slice(0, i + 1))}\\$\\{`).test(srcCorpus))+ return true;+ }+ }+ return false;+}+function varUsed(v) {+ if (new RegExp(`var\\(\\s*${esc(v)}\\b`).test(cssCorpus + "\n" + srcCorpus))+ return true;+ if (new RegExp(`["']${esc(v)}["']\\s*:`).test(srcCorpus)) return true; // inline custom prop+ return false;+}++const rel = (f) =>+ f.replace("editor/src/", "").replace("portal/src/", "portal/");+// `mantine-*` are the framework's own runtime classes (applied by Mantine, not+// referenced in our source) — exclude; they can't be validated by source refs.+const unusedClasses = [...classDef.keys()]+ .filter((c) => !c.startsWith("mantine-") && !classUsed(c))+ .sort();+const unusedVars = [...varDef.keys()].filter((v) => !varUsed(v)).sort();++const show = (name) =>+ !filter || name.toLowerCase().includes(filter.toLowerCase());++console.log(+ `\n=== UNUSED CLASSES (${unusedClasses.filter(show).length}${filter ? ` matching "${filter}"` : ""} of ${unusedClasses.length} total) ===`,+);+for (const c of unusedClasses.filter(show)) {+ console.log(`.${c}\t${[...classDef.get(c)].map(rel).join(", ")}`);+}+console.log(+ `\n=== UNUSED VARS (${unusedVars.filter(show).length}${filter ? ` matching "${filter}"` : ""} of ${unusedVars.length} total) ===`,+);+for (const v of unusedVars.filter(show)) {+ console.log(`${v}\t${[...varDef.get(v)].map(rel).join(", ")}`);+}diff --git a/frontend/shared/components/index.ts b/frontend/shared/components/index.tsnew file mode 100644index 0000000000..86117f0eaa--- /dev/null+++ b/frontend/shared/components/index.ts@@ -0,0 +1,45 @@+export * from "@shared/components/Button";+export * from "@shared/components/ActionIcon";+export * from "@shared/components/FilePicker";+export * from "@shared/components/StatusBadge";+export * from "@shared/components/MethodBadge";+export * from "@shared/components/ToggleSwitch";+export * from "@shared/components/ProgressBar";+export * from "@shared/components/MetricCard";+export * from "@shared/components/NavItem";+export * from "@shared/components/PanelHeader";+export * from "@shared/components/CodeBlock";+export * from "@shared/components/SectionDivider";+export * from "@shared/components/Card";+export * from "@shared/components/Modal";+export * from "@shared/components/SettingsShell";++// Layout+export * from "@shared/components/Stack";+export * from "@shared/components/Inline";+export * from "@shared/components/MetricStrip";+export * from "@shared/components/StatTile";++// Feedback+export * from "@shared/components/Spinner";+export * from "@shared/components/Skeleton";+export * from "@shared/components/Avatar";+export * from "@shared/components/Chip";+export * from "@shared/components/EmptyState";+export * from "@shared/components/Banner";+export * from "@shared/components/Toast";++// Compound+export * from "@shared/components/Collapsible";+export * from "@shared/components/Tabs";+export * from "@shared/components/Dropdown";+export * from "@shared/components/Drawer";+export * from "@shared/components/Table";++// Forms+export * from "@shared/components/FormField";+export * from "@shared/components/Input";+export * from "@shared/components/Select";+export * from "@shared/components/Checkbox";+export * from "@shared/components/Radio";+export * from "@shared/components/Slider";