The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Consolidate the public theme API (#26482)
Raphaël Bosi5f31f1d91d52
diff --git a/packages/twenty-agent-skills/references/concepts/how-apps-work.md b/packages/twenty-agent-skills/references/concepts/how-apps-work.mdindex a6f0bd840b9..81169f575d4 100644--- a/packages/twenty-agent-skills/references/concepts/how-apps-work.md+++ b/packages/twenty-agent-skills/references/concepts/how-apps-work.md@@ -21,7 +21,7 @@ A Twenty app depends on two SDK packages:`twenty-sdk/front-component` provides runtime APIs available inside front components: `navigate`, `enqueueSnackbar`, `openSidePanelPage`, `useSelectedRecordIds`, `getApplicationVariable`, and others.-Twenty UI components (`Button`, `Chip`, `Tag`, `Status`, `Heading`, `Section`, `ThemeProvider`, icons, `themeCssVariables`) live in the `twenty-ui` package. Install `twenty-ui` from npm at the same version as `twenty-sdk` and `twenty-client-sdk` and import from its subpaths (`twenty-ui/primitives/input`, `twenty-ui/primitives/data-display`, `twenty-ui/icon`, `twenty-ui/primitives/typography`, `twenty-ui/components`, `twenty-ui/theme-constants`, and others).+Twenty UI components (`Button`, `Chip`, `Tag`, `Status`, `Heading`, `Section`, `ThemeProvider`, icons, `themeCssVariables`) live in the `twenty-ui` package. Install `twenty-ui` from npm at the same version as `twenty-sdk` and `twenty-client-sdk` and import from its subpaths (`twenty-ui/primitives/input`, `twenty-ui/primitives/data-display`, `twenty-ui/icon`, `twenty-ui/primitives/typography`, `twenty-ui/components`, `twenty-ui/theme`, and others).`twenty-client-sdk/core` provides `CoreApiClient` for querying and mutating workspace records (companies, people, custom objects). `twenty-client-sdk/metadata` provides access to workspace metadata (object definitions, field definitions).diff --git a/packages/twenty-agent-skills/references/develop-app/front-components.md b/packages/twenty-agent-skills/references/develop-app/front-components.mdindex b20b72ae48c..3185885663a 100644--- a/packages/twenty-agent-skills/references/develop-app/front-components.md+++ b/packages/twenty-agent-skills/references/develop-app/front-components.md@@ -33,13 +33,13 @@ Keep imports narrow:- Use `twenty-sdk/front-component` for front component hooks and host APIs.- Use `twenty-client-sdk/core` or `twenty-client-sdk/metadata` for data access.-- Install `twenty-ui` from npm at the same version as `twenty-sdk` and `twenty-client-sdk` and import Twenty UI components, icons, and theme tokens from its subpaths (`twenty-ui/primitives/input`, `twenty-ui/primitives/data-display`, `twenty-ui/icon`, `twenty-ui/primitives/typography`, `twenty-ui/theme-constants`, and others) before adding external UI libraries.+- Install `twenty-ui` from npm at the same version as `twenty-sdk` and `twenty-client-sdk` and import Twenty UI components, icons, and theme tokens from its subpaths (`twenty-ui/primitives/input`, `twenty-ui/primitives/data-display`, `twenty-ui/icon`, `twenty-ui/primitives/typography`, `twenty-ui/theme`, and others) before adding external UI libraries.-The front component renderer provides a Twenty `ThemeProvider` around the remote root. For isolated examples or local story-style verification, wrapping the component in `ThemeProvider` from `twenty-ui/theme-constants` is also acceptable.+The front component renderer provides a Twenty `ThemeProvider` around the remote root. For isolated examples or local story-style verification, wrapping the component in `ThemeProvider` from `twenty-ui/theme` is also acceptable.-The canonical Twenty UI front component example is `packages/twenty-front-component-renderer/src/__stories__/showcase/twenty-ui-example.front-component.tsx`. It imports `Button` from `twenty-ui/primitives/input`; `Chip`, `Status`, and `Tag` from `twenty-ui/primitives/data-display`; `Section` from `twenty-ui/components`; and `ThemeProvider` from `twenty-ui/theme-constants`.+The canonical Twenty UI front component example is `packages/twenty-front-component-renderer/src/__stories__/showcase/twenty-ui-example.front-component.tsx`. It imports `Button` from `twenty-ui/primitives/input`; `Chip`, `Status`, and `Tag` from `twenty-ui/primitives/data-display`; `Section` from `twenty-ui/components`; and `ThemeProvider` from `twenty-ui/theme`.-Read theme tokens with the `useTheme()` hook from `twenty-ui/theme-constants` inside the component body. The same tokens are also exported as the `themeCssVariables` constant, but the SDK mocks `twenty-ui` during manifest extraction, so a module-level constant that dereferences `themeCssVariables` can fail before the component renders — prefer `useTheme()`.+Read theme tokens with the `useTheme()` hook from `twenty-ui/theme` inside the component body. The same tokens are also exported as the `themeCssVariables` constant, but the SDK mocks `twenty-ui` during manifest extraction, so a module-level constant that dereferences `themeCssVariables` can fail before the component renders — prefer `useTheme()`.Prefer Twenty UI icons from `twenty-ui/icon` when one exists. Use inline SVG only for app-specific marks or icons that are not available from `twenty-ui/icon`.diff --git a/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx b/packages/twenty-companion/src/renderer/components/CompanionTheme.tsxindex 051d6b039ad..a7ef3c495af 100644--- a/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx+++ b/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx@@ -1,7 +1,7 @@import { type ReactNode, useSyncExternalStore } from 'react';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';-import '@ui/theme-constants/theme-light.css';-import '@ui/theme-constants/theme-dark.css';+import { ThemeProvider } from '@ui/theme/ThemeProvider';+import '@ui/theme/theme-light.css';+import '@ui/theme/theme-dark.css';import '@fontsource/inter/latin-400.css';import '@fontsource/inter/latin-500.css';import '@fontsource/inter/latin-600.css';diff --git a/packages/twenty-companion/src/renderer/components/Notification.tsx b/packages/twenty-companion/src/renderer/components/Notification.tsxindex bfd9fdc1037..fe12d51890f 100644--- a/packages/twenty-companion/src/renderer/components/Notification.tsx+++ b/packages/twenty-companion/src/renderer/components/Notification.tsx@@ -2,7 +2,7 @@ import { useState } from 'react';import { IconInfoCircle, IconX } from '@ui/icon';import { IconButton } from '@ui/components/input/IconButton/IconButton';import { ProgressBar } from '@ui/primitives/feedback/ProgressBar/ProgressBar';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import styles from './Notification.module.scss';type NotificationProps = {diff --git a/packages/twenty-companion/src/renderer/components/__tests__/Onboarding.test.tsx b/packages/twenty-companion/src/renderer/components/__tests__/Onboarding.test.tsxindex e272c4598a7..bf436a19160 100644--- a/packages/twenty-companion/src/renderer/components/__tests__/Onboarding.test.tsx+++ b/packages/twenty-companion/src/renderer/components/__tests__/Onboarding.test.tsx@@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event';import { afterEach, beforeEach, expect, it, vi } from 'vitest';import { i18n } from '@lingui/core';import { Onboarding } from '../Onboarding';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { createInitialState } from '../../../shared/utils/createInitialState';import { type CompanionState } from '../../../shared/types/CompanionState';import { messages } from '../../locales/en';diff --git a/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.tsx b/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.tsxindex c49a60c22ac..d594cd38555 100644--- a/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.tsx+++ b/packages/twenty-companion/src/renderer/components/internal/RecordingEmptyIllustration.tsx@@ -1,7 +1,7 @@import { clsx } from 'clsx';import { useEffect, useRef } from 'react';-import { useThemeColorScheme } from '@ui/theme-constants';+import { useThemeColorScheme } from '@ui/theme';import styles from './RecordingEmptyIllustration.module.scss';diff --git a/packages/twenty-docs/ar/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/ar/developers/extend/apps/layout/front-components.mdxindex 7f48f669ecb..e4987160c17 100644--- a/packages/twenty-docs/ar/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/ar/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ yarn add [email protected]| `twenty-ui/feedback` | `Callout`، و`Banner`، و`Info`، وغير ذلك || `twenty-ui/typography` | `H1Title`، و`H2Title`، و`H3Title`، و`Label`، وغير ذلك || `twenty-ui/icon` | مكوّنات `Icon*` (مثلًا `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`، و`themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`، و`themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ import { IconBox, IconCheck } from 'twenty-ui/icon';لاستخدام نفس رموز التصميم في أنماطك المضمّنة (inline styles)، استدعِ الخطّاف `useTheme()`. يُرجِع هذا الخطّاف رموز سمة Twenty (للمسافات، والألوان، وأنصاف الأقطار، والخطوط) المرتبطة بالنسق النشِط، دون الحاجة إلى إعداد `ThemeProvider` في المكوّن لديك:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/cs/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/cs/developers/extend/apps/layout/front-components.mdxindex 8b854377cd5..fa695437c3e 100644--- a/packages/twenty-docs/cs/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/cs/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ Importujte z odpovídající podcesty místo z kořene balíčku, aby se do vaš| `twenty-ui/feedback` | `Callout`, `Banner`, `Info` a další || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label` a další || `twenty-ui/icon` | Komponenty `Icon*` (např. `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Komponenty Twenty UI se automaticky přizpůsobí světlému a tmavému motivu pChcete-li ve svých vlastních inline stylech používat stejné design tokeny, zavolejte hook `useTheme()`. Vrací tokeny motivu Twenty (odsazení, barvy, poloměry, písma) napojené na aktivní motiv, aniž by bylo potřeba v komponentě nastavovat `ThemeProvider`:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/de/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/de/developers/extend/apps/layout/front-components.mdxindex ceef3a4eb83..ca70937bd4f 100644--- a/packages/twenty-docs/de/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/de/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ Importieren Sie aus dem passenden Subpfad statt aus dem Paket-Root, damit nur di| `twenty-ui/feedback` | `Callout`, `Banner`, `Info` und mehr || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label` und mehr || `twenty-ui/icon` | `Icon*`-Komponenten (z. B. `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Twenty UI-Komponenten passen sich automatisch dem hellen und dunklen Theme des AUm dieselben Design-Tokens in Ihren eigenen Inline-Styles zu verwenden, rufen Sie den Hook `useTheme()` auf. Er gibt die Theme-Tokens von Twenty (Abstände, Farben, Radien, Schriftarten) zurück, die mit dem aktiven Theme verknüpft sind – ohne dass ein `ThemeProvider` in Ihrer Komponente eingerichtet werden muss:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/developers/extend/apps/layout/front-components.mdxindex c79a4395ce2..dbba6d2fa85 100644--- a/packages/twenty-docs/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/developers/extend/apps/layout/front-components.mdx@@ -795,7 +795,7 @@ These entry points do not require `monaco-editor`.| `twenty-ui/primitives/surfaces` | Cards, dialogs, menus, popovers, and tooltips || `twenty-ui/primitives/typography` | Text and headings || `twenty-ui/icon` | `Icon*` components (e.g. `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |Use [`Dropdown`](/ui/components/dropdown) for action menus, option pickers, and form panels.@@ -838,7 +838,7 @@ Twenty UI components automatically match the workspace's light and dark themeTo use the same design tokens in your own inline styles, call the `useTheme()` hook. It returns Twenty's theme tokens (spacing, colors, radii, fonts) wired to the active theme, with no `ThemeProvider` setup needed in your component:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/es/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/es/developers/extend/apps/layout/front-components.mdxindex 1916add8032..a930fe1c8f7 100644--- a/packages/twenty-docs/es/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/es/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ Importa desde la subruta correspondiente en lugar de la raíz del paquete, de mo| `twenty-ui/feedback` | `Callout`, `Banner`, `Info`, y más || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label`, y más || `twenty-ui/icon` | Componentes `Icon*` (p. ej., `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Los componentes de Twenty UI coinciden automáticamente con el tema claro y oscuPara usar los mismos tokens de diseño en tus propios estilos en línea, llama al hook `useTheme()`. Devuelve los tokens de tema de Twenty (espaciado, colores, radios, fuentes) conectados al tema activo, sin necesidad de configurar `ThemeProvider` en tu componente:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/fr/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/fr/developers/extend/apps/layout/front-components.mdxindex 5c6bb895f1d..e2963ef98e0 100644--- a/packages/twenty-docs/fr/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/fr/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ Importez depuis le sous-chemin correspondant plutôt que depuis la racine du pac| `twenty-ui/feedback` | `Callout`, `Banner`, `Info`, et plus encore || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label`, et plus encore || `twenty-ui/icon` | Composants `Icon*` (par exemple `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Les composants Twenty UI correspondent automatiquement au thème clair et sombrePour utiliser les mêmes jetons de design dans vos propres styles inline, appelez le hook `useTheme()`. Il renvoie les jetons de thème de Twenty (espacement, couleurs, rayons, polices) connectés au thème actif, sans qu’aucune configuration de `ThemeProvider` ne soit nécessaire dans votre composant :```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/it/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/it/developers/extend/apps/layout/front-components.mdxindex 78634bb7247..d7efd87e3d4 100644--- a/packages/twenty-docs/it/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/it/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ Importa dal sottopercorso corrispondente invece che dalla root del pacchetto, in| `twenty-ui/feedback` | `Callout`, `Banner`, `Info` e altro || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label` e altro || `twenty-ui/icon` | Componenti `Icon*` (ad es. `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ I componenti Twenty UI si adattano automaticamente al tema chiaro e scuro dellPer usare gli stessi design token nei tuoi stili inline, chiama l’hook `useTheme()`. Restituisce i token del tema di Twenty (spaziatura, colori, raggi, font) collegati al tema attivo, senza bisogno di configurare `ThemeProvider` nel tuo componente:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/ja/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/ja/developers/extend/apps/layout/front-components.mdxindex a0034dbf337..20c2e1e1829 100644--- a/packages/twenty-docs/ja/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/ja/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ yarn add [email protected]| `twenty-ui/feedback` | `Callout`、`Banner`、`Info` など || `twenty-ui/typography` | `H1Title`、`H2Title`、`H3Title`、`Label` など || `twenty-ui/icon` | `Icon*` コンポーネント(例: `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`、`themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`、`themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Twenty UI コンポーネントはワークスペースのライト/ダーク独自のインラインスタイルでも同じデザイントークンを使うには、`useTheme()` フックを呼び出します。 これにより、アクティブなテーマに紐づいた Twenty のテーマトークン(スペーシング、カラー、角丸、フォント)が返されます。コンポーネント側で `ThemeProvider` をセットアップする必要はありません。```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/ko/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/ko/developers/extend/apps/layout/front-components.mdxindex ef5bcd0a773..ea278b0e082 100644--- a/packages/twenty-docs/ko/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/ko/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ yarn add [email protected]| `twenty-ui/feedback` | `Callout`, `Banner`, `Info` 등 || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label` 등 || `twenty-ui/icon` | `Icon*` 컴포넌트(예: `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Twenty UI 컴포넌트는 워크스페이스의 라이트 및 다크 테마와자신의 인라인 스타일에서 동일한 디자인 토큰을 사용하려면 `useTheme()` 훅을 호출하세요. 이 훅은 활성 테마에 연결된 Twenty의 테마 토큰(여백, 색상, 모서리 반경, 폰트)을 반환하며, 컴포넌트에서 별도의 `ThemeProvider` 설정이 필요하지 않습니다:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/pt/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/pt/developers/extend/apps/layout/front-components.mdxindex d8500ce7abc..1bbf54187db 100644--- a/packages/twenty-docs/pt/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/pt/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ Importe a partir do subcaminho correspondente em vez da raiz do pacote, para que| `twenty-ui/feedback` | `Callout`, `Banner`, `Info` e mais || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label` e mais || `twenty-ui/icon` | Componentes `Icon*` (por exemplo, `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Os componentes do Twenty UI correspondem automaticamente ao tema claro e escuroPara usar os mesmos tokens de design nos seus próprios estilos inline, chame o hook `useTheme()`. Ele retorna os tokens de tema do Twenty (espaçamento, cores, raios, fontes) conectados ao tema ativo, sem necessidade de configurar `ThemeProvider` no seu componente:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/ro/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/ro/developers/extend/apps/layout/front-components.mdxindex f11588a00d7..beaa3babc98 100644--- a/packages/twenty-docs/ro/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/ro/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ Importă din subpath-ul corespunzător, nu din rădăcina pachetului, astfel în| `twenty-ui/feedback` | `Callout`, `Banner`, `Info` și altele || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label` și altele || `twenty-ui/icon` | Componente `Icon*` (de ex. `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Componentele Twenty UI se potrivesc automat cu tema luminoasă și întunecatăPentru a folosi aceiași tokeni de design în propriile tale stiluri inline, apelează hook-ul `useTheme()`. Acesta returnează tokenii de temă ai Twenty (spațiere, culori, raze, fonturi) conectați la tema activă, fără a necesita vreo configurare `ThemeProvider` în componenta ta:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/ru/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/ru/developers/extend/apps/layout/front-components.mdxindex 17371f6d9a7..c0e6e025d0e 100644--- a/packages/twenty-docs/ru/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/ru/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ yarn add [email protected]| `twenty-ui/feedback` | `Callout`, `Banner`, `Info` и другие || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label` и другие || `twenty-ui/icon` | Компоненты `Icon*` (например, `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ import { IconBox, IconCheck } from 'twenty-ui/icon';Чтобы использовать те же дизайн‑токены в собственных встроенных стилях, вызовите хук `useTheme()`. Он возвращает токены темы Twenty (отступы, цвета, радиусы, шрифты), привязанные к активной теме, без необходимости настраивать `ThemeProvider` в вашем компоненте:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/tr/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/tr/developers/extend/apps/layout/front-components.mdxindex 82c6c30a144..a5c4b4cfbdb 100644--- a/packages/twenty-docs/tr/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/tr/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ Kullandığınız bileşenlerin yalnızca paketinizde yer alması için, paket k| `twenty-ui/feedback` | `Callout`, `Banner`, `Info` ve daha fazlası || `twenty-ui/typography` | `H1Title`, `H2Title`, `H3Title`, `Label` ve daha fazlası || `twenty-ui/icon` | `Icon*` bileşenleri (ör. `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`, `themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`, `themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Twenty UI bileşenleri, çalışma alanının açık ve koyu temasıyla otomatikKendi satır içi stillerinizde aynı tasarım belirteçlerini kullanmak için `useTheme()` kancasını çağırın. Bu kanca, etkin temaya bağlı Twenty tema belirteçlerini (boşluklandırma, renkler, köşe yarıçapları, yazı tipleri) döndürür; bileşeninizde `ThemeProvider` kurulumuna gerek yoktur:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-docs/ui/dark-mode.mdx b/packages/twenty-docs/ui/dark-mode.mdxindex 40c3936e361..09b86ba283c 100644--- a/packages/twenty-docs/ui/dark-mode.mdx+++ b/packages/twenty-docs/ui/dark-mode.mdx@@ -8,7 +8,7 @@ Load both theme stylesheets when your application can switch schemes. `ThemeProv```tsximport { useState } from 'react';import { Switch } from 'twenty-ui/primitives/input';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import 'twenty-ui/style.css';import 'twenty-ui/theme-light.css';@@ -35,7 +35,7 @@ The provider accepts an explicit scheme. Your application owns preference persisSet `applyToRoot={false}` on a nested provider to give a subtree a different palette. Both stylesheets must be loaded:```tsx-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';export const Preview = () => (<ThemeProvider colorScheme="light">@@ -54,4 +54,4 @@ export const Preview = () => ();```-Use `useThemeColorScheme()` from `twenty-ui/theme-constants` to read the provider's active scheme. In a Twenty front component, use `useColorScheme()` from `twenty-sdk/front-component` to read the workspace scheme supplied by the host.+Use `useThemeColorScheme()` from `twenty-ui/theme` to read the provider's active scheme. In a Twenty front component, use `useColorScheme()` from `twenty-sdk/front-component` to read the workspace scheme supplied by the host.diff --git a/packages/twenty-docs/ui/getting-started.mdx b/packages/twenty-docs/ui/getting-started.mdxindex a7ee39836dd..62ad710b923 100644--- a/packages/twenty-docs/ui/getting-started.mdx+++ b/packages/twenty-docs/ui/getting-started.mdx@@ -33,7 +33,7 @@ Import the component stylesheet and a theme stylesheet once at your application```tsximport { Field, Input } from 'twenty-ui/primitives/input';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import 'twenty-ui/style.css';import 'twenty-ui/theme-light.css';@@ -82,7 +82,7 @@ Each primitive family has a matching public entry point, such as| `twenty-ui/primitives/surfaces` | Cards, dialogs, menus, popovers, and tooltips || `twenty-ui/primitives/typography` | Text and headings || `twenty-ui/icon` | Icons |-| `twenty-ui/theme-constants` | Theme provider, hooks, and CSS variable references |+| `twenty-ui/theme` | Theme provider, hooks, and CSS variable references |Import individual icons, such as `IconCheck`, from `twenty-ui/icon`. The dynamic icon provider includes the full icon catalog, so reserve it for interfaces that need to look up icons at runtime.diff --git a/packages/twenty-docs/ui/theming.mdx b/packages/twenty-docs/ui/theming.mdxindex 6cc73afd0f3..0b7209e15e3 100644--- a/packages/twenty-docs/ui/theming.mdx+++ b/packages/twenty-docs/ui/theming.mdx@@ -10,7 +10,7 @@ Twenty UI components read public CSS custom properties prefixed with `--t-`. Pre`themeCssVariables` maps token paths to CSS variable references. Use it for values that CSS resolves:```tsx-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const Summary = () => (<section@@ -43,7 +43,7 @@ The equivalent CSS uses variables directly:```tsximport { IconCheck } from 'twenty-ui/icon';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const CompleteIcon = () => {const theme = useTheme();@@ -60,7 +60,7 @@ Pass `applyToRoot={false}` to apply a theme to a subtree. Override public CSS va```tsximport { type ReactNode } from 'react';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';export const EmbeddedPanel = ({ children }: { children: ReactNode }) => (<ThemeProviderdiff --git a/packages/twenty-docs/zh/developers/extend/apps/layout/front-components.mdx b/packages/twenty-docs/zh/developers/extend/apps/layout/front-components.mdxindex 2becbba41b7..15ea0aaf6e6 100644--- a/packages/twenty-docs/zh/developers/extend/apps/layout/front-components.mdx+++ b/packages/twenty-docs/zh/developers/extend/apps/layout/front-components.mdx@@ -711,7 +711,7 @@ yarn add [email protected]| `twenty-ui/feedback` | `Callout`、`Banner`、`Info` 等 || `twenty-ui/typography` | `H1Title`、`H2Title`、`H3Title`、`Label` 等 || `twenty-ui/icon` | `Icon*` 组件(例如 `IconCheck`) |-| `twenty-ui/theme-constants` | `ThemeProvider`、`themeCssVariables` |+| `twenty-ui/theme` | `ThemeProvider`、`themeCssVariables` |```tsximport { defineFrontComponent } from 'twenty-sdk/define';@@ -752,7 +752,7 @@ Twenty UI 组件会自动匹配工作区的明暗主题——渲染器会在宿要在你自己的行内样式中使用相同的设计令牌,请调用 `useTheme()` hook。 它会返回与当前主题关联的 Twenty 主题令牌(间距、颜色、圆角、字体),你的组件中无需设置 `ThemeProvider`:```tsx-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const Card = () => {const theme = useTheme();diff --git a/packages/twenty-front-component-renderer/.storybook/preview.tsx b/packages/twenty-front-component-renderer/.storybook/preview.tsxindex 888fe1723ee..da9b1f56041 100644--- a/packages/twenty-front-component-renderer/.storybook/preview.tsx+++ b/packages/twenty-front-component-renderer/.storybook/preview.tsx@@ -1,5 +1,5 @@import { type Preview } from '@storybook/react-vite';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import 'twenty-ui/theme-light.css';import 'twenty-ui/theme-dark.css';diff --git a/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx b/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsxindex 7b7b2148740..edcdf436a00 100644--- a/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx@@ -1,3 +1,4 @@+import { themeTokenTest } from '@/__stories__/twenty-ui-gallery/utils/themeTokenTest';import { inputPreactTest } from '@/__stories__/twenty-ui-gallery/utils/inputPreactTest';import { inputReactTest } from '@/__stories__/twenty-ui-gallery/utils/inputReactTest';import { settingsRowTest } from '@/__stories__/twenty-ui-gallery/utils/settingsRowTest';@@ -34,7 +35,6 @@ import {codeEditorTest,displayHelpersTest,galleryRenderTest,- themeTokenTest,} from '@/__stories__/twenty-ui-gallery/utils/galleryRenderTests';import {alertDialogTest,diff --git a/packages/twenty-front-component-renderer/src/__stories__/host-api/host-api-router-link.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/host-api/host-api-router-link.front-component.tsxindex 456be0f4f8f..06f54f9ccb5 100644--- a/packages/twenty-front-component-renderer/src/__stories__/host-api/host-api-router-link.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/host-api/host-api-router-link.front-component.tsx@@ -1,6 +1,6 @@import { Link } from 'react-router-dom';import { defineFrontComponent } from 'twenty-sdk/define';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { FrontComponentCard } from '@/__stories__/shared/front-components/front-component-card';diff --git a/packages/twenty-front-component-renderer/src/__stories__/shared/front-components/twenty-ui-gallery-card.tsx b/packages/twenty-front-component-renderer/src/__stories__/shared/front-components/twenty-ui-gallery-card.tsxindex 45930395f27..94e5c5100f4 100644--- a/packages/twenty-front-component-renderer/src/__stories__/shared/front-components/twenty-ui-gallery-card.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/shared/front-components/twenty-ui-gallery-card.tsx@@ -1,6 +1,6 @@import { type ComponentProps } from 'react';import 'twenty-ui/style.css';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { FrontComponentCard } from '@/__stories__/shared/front-components/front-component-card';diff --git a/packages/twenty-front-component-renderer/src/__stories__/showcase/twenty-ui-example.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/showcase/twenty-ui-example.front-component.tsxindex 207adbf00db..17c17f14edc 100644--- a/packages/twenty-front-component-renderer/src/__stories__/showcase/twenty-ui-example.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/showcase/twenty-ui-example.front-component.tsx@@ -3,7 +3,7 @@ import { useState } from 'react';import { Section } from 'twenty-ui/components';import { Chip, Status, Tag } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';const CARD_STYLE = {padding: 24,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-avatar-controls.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-avatar-controls.front-component.tsxindex 7c7d6bca44c..e7ba85b6141 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-avatar-controls.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-avatar-controls.front-component.tsx@@ -1,7 +1,7 @@import { useState } from 'react';import { defineFrontComponent } from 'twenty-sdk/define';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import 'twenty-ui/style.css';import { ComponentGallery } from '../shared/front-components/component-gallery';diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-button-controls.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-button-controls.front-component.tsxindex b9ca0787a91..834fb9551e5 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-button-controls.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-button-controls.front-component.tsx@@ -12,7 +12,7 @@ import {import { IconPencil, IconPlus, IconX } from 'twenty-ui/icon';import { Button, ButtonGroup } from 'twenty-ui/primitives/input';import 'twenty-ui/style.css';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';const ButtonControls = () => {const [activations, setActivations] = useState(0);diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-chip-controls.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-chip-controls.front-component.tsxindex 416a74f57f9..cdc2b8adcc9 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-chip-controls.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-chip-controls.front-component.tsx@@ -2,7 +2,7 @@ import { useState } from 'react';import { defineFrontComponent } from 'twenty-sdk/define';import { Chip } from 'twenty-ui/primitives/data-display';import { IconStar } from 'twenty-ui/icon';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import 'twenty-ui/style.css';import { ComponentGallery } from '../shared/front-components/component-gallery';diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-code-editor-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-code-editor-gallery.front-component.tsxindex 32b18abbc65..d20d063cc60 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-code-editor-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-code-editor-gallery.front-component.tsx@@ -1,7 +1,7 @@import { defineFrontComponent } from 'twenty-sdk/define';import { useState } from 'react';import { CodeEditor } from 'twenty-ui/components/code-editor';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';// KNOWN ISSUE: CodeEditor wraps @monaco-editor/react, which lazy-loads the// monaco runtime through script injection at mount. The sandbox worker has nodiff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-data-display-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-data-display-gallery.front-component.tsxindex fe14515dc34..9fa4f190aca 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-data-display-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-data-display-gallery.front-component.tsx@@ -14,7 +14,7 @@ import {Status,Tag,} from 'twenty-ui/primitives/data-display';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import {ComponentGallery,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-feedback-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-feedback-gallery.front-component.tsxindex 03e00a5bf55..5c6d6ac5b5f 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-feedback-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-feedback-gallery.front-component.tsx@@ -6,7 +6,7 @@ import {Loader,ProgressBar,} from 'twenty-ui/primitives/feedback';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import {ComponentGallery,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-icon-button-elevated.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-icon-button-elevated.front-component.tsxindex 309c433173e..31b70996cd6 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-icon-button-elevated.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-icon-button-elevated.front-component.tsx@@ -3,7 +3,7 @@ import { defineFrontComponent } from 'twenty-sdk/define';import { IconButton } from 'twenty-ui/components';import { IconPlus, IconSearch } from 'twenty-ui/icon';import 'twenty-ui/style.css';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';const IconButtonElevatedExample = () => {const [activations, setActivations] = useState(0);diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-icon-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-icon-gallery.front-component.tsxindex b97049ecfa1..e02092e53d2 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-icon-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-icon-gallery.front-component.tsx@@ -61,7 +61,7 @@ import {ThinkingOrbitLoaderIcon,type IconComponent,} from 'twenty-ui/icon';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import {ComponentGallery,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-input-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-input-gallery.front-component.tsxindex 53ceab9c0c0..74b7b5f2038 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-input-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-input-gallery.front-component.tsx@@ -21,7 +21,7 @@ import {Slider,Switch,} from 'twenty-ui/primitives/input';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import {ComponentGallery,type GalleryEntry,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-json-visualizer-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-json-visualizer-gallery.front-component.tsxindex 111b0c72080..d32318ffbc2 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-json-visualizer-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-json-visualizer-gallery.front-component.tsx@@ -1,6 +1,6 @@import { defineFrontComponent } from 'twenty-sdk/define';import { JsonTree } from 'twenty-ui/components';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import {ComponentGallery,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-layout-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-layout-gallery.front-component.tsxindex d671fa82790..bb710ac5d29 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-layout-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-layout-gallery.front-component.tsx@@ -6,7 +6,7 @@ import {AnimatedExpandableContainer,HorizontalSeparator,} from 'twenty-ui/primitives/layout';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { ResizeHandleExample } from './resize-handle-example';import {diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-navigation-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-navigation-gallery.front-component.tsxindex 55cb70dc2d8..3c9a432eb83 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-navigation-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-navigation-gallery.front-component.tsx@@ -13,7 +13,7 @@ import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconHome, IconUser } from 'twenty-ui/icon';import { ColorSample, Tag } from 'twenty-ui/primitives/data-display';import { ClickToActionLink, ListItem } from 'twenty-ui/primitives/navigation';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import {ComponentGallery,type GalleryEntry,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-status-controls.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-status-controls.front-component.tsxindex bb1099f6f97..70d8c19fb1a 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-status-controls.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-status-controls.front-component.tsx@@ -1,7 +1,7 @@import { useState } from 'react';import { defineFrontComponent } from 'twenty-sdk/define';import { Status } from 'twenty-ui/primitives/data-display';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import 'twenty-ui/style.css';import { ComponentGallery } from '../shared/front-components/component-gallery';diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-surfaces-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-surfaces-gallery.front-component.tsxindex 23ae9c915dd..31e4419b44f 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-surfaces-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-surfaces-gallery.front-component.tsx@@ -8,7 +8,7 @@ import {CardHeader,Tooltip,} from 'twenty-ui/primitives/surfaces';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import {ComponentGallery,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-tag-controls.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-tag-controls.front-component.tsxindex 69a6481067c..f9d9010a204 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-tag-controls.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-tag-controls.front-component.tsx@@ -2,7 +2,7 @@ import { useState } from 'react';import { defineFrontComponent } from 'twenty-sdk/define';import { Tag } from 'twenty-ui/primitives/data-display';import { IconStar } from 'twenty-ui/icon';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import 'twenty-ui/style.css';import { ComponentGallery } from '../shared/front-components/component-gallery';diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-theme-tokens.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-theme-tokens.front-component.tsxindex e39cb0cca6b..7e43810d5c6 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-theme-tokens.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-theme-tokens.front-component.tsx@@ -1,30 +1,72 @@+import { useState } from 'react';import { defineFrontComponent } from 'twenty-sdk/define';import { IconInfoCircle } from 'twenty-ui/icon';-import { ThemeProvider, useTheme } from 'twenty-ui/theme-constants';+import { Button } from 'twenty-ui/primitives/input';+import {+ THEME_DARK,+ THEME_LIGHT,+ ThemeProvider,+ useTheme,+ useThemeColorScheme,+} from 'twenty-ui/theme';const TokenSizedIcon = () => {const theme = useTheme();+ const colorScheme = useThemeColorScheme();return (- <div- data-testid="theme-token-icon-wrapper"- style={{ display: 'inline-flex' }}+ <>+ <div+ data-testid="theme-token-icon-wrapper"+ style={{ display: 'inline-flex' }}+ >+ <IconInfoCircle size={theme.icon.size.md} />+ </div>+ <output aria-label="Static theme color">+ {theme.font.color.primary}+ </output>+ <output aria-label="Static color scheme">{colorScheme}</output>+ <output aria-label="Static spacing">{theme.spacing[3]}</output>+ </>+ );+};++const HostThemeTokens = () => {+ const theme = useTheme();++ return (+ <output+ aria-label="Host theme color"+ style={{ color: theme.font.color.primary }}>- <IconInfoCircle size={theme.icon.size.md} />- </div>+ {theme.font.color.primary}+ </output>);};-const ThemeTokensComponent = () => (- <ThemeProvider colorScheme="light">- <TokenSizedIcon />- </ThemeProvider>-);+const ThemeTokensComponent = () => {+ const [colorScheme, setColorScheme] = useState<'light' | 'dark'>('light');+ const theme = colorScheme === 'dark' ? THEME_DARK : THEME_LIGHT;++ return (+ <>+ <HostThemeTokens />+ <ThemeProvider+ colorScheme={colorScheme}+ applyToRoot={false}+ theme={theme}+ >+ <TokenSizedIcon />+ <Button onClick={() => setColorScheme('dark')}>Use dark values</Button>+ </ThemeProvider>+ </>+ );+};export default defineFrontComponent({universalIdentifier: 'test-20ui0-0000-0000-0000-000000000113',name: 'twenty-ui-theme-tokens',description:- 'Renders an icon sized from a useTheme() design token under ThemeProvider in the sandbox',+ 'Exercises host CSS variables and explicit static ThemeProvider values',component: ThemeTokensComponent,});diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-tooltip.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-tooltip.front-component.tsxindex 426f3df96e3..3bc73d3369f 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-tooltip.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-tooltip.front-component.tsx@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';import { defineFrontComponent } from 'twenty-sdk/define';import { Button } from 'twenty-ui/primitives/input';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { TwentyUiGalleryCard } from '@/__stories__/shared/front-components/twenty-ui-gallery-card';diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-typography-gallery.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-typography-gallery.front-component.tsxindex f104cb6f3f4..ddfa40c646e 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-typography-gallery.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-typography-gallery.front-component.tsx@@ -4,7 +4,7 @@ import { Section } from 'twenty-ui/components';import { VisibilityHidden } from 'twenty-ui/primitives/accessibility';import { Button } from 'twenty-ui/primitives/input';import { Heading, Text } from 'twenty-ui/primitives/typography';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import {ComponentGallery,diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/galleryRenderTests.ts b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/galleryRenderTests.tsindex a92757c7f24..aec5a15f61f 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/galleryRenderTests.ts+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/galleryRenderTests.ts@@ -28,27 +28,6 @@ export const codeEditorTest: TwentyUiGalleryPlayFunction = async ({expect(codeEditor).toHaveAttribute('data-monaco-mount-state', 'pending');};-export const themeTokenTest: TwentyUiGalleryPlayFunction = async ({- canvasElement,-}) => {- const canvas = within(canvasElement);-- const iconWrapper = await canvas.findByTestId(- 'theme-token-icon-wrapper',- {},- { timeout: MOUNT_TIMEOUT },- );-- await waitFor(() => {- const iconBox = iconWrapper.getBoundingClientRect();-- expect(Math.round(iconBox.width)).toBe(16);- expect(Math.round(iconBox.height)).toBe(16);- });-- expect(errorHandler).not.toHaveBeenCalled();-};-export const displayHelpersTest: TwentyUiGalleryPlayFunction = async ({canvasElement,}) => {diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/themeTokenTest.ts b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/themeTokenTest.tsnew file mode 100644index 00000000000..fbad3681671--- /dev/null+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/themeTokenTest.ts@@ -0,0 +1,56 @@+import { expect, userEvent, waitFor, within } from 'storybook/test';+import { THEME_DARK, THEME_LIGHT, themeCssVariables } from 'twenty-ui/theme';++import { errorHandler } from '@/__stories__/shared/test-utils/createFrontComponentStoryMeta';+import { MOUNT_TIMEOUT } from '@/__stories__/shared/test-utils/timeouts';+import { type TwentyUiGalleryPlayFunction } from '@/__stories__/twenty-ui-gallery/types/TwentyUiGalleryPlayFunction';++export const themeTokenTest: TwentyUiGalleryPlayFunction = async ({+ canvasElement,+}) => {+ const canvas = within(canvasElement);+ const iconWrapper = await canvas.findByTestId(+ 'theme-token-icon-wrapper',+ {},+ { timeout: MOUNT_TIMEOUT },+ );++ await waitFor(() => {+ const iconBox = iconWrapper.getBoundingClientRect();+ expect(Math.round(iconBox.width)).toBe(16);+ expect(Math.round(iconBox.height)).toBe(16);+ });+ expect(canvas.getByLabelText('Static theme color')).toHaveTextContent(+ THEME_LIGHT.font.color.primary,+ );+ expect(canvas.getByLabelText('Static spacing')).toHaveTextContent('12px');+ await userEvent.click(+ canvas.getByRole('button', { name: 'Use dark values' }),+ );+ await waitFor(() => {+ expect(canvas.getByLabelText('Static color scheme')).toHaveTextContent(+ 'dark',+ );+ expect(canvas.getByLabelText('Static theme color')).toHaveTextContent(+ THEME_DARK.font.color.primary,+ );+ });+ const hostColor = canvas.getByLabelText('Host theme color');+ expect(hostColor).toHaveTextContent(themeCssVariables.font.color.primary);+ const root = canvasElement.ownerDocument.documentElement;+ const originalClassName = root.className;+ try {+ root.classList.remove('dark');+ root.classList.add('light');+ const lightColor = getComputedStyle(hostColor).color;+ root.classList.remove('light');+ root.classList.add('dark');+ await waitFor(() =>+ expect(getComputedStyle(hostColor).color).not.toBe(lightColor),+ );+ expect(hostColor).toHaveTextContent(themeCssVariables.font.color.primary);+ } finally {+ root.className = originalClassName;+ }+ expect(errorHandler).not.toHaveBeenCalled();+};diff --git a/packages/twenty-front-component-renderer/src/host/components/FrontComponentErrorBox.tsx b/packages/twenty-front-component-renderer/src/host/components/FrontComponentErrorBox.tsxindex 9ab4ad4d4b2..489d9455b65 100644--- a/packages/twenty-front-component-renderer/src/host/components/FrontComponentErrorBox.tsx+++ b/packages/twenty-front-component-renderer/src/host/components/FrontComponentErrorBox.tsx@@ -1,4 +1,4 @@-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type FrontComponentErrorBoxProps = {error: Error;diff --git a/packages/twenty-front-component-renderer/src/host/components/FrontComponentRenderer.tsx b/packages/twenty-front-component-renderer/src/host/components/FrontComponentRenderer.tsxindex 4933cd348ed..c61163b8bf2 100644--- a/packages/twenty-front-component-renderer/src/host/components/FrontComponentRenderer.tsx+++ b/packages/twenty-front-component-renderer/src/host/components/FrontComponentRenderer.tsx@@ -21,7 +21,7 @@ import { type ReactNode, useState } from 'react';import { ErrorBoundary } from 'react-error-boundary';import { isDefined } from 'twenty-shared/utils';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { FrontComponentWorkerEffect } from '@/host/effect-components/FrontComponentWorkerEffect';import { componentRegistry } from '@/host/generated/host-component-registry';import { createFallbackComponentRegistry } from '@/host/utils/createFallbackComponentRegistry';diff --git a/packages/twenty-front/.storybook/preview.tsx b/packages/twenty-front/.storybook/preview.tsxindex 0677896f441..ed1931fb4e9 100644--- a/packages/twenty-front/.storybook/preview.tsx+++ b/packages/twenty-front/.storybook/preview.tsx@@ -33,7 +33,7 @@ import 'react-loading-skeleton/dist/skeleton.css';import 'twenty-ui/style.css';import 'twenty-ui/theme-light.css';import 'twenty-ui/theme-dark.css';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';// oxlint-disable-next-line no-restricted-importsimport { messages as enMessages } from '../src/locales/generated/en';diff --git a/packages/twenty-front/src/hooks/useCopyToClipboard.tsx b/packages/twenty-front/src/hooks/useCopyToClipboard.tsxindex ebb0465fa2f..cceca9dd786 100644--- a/packages/twenty-front/src/hooks/useCopyToClipboard.tsx+++ b/packages/twenty-front/src/hooks/useCopyToClipboard.tsx@@ -1,11 +1,10 @@import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { useToast } from 'twenty-ui/components';import { IconCopy, IconExclamationCircle } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const useCopyToClipboard = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { enqueueToast } = useToast();const { t } = useLingui();diff --git a/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx b/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsxindex b9d6eead93f..091dc9a6c2c 100644--- a/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx+++ b/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx@@ -6,8 +6,7 @@ import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoimport { NAVIGATION_DRAWER_CONSTRAINTS } from '@/ui/layout/resizable-panel/constants/NavigationDrawerConstraints';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { MainNavigationDrawerItemsSkeletonLoader } from '~/loading/components/MainNavigationDrawerItemsSkeletonLoader';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledAnimatedContainer = styled(motion.div)`box-sizing: border-box;@@ -47,7 +46,7 @@ const StyledSkeletonTitleContainer = styled.div``;export const LeftPanelSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isMobile = useIsMobile();return (<StyledAnimatedContainerdiff --git a/packages/twenty-front/src/loading/components/MainNavigationDrawerItemsSkeletonLoader.tsx b/packages/twenty-front/src/loading/components/MainNavigationDrawerItemsSkeletonLoader.tsxindex 12c8c16b1cd..c2043bc9529 100644--- a/packages/twenty-front/src/loading/components/MainNavigationDrawerItemsSkeletonLoader.tsx+++ b/packages/twenty-front/src/loading/components/MainNavigationDrawerItemsSkeletonLoader.tsx@@ -1,9 +1,8 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { css } from '@linaria/core';import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const StyledSkeletonContainer = styled.div`align-items: flex-start;@@ -25,7 +24,7 @@ export const MainNavigationDrawerItemsSkeletonLoader = ({title?: boolean;length: number;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledSkeletonContainer><SkeletonThemediff --git a/packages/twenty-front/src/loading/components/PageContentSkeletonLoader.tsx b/packages/twenty-front/src/loading/components/PageContentSkeletonLoader.tsxindex 370343893d6..e9f90e5d9c1 100644--- a/packages/twenty-front/src/loading/components/PageContentSkeletonLoader.tsx+++ b/packages/twenty-front/src/loading/components/PageContentSkeletonLoader.tsx@@ -1,9 +1,9 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { PageCardHeader } from '@/ui/layout/page/components/PageCardHeader';import { PageCardLayout } from '@/ui/layout/page/components/PageCardLayout';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type PageContentSkeletonLoaderProps = {secondaryBar?: ReactNode;@@ -12,7 +12,7 @@ type PageContentSkeletonLoaderProps = {export const PageContentSkeletonLoader = ({secondaryBar,}: PageContentSkeletonLoaderProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemediff --git a/packages/twenty-front/src/loading/components/SidePanelSkeletonLoader.tsx b/packages/twenty-front/src/loading/components/SidePanelSkeletonLoader.tsxindex 60ac5054a51..cd212e326d6 100644--- a/packages/twenty-front/src/loading/components/SidePanelSkeletonLoader.tsx+++ b/packages/twenty-front/src/loading/components/SidePanelSkeletonLoader.tsx@@ -1,8 +1,7 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledSidePanelContainer = styled.div`display: flex;@@ -12,7 +11,7 @@ const StyledSidePanelContainer = styled.div``;const StyledSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsx b/packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsxindex 4b14449d681..a4365570c3b 100644--- a/packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsx+++ b/packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { NAVIGATION_DRAWER_CONSTRAINTS } from '@/ui/layout/resizable-panel/constants/NavigationDrawerConstraints';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { LeftPanelSkeletonLoader } from '~/loading/components/LeftPanelSkeletonLoader';import { PageContentSkeletonLoader } from '~/loading/components/PageContentSkeletonLoader';diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsxindex 2964cb7b078..7dbd3a21551 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx@@ -4,7 +4,7 @@ import { differenceInSeconds, endOfDay, format } from 'date-fns';import { CalendarEventRow } from '@/activities/calendar/components/CalendarEventRow';import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalendarEventStartDate';import { CardContent } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type TimelineCalendarEvent } from '~/generated/graphql';type CalendarDayCardContentProps = {diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventComposerFields.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventComposerFields.tsxindex ec208085292..90f76a1bb14 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventComposerFields.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventComposerFields.tsx@@ -23,7 +23,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Callout } from 'twenty-ui/components';import { Switch } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const COMPOSER_LABEL_MIN_WIDTH = '80px';diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventComposerTargetsInput.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventComposerTargetsInput.tsxindex e2a986cbc9e..af543d53457 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventComposerTargetsInput.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventComposerTargetsInput.tsx@@ -12,7 +12,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useId } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledClickableContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsxindex 4b8319c7472..cac9bcb18fd 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx@@ -1,8 +1,7 @@import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';-import { useContext } from 'react';import { IconLock } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;@@ -21,7 +20,7 @@ const StyledContainer = styled.div``;export const CalendarEventNotSharedContent = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer>diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsxindex cf307927599..6dbd7e16a31 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsx@@ -14,9 +14,8 @@ import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalendimport { hasCalendarEventEnded } from '@/activities/calendar/utils/hasCalendarEventEnded';import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';import { useOpenCalendarEventInSidePanel } from '@/side-panel/hooks/useOpenCalendarEventInSidePanel';-import { useContext } from 'react';import { IconArrowRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type CalendarEventRowProps = {calendarEvent: TimelineCalendarEvent;@@ -75,7 +74,7 @@ export const CalendarEventRow = ({calendarEvent,className,}: CalendarEventRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState);const { openCalendarEventInSidePanel } = useOpenCalendarEventInSidePanel();diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventsCardContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventsCardContent.tsxindex 230b2d8aa1c..f0ce46004c1 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventsCardContent.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventsCardContent.tsx@@ -13,7 +13,7 @@ import { format, getYear } from 'date-fns';import { Section } from 'twenty-ui/components';import { Heading } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type TimelineCalendarEvent } from '~/generated/graphql';import { dateLocaleState } from '~/localization/states/dateLocaleState';diff --git a/packages/twenty-front/src/modules/activities/components/ActivityList.tsx b/packages/twenty-front/src/modules/activities/components/ActivityList.tsxindex 2fb64226b56..1f2c52a459f 100644--- a/packages/twenty-front/src/modules/activities/components/ActivityList.tsx+++ b/packages/twenty-front/src/modules/activities/components/ActivityList.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledListContainer = styled.div`width: 100%;diff --git a/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx b/packages/twenty-front/src/modules/activities/components/ActivityRow.tsxindex c36eb4979e6..539631a9893 100644--- a/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx+++ b/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import React from 'react';import { CardContent } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRowContentContainer = styled.div`> div {diff --git a/packages/twenty-front/src/modules/activities/components/ComposerFieldRow.tsx b/packages/twenty-front/src/modules/activities/components/ComposerFieldRow.tsxindex e4fe9a139de..c7eebf93f9d 100644--- a/packages/twenty-front/src/modules/activities/components/ComposerFieldRow.tsx+++ b/packages/twenty-front/src/modules/activities/components/ComposerFieldRow.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { type MouseEventHandler, type ReactNode } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const ROW_MIN_HEIGHT = '40px';diff --git a/packages/twenty-front/src/modules/activities/components/ComposerHeader.tsx b/packages/twenty-front/src/modules/activities/components/ComposerHeader.tsxindex cdb3306978f..2cb6cbab7ac 100644--- a/packages/twenty-front/src/modules/activities/components/ComposerHeader.tsx+++ b/packages/twenty-front/src/modules/activities/components/ComposerHeader.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledHeader = styled.div`background-color: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/activities/components/ComposerTextInput.tsx b/packages/twenty-front/src/modules/activities/components/ComposerTextInput.tsxindex c1908d4baae..3d4bec07f51 100644--- a/packages/twenty-front/src/modules/activities/components/ComposerTextInput.tsx+++ b/packages/twenty-front/src/modules/activities/components/ComposerTextInput.tsx@@ -1,6 +1,6 @@import { FORM_FIELD_PLACEHOLDER_STYLES } from '@/ui/input/constants/FormFieldPlaceholderStyles';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledComposerTextInput = styled.input`background: transparent;diff --git a/packages/twenty-front/src/modules/activities/components/CustomResolverFetchMoreLoader.tsx b/packages/twenty-front/src/modules/activities/components/CustomResolverFetchMoreLoader.tsxindex f8f95760406..b234fcd96a9 100644--- a/packages/twenty-front/src/modules/activities/components/CustomResolverFetchMoreLoader.tsx+++ b/packages/twenty-front/src/modules/activities/components/CustomResolverFetchMoreLoader.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useInView } from 'react-intersection-observer';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type CustomResolverFetchMoreLoaderProps = {loading: boolean;diff --git a/packages/twenty-front/src/modules/activities/components/ParticipantChip.tsx b/packages/twenty-front/src/modules/activities/components/ParticipantChip.tsxindex 9f94d7761c5..749f96fbac5 100644--- a/packages/twenty-front/src/modules/activities/components/ParticipantChip.tsx+++ b/packages/twenty-front/src/modules/activities/components/ParticipantChip.tsx@@ -7,7 +7,7 @@ import { CoreObjectNameSingular } from 'twenty-shared/types';import { RecordChip } from '@/object-record/components/RecordChip';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';import { Avatar } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledAvatarContainer = styled.span`margin-right: ${themeCssVariables.spacing[1]};diff --git a/packages/twenty-front/src/modules/activities/components/SkeletonLoader.tsx b/packages/twenty-front/src/modules/activities/components/SkeletonLoader.tsxindex 2a73dad9b75..aeaa4a4cfec 100644--- a/packages/twenty-front/src/modules/activities/components/SkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/activities/components/SkeletonLoader.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledSkeletonContainer = styled.div`align-content: flex-start;@@ -46,7 +45,7 @@ export const SKELETON_LOADER_HEIGHT_SIZES = {};const SkeletonColumnLoader = ({ height }: { height: number }) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}@@ -63,7 +62,7 @@ export const SkeletonLoader = ({}: {withSubSections?: boolean;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const skeletonItems = Array.from({ length: 3 }).map((_, index) => ({id: `skeleton-item-${index}`,}));diff --git a/packages/twenty-front/src/modules/activities/emails/components/CampaignDetailsFields.tsx b/packages/twenty-front/src/modules/activities/emails/components/CampaignDetailsFields.tsxindex 2177153121a..96a3767fe6c 100644--- a/packages/twenty-front/src/modules/activities/emails/components/CampaignDetailsFields.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/CampaignDetailsFields.tsx@@ -8,7 +8,7 @@ import { isDefined } from 'twenty-shared/utils';import { InlineBanner } from 'twenty-ui/components';import { IconAlertTriangle } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {CampaignEnvelopeBox,diff --git a/packages/twenty-front/src/modules/activities/emails/components/CampaignEnvelopeBox.tsx b/packages/twenty-front/src/modules/activities/emails/components/CampaignEnvelopeBox.tsxindex bca5d75c18e..81b46c7c669 100644--- a/packages/twenty-front/src/modules/activities/emails/components/CampaignEnvelopeBox.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/CampaignEnvelopeBox.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type MouseEventHandler, type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ComposerFieldRow } from '@/activities/components/ComposerFieldRow';diff --git a/packages/twenty-front/src/modules/activities/emails/components/CampaignSentEnvelope.tsx b/packages/twenty-front/src/modules/activities/emails/components/CampaignSentEnvelope.tsxindex 8ae3310d920..4f103548667 100644--- a/packages/twenty-front/src/modules/activities/emails/components/CampaignSentEnvelope.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/CampaignSentEnvelope.tsx@@ -6,7 +6,7 @@ import {MessageCampaignStatus,} from 'twenty-shared/types';import { isDefined, isValidUuid } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {CampaignEnvelopeBox,diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailAttachmentsField.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailAttachmentsField.tsxindex e774cf2ff85..992e53e3a3a 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailAttachmentsField.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailAttachmentsField.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type EmailAttachment } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AttachmentChip } from '@/file/components/AttachmentChip';diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailComposerFields.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailComposerFields.tsxindex f7e059fcb4e..9341a47b1f4 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailComposerFields.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailComposerFields.tsx@@ -1,6 +1,5 @@import { EmailOperation } from 'twenty-shared/types';import { useQuery } from '@apollo/client/react';-import { useContext } from 'react';import { DragDropProvider } from '@dnd-kit/react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';@@ -10,7 +9,7 @@ import {isDefined,} from 'twenty-shared/utils';import { IconPaperclip } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { ComposerFieldRow } from '@/activities/components/ComposerFieldRow';import { ComposerHeader } from '@/activities/components/ComposerHeader';@@ -115,7 +114,7 @@ export const EmailComposerFields = ({contextRecord,onAttachFiles,}: EmailComposerFieldsProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { uploadEmailImage } = useUploadEmailImage();const { data: accountsData } = useQuery<{myConnectedAccounts: Pick<diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageBody.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageBody.tsxindex 83f14dc634e..20b0716ecb4 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageBody.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageBody.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { motion } from 'framer-motion';import Linkify from 'linkify-react';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledThreadMessageBody = styled(motion.div)`color: ${themeCssVariables.font.color.primary};diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageBodyPreview.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageBodyPreview.tsxindex 6809f884b1f..d7a709bcbc9 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageBodyPreview.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageBodyPreview.tsx@@ -1,6 +1,6 @@import React from 'react';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledThreadMessageBodyPreview = styled.div`color: ${themeCssVariables.font.color.tertiary};diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageLayout.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageLayout.tsxindex e9a70aa6305..685aa5b77cb 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageLayout.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageLayout.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledThreadMessage = styled.div<{ hideBottomBorder?: boolean }>`border-bottom: ${({ hideBottomBorder }) =>diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageReceivers.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageReceivers.tsxindex ebd6ebe0463..014593a611d 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageReceivers.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageReceivers.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { type EmailThreadMessageParticipant } from '@/activities/emails/types/EmailThreadMessageParticipant';import { getDisplayNameFromParticipant } from '@/activities/emails/utils/getDisplayNameFromParticipant';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EmailThreadMessageReceiversProps = {receivers: EmailThreadMessageParticipant[];diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageSender.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageSender.tsxindex b4bfe211a35..55575393fec 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageSender.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadMessageSender.tsx@@ -6,7 +6,7 @@ import { type EmailThreadMessageParticipant } from '@/activities/emails/types/Emimport { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { dateLocaleState } from '~/localization/states/dateLocaleState';import {beautifyPastDateRelativeToNow,diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadNotShared.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadNotShared.tsxindex e75c4c70ce4..9b1d1e5b898 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadNotShared.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadNotShared.tsx@@ -1,10 +1,9 @@import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { IconLock } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { MessageChannelVisibility } from '~/generated/graphql';const StyledContainer = styled.div<{ isCompact?: boolean }>`@@ -35,7 +34,7 @@ type EmailThreadNotSharedProps = {export const EmailThreadNotShared = ({visibility,}: EmailThreadNotSharedProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const containerId = 'email-thread-not-shared';const isCompact = visibility === MessageChannelVisibility.SUBJECT;diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadPreview.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadPreview.tsxindex 5b00f9b51d5..5067daa94d8 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailThreadPreview.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailThreadPreview.tsx@@ -4,13 +4,12 @@ import { ActivityRow } from '@/activities/components/ActivityRow';import { EmailThreadNotShared } from '@/activities/emails/components/EmailThreadNotShared';import { getEmailParticipantAvatarColorSeed } from '@/activities/emails/utils/getEmailParticipantAvatarColorSeed';import { useOpenRecordInSidePanel } from '@/side-panel/hooks/useOpenRecordInSidePanel';-import { useContext } from 'react';import { t } from '@lingui/core/macro';import { CoreObjectNameSingular } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { Avatar, Tag } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import {MessageChannelVisibility,type TimelineThread,@@ -87,7 +86,7 @@ type LastAvatar = {};export const EmailThreadPreview = ({ thread }: EmailThreadPreviewProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { openRecordInSidePanel } = useOpenRecordInSidePanel();const visibility = thread.visibility;diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailsCardContent.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailsCardContent.tsxindex 7e457bc90ae..3da614769e2 100644--- a/packages/twenty-front/src/modules/activities/emails/components/EmailsCardContent.tsx+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailsCardContent.tsx@@ -6,7 +6,7 @@ import { EmptyInboxPlaceholder } from '@/activities/emails/components/EmptyInboximport { StyledWidgetContentContainer } from '@/ui/layout/components/WidgetContentContainer';import { styled } from '@linaria/react';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type TimelineThread } from '~/generated/graphql';const StyledContainer = styled(StyledWidgetContentContainer)`diff --git a/packages/twenty-front/src/modules/activities/emails/editor/components/EmailEditorCanvas.tsx b/packages/twenty-front/src/modules/activities/emails/editor/components/EmailEditorCanvas.tsxindex 294da205104..505c4698af9 100644--- a/packages/twenty-front/src/modules/activities/emails/editor/components/EmailEditorCanvas.tsx+++ b/packages/twenty-front/src/modules/activities/emails/editor/components/EmailEditorCanvas.tsx@@ -3,7 +3,7 @@ import { useLiveEditorState } from '@/advanced-text-editor/hooks/useLiveEditorStimport { type AdvancedTextEditorComponentProps } from '@/advanced-text-editor/types/AdvancedTextEditorComponentProps';import { styled } from '@linaria/react';import { CANVAS_THEME_DEFAULTS, resolveCanvasTheme } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCanvasBackdrop = styled.div`box-sizing: border-box;diff --git a/packages/twenty-front/src/modules/activities/emails/recipients/components/EmailRecipientsFieldChipCell.tsx b/packages/twenty-front/src/modules/activities/emails/recipients/components/EmailRecipientsFieldChipCell.tsxindex 239929fe190..4ff08aa2b77 100644--- a/packages/twenty-front/src/modules/activities/emails/recipients/components/EmailRecipientsFieldChipCell.tsx+++ b/packages/twenty-front/src/modules/activities/emails/recipients/components/EmailRecipientsFieldChipCell.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type MouseEvent } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { EMAIL_RECIPIENT_DND_TYPE } from '@/activities/emails/recipients/constants/EmailRecipientDndType';import { EmailRecipientsFieldChip } from '@/activities/emails/recipients/components/EmailRecipientsFieldChip';diff --git a/packages/twenty-front/src/modules/activities/emails/recipients/components/EmailRecipientsFieldInput.tsx b/packages/twenty-front/src/modules/activities/emails/recipients/components/EmailRecipientsFieldInput.tsxindex 06f62c3f999..d2a1b8c6730 100644--- a/packages/twenty-front/src/modules/activities/emails/recipients/components/EmailRecipientsFieldInput.tsx+++ b/packages/twenty-front/src/modules/activities/emails/recipients/components/EmailRecipientsFieldInput.tsx@@ -18,7 +18,7 @@ import {} from 'react';import { flushSync } from 'react-dom';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';import { EMAIL_RECIPIENT_DND_TYPE } from '@/activities/emails/recipients/constants/EmailRecipientDndType';diff --git a/packages/twenty-front/src/modules/activities/files/components/AttachmentList.tsx b/packages/twenty-front/src/modules/activities/files/components/AttachmentList.tsxindex 950502f75f2..ac61eab4b15 100644--- a/packages/twenty-front/src/modules/activities/files/components/AttachmentList.tsx+++ b/packages/twenty-front/src/modules/activities/files/components/AttachmentList.tsx@@ -24,7 +24,7 @@ import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { isDefined } from 'twenty-shared/utils';import { IconDownload, IconX } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PermissionFlagType } from '~/generated-metadata/graphql';import { AttachmentRow } from './AttachmentRow';diff --git a/packages/twenty-front/src/modules/activities/files/components/AttachmentRow.tsx b/packages/twenty-front/src/modules/activities/files/components/AttachmentRow.tsxindex 1dfc821348c..bc997e973c7 100644--- a/packages/twenty-front/src/modules/activities/files/components/AttachmentRow.tsx+++ b/packages/twenty-front/src/modules/activities/files/components/AttachmentRow.tsx@@ -10,7 +10,7 @@ import {import { getFileCategoryFromExtension } from '@/object-record/record-field/ui/utils/getFileCategoryFromExtension';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { getSafeUrl, isDefined } from 'twenty-shared/utils';import { type AttachmentWithFile } from '@/activities/files/utils/filterAttachmentsWithFile';@@ -20,7 +20,7 @@ import { isNavigationModifierPressed } from '@/ui/navigation/utils/isNavigationMimport { CoreObjectNameSingular } from 'twenty-shared/types';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconCalendar } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { PermissionFlagType } from '~/generated-metadata/graphql';import { formatToHumanReadableDate } from '~/utils/date-utils';import { getFileNameAndExtension } from '~/utils/file/getFileNameAndExtension';@@ -85,7 +85,7 @@ export const AttachmentRow = ({attachment,onPreview,}: AttachmentRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [isEditing, setIsEditing] = useState(false);const hasDownloadPermission = useHasPermissionFlag(diff --git a/packages/twenty-front/src/modules/activities/files/components/DocumentViewer.tsx b/packages/twenty-front/src/modules/activities/files/components/DocumentViewer.tsxindex 947c1b81207..844c20e48bf 100644--- a/packages/twenty-front/src/modules/activities/files/components/DocumentViewer.tsx+++ b/packages/twenty-front/src/modules/activities/files/components/DocumentViewer.tsx@@ -11,11 +11,11 @@ import DocViewer, { DocViewerRenderers } from '@cyntler/react-doc-viewer';import '@cyntler/react-doc-viewer/dist/index.css';import { styled } from '@linaria/react';import { Trans, useLingui } from '@lingui/react/macro';-import { useContext, useEffect, useState } from 'react';+import { useEffect, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconDownload } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { getFileNameAndExtension } from '~/utils/file/getFileNameAndExtension';const MS_OFFICE_EXTENSIONS = [@@ -193,7 +193,7 @@ export const DocumentViewer = ({documentUrl,documentExtension,}: DocumentViewerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const [csvPreview, setCsvPreview] = useState<CsvPreviewData | undefined>(undefined,diff --git a/packages/twenty-front/src/modules/activities/files/components/DropZone.tsx b/packages/twenty-front/src/modules/activities/files/components/DropZone.tsxindex 316328d8877..eb5b07061eb 100644--- a/packages/twenty-front/src/modules/activities/files/components/DropZone.tsx+++ b/packages/twenty-front/src/modules/activities/files/components/DropZone.tsx@@ -1,11 +1,10 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { useDropzone } from 'react-dropzone';import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal';import { IconUpload } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;@@ -49,7 +48,7 @@ export const DropZone = ({setIsDraggingFile,onUploadFiles,}: DropZoneProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { maxFileSize } = useSpreadsheetImportInternal();diff --git a/packages/twenty-front/src/modules/activities/files/components/UnavailableFilePreview.tsx b/packages/twenty-front/src/modules/activities/files/components/UnavailableFilePreview.tsxindex 4989c038b87..ff42950858d 100644--- a/packages/twenty-front/src/modules/activities/files/components/UnavailableFilePreview.tsx+++ b/packages/twenty-front/src/modules/activities/files/components/UnavailableFilePreview.tsx@@ -4,7 +4,7 @@ import { Trans, useLingui } from '@lingui/react/macro';import { type ReactNode } from 'react';import { IconDownload } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/activities/notes/components/NoteList.tsx b/packages/twenty-front/src/modules/activities/notes/components/NoteList.tsxindex 8b477b9a2c5..9f36cb0f802 100644--- a/packages/twenty-front/src/modules/activities/notes/components/NoteList.tsx+++ b/packages/twenty-front/src/modules/activities/notes/components/NoteList.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { type Note } from '@/activities/types/Note';import { FieldDescriptionTooltipProvider } from '@/object-record/record-field/ui/components/FieldDescriptionTooltipProvider';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { NoteTile } from './NoteTile';diff --git a/packages/twenty-front/src/modules/activities/notes/components/NoteTile.tsx b/packages/twenty-front/src/modules/activities/notes/components/NoteTile.tsxindex 988274089fc..f6345f82782 100644--- a/packages/twenty-front/src/modules/activities/notes/components/NoteTile.tsx+++ b/packages/twenty-front/src/modules/activities/notes/components/NoteTile.tsx@@ -12,7 +12,7 @@ import { FieldContextProvider } from '@/object-record/record-field/ui/componentsimport { RecordFieldComponentInstanceContext } from '@/object-record/record-field/ui/states/contexts/RecordFieldComponentInstanceContext';import { RecordInlineCell } from '@/object-record/record-inline-cell/components/RecordInlineCell';import { getRecordFieldInputInstanceId } from '@/object-record/utils/getRecordFieldInputId';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCard = styled.div<{ isSingleNote: boolean }>`align-items: flex-start;diff --git a/packages/twenty-front/src/modules/activities/tasks/components/TaskList.tsx b/packages/twenty-front/src/modules/activities/tasks/components/TaskList.tsxindex dec32b2b792..8d9bccb80b6 100644--- a/packages/twenty-front/src/modules/activities/tasks/components/TaskList.tsx+++ b/packages/twenty-front/src/modules/activities/tasks/components/TaskList.tsx@@ -3,8 +3,8 @@ import { styled } from '@linaria/react';import { ActivityList } from '@/activities/components/ActivityList';import { type Task } from '@/activities/types/Task';import { SelectDisplay } from '@/ui/field/display/components/SelectDisplay/SelectDisplay';-import { type ThemeColor } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { type ThemeColor, themeCssVariables } from 'twenty-ui/theme';+import { TaskRow } from './TaskRow';type TaskListProps = {diff --git a/packages/twenty-front/src/modules/activities/tasks/components/TaskRow.tsx b/packages/twenty-front/src/modules/activities/tasks/components/TaskRow.tsxindex e020692b51f..7745d35dd11 100644--- a/packages/twenty-front/src/modules/activities/tasks/components/TaskRow.tsx+++ b/packages/twenty-front/src/modules/activities/tasks/components/TaskRow.tsx@@ -16,12 +16,11 @@ import { RecordFieldComponentInstanceContext } from '@/object-record/record-fielimport { RecordInlineCell } from '@/object-record/record-inline-cell/components/RecordInlineCell';import { getRecordFieldInputInstanceId } from '@/object-record/utils/getRecordFieldInputId';import { useOpenRecordInSidePanel } from '@/side-panel/hooks/useOpenRecordInSidePanel';-import { useContext } from 'react';import { CoreObjectNameSingular } from 'twenty-shared/types';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconCalendar } from 'twenty-ui/icon';import { Checkbox } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledTaskBody = styled.div`color: ${themeCssVariables.font.color.tertiary};@@ -89,7 +88,7 @@ const StyledCheckboxContainer = styled.div``;export const TaskRow = ({ task }: { task: Task }) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { openRecordInSidePanel } = useOpenRecordInSidePanel();const body = getActivitySummary(task?.bodyV2?.blocknote ?? null);diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/components/EventList.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/components/EventList.tsxindex c89608d7bbe..bbcf4869825 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/components/EventList.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/components/EventList.tsx@@ -13,7 +13,7 @@ import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataimport { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';import { useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EventListProps = {targetableObject: ActivityTargetableObject;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsxindex fcf3415a833..fff83364a4d 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsx@@ -21,7 +21,7 @@ import { getObjectRecordIdentifier } from '@/object-metadata/utils/getObjectRecoimport { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { allowRequestsToTwentyIconsState } from '@/client-config/states/allowRequestsToTwentyIcons';import { frontComponentsSelector } from '@/front-components/states/frontComponentsSelector';diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/components/EventsGroup.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/components/EventsGroup.tsxindex 019a52ad680..20e0c56d7d5 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/components/EventsGroup.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/components/EventsGroup.tsx@@ -4,7 +4,7 @@ import { EventRow } from '@/activities/timeline-activities/components/EventRow';import { TIMELINE_ICON_SLOT_SIZE } from '@/activities/timeline-activities/constants/TimelineIconSlotSize';import { type EventGroup } from '@/activities/timeline-activities/utils/groupEventsByMonth';import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EventsGroupProps = {group: EventGroup;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/components/TimelineCard.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/components/TimelineCard.tsxindex ac718340c0a..fdb4971fc18 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/components/TimelineCard.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/components/TimelineCard.tsx@@ -12,7 +12,7 @@ import { useTargetRecord } from '@/ui/layout/contexts/useTargetRecord';import { useWorkspaceSurface } from '@/ui/layout/hooks/useWorkspaceSurface';import { t } from '@lingui/core/macro';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';const StyledMainContainer = styled(StyledWidgetScrollContainer)`align-items: flex-start;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent.tsxindex 1546a218d7a..253fa097558 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent.tsx@@ -8,7 +8,7 @@ import {isFieldValueRestricted,isNonEmptyArray,} from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { CalendarEventNotSharedContent } from '@/activities/calendar/components/CalendarEventNotSharedContent';import { CalendarEventParticipantsAvatarGroup } from '@/activities/calendar/components/CalendarEventParticipantsAvatarGroup';diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/__tests__/EventCardCalendarEvent.test.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/__tests__/EventCardCalendarEvent.test.tsxindex 575361cf264..a05ffcfeb06 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/__tests__/EventCardCalendarEvent.test.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/__tests__/EventCardCalendarEvent.test.tsx@@ -3,7 +3,7 @@ import { i18n } from '@lingui/core';import { I18nProvider } from '@lingui/react';import { render, screen } from '@testing-library/react';import { FIELD_RESTRICTED_ADDITIONAL_PERMISSIONS_REQUIRED } from 'twenty-shared/constants';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { EventCardCalendarEvent } from '@/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent';import { useFindOneRecord } from '@/object-record/hooks/useFindOneRecord';diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCard.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCard.tsxindex 44ff7a0538e..f69ba8f0ce8 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCard.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCard.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';type EventCardProps = {children: React.ReactNode;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCardToggleButton.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCardToggleButton.tsxindex f1e12c6de7d..70edab13e59 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCardToggleButton.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventCardToggleButton.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconButton } from 'twenty-ui/components';import { IconChevronDown, IconChevronUp } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EventCardToggleButtonProps = {isOpen: boolean;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsxindex 54a80b256fd..cc066703d84 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsx@@ -2,7 +2,7 @@ import { ObjectMetadataIcon } from '@/object-metadata/components/ObjectMetadataIimport { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';import { isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/icon';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const EventIconDynamicComponent = ({eventIcon,diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDate.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDate.tsxindex dba6c09f7b4..407a626528a 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDate.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDate.tsx@@ -6,7 +6,7 @@ import { useDateTimeFormat } from '@/localization/hooks/useDateTimeFormat';import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { dateLocaleState } from '~/localization/states/dateLocaleState';import { beautifyPastDateRelativeToNow } from '~/utils/date-utils';import { formatDateTimeString } from '~/utils/string/formatDateTimeString';diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDynamicComponent.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDynamicComponent.tsxindex f3fc7b4aabd..41d9da08f7c 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDynamicComponent.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowDynamicComponent.tsx@@ -6,7 +6,7 @@ import { EventRowMainObject } from '@/activities/timeline-activities/rows/main-oimport { styled } from '@linaria/react';import { lazy, Suspense, useState } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const FrontComponentRenderer = lazy(() =>import('@/front-components/components/FrontComponentRenderer').then(diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowItem.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowItem.tsxindex e3195e7a016..40dd3a76cc0 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowItem.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowItem.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EventRowItemProps = {children: ReactNode;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowStyles.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowStyles.tsxindex 36594d636f1..f45d7a11506 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowStyles.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventRowStyles.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { TIMELINE_ICON_SLOT_SIZE } from '@/activities/timeline-activities/constants/TimelineIconSlotSize';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledEventRow = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiff.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiff.tsxindex a29056108d6..443677735b4 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiff.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiff.tsx@@ -9,7 +9,7 @@ import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataIteimport { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';import { Trans } from '@lingui/react/macro';import { FieldMetadataType } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EventFieldDiffProps = {fieldDiff: { before: unknown; after: unknown };diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffLabel.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffLabel.tsxindex 2e1751c03fc..957a0f6d40d 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffLabel.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffLabel.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';import { Icon123, useIcons } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EventFieldDiffLabelProps = {fieldMetadataItem: FieldMetadataItem;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffValue.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffValue.tsxindex 69f9d9d2967..beafddcb03b 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffValue.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffValue.tsx@@ -5,7 +5,7 @@ import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/Enricheimport { FieldDisplay } from '@/object-record/record-field/ui/components/FieldDisplay';import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';import { RecordFieldComponentInstanceContext } from '@/object-record/record-field/ui/states/contexts/RecordFieldComponentInstanceContext';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EventFieldDiffValueProps = {diffArtificialRecordStoreId: string;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRelationFieldDiffValues.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRelationFieldDiffValues.tsxindex d14c4b3e36d..05e0675da20 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRelationFieldDiffValues.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRelationFieldDiffValues.tsx@@ -10,7 +10,7 @@ import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { Trans, useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type EventRelationFieldDiffValuesProps = {fieldDiff: { before: unknown; after: unknown };diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessage.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessage.tsxindex d56fcc3f7f9..929d864505a 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessage.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessage.tsx@@ -4,7 +4,7 @@ import { Trans } from '@lingui/react/macro';import { CoreObjectNameSingular } from 'twenty-shared/types';import { isDefined, isFieldValueRestricted } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type EmailThreadMessage } from '@/activities/emails/types/EmailThreadMessage';import { EventCardMessageForbidden } from '@/activities/timeline-activities/rows/message/components/EventCardMessageForbidden';diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessageBodyNotShared.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessageBodyNotShared.tsxindex 639590e1d26..5b26beea4f4 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessageBodyNotShared.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessageBodyNotShared.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';import { IconLock } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledEmailBodyNotSharedContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessageForbidden.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessageForbidden.tsxindex 42a179059c0..23bae1a9462 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessageForbidden.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/message/components/EventCardMessageForbidden.tsx@@ -1,7 +1,7 @@import { EventCardMessageBodyNotShared } from '@/activities/timeline-activities/rows/message/components/EventCardMessageBodyNotShared';import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledEventCardMessageContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/AdvancedTextEditor.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/AdvancedTextEditor.tsxindex 3e620e5cd20..cec9efe9272 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/components/AdvancedTextEditor.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/AdvancedTextEditor.tsx@@ -6,7 +6,7 @@ import { hasEditorExtension } from '@/advanced-text-editor/utils/hasEditorExtensimport { FORM_FIELD_PLACEHOLDER_STYLES } from '@/ui/input/constants/FormFieldPlaceholderStyles';import { styled } from '@linaria/react';import { EditorContent } from '@tiptap/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledEditorContainer = styled.div<{readonly?: boolean;diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/AdvancedTextEditorInsertRail.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/AdvancedTextEditorInsertRail.tsxindex 87b6ab1e80a..dd9b63a7505 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/components/AdvancedTextEditorInsertRail.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/AdvancedTextEditorInsertRail.tsx@@ -19,7 +19,7 @@ import {} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';import { LightIconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ADVANCED_TEXT_EDITOR_BLOCK_INSERTION_RECIPES } from '@/advanced-text-editor/constants/AdvancedTextEditorBlockInsertionRecipes';import { type UploadedImage } from '@/advanced-text-editor/types/UploadedImage';diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/FormAdvancedTextFieldInput.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/FormAdvancedTextFieldInput.tsxindex d86e810dde0..8f9ee82a762 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/components/FormAdvancedTextFieldInput.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/FormAdvancedTextFieldInput.tsx@@ -19,7 +19,7 @@ import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconMaximize } from 'twenty-ui/icon';import { Field } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';const StyledAdvancedTextFieldContainerWrapper = styled.div<{diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/StyledBubbleMenuContainer.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/StyledBubbleMenuContainer.tsxindex 9c1d6345e02..e2e2b76ccb6 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/components/StyledBubbleMenuContainer.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/StyledBubbleMenuContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledBubbleMenuContainer = styled.div`backdrop-filter: blur(20px);diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/TurnIntoBlockDropdown.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/TurnIntoBlockDropdown.tsxindex 03a34cd6ef8..1092fa47085 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/components/TurnIntoBlockDropdown.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/TurnIntoBlockDropdown.tsx@@ -8,9 +8,9 @@ import { useToggleDropdown } from '@/ui/layout/dropdown/hooks/useToggleDropdown'import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { type Editor } from '@tiptap/react';-import { useContext, useId } from 'react';+import { useId } from 'react';import { IconPilcrow } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledMenuItem = styled.button`align-items: center;@@ -44,7 +44,7 @@ type TurnIntoBlockDropdownProps = {export const TurnIntoBlockDropdown = ({editor,}: TurnIntoBlockDropdownProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const instanceId = useId();const dropdownId = `turn-into-block-dropdown-${instanceId}`;const { toggleDropdown } = useToggleDropdown();diff --git a/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/HtmlNodeInlineEditor.tsx b/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/HtmlNodeInlineEditor.tsxindex cbea82f5ec3..896047a7f5a 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/HtmlNodeInlineEditor.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/HtmlNodeInlineEditor.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { EditorContent, type Editor } from '@tiptap/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useTextVariableEditor } from '@/object-record/record-field/ui/form-types/hooks/useTextVariableEditor';import { FORM_FIELD_PLACEHOLDER_STYLES } from '@/ui/input/constants/FormFieldPlaceholderStyles';diff --git a/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/HtmlNodeView.tsx b/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/HtmlNodeView.tsxindex c482a0fdd56..9ada1e5ab73 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/HtmlNodeView.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/HtmlNodeView.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { NodeViewWrapper, type NodeViewProps } from '@tiptap/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { HtmlNodeInlineEditor } from '@/advanced-text-editor/extensions/blocks/HtmlNodeInlineEditor';import { sanitizeHtmlPreview } from '@/advanced-text-editor/utils/sanitizeHtmlPreview';diff --git a/packages/twenty-front/src/modules/advanced-text-editor/extensions/resizable-image/ResizableImageView.tsx b/packages/twenty-front/src/modules/advanced-text-editor/extensions/resizable-image/ResizableImageView.tsxindex 8cb3ba5e36c..d1440bc9d04 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/extensions/resizable-image/ResizableImageView.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/extensions/resizable-image/ResizableImageView.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { type NodeViewProps, NodeViewWrapper } from '@tiptap/react';import React, { useCallback, useRef, useState } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const IMAGE_MIN_WIDTH = 32;const IMAGE_MAX_WIDTH = 600;diff --git a/packages/twenty-front/src/modules/advanced-text-editor/extensions/variable-tag/VariableChip.tsx b/packages/twenty-front/src/modules/advanced-text-editor/extensions/variable-tag/VariableChip.tsxindex f78d92391ff..f2ce5aecfe1 100644--- a/packages/twenty-front/src/modules/advanced-text-editor/extensions/variable-tag/VariableChip.tsx+++ b/packages/twenty-front/src/modules/advanced-text-editor/extensions/variable-tag/VariableChip.tsx@@ -2,7 +2,7 @@ import { BaseChip } from '@/ui/input/components/BaseChip';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { NodeViewWrapper, type NodeViewProps } from '@tiptap/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledWrapper = styled.span`display: inline-block;diff --git a/packages/twenty-front/src/modules/ai/components/AiChatAssistantMessageRenderer.tsx b/packages/twenty-front/src/modules/ai/components/AiChatAssistantMessageRenderer.tsxindex 49ef7add8fa..b2d8fcf6775 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatAssistantMessageRenderer.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatAssistantMessageRenderer.tsx@@ -22,7 +22,7 @@ import {type ExtendedUIMessagePart,isSucceededCompleteWorkspaceSetupToolPart,} from 'twenty-shared/ai';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledMessagePartsContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ai/components/AiChatCompactionIndicator.tsx b/packages/twenty-front/src/modules/ai/components/AiChatCompactionIndicator.tsxindex 4926a4a2e85..e72eddb366d 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatCompactionIndicator.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatCompactionIndicator.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconTransform } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledIndicatorContainer = styled.div`align-items: center;@@ -17,7 +16,7 @@ const StyledIconTextContainer = styled.div``;export const AiChatCompactionIndicator = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledIndicatorContainer>diff --git a/packages/twenty-front/src/modules/ai/components/AiChatEditorSection.tsx b/packages/twenty-front/src/modules/ai/components/AiChatEditorSection.tsxindex aaa5ff79fac..85bff8efe49 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatEditorSection.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatEditorSection.tsx@@ -4,7 +4,7 @@ import { useState } from 'react';import { styled } from '@linaria/react';import { EditorContent } from '@tiptap/react';import { useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { isDefined } from 'twenty-shared/utils';diff --git a/packages/twenty-front/src/modules/ai/components/AiChatErrorMessage.tsx b/packages/twenty-front/src/modules/ai/components/AiChatErrorMessage.tsxindex 0edfeba22cc..035c2c110eb 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatErrorMessage.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatErrorMessage.tsx@@ -3,11 +3,10 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { IconAlertCircle, IconRefresh } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { type AiChatError } from '@/ai/types/AiChatError';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { getErrorMessageFromApolloError } from '~/utils/get-error-message-from-apollo-error.util';const StyledErrorContainer = styled.div`@@ -56,7 +55,7 @@ export const AiChatErrorMessage = ({hint,onRetry,}: AiChatErrorMessageProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const errorMessage = CombinedGraphQLErrors.is(error)? getErrorMessageFromApolloError(error): error.message;diff --git a/packages/twenty-front/src/modules/ai/components/AiChatErrorUnderMessageList.tsx b/packages/twenty-front/src/modules/ai/components/AiChatErrorUnderMessageList.tsxindex 5fd7061d4bd..4c25f6bbbbc 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatErrorUnderMessageList.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatErrorUnderMessageList.tsx@@ -11,7 +11,7 @@ import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooimport { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledErrorWrapper = styled.div`padding-top: ${themeCssVariables.spacing[3]};diff --git a/packages/twenty-front/src/modules/ai/components/AiChatInitialLoadingIndicator.tsx b/packages/twenty-front/src/modules/ai/components/AiChatInitialLoadingIndicator.tsxindex 184f96b6575..d442c111bf6 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatInitialLoadingIndicator.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatInitialLoadingIndicator.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconDotsVertical } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledLoadingIconContainer = styled.div`align-items: center;@@ -20,7 +19,7 @@ const StyledLoadingIconWrapper = styled.span``;export const AiChatInitialLoadingIndicator = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledLoadingIconContainer>diff --git a/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsx b/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsxindex 2dece0d3d3f..e70386d3a66 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatMessage.tsx@@ -13,7 +13,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { isExtendedFileUIPart } from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { dateLocaleState } from '~/localization/states/dateLocaleState';import { beautifyPastDateRelativeToNow } from '~/utils/date-utils';diff --git a/packages/twenty-front/src/modules/ai/components/AiChatPageHeader.tsx b/packages/twenty-front/src/modules/ai/components/AiChatPageHeader.tsxindex b74241d6ce0..edccb31ae1d 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatPageHeader.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatPageHeader.tsx@@ -2,7 +2,7 @@ import { APP_HEADER_HEIGHT } from '@/ui/layout/constants/AppHeaderHeight';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';import { AiChatCloseButton } from '@/ai/components/AiChatCloseButton';diff --git a/packages/twenty-front/src/modules/ai/components/AiChatPageThreadHeader.tsx b/packages/twenty-front/src/modules/ai/components/AiChatPageThreadHeader.tsxindex ac6508fae18..88d04cd07e9 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatPageThreadHeader.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatPageThreadHeader.tsx@@ -6,7 +6,7 @@ import { IconButton } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconDotsVertical, IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiChatThreadItemMenu } from '@/ai/components/AiChatThreadItemMenu';import { AI_CHAT_THREAD_ACTIONS_SURFACE } from '@/ai/constants/AiChatThreadActionsSurface';diff --git a/packages/twenty-front/src/modules/ai/components/AiChatQuestionCard.tsx b/packages/twenty-front/src/modules/ai/components/AiChatQuestionCard.tsxindex ed8cc70ad3b..a5c6f82a3c9 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatQuestionCard.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatQuestionCard.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type KeyboardEvent, useContext, useMemo, useState } from 'react';+import { type KeyboardEvent, useMemo, useState } from 'react';import { type AskQuestionAnswer, type AskQuestionItem } from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';import { IconButton, LightIconButton } from 'twenty-ui/components';@@ -21,7 +21,7 @@ import {IconSquareNumber9,} from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { AiModelTierDropdown } from '@/ai/components/AiModelTierDropdown';import { TextWithChatReferences } from '@/ai/components/TextWithChatReferences';@@ -202,7 +202,7 @@ export const AiChatQuestionCard = ({pendingQuestion,}: AiChatQuestionCardProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { messageId, toolCallId, questions } = pendingQuestion;const [currentIndex, setCurrentIndex] = useState(0);diff --git a/packages/twenty-front/src/modules/ai/components/AiChatQuestionStatusRenderer.tsx b/packages/twenty-front/src/modules/ai/components/AiChatQuestionStatusRenderer.tsxindex 27fd4b383e6..778cec62f4c 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatQuestionStatusRenderer.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatQuestionStatusRenderer.tsx@@ -2,10 +2,9 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isNonEmptyString } from '@sniptt/guards';import { type DynamicToolUIPart, type ToolUIPart } from 'ai';-import { useContext } from 'react';import { type AskQuestionsToolResult } from 'twenty-shared/ai';import { IconHelpCircle } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { ShimmeringText } from '@/ai/components/ShimmeringText';@@ -66,7 +65,7 @@ export const AiChatQuestionStatusRenderer = ({isStreaming: boolean;}) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const result = (toolPart.output as { result?: AskQuestionsToolResult } | null)?.result;diff --git a/packages/twenty-front/src/modules/ai/components/AiChatQueuedMessages.tsx b/packages/twenty-front/src/modules/ai/components/AiChatQueuedMessages.tsxindex 8d37b796c2e..d7610807b62 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatQueuedMessages.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatQueuedMessages.tsx@@ -10,7 +10,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconX } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledQueueContainer = styled(StyledAiChatContentContainer)`display: flex;diff --git a/packages/twenty-front/src/modules/ai/components/AiChatStandaloneError.tsx b/packages/twenty-front/src/modules/ai/components/AiChatStandaloneError.tsxindex e62eee8eb4a..a0f877df03a 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatStandaloneError.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatStandaloneError.tsx@@ -1,6 +1,6 @@import { StyledAiChatContentContainer } from '@/ai/components/StyledAiChatContentContainer';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiChatErrorRenderer } from '@/ai/components/AiChatErrorRenderer';import { useRetryChatMessage } from '@/ai/hooks/useRetryChatMessage';diff --git a/packages/twenty-front/src/modules/ai/components/AiChatTab.tsx b/packages/twenty-front/src/modules/ai/components/AiChatTab.tsxindex a8d60fc3cba..3eb0e1cc1d2 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatTab.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatTab.tsx@@ -4,7 +4,7 @@ import { WorkspaceSetupChatPreamble } from '@/onboarding/components/WorkspaceSetimport { WorkspaceSetupChatKickoffEffect } from '@/onboarding/effect-components/WorkspaceSetupChatKickoffEffect';import { styled } from '@linaria/react';import { type DragEvent, useState } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { DropZone } from '@/activities/files/components/DropZone';import { AgentChatHasBeenOpenedEffect } from '@/ai/components/AgentChatHasBeenOpenedEffect';diff --git a/packages/twenty-front/src/modules/ai/components/AiChatTabMessageList.tsx b/packages/twenty-front/src/modules/ai/components/AiChatTabMessageList.tsxindex f4d7fce4fae..f3a45c4352d 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatTabMessageList.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatTabMessageList.tsx@@ -18,7 +18,7 @@ import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/import { styled } from '@linaria/react';import { Suspense, useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledScrollWrapperContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ai/components/AiChatThinkingRow.tsx b/packages/twenty-front/src/modules/ai/components/AiChatThinkingRow.tsxindex a05483fc086..8789b585d6a 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatThinkingRow.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatThinkingRow.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { ThinkingOrbitLoaderIcon } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRow = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/ai/components/AiChatThreadListItem.tsx b/packages/twenty-front/src/modules/ai/components/AiChatThreadListItem.tsxindex 1de8807f8d2..ba0d5eefb8f 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatThreadListItem.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatThreadListItem.tsx@@ -1,9 +1,8 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { Key } from 'ts-key-enum';import { IconArchive, IconSparkles } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { AiChatThreadItemMenu } from '@/ai/components/AiChatThreadItemMenu';import { AI_CHAT_THREAD_ACTIONS_SURFACE } from '@/ai/constants/AiChatThreadActionsSurface';@@ -85,7 +84,7 @@ type AiChatThreadListItemProps = {};export const AiChatThreadListItem = ({ thread }: AiChatThreadListItemProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { handleThreadClick } = useAiChatThreadClick();const {diff --git a/packages/twenty-front/src/modules/ai/components/AiChatToolWidget.tsx b/packages/twenty-front/src/modules/ai/components/AiChatToolWidget.tsxindex d0f8ee00c2b..90869d24bd0 100644--- a/packages/twenty-front/src/modules/ai/components/AiChatToolWidget.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiChatToolWidget.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { Suspense, lazy } from 'react';import { type DynamicToolUIPart, getToolName, type ToolUIPart } from 'ai';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ToolStepRenderer } from '@/ai/components/ToolStepRenderer';import { type ToolInput } from '@/ai/types/ToolInput';diff --git a/packages/twenty-front/src/modules/ai/components/AiModelPicker.tsx b/packages/twenty-front/src/modules/ai/components/AiModelPicker.tsxindex 206e60c4273..03292ae227f 100644--- a/packages/twenty-front/src/modules/ai/components/AiModelPicker.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiModelPicker.tsx@@ -7,7 +7,7 @@ import {} from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';import { LightButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiModelTierSlider } from '@/ai/components/AiModelTierSlider';import { useAiModelTiers } from '@/ai/hooks/useAiModelTiers';diff --git a/packages/twenty-front/src/modules/ai/components/AiModelTierBars.tsx b/packages/twenty-front/src/modules/ai/components/AiModelTierBars.tsxindex 193d4f46d5e..b70d782bae4 100644--- a/packages/twenty-front/src/modules/ai/components/AiModelTierBars.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiModelTierBars.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type AiModelTier } from 'twenty-shared/ai';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiModelTierIndicator } from '@/ai/components/AiModelTierIndicator';diff --git a/packages/twenty-front/src/modules/ai/components/AiModelTierDropdown.tsx b/packages/twenty-front/src/modules/ai/components/AiModelTierDropdown.tsxindex 33833f1733b..c8b5635f55f 100644--- a/packages/twenty-front/src/modules/ai/components/AiModelTierDropdown.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiModelTierDropdown.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { AI_MODEL_TIERS, type AiModelTier } from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiModelTierBars } from '@/ai/components/AiModelTierBars';import { AiModelTierSlider } from '@/ai/components/AiModelTierSlider';diff --git a/packages/twenty-front/src/modules/ai/components/AiModelTierIndicator.tsx b/packages/twenty-front/src/modules/ai/components/AiModelTierIndicator.tsxindex 1d6a227d4fe..62d5ff7a0b9 100644--- a/packages/twenty-front/src/modules/ai/components/AiModelTierIndicator.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiModelTierIndicator.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { AI_MODEL_TIERS, type AiModelTier } from 'twenty-shared/ai';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledIndicator = styled.span`align-items: center;diff --git a/packages/twenty-front/src/modules/ai/components/AiModelTierInformationButton.tsx b/packages/twenty-front/src/modules/ai/components/AiModelTierInformationButton.tsxindex e8bbdcb9e89..3c02f1f286d 100644--- a/packages/twenty-front/src/modules/ai/components/AiModelTierInformationButton.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiModelTierInformationButton.tsx@@ -27,10 +27,7 @@ import {IconInfoCircle,} from 'twenty-ui/icon';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';-import {- themeCssVariables,- useThemeContainer,-} from 'twenty-ui/theme-constants';+import { themeCssVariables, useThemeContainer } from 'twenty-ui/theme';import { type ResolvedAiModelTier } from '@/ai/types/ResolvedAiModelTier';import { getAiModelEffortLabel } from '@/ai/utils/getAiModelEffortLabel';diff --git a/packages/twenty-front/src/modules/ai/components/AiModelTierSlider.tsx b/packages/twenty-front/src/modules/ai/components/AiModelTierSlider.tsxindex 016729a1687..e782daf82d2 100644--- a/packages/twenty-front/src/modules/ai/components/AiModelTierSlider.tsx+++ b/packages/twenty-front/src/modules/ai/components/AiModelTierSlider.tsx@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';import { type ChangeEvent } from 'react';import { AI_MODEL_TIERS, type AiModelTier } from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiModelTierInformationButton } from '@/ai/components/AiModelTierInformationButton';import { useAiModelTiers } from '@/ai/hooks/useAiModelTiers';diff --git a/packages/twenty-front/src/modules/ai/components/CodeExecutionDisplay.tsx b/packages/twenty-front/src/modules/ai/components/CodeExecutionDisplay.tsxindex 0e7171c3758..4b639461e6b 100644--- a/packages/twenty-front/src/modules/ai/components/CodeExecutionDisplay.tsx+++ b/packages/twenty-front/src/modules/ai/components/CodeExecutionDisplay.tsx@@ -1,7 +1,7 @@import { TerminalOutput } from '@/ai/components/TerminalOutput';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { LightIconButton } from 'twenty-ui/components';import { CodeEditor } from 'twenty-ui/components/code-editor';import {@@ -14,7 +14,7 @@ import {} from 'twenty-ui/icon';import { Tag } from 'twenty-ui/primitives/data-display';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledContainer = styled.div`@@ -176,7 +176,7 @@ export const CodeExecutionDisplay = ({files = [],isRunning = false,}: CodeExecutionDisplayProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { copyToClipboard } = useCopyToClipboard();const [isCodeExpanded, setIsCodeExpanded] = useState(false);diff --git a/packages/twenty-front/src/modules/ai/components/LazyMarkdownRenderer.tsx b/packages/twenty-front/src/modules/ai/components/LazyMarkdownRenderer.tsxindex f3515252580..24d0c893946 100644--- a/packages/twenty-front/src/modules/ai/components/LazyMarkdownRenderer.tsx+++ b/packages/twenty-front/src/modules/ai/components/LazyMarkdownRenderer.tsx@@ -16,12 +16,11 @@ import {lazy,memo,Suspense,- useContext,useRef,} from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { getSafeUrl, isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const processChildrenForChatReferences = (children: React.ReactNode,@@ -138,7 +137,7 @@ const MarkdownRenderer = lazy(async () => {});export const MarkdownLoadingSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/ai/components/LazyMarkdownRendererStyledComponents.tsx b/packages/twenty-front/src/modules/ai/components/LazyMarkdownRendererStyledComponents.tsxindex e6968817bb5..07865103c5e 100644--- a/packages/twenty-front/src/modules/ai/components/LazyMarkdownRendererStyledComponents.tsx+++ b/packages/twenty-front/src/modules/ai/components/LazyMarkdownRendererStyledComponents.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledMarkdownContainer = styled.div`border-radius: ${themeCssVariables.border.radius.sm};diff --git a/packages/twenty-front/src/modules/ai/components/MarkdownCodeBlock.tsx b/packages/twenty-front/src/modules/ai/components/MarkdownCodeBlock.tsxindex 9af3e0455ea..7348274e2e1 100644--- a/packages/twenty-front/src/modules/ai/components/MarkdownCodeBlock.tsx+++ b/packages/twenty-front/src/modules/ai/components/MarkdownCodeBlock.tsx@@ -4,7 +4,7 @@ import { isNumber, isString } from '@sniptt/guards';import { Children, isValidElement } from 'react';import { LightIconButton } from 'twenty-ui/components';import { IconCopy } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatContent.tsx b/packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatContent.tsxindex 0bea9046d21..37aaf6cb9a8 100644--- a/packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatContent.tsx+++ b/packages/twenty-front/src/modules/ai/components/NavigationDrawerAiChatContent.tsx@@ -1,7 +1,7 @@import { useIsNavigationDrawerContentExpanded } from '@/navigation/hooks/useIsNavigationDrawerContentExpanded';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiChatThreadDeleteConfirmationModal } from '@/ai/components/AiChatThreadDeleteConfirmationModal';import { AiChatThreadFilterDropdown } from '@/ai/components/AiChatThreadFilterDropdown';diff --git a/packages/twenty-front/src/modules/ai/components/RoutingDebugDisplay.tsx b/packages/twenty-front/src/modules/ai/components/RoutingDebugDisplay.tsxindex bb2da9d6f5e..b999dbda36e 100644--- a/packages/twenty-front/src/modules/ai/components/RoutingDebugDisplay.tsx+++ b/packages/twenty-front/src/modules/ai/components/RoutingDebugDisplay.tsx@@ -1,10 +1,10 @@import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { JsonTree } from 'twenty-ui/components';import { IconChevronDown, IconChevronUp } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useUsageValueFormatter } from '@/settings/usage/hooks/useUsageValueFormatter';import { useLingui } from '@lingui/react/macro';@@ -319,7 +319,7 @@ type RoutingDebugDisplayProps = {};export const RoutingDebugDisplay = ({ debug }: RoutingDebugDisplayProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { copyToClipboard } = useCopyToClipboard();const [isExpanded, setIsExpanded] = useState(false);diff --git a/packages/twenty-front/src/modules/ai/components/RoutingStatusDisplay.tsx b/packages/twenty-front/src/modules/ai/components/RoutingStatusDisplay.tsxindex 58c5b17c461..83a6fdd3324 100644--- a/packages/twenty-front/src/modules/ai/components/RoutingStatusDisplay.tsx+++ b/packages/twenty-front/src/modules/ai/components/RoutingStatusDisplay.tsx@@ -1,12 +1,12 @@import { RoutingDebugDisplay } from '@/ai/components/RoutingDebugDisplay';import { ShimmeringText } from '@/ai/components/ShimmeringText';import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { type DataMessagePart } from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';import { IconChevronDown, IconChevronUp, IconCpu } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;@@ -62,7 +62,7 @@ export const RoutingStatusDisplay = ({}: {data: DataMessagePart['routing-status'];}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [isExpanded, setIsExpanded] = useState(false);const isLoading = data.state === 'loading';const isDebugMode = process.env.IS_DEBUG_MODE === 'true';diff --git a/packages/twenty-front/src/modules/ai/components/SettingsAgentModelCapabilities.tsx b/packages/twenty-front/src/modules/ai/components/SettingsAgentModelCapabilities.tsxindex 65657634f70..6dfee52e656 100644--- a/packages/twenty-front/src/modules/ai/components/SettingsAgentModelCapabilities.tsx+++ b/packages/twenty-front/src/modules/ai/components/SettingsAgentModelCapabilities.tsx@@ -2,12 +2,11 @@ import { useResolvedAiModel } from '@/ai/hooks/useResolvedAiModel';import { InputLabel } from '@/ui/input/components/internal/InputLabel/InputLabel';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconBrandX, IconWorld } from 'twenty-ui/icon';import { Checkbox } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledCheckboxContainer = styled.div<{ disabled: boolean }>`align-items: center;@@ -58,7 +57,7 @@ export const SettingsAgentModelCapabilities = ({onConfigurationChange,disabled = false,}: SettingsAgentModelCapabilitiesProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const selectedModel = useResolvedAiModel(selectedModelId);const nativeCapabilities = selectedModel?.nativeCapabilities;diff --git a/packages/twenty-front/src/modules/ai/components/ShimmeringText.tsx b/packages/twenty-front/src/modules/ai/components/ShimmeringText.tsxindex 75f999178bf..95a5bab1aa3 100644--- a/packages/twenty-front/src/modules/ai/components/ShimmeringText.tsx+++ b/packages/twenty-front/src/modules/ai/components/ShimmeringText.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledShimmeringText = styled.div`-webkit-background-clip: text;diff --git a/packages/twenty-front/src/modules/ai/components/TerminalOutput.tsx b/packages/twenty-front/src/modules/ai/components/TerminalOutput.tsxindex 822c1283112..033d2087d3a 100644--- a/packages/twenty-front/src/modules/ai/components/TerminalOutput.tsx+++ b/packages/twenty-front/src/modules/ai/components/TerminalOutput.tsx@@ -4,7 +4,7 @@ import { useLingui } from '@lingui/react/macro';import { useState } from 'react';import { LightIconButton } from 'twenty-ui/components';import { IconCopy, IconTerminal } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/ai/components/ThinkingStepsDisplay.tsx b/packages/twenty-front/src/modules/ai/components/ThinkingStepsDisplay.tsxindex b98ab2c15af..e6eb0a8de1e 100644--- a/packages/twenty-front/src/modules/ai/components/ThinkingStepsDisplay.tsx+++ b/packages/twenty-front/src/modules/ai/components/ThinkingStepsDisplay.tsx@@ -9,7 +9,7 @@ import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronRight, IconCpu } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';import { Tabs } from 'twenty-ui/primitives/navigation';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type JsonValue } from 'type-fest';import { AiChatThinkingRow } from '@/ai/components/AiChatThinkingRow';diff --git a/packages/twenty-front/src/modules/ai/components/ToolRecordsWidget.tsx b/packages/twenty-front/src/modules/ai/components/ToolRecordsWidget.tsxindex 330c557f6af..803d5222841 100644--- a/packages/twenty-front/src/modules/ai/components/ToolRecordsWidget.tsx+++ b/packages/twenty-front/src/modules/ai/components/ToolRecordsWidget.tsx@@ -6,7 +6,7 @@ import { type ToolRecordReference } from 'twenty-shared/ai';import { AppPath } from 'twenty-shared/types';import { getAppPath, isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';diff --git a/packages/twenty-front/src/modules/ai/components/ToolStepRenderer.tsx b/packages/twenty-front/src/modules/ai/components/ToolStepRenderer.tsxindex 96279fb30e6..5cca2e49d4b 100644--- a/packages/twenty-front/src/modules/ai/components/ToolStepRenderer.tsx+++ b/packages/twenty-front/src/modules/ai/components/ToolStepRenderer.tsx@@ -1,10 +1,10 @@import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { JsonTree } from 'twenty-ui/components';import { IconChevronDown, IconChevronUp } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { CodeExecutionDisplay } from '@/ai/components/CodeExecutionDisplay';import { ShimmeringText } from '@/ai/components/ShimmeringText';@@ -133,7 +133,7 @@ export const ToolStepRenderer = ({toolPart: ToolUIPart | DynamicToolUIPart;isStreaming: boolean;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { copyToClipboard } = useCopyToClipboard();const [isExpanded, setIsExpanded] = useState(false);diff --git a/packages/twenty-front/src/modules/ai/components/__tests__/AiChatAssistantMessageRenderer.test.tsx b/packages/twenty-front/src/modules/ai/components/__tests__/AiChatAssistantMessageRenderer.test.tsxindex 24978fbee8d..741c777966d 100644--- a/packages/twenty-front/src/modules/ai/components/__tests__/AiChatAssistantMessageRenderer.test.tsx+++ b/packages/twenty-front/src/modules/ai/components/__tests__/AiChatAssistantMessageRenderer.test.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { type ExtendedUIMessagePart } from 'twenty-shared/ai';import { AiChatAssistantMessageRenderer } from '@/ai/components/AiChatAssistantMessageRenderer';diff --git a/packages/twenty-front/src/modules/ai/components/__tests__/ThinkingStepsDisplay.test.tsx b/packages/twenty-front/src/modules/ai/components/__tests__/ThinkingStepsDisplay.test.tsxindex 47d10bfb4b8..68144839d81 100644--- a/packages/twenty-front/src/modules/ai/components/__tests__/ThinkingStepsDisplay.test.tsx+++ b/packages/twenty-front/src/modules/ai/components/__tests__/ThinkingStepsDisplay.test.tsx@@ -1,6 +1,6 @@import { render, screen, waitFor } from '@testing-library/react';import userEvent from '@testing-library/user-event';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { ThinkingStepsDisplay } from '@/ai/components/ThinkingStepsDisplay';import { type ThinkingStepPart } from '@/ai/utils/thinkingStepPart';diff --git a/packages/twenty-front/src/modules/ai/components/internal/AgentChatContextPreview.tsx b/packages/twenty-front/src/modules/ai/components/internal/AgentChatContextPreview.tsxindex 4b98d07ac2c..b7d51193bc1 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AgentChatContextPreview.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AgentChatContextPreview.tsx@@ -2,7 +2,7 @@ import { agentChatSelectedFilesState } from '@/ai/states/agentChatSelectedFilesSimport { agentChatUploadedFilesState } from '@/ai/states/agentChatUploadedFilesState';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AgentChatFilePreview } from './AgentChatFilePreview';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/ai/components/internal/AgentChatFilePreview.tsx b/packages/twenty-front/src/modules/ai/components/internal/AgentChatFilePreview.tsxindex 584a57c2ff3..38f4bb1a2a5 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AgentChatFilePreview.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AgentChatFilePreview.tsx@@ -8,13 +8,13 @@ import { filePreviewState } from '@/ui/field/display/states/filePreviewState';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useCallback, useContext } from 'react';+import { useCallback } from 'react';import { type ExtendedFileUIPart } from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';import { type IconComponent, IconX } from 'twenty-ui/icon';import { Chip } from 'twenty-ui/primitives/data-display';import { Loader } from 'twenty-ui/primitives/feedback';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const StyledClickableContainer = styled.div<{ clickable: boolean }>`cursor: ${({ clickable }: { clickable: boolean }) =>@@ -32,7 +32,7 @@ export const AgentChatFilePreview = ({onRemove?: () => void;isUploading?: boolean;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const iconColors: Record<AttachmentFileCategory, string> =useFileCategoryColors();const setFilePreview = useSetAtomState(filePreviewState);diff --git a/packages/twenty-front/src/modules/ai/components/internal/AgentChatFileUploadButton.tsx b/packages/twenty-front/src/modules/ai/components/internal/AgentChatFileUploadButton.tsxindex 67598b41e25..6018b168214 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AgentChatFileUploadButton.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AgentChatFileUploadButton.tsx@@ -6,7 +6,7 @@ import { t } from '@lingui/core/macro';import React, { useRef } from 'react';import { IconPaperclip } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFileUploadContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageButton.tsx b/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageButton.tsxindex 66d78feae8a..d160af4cc28 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageButton.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageButton.tsx@@ -25,7 +25,7 @@ import { isDefined } from 'twenty-shared/utils';import { Button } from 'twenty-ui/primitives/input';import { IconWindow, IconGauge } from 'twenty-ui/icon';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiChatContextUsageDetails } from '@/ai/components/internal/AiChatContextUsageDetails';import { ContextUsageProgressRing } from '@/ai/components/internal/ContextUsageProgressRing';diff --git a/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageDetails.tsx b/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageDetails.tsxindex 2e3b26a25c5..1f74ca192d3 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageDetails.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AiChatContextUsageDetails.tsx@@ -9,7 +9,7 @@ import {IconCoins,IconHistory,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { agentChatUsageComponentFamilyState } from '@/ai/states/agentChatUsageComponentFamilyState';import { currentAiChatThreadState } from '@/ai/states/currentAiChatThreadState';diff --git a/packages/twenty-front/src/modules/ai/components/internal/AiChatQuestionOtherOption.tsx b/packages/twenty-front/src/modules/ai/components/internal/AiChatQuestionOtherOption.tsxindex f49a10f6d3a..1723b2c7ebd 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AiChatQuestionOtherOption.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AiChatQuestionOtherOption.tsx@@ -1,8 +1,8 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type KeyboardEvent, useContext, useId, useRef } from 'react';+import { type KeyboardEvent, useId, useRef } from 'react';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { usePushFocusItemToFocusStack } from '@/ui/utilities/focus/hooks/usePushFocusItemToFocusStack';import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooks/useRemoveFocusItemFromFocusStackById';@@ -81,7 +81,7 @@ export const AiChatQuestionOtherOption = ({onTextareaKeyDown,}: AiChatQuestionOtherOptionProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const textareaRef = useRef<HTMLTextAreaElement>(null);const textAreaFocusId = useId();diff --git a/packages/twenty-front/src/modules/ai/components/internal/AiChatSkeletonLoader.tsx b/packages/twenty-front/src/modules/ai/components/internal/AiChatSkeletonLoader.tsxindex 886bb3d2b67..e8059ed6806 100644--- a/packages/twenty-front/src/modules/ai/components/internal/AiChatSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/AiChatSkeletonLoader.tsx@@ -1,8 +1,7 @@import { StyledAiChatContentContainer } from '@/ai/components/StyledAiChatContentContainer';import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledSkeletonContainer = styled(StyledAiChatContentContainer)`display: flex;@@ -12,7 +11,7 @@ const StyledSkeletonContainer = styled(StyledAiChatContentContainer)``;export const AiChatSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemediff --git a/packages/twenty-front/src/modules/ai/components/internal/ContextUsageProgressRing.tsx b/packages/twenty-front/src/modules/ai/components/internal/ContextUsageProgressRing.tsxindex faa54b53d1b..144d7bb04ad 100644--- a/packages/twenty-front/src/modules/ai/components/internal/ContextUsageProgressRing.tsx+++ b/packages/twenty-front/src/modules/ai/components/internal/ContextUsageProgressRing.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ProgressRing } from '@/ui/feedback/progress-ring/components/ProgressRing';diff --git a/packages/twenty-front/src/modules/ai/components/suggested-prompts/AiChatSuggestedPrompts.tsx b/packages/twenty-front/src/modules/ai/components/suggested-prompts/AiChatSuggestedPrompts.tsxindex cc082a9ec02..79951e22324 100644--- a/packages/twenty-front/src/modules/ai/components/suggested-prompts/AiChatSuggestedPrompts.tsx+++ b/packages/twenty-front/src/modules/ai/components/suggested-prompts/AiChatSuggestedPrompts.tsx@@ -4,7 +4,7 @@ import { t } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import { LightButton } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getAiChatSuggestedPrompts } from '@/ai/components/suggested-prompts/getAiChatSuggestedPrompts';import { useAiChatSuggestedPromptsContext } from '@/ai/hooks/useAiChatSuggestedPromptsContext';diff --git a/packages/twenty-front/src/modules/ai/dictation/components/AiChatDictationHint.tsx b/packages/twenty-front/src/modules/ai/dictation/components/AiChatDictationHint.tsxindex e02657383f6..b21bbe5639f 100644--- a/packages/twenty-front/src/modules/ai/dictation/components/AiChatDictationHint.tsx+++ b/packages/twenty-front/src/modules/ai/dictation/components/AiChatDictationHint.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledHint = styled.div`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/ai/hooks/useChatReferenceTarget.tsx b/packages/twenty-front/src/modules/ai/hooks/useChatReferenceTarget.tsxindex b1c9d4382b4..cdf0e6b4b1e 100644--- a/packages/twenty-front/src/modules/ai/hooks/useChatReferenceTarget.tsx+++ b/packages/twenty-front/src/modules/ai/hooks/useChatReferenceTarget.tsx@@ -9,7 +9,7 @@ import {isDefined,} from 'twenty-shared/utils';import { IconApps, IconLock, useIcons } from 'twenty-ui/icon';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { CHAT_REFERENCE_PERMISSION_FLAG_BY_KIND } from '@/ai/constants/ChatReferencePermissionFlagByKind';import { useIsAiChatArtifactSurface } from '@/ai/hooks/useIsAiChatArtifactSurface';diff --git a/packages/twenty-front/src/modules/app/routing/components/WorkspaceRouteUnavailable.tsx b/packages/twenty-front/src/modules/app/routing/components/WorkspaceRouteUnavailable.tsxindex 9316dcb3f06..aca361821c1 100644--- a/packages/twenty-front/src/modules/app/routing/components/WorkspaceRouteUnavailable.tsx+++ b/packages/twenty-front/src/modules/app/routing/components/WorkspaceRouteUnavailable.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/applications/components/AppChip.tsx b/packages/twenty-front/src/modules/applications/components/AppChip.tsxindex af58e470a7a..c75bbac727e 100644--- a/packages/twenty-front/src/modules/applications/components/AppChip.tsx+++ b/packages/twenty-front/src/modules/applications/components/AppChip.tsx@@ -2,7 +2,7 @@ import { useApplicationChipData } from '@/applications/hooks/useApplicationChipDimport { styled } from '@linaria/react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { Avatar, type AvatarSize } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';type AppChipProps = {diff --git a/packages/twenty-front/src/modules/applications/components/AppConnectionHeader.tsx b/packages/twenty-front/src/modules/applications/components/AppConnectionHeader.tsxindex 1859ae2ea24..f9a82b0636a 100644--- a/packages/twenty-front/src/modules/applications/components/AppConnectionHeader.tsx+++ b/packages/twenty-front/src/modules/applications/components/AppConnectionHeader.tsx@@ -1,9 +1,9 @@import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { isNonEmptyString } from '@sniptt/guards';import { Avatar } from 'twenty-ui/primitives/data-display';import { IconRefresh } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type AppConnectionHeaderProps = {appLogoUrl?: string | null;@@ -57,7 +57,7 @@ export const AppConnectionHeader = ({appLogoUrl,appName,}: AppConnectionHeaderProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [hasAppLogoError, setHasAppLogoError] = useState(false);diff --git a/packages/twenty-front/src/modules/applications/components/AppMenuItemIcon.tsx b/packages/twenty-front/src/modules/applications/components/AppMenuItemIcon.tsxindex 7bfda669333..cfc6138c440 100644--- a/packages/twenty-front/src/modules/applications/components/AppMenuItemIcon.tsx+++ b/packages/twenty-front/src/modules/applications/components/AppMenuItemIcon.tsx@@ -1,6 +1,6 @@import { AppChip } from '@/applications/components/AppChip';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledAppIconContainer = styled.span`background: ${themeCssVariables.background.transparent.light};diff --git a/packages/twenty-front/src/modules/applications/components/ApplicationDisplay.tsx b/packages/twenty-front/src/modules/applications/components/ApplicationDisplay.tsxindex 3e9bffeeb73..9fcab299eca 100644--- a/packages/twenty-front/src/modules/applications/components/ApplicationDisplay.tsx+++ b/packages/twenty-front/src/modules/applications/components/ApplicationDisplay.tsx@@ -1,6 +1,6 @@import { type ApplicationDisplayData } from '@/applications/types/ApplicationDisplayData';import { AppChip } from '@/applications/components/AppChip';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';type ApplicationDisplayProps = {diff --git a/packages/twenty-front/src/modules/applications/components/AuthorizeActionButtons.tsx b/packages/twenty-front/src/modules/applications/components/AuthorizeActionButtons.tsxindex be55322b07a..4c1c56c27ac 100644--- a/packages/twenty-front/src/modules/applications/components/AuthorizeActionButtons.tsx+++ b/packages/twenty-front/src/modules/applications/components/AuthorizeActionButtons.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { MainButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type AuthorizeActionButtonsProps = {onAuthorize: () => void;diff --git a/packages/twenty-front/src/modules/applications/hooks/useApplicationAvatarColors.ts b/packages/twenty-front/src/modules/applications/hooks/useApplicationAvatarColors.tsindex 93c5b1db12a..ad10979c451 100644--- a/packages/twenty-front/src/modules/applications/hooks/useApplicationAvatarColors.ts+++ b/packages/twenty-front/src/modules/applications/hooks/useApplicationAvatarColors.ts@@ -2,8 +2,7 @@ import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { isTwentyStandardApplication } from '@/applications/utils/isTwentyStandardApplication';import { isWorkspaceCustomApplication } from '@/applications/utils/isWorkspaceCustomApplication';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { isDefined } from 'twenty-shared/utils';export type ApplicationAvatarColors = {@@ -21,7 +20,7 @@ type UseApplicationAvatarColorsArgs = {export const useApplicationAvatarColors = (application: UseApplicationAvatarColorsArgs | null | undefined,): ApplicationAvatarColors | undefined => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const currentWorkspace = useAtomStateValue(currentWorkspaceState);if (!isDefined(application) || !isDefined(application.id)) {diff --git a/packages/twenty-front/src/modules/auth/components/Logo.tsx b/packages/twenty-front/src/modules/auth/components/Logo.tsxindex 2a6953f4184..8d55e565f5f 100644--- a/packages/twenty-front/src/modules/auth/components/Logo.tsx+++ b/packages/twenty-front/src/modules/auth/components/Logo.tsx@@ -4,7 +4,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { AppPath } from 'twenty-shared/types';import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils';import { Avatar } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { REACT_APP_SERVER_BASE_URL } from '~/config';import { useRedirectToDefaultDomain } from '~/modules/domain-manager/hooks/useRedirectToDefaultDomain';diff --git a/packages/twenty-front/src/modules/auth/components/StyledAuthContent.tsx b/packages/twenty-front/src/modules/auth/components/StyledAuthContent.tsxindex 1d2db5cf597..934e5a04dde 100644--- a/packages/twenty-front/src/modules/auth/components/StyledAuthContent.tsx+++ b/packages/twenty-front/src/modules/auth/components/StyledAuthContent.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledAuthContent = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/auth/components/StyledOnboardingContentContainer.ts b/packages/twenty-front/src/modules/auth/components/StyledOnboardingContentContainer.tsindex 3aea62da85d..397777e7840 100644--- a/packages/twenty-front/src/modules/auth/components/StyledOnboardingContentContainer.ts+++ b/packages/twenty-front/src/modules/auth/components/StyledOnboardingContentContainer.ts@@ -1,6 +1,6 @@import { ONBOARDING_CONTENT_BLOCK_WIDTH } from '@/onboarding/constants/OnboardingContentBlockWidth';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledOnboardingContentContainer = styled.div`margin-bottom: ${themeCssVariables.spacing[8]};diff --git a/packages/twenty-front/src/modules/auth/components/SubTitle.tsx b/packages/twenty-front/src/modules/auth/components/SubTitle.tsxindex 4c6fefd5486..fedd43a5c88 100644--- a/packages/twenty-front/src/modules/auth/components/SubTitle.tsx+++ b/packages/twenty-front/src/modules/auth/components/SubTitle.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSubTitle = styled.div`color: ${themeCssVariables.font.color.secondary};diff --git a/packages/twenty-front/src/modules/auth/components/Title.tsx b/packages/twenty-front/src/modules/auth/components/Title.tsxindex d99cb5b6784..eb81b1675d8 100644--- a/packages/twenty-front/src/modules/auth/components/Title.tsx+++ b/packages/twenty-front/src/modules/auth/components/Title.tsx@@ -1,7 +1,7 @@import { AnimatedEaseIn } from '@/auth/components/internal/AnimatedEaseIn/AnimatedEaseIn';import { styled } from '@linaria/react';import React from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type TitleProps = React.PropsWithChildren & {animate?: boolean;diff --git a/packages/twenty-front/src/modules/auth/components/__tests__/VerifyEmail.test.tsx b/packages/twenty-front/src/modules/auth/components/__tests__/VerifyEmail.test.tsxindex 18034701646..c18d1b6c9f1 100644--- a/packages/twenty-front/src/modules/auth/components/__tests__/VerifyEmail.test.tsx+++ b/packages/twenty-front/src/modules/auth/components/__tests__/VerifyEmail.test.tsx@@ -5,7 +5,7 @@ import { Provider as JotaiProvider } from 'jotai';import { MemoryRouter } from 'react-router-dom';import { SOURCE_LOCALE } from 'twenty-shared/translations';import { AppPath } from 'twenty-shared/types';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { VerifyEmail } from '@/auth/components/VerifyEmail';import { clientConfigApiStatusState } from '@/client-config/states/clientConfigApiStatusState';diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/EmailVerificationSent.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/EmailVerificationSent.tsxindex 5e52d7fcb0b..2b71bb9c5f3 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/EmailVerificationSent.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/EmailVerificationSent.tsx@@ -13,7 +13,7 @@ import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomStatimport { t } from '@lingui/core/macro';import { MainButton } from 'twenty-ui/components';import { IconGmail, IconMail, IconMailX, IconMicrosoft } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsxindex 2ce1100b80c..e213c2cf77c 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/FooterNote.tsx@@ -5,7 +5,7 @@ import { useWorkspaceBypass } from '@/auth/sign-in-up/hooks/useWorkspaceBypass';import { getTwentyWebsiteUrl } from '@/auth/utils/getTwentyWebsiteUrl';import { useIsCurrentLocationOnAWorkspace } from '@/domain-manager/hooks/useIsCurrentLocationOnAWorkspace';import { ONBOARDING_CONTENT_BLOCK_WIDTH } from '@/onboarding/constants/OnboardingContentBlockWidth';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCopyContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpGlobalScopeForm.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpGlobalScopeForm.tsxindex 7126183d1d7..80f8ab6aa82 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpGlobalScopeForm.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpGlobalScopeForm.tsx@@ -26,11 +26,10 @@ import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constaimport { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';import { isNonEmptyString } from '@sniptt/guards';-import { useContext } from 'react';import { IconChevronRight, IconPlus } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import {type AvailableWorkspace,GetWorkspaceCreationDefaultsDocument,@@ -125,7 +124,7 @@ const StyledForgotPasswordLinkContainer = styled.div``;export const SignInUpGlobalScopeForm = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const authProviders = useAtomStateValue(authProvidersState);const isDDLLocked = useAtomStateValue(isDDLLockedState);const signInUpStep = useAtomStateValue(signInUpStepState);diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpStandardContent.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpStandardContent.tsxindex f25fe10657a..859d87b5d70 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpStandardContent.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpStandardContent.tsx@@ -8,7 +8,7 @@ import { SignInUpStep } from '@/auth/states/signInUpStepState';import { styled } from '@linaria/react';import { type JSX } from 'react';import { AppPath } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type PublicWorkspaceData } from '~/generated-metadata/graphql';const StyledTitleContainer = styled.div`diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/__tests__/SignInUpGlobalScopeForm.test.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/__tests__/SignInUpGlobalScopeForm.test.tsxindex 667dc2a391f..caca885ba42 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/__tests__/SignInUpGlobalScopeForm.test.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/__tests__/SignInUpGlobalScopeForm.test.tsx@@ -4,7 +4,7 @@ import { I18nProvider } from '@lingui/react';import { fireEvent, render, screen } from '@testing-library/react';import { Provider as JotaiProvider } from 'jotai';import { SOURCE_LOCALE } from 'twenty-shared/translations';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { SignInUpGlobalScopeForm } from '@/auth/sign-in-up/components/SignInUpGlobalScopeForm';import {diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/LastUsedPill.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/LastUsedPill.tsxindex ca4d5e4d9b8..05d7c9d24ff 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/LastUsedPill.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/LastUsedPill.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Pill } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledPillContainer = styled.span`position: absolute;diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpEmailField.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpEmailField.tsxindex 3707d3da682..3279eb4e14c 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpEmailField.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpEmailField.tsx@@ -5,7 +5,7 @@ import { useLingui } from '@lingui/react/macro';import { motion } from 'framer-motion';import { Controller, useFormContext } from 'react-hook-form';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFullWidthMotionDiv = styled(motion.div)`width: 100%;diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpPasswordField.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpPasswordField.tsxindex 4493afa7436..dac9535e02d 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpPasswordField.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpPasswordField.tsx@@ -6,7 +6,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { motion } from 'framer-motion';import { Controller, useFormContext } from 'react-hook-form';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFullWidthMotionDiv = styled(motion.div)`width: 100%;diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationProvision.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationProvision.tsxindex 85040e3e84f..74b70f621a4 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationProvision.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationProvision.tsx@@ -17,8 +17,7 @@ import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomStatimport { MainButton } from 'twenty-ui/components';import { IconCopy } from 'twenty-ui/icon';import { Loader } from 'twenty-ui/primitives/feedback';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { resolveCjsModuleDefaultExport } from '~/utils/resolveCjsModuleDefaultExport';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';@@ -52,7 +51,7 @@ const StyledCopySetupKeyLink = styled.button``;export const SignInUpTwoFactorAuthenticationProvision = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { copyToClipboard } = useCopyToClipboard();const qrCode = useAtomStateValue(qrCodeState);diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationStyles.ts b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationStyles.tsindex e6ca303c93b..13cd6cc9f20 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationStyles.ts+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationStyles.ts@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledTwoFactorMainContent = styled.div`margin-bottom: ${themeCssVariables.spacing[8]};diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationVerification.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationVerification.tsxindex 177dce46c3f..4e0c9759d9a 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationVerification.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpTwoFactorAuthenticationVerification.tsx@@ -25,7 +25,7 @@ import { Controller } from 'react-hook-form';import { AppPath } from 'twenty-shared/types';import { MainButton, useToast } from 'twenty-ui/components';import { ClickToActionLink } from 'twenty-ui/primitives/navigation';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useNavigateApp } from '~/hooks/useNavigateApp';const StyledForm = styled.form`diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithGoogle.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithGoogle.tsxindex fe806322a80..da00d730be4 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithGoogle.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithGoogle.tsx@@ -9,7 +9,7 @@ import {import { AuthenticatedMethod } from '@/auth/types/AuthenticatedMethod.enum';import { type SocialSsoSignInUpActionType } from '@/auth/types/SocialSsoSignInUpActionType';import { useLingui } from '@lingui/react/macro';-import { memo, useContext } from 'react';+import { memo } from 'react';import { MainButton } from 'twenty-ui/components';import { IconGoogle } from 'twenty-ui/icon';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';@@ -17,10 +17,10 @@ import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { LastUsedPill } from './LastUsedPill';import { StyledSsoButtonContainer } from './SignInUpSsoButtonStyles';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const GoogleIcon = memo(() => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return <IconGoogle size={theme.icon.size.md} />;});diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithMicrosoft.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithMicrosoft.tsxindex b04fc646f5d..f9250728891 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithMicrosoft.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithMicrosoft.tsx@@ -8,7 +8,6 @@ import {import { AuthenticatedMethod } from '@/auth/types/AuthenticatedMethod.enum';import { type SocialSsoSignInUpActionType } from '@/auth/types/SocialSsoSignInUpActionType';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { MainButton } from 'twenty-ui/components';import { IconMicrosoft } from 'twenty-ui/icon';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';@@ -16,7 +15,7 @@ import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { LastUsedPill } from './LastUsedPill';import { StyledSsoButtonContainer } from './SignInUpSsoButtonStyles';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const SignInUpWithMicrosoft = ({action,@@ -25,7 +24,7 @@ export const SignInUpWithMicrosoft = ({action: SocialSsoSignInUpActionType;isGlobalScope?: boolean;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const signInUpStep = useAtomStateValue(signInUpStepState);diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithSso.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithSso.tsxindex 96d1aab3e9f..b4aa0f9d7aa 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithSso.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWithSso.tsx@@ -17,11 +17,10 @@ import { IconLock } from 'twenty-ui/icon';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';import { LastUsedPill } from './LastUsedPill';import { StyledSsoButtonContainer } from './SignInUpSsoButtonStyles';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const SignInUpWithSso = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const setSignInUpStep = useSetAtomState(signInUpStepState);const workspaceAuthProviders = useAtomStateValue(workspaceAuthProvidersState);diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWorkspaceCreationForm.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWorkspaceCreationForm.tsxindex abb63730a20..abc7d9a5bfd 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWorkspaceCreationForm.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/SignInUpWorkspaceCreationForm.tsx@@ -19,7 +19,7 @@ import { LightIconButton, MainButton } from 'twenty-ui/components';import { IconTrash, IconUpload } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContentContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/__tests__/SignInUpWorkspaceCreationForm.test.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/__tests__/SignInUpWorkspaceCreationForm.test.tsxindex a6b5d87d952..0577b4a0f6b 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/__tests__/SignInUpWorkspaceCreationForm.test.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/internal/__tests__/SignInUpWorkspaceCreationForm.test.tsx@@ -3,7 +3,7 @@ import { I18nProvider } from '@lingui/react';import { act, fireEvent, render, screen } from '@testing-library/react';import { Provider as JotaiProvider } from 'jotai';import { SOURCE_LOCALE } from 'twenty-shared/translations';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { SignInUpWorkspaceCreationForm } from '@/auth/sign-in-up/components/internal/SignInUpWorkspaceCreationForm';import { isCreatingWorkspaceState } from '@/auth/states/isCreatingWorkspaceState';diff --git a/packages/twenty-front/src/modules/blocknote-editor/blocks/FileBlock.tsx b/packages/twenty-front/src/modules/blocknote-editor/blocks/FileBlock.tsxindex 36a8df5e2b9..78165ceba45 100644--- a/packages/twenty-front/src/modules/blocknote-editor/blocks/FileBlock.tsx+++ b/packages/twenty-front/src/modules/blocknote-editor/blocks/FileBlock.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { type ChangeEvent, useRef } from 'react';import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type AttachmentFileCategory } from '@/activities/files/types/AttachmentFileCategory';import { getFileType } from '@/activities/files/utils/getFileType';diff --git a/packages/twenty-front/src/modules/blocknote-editor/blocks/MentionInlineContent.tsx b/packages/twenty-front/src/modules/blocknote-editor/blocks/MentionInlineContent.tsxindex 74ac817c012..44e62d350f2 100644--- a/packages/twenty-front/src/modules/blocknote-editor/blocks/MentionInlineContent.tsx+++ b/packages/twenty-front/src/modules/blocknote-editor/blocks/MentionInlineContent.tsx@@ -8,7 +8,7 @@ import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { Chip } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';const StyledRecordChipContainer = styled.div`diff --git a/packages/twenty-front/src/modules/blocknote-editor/components/BlockEditor.tsx b/packages/twenty-front/src/modules/blocknote-editor/components/BlockEditor.tsxindex e2e12ece9ad..218f89ca949 100644--- a/packages/twenty-front/src/modules/blocknote-editor/components/BlockEditor.tsx+++ b/packages/twenty-front/src/modules/blocknote-editor/components/BlockEditor.tsx@@ -6,7 +6,7 @@ import { BlockNoteView } from '@blocknote/mantine';import { SuggestionMenuController } from '@blocknote/react';import { useLingui } from '@lingui/react/macro';import { styled } from '@linaria/react';-import { type ClipboardEvent, useContext } from 'react';+import { type ClipboardEvent } from 'react';import { type BLOCK_SCHEMA } from '@/blocknote-editor/blocks/Schema';import { getSlashMenu } from '@/blocknote-editor/utils/getSlashMenu';import { CustomMentionMenu } from '@/blocknote-editor/components/CustomMentionMenu';@@ -17,7 +17,7 @@ import {} from '@/blocknote-editor/components/CustomSlashMenu';import { useMentionMenu } from '@/mention/hooks/useMentionMenu';import { IconX } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useThemeColorScheme, themeCssVariables } from 'twenty-ui/theme';interface BlockEditorProps {editor: typeof BLOCK_SCHEMA.BlockNoteEditor;@@ -165,7 +165,7 @@ export const BlockEditor = ({onPaste,readonly,}: BlockEditorProps) => {- const { colorScheme } = useContext(ThemeContext);+ const colorScheme = useThemeColorScheme();const { t } = useLingui();const blockNoteTheme = colorScheme === 'light' ? 'light' : 'dark';diff --git a/packages/twenty-front/src/modules/blocknote-editor/components/CustomSideMenu.tsx b/packages/twenty-front/src/modules/blocknote-editor/components/CustomSideMenu.tsxindex 3d4e03e9462..6b7a9d93ce2 100644--- a/packages/twenty-front/src/modules/blocknote-editor/components/CustomSideMenu.tsx+++ b/packages/twenty-front/src/modules/blocknote-editor/components/CustomSideMenu.tsx@@ -12,7 +12,7 @@ import {import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconColorSwatch, IconPlus, IconTrash } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type CustomSideMenuProps = {editor: typeof BLOCK_SCHEMA.BlockNoteEditor;diff --git a/packages/twenty-front/src/modules/blocknote-editor/components/CustomSideMenuOptions.tsx b/packages/twenty-front/src/modules/blocknote-editor/components/CustomSideMenuOptions.tsxindex 434d31957c7..0a21e2d8cda 100644--- a/packages/twenty-front/src/modules/blocknote-editor/components/CustomSideMenuOptions.tsx+++ b/packages/twenty-front/src/modules/blocknote-editor/components/CustomSideMenuOptions.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ Variant: Variants }>`align-items: center;@@ -27,7 +26,7 @@ export const CustomSideMenuOptions = ({Variant,text,}: CustomSideMenuOptionsProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer Variant={Variant}>diff --git a/packages/twenty-front/src/modules/command-menu-item/confirmation-modal/components/CommandMenuConfirmationModalManager.tsx b/packages/twenty-front/src/modules/command-menu-item/confirmation-modal/components/CommandMenuConfirmationModalManager.tsxindex 0bdda496f5d..7b831004524 100644--- a/packages/twenty-front/src/modules/command-menu-item/confirmation-modal/components/CommandMenuConfirmationModalManager.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/confirmation-modal/components/CommandMenuConfirmationModalManager.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { NavigationButton } from '@/ui/input/components/NavigationButton';import { COMMAND_MENU_CONFIRMATION_MODAL_INSTANCE_ID } from '@/command-menu-item/confirmation-modal/constants/CommandMenuItemConfirmationModalId';diff --git a/packages/twenty-front/src/modules/command-menu-item/display/components/CommandListItemLoader.tsx b/packages/twenty-front/src/modules/command-menu-item/display/components/CommandListItemLoader.tsxindex 4d36d9d71b9..8bff165fdd8 100644--- a/packages/twenty-front/src/modules/command-menu-item/display/components/CommandListItemLoader.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/display/components/CommandListItemLoader.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { getCommandMenuItemProgressLabel } from '@/command-menu-item/utils/getCommandMenuItemProgressLabel';import { isDefined } from 'twenty-shared/utils';import { Loader } from 'twenty-ui/primitives/feedback';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemButtons.tsx b/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemButtons.tsxindex b48a0f227eb..abe9989bce4 100644--- a/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemButtons.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/display/components/PinnedCommandMenuItemButtons.tsx@@ -10,7 +10,7 @@ import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';import { motion } from 'framer-motion';import { useContext, useMemo } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';import {type CommandMenuItemFieldsFragment,@@ -54,7 +54,7 @@ export const PinnedCommandMenuItemButtons = ({// space to measure it, so sibling actions stay adjacent to the buttons.containerWidth?: number;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { commandMenuItems, containerType } = useContext(CommandMenuContext);const isMobile = useIsMobile();diff --git a/packages/twenty-front/src/modules/command-menu-item/edit/components/CommandMenuItemEditRecordSelectionDropdown.tsx b/packages/twenty-front/src/modules/command-menu-item/edit/components/CommandMenuItemEditRecordSelectionDropdown.tsxindex 61c66be92bf..37be1df3553 100644--- a/packages/twenty-front/src/modules/command-menu-item/edit/components/CommandMenuItemEditRecordSelectionDropdown.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/edit/components/CommandMenuItemEditRecordSelectionDropdown.tsx@@ -12,10 +12,9 @@ import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { IconChevronDown, IconSquareCheck, IconSquareX } from 'twenty-ui/icon';import { ListItem } from 'twenty-ui/primitives/navigation';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const DROPDOWN_ID = 'command-menu-edit-record-selection-dropdown';@@ -53,7 +52,7 @@ export const CommandMenuItemEditRecordSelectionDropdown = ({isRecordPage = false,}: CommandMenuItemEditRecordSelectionDropdownProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { closeDropdown } = useCloseDropdown();const mainContextStoreHasSelectedRecords = useAtomStateValue(diff --git a/packages/twenty-front/src/modules/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage.tsx b/packages/twenty-front/src/modules/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage.tsxindex f51a6feec94..281213a9d74 100644--- a/packages/twenty-front/src/modules/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage.tsx@@ -33,7 +33,7 @@ import {useIcons,} from 'twenty-ui/icon';import { ButtonGroup } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type CommandMenuItemFieldsFragment } from '~/generated-metadata/graphql';import { normalizeSearchText } from '~/utils/normalizeSearchText';diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuItemSwitch.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuItemSwitch.tsxindex e5534f56fb3..f70c691fae2 100644--- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuItemSwitch.tsx+++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuItemSwitch.tsx@@ -4,7 +4,7 @@ import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';import { SettingsRow, type SettingsRowProps } from 'twenty-ui/components';import { type IconComponent } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type CommandMenuItemSwitchProps = {id: string;diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuOpenContainer.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuOpenContainer.tsxindex 85f0ae23e7e..62fa454225b 100644--- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuOpenContainer.tsx+++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuOpenContainer.tsx@@ -21,8 +21,8 @@ import { useStore } from 'jotai';import { LINK_CHIP_CLICK_OUTSIDE_ID } from '@/ui/navigation/link/constants/LinkChipClickOutsideId';import { styled } from '@linaria/react';import { motion } from 'framer-motion';-import { useCallback, useContext, useRef } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useCallback, useRef } from 'react';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';const StyledCommandMenuBase = styled.div`background: ${themeCssVariables.background.primary};@@ -44,7 +44,7 @@ const StyledCommandMenu = motion.create(StyledCommandMenuBase);export const CommandMenuOpenContainer = ({children,}: React.PropsWithChildren) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isMobile = useIsMobile();const targetVariantForAnimation: SidePanelAnimationVariant = isMobilediff --git a/packages/twenty-front/src/modules/error-handler/components/AppFullScreenErrorFallback.tsx b/packages/twenty-front/src/modules/error-handler/components/AppFullScreenErrorFallback.tsxindex 62e264fff3d..1ec49363d21 100644--- a/packages/twenty-front/src/modules/error-handler/components/AppFullScreenErrorFallback.tsx+++ b/packages/twenty-front/src/modules/error-handler/components/AppFullScreenErrorFallback.tsx@@ -2,7 +2,7 @@ import { AppErrorDisplay } from '@/error-handler/components/internal/AppErrorDisimport { type AppErrorDisplayProps } from '@/error-handler/types/AppErrorDisplayProps';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type AppFullScreenErrorFallbackProps = AppErrorDisplayProps;diff --git a/packages/twenty-front/src/modules/error-handler/components/AppRootErrorFallback.tsx b/packages/twenty-front/src/modules/error-handler/components/AppRootErrorFallback.tsxindex 4ced03008b6..f9d17cbef5a 100644--- a/packages/twenty-front/src/modules/error-handler/components/AppRootErrorFallback.tsx+++ b/packages/twenty-front/src/modules/error-handler/components/AppRootErrorFallback.tsx@@ -1,9 +1,8 @@import { type AppErrorDisplayProps } from '@/error-handler/types/AppErrorDisplayProps';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { IconReload } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type AppRootErrorFallbackProps = AppErrorDisplayProps;@@ -103,7 +102,7 @@ export const AppRootErrorFallback = ({resetErrorBoundary,title = t`Sorry, something went wrong`,}: AppRootErrorFallbackProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer>diff --git a/packages/twenty-front/src/modules/file/components/AttachmentChip.tsx b/packages/twenty-front/src/modules/file/components/AttachmentChip.tsxindex aac82647e1d..8230f8bf975 100644--- a/packages/twenty-front/src/modules/file/components/AttachmentChip.tsx+++ b/packages/twenty-front/src/modules/file/components/AttachmentChip.tsx@@ -1,8 +1,7 @@import { AvatarOrIcon } from '@/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon';import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconX } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { getFileType } from '@/activities/files/utils/getFileType';import { useFileCategoryColors } from '@/file/hooks/useFileCategoryColors';@@ -66,7 +65,7 @@ export const AttachmentChip = ({onRemove,readonly = false,}: AttachmentChipProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const iconColors = useFileCategoryColors();const handleChipClick = (event: React.MouseEvent) => {diff --git a/packages/twenty-front/src/modules/file/components/FileIcon.tsx b/packages/twenty-front/src/modules/file/components/FileIcon.tsxindex a6e36040edc..e62c85e63b5 100644--- a/packages/twenty-front/src/modules/file/components/FileIcon.tsx+++ b/packages/twenty-front/src/modules/file/components/FileIcon.tsx@@ -4,10 +4,10 @@ import { IconMapping } from '@/file/utils/fileIconMappings';import { AvatarOrIcon } from '@/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon';import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';-import { useContext, useState } from 'react';+import { useState } from 'react';import { FILE_CATEGORIES, type FileCategory } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type FileIconSize = 'small' | 'medium';@@ -48,7 +48,7 @@ export const FileIcon = ({size = 'medium',thumbnailUrl,}: FileIconProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const iconColors = useFileIconColors();const Icon = IconMapping[fileCategory];const [failedThumbnailUrl, setFailedThumbnailUrl] = useState<string>();diff --git a/packages/twenty-front/src/modules/file/hooks/useFileCategoryColors.ts b/packages/twenty-front/src/modules/file/hooks/useFileCategoryColors.tsindex e7b66980188..5b0864061b6 100644--- a/packages/twenty-front/src/modules/file/hooks/useFileCategoryColors.ts+++ b/packages/twenty-front/src/modules/file/hooks/useFileCategoryColors.ts@@ -1,15 +1,14 @@import { type AttachmentFileCategory } from '@/activities/files/types/AttachmentFileCategory';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';-import { useContext } from 'react';import { CoreObjectNameSingular } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';-import { type ThemeColor } from 'twenty-ui/theme';+import { useTheme, type ThemeColor } from 'twenty-ui/theme';+export const useFileCategoryColors = (): Record<AttachmentFileCategory,string> => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { objectMetadataItem } = useObjectMetadataItem({objectNameSingular: CoreObjectNameSingular.Attachment,diff --git a/packages/twenty-front/src/modules/file/hooks/useFileIconColors.ts b/packages/twenty-front/src/modules/file/hooks/useFileIconColors.tsindex e59eff996de..4d8374be1cc 100644--- a/packages/twenty-front/src/modules/file/hooks/useFileIconColors.ts+++ b/packages/twenty-front/src/modules/file/hooks/useFileIconColors.ts@@ -1,13 +1,12 @@import { type AttachmentFileCategory } from '@/activities/files/types/AttachmentFileCategory';-import { useContext } from 'react';import { type FileCategory } from 'twenty-shared/types';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const useFileIconColors = (): Record<AttachmentFileCategory | FileCategory,string> => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return {ARCHIVE: theme.color.gray,diff --git a/packages/twenty-front/src/modules/front-components/components/FrontComponentRenderer.tsx b/packages/twenty-front/src/modules/front-components/components/FrontComponentRenderer.tsxindex c4f1b4cacb6..9fb8eaf7f2e 100644--- a/packages/twenty-front/src/modules/front-components/components/FrontComponentRenderer.tsx+++ b/packages/twenty-front/src/modules/front-components/components/FrontComponentRenderer.tsx@@ -12,12 +12,12 @@ import { getSdkClientUrls } from '@/front-components/utils/getSdkClientUrls';import { useGetLogicFunctionHttpUrl } from '@/settings/logic-functions/hooks/useGetLogicFunctionHttpUrl';import { useQuery } from '@apollo/client/react';import { t } from '@lingui/core/macro';-import { type ReactNode, useCallback, useContext, useMemo } from 'react';+import { type ReactNode, useCallback, useMemo } from 'react';import { FrontComponentRenderer as SharedFrontComponentRenderer } from 'twenty-front-component-renderer';import { type FrontComponentToolCall } from 'twenty-sdk/front-component';import { isDefined } from 'twenty-shared/utils';import { useToast } from 'twenty-ui/components';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useThemeColorScheme } from 'twenty-ui/theme';import { REACT_APP_SERVER_BASE_URL } from '~/config';import {FindOneFrontComponentDocument,@@ -97,7 +97,7 @@ const FrontComponentRendererContent = ({toolCall,loadingFallback,}: FrontComponentRendererContentProps) => {- const { colorScheme } = useContext(ThemeContext);+ const colorScheme = useThemeColorScheme();const { enqueueToast } = useToast();const { functionsBaseUrl } = useGetLogicFunctionHttpUrl();diff --git a/packages/twenty-front/src/modules/front-components/components/FrontComponentSkeletonLoader.tsx b/packages/twenty-front/src/modules/front-components/components/FrontComponentSkeletonLoader.tsxindex edc76970d26..efce63dd81b 100644--- a/packages/twenty-front/src/modules/front-components/components/FrontComponentSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/front-components/components/FrontComponentSkeletonLoader.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const StyledContainer = styled.div`height: 100%;@@ -14,7 +13,7 @@ const StyledContainer = styled.div``;export const FrontComponentSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer>diff --git a/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaPermissionModal.tsx b/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaPermissionModal.tsxindex b6d3c74008f..9cb96afedd3 100644--- a/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaPermissionModal.tsx+++ b/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaPermissionModal.tsx@@ -11,7 +11,7 @@ import { PermissionFlagType } from 'twenty-shared/constants';import { isDefined } from 'twenty-shared/utils';import { MainButton } from 'twenty-ui/components';import { Dialog } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { GrantApplicationCapabilitiesDocument } from '~/generated-metadata/graphql';type FrontComponentMediaPermissionModalProps = {diff --git a/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaSessionIndicator.tsx b/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaSessionIndicator.tsxindex f5007a5bcc0..428ce2964a1 100644--- a/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaSessionIndicator.tsx+++ b/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaSessionIndicator.tsx@@ -6,7 +6,7 @@ import { t } from '@lingui/core/macro';import groupBy from 'lodash.groupby';import { isNonEmptyArray } from 'twenty-shared/utils';import { Popover } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTrigger = styled.button`align-items: center;diff --git a/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaSessionTooltipRow.tsx b/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaSessionTooltipRow.tsxindex 92a4deec177..2a7b6a3fc01 100644--- a/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaSessionTooltipRow.tsx+++ b/packages/twenty-front/src/modules/front-components/media-session/components/FrontComponentMediaSessionTooltipRow.tsx@@ -4,7 +4,7 @@ import { t } from '@lingui/core/macro';import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';import { IconMicrophone, IconVideo } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';type FrontComponentMediaSessionTooltipRowProps = {sessions: FrontComponentMediaSessionStatus[];diff --git a/packages/twenty-front/src/modules/information-banner/components/InformationBanner.tsx b/packages/twenty-front/src/modules/information-banner/components/InformationBanner.tsxindex 7518c8a45da..edf966f939d 100644--- a/packages/twenty-front/src/modules/information-banner/components/InformationBanner.tsx+++ b/packages/twenty-front/src/modules/information-banner/components/InformationBanner.tsx@@ -15,7 +15,7 @@ import {type BannerVariant,} from 'twenty-ui/primitives/feedback';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledText = styled.div`min-width: 0;diff --git a/packages/twenty-front/src/modules/keyboard-shortcut-menu/components/KeyboardShortcutMenuStyles.tsx b/packages/twenty-front/src/modules/keyboard-shortcut-menu/components/KeyboardShortcutMenuStyles.tsxindex 91a88f5c11c..96cb4a45725 100644--- a/packages/twenty-front/src/modules/keyboard-shortcut-menu/components/KeyboardShortcutMenuStyles.tsx+++ b/packages/twenty-front/src/modules/keyboard-shortcut-menu/components/KeyboardShortcutMenuStyles.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledDialog = styled.div<{ isMobile: boolean }>`background: ${themeCssVariables.background.primary};diff --git a/packages/twenty-front/src/modules/layout-customization/components/LayoutCustomizationBar.tsx b/packages/twenty-front/src/modules/layout-customization/components/LayoutCustomizationBar.tsxindex 003ade031ce..3155669644e 100644--- a/packages/twenty-front/src/modules/layout-customization/components/LayoutCustomizationBar.tsx+++ b/packages/twenty-front/src/modules/layout-customization/components/LayoutCustomizationBar.tsx@@ -2,11 +2,9 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { AnimatePresence, motion } from 'framer-motion';import { useAtomValue } from 'jotai';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconCheck, IconPaint } from 'twenty-ui/icon';-import { GRAY_SCALE_LIGHT } from 'twenty-ui/theme';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { GRAY_SCALE_LIGHT, useTheme, themeCssVariables } from 'twenty-ui/theme';import { LayoutCustomizationBarMenuDropdown } from '@/layout-customization/components/LayoutCustomizationBarMenuDropdown';import { LayoutCustomizationBarResetConfirmationModal } from '@/layout-customization/components/LayoutCustomizationBarResetConfirmationModal';@@ -74,7 +72,7 @@ const StyledRightSection = styled.div``;const LayoutCustomizationBarContent = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { save, isSaving } = useSaveLayoutCustomization();diff --git a/packages/twenty-front/src/modules/layout-customization/components/LayoutCustomizationBarMenuDropdown.tsx b/packages/twenty-front/src/modules/layout-customization/components/LayoutCustomizationBarMenuDropdown.tsxindex 1f4593f100e..3383d457b78 100644--- a/packages/twenty-front/src/modules/layout-customization/components/LayoutCustomizationBarMenuDropdown.tsx+++ b/packages/twenty-front/src/modules/layout-customization/components/LayoutCustomizationBarMenuDropdown.tsx@@ -6,8 +6,7 @@ import { DropdownRoot } from '@/ui/layout/dropdown/components/DropdownRoot';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';import { Dropdown, LightIconButton } from 'twenty-ui/components';-import { GRAY_SCALE_LIGHT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { GRAY_SCALE_LIGHT, themeCssVariables } from 'twenty-ui/theme';import { RESET_RECORD_PAGE_LAYOUT_MODAL_ID } from '@/layout-customization/constants/ResetRecordPageLayoutModalId';import { useDialog } from '@/ui/layout/dialog/hooks/useDialog';diff --git a/packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsx b/packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsxindex 9ce227a84d3..e74f378ccd4 100644--- a/packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsx+++ b/packages/twenty-front/src/modules/marketplace/components/SettingsApplicationInstallPermissionValidationModal.tsx@@ -14,7 +14,7 @@ import { useMemo } from 'react';import { type RoleManifest } from 'twenty-shared/application';import { LightButton } from 'twenty-ui/components';import { IconChevronLeft } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsApplicationInstallPermissionValidationModalProps = {modalInstanceId: string;diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/components/NavigationMenuItemIcon.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/components/NavigationMenuItemIcon.tsxindex 20c023cb512..1f9c1f27f8c 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/components/NavigationMenuItemIcon.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/components/NavigationMenuItemIcon.tsx@@ -6,7 +6,7 @@ import { isDefined } from 'twenty-shared/utils';import { getIconTileColorShades } from 'twenty-ui/components';import { IconLink, IconPerspective, IconWorld, useIcons } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {FeatureFlagKey,type NavigationMenuItem,diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/components/NavigationMenuItemIconWithOverlay.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/components/NavigationMenuItemIconWithOverlay.tsxindex 979486fa3ee..3882f8a2f4a 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/components/NavigationMenuItemIconWithOverlay.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/components/NavigationMenuItemIconWithOverlay.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';-import { useContext, type ReactNode } from 'react';+import { type ReactNode } from 'react';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledCompositeContainer = styled.div`align-items: center;@@ -37,7 +37,7 @@ export const NavigationMenuItemIconWithOverlay = ({children,OverlayIcon,}: NavigationMenuItemIconWithOverlayProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledCompositeContainer>diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/components/NavigationItemDropTarget.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/components/NavigationItemDropTarget.tsxindex 0d792d1900f..4d88833de2d 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/components/NavigationItemDropTarget.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/components/NavigationItemDropTarget.tsx@@ -2,7 +2,7 @@ import { type NavigationDrawerSubItemState } from '@/ui/navigation/navigation-drimport { NavigationMenuItemInsertionPreview } from '@/navigation-menu-item/edit/components/NavigationMenuItemInsertionPreview';import { styled } from '@linaria/react';import { type ReactNode, useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type NavigationSections } from '@/navigation-menu-item/common/constants/NavigationSections.constants';import { NavigationDropTargetContext } from '@/navigation-menu-item/common/contexts/NavigationDropTargetContext';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/components/NavigationMenuItemDroppableSlot.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/components/NavigationMenuItemDroppableSlot.tsxindex f986b5d8437..c00b299f294 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/components/NavigationMenuItemDroppableSlot.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/components/NavigationMenuItemDroppableSlot.tsx@@ -2,7 +2,7 @@ import { pointerIntersection } from '@dnd-kit/collision';import { useDroppable } from '@dnd-kit/react';import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import type { DroppableData } from '@/navigation-menu-item/common/types/navigationMenuItemDndKitDroppableData';import { getDndKitDropTargetId } from '@/navigation-menu-item/common/utils/getDndKitDropTargetId';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderChevron.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderChevron.tsxindex 0968f4a1b90..f7a93dcccff 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderChevron.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderChevron.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { IconChevronRight } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledContainer = styled.span<{ isOpen: boolean }>`display: inline-flex;diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderChevronButton.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderChevronButton.tsxindex eb48c401f3e..13f92cd90b8 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderChevronButton.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderChevronButton.tsx@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';import type React from 'react';import { LightIconButton } from 'twenty-ui/components';import { IconChevronRight } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';// Rotating a wrapper around the button keeps the icon component identity// stable: passing an inline component to LightIconButton's Icon prop remountsdiff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderDnd.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderDnd.tsxindex 07b04173348..bed98d8a467 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderDnd.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/folder/components/NavigationMenuItemFolderDnd.tsx@@ -12,7 +12,7 @@ import { createPortal } from 'react-dom';import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconHeartOff, IconPlus, useIcons } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';import { type NavigationMenuItem } from '~/generated-metadata/graphql';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/link/components/LinkIconWithLinkOverlay.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/link/components/LinkIconWithLinkOverlay.tsxindex 31766b4655a..51f62d75576 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/link/components/LinkIconWithLinkOverlay.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/link/components/LinkIconWithLinkOverlay.tsx@@ -1,9 +1,9 @@import { ColoredIcon } from '@/ui/icon/components/ColoredIcon';import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { getLinkFaviconUrl, isDefined } from 'twenty-shared/utils';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { DEFAULT_NAVIGATION_MENU_ITEM_COLOR_LINK } from '@/navigation-menu-item/common/constants/NavigationMenuItemDefaultColorLink';@@ -54,7 +54,7 @@ export const LinkIconWithLinkOverlay = ({DefaultIcon,color: navItemColor,}: LinkIconWithLinkOverlayProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [localFailedLink, setLocalFailedLink] = useState<string | null>(null);const faviconUrl = getLinkFaviconUrl(link);const linkKey = link ?? '';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/link/components/NavigationMenuItemLinkDisplay.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/link/components/NavigationMenuItemLinkDisplay.tsxindex 800dcdc7b0a..6a4d07917ca 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/link/components/NavigationMenuItemLinkDisplay.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/link/components/NavigationMenuItemLinkDisplay.tsx@@ -1,6 +1,5 @@-import { useContext } from 'react';import { IconArrowUpRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { isLayoutCustomizationModeEnabledState } from '@/layout-customization/states/isLayoutCustomizationModeEnabledState';import { NavigationMenuItemIcon } from '@/navigation-menu-item/display/components/NavigationMenuItemIcon';@@ -21,7 +20,7 @@ export const NavigationMenuItemLinkDisplay = ({const isLayoutCustomizationModeEnabled = useAtomStateValue(isLayoutCustomizationModeEnabledState,);- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const label = getLinkNavigationMenuItemLabel(item);const computedLink = getLinkNavigationMenuItemComputedLink(item);diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/object/components/NavigationDrawerItemForObjectMetadataItem.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/object/components/NavigationDrawerItemForObjectMetadataItem.tsxindex c4a8f0615bb..3f7578785b3 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/object/components/NavigationDrawerItemForObjectMetadataItem.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/object/components/NavigationDrawerItemForObjectMetadataItem.tsx@@ -1,6 +1,6 @@import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';-import { Fragment, type ReactNode, useContext } from 'react';+import { Fragment, type ReactNode } from 'react';import { isLayoutCustomizationModeEnabledState } from '@/layout-customization/states/isLayoutCustomizationModeEnabledState';import { lastClickedNavigationMenuItemIdState } from '@/navigation-menu-item/common/states/lastClickedNavigationMenuItemIdState';@@ -31,7 +31,7 @@ import {import { isDefined } from 'twenty-shared/utils';import { Avatar } from 'twenty-ui/primitives/data-display';import { IconLock, useIcons } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type NavigationMenuItem } from '~/generated-metadata/graphql';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';@@ -58,7 +58,7 @@ export const NavigationDrawerItemForObjectMetadataItem = ({isLayoutCustomizationModeEnabledState,);const { objectPermissionsByObjectMetadataId } = useObjectPermissions();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const lastVisitedViewPerObjectMetadataItem = useAtomStateValue(lastVisitedViewPerObjectMetadataItemState,);diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/favorites/components/FavoritesSection.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/favorites/components/FavoritesSection.tsxindex fa7fe80f00d..9b11777f855 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/favorites/components/FavoritesSection.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/favorites/components/FavoritesSection.tsx@@ -4,7 +4,7 @@ import { useLingui } from '@lingui/react/macro';import { useCallback, useContext, useMemo } from 'react';import { LightIconButton } from 'twenty-ui/components';import { IconHeartOff, IconPlus } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type NavigationMenuItem } from '~/generated-metadata/graphql';import { NavigationMenuItemDroppableIds } from '@/navigation-menu-item/common/constants/NavigationMenuItemDroppableIds';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSection.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSection.tsxindex 75a7b3ee06a..87af7bc48f9 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSection.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSection.tsx@@ -6,7 +6,7 @@ import { useNavigate } from 'react-router-dom';import { NavigationMenuItemType } from 'twenty-shared/types';import { LightIconButton } from 'twenty-ui/components';import { IconPlus, IconTool } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';import { useEnterLayoutCustomizationMode } from '@/layout-customization/hooks/useEnterLayoutCustomizationMode';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionContainer.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionContainer.tsxindex 83c6fd7d36c..cfccf483746 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionContainer.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionContainer.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import React, { lazy, Suspense } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type NavigationMenuItem } from '~/generated-metadata/graphql';import { isLayoutCustomizationModeEnabledState } from '@/layout-customization/states/isLayoutCustomizationModeEnabledState';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListDndKit.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListDndKit.tsxindex 640eff7f4fe..757afce5d79 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListDndKit.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListDndKit.tsx@@ -10,7 +10,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { styled } from '@linaria/react';import { useContext } from 'react';import { NavigationMenuItemType } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { NavigationMenuItemDragContext } from '@/navigation-menu-item/common/contexts/NavigationMenuItemDragContext';import { NavigationMenuItemDisplay } from '@/navigation-menu-item/display/components/NavigationMenuItemDisplay';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListReadOnly.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListReadOnly.tsxindex 14a4f4af7e6..6fd471504d8 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListReadOnly.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListReadOnly.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import type { NavigationMenuItem } from '~/generated-metadata/graphql';import { NavigationMenuItemType } from 'twenty-shared/types';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemBackButton.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemBackButton.tsxindex 823732644e8..e36820679d7 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemBackButton.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemBackButton.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconX } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { currentNavigationMenuItemFolderIdState } from '@/navigation-menu-item/common/states/currentNavigationMenuItemFolderIdState';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';@@ -36,7 +35,7 @@ type NavigationMenuItemBackButtonProps = {export const NavigationMenuItemBackButton = ({folderName,}: NavigationMenuItemBackButtonProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const setCurrentNavigationMenuItemFolderId = useSetAtomState(currentNavigationMenuItemFolderIdState,);diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemEditable.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemEditable.tsxindex 7c43ffcfa2f..26b75c7270a 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemEditable.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemEditable.tsx@@ -11,7 +11,7 @@ import { useCallback, useState, type ReactNode } from 'react';import { styled } from '@linaria/react';import { NavigationMenuItemType } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';import { type NavigationMenuItem } from '~/generated-metadata/graphql';import { NavigationMenuItemMenu } from '@/navigation-menu-item/edit/components/NavigationMenuItemMenu';import { LegacyDropdownContent } from '@/ui/layout/dropdown/components/LegacyDropdownContent';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemEntrance.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemEntrance.tsxindex 82a6a4f183e..299d857d2ff 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemEntrance.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemEntrance.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { motion, useReducedMotion } from 'framer-motion';-import { type ReactNode, useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { type ReactNode } from 'react';+import { useTheme } from 'twenty-ui/theme';const StyledContainer = styled.div`overflow: hidden;@@ -16,7 +16,7 @@ type NavigationMenuItemEntranceProps = {export const NavigationMenuItemEntrance = ({children,}: NavigationMenuItemEntranceProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const shouldReduceMotion = useReducedMotion();return (diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemInlineEditor.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemInlineEditor.tsxindex 605f47344e4..7c982d8efda 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemInlineEditor.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemInlineEditor.tsx@@ -8,7 +8,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { NavigationMenuItemType } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { parseThemeColor } from 'twenty-ui/utilities';import { type NavigationMenuItem } from '~/generated-metadata/graphql';import { TextInput } from '@/ui/field/input/components/TextInput';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemInsertionPreview.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemInsertionPreview.tsxindex ad40df5cd6d..8c1f2280a60 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemInsertionPreview.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemInsertionPreview.tsx@@ -10,7 +10,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useIcons } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type NavigationMenuItemInsertionPreviewProps = {folderId: string | null;diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemLinkEditor.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemLinkEditor.tsxindex 51e0e01fef1..eeb96ac0854 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemLinkEditor.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemLinkEditor.tsx@@ -2,7 +2,7 @@ import { useState } from 'react';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { ensureAbsoluteUrl, isDefined, isValidUrl } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type NavigationMenuItem } from '~/generated-metadata/graphql';import { DoubleTextInput } from '@/ui/field/input/components/DoubleTextInput';import { useNavigationMenuItemEditController } from '@/navigation-menu-item/edit/hooks/useNavigationMenuItemEditController';diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemRowActions.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemRowActions.tsxindex 93072c6fc0d..0e36d52e2f5 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemRowActions.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemRowActions.tsx@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';import { type ReactNode } from 'react';import { LightIconButton } from 'twenty-ui/components';import { IconDotsVertical } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledActions = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemTypeTooltip.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemTypeTooltip.tsxindex 8d54c199168..5cbc5d3f062 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemTypeTooltip.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemTypeTooltip.tsx@@ -12,7 +12,7 @@ import {type IconComponent,} from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type NavigationMenuItemTypeTooltipProps = {type: NavigationMenuItemType;diff --git a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerModeSwitcher.tsx b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerModeSwitcher.tsxindex d2191c08048..64f5c068127 100644--- a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerModeSwitcher.tsx+++ b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerModeSwitcher.tsx@@ -2,9 +2,8 @@ import { NAVIGATION_DRAWER_COLLAPSED_BUTTON_SIZE } from '@/ui/navigation/navigatimport { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { motion, useReducedMotion } from 'framer-motion';-import { useContext } from 'react';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { isLayoutCustomizationModeEnabledState } from '@/layout-customization/states/isLayoutCustomizationModeEnabledState';import { useActiveNavigationDrawerMode } from '@/navigation/hooks/useActiveNavigationDrawerMode';@@ -113,7 +112,7 @@ const StyledModeLabel = motion.create(StyledModeLabelBase);export const MainNavigationDrawerModeSwitcher = () => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isLayoutCustomizationModeEnabled = useAtomStateValue(isLayoutCustomizationModeEnabledState,diff --git a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerScrollableItems.tsx b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerScrollableItems.tsxindex f0e747de3db..b3b14a338ae 100644--- a/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerScrollableItems.tsx+++ b/packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerScrollableItems.tsx@@ -4,7 +4,7 @@ import { NavigationDrawerWorkspaceSectionSkeletonLoader } from '@/object-metadatimport { styled } from '@linaria/react';import { lazy, Suspense } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const FavoritesSectionDispatcher = lazy(() =>import('@/navigation-menu-item/display/sections/favorites/components/FavoritesSectionDispatcher').then(diff --git a/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawerContent.tsx b/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawerContent.tsxindex 22fe846eb1b..06cfea464b4 100644--- a/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawerContent.tsx+++ b/packages/twenty-front/src/modules/navigation/components/SettingsNavigationDrawerContent.tsx@@ -9,7 +9,7 @@ import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { css } from '@linaria/core';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';const StyledAdvancedSwitchFixedContent = styled.div<{ isMobile: boolean }>`diff --git a/packages/twenty-front/src/modules/navigation/constants/MobileNavigationBarHeight.ts b/packages/twenty-front/src/modules/navigation/constants/MobileNavigationBarHeight.tsindex 5444e9eebfb..baa6e75d44b 100644--- a/packages/twenty-front/src/modules/navigation/constants/MobileNavigationBarHeight.ts+++ b/packages/twenty-front/src/modules/navigation/constants/MobileNavigationBarHeight.ts@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';// NavigationBar builds its row out of the item height plus its own padding and// border, so the height has to be rebuilt from the same tokens here.diff --git a/packages/twenty-front/src/modules/navigation/constants/MobileNavigationBarPadding.ts b/packages/twenty-front/src/modules/navigation/constants/MobileNavigationBarPadding.tsindex 3613c20a4ae..8b763a69fbc 100644--- a/packages/twenty-front/src/modules/navigation/constants/MobileNavigationBarPadding.ts+++ b/packages/twenty-front/src/modules/navigation/constants/MobileNavigationBarPadding.ts@@ -1,3 +1,3 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const MOBILE_NAVIGATION_BAR_PADDING = themeCssVariables.spacing[3];diff --git a/packages/twenty-front/src/modules/object-core/components/CoreObjectTableAddNewRow.tsx b/packages/twenty-front/src/modules/object-core/components/CoreObjectTableAddNewRow.tsxindex 2eff2eafd9b..a549276f863 100644--- a/packages/twenty-front/src/modules/object-core/components/CoreObjectTableAddNewRow.tsx+++ b/packages/twenty-front/src/modules/object-core/components/CoreObjectTableAddNewRow.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { IconPlus } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledAddNewRow = styled.button`align-items: center;diff --git a/packages/twenty-front/src/modules/object-core/components/CoreObjectTableRow.tsx b/packages/twenty-front/src/modules/object-core/components/CoreObjectTableRow.tsxindex 5317e41d99d..7faef4709d2 100644--- a/packages/twenty-front/src/modules/object-core/components/CoreObjectTableRow.tsx+++ b/packages/twenty-front/src/modules/object-core/components/CoreObjectTableRow.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { TableBody } from '@/ui/layout/table/components/TableBody';import { TableRow } from '@/ui/layout/table/components/TableRow';diff --git a/packages/twenty-front/src/modules/object-core/components/cells/CoreObjectNameCell.tsx b/packages/twenty-front/src/modules/object-core/components/cells/CoreObjectNameCell.tsxindex 721343432a1..65f54857a75 100644--- a/packages/twenty-front/src/modules/object-core/components/cells/CoreObjectNameCell.tsx+++ b/packages/twenty-front/src/modules/object-core/components/cells/CoreObjectNameCell.tsx@@ -4,8 +4,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { TintedIconTile } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { type IconComponent } from 'twenty-ui/icon';-import { type ThemeColor } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { type ThemeColor, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowFilterColumn.tsx b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowFilterColumn.tsxindex a98e6acf4df..279078387c2 100644--- a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowFilterColumn.tsx+++ b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowFilterColumn.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useContext } from 'react';import { type StepFilter, type StepFilterGroup } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { CoreWorkflowFilterFieldSelect } from '@/object-core/workflows/components/CoreWorkflowFilterFieldSelect';import { CoreWorkflowFilterValueInput } from '@/object-core/workflows/components/CoreWorkflowFilterValueInput';diff --git a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowFiltersBuilder.tsx b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowFiltersBuilder.tsxindex 1d1103772ca..a29a3849654 100644--- a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowFiltersBuilder.tsx+++ b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowFiltersBuilder.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { type StepFilter } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { CoreWorkflowFilterAddRuleButton } from '@/object-core/workflows/components/CoreWorkflowFilterAddRuleButton';import { CoreWorkflowFilterColumn } from '@/object-core/workflows/components/CoreWorkflowFilterColumn';diff --git a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowShowToolbar.tsx b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowShowToolbar.tsxindex 1c728e3a6f0..2625dbfac59 100644--- a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowShowToolbar.tsx+++ b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowShowToolbar.tsx@@ -3,7 +3,7 @@ import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { IconRefresh } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { Select } from '@/ui/input/components/Select';import { CoreWorkflowVisibilitySelect } from '@/object-core/workflows/components/CoreWorkflowVisibilitySelect';diff --git a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowsFilterBar.tsx b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowsFilterBar.tsxindex cb4aa9af366..7f65ac30eba 100644--- a/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowsFilterBar.tsx+++ b/packages/twenty-front/src/modules/object-core/workflows/components/CoreWorkflowsFilterBar.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconFilter } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { findCoreWorkflowFilterField } from '@/object-core/workflows/utils/findCoreWorkflowFilterField';import { useOpenCoreWorkflowFiltersSidePanel } from '@/object-core/workflows/hooks/useOpenCoreWorkflowFiltersSidePanel';diff --git a/packages/twenty-front/src/modules/object-core/workflows/components/SidePanelCoreWorkflowFiltersPage.tsx b/packages/twenty-front/src/modules/object-core/workflows/components/SidePanelCoreWorkflowFiltersPage.tsxindex 538ab317b07..8587aa2205a 100644--- a/packages/twenty-front/src/modules/object-core/workflows/components/SidePanelCoreWorkflowFiltersPage.tsx+++ b/packages/twenty-front/src/modules/object-core/workflows/components/SidePanelCoreWorkflowFiltersPage.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { CoreWorkflowFiltersBuilder } from '@/object-core/workflows/components/CoreWorkflowFiltersBuilder';import {diff --git a/packages/twenty-front/src/modules/object-core/workflows/versions/components/CoreWorkflowVersionsListItem.tsx b/packages/twenty-front/src/modules/object-core/workflows/versions/components/CoreWorkflowVersionsListItem.tsxindex 5ac1b41730c..df9ff8a6b36 100644--- a/packages/twenty-front/src/modules/object-core/workflows/versions/components/CoreWorkflowVersionsListItem.tsx+++ b/packages/twenty-front/src/modules/object-core/workflows/versions/components/CoreWorkflowVersionsListItem.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { Tag } from 'twenty-ui/primitives/data-display';import { CORE_WORKFLOW_VERSION_STATUS_TAG_PROPS } from '@/object-core/workflows/versions/constants/CoreWorkflowVersionStatusTagProps';diff --git a/packages/twenty-front/src/modules/object-core/workflows/versions/components/SidePanelCoreWorkflowVersionPage.tsx b/packages/twenty-front/src/modules/object-core/workflows/versions/components/SidePanelCoreWorkflowVersionPage.tsxindex 029d65493fa..d782f2297d7 100644--- a/packages/twenty-front/src/modules/object-core/workflows/versions/components/SidePanelCoreWorkflowVersionPage.tsx+++ b/packages/twenty-front/src/modules/object-core/workflows/versions/components/SidePanelCoreWorkflowVersionPage.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { Tag } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { CoreWorkflowVersionCard } from '@/object-core/workflows/versions/components/CoreWorkflowVersionCard';import { CoreWorkflowVersionRestoreButton } from '@/object-core/workflows/versions/components/CoreWorkflowVersionRestoreButton';diff --git a/packages/twenty-front/src/modules/object-core/workflows/versions/components/SidePanelCoreWorkflowVersionsPage.tsx b/packages/twenty-front/src/modules/object-core/workflows/versions/components/SidePanelCoreWorkflowVersionsPage.tsxindex 7bbfd556c08..7caada595f8 100644--- a/packages/twenty-front/src/modules/object-core/workflows/versions/components/SidePanelCoreWorkflowVersionsPage.tsx+++ b/packages/twenty-front/src/modules/object-core/workflows/versions/components/SidePanelCoreWorkflowVersionsPage.tsx@@ -8,7 +8,7 @@ import { useSidePanelWorkflowIdOrThrow } from '@/side-panel/pages/workflow/hooksimport { SidePanelGroup } from '@/side-panel/components/SidePanelGroup';import { SidePanelList } from '@/side-panel/components/SidePanelList';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledError = styled.div`color: ${themeCssVariables.font.color.secondary};diff --git a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerWorkspaceSectionSkeletonLoader.tsx b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerWorkspaceSectionSkeletonLoader.tsxindex ebea93c13c3..929d3c2b89c 100644--- a/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerWorkspaceSectionSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/object-metadata/components/NavigationDrawerWorkspaceSectionSkeletonLoader.tsx@@ -3,7 +3,7 @@ import { NavigationDrawerSection } from '@/ui/navigation/navigation-drawer/compoimport { css } from '@linaria/core';import { styled } from '@linaria/react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTitleSkeleton = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-metadata/components/WorkspaceSectionListEditModeFallback.tsx b/packages/twenty-front/src/modules/object-metadata/components/WorkspaceSectionListEditModeFallback.tsxindex efedde575a1..7419284e214 100644--- a/packages/twenty-front/src/modules/object-metadata/components/WorkspaceSectionListEditModeFallback.tsx+++ b/packages/twenty-front/src/modules/object-metadata/components/WorkspaceSectionListEditModeFallback.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { WorkspaceSectionListReadOnly } from '@/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionListReadOnly';import { WorkspaceSectionAddMenuItemButton } from '@/navigation-menu-item/edit/components/WorkspaceSectionAddMenuItemButton';import type { NavigationMenuItemSectionListDndKitProps } from '@/navigation-menu-item/display/sections/types/NavigationMenuItemSectionListDndKitProps';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFallback = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-metadata/utils/getIconColorForObjectType.ts b/packages/twenty-front/src/modules/object-metadata/utils/getIconColorForObjectType.tsindex 2d11cb5c0c9..f8fc20c7525 100644--- a/packages/twenty-front/src/modules/object-metadata/utils/getIconColorForObjectType.ts+++ b/packages/twenty-front/src/modules/object-metadata/utils/getIconColorForObjectType.ts@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const getIconColorForObjectType = (objectType: string): string => {switch (objectType) {diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterDropdownRow.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterDropdownRow.tsxindex 84f469596be..aa2c48e1597 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterDropdownRow.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterDropdownRow.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRow = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectSearchInput.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectSearchInput.tsxindex b1064edfbe6..6a5c2eb8de3 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectSearchInput.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectSearchInput.tsx@@ -2,7 +2,7 @@ import { objectFilterDropdownSearchInputComponentState } from '@/object-record/oimport { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledInput = styled.input`background: transparent;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterLogicalOperatorCell.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterLogicalOperatorCell.tsxindex fb8db210e72..8fa8100c080 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterLogicalOperatorCell.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterLogicalOperatorCell.tsx@@ -4,7 +4,7 @@ import { type RecordFilterGroup } from '@/object-record/record-filter-group/typeimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { capitalize } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledText = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterGroupChildren.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterGroupChildren.tsxindex 88ff98c01c3..9703aad2e38 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterGroupChildren.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterGroupChildren.tsx@@ -4,7 +4,7 @@ import { AdvancedFilterRecordFilterRow } from '@/object-record/advanced-filter/cimport { useChildRecordFiltersAndRecordFilterGroups } from '@/object-record/advanced-filter/hooks/useChildRecordFiltersAndRecordFilterGroups';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ isGrayBackground?: boolean }>`align-items: start;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRootRecordFilterGroup.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRootRecordFilterGroup.tsxindex 270f6e6b0db..1c2fc862164 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRootRecordFilterGroup.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRootRecordFilterGroup.tsx@@ -14,7 +14,7 @@ import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: start;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterValueInputDropdownButtonClickableSelect.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterValueInputDropdownButtonClickableSelect.tsxindex f65735041a2..e328ee1196d 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterValueInputDropdownButtonClickableSelect.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterValueInputDropdownButtonClickableSelect.tsx@@ -12,7 +12,7 @@ import { useFieldMetadataItemById } from '@/object-metadata/hooks/useFieldMetadaimport { useGetRecordFilterDisplayValue } from '@/object-record/record-filter/hooks/useGetRecordFilterDisplayValue';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';// TODO: factorize this with https://github.com/twentyhq/core-team-issues/issues/752const StyledControlContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelColumn.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelColumn.tsxindex cef1b4b74ec..ebf914e113b 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelColumn.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledColumn = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelContainer.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelContainer.tsxindex ebe46d9853f..1f8de832e1f 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelContainer.tsx@@ -11,7 +11,7 @@ import { type VariablePickerComponent } from '@/object-record/record-field/ui/foimport { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: start;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelLogicalOperatorCell.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelLogicalOperatorCell.tsxindex 666d22db859..f9e62a1cc68 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelLogicalOperatorCell.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelLogicalOperatorCell.tsx@@ -10,7 +10,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';import { capitalize } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledText = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterColumn.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterColumn.tsxindex eaf399507b8..15bd613172d 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterColumn.tsx@@ -13,7 +13,7 @@ import { type RecordFilterGroup } from '@/object-record/record-filter-group/typeimport { type RecordFilter } from '@/object-record/record-filter/types/RecordFilter';import { styled } from '@linaria/react';import { useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterGroupChildren.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterGroupChildren.tsxindex 0a5bb48c3e8..869a9b7f745 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterGroupChildren.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterGroupChildren.tsx@@ -6,7 +6,7 @@ import { AdvancedFilterContext } from '@/object-record/advanced-filter/states/coimport { styled } from '@linaria/react';import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ isGrayBackground?: boolean }>`align-items: start;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterGroupColumn.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterGroupColumn.tsxindex fdf3243a911..069c1fc2b0f 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterGroupColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterGroupColumn.tsx@@ -7,7 +7,7 @@ import { type RecordFilterGroup } from '@/object-record/record-filter-group/typeimport { styled } from '@linaria/react';import { useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownBooleanSelect.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownBooleanSelect.tsxindex 5d7184f6883..64a4e94e0ca 100644--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownBooleanSelect.tsx+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownBooleanSelect.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useApplyObjectFilterDropdownFilterValue } from '@/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownFilterValue';import { useObjectFilterDropdownFilterValue } from '@/object-record/object-filter-dropdown/hooks/useObjectFilterDropdownFilterValue';@@ -39,7 +38,7 @@ export const ObjectFilterDropdownBooleanSelect = () => {useAvailableComponentInstanceIdOrThrow(ObjectFilterDropdownComponentInstanceContext,);- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const options = [true, false];const { objectFilterDropdownFilterValue } =diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRatingInput.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRatingInput.tsxindex 841e78a8a4d..b4fff964241 100644--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRatingInput.tsx+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRatingInput.tsx@@ -5,7 +5,7 @@ import { styled } from '@linaria/react';import { RATING_VALUES } from 'twenty-shared/constants';import { type FieldRatingValue } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRatingInputContainer = styled.div`padding: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuViewName.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuViewName.tsxindex a370c506a67..889a9fdb062 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuViewName.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuViewName.tsx@@ -13,11 +13,11 @@ import { viewPickerIsDirtyComponentState } from '@/views/view-picker/states/viewimport { viewPickerIsPersistingComponentState } from '@/views/view-picker/states/viewPickerIsPersistingComponentState';import { viewPickerSelectedIconComponentState } from '@/views/view-picker/states/viewPickerSelectedIconComponentState';import { styled } from '@linaria/react';-import { useContext, useEffect, useRef, useState } from 'react';+import { useEffect, useRef, useState } from 'react';import { Key } from 'ts-key-enum';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';const StyledDropdownMenuIconAndNameContainer = styled.div`@@ -60,7 +60,7 @@ type ObjectOptionsDropdownMenuViewNameProps = {export const ObjectOptionsDropdownMenuViewName = ({currentView,}: ObjectOptionsDropdownMenuViewNameProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [viewPickerSelectedIcon, setViewPickerSelectedIcon] =useAtomComponentState(viewPickerSelectedIconComponentState);diff --git a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsx b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsxindex 2dd55890071..6fefb365f65 100644--- a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useContext, useRef } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { RecordBoardColumnWidthEffect } from '@/object-record/record-board/components/RecordBoardColumnWidthEffect';import { RecordBoardColumns } from '@/object-record/record-board/components/RecordBoardColumns';diff --git a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardAddGroupColumn.tsx b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardAddGroupColumn.tsxindex 8980869543b..acf6c2ee5f4 100644--- a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardAddGroupColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardAddGroupColumn.tsx@@ -6,7 +6,7 @@ import { canAddRecordGroupForFieldMetadataItem } from '@/object-record/record-grimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const RECORD_BOARD_ADD_GROUP_DROPDOWN_ID = 'record-board-add-group-dropdown';diff --git a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardColumns.tsx b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardColumns.tsxindex 760f944ba72..aeb494c9232 100644--- a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardColumns.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardColumns.tsx@@ -6,7 +6,7 @@ import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/import { ViewType } from '@/views/types/ViewType';import { styled } from '@linaria/react';import { useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledColumnContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsxindex 5a5c32a0760..e57c310a002 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsx@@ -36,7 +36,7 @@ import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';import { styled } from '@linaria/react';import { useContext } from 'react';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';const StyledCardContainer = styled.div<{ isPrimaryMultiDrag?: boolean }>`diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardHeader.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardHeader.tsxindex 97fb434bcb6..f96af408605 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardHeader.tsx@@ -24,7 +24,7 @@ import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconEye, IconEyeOff } from 'twenty-ui/icon';import { Checkbox } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile, useIsTouchDevice } from 'twenty-ui/utilities';const StyledCompactIconContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumn.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumn.tsxindex 7842f8891bd..2d427b741a8 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumn.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { RECORD_BOARD_COLUMN_WIDTH } from '@/object-record/record-board/constants/RecordBoardColumnWidth';import { RECORD_BOARD_COLUMN_WIDTH_CSS_VARIABLE_NAME } from '@/object-record/record-board/constants/RecordBoardColumnWidthCssVariableName';diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnCardContainerSkeletonLoader.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnCardContainerSkeletonLoader.tsxindex fff4fbb5f75..282414049e6 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnCardContainerSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnCardContainerSkeletonLoader.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { RecordCardBodyContainer } from '@/object-record/record-card/components/RecordCardBodyContainer';@@ -36,7 +35,7 @@ const StyledStaticCellSkeleton = styled.div<{ width: number; height: number }>``;export const RecordBoardColumnCardContainerSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { currentView } = useGetCurrentViewOnly();const isCompactModeActive = currentView?.isCompact ?? false;diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnCardsContainer.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnCardsContainer.tsxindex f3b90b1f5ce..e1627f08134 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnCardsContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnCardsContainer.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { Fragment } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { RecordBoardColumnNewRecordButton } from '@/object-record/record-board/record-board-column/components/RecordBoardColumnNewRecordButton';import { RecordBoardColumnLoadingSkeletonCards } from '@/object-record/record-board/record-board-column/components/RecordBoardColumnLoadingSkeletonCards';diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeader.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeader.tsxindex 7ab5a0d8f22..a9227b865b2 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeader.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getFieldMetadataItemGqlFieldName } from '@/object-metadata/utils/getFieldMetadataItemGqlFieldName';import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPermissionsForObject';diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnLoadingSkeletonCards.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnLoadingSkeletonCards.tsxindex 3b04df05b5b..d5f974b1202 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnLoadingSkeletonCards.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnLoadingSkeletonCards.tsx@@ -1,7 +1,7 @@import { RECORD_BOARD_QUERY_PAGE_SIZE } from '@/object-record/record-board/constants/RecordBoardQueryPageSize';import { RecordBoardColumnCardContainerSkeletonLoader } from '@/object-record/record-board/record-board-column/components/RecordBoardColumnCardContainerSkeletonLoader';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSkeletonCardContainer = styled.div`background-color: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnNewRecordButton.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnNewRecordButton.tsxindex dbb41bc01c4..60bcb47e163 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnNewRecordButton.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnNewRecordButton.tsx@@ -14,7 +14,7 @@ import { t } from '@lingui/core/macro';import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconPlus } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledNewButton = styled.button`align-items: center;@@ -34,7 +34,7 @@ const StyledNewButton = styled.button``;export const RecordBoardColumnNewRecordButton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { objectMetadataItem, selectFieldMetadataItem } =useContext(RecordBoardContext);diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsxindex cf0b3ad4e18..f9de664cebb 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx@@ -18,7 +18,7 @@ import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useLisimport { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useEffect } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainerContainer = styled.div`box-sizing: border-box;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarAddNew.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarAddNew.tsxindex 9e4bbdf2bb8..048f1f2c699 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarAddNew.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarAddNew.tsx@@ -18,7 +18,7 @@ import { FieldMetadataType } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledButtonContainer = styled.div`height: auto;@@ -37,7 +37,7 @@ export const RecordCalendarAddNew = ({isRecordCalendarReadOnlyComponentState,);- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { userTimezone } = useUserTimezone();const { objectMetadataItem } = useRecordCalendarContextOrThrow();const { createNewIndexRecord } = useCreateNewIndexRecord({diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsxindex e6de6106e8d..d9a38268f71 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx@@ -31,7 +31,7 @@ import {} from 'twenty-shared/utils';import { IconChevronLeft, IconChevronRight } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ViewCalendarLayout } from '~/generated-metadata/graphql';import { dateLocaleState } from '~/localization/states/dateLocaleState';diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/RecordCalendarGrid.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/RecordCalendarGrid.tsxindex af2ec2e84c9..1a2d0e4dc11 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/RecordCalendarGrid.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/RecordCalendarGrid.tsx@@ -5,7 +5,7 @@ import { recordCalendarSelectedDateComponentState } from '@/object-record/recordimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { isPlainDateInSameMonth } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ViewCalendarLayout } from '~/generated-metadata/graphql';const StyledContainer = styled.div<{ isDayLayout: boolean }>`diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/RecordCalendarGridDay.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/RecordCalendarGridDay.tsxindex 06eff25c0f4..2b657340653 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/RecordCalendarGridDay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/grid/components/RecordCalendarGridDay.tsx@@ -13,7 +13,7 @@ import { RecordCalendarAddNew } from '@/object-record/record-calendar/componentsimport { RECORD_CALENDAR_CARD_DND_TYPE } from '@/object-record/record-calendar/constants/RecordCalendarCardDndType';import { RECORD_CALENDAR_DAY_COLLISION_PRIORITY } from '@/object-record/record-calendar/constants/RecordCalendarDayCollisionPriority';import { DragDropItemDropTarget } from '@/ui/utilities/drag-and-drop/components/DragDropItemDropTarget';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{isOtherMonth: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard.tsxindex 1941400fb4c..3fb0f97d871 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard.tsx@@ -27,7 +27,7 @@ import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSeimport { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';import { styled } from '@linaria/react';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardBody.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardBody.tsxindex f751dd5fae7..cab252579a8 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardBody.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardBody.tsx@@ -17,7 +17,7 @@ import { RecordInlineCell } from '@/object-record/record-inline-cell/components/import { getRecordFieldInputInstanceId } from '@/object-record/utils/getRecordFieldInputId';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { isDefined } from 'twenty-shared/utils';type RecordCalendarCardBodyProps = {diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardHeader.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardHeader.tsxindex 691a6c4f5e6..948683ab091 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardHeader.tsx@@ -13,7 +13,7 @@ import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtoimport { isDefined } from 'twenty-shared/utils';import { Checkbox } from 'twenty-ui/primitives/input';import { isRecordCalendarCardSelectedComponentFamilyState } from '@/object-record/record-calendar/record-calendar-card/states/isRecordCalendarCardSelectedComponentFamilyState';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCheckboxContainer = styled.div`margin-left: auto;diff --git a/packages/twenty-front/src/modules/object-record/record-card/components/RecordCard.tsx b/packages/twenty-front/src/modules/object-record/record-card/components/RecordCard.tsxindex 318e75827e4..7dd0dc4b76a 100644--- a/packages/twenty-front/src/modules/object-record/record-card/components/RecordCard.tsx+++ b/packages/twenty-front/src/modules/object-record/record-card/components/RecordCard.tsx@@ -1,6 +1,6 @@import { DRAG_SOURCE_OPACITY } from '@/ui/utilities/drag-and-drop/constants/DragSourceOpacity';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledBoardCard = styled.div<{isDragging?: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-card/components/RecordCardBodyContainer.tsx b/packages/twenty-front/src/modules/object-record/record-card/components/RecordCardBodyContainer.tsxindex 7a6a4d375ee..66eb681121a 100644--- a/packages/twenty-front/src/modules/object-record/record-card/components/RecordCardBodyContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-card/components/RecordCardBodyContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCardBodyContainer = styled.div<{ padding?: string }>`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/record-card/components/RecordCardHeaderContainer.tsx b/packages/twenty-front/src/modules/object-record/record-card/components/RecordCardHeaderContainer.tsxindex 35673ebef3d..d355391e69d 100644--- a/packages/twenty-front/src/modules/object-record/record-card/components/RecordCardHeaderContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-card/components/RecordCardHeaderContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledBoardCardHeaderContainer = styled.div<{isCompact: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-drag/components/RecordDragMultiDragStack.tsx b/packages/twenty-front/src/modules/object-record/record-drag/components/RecordDragMultiDragStack.tsxindex 91f9ac1a8fe..fd7d8aa39aa 100644--- a/packages/twenty-front/src/modules/object-record/record-drag/components/RecordDragMultiDragStack.tsx+++ b/packages/twenty-front/src/modules/object-record/record-drag/components/RecordDragMultiDragStack.tsx@@ -1,7 +1,7 @@import { originalDragSelectionComponentState } from '@/object-record/record-drag/states/originalDragSelectionComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const MAX_STACK_CARDS = 5;diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailRecordsListContainer.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailRecordsListContainer.tsxindex e35c8ac42e1..fa156d45246 100644--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailRecordsListContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailRecordsListContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRecordsList = styled.div`color: ${themeCssVariables.font.color.secondary};diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailRecordsListItemContainer.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailRecordsListItemContainer.tsxindex d7c921ce476..59b86d92e9d 100644--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailRecordsListItemContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailRecordsListItemContainer.tsx@@ -1,6 +1,6 @@import { useLayoutRenderingContext } from '@/ui/layout/contexts/LayoutRenderingContext';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PageLayoutType } from '~/generated-metadata/graphql';const StyledListItem = styled.div<{diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailSectionContainer.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailSectionContainer.tsxindex d3995bfdb7d..986adbc657b 100644--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailSectionContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/components/RecordDetailSectionContainer.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useState } from 'react';import { Link } from 'react-router-dom';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRecordDetailSectionWrapper = styled.div`border-top: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/components/LightCopyIconButton.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/components/LightCopyIconButton.tsxindex 97482f8679a..d9340d201ef 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/components/LightCopyIconButton.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/components/LightCopyIconButton.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { LightIconButton } from 'twenty-ui/components';import { IconCopy } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledButtonContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsxindex c7f46029794..f11a57c2873 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx@@ -29,7 +29,6 @@ import { isNonEmptyArray, isNonEmptyString } from '@sniptt/guards';import {type FocusEvent,type KeyboardEvent,- useContext,useId,useRef,useState,@@ -37,7 +36,7 @@ import {import { Key } from 'ts-key-enum';import { isDefined } from 'twenty-shared/utils';import { IconPlus } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { toSpliced } from '~/utils/array/toSpliced';type FormArrayFieldInputProps = {@@ -102,7 +101,7 @@ export const FormArrayFieldInput = ({maxItemCount,}: FormArrayFieldInputProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const instanceId = useId();const { pushFocusItemToFocusStack } = usePushFocusItemToFocusStack();diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldInput.tsxindex 4dea343fe20..0b9f6e938d3 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldInput.tsx@@ -9,10 +9,10 @@ import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/Geneimport { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooks/useRemoveFocusItemFromFocusStackById';import { isStandaloneVariableString } from 'twenty-shared/workflow';import { useLingui } from '@lingui/react/macro';-import { useContext, useId, useState } from 'react';+import { useId, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconCheck, IconCircleOff, IconX } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type FormBooleanFieldInputProps = {label?: string;@@ -46,7 +46,7 @@ export const FormBooleanFieldInput = ({VariablePicker,}: FormBooleanFieldInputProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const instanceId = useId();diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldSwitchInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldSwitchInput.tsxindex c5750c19c4c..6f35e98895d 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldSwitchInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldSwitchInput.tsx@@ -4,7 +4,7 @@ import { FormFieldInputRowContainer } from '@/object-record/record-field/ui/formimport { Field, Switch } from 'twenty-ui/primitives/input';import { styled } from '@linaria/react';import { useId } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type FormBooleanFieldSwitchInputProps = {label?: string;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsxindex 6a48e37c8d2..bb99e70ee92 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx@@ -31,7 +31,7 @@ import { useId, useRef, useState } from 'react';import { Temporal } from 'temporal-polyfill';import { Key } from 'ts-key-enum';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type Nullable } from 'twenty-ui/utilities';const FORM_DATE_FIELD_PICKER_CLICK_OUTSIDE_ID =diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer.tsxindex d57a58479a1..f3f9c8e6c0f 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer.tsx@@ -4,7 +4,7 @@ import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooksimport { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';import { styled } from '@linaria/react';import { forwardRef, type HTMLAttributes, type Ref } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type FormFieldInputInnerContainerProps = {hasRightElement: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMorphRelationToOneFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMorphRelationToOneFieldInput.tsxindex 01eca61582b..db294d32aff 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMorphRelationToOneFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMorphRelationToOneFieldInput.tsx@@ -18,7 +18,7 @@ import { t } from '@lingui/core/macro';import { isString } from '@sniptt/guards';import { useId } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type JsonValue } from 'type-fest';const StyledReadonlyContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordFieldChips.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordFieldChips.tsxindex 1e23c325d7f..6d2acebba6f 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordFieldChips.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordFieldChips.tsx@@ -8,7 +8,7 @@ import { isStandaloneVariableString } from 'twenty-shared/workflow';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNonEmptyArray } from '@sniptt/guards';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledChipsContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordPicker.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordPicker.tsxindex 3b37f186b4f..c65ff480f4b 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordPicker.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordPicker.tsx@@ -21,13 +21,13 @@ import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNonEmptyArray } from '@sniptt/guards';-import { useContext, useId, useState } from 'react';+import { useId, useState } from 'react';import { QUERY_MAX_RECORDS } from 'twenty-shared/constants';import { isDefined, isValidUuid } from 'twenty-shared/utils';import { useToast } from 'twenty-ui/components';import { IconChevronDown } from 'twenty-ui/icon';import { Field } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { mapArrayToObject } from '~/utils/array/mapArrayToObject';const StyledFormSelectContainerWrapper = styled.div<{ readonly?: boolean }>`@@ -73,7 +73,7 @@ export const FormMultiRecordPicker = ({testId,VariablePicker,}: FormMultiRecordPickerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [draftValue, setDraftValue] = useState<FormMultiRecordPickerDraftValue>(getFormMultiRecordPickerDraftValue(defaultValue),diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsxindex 2d5311db34f..bcc8d5a2813 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx@@ -19,11 +19,11 @@ import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooksimport { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';import { isStandaloneVariableString } from 'twenty-shared/workflow';import { isArray } from '@sniptt/guards';-import { useContext, useId, useState } from 'react';+import { useId, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { VisibilityHidden } from 'twenty-ui/primitives/accessibility';import { IconChevronDown } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type FormMultiSelectFieldInputProps = {label?: string;@@ -98,7 +98,7 @@ export const FormMultiSelectFieldInput = ({hint,dropdownWidth,}: FormMultiSelectFieldInputProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const instanceId = useId();const { pushFocusItemToFocusStack } = usePushFocusItemToFocusStack();diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer.tsxindex 09ad2092d33..c17cf3d8893 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFormNestedFieldInputContainer = styled.div`background: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelativeDatePicker.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelativeDatePicker.tsxindex 221d3c8d88f..5fb033d1368 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelativeDatePicker.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelativeDatePicker.tsx@@ -7,7 +7,7 @@ import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { useId } from 'react';import { DEFAULT_RELATIVE_DATE_FILTER_VALUE } from 'twenty-shared/constants';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {type RelativeDateFilter,diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsxindex 9d7b2ecb3b4..4ecbc336ce2 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx@@ -10,12 +10,12 @@ import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/Geneimport { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooks/useRemoveFocusItemFromFocusStackById';import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';import { isStandaloneVariableString } from 'twenty-shared/workflow';-import { useContext, useId, useState } from 'react';+import { useId, useState } from 'react';import { Key } from 'ts-key-enum';import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { IconCircleOff } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type FormSelectFieldInputProps = {label?: string;@@ -40,7 +40,7 @@ export const FormSelectFieldInput = ({isNullable,callToActionButton,}: FormSelectFieldInputProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const instanceId = useId();const { removeFocusItemFromFocusStackById } =diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordFieldChip.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordFieldChip.tsxindex 06bb1e2cbcf..6e7184923c9 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordFieldChip.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordFieldChip.tsx@@ -11,7 +11,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { IconForbid } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRecordChipContainer = styled.div`margin: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsxindex d618d6917fd..64491b47cac 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx@@ -20,10 +20,10 @@ import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSeimport { isStandaloneVariableString } from 'twenty-shared/workflow';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useCallback, useContext, useId } from 'react';+import { useCallback, useId } from 'react';import { CustomError, isDefined, isValidUuid } from 'twenty-shared/utils';import { IconChevronDown, IconForbid } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledFormSelectContainerWrapper = styled.div<{ readonly?: boolean }>`cursor: ${({ readonly }) => (readonly ? 'default' : 'pointer')};@@ -94,7 +94,7 @@ export const FormSingleRecordPicker = ({VariablePicker,shouldDisplayRecordFieldsInVariablePicker = false,}: FormSingleRecordPickerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const resolvedObjectNameSingular =selectedObjectNameSingular ?? objectNameSingulars[0];diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInput.tsxindex 82881056d47..4f24fad19c8 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInput.tsx@@ -1,17 +1,10 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import {- type ChangeEvent,- useCallback,- useContext,- useId,- useMemo,- useState,-} from 'react';+import { type ChangeEvent, useCallback, useId, useMemo, useState } from 'react';import { CoreObjectNameSingular } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { IconChevronDown, IconUserCircle } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type JsonValue } from 'type-fest';import { MAX_WORKSPACE_MEMBERS_TO_DISPLAY } from '@/object-record/object-filter-dropdown/components/ObjectFilterDropdownActorSelect';@@ -62,7 +55,7 @@ export const FormWorkspaceMemberFilterValueInput = ({readonly,VariablePicker,}: FormWorkspaceMemberFilterValueInputProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const componentId = useId();const dropdownId = `form-workspace-member-filter-picker-${componentId}`;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputTrigger.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputTrigger.tsxindex 90f3a534590..de20d8d3d03 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputTrigger.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputTrigger.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { IconUserCircle } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { FormFieldPlaceholder } from '@/object-record/record-field/ui/form-types/components/FormFieldPlaceholder';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/TextVariableEditor.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/TextVariableEditor.tsxindex b3052f51e5f..4c36f25c69d 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/TextVariableEditor.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/TextVariableEditor.tsx@@ -1,7 +1,7 @@import { FORM_FIELD_PLACEHOLDER_STYLES } from '@/ui/input/constants/FormFieldPlaceholderStyles';import { styled } from '@linaria/react';import { EditorContent, type Editor } from '@tiptap/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledEditor = styled.div<{multiline?: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/VariableChip.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/VariableChip.tsxindex a12948fbd17..501b5154ccb 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/VariableChip.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/VariableChip.tsx@@ -1,11 +1,10 @@import { BaseChip } from '@/ui/input/components/BaseChip';import { useSearchVariable } from '@/workflow/workflow-variables/hooks/useSearchVariable';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { extractRawVariableNamePart } from 'twenty-shared/workflow';import { IconAlertTriangle } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type VariableChipProps = {rawVariableName: string;@@ -19,7 +18,7 @@ export const VariableChip = ({isFullRecord = false,}: VariableChipProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { variableLabel, variablePathLabel } = useSearchVariable({stepId: extractRawVariableNamePart({diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/VariableChipStandalone.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/VariableChipStandalone.tsxindex ade6102fc74..c4a70cfae2b 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/VariableChipStandalone.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/VariableChipStandalone.tsx@@ -1,6 +1,6 @@import { VariableChip } from '@/object-record/record-field/ui/form-types/components/VariableChip';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/display/components/ForbiddenFieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/display/components/ForbiddenFieldDisplay.tsxindex 789de6882f4..9c62489c445 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/display/components/ForbiddenFieldDisplay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/display/components/ForbiddenFieldDisplay.tsx@@ -1,8 +1,7 @@import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';-import { useContext } from 'react';import { IconLock } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;@@ -23,7 +22,7 @@ const StyledContainer = styled.div``;export const ForbiddenFieldDisplay = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer>diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput.tsxindex 4990d5b5f89..98c63e18cc2 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput.tsx@@ -6,7 +6,7 @@ import {type ReactNode,} from 'react';import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { isDefined } from 'twenty-shared/utils';import { useCombinedRefs } from '~/hooks/useCombinedRefs';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/PhonesFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/PhonesFieldInput.tsxindex 8151562af85..cb055b7cdfa 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/PhonesFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/PhonesFieldInput.tsx@@ -23,7 +23,7 @@ import { PhoneCountryPickerDropdownButton } from '@/ui/input/components/internalimport { useContext } from 'react';import { MULTI_ITEM_FIELD_DEFAULT_MAX_VALUES } from 'twenty-shared/constants';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { FieldMetadataType } from '~/generated-metadata/graphql';import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RawJsonFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RawJsonFieldInput.tsxindex 93e7dab915d..7054e7b4a70 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RawJsonFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RawJsonFieldInput.tsx@@ -11,7 +11,7 @@ import { Key } from 'ts-key-enum';import { IconButton, JsonTree } from 'twenty-ui/components';import { CodeEditor } from 'twenty-ui/components/code-editor';import { IconPencil } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const CONTAINER_HEIGHT = 300;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldInput.tsxindex 1d1f2022048..8a3dde70270 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldInput.tsx@@ -13,7 +13,7 @@ import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { CoreObjectNameSingular } from 'twenty-shared/types';import { IconButton } from 'twenty-ui/components';import { IconLayoutSidebarLeftCollapse } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const ActivityRichTextEditor = lazy(() =>import('@/activities/components/ActivityRichTextEditor').then((module) => ({@@ -58,7 +58,7 @@ const StyledCollapseButton = styled.div``;const LoadingSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/object-record/record-form/components/RecordFormFieldInputs.tsx b/packages/twenty-front/src/modules/object-record/record-form/components/RecordFormFieldInputs.tsxindex 0098b0b5c65..39e27757b54 100644--- a/packages/twenty-front/src/modules/object-record/record-form/components/RecordFormFieldInputs.tsx+++ b/packages/twenty-front/src/modules/object-record/record-form/components/RecordFormFieldInputs.tsx@@ -7,7 +7,7 @@ import { getRecordFormFieldInputSettings } from '@/object-record/record-form/utiimport { type ObjectRecord } from '@/object-record/types/ObjectRecord';import { styled } from '@linaria/react';import { type JsonValue } from 'type-fest';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFieldList = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/record-group/components/RecordGroupSectionHeader.tsx b/packages/twenty-front/src/modules/object-record/record-group/components/RecordGroupSectionHeader.tsxindex 547686aedf6..8c1a3fda2db 100644--- a/packages/twenty-front/src/modules/object-record/record-group/components/RecordGroupSectionHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-group/components/RecordGroupSectionHeader.tsx@@ -3,9 +3,8 @@ import { RecordGroupChip } from '@/object-record/record-group/components/RecordGimport { type RecordGroupDefinition } from '@/object-record/record-group/types/RecordGroupDefinition';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { IconChevronDown } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledSectionToggle = styled.button`align-items: center;@@ -43,7 +42,7 @@ export const RecordGroupSectionHeader = ({onToggle,chevronWidth,}: RecordGroupSectionHeaderProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledSectionTogglediff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordColumnResizeHandle.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordColumnResizeHandle.tsxindex f17dc01d637..6a891e4ecfb 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordColumnResizeHandle.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordColumnResizeHandle.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type PointerEvent as ReactPointerEvent } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRecordColumnResizeHandle = styled.div<{isResizing: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsxindex e7ac550da56..88b4e83a91e 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx@@ -13,7 +13,7 @@ import { RecordIndexFiltersToContextStoreEffect } from '@/object-record/record-iimport { useHasCurrentViewNonReadableFields } from '@/object-record/record-index/hooks/useHasCurrentViewNonReadableFields';import { RecordListContainer } from '@/object-record/record-list/components/RecordListContainer';import { ViewType } from '@/views/types/ViewType';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageHeader.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageHeader.tsxindex 7b50b5c55f9..e9c2eaae0b6 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageHeader.tsx@@ -15,7 +15,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTitleWithSelectedRecords = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexSkeletonLoader.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexSkeletonLoader.tsxindex c920dea2a7f..4af818e853d 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexSkeletonLoader.tsx@@ -1,7 +1,7 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { styled } from '@linaria/react';import Skeleton from 'react-loading-skeleton';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PageContentSkeletonLoader } from '~/loading/components/PageContentSkeletonLoader';const StyledSecondaryBar = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsxindex f7131e862a4..6906eb6fcfa 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx@@ -1,7 +1,7 @@import { FieldDescriptionTooltip } from '@/object-record/record-field/ui/components/FieldDescriptionTooltip';import { styled } from '@linaria/react';import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';import { useFieldFocus } from '@/object-record/record-field/ui/hooks/useFieldFocus';@@ -71,7 +71,7 @@ export const StyledSkeletonDiv = styled.div`export const RecordInlineCellContainer = () => {const { readonly, IconLabel, label, labelWidth, showLabel } =useRecordInlineCellContext();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { fieldDefinition, onMouseEnter, onMouseLeave, anchorId } =useContext(FieldContext);diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsxindex c895ca04d16..4c73270bee6 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx@@ -11,7 +11,7 @@ import {import { RecordInlineCellButton } from '@/object-record/record-inline-cell/components/RecordInlineCellEditButton';import { useLingui } from '@lingui/react/macro';import { useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRecordInlineCellNormalModeOuterContainer = styled.div<Pick<diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellHoveredPortalContent.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellHoveredPortalContent.tsxindex a104f87fc27..87fce8c57eb 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellHoveredPortalContent.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellHoveredPortalContent.tsx@@ -1,6 +1,6 @@import { RecordInlineCellHoveredPortal } from '@/object-record/record-inline-cell/components/RecordInlineCellHoveredPortal';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRecordTableCellHoveredPortalContent = styled.div<{readonly?: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellSkeletonLoader.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellSkeletonLoader.tsxindex 6ef8bdfe089..7b795dff559 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellSkeletonLoader.tsx@@ -1,12 +1,11 @@-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { StyledSkeletonDiv } from './RecordInlineCellContainer';export const RecordInlineCellSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsxindex a2e4e228680..d014aed1d1e 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx@@ -5,7 +5,7 @@ import { useFieldFocus } from '@/object-record/record-field/ui/hooks/useFieldFocimport { useRecordInlineCellContext } from '@/object-record/record-inline-cell/components/RecordInlineCellContext';import { RecordInlineCellDisplayMode } from '@/object-record/record-inline-cell/components/RecordInlineCellDisplayMode';import { RecordInlineCellSkeletonLoader } from '@/object-record/record-inline-cell/components/RecordInlineCellSkeletonLoader';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledClickableContainer = styled.div<{readonly?: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBox.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBox.tsxindex 1e3eaa58ac2..43ba856d386 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBox.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBox.tsx@@ -1,6 +1,6 @@import { useLayoutRenderingContext } from '@/ui/layout/contexts/LayoutRenderingContext';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PageLayoutType } from '~/generated-metadata/graphql';interface PropertyBoxProps {diff --git a/packages/twenty-front/src/modules/object-record/record-list/components/RecordList.tsx b/packages/twenty-front/src/modules/object-record/record-list/components/RecordList.tsxindex 67bc1c30009..328317d1a62 100644--- a/packages/twenty-front/src/modules/object-record/record-list/components/RecordList.tsx+++ b/packages/twenty-front/src/modules/object-record/record-list/components/RecordList.tsx@@ -9,7 +9,7 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/comimport { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { styled } from '@linaria/react';import { useState } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`box-sizing: border-box;diff --git a/packages/twenty-front/src/modules/object-record/record-list/components/RecordListAddNew.tsx b/packages/twenty-front/src/modules/object-record/record-list/components/RecordListAddNew.tsxindex 3c3d8c5651f..71d21ec02e2 100644--- a/packages/twenty-front/src/modules/object-record/record-list/components/RecordListAddNew.tsx+++ b/packages/twenty-front/src/modules/object-record/record-list/components/RecordListAddNew.tsx@@ -10,11 +10,10 @@ import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { useToast } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { logError } from '~/utils/logError';const StyledAddNewRow = styled.button`@@ -37,7 +36,7 @@ const StyledAddNewRow = styled.button``;export const RecordListAddNew = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { objectMetadataItem } = useRecordListContextOrThrow();const { enqueueToast } = useToast();diff --git a/packages/twenty-front/src/modules/object-record/record-list/components/RecordListRecordGroupSection.tsx b/packages/twenty-front/src/modules/object-record/record-list/components/RecordListRecordGroupSection.tsxindex b9a7f84cb62..839f359ebea 100644--- a/packages/twenty-front/src/modules/object-record/record-list/components/RecordListRecordGroupSection.tsx+++ b/packages/twenty-front/src/modules/object-record/record-list/components/RecordListRecordGroupSection.tsx@@ -13,7 +13,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSectionHeader = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-list/components/RecordListRow.tsx b/packages/twenty-front/src/modules/object-record/record-list/components/RecordListRow.tsxindex cbf753b4ad2..838dc125e29 100644--- a/packages/twenty-front/src/modules/object-record/record-list/components/RecordListRow.tsx+++ b/packages/twenty-front/src/modules/object-record/record-list/components/RecordListRow.tsx@@ -21,7 +21,7 @@ import { plural, t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { Chip } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRowContainer = styled.div`cursor: pointer;diff --git a/packages/twenty-front/src/modules/object-record/record-merge/components/MergeRecordsContainer.tsx b/packages/twenty-front/src/modules/object-record/record-merge/components/MergeRecordsContainer.tsxindex 686df7ded0c..07a014c84fb 100644--- a/packages/twenty-front/src/modules/object-record/record-merge/components/MergeRecordsContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-merge/components/MergeRecordsContainer.tsx@@ -3,7 +3,7 @@ import { TabListRoot } from '@/ui/layout/tab-list/components/TabListRoot';import { Tabs } from 'twenty-ui/primitives/navigation';import { styled } from '@linaria/react';import { useRef } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ShowPageContainer } from '@/ui/layout/page/components/ShowPageContainer';import { SidePanelProvider } from '@/ui/layout/side-panel/contexts/SidePanelContext';diff --git a/packages/twenty-front/src/modules/object-record/record-merge/components/MergeRecordsFooter.tsx b/packages/twenty-front/src/modules/object-record/record-merge/components/MergeRecordsFooter.tsxindex 2466fda31f5..2d089aaf8b5 100644--- a/packages/twenty-front/src/modules/object-record/record-merge/components/MergeRecordsFooter.tsx+++ b/packages/twenty-front/src/modules/object-record/record-merge/components/MergeRecordsFooter.tsx@@ -6,7 +6,7 @@ import { Key } from 'ts-key-enum';import { t } from '@lingui/core/macro';import { IconArrowMerge } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFooterContainer = styled.div`align-items: flex-end;diff --git a/packages/twenty-front/src/modules/object-record/record-merge/components/MergeSettingsTab.tsx b/packages/twenty-front/src/modules/object-record/record-merge/components/MergeSettingsTab.tsxindex 3ae3addeb80..3ae78f0e26c 100644--- a/packages/twenty-front/src/modules/object-record/record-merge/components/MergeSettingsTab.tsx+++ b/packages/twenty-front/src/modules/object-record/record-merge/components/MergeSettingsTab.tsx@@ -6,7 +6,7 @@ import { Select } from '@/ui/input/components/Select';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSectionContainer = styled.div`padding: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerFetchMoreLoader.tsx b/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerFetchMoreLoader.tsxindex 3e47edd39bc..99794d364f4 100644--- a/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerFetchMoreLoader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerFetchMoreLoader.tsx@@ -18,7 +18,7 @@ import { styled } from '@linaria/react';import { useCallback } from 'react';import { useInView } from 'react-intersection-observer';import { useStore } from 'jotai';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledText = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-show/components/ObjectRecordShowPageBreadcrumb.tsx b/packages/twenty-front/src/modules/object-record/record-show/components/ObjectRecordShowPageBreadcrumb.tsxindex 42b156a16cc..904447487ed 100644--- a/packages/twenty-front/src/modules/object-record/record-show/components/ObjectRecordShowPageBreadcrumb.tsx+++ b/packages/twenty-front/src/modules/object-record/record-show/components/ObjectRecordShowPageBreadcrumb.tsx@@ -21,7 +21,7 @@ import { useState } from 'react';import { FieldMetadataType } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { Avatar } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';const StyledEditableTitleContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx b/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsxindex c05ae8074d7..8095e45083f 100644--- a/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx@@ -15,7 +15,7 @@ import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useimport { styled } from '@linaria/react';import { CoreObjectNameSingular } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PageLayoutType } from '~/generated-metadata/graphql';const StyledShowPageBannerContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/HorizontalScrollBoxShadowCSS.ts b/packages/twenty-front/src/modules/object-record/record-table/components/HorizontalScrollBoxShadowCSS.tsindex e19de57414a..4a9d2f39421 100644--- a/packages/twenty-front/src/modules/object-record/record-table/components/HorizontalScrollBoxShadowCSS.ts+++ b/packages/twenty-front/src/modules/object-record/record-table/components/HorizontalScrollBoxShadowCSS.ts@@ -1,5 +1,5 @@import { RECORD_TABLE_HORIZONTAL_SCROLL_SHADOW_VISIBILITY_CSS_VARIABLE_NAME } from '@/object-record/record-table/constants/RecordTableHorizontalScrollShadowVisibilityCssVariableName';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const HorizontalScrollBoxShadowCSS = `&::after {diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableEmpty.tsx b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableEmpty.tsxindex c93b8be45ba..65a50b26c97 100644--- a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableEmpty.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableEmpty.tsx@@ -24,7 +24,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport { styled } from '@linaria/react';import { useMemo } from 'react';import { isDefined } from 'twenty-shared/utils';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';const StyledEmptyStateContainer = styled.div<{ width: number }>`diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableStyleWrapper.tsx b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableStyleWrapper.tsxindex ecfe7f7a8af..804e5dfe8f5 100644--- a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableStyleWrapper.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableStyleWrapper.tsx@@ -18,7 +18,7 @@ import { TABLE_Z_INDEX } from '@/object-record/record-table/constants/TableZIndeimport { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';import { getRecordTableColumnFieldWidthCSSVariableName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthCSSVariableName';import { styled } from '@linaria/react';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';export { HorizontalScrollBoxShadowCSS, VerticalScrollBoxShadowCSS };diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/VerticalScrollBoxShadowCSS.ts b/packages/twenty-front/src/modules/object-record/record-table/components/VerticalScrollBoxShadowCSS.tsindex 16c29dfcc83..140ad389728 100644--- a/packages/twenty-front/src/modules/object-record/record-table/components/VerticalScrollBoxShadowCSS.ts+++ b/packages/twenty-front/src/modules/object-record/record-table/components/VerticalScrollBoxShadowCSS.ts@@ -1,5 +1,5 @@import { RECORD_TABLE_VERTICAL_SCROLL_SHADOW_VISIBILITY_CSS_VARIABLE_NAME } from '@/object-record/record-table/constants/RecordTableVerticalScrollShadowVisibilityCssVariableName';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const VerticalScrollBoxShadowCSS = `&::before {diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellBaseContainer.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellBaseContainer.tsxindex 7b42fc6ee9f..e80cfce21c2 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellBaseContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellBaseContainer.tsx@@ -9,7 +9,7 @@ import { RecordTableCellContext } from '@/object-record/record-table/contexts/Reimport { useRecordTableContextOrThrow } from '@/object-record/record-table/contexts/RecordTableContext';import { useOpenRecordTableCellFromCell } from '@/object-record/record-table/record-table-cell/hooks/useOpenRecordTableCellFromCell';import { getRecordTableCellId } from '@/object-record/record-table/utils/getRecordTableCellId';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const StyledBaseContainer = styled.div<{fontColorMedium: string;@@ -59,7 +59,7 @@ export const RecordTableCellBaseContainer = ({isLabelIdentifier,} = useContext(FieldContext);const { openTableCell } = useOpenRecordTableCellFromCell();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { cellPosition } = useContext(RecordTableCellContext);const { recordTableId } = useRecordTableContextOrThrow();diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellButtons.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellButtons.tsxindex fc3401a204a..398d00b7c7d 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellButtons.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellButtons.tsx@@ -5,7 +5,7 @@ import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { type IconComponent } from 'twenty-ui/icon';import { ButtonGroup } from 'twenty-ui/primitives/input';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';const StyledButtonContainer = styled.div`/* Buttons stay concentric with the frame: its radius minus the 1px border.diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellCheckbox.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellCheckbox.tsxindex f3ca30c4808..5fdcc44e373 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellCheckbox.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellCheckbox.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useCallback } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidthClassName';diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellCheckboxPlaceholder.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellCheckboxPlaceholder.tsxindex 670a6c891c5..a4d2a3d137f 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellCheckboxPlaceholder.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellCheckboxPlaceholder.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidthClassName';import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';import { useRecordTableBodyContextOrThrow } from '@/object-record/record-table/contexts/RecordTableBodyContext';diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDisplayContainer.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDisplayContainer.tsxindex cc4889f8bdb..f56d89aff73 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDisplayContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDisplayContainer.tsx@@ -2,7 +2,7 @@ import { RECORD_TABLE_CELL_DISPLAY_CLASS_NAME } from '@/object-record/record-tabimport { t } from '@lingui/core/macro';import { styled } from '@linaria/react';import { type Ref } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledOuterContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDragAndDrop.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDragAndDrop.tsxindex b45fff6c9d8..c513fd1e6bd 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDragAndDrop.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellDragAndDrop.tsx@@ -8,7 +8,7 @@ import { useRecordTableRowDraggableContextOrThrow } from '@/object-record/recordimport { RecordTableCellStyleWrapper } from '@/object-record/record-table/record-table-cell/components/RecordTableCellStyleWrapper';import { IconListViewGrip } from '@/object-record/record-table/record-table-cell/components/internal/IconListViewGrip/IconListViewGrip';import { DragDropItemSortableHandleRefContext } from '@/ui/utilities/drag-and-drop/context/DragDropItemSortableHandleRefContext';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`border-color: transparent;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellFirstRowFirstColumn.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellFirstRowFirstColumn.tsxindex 6bb7ae50fdf..a88952ebaf6 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellFirstRowFirstColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellFirstRowFirstColumn.tsx@@ -2,8 +2,8 @@ import { TABLE_Z_INDEX } from '@/object-record/record-table/constants/TableZIndeimport { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';import { cx } from '@linaria/core';import { styled } from '@linaria/react';-import { useContext, type ReactNode } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { type ReactNode } from 'react';+import { useTheme } from 'twenty-ui/theme';const StyledRecordTableTd = styled.div<{backgroundColor: string;@@ -45,7 +45,7 @@ export const RecordTableCellFirstRowFirstColumn = ({hasRightBorder?: boolean;hasBottomBorder?: boolean;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const zIndex = TABLE_Z_INDEX.cell.sticky;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellFocusedPortalContent.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellFocusedPortalContent.tsxindex 83ab668dfc6..ca521d2aab8 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellFocusedPortalContent.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellFocusedPortalContent.tsx@@ -11,7 +11,7 @@ import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRecordTableCellFocusPortalContent = styled.div<{isRecordTableRowActive: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellHoveredPortalContent.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellHoveredPortalContent.tsxindex e4429d1ab8c..4dfa3f7252a 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellHoveredPortalContent.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellHoveredPortalContent.tsx@@ -15,7 +15,7 @@ import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';const StyledRecordTableCellHoveredPortalContent = styled.div<{diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellLoading.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellLoading.tsxindex fc994f123e2..438cbdcee47 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellLoading.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellLoading.tsx@@ -1,7 +1,7 @@import { RecordTableCellStyleWrapper } from '@/object-record/record-table/record-table-cell/components/RecordTableCellStyleWrapper';import { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledStaticCellSkeleton = styled.div`background-color: ${themeCssVariables.background.tertiary};diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellStyleWrapper.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellStyleWrapper.tsxindex ebb09939374..d104f3d22a5 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellStyleWrapper.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellStyleWrapper.tsx@@ -1,7 +1,7 @@import { cx } from '@linaria/core';import { styled } from '@linaria/react';-import { type ReactNode, useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { type ReactNode } from 'react';+import { useTheme } from 'twenty-ui/theme';export const StyledCell = styled.div<{backgroundColor: string;@@ -44,7 +44,7 @@ export const RecordTableCellStyleWrapper = ({hasBottomBorder?: boolean;widthClassName: string;} & React.ComponentProps<'div'>) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const tdBackgroundColor = isSelected? theme.accent.quaternarydiff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableDragAndDropPlaceholderCell.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableDragAndDropPlaceholderCell.tsxindex 86edf074b61..e48d797dccd 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableDragAndDropPlaceholderCell.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableDragAndDropPlaceholderCell.tsx@@ -2,7 +2,7 @@ import { RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH_CLASS_NAME } from '@/object-recimport { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';import { styled } from '@linaria/react';import { cx } from '@linaria/core';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledPlaceholderDragAndDropCell = styled.div`background-color: ${themeCssVariables.background.primary};diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableAggregateFooter.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableAggregateFooter.tsxindex 50878c522d0..60dd6935612 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableAggregateFooter.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableAggregateFooter.tsx@@ -10,7 +10,7 @@ import { TABLE_Z_INDEX } from '@/object-record/record-table/constants/TableZIndeimport { useRecordTableContextOrThrow } from '@/object-record/record-table/contexts/RecordTableContext';import { RecordTableAggregateFooterCell } from '@/object-record/record-table/record-table-footer/components/RecordTableAggregateFooterCell';import { RecordTableColumnAggregateFooterCellContext } from '@/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterCellContext';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';const StyledPlaceholderDragAndDropFooterCell = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableAggregateFooterCell.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableAggregateFooterCell.tsxindex 451f548061d..32a67a3c8d0 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableAggregateFooterCell.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableAggregateFooterCell.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { useContext } from 'react';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { RECORD_TABLE_FIRST_COLUMN_LEFT_CSS_VAR } from '@/object-record/record-table/components/RecordTableStyleWrapper';import { RECORD_TABLE_CELL_CONTENT_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableCellContentClassName';diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterValue.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterValue.tsxindex 03bf1ee7f28..e30fbe2f6ab 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterValue.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterValue.tsx@@ -4,7 +4,7 @@ import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledText = styled.span`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterValueCell.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterValueCell.tsxindex f339f0b6288..1fb1b55f43b 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterValueCell.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/components/RecordTableColumnAggregateFooterValueCell.tsx@@ -11,7 +11,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport { styled } from '@linaria/react';import { useContext, useState } from 'react';import { IconChevronDown } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledCell = styled.div<{ isUnfolded: boolean; isFirstCell: boolean }>`align-items: center;@@ -62,7 +62,7 @@ export const RecordTableColumnAggregateFooterValueCell = ({dropdownId,);- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { viewFieldId, fieldMetadataId } = useContext(RecordTableColumnAggregateFooterCellContext,);diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHead.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHead.tsxindex 6b682fed69f..a3ce2060a6a 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHead.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHead.tsx@@ -1,5 +1,4 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { FieldDescriptionTooltip } from '@/object-record/record-field/ui/components/FieldDescriptionTooltip';import { fieldMetadataItemByIdSelector } from '@/object-metadata/states/fieldMetadataItemByIdSelector';@@ -7,7 +6,7 @@ import { type RecordField } from '@/object-record/record-field/types/RecordFieldimport { RECORD_TABLE_CELL_CONTENT_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableCellContentClassName';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledTitle = styled.div`align-items: center;@@ -37,7 +36,7 @@ type RecordTableColumnHeadProps = {export const RecordTableColumnHead = ({recordField,}: RecordTableColumnHeadProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const correspondingFieldMetadataItem = useAtomFamilySelectorValue(fieldMetadataItemByIdSelector,diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHeadDropdownMenu.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHeadDropdownMenu.tsxindex e90d17e2935..6632270efa3 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHeadDropdownMenu.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHeadDropdownMenu.tsx@@ -14,7 +14,7 @@ import { LegacyDropdownContent } from '@/ui/layout/dropdown/components/LegacyDroimport { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { useToggleScrollWrapper } from '@/ui/utilities/scroll/hooks/useToggleScrollWrapper';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useLingui } from '@lingui/react/macro';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import {diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeader.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeader.tsxindex 80beffd6f90..536b85e3dd2 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeader.tsx@@ -10,7 +10,7 @@ import { useIsRecordTableCheckboxColumnHidden } from '@/object-record/record-tabimport { isRecordTableDragColumnHiddenComponentState } from '@/object-record/record-table/states/isRecordTableDragColumnHiddenComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';// The header takes the first slot of the virtualized row grid, whose pitch is// RECORD_TABLE_ROW_HEIGHT + 1 (row plus its bottom border).diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderAddColumnButton.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderAddColumnButton.tsxindex 8d8e89ae90f..ce8d7252592 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderAddColumnButton.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderAddColumnButton.tsx@@ -17,9 +17,8 @@ import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooimport { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { cx } from '@linaria/core';-import { useContext } from 'react';import { IconPlus } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledPlusIconHeaderCell = styled.div<{shouldDisplayBorderBottom: boolean;@@ -62,7 +61,7 @@ const StyledDropdownContainer = styled.div``;export const RecordTableHeaderAddColumnButton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isRecordTableRowActive = useAtomComponentFamilyStateValue(isRecordTableRowActiveComponentFamilyState,diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderCellContainer.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderCellContainer.tsxindex ee4459a841b..c3f47c342a4 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderCellContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderCellContainer.tsx@@ -1,6 +1,6 @@import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledHeaderCell = styled.div<{zIndex?: number;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderCheckboxColumn.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderCheckboxColumn.tsxindex 15d540e990b..1d62d37b319 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderCheckboxColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderCheckboxColumn.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { recordIndexAllRecordIdsComponentSelector } from '@/object-record/record-index/states/selectors/recordIndexAllRecordIdsComponentSelector';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidthClassName';diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderDragDropColumn.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderDragDropColumn.tsxindex d370ae5a523..c1acfe657ea 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderDragDropColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderDragDropColumn.tsx@@ -11,8 +11,7 @@ import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { cx } from '@linaria/core';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledDragDropHeaderCell = styled.div<{shouldDisplayBorderBottom: boolean;@@ -34,7 +33,7 @@ const StyledDragDropHeaderCell = styled.div<{`;export const RecordTableHeaderDragDropColumn = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isRecordTableScrolledVertically = useAtomComponentStateValue(isRecordTableScrolledVerticallyComponentState,diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderEmptyLastColumn.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderEmptyLastColumn.tsxindex 6cd38732dcb..df7ef17c4b8 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderEmptyLastColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderEmptyLastColumn.tsx@@ -11,7 +11,7 @@ import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { cx } from '@linaria/core';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledEmptyHeaderCell = styled.div<{shouldDisplayBorderBottom: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLabelIdentifierCellPlusButton.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLabelIdentifierCellPlusButton.tsxindex 8d862704a7b..112d19591be 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLabelIdentifierCellPlusButton.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLabelIdentifierCellPlusButton.tsx@@ -9,7 +9,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { LightIconButton } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';const StyledHeaderIcon = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLastEmptyColumn.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLastEmptyColumn.tsxindex 9bcb6841aa5..8bea3f07bb4 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLastEmptyColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderLastEmptyColumn.tsx@@ -10,7 +10,7 @@ import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { cx } from '@linaria/core';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLastColumnHeader = styled.div<{shouldDisplayBorderBottom: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableActionRow.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableActionRow.tsxindex 184d556dfbf..26ecf02f64e 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableActionRow.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableActionRow.tsx@@ -10,14 +10,13 @@ import { useRecordTableContextOrThrow } from '@/object-record/record-table/conteimport { RecordTableDragAndDropPlaceholderCell } from '@/object-record/record-table/record-table-cell/components/RecordTableDragAndDropPlaceholderCell';import { RecordTableAddButtonPlaceholderCell } from '@/object-record/record-table/record-table-row/components/RecordTableAddButtonPlaceholderCell';import { RecordTableGroupSectionLastDynamicFillingCell } from '@/object-record/record-table/record-table-row/components/RecordTableGroupSectionLastDynamicFillingCell';-import { useContext } from 'react';import {filterOutByProperty,findByProperty,sumByProperty,} from 'twenty-shared/utils';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledFieldPlaceholderCell = styled.div<{ widthOfFields: number }>`height: ${RECORD_TABLE_ROW_HEIGHT}px;@@ -100,7 +99,7 @@ export const RecordTableActionRow = ({text,onClick,}: RecordTableActionRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { visibleRecordFields } = useRecordTableContextOrThrow();const { labelIdentifierFieldMetadataItem } = useRecordIndexContextOrThrow();diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowDiv.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowDiv.tsxindex aa61f26e1db..36a3b89c0ae 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowDiv.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowDiv.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTr = styled.div<{isDragging: boolean;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowDragOverlayContent.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowDragOverlayContent.tsxindex 47ccdf92ccd..9d79a69572e 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowDragOverlayContent.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowDragOverlayContent.tsx@@ -2,7 +2,7 @@ import { type Draggable } from '@dnd-kit/dom';import { styled } from '@linaria/react';import { useMemo } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { HorizontalScrollBoxShadowCSS } from '@/object-record/record-table/components/HorizontalScrollBoxShadowCSS';import {diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-section/components/RecordTableRecordGroupAddNewGroup.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-section/components/RecordTableRecordGroupAddNewGroup.tsxindex 0bb53722915..531b82458a4 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-section/components/RecordTableRecordGroupAddNewGroup.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-section/components/RecordTableRecordGroupAddNewGroup.tsx@@ -5,7 +5,7 @@ import { recordIndexGroupFieldMetadataItemComponentState } from '@/object-recordimport { isRecordTableCellsNonEditableComponentState } from '@/object-record/record-table/states/isRecordTableCellsNonEditableComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const RECORD_TABLE_ADD_GROUP_DROPDOWN_ID = 'record-table-add-group-dropdown';diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-section/components/RecordTableRecordGroupSection.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-section/components/RecordTableRecordGroupSection.tsxindex 60bbe3e6a11..75564c90fc7 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-section/components/RecordTableRecordGroupSection.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-section/components/RecordTableRecordGroupSection.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { visibleRecordFieldsComponentSelector } from '@/object-record/record-field/states/visibleRecordFieldsComponentSelector';import { RecordGroupAggregateDropdown } from '@/object-record/record-group/components/RecordGroupAggregateDropdown';diff --git a/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableRowVirtualizedDebugRowHelper.tsx b/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableRowVirtualizedDebugRowHelper.tsxindex f1af6a6fa61..3f4c901dcbb 100644--- a/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableRowVirtualizedDebugRowHelper.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableRowVirtualizedDebugRowHelper.tsx@@ -12,7 +12,7 @@ import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDebugRow = styled.div`background-color: ${themeCssVariables.color.gray3};diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellTextFieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellTextFieldDisplay.tsxindex 291de7fb4b1..c4fd9c16bdc 100644--- a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellTextFieldDisplay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellTextFieldDisplay.tsx@@ -9,7 +9,7 @@ import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';import { useContext } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDiv = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellUuidFieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellUuidFieldDisplay.tsxindex 6aedcf22514..11c5b3174ce 100644--- a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellUuidFieldDisplay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellUuidFieldDisplay.tsx@@ -5,7 +5,7 @@ import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtoimport { styled } from '@linaria/react';import { useContext } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDiv = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleDoubleTextInput.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleDoubleTextInput.tsxindex 76099fbeab7..6d348c28ccc 100644--- a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleDoubleTextInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleDoubleTextInput.tsx@@ -9,7 +9,7 @@ import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeimport { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { splitFullName } from '~/utils/format/spiltFullName';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleFullNameFieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleFullNameFieldDisplay.tsxindex d2dfcd365a0..5d316ef29ab 100644--- a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleFullNameFieldDisplay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleFullNameFieldDisplay.tsx@@ -9,7 +9,7 @@ import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';import { useContext } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDiv = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsContainer.tsx b/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsContainer.tsxindex 5b1795d8f2c..4465a213556 100644--- a/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsContainer.tsx@@ -12,7 +12,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';import { useToast } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const UPDATE_MULTIPLE_RECORDS_CONFIRMATION_MODAL_ID ='update-multiple-records-confirmation';diff --git a/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsFooter.tsx b/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsFooter.tsxindex 231539f9106..45bbcc46bdf 100644--- a/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsFooter.tsx+++ b/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsFooter.tsx@@ -4,7 +4,7 @@ import { type ObjectRecordQueryProgress } from '@/object-record/types/ObjectRecoimport { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { Key } from 'ts-key-enum';import { IconBoxMultiple } from 'twenty-ui/icon';diff --git a/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsForm.tsx b/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsForm.tsxindex 0c2314e6f96..7ad46b96685 100644--- a/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsForm.tsx+++ b/packages/twenty-front/src/modules/object-record/record-update-multiple/components/UpdateMultipleRecordsForm.tsx@@ -10,7 +10,7 @@ import { styled } from '@linaria/react';import { FieldMetadataType } from 'twenty-shared/types';import { computeRelationGqlFieldJoinColumnName } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSectionContainer = styled.div`> * {diff --git a/packages/twenty-front/src/modules/onboarding/components/BookCallEmbed.tsx b/packages/twenty-front/src/modules/onboarding/components/BookCallEmbed.tsxindex 7ebaf3c0044..4f2aade1fac 100644--- a/packages/twenty-front/src/modules/onboarding/components/BookCallEmbed.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/BookCallEmbed.tsx@@ -6,7 +6,7 @@ import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMembeimport { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { getAttendeeName } from '@/onboarding/utils/getAttendeeName';-import { useThemeColorScheme } from 'twenty-ui/theme-constants';+import { useThemeColorScheme } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';type BookCallEmbedProps = {diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingHeader.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingHeader.tsxindex 87c0fb1baa8..0ff08b3c0ad 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingHeader.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingHeader.tsx@@ -4,11 +4,7 @@ import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconChevronLeft, IconCoins, IconInfoCircle } from 'twenty-ui/icon';-import {- MOBILE_VIEWPORT,- themeCssVariables,- useTheme,-} from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledHeader = styled.div`align-items: flex-start;diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsxindex 20c58a68f40..ebe0018cf42 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx@@ -1,7 +1,7 @@import { OnboardingHeader } from '@/onboarding/components/OnboardingHeader';import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledBackground = styled.div`background: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingModalCircularIcon.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingModalCircularIcon.tsxindex a0d474febb9..826a50a4723 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingModalCircularIcon.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingModalCircularIcon.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledCheckContainer = styled.div<{ color: string }>`align-items: center;@@ -23,7 +22,7 @@ type OnboardingModalCircularIconProps = {export const OnboardingModalCircularIcon = ({Icon,}: OnboardingModalCircularIconProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const color = theme.background.invertedPrimary;return (diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingPageLoader.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingPageLoader.tsxindex ce0ddc5ddf7..7f92577ee4c 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingPageLoader.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingPageLoader.tsx@@ -1,7 +1,7 @@import { isOnOnboardingVerifyPath } from '@/auth/utils/isOnOnboardingVerifyPath';import { OnboardingPulsingLogo } from '@/onboarding/components/OnboardingPulsingLogo';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingProfilePictureUploader.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingProfilePictureUploader.tsxindex 43facb086fd..3ea5b70bb45 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingProfilePictureUploader.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingProfilePictureUploader.tsx@@ -11,7 +11,7 @@ import { FileFolder } from 'twenty-shared/types';import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils';import { useToast } from 'twenty-ui/components';import { IconUserCircle } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';import { REACT_APP_SERVER_BASE_URL } from '~/config';const StyledUploader = styled.button`diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingPulsingLogo.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingPulsingLogo.tsxindex 0dacca93497..6b73f48ace7 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingPulsingLogo.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingPulsingLogo.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLogo = styled.img`animation: onboardingPulsingLogo 0.8s ease-in-out infinite alternate;diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingSkipButton.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingSkipButton.tsxindex 04a728b284c..c804ba9df95 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingSkipButton.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingSkipButton.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSkipButton = styled.button`background-color: transparent;diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingStepPageLoader.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingStepPageLoader.tsxindex e93e593ffd7..a76220ead75 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingStepPageLoader.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingStepPageLoader.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`background: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingVerifyLayout.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingVerifyLayout.tsxindex abf1734ba12..624bd236671 100644--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingVerifyLayout.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingVerifyLayout.tsx@@ -1,7 +1,7 @@import { OnboardingPulsingLogo } from '@/onboarding/components/OnboardingPulsingLogo';import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingActivationMessageEmphasis.ts b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingActivationMessageEmphasis.tsindex 223a6f8fd8d..e91154bbb1d 100644--- a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingActivationMessageEmphasis.ts+++ b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingActivationMessageEmphasis.ts@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledOnboardingActivationMessageEmphasis = styled.span`color: ${themeCssVariables.font.color.primary};diff --git a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepHeading.ts b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepHeading.tsindex 576795fcef4..98adfde87c9 100644--- a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepHeading.ts+++ b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepHeading.ts@@ -1,6 +1,6 @@import { StyledOnboardingContentBlock } from '@/onboarding/components/StyledOnboardingContentBlock';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledOnboardingStepHeading = styled(StyledOnboardingContentBlock)`gap: ${themeCssVariables.spacing[4]};diff --git a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepPage.ts b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepPage.tsindex b028591b28b..af7c285d9cb 100644--- a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepPage.ts+++ b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepPage.ts@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';export const StyledOnboardingStepPage = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepSubtitle.ts b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepSubtitle.tsindex f44b79e12ca..2eb269cf0e2 100644--- a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepSubtitle.ts+++ b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepSubtitle.ts@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledOnboardingStepSubtitle = styled.p`color: ${themeCssVariables.font.color.secondary};diff --git a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepTagsRow.ts b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepTagsRow.tsindex c2df9129ef7..c38450c65cf 100644--- a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepTagsRow.ts+++ b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepTagsRow.ts@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledOnboardingStepTagsRow = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepTitle.ts b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepTitle.tsindex 3af5bab0cf6..33e4ec2ac33 100644--- a/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepTitle.ts+++ b/packages/twenty-front/src/modules/onboarding/components/StyledOnboardingStepTitle.ts@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledOnboardingStepTitle = styled.h1`color: ${themeCssVariables.font.color.primary};diff --git a/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomeOverlay.tsx b/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomeOverlay.tsxindex 60311f057f0..6818ea5121c 100644--- a/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomeOverlay.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomeOverlay.tsx@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';import { type CSSProperties } from 'react';import { createPortal } from 'react-dom';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { WelcomeAnimationAutoLeaveEffect } from '@/onboarding/components/WelcomeOverlay/WelcomeAnimationAutoLeaveEffect';import { WelcomeAnimationForcedTeardownEffect } from '@/onboarding/components/WelcomeOverlay/WelcomeAnimationForcedTeardownEffect';diff --git a/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomePersonChip.tsx b/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomePersonChip.tsxindex 2b6acf4d27b..2fad5d452a8 100644--- a/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomePersonChip.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomePersonChip.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { Avatar, type AvatarSize } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';diff --git a/packages/twenty-front/src/modules/onboarding/components/WorkspaceSetupChatPreamble.tsx b/packages/twenty-front/src/modules/onboarding/components/WorkspaceSetupChatPreamble.tsxindex 70eb02d4fc8..637f96bdf80 100644--- a/packages/twenty-front/src/modules/onboarding/components/WorkspaceSetupChatPreamble.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/WorkspaceSetupChatPreamble.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { WelcomePersonChip } from '@/onboarding/components/WelcomeOverlay/WelcomePersonChip';import { WELCOME_TITLE_HANDOFF_TARGET_ELEMENT_ID } from '@/onboarding/constants/WelcomeTitleHandoffTargetElementId';diff --git a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingCreditsRewardTag.tsx b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingCreditsRewardTag.tsxindex 65d5c375243..2dfda8d48c9 100644--- a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingCreditsRewardTag.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingCreditsRewardTag.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconCoins } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledTag = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreview.tsx b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreview.tsxindex ed571a97f28..a7540767d6e 100644--- a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreview.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreview.tsx@@ -4,7 +4,7 @@ import { OnboardingImportPreviewSyncBadge } from '@/onboarding/components/importimport { OnboardingImportPrivacyNote } from '@/onboarding/components/import-contacts/OnboardingImportPrivacyNote';import { ONBOARDING_CONTENT_BLOCK_WIDTH } from '@/onboarding/constants/OnboardingContentBlockWidth';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const PREVIEW_HEIGHT = 198;diff --git a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewCompanies.tsx b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewCompanies.tsxindex 8acde67d9b5..09c38f9e38a 100644--- a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewCompanies.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewCompanies.tsx@@ -7,7 +7,7 @@ import { Avatar, Chip } from 'twenty-ui/primitives/data-display';import { Checkbox } from 'twenty-ui/primitives/input';import { IconBuildingSkyscraper, IconPlus } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const PREVIEW_ROW_HEIGHT = 32;diff --git a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewEmails.tsx b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewEmails.tsxindex 7ff1d5b6b2f..f6963516bb9 100644--- a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewEmails.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewEmails.tsx@@ -8,7 +8,7 @@ import {} from '@/onboarding/constants/ImportContactsPreviewEmails';import { styled } from '@linaria/react';import { IconStar } from 'twenty-ui/icon';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';const EMAIL_ROW_HEIGHT = 32;const EMAIL_CHECKBOX_SIZE = 12;diff --git a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewSyncBadge.tsx b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewSyncBadge.tsxindex f151f8cae0d..d7916ac9c10 100644--- a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewSyncBadge.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewSyncBadge.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { IconArrowRight, IconGoogle, IconMicrosoft } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const SYNC_BADGE_LOGO_SIZE = 16;diff --git a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPrivacyNote.tsx b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPrivacyNote.tsxindex 3b56fe0f566..342108402a9 100644--- a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPrivacyNote.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPrivacyNote.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconLock } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const PRIVACY_NOTE_ICON_SIZE = 12;diff --git a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingTrustBadges.tsx b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingTrustBadges.tsxindex 7641f6b8719..a185a8b2f30 100644--- a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingTrustBadges.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingTrustBadges.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const BADGE_ASSET_PATH = '/images/onboarding/trust-badges';diff --git a/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/ChooseYourPlanErrorState.tsx b/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/ChooseYourPlanErrorState.tsxindex fe3608c70e7..df57968b910 100644--- a/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/ChooseYourPlanErrorState.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/ChooseYourPlanErrorState.tsx@@ -9,7 +9,7 @@ import { styled } from '@linaria/react';import { Trans, useLingui } from '@lingui/react/macro';import { MainButton } from 'twenty-ui/components';import { ClickToActionLink } from 'twenty-ui/primitives/navigation';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFooter = styled(StyledOnboardingContentBlock)`align-items: center;diff --git a/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/OnboardingPlanCard.tsx b/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/OnboardingPlanCard.tsxindex ecf0a9b74cb..5ab610a20c0 100644--- a/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/OnboardingPlanCard.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/OnboardingPlanCard.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { isValidElement, type ReactNode, useId } from 'react';import { isDefined } from 'twenty-shared/utils';import { Radio } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCard = styled.div`background-color: ${themeCssVariables.background.primary};diff --git a/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/OnboardingTrialExtensionTag.tsx b/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/OnboardingTrialExtensionTag.tsxindex dd1a5160e95..7f672b5038a 100644--- a/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/OnboardingTrialExtensionTag.tsx+++ b/packages/twenty-front/src/modules/onboarding/components/upgrade-free-trial/OnboardingTrialExtensionTag.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconCalendarEvent } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledTag = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useOnboardingMotionTransition.ts b/packages/twenty-front/src/modules/onboarding/hooks/useOnboardingMotionTransition.tsindex 5f68611fbfa..e11b5453dee 100644--- a/packages/twenty-front/src/modules/onboarding/hooks/useOnboardingMotionTransition.ts+++ b/packages/twenty-front/src/modules/onboarding/hooks/useOnboardingMotionTransition.ts@@ -1,5 +1,5 @@import { type Transition, useReducedMotion } from 'framer-motion';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const useOnboardingMotionTransition = (): Transition => {const theme = useTheme();diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridLayout.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridLayout.tsxindex f6b6010c07e..49083ea3ad9 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridLayout.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridLayout.tsx@@ -41,7 +41,7 @@ import {verticalCompactor,} from 'react-grid-layout';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const disabledTransitionsClass = css`.react-grid-layout {diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridOverlay.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridOverlay.tsxindex db9e35af7c5..6359a8d1ea4 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridOverlay.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridOverlay.tsx@@ -11,7 +11,7 @@ import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { useMemo } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledGridOverlay = styled.div<{isDragSelecting?: boolean;diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridResizeHandle.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridResizeHandle.tsxindex 189906b0ef6..d73349fd3d0 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridResizeHandle.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutGridResizeHandle.tsx@@ -1,12 +1,12 @@import { styled } from '@linaria/react';-import { forwardRef, useContext } from 'react';+import { forwardRef } from 'react';import {IconRadiusBottomLeft,IconRadiusBottomRight,IconRadiusTopLeft,IconRadiusTopRight,} from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type WidgetHandleAxis = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';type WidgetHorizontalHandleAxis = 'n' | 's';type WidgetVerticalHandleAxis = 'e' | 'w';@@ -182,7 +182,7 @@ export const PageLayoutGridResizeHandle = forwardRef<},ref,) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledResizeHandleWrapperdiff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutLeftPanel.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutLeftPanel.tsxindex aff64f2ea68..f551dde0ead 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutLeftPanel.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutLeftPanel.tsx@@ -11,7 +11,7 @@ import { useTargetRecord } from '@/ui/layout/contexts/useTargetRecord';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { styled } from '@linaria/react';import { PageLayoutType } from '~/generated-metadata/graphql';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`--record-card-background-color: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutRecordIdentifierBar.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutRecordIdentifierBar.tsxindex 382311fb92f..bedbd8db943 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutRecordIdentifierBar.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutRecordIdentifierBar.tsx@@ -12,7 +12,7 @@ import { type ReactNode } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconPinned } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const SIDE_TRACK = `min(${PAGE_LAYOUT_LEFT_PANEL_CONTAINER_WIDTH}px, calc(100% / 3))`;diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutSingleTabRenderer.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutSingleTabRenderer.tsxindex c2fb56641a3..8ae1550b496 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutSingleTabRenderer.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutSingleTabRenderer.tsx@@ -24,7 +24,7 @@ import { TabListComponentInstanceContext } from '@/ui/layout/tab-list/states/conimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRecordIdentifierBar = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabList.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabList.tsxindex b7b09057288..ba21bf0116f 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabList.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabList.tsx@@ -47,7 +47,7 @@ import { TabListDropdown } from '@/ui/layout/tab-list/components/TabListDropdownimport { type SingleTabProps } from '@/ui/layout/tab-list/types/SingleTabProps';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {PageLayoutTabLayoutMode,PageLayoutType,diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabListDroppableMoreButton.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabListDroppableMoreButton.tsxindex 13358dc7e05..d6c61504bb3 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabListDroppableMoreButton.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabListDroppableMoreButton.tsx@@ -6,7 +6,7 @@ import { PAGE_LAYOUT_TAB_LIST_DROPPABLE_IDS } from '@/page-layout/components/Pagimport { PAGE_LAYOUT_TAB_DND_TYPE } from '@/page-layout/constants/PageLayoutTabDndType';import { type PageLayoutTabMoreButtonDropData } from '@/page-layout/types/PageLayoutTabMoreButtonDropData';import { TabMoreButton } from '@/ui/layout/tab-list/components/TabMoreButton';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type PageLayoutTabListDroppableMoreButtonProps = {hiddenTabsCount: number;diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabsRenderer.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabsRenderer.tsxindex 0e6b051d6ad..b37e887e3f9 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabsRenderer.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutTabsRenderer.tsx@@ -28,7 +28,7 @@ import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { PageLayoutType } from '~/generated-metadata/graphql';const StyledRoot = styled.div`diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutVerticalList.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutVerticalList.tsxindex c7a345a763a..8f964666a01 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutVerticalList.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutVerticalList.tsx@@ -13,7 +13,7 @@ import { useDroppable } from '@dnd-kit/react';import { styled } from '@linaria/react';import { Fragment, type ReactNode, useCallback } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PageLayoutTabLayoutMode } from '~/generated-metadata/graphql';const StyledVerticalListContainer = styled.div<{diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutVerticalListWidgetSlot.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutVerticalListWidgetSlot.tsxindex 80d0597af5b..62f5a6b09c3 100644--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutVerticalListWidgetSlot.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutVerticalListWidgetSlot.tsx@@ -6,7 +6,7 @@ import { DragDropItemDropTarget } from '@/ui/utilities/drag-and-drop/components/import { DragDropItemSortableCell } from '@/ui/utilities/drag-and-drop/components/DragDropItemSortableCell';import { type Draggable } from '@dnd-kit/abstract';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledWidgetSlot = styled.div<{isInEditMode: boolean;diff --git a/packages/twenty-front/src/modules/page-layout/components/__stories__/PageLayoutTabList.stories.tsx b/packages/twenty-front/src/modules/page-layout/components/__stories__/PageLayoutTabList.stories.tsxindex 88dc92e44c3..c9dc4fa8e46 100644--- a/packages/twenty-front/src/modules/page-layout/components/__stories__/PageLayoutTabList.stories.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/__stories__/PageLayoutTabList.stories.tsx@@ -18,7 +18,7 @@ import { LayoutRenderingProvider } from '@/ui/layout/contexts/LayoutRenderingConimport { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PageLayoutType } from '~/generated-metadata/graphql';import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';diff --git a/packages/twenty-front/src/modules/page-layout/components/dnd/PageLayoutTabWidgetDropTarget.tsx b/packages/twenty-front/src/modules/page-layout/components/dnd/PageLayoutTabWidgetDropTarget.tsxindex 19965fe60ca..51236d0ee68 100644--- a/packages/twenty-front/src/modules/page-layout/components/dnd/PageLayoutTabWidgetDropTarget.tsx+++ b/packages/twenty-front/src/modules/page-layout/components/dnd/PageLayoutTabWidgetDropTarget.tsx@@ -3,7 +3,7 @@ import { pointerIntersection } from '@dnd-kit/collision';import { useDroppable } from '@dnd-kit/react';import { styled } from '@linaria/react';import { type ReactNode, useCallback } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PAGE_LAYOUT_TAB_DROP_TARGET_DATA_ATTRIBUTE } from '@/page-layout/constants/PageLayoutTabDropTargetDataAttribute';import { pageLayoutGridDragHoveredTabIdComponentState } from '@/page-layout/states/pageLayoutGridDragHoveredTabIdComponentState';diff --git a/packages/twenty-front/src/modules/page-layout/constants/PageLayoutBreakpoints.ts b/packages/twenty-front/src/modules/page-layout/constants/PageLayoutBreakpoints.tsindex 702c4f58cb9..115d947c862 100644--- a/packages/twenty-front/src/modules/page-layout/constants/PageLayoutBreakpoints.ts+++ b/packages/twenty-front/src/modules/page-layout/constants/PageLayoutBreakpoints.ts@@ -1,4 +1,4 @@-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme';export const PAGE_LAYOUT_CONFIG = {breakpoints: {diff --git a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingAudioPlayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingAudioPlayer.tsxindex e548d8b0975..f045f0e498c 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingAudioPlayer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingAudioPlayer.tsx@@ -11,7 +11,7 @@ import {} from 'twenty-ui/icon';import { Button, Slider } from 'twenty-ui/primitives/input';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledAudioBar = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryList.tsx b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryList.tsxindex 3e00d003e1a..793136f32d2 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryList.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryList.tsx@@ -14,7 +14,7 @@ import {} from 'react';import { type CallRecordingParsedTranscriptEntry } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTranscriptContainer = styled.div`height: 100%;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryListItem.tsx b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryListItem.tsxindex 220f9f598ea..d06118ee732 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryListItem.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryListItem.tsx@@ -7,7 +7,7 @@ import { type Ref } from 'react';import { type CallRecordingParsedTranscriptEntry } from 'twenty-shared/types';import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';import { Avatar, Chip } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledEntry = styled.li<{hasPlaybackControls: boolean;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryWords.tsx b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryWords.tsxindex 6d1d69a5fcd..dd684796892 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryWords.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryWords.tsx@@ -4,7 +4,7 @@ import { INITIAL_CALL_RECORDING_TRANSCRIPT_PLAYBACK_POSITION } from '@/page-layoimport { styled } from '@linaria/react';import { useState } from 'react';import { type CallRecordingParsedTranscriptWord } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledWord = styled.span<{ isSpoken: boolean }>`color: ${({ isSpoken }) =>diff --git a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingVideoPlayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingVideoPlayer.tsxindex efae75eab18..64d91a5c75c 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingVideoPlayer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingVideoPlayer.tsx@@ -3,7 +3,7 @@ import { t } from '@lingui/core/macro';import { useState, type Ref } from 'react';import { CircularProgressBar } from 'twenty-ui/primitives/feedback';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';// Forces Safari to decode the first frame under preload="metadata".const FIRST_FRAME_SEEK_FRAGMENT = '#t=0.001';diff --git a/packages/twenty-front/src/modules/page-layout/widgets/components/RecordPageAddWidgetSection.tsx b/packages/twenty-front/src/modules/page-layout/widgets/components/RecordPageAddWidgetSection.tsxindex 40cca9fe4da..a60a8c65066 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/components/RecordPageAddWidgetSection.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/components/RecordPageAddWidgetSection.tsx@@ -15,7 +15,7 @@ import {IconNotes,IconPlus,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`border: 1px solid transparent;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/components/RecordPageWidgetInsertionSeparator.tsx b/packages/twenty-front/src/modules/page-layout/widgets/components/RecordPageWidgetInsertionSeparator.tsxindex 448d5a5b2ef..26ba9fa5f61 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/components/RecordPageWidgetInsertionSeparator.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/components/RecordPageWidgetInsertionSeparator.tsx@@ -5,7 +5,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { IconButton } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const INSERT_BUTTON_CLASS_NAME = css`background: ${themeCssVariables.background.transparent.primary};diff --git a/packages/twenty-front/src/modules/page-layout/widgets/components/StandaloneWidgetPlaceholder.tsx b/packages/twenty-front/src/modules/page-layout/widgets/components/StandaloneWidgetPlaceholder.tsxindex 8bdc0e0f849..8fab1a929c1 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/components/StandaloneWidgetPlaceholder.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/components/StandaloneWidgetPlaceholder.tsx@@ -2,7 +2,7 @@ import { AnimatedPlaceholder } from '@/ui/feedback/empty-state/components/Animatimport { EmptyState } from '@/ui/feedback/empty-state/components/EmptyState';import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledPlaceholderContainer = styled.div`background: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetCardShell.tsx b/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetCardShell.tsxindex c8b04f4712f..45bb8ddb684 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetCardShell.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetCardShell.tsx@@ -14,10 +14,10 @@ import { WidgetCard } from '@/page-layout/widgets/widget-card/components/WidgetCimport { WidgetCardContent } from '@/page-layout/widgets/widget-card/components/WidgetCardContent';import { WidgetCardHeader } from '@/page-layout/widgets/widget-card/components/WidgetCardHeader';import { styled } from '@linaria/react';-import { type MouseEvent, useContext } from 'react';+import { type MouseEvent } from 'react';import { ErrorBoundary } from 'react-error-boundary';import { IconLock } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import {PageLayoutTabLayoutMode,PageLayoutType,@@ -61,7 +61,7 @@ export const WidgetCardShell = ({onMouseEnter,onMouseLeave,}: WidgetCardShellProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { layoutMode } = usePageLayoutContentContext();const { currentPageLayout } = useCurrentPageLayoutOrThrow();diff --git a/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetContentFrame.tsx b/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetContentFrame.tsxindex 90bf7e5ea7e..5b54368d148 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetContentFrame.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetContentFrame.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';// Containment boundary for third-party widget content, which the page cannot// style and must not let bleed into its neighbours.diff --git a/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetRelationsHeader.tsx b/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetRelationsHeader.tsxindex aee2f1e02b8..04e4d064611 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetRelationsHeader.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetRelationsHeader.tsx@@ -5,7 +5,7 @@ import { useWorkspaceSurface } from '@/ui/layout/hooks/useWorkspaceSurface';import { SidePanelProvider } from '@/ui/layout/side-panel/contexts/SidePanelContext';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetSkeletonLoader.tsx b/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetSkeletonLoader.tsxindex b3077966ccf..f3746e532f0 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/components/WidgetSkeletonLoader.tsx@@ -1,8 +1,7 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;@@ -13,7 +12,7 @@ const StyledContainer = styled.div``;export const WidgetSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer><SkeletonThemediff --git a/packages/twenty-front/src/modules/page-layout/widgets/email-thread/components/EmailThreadComposer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/email-thread/components/EmailThreadComposer.tsxindex 3566e49d9e3..aa734e3763c 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/email-thread/components/EmailThreadComposer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/email-thread/components/EmailThreadComposer.tsx@@ -20,7 +20,7 @@ import {IconSend,IconX,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getOsControlSymbol } from 'twenty-ui/utilities';const StyledReplyBar = styled.button`diff --git a/packages/twenty-front/src/modules/page-layout/widgets/email-thread/components/EmailThreadIntermediaryMessages.tsx b/packages/twenty-front/src/modules/page-layout/widgets/email-thread/components/EmailThreadIntermediaryMessages.tsxindex 05a77200904..3f4d89e797a 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/email-thread/components/EmailThreadIntermediaryMessages.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/email-thread/components/EmailThreadIntermediaryMessages.tsx@@ -6,7 +6,7 @@ import { type EmailThreadMessageWithSender } from '@/activities/emails/types/Emaimport { t } from '@lingui/core/macro';import { IconArrowsVertical } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledButtonContainer = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetInlineCellContainer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetInlineCellContainer.tsxindex 454f8673dd4..58c13569e17 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetInlineCellContainer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetInlineCellContainer.tsx@@ -5,7 +5,7 @@ import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContimport { useFieldFocus } from '@/object-record/record-field/ui/hooks/useFieldFocus';import { useRecordInlineCellContext } from '@/object-record/record-inline-cell/components/RecordInlineCellContext';import { RecordInlineCellValue } from '@/object-record/record-inline-cell/components/RecordInlineCellValue';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledValueContainer = styled.div<{ readonly: boolean }>`display: flex;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationRecordChips.tsx b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationRecordChips.tsxindex 0b01806d345..ef8cf739a72 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationRecordChips.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationRecordChips.tsx@@ -2,7 +2,7 @@ import { RecordChip } from '@/object-record/components/RecordChip';import { type FieldWidgetRelationRecord } from '@/page-layout/widgets/field/types/FieldWidgetRelationRecord';import { SidePanelProvider } from '@/ui/layout/side-panel/contexts/SidePanelContext';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`box-sizing: border-box;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationRecordsCard.tsx b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationRecordsCard.tsxindex 320e9f92b68..cff94c7be77 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationRecordsCard.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationRecordsCard.tsx@@ -28,7 +28,7 @@ import { useCurrentWidget } from '@/page-layout/widgets/hooks/useCurrentWidget';import { StyledWidgetContentContainer } from '@/ui/layout/components/WidgetContentContainer';import { useTargetRecord } from '@/ui/layout/contexts/useTargetRecord';import { SidePanelProvider } from '@/ui/layout/side-panel/contexts/SidePanelContext';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledShowMoreButtonContainer = styled.div`padding-top: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRichTextEditor.tsx b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRichTextEditor.tsxindex a7400ff5992..1931941c6a1 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRichTextEditor.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRichTextEditor.tsx@@ -5,10 +5,10 @@ import { recordStoreFamilySelector } from '@/object-record/record-store/states/simport { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { styled } from '@linaria/react';-import { lazy, Suspense, useContext } from 'react';+import { lazy, Suspense } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { isUndefined } from '@sniptt/guards';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const RichTextFieldEditor = lazy(() =>import('@/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor').then(@@ -41,7 +41,7 @@ const StyledSkeletonContainer = styled.div``;const LoadingSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledSkeletonContainer><SkeletonThemediff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetShowMoreButton.tsx b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetShowMoreButton.tsxindex fb1645ba206..67ffb052634 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetShowMoreButton.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetShowMoreButton.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { IconChevronDown } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type FieldWidgetShowMoreButtonProps = {remainingCount: number;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetTextEditor.tsx b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetTextEditor.tsxindex dbdfe015e92..8554b70812a 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetTextEditor.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetTextEditor.tsx@@ -8,7 +8,7 @@ import { recordStoreFamilySelector } from '@/object-record/record-store/states/simport { TextArea } from '@/ui/input/components/TextArea';import { useAtomFamilySelectorState } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorState';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`box-sizing: border-box;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationEmptyGroupDropZone.tsx b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationEmptyGroupDropZone.tsxindex 87c4a111662..6ae87afe7d6 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationEmptyGroupDropZone.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationEmptyGroupDropZone.tsx@@ -2,7 +2,7 @@ import { pointerIntersection } from '@dnd-kit/collision';import { useDroppable } from '@dnd-kit/react';import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { FIELDS_CONFIGURATION_FIELD_DND_TYPE } from '@/page-layout/widgets/fields/constants/FieldsConfigurationFieldDndType';import { type FieldsConfigurationFieldListEndDropData } from '@/page-layout/widgets/fields/types/FieldsConfigurationFieldListEndDropData';diff --git a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupDraggableHeader.tsx b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupDraggableHeader.tsxindex 3f684b5c2d4..fda94c08a18 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupDraggableHeader.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupDraggableHeader.tsx@@ -1,9 +1,8 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconGripVertical } from 'twenty-ui/icon';import { Text } from 'twenty-ui/primitives/typography';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;@@ -30,7 +29,7 @@ type FieldsConfigurationGroupDraggableHeaderProps = {export const FieldsConfigurationGroupDraggableHeader = ({text,}: FieldsConfigurationGroupDraggableHeaderProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer>diff --git a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupEditor.tsx b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupEditor.tsxindex b8da6f694e6..3857e3328ea 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupEditor.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupEditor.tsx@@ -21,7 +21,7 @@ import { DragDropItemSortableCell } from '@/ui/utilities/drag-and-drop/componentimport { DragDropItemSortableHandle } from '@/ui/utilities/drag-and-drop/components/DragDropItemSortableHandle';import { FieldsConfigurationGroupDraggableHeader } from '@/page-layout/widgets/fields/components/FieldsConfigurationGroupDraggableHeader';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFieldsDroppable = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupRenameInput.tsx b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupRenameInput.tsxindex 420d6fd2a06..09d782c783a 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupRenameInput.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupRenameInput.tsx@@ -5,7 +5,7 @@ import { Key } from 'ts-key-enum';import { TextInput } from '@/ui/input/components/TextInput';import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsWidget.tsx b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsWidget.tsxindex 6ca55966e41..20998558be2 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsWidget.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsWidget.tsx@@ -18,7 +18,7 @@ import { SidePanelProvider } from '@/ui/layout/side-panel/contexts/SidePanelContimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type FieldsConfiguration } from '~/generated-metadata/graphql';const StyledPropertyBox = styled.div`diff --git a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsWidgetGroupContainer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsWidgetGroupContainer.tsxindex 56471cc33c5..2f94f82d331 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsWidgetGroupContainer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/fields/components/FieldsWidgetGroupContainer.tsx@@ -1,9 +1,9 @@import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { Section } from 'twenty-ui/components';import { IconChevronDown } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledHeader = styled.header`align-items: center;@@ -38,7 +38,7 @@ export const FieldsWidgetGroupContainer = ({title,defaultExpanded = true,}: FieldsWidgetGroupContainerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [isExpanded, setIsExpanded] = useState(defaultExpanded);const handleToggleGroup = () =>diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/AxisLabel.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/AxisLabel.tsxindex fca42fabab7..ec1aa780e29 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/AxisLabel.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/AxisLabel.tsx@@ -1,6 +1,5 @@-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type AxisLabelProps = {label: string;@@ -17,7 +16,7 @@ export const AxisLabel = ({fontSize,rotation,}: AxisLabelProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<textdiff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/AxisLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/AxisLayer.tsxindex 2b585985acd..f071b82ccfe 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/AxisLayer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/AxisLayer.tsx@@ -6,8 +6,7 @@ import { type AxisLayerConfig } from '@/page-layout/widgets/graph/chart-core/typimport { getAxisLayerLayout } from '@/page-layout/widgets/graph/chart-core/utils/getAxisLayerLayout';import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins';import { styled } from '@linaria/react';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type AxisLayerProps = {bottomAxisTickRotation: number;@@ -54,7 +53,7 @@ export const AxisLayer = ({yAxisLabel,axisConfig,}: AxisLayerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const tickFontSize = axisConfig.tickFontSize;const legendFontSize = axisConfig.legendFontSize;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/BottomAxisTicks.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/BottomAxisTicks.tsxindex dc0630435f1..3becdd2b3f2 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/BottomAxisTicks.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/BottomAxisTicks.tsx@@ -1,5 +1,4 @@-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type BottomAxisTicksProps = {bottomTickValues: (string | number)[];getBottomTickPosition: (value: string | number, index: number) => number;@@ -19,7 +18,7 @@ export const BottomAxisTicks = ({tickPadding,tickFontSize,}: BottomAxisTicksProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<>diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/LeftAxisTicks.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/LeftAxisTicks.tsxindex b635d4b2eb7..7cbc3f08c32 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/LeftAxisTicks.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/LeftAxisTicks.tsx@@ -1,5 +1,4 @@-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type LeftAxisTicksProps = {leftTickValues: (string | number)[];getLeftTickPosition: (value: string | number, index: number) => number;@@ -15,7 +14,7 @@ export const LeftAxisTicks = ({tickPadding,tickFontSize,}: LeftAxisTicksProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<>diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/ZeroLine.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/ZeroLine.tsxindex 919de8782fa..897ceee19e9 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/ZeroLine.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/chart-core/layers/ZeroLine.tsx@@ -1,5 +1,4 @@-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type ZeroLineProps = {isVertical: boolean;zeroPosition: number;@@ -13,7 +12,7 @@ export const ZeroLine = ({innerWidth,innerHeight,}: ZeroLineProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<linediff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphDataLabel.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphDataLabel.tsxindex a737f902e98..409c8044ed8 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphDataLabel.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphDataLabel.tsx@@ -1,9 +1,8 @@import { type GraphLabelData } from '@/page-layout/widgets/graph/types/GraphLabelData';import { calculateGraphLabelStyles } from '@/page-layout/widgets/graph/utils/calculateGraphLabelStyles';import { animated } from '@react-spring/web';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type GraphDataLabelProps = {label: GraphLabelData;@@ -18,7 +17,7 @@ export const GraphDataLabel = ({offset,isVerticalLayout,}: GraphDataLabelProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const styles = calculateGraphLabelStyles(label, offset, isVerticalLayout);diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetFloatingTooltip.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetFloatingTooltip.tsxindex dfa6ba868f0..e8e1f7f58fe 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetFloatingTooltip.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetFloatingTooltip.tsx@@ -5,9 +5,8 @@ import {import { useGraphWidgetTooltipFloating } from '@/page-layout/widgets/graph/hooks/useGraphWidgetTooltipFloating';import { FloatingPortal, type VirtualElement } from '@floating-ui/react';import { animated, useSpring } from '@react-spring/web';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type GraphWidgetFloatingTooltipProps = {reference: Element | VirtualElement | null;boundary: Element | null;@@ -33,7 +32,7 @@ export const GraphWidgetFloatingTooltip = ({onMouseLeave,disablePointerEvents = false,}: GraphWidgetFloatingTooltipProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { refs, x, y, isPositioned } = useGraphWidgetTooltipFloating(reference,diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetLegend.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetLegend.tsxindex f6abf4f9dec..1d27a3c9336 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetLegend.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetLegend.tsx@@ -13,11 +13,11 @@ import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSeimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { AnimatePresence, motion } from 'framer-motion';-import { useContext, useRef, useState } from 'react';+import { useRef, useState } from 'react';import { LightIconButton } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronLeft, IconChevronRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type GraphWidgetLegendItem = {id: string;@@ -136,7 +136,7 @@ export const GraphWidgetLegend = ({items,show = true,}: GraphWidgetLegendProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const containerRef = useRef<HTMLDivElement>(null);diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetTooltip.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetTooltip.tsxindex 227973c1d32..82cb2d71256 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetTooltip.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidgetTooltip.tsx@@ -5,10 +5,9 @@ import { GraphWidgetLegendDot } from '@/page-layout/widgets/graph/components/Graimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconArrowUpRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledTooltip = styled.div`background: ${themeCssVariables.background.primary};@@ -153,7 +152,7 @@ export const GraphWidgetTooltip = ({highlightedKey,onGraphWidgetTooltipClick,}: GraphWidgetTooltipProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const filteredItems = items.filter((item) => item.value !== 0 && isNonEmptyString(item.formattedValue),diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/NoDataLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/NoDataLayer.tsxindex 3c3defcadf1..78df65abdcb 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/NoDataLayer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/NoDataLayer.tsx@@ -1,6 +1,5 @@import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type NoDataLayerProps = {innerWidth: number;@@ -13,7 +12,7 @@ export const NoDataLayer = ({innerHeight,hasNoData,}: NoDataLayerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();if (!hasNoData) {diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart.tsxindex c81efdb04fc..d40baa6e981 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart.tsx@@ -1,10 +1,9 @@import { formatNumberChartTrend } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/formatNumberChartTrend';import { styled } from '@linaria/react';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconTrendingDown, IconTrendingUp } from 'twenty-ui/icon';import { Heading } from 'twenty-ui/primitives/typography';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type GraphWidgetAggregateChartProps = {value: string | number;trendPercentage?: number;@@ -46,7 +45,7 @@ export const GraphWidgetAggregateChart = ({prefix,suffix,}: GraphWidgetAggregateChartProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const formattedPercentage = isDefined(trendPercentage)? formatNumberChartTrend(trendPercentage)diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChart.tsxindex 80b900112f7..b9d81804003 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChart.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChart.tsx@@ -16,9 +16,9 @@ import {} from '@/page-layout/widgets/graph/utils/graphFormatters';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';-import { type MouseEvent, useContext } from 'react';+import { type MouseEvent } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { BarChartLayout } from '~/generated-metadata/graphql';type BarChartProps = {data: BarChartDatum[];@@ -81,7 +81,7 @@ export const BarChart = ({allowDataTransitions,hasNoData = false,}: BarChartProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const graphWidgetHighlightedLegendId = useAtomComponentStateValue(graphWidgetHighlightedLegendIdComponentState,diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayerEffect.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayerEffect.tsxindex 7293d0008ed..f07fe576309 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayerEffect.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayerEffect.tsx@@ -7,15 +7,9 @@ import { computeBaselineBar } from '@/page-layout/widgets/graph/graph-widget-barimport { interpolateBars } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/interpolateBars';import { renderBars } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderBars';import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins';-import {- type RefObject,- useCallback,- useContext,- useEffect,- useState,-} from 'react';+import { type RefObject, useCallback, useEffect, useState } from 'react';import { BarChartLayout } from '~/generated-metadata/graphql';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type BarChartBaseLayerEffectProps = {bars: BarPosition[];@@ -51,7 +45,7 @@ export const BarChartBaseLayerEffect = ({allowDataTransitions,canvasRef,}: BarChartBaseLayerEffectProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const borderRadius = parseInt(theme.border.radius.sm);const gridColor = theme.border.color.light;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayerEffect.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayerEffect.tsxindex 3b669ac0876..68bc3e8fb1c 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayerEffect.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayerEffect.tsx@@ -2,9 +2,9 @@ import { CHART_CORE_CONSTANTS } from '@/page-layout/widgets/graph/chart-core/conimport { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice';import { renderSliceHighlight } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderSliceHighlight';import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins';-import { type RefObject, useContext, useEffect, useState } from 'react';+import { type RefObject, useEffect, useState } from 'react';import { BarChartLayout } from '~/generated-metadata/graphql';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type BarChartHoverLayerEffectProps = {hoveredSlice: BarChartSlice | null;@@ -23,7 +23,7 @@ export const BarChartHoverLayerEffect = ({layout,canvasRef,}: BarChartHoverLayerEffectProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [dpr] = useState<number>(() =>diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart.tsxindex 77560a0fba5..5442c0e3142 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart.tsx@@ -28,9 +28,9 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';import { styled } from '@linaria/react';import { isNumber } from '@sniptt/guards';-import { useContext, useMemo, useRef, useState } from 'react';+import { useMemo, useRef, useState } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';import { BarChartLayout } from '~/generated-metadata/graphql';@@ -93,7 +93,7 @@ export const GraphWidgetBarChart = ({customFormatter,onSliceClick,}: GraphWidgetBarChartProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const colorRegistry = createGraphColorRegistry(theme.color);const [chartWidth, setChartWidth] = useState<number>(0);diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartTheme.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartTheme.tsindex 1461ad6823b..d654de6cc93 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartTheme.ts+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartTheme.ts@@ -1,10 +1,9 @@import { COMMON_CHART_CONSTANTS } from '@/page-layout/widgets/graph/constants/CommonChartConstants';import { parseFontSizeToPx } from '@/page-layout/widgets/graph/utils/parseFontSizeToPx';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const useBarChartTheme = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const tickFontSize = COMMON_CHART_CONSTANTS.AXIS_FONT_SIZE;const legendFontSize = parseFontSizeToPx(theme.font.size.sm, tickFontSize);diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomCrosshairLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomCrosshairLayer.tsxindex d92146d2e39..8f1edcded8a 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomCrosshairLayer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomCrosshairLayer.tsx@@ -3,9 +3,9 @@ import { graphWidgetLineCrosshairXComponentState } from '@/page-layout/widgets/gimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { type LineSeries, type Point } from '@nivo/line';import { motion } from 'framer-motion';-import { type MouseEvent, useCallback, useContext, useMemo } from 'react';+import { type MouseEvent, useCallback, useMemo } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export type SliceHoverData = {sliceX: number;@@ -40,7 +40,7 @@ export const CustomCrosshairLayer = ({onSliceClick,onRectLeave,}: CustomCrosshairLayerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const graphWidgetLineCrosshairX = useAtomComponentStateValue(graphWidgetLineCrosshairXComponentState,diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart.tsxindex f38149539ba..b05b4e36ce5 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart.tsx@@ -35,9 +35,9 @@ import {type Point,type SliceTooltipProps,} from '@nivo/line';-import { useCallback, useContext, useRef, useState } from 'react';+import { useCallback, useRef, useState } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';type CrosshairLayerProps = LineCustomSvgLayerProps<LineSeries>;@@ -97,7 +97,7 @@ export const GraphWidgetLineChart = ({customFormatter,onSliceClick,}: GraphWidgetLineChartProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const colorRegistry = createGraphColorRegistry(theme.color);const chartTheme = useLineChartTheme();const containerRef = useRef<HTMLDivElement>(null);diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartTheme.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartTheme.tsindex c45a536c9f8..1ea7d68e45a 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartTheme.ts+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartTheme.ts@@ -1,9 +1,8 @@import { parseFontSizeToPx } from '@/page-layout/widgets/graph/utils/parseFontSizeToPx';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const useLineChartTheme = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const tickFontSize = 12;const legendFontSize = parseFontSizeToPx(theme.font.size.sm, tickFontSize);diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsxindex 39b18f38d3b..3e0af8df82d 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx@@ -24,12 +24,11 @@ import {import {type MouseEvent as ReactMouseEvent,useCallback,- useContext,useMemo,useRef,} from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type PieChartConfiguration } from '~/generated-metadata/graphql';type GraphWidgetPieChartProps = {@@ -91,7 +90,7 @@ export const GraphWidgetPieChart = ({showDataLabels = false,showCenterMetric = true,}: GraphWidgetPieChartProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const colorRegistry = createGraphColorRegistry(theme.color);const containerRef = useRef<HTMLDivElement>(null);const setGraphWidgetPieTooltip = useSetAtomComponentState(diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/PieChartCenterMetricLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/PieChartCenterMetricLayer.tsxindex 2c63e03309b..5c58b2037b1 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/PieChartCenterMetricLayer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/PieChartCenterMetricLayer.tsx@@ -2,9 +2,8 @@ import { usePieChartCenterMetricData } from '@/page-layout/widgets/graph/graph-wimport { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { AnimatePresence, motion } from 'framer-motion';-import { useContext } from 'react';import { type PieChartConfiguration } from '~/generated-metadata/graphql';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type PieChartCenterMetricProps = {objectMetadataItemId: string;@@ -50,7 +49,7 @@ export const PieChartCenterMetric = ({show,hasNoData = false,}: PieChartCenterMetricProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { centerMetricValue, centerMetricLabel } = usePieChartCenterMetricData({diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/createGraphColorRegistry.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/createGraphColorRegistry.tsindex 8da21d9c2c7..c3f24ab7ece 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/createGraphColorRegistry.ts+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/createGraphColorRegistry.ts@@ -1,5 +1,5 @@import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry';-import { type ThemeType } from 'twenty-ui/theme-constants';+import { type ThemeType } from 'twenty-ui/theme';export const createGraphColorRegistry = (colorSource: ThemeType['color'],diff --git a/packages/twenty-front/src/modules/page-layout/widgets/iframe/components/IframeWidget.tsx b/packages/twenty-front/src/modules/page-layout/widgets/iframe/components/IframeWidget.tsxindex 7d46c208010..3da1999dd66 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/iframe/components/IframeWidget.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/iframe/components/IframeWidget.tsx@@ -5,7 +5,7 @@ import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSkeimport { styled } from '@linaria/react';import { useState } from 'react';import { getSafeUrl, isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ $isEditMode: boolean }>`background: ${themeCssVariables.background.primary};diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsxindex 6b020abcae5..119a4b9d5bb 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsx@@ -1,8 +1,7 @@import { styled } from '@linaria/react';import { type BlockNoteColor } from '@/page-layout/widgets/standalone-rich-text/types/BlockNoteColor';-import { themeCssVariables, ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledColorIcon = styled.div<{textColorValue: string;backgroundColorValue: string;@@ -28,7 +27,7 @@ export const DashboardColorIcon = ({textColor,backgroundColor,}: DashboardColorIconProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const getThemeColorForTextColor = (color: BlockNoteColor): string => {if (color === 'default') {diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorSelectionMenu.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorSelectionMenu.tsxindex 565dce4fd8f..ed8ac9baf8b 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorSelectionMenu.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorSelectionMenu.tsx@@ -10,8 +10,7 @@ import { LegacyDropdownContent } from '@/ui/layout/dropdown/components/LegacyDroimport { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';import { DropdownMenuSectionLabel } from '@/ui/layout/dropdown/components/DropdownMenuSectionLabel';import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';-import { themeCssVariables, ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledColorMenuItem = styled.div`align-items: center;@@ -56,7 +55,7 @@ export const DashboardColorSelectionMenu = ({onBackgroundColorSelect,}: DashboardColorSelectionMenuProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<LegacyDropdownContent><DropdownMenuItemsContainer hasMaxHeight>diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardEditorSideMenu.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardEditorSideMenu.tsxindex 1400f3f1dde..63732b9b1f3 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardEditorSideMenu.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardEditorSideMenu.tsx@@ -16,7 +16,7 @@ import { isDefined } from 'twenty-shared/utils';import { CustomSideMenuOptions } from '@/blocknote-editor/components/CustomSideMenuOptions';import { type DASHBOARD_BLOCK_SCHEMA } from '@/page-layout/widgets/standalone-rich-text/constants/DashboardBlockSchema';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type DashboardEditorSideMenuProps = {editor: typeof DASHBOARD_BLOCK_SCHEMA.BlockNoteEditor;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsxindex 3f300a91b10..af2ee0e80f3 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsx@@ -18,7 +18,7 @@ import { extractColorFromProps } from '@/page-layout/widgets/standalone-rich-teximport { OverlayContainer } from '@/ui/layout/overlay/components/OverlayContainer';import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledColorButton = styled.button`align-items: center;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardsBlockEditor.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardsBlockEditor.tsxindex 020e8855ea9..066d8606137 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardsBlockEditor.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardsBlockEditor.tsx@@ -3,7 +3,7 @@ import { BlockNoteView } from '@blocknote/mantine';import { SuggestionMenuController } from '@blocknote/react';import { css } from '@linaria/core';import { styled } from '@linaria/react';-import { type ClipboardEvent, useContext } from 'react';+import { type ClipboardEvent } from 'react';import {CustomSlashMenu,@@ -13,7 +13,7 @@ import { DashboardEditorSideMenu } from '@/page-layout/widgets/standalone-rich-timport { DashboardFormattingToolbar } from '@/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbar';import { type DASHBOARD_BLOCK_SCHEMA } from '@/page-layout/widgets/standalone-rich-text/constants/DashboardBlockSchema';import { getDashboardSlashMenu } from '@/page-layout/widgets/standalone-rich-text/utils/getDashboardSlashMenu';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useThemeColorScheme, themeCssVariables } from 'twenty-ui/theme';type DashboardsBlockEditorProps = {editor: typeof DASHBOARD_BLOCK_SCHEMA.BlockNoteEditor;onFocus?: () => void;@@ -158,7 +158,7 @@ export const DashboardsBlockEditor = ({onPaste,readonly,}: DashboardsBlockEditorProps) => {- const { colorScheme } = useContext(ThemeContext);+ const colorScheme = useThemeColorScheme();const blockNoteTheme = colorScheme === 'light' ? 'light' : 'dark';const handleFocus = () => {diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/StandaloneRichTextWidget.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/StandaloneRichTextWidget.tsxindex 7f6aed64a1f..1f83b724ccc 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/StandaloneRichTextWidget.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/StandaloneRichTextWidget.tsx@@ -8,7 +8,7 @@ import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { styled } from '@linaria/react';import { type StandaloneRichTextConfiguration } from '~/generated-metadata/graphql';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ isPageLayoutInEditMode?: boolean }>`box-sizing: border-box;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCard.tsx b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCard.tsxindex 38ed2f5a532..fcfc028497c 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCard.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCard.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type WidgetCardVariant } from '~/modules/page-layout/widgets/types/WidgetCardVariant';import { isWidgetCardFlushInViewMode } from '@/page-layout/widgets/utils/isWidgetCardFlushInViewMode';diff --git a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardContent.tsx b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardContent.tsxindex 9b3ec14a78b..0ab81705c23 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardContent.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardContent.tsx@@ -1,7 +1,7 @@import { type WidgetContentPadding } from '@/page-layout/widgets/utils/getWidgetContentPadding';import { isWidgetCardFlushInViewMode } from '@/page-layout/widgets/utils/isWidgetCardFlushInViewMode';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type WidgetCardVariant } from '~/modules/page-layout/widgets/types/WidgetCardVariant';const VERTICAL_LIST_IFRAME_HEIGHT = '40rem';diff --git a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeader.tsx b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeader.tsxindex e0982c2649f..d1f7f3a8200 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeader.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeader.tsx@@ -5,7 +5,7 @@ import { WidgetCardHeaderActionsRenderer } from '@/page-layout/widgets/widget-caimport { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { IconButton } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconTrash } from 'twenty-ui/icon';@@ -14,7 +14,7 @@ import { type WidgetCardVariant } from '@/page-layout/widgets/types/WidgetCardVaimport { WidgetGrip } from '@/page-layout/widgets/widget-card/components/WidgetGrip';import { AnimatePresence, motion } from 'framer-motion';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type WidgetCardHeaderProps = {variant: WidgetCardVariant;widgetId: string;@@ -86,7 +86,7 @@ export const WidgetCardHeader = ({forbiddenDisplay,className,}: WidgetCardHeaderProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatNumber } = useNumberFormat();const widgetCardHovered = useAtomComponentFamilyStateValue(widgetCardHoveredComponentFamilyState,diff --git a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderActionLink.tsx b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderActionLink.tsxindex e196b096cdb..fcf500f8529 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderActionLink.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderActionLink.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { Link } from 'react-router-dom';import { type IconComponent } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledActionLink = styled(Link)`align-items: center;diff --git a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderActionsRenderer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderActionsRenderer.tsxindex c228a0958d2..912d14cbfec 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderActionsRenderer.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderActionsRenderer.tsx@@ -5,7 +5,7 @@ import { WidgetHeaderCommandMenuItems } from '@/page-layout/widgets/widget-card/import { useLayoutRenderingContext } from '@/ui/layout/contexts/LayoutRenderingContext';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { WidgetType } from '~/generated-metadata/graphql';const StyledActionsContainer = styled.div`diff --git a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderHoverReveal.tsx b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderHoverReveal.tsxindex 2b62db7c175..5b1b3cd3bca 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderHoverReveal.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetCardHeaderHoverReveal.tsx@@ -5,7 +5,7 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledHoverReveal = styled.div<{ isVisible: boolean }>`opacity: ${({ isVisible }) => (isVisible ? '1' : '0')};diff --git a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetGrip.tsx b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetGrip.tsxindex 73b39dfb988..3fbc8791ca8 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetGrip.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/widget-card/components/WidgetGrip.tsx@@ -2,11 +2,10 @@ import { styled } from '@linaria/react';import { motion } from 'framer-motion';import { isDefined } from 'twenty-shared/utils';import { IconGripVertical } from 'twenty-ui/icon';-import { themeCssVariables, ThemeContext } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';import {type MouseEvent as ReactMouseEvent,type PointerEvent as ReactPointerEvent,- useContext,useState,} from 'react';@@ -39,7 +38,7 @@ type WidgetGripProps = {};export const WidgetGrip = ({ className }: WidgetGripProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();// Only pointerdown is tracked: the compatibility mousedown that touch fires// afterwards reports the release point, which would hide every drag.const [pointerDownPosition, setPointerDownPosition] = useState<{diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsxindex 307a5a24451..ccfa135d566 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx@@ -10,7 +10,7 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { useLingui } from '@lingui/react/macro';import { isNonEmptyArray, isValidHostname } from 'twenty-shared/utils';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTable.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTable.tsxindex f52ad6af89f..361cbeceea6 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTable.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTable.tsx@@ -6,7 +6,7 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsAccountsBlocklistTableProps = {blocklist: BlocklistItem[];diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTableRow.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTableRow.tsxindex 967edd2ed99..75628748fa4 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTableRow.tsx@@ -5,7 +5,7 @@ import { t } from '@lingui/core/macro';import { IconButton } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconX } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { formatToHumanReadableDate } from '~/utils/date-utils';type SettingsAccountsBlocklistTableRowProps = {diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelDetails.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelDetails.tsxindex f3c7928d5fb..66c45076e47 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelDetails.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelDetails.tsx@@ -8,7 +8,7 @@ import { t } from '@lingui/core/macro';import { Section } from 'twenty-ui/components';import { IconUserPlus } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type CalendarChannelVisibility } from '~/generated/graphql';const StyledDetailsContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarDisplaySettings.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarDisplaySettings.tsxindex cfafd1aecf2..e59fc96b0cb 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarDisplaySettings.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarDisplaySettings.tsx@@ -5,7 +5,7 @@ import { useFormatPreferences } from '@/localization/hooks/useFormatPreferences'import { DateTimeSettingsDateFormatSelect } from '@/settings/experience/components/DateTimeSettingsDateFormatSelect';import { DateTimeSettingsTimeFormatSelect } from '@/settings/experience/components/DateTimeSettingsTimeFormatSelect';import { DateTimeSettingsTimeZoneSelect } from '@/settings/experience/components/DateTimeSettingsTimeZoneSelect';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard.tsxindex db67b1a0f75..e1ad0773c72 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard.tsx@@ -4,7 +4,7 @@ import { SettingsAccountsVisibilityIcon } from '@/settings/accounts/components/Simport { SettingsRadioSettingsCard } from '@/settings/components/SettingsRadioSettingsCard';import { msg } from '@lingui/core/macro';import { CalendarChannelVisibility } from '~/generated/graphql';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsAccountsEventVisibilitySettingsCardProps = {onChange: (nextValue: CalendarChannelVisibility) => void;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsListCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsListCard.tsxindex 403bce13518..3b61d47c5f0 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsListCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsListCard.tsx@@ -11,7 +11,7 @@ import { Section } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const StyledTableRows = styled.div`diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer.tsxindex e8f1b06e9d8..d8123027915 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer.tsx@@ -6,7 +6,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { Status } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRowRightContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsxindex 1b7acca4a1a..281e38c6829 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx@@ -10,7 +10,7 @@ import { SettingsAccountsPasswordController } from '@/settings/accounts/componenimport { type ConnectionFormData } from '@/settings/accounts/hooks/useImapSmtpCaldavConnectionForm';import { type AccountType } from 'twenty-shared/constants';import { Section } from 'twenty-ui/components';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';const StyledFormContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsListEmptyStateCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsListEmptyStateCard.tsxindex 0f197080fd1..6a15d442173 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsListEmptyStateCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsListEmptyStateCard.tsx@@ -9,11 +9,10 @@ import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLinkimport { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { ConnectedAccountProvider, SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconAt, IconGoogle, IconMicrosoft } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledCardsContainer = styled.div`display: flex;@@ -22,7 +21,7 @@ const StyledCardsContainer = styled.div``;export const SettingsAccountsListEmptyStateCard = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { triggerApisOAuth } = useTriggerApisOAuth();const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon.tsxindex d39af9061e6..1f750eed0a7 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { IconArrowDown, IconArrowUp } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';type SettingsAccountsMessageAutoCreationIconProps = {className?: string;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelDetails.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelDetails.tsxindex 8b8ce0bc9c1..cc71b501ce1 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelDetails.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelDetails.tsx@@ -10,7 +10,7 @@ import {import { Section } from 'twenty-ui/components';import { IconBriefcase, IconUsers } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type MessageChannel } from '@/accounts/types/MessageChannel';import { SettingsAccountsMessageAutoCreationCard } from '@/settings/accounts/components/SettingsAccountsMessageAutoCreationCard';diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageFolderIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageFolderIcon.tsxindex 2251cabab7b..a3142afeae5 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageFolderIcon.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageFolderIcon.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { MessageFolderImportPolicy } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsAccountsMessageFolderIconProps = {className?: string;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsPasswordController.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsPasswordController.tsxindex cc954ce4a94..c080f98bbb4 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsPasswordController.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsPasswordController.tsx@@ -7,7 +7,7 @@ import { type AccountType } from 'twenty-shared/constants';import { type ConnectionFormData } from '@/settings/accounts/hooks/useImapSmtpCaldavConnectionForm';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { ClickToActionLink } from 'twenty-ui/primitives/navigation';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledPasswordFieldContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsxindex 69765fe932b..3c2a8ffcb13 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsx@@ -1,5 +1,4 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { SettingsCard } from '@/settings/components/SettingsCard';import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink/UndecoratedLink';@@ -8,11 +7,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconCalendarEvent, IconMailCog } from 'twenty-ui/icon';-import {- MOBILE_VIEWPORT,- ThemeContext,- themeCssVariables,-} from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledCardsContainer = styled.div`display: flex;@@ -30,7 +25,7 @@ const StyledCardLinkSlot = styled.div``;export const SettingsAccountsSettingsSection = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();return (<Section.Root>diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsVisibilityIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsVisibilityIcon.tsxindex 7f7405cd6fd..04df6ae0d70 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsVisibilityIcon.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsVisibilityIcon.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type VisibilityElementState = 'active' | 'inactive';diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountIcon.tsxindex 00a7b271a41..9e358a0e9c8 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountIcon.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountIcon.tsx@@ -11,13 +11,12 @@ import {IconMicrosoft,IconSend,} from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const ImapSmtpCaldavIcon = (props: IconComponentProps & { account: ConnectedAccount },) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { account } = props;const hasImap = isDefined(account.connectionParameters?.IMAP);diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountsTableHeader.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountsTableHeader.tsxindex 57caed7e6f5..57b9c9d39a5 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountsTableHeader.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountsTableHeader.tsx@@ -2,7 +2,7 @@ import { Table } from '@/ui/layout/table/components/Table';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { Trans } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const SettingsConnectedAccountsTableHeader = () => {return (diff --git a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsAccountsMessageFolderIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsAccountsMessageFolderIcon.tsxindex fff9aa36353..96572137a9a 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsAccountsMessageFolderIcon.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsAccountsMessageFolderIcon.tsx@@ -5,8 +5,7 @@ import {IconInbox,IconSend,} from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type SettingsAccountsMessageFolderIconProps = {folder: MessageFolder;isChildFolder?: boolean;@@ -16,7 +15,7 @@ export const SettingsAccountsMessageFolderIcon = ({folder,isChildFolder = false,}: SettingsAccountsMessageFolderIconProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();if (folder.isSentFolder) {return <IconSend size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsAccountsMessageFoldersCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsAccountsMessageFoldersCard.tsxindex 9c2275a31c8..d49ea3128e5 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsAccountsMessageFoldersCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsAccountsMessageFoldersCard.tsx@@ -18,7 +18,7 @@ import { useMemo, useState } from 'react';import { Section, useToast } from 'twenty-ui/components';import { Checkbox } from 'twenty-ui/primitives/input';import { Text } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTreeList = styled.ul`list-style: none;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersBreadcrumb.tsx b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersBreadcrumb.tsxindex 2a2121f6889..29b05f19b31 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersBreadcrumb.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersBreadcrumb.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const BREADCRUMB_WIDTH = 24;const ICON_CENTER_OFFSET = 8;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersEmptyStateCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersEmptyStateCard.tsxindex 228dfa85aec..72c23befae3 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersEmptyStateCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersEmptyStateCard.tsx@@ -2,8 +2,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Section } from 'twenty-ui/components';import { IconFolder } from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledEmptyState = styled.div`align-items: center;@@ -16,7 +15,7 @@ const StyledEmptyState = styled.div``;export const SettingsMessageFoldersEmptyStateCard = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<Section.Root>diff --git a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersSkeletonLoader.tsx b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersSkeletonLoader.tsxindex 5ce24b8ff90..e9806503f96 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersSkeletonLoader.tsx@@ -1,8 +1,7 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledSkeletonContainer = styled.div`display: flex;@@ -35,7 +34,7 @@ const SKELETON_ROWS = [];export const SettingsMessageFoldersSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersTreeItem.tsx b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersTreeItem.tsxindex e1412da4b0f..a50c884fc9d 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersTreeItem.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/message-folders/SettingsMessageFoldersTreeItem.tsx@@ -13,7 +13,7 @@ import { Status } from 'twenty-ui/primitives/data-display';import { Checkbox } from 'twenty-ui/primitives/input';import { IconChevronDown, IconChevronUp } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsMessageFoldersTreeItemProps = {depth?: number;diff --git a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/ModelsDevProviderLogo.tsx b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/ModelsDevProviderLogo.tsxindex df1df8ed501..90484b8571d 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/ModelsDevProviderLogo.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/ModelsDevProviderLogo.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { type IconComponentProps } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type ModelsDevProviderLogoProps = {logoUrl: string;@@ -32,7 +31,7 @@ export const ModelsDevProviderLogo = ({className,style,}: ModelsDevProviderLogoProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const pixelSize = resolvePixelSize(size);const isLightTheme = theme.name === 'light';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsxindex f938cff3920..76183f21e97 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx@@ -9,7 +9,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { IconMessage } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getAiModelTierLabel } from '@/ai/utils/getAiModelTierLabel';import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAiProviderListCard.tsx b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAiProviderListCard.tsxindex 72142bd06d5..5a0f7cb242b 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAiProviderListCard.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/SettingsAdminAiProviderListCard.tsx@@ -6,7 +6,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Status } from 'twenty-ui/primitives/data-display';import { IconPlug } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type AiProviderItem } from '@/settings/admin-panel/ai/types/AiProviderItem';import { getProviderIcon } from '@/settings/admin-panel/ai/utils/getProviderIcon';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/apps/components/SettingsAdminApps.tsx b/packages/twenty-front/src/modules/settings/admin-panel/apps/components/SettingsAdminApps.tsxindex 7f2b70515d1..78b242d596d 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/apps/components/SettingsAdminApps.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/apps/components/SettingsAdminApps.tsx@@ -14,7 +14,7 @@ import { TableRow } from '@/ui/layout/table/components/TableRow';import { useMutation, useQuery } from '@apollo/client/react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { type ReactNode, useContext, useState } from 'react';+import { type ReactNode, useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import {assertUnreachable,@@ -35,7 +35,7 @@ import {} from 'twenty-ui/icon';import { Tag } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useDebounce } from 'use-debounce';import {type ApplicationRegistrationFragmentFragment,@@ -336,7 +336,7 @@ const SettingsAdminAppsTableRow = ({registration,getFormattedSource,}: SettingsAdminAppsTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<TableRowdiff --git a/packages/twenty-front/src/modules/settings/admin-panel/chats/components/SettingsAdminChatsContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/chats/components/SettingsAdminChatsContent.tsxindex a05454272d4..983fded7209 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/chats/components/SettingsAdminChatsContent.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/chats/components/SettingsAdminChatsContent.tsx@@ -2,7 +2,7 @@ import { t } from '@lingui/core/macro';import { styled } from '@linaria/react';import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SettingsAdminChatsTable } from '@/settings/admin-panel/chats/components/SettingsAdminChatsTable';import { type AdminChatThreadListItem } from '@/settings/admin-panel/chats/types/AdminChatThreadListItem';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/chats/components/SettingsAdminChatsTableRow.tsx b/packages/twenty-front/src/modules/settings/admin-panel/chats/components/SettingsAdminChatsTableRow.tsxindex eb8c60e2285..ee75f766294 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/chats/components/SettingsAdminChatsTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/chats/components/SettingsAdminChatsTableRow.tsx@@ -6,7 +6,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { Tag } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SETTINGS_ADMIN_CHATS_TABLE_GRID } from '@/settings/admin-panel/chats/constants/SettingsAdminChatsTableGrid';import { type AdminChatThreadListItem } from '@/settings/admin-panel/chats/types/AdminChatThreadListItem';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatAskQuestionsPart.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatAskQuestionsPart.tsxindex 37a6948abf0..426a971f459 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatAskQuestionsPart.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatAskQuestionsPart.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { Tag, type TagColor } from 'twenty-ui/primitives/data-display';import { IconHelpCircle } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SettingsAdminChatAskQuestionsQuestion } from '@/settings/admin-panel/components/SettingsAdminChatAskQuestionsQuestion';import { SettingsAdminChatToolCallPart } from '@/settings/admin-panel/components/SettingsAdminChatToolCallPart';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatAskQuestionsQuestion.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatAskQuestionsQuestion.tsxindex 0aeb31141bf..2a6c5ae1551 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatAskQuestionsQuestion.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatAskQuestionsQuestion.tsx@@ -6,7 +6,7 @@ import { type AskQuestionAnswer, type AskQuestionItem } from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';import { Tag } from 'twenty-ui/primitives/data-display';import { IconCheck } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { TextWithChatReferences } from '@/ai/components/TextWithChatReferences';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatCollapsibleSection.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatCollapsibleSection.tsxindex d1dd9506b26..15aa3ad4239 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatCollapsibleSection.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatCollapsibleSection.tsx@@ -3,7 +3,7 @@ import { type ReactNode, useState } from 'react';import { IconChevronDown, IconChevronUp } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsAdminChatCollapsibleSectionProps = {label: string;diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatMessage.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatMessage.tsxindex db015ab5c93..9b893a4a2df 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatMessage.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatMessage.tsx@@ -1,7 +1,7 @@import { t } from '@lingui/core/macro';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SettingsAdminChatCollapsibleSection } from '@/settings/admin-panel/components/SettingsAdminChatCollapsibleSection';import { SettingsAdminChatMessagePartRenderer } from '@/settings/admin-panel/components/SettingsAdminChatMessagePartRenderer';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatMessagePartRenderer.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatMessagePartRenderer.tsxindex f4033dbeef2..5bcc6394dde 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatMessagePartRenderer.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatMessagePartRenderer.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { LazyMarkdownRenderer } from '@/ai/components/LazyMarkdownRenderer';import { SettingsAdminChatAskQuestionsPart } from '@/settings/admin-panel/components/SettingsAdminChatAskQuestionsPart';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatThreadMessageList.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatThreadMessageList.tsxindex 782959e0e44..18d194fdbde 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatThreadMessageList.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatThreadMessageList.tsx@@ -5,7 +5,7 @@ import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { isNonEmptyArray } from 'twenty-shared/utils';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AgentMessageRole } from '~/generated-admin/graphql';import { ChatReferenceNavigationEnabledContext } from '@/ai/contexts/ChatReferenceNavigationEnabledContext';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatToolCallPart.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatToolCallPart.tsxindex ce6733cb601..d114e6dfdd2 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatToolCallPart.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminChatToolCallPart.tsx@@ -8,7 +8,7 @@ import { JsonTree } from 'twenty-ui/components';import { IconChevronDown, IconChevronUp, IconTool } from 'twenty-ui/icon';import { Tag } from 'twenty-ui/primitives/data-display';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type AdminChatThreadMessagePart } from '@/settings/admin-panel/types/AdminChatThreadMessagePart';import { getAdminToolDisplayName } from '@/settings/admin-panel/utils/getAdminToolDisplayName';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsxindex e0691f85d0d..7595252ba49 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminGeneral.tsx@@ -14,7 +14,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { useQuery } from '@apollo/client/react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { useDebounce } from 'use-debounce';@@ -24,7 +24,7 @@ import { Section } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronRight } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import {AdminPanelRecentUsersDocument,AdminPanelTopWorkspacesDocument,@@ -44,7 +44,7 @@ const RECENT_USERS_GRID_TEMPLATE_COLUMNS = '1fr 2fr 1fr 36px';const TOP_WORKSPACES_GRID_TEMPLATE_COLUMNS = '2fr 1fr 36px';export const SettingsAdminGeneral = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatNumber } = useNumberFormat();const apolloAdminClient = useApolloAdminClient();const [userSearchTerm, setUserSearchTerm] = useState('');diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdminAccess.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdminAccess.tsxindex a0e9f9d0b21..9bf83ee8510 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdminAccess.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdminAccess.tsx@@ -15,7 +15,7 @@ import { useState } from 'react';import { Dropdown, LightIconButton, useToast } from 'twenty-ui/components';import { IconDotsVertical } from 'twenty-ui/icon';import { Status } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {GetServerAdminsDocument,UpdateServerAdminAccessDocument,diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdmins.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdmins.tsxindex 91cfc3105ee..b1e6f5f5c7e 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdmins.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminServerAdmins.tsx@@ -8,13 +8,12 @@ import { TableRow } from '@/ui/layout/table/components/TableRow';import { useQuery } from '@apollo/client/react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { GetServerAdminsDocument } from '~/generated-admin/graphql';const SERVER_ADMINS_GRID_TEMPLATE_COLUMNS = '1fr 2fr 1fr 36px';@@ -25,7 +24,7 @@ const StyledEmptyState = styled.div``;export const SettingsAdminServerAdmins = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const apolloAdminClient = useApolloAdminClient();const { data, loading, error } = useQuery(GetServerAdminsDocument, {diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminVersionDisplay.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminVersionDisplay.tsxindex 7739aa954c6..d31d92558b0 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminVersionDisplay.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminVersionDisplay.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsAdminVersionDisplayProps = {version: string | undefined | null;diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceBillingContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceBillingContent.tsxindex 52a6c80cbb0..123fd63e75c 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceBillingContent.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceBillingContent.tsx@@ -18,8 +18,7 @@ import {IconTag,IconUsers,} from 'twenty-ui/icon';-import { type ThemeColor } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { type ThemeColor, themeCssVariables } from 'twenty-ui/theme';import { useApolloAdminClient } from '@/settings/admin-panel/apollo/hooks/useApolloAdminClient';import { SettingsAdminWorkspaceCreditGrantModal } from '@/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsxindex 3b000906d1e..a48169b13c3 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx@@ -29,7 +29,7 @@ import {IconUser,} from 'twenty-ui/icon';import { Status } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type GetUpgradeStatusQuery } from '~/generated-admin/graphql';import { dateLocaleState } from '~/localization/states/dateLocaleState';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal.tsxindex df138aba51f..acf81735df0 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal.tsx@@ -15,7 +15,7 @@ import { useState } from 'react';import { Section, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';import { Dialog } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { v4 } from 'uuid';import { BillingCreditGrantType } from '~/generated-admin/graphql';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsxindex 967a4271269..14494d9f9f7 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx@@ -11,7 +11,7 @@ import { type ConfigVariableValue } from 'twenty-shared/types';import { CustomError } from 'twenty-shared/utils';import { CodeEditor } from 'twenty-ui/components/code-editor';import { ListItem } from 'twenty-ui/primitives/navigation';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ConfigVariableType } from '~/generated-admin/graphql';import { type ConfigVariableOptions } from '@/settings/admin-panel/config-variables/types/ConfigVariableOptions';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableHelpText.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableHelpText.tsxindex f59945e78fe..b639c5caef4 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableHelpText.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableHelpText.tsx@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';import { isConfigVariablesInDbEnabledState } from '@/client-config/states/isConfigVariablesInDbEnabledState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ConfigSource, type ConfigVariable } from '~/generated-admin/graphql';const StyledHelpText = styled.div<{ color?: string }>`diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminConnectedAccountHealthStatus.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminConnectedAccountHealthStatus.tsxindex 1bb198376fa..5fc2b8252a9 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminConnectedAccountHealthStatus.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminConnectedAccountHealthStatus.tsx@@ -3,7 +3,7 @@ import { SettingsAdminIndicatorHealthContext } from '@/settings/admin-panel/healimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AdminPanelHealthServiceStatus } from '~/generated-admin/graphql';const StyledErrorMessage = styled.div`diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable.tsxindex 1b08d5fc80c..ce47e6cd8cb 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable.tsx@@ -2,7 +2,7 @@ import { SettingsTableCard } from '@/settings/components/SettingsTableCard';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSettingsTableCardContainer = styled.div`> * {diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatusListCard.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatusListCard.tsxindex 14745031331..38b76801e07 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatusListCard.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatusListCard.tsx@@ -9,8 +9,7 @@ import {IconTool,IconUserCircle,} from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import {HealthIndicatorId,type SystemHealthService,@@ -33,7 +32,7 @@ export const SettingsAdminHealthStatusListCard = ({services: Array<SystemHealthService>;loading?: boolean;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SettingsListCarddiff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJobDetailsExpandable.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJobDetailsExpandable.tsxindex 2ee2e6672f1..b1b763113cb 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJobDetailsExpandable.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJobDetailsExpandable.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { JsonTree } from 'twenty-ui/components';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type QueueJob } from '~/generated-admin/graphql';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJobStateBadge.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJobStateBadge.tsxindex 9bb80f6f491..417dbc47903 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJobStateBadge.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJobStateBadge.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { plural } from '@lingui/core/macro';import { Tag, type TagColor } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { JobState } from '~/generated-admin/graphql';type SettingsAdminJobStateBadgeProps = {diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJsonDataIndicatorHealthStatus.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJsonDataIndicatorHealthStatus.tsxindex 20b1175a577..2bb2e5d849b 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJsonDataIndicatorHealthStatus.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminJsonDataIndicatorHealthStatus.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useContext } from 'react';import { JsonTree, Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AdminPanelHealthServiceStatus } from '~/generated-admin/graphql';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminQueueJobsTable.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminQueueJobsTable.tsxindex 7a39b69c6a7..e0b29bc70ab 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminQueueJobsTable.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminQueueJobsTable.tsx@@ -19,7 +19,7 @@ import { plural, t } from '@lingui/core/macro';import { useState } from 'react';import { IconRefresh, IconTrash } from 'twenty-ui/icon';import { Button, Checkbox } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useQuery } from '@apollo/client/react';import {JobState,diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerHealthStatus.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerHealthStatus.tsxindex 8245879d1f6..2ac0a92907c 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerHealthStatus.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerHealthStatus.tsx@@ -4,7 +4,7 @@ import { t } from '@lingui/core/macro';import { useContext } from 'react';import { AdminPanelHealthServiceStatus } from '~/generated-admin/graphql';import { SettingsAdminIndicatorHealthContext } from '@/settings/admin-panel/health-status/contexts/SettingsAdminIndicatorHealthContext';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledErrorMessage = styled.div`color: ${themeCssVariables.color.red};diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsxindex 776d8391f2e..7c465cae740 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx@@ -6,9 +6,8 @@ import { useQuery } from '@apollo/client/react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { ResponsiveLine } from '@nivo/line';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import {GetQueueMetricsDocument,QueueMetricsTimeRange,@@ -50,7 +49,7 @@ export const SettingsAdminWorkerMetricsGraph = ({timeRange,}: SettingsAdminWorkerMetricsGraphProps) => {const apolloAdminClient = useApolloAdminClient();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { loading, data, error } = useQuery(GetQueueMetricsDocument, {client: apolloAdminClient,diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsTooltip.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsTooltip.tsxindex 3b7baa1b1f0..6d2d65f694a 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsTooltip.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsTooltip.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import type { LineSeries, Point } from '@nivo/line';import { type ReactElement } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTooltipContainer = styled.div`backdrop-filter: ${themeCssVariables.blur.medium};diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerQueueMetricsSection.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerQueueMetricsSection.tsxindex 9a533aa45ba..5d2882a9090 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerQueueMetricsSection.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerQueueMetricsSection.tsx@@ -10,7 +10,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconList } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {type AdminPanelWorkerQueueHealth,QueueMetricsTimeRange,diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkspacesByHealthAccordion.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkspacesByHealthAccordion.tsxindex 59c11a10564..6877adefdce 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkspacesByHealthAccordion.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkspacesByHealthAccordion.tsx@@ -7,7 +7,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { IconChevronDown, IconChevronRight } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledAccordionHeaderButton = styled.button`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/maintenance-mode/components/SettingsAdminMaintenanceMode.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/maintenance-mode/components/SettingsAdminMaintenanceMode.tsxindex 9afbc51791c..5d4f0b3ab65 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/maintenance-mode/components/SettingsAdminMaintenanceMode.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/maintenance-mode/components/SettingsAdminMaintenanceMode.tsx@@ -21,7 +21,7 @@ import { Section, useToast } from 'twenty-ui/components';import { IconLink, IconTool } from 'twenty-ui/icon';import { Status } from 'twenty-ui/primitives/data-display';import { Card, CardContent } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFormContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/admin-panel/signing-keys/components/SettingsAdminSigningKeysTable.tsx b/packages/twenty-front/src/modules/settings/admin-panel/signing-keys/components/SettingsAdminSigningKeysTable.tsxindex df0d364bdec..22459623704 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/signing-keys/components/SettingsAdminSigningKeysTable.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/signing-keys/components/SettingsAdminSigningKeysTable.tsx@@ -16,7 +16,7 @@ import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconCopy } from 'twenty-ui/icon';import { Tag, type TagColor } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {GetSigningKeysDocument,type SigningKeyDto,diff --git a/packages/twenty-front/src/modules/settings/ai/components/AiModelPinSelect.tsx b/packages/twenty-front/src/modules/settings/ai/components/AiModelPinSelect.tsxindex 4830925620b..24e91b0b923 100644--- a/packages/twenty-front/src/modules/settings/ai/components/AiModelPinSelect.tsx+++ b/packages/twenty-front/src/modules/settings/ai/components/AiModelPinSelect.tsx@@ -4,7 +4,7 @@ import { type ComponentProps } from 'react';import { isAiModelEffort, parseAiModelVariantId } from 'twenty-shared/ai';import { isDefined } from 'twenty-shared/utils';import { IconWand } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AUTOMATIC_MODEL_PIN } from '@/settings/ai/constants/AutomaticModelPin';import { getAiModelEffortLabel } from '@/ai/utils/getAiModelEffortLabel';diff --git a/packages/twenty-front/src/modules/settings/ai/components/SettingsAiModelHoverCard.tsx b/packages/twenty-front/src/modules/settings/ai/components/SettingsAiModelHoverCard.tsxindex 520cfd82939..efe78153f1c 100644--- a/packages/twenty-front/src/modules/settings/ai/components/SettingsAiModelHoverCard.tsx+++ b/packages/twenty-front/src/modules/settings/ai/components/SettingsAiModelHoverCard.tsx@@ -1,6 +1,5 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { Chip } from 'twenty-ui/primitives/data-display';import {IconBolt,@@ -11,7 +10,7 @@ import {IconWindow,type IconComponent,} from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type AiModelSummary } from '@/settings/ai/types/AiModelSummary';import { getDataResidencyDisplay } from '@/settings/ai/utils/getDataResidencyDisplay';@@ -73,7 +72,7 @@ type HoverCardItem = {export const SettingsAiModelHoverCard = ({model,}: SettingsAiModelHoverCardProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const ModelIcon = getModelIcon(model.modelFamily, model.providerName);const providerLabel = model.providerLabel ?? model.providerName ?? '—';diff --git a/packages/twenty-front/src/modules/settings/ai/components/SettingsAiModelsTable.tsx b/packages/twenty-front/src/modules/settings/ai/components/SettingsAiModelsTable.tsxindex 544bb31ef57..5d5c8e10475 100644--- a/packages/twenty-front/src/modules/settings/ai/components/SettingsAiModelsTable.tsx+++ b/packages/twenty-front/src/modules/settings/ai/components/SettingsAiModelsTable.tsx@@ -1,5 +1,5 @@import { t } from '@lingui/core/macro';-import { useContext, useRef, useState } from 'react';+import { useRef, useState } from 'react';import { css } from '@linaria/core';import { styled } from '@linaria/react';@@ -9,7 +9,7 @@ import { IconTrash } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';import { Checkbox } from 'twenty-ui/primitives/input';import { IconButton } from 'twenty-ui/components';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SettingsAiModelHoverCard } from '@/settings/ai/components/SettingsAiModelHoverCard';import { type AiModelSummary } from '@/settings/ai/types/AiModelSummary';@@ -89,7 +89,7 @@ export const SettingsAiModelsTable = <TModel extends AiModelSummary>({}: SettingsAiModelsTableProps<TModel>) => {const hoveredRowRef = useRef<HTMLDivElement>(null);const [hoveredModelId, setHoveredModelId] = useState<string | null>(null);- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const hoveredModel = models.find((model) => model.modelId === hoveredModelId);const hasRemove = isDefined(onRemove);diff --git a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationAboutSidebar.tsx b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationAboutSidebar.tsxindex 476cfa4a01d..c83a8a7981a 100644--- a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationAboutSidebar.tsx+++ b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationAboutSidebar.tsx@@ -4,7 +4,6 @@ import { getInstallCountEstimate } from '@/settings/applications/utils/getInstalimport { styled } from '@linaria/react';import { plural, t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';-import { useContext } from 'react';import { isDefined, isSafeUrl } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import {@@ -22,7 +21,7 @@ import {IconWorld,} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type DeveloperLinks = {websiteUrl?: string;@@ -154,7 +153,7 @@ export const SettingsApplicationAboutSidebar = ({pricingDescription,developerLinks,}: SettingsApplicationAboutSidebarProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatNumber } = useNumberFormat();const getInstallCountRows = (): AboutRow[] => {diff --git a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationOverviewCard.tsx b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationOverviewCard.tsxindex 2c3424d02c4..de33fc9e1c1 100644--- a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationOverviewCard.tsx+++ b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationOverviewCard.tsx@@ -4,7 +4,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { type ReactNode } from 'react';import { isDefined } from 'twenty-shared/utils';import { Card } from 'twenty-ui/primitives/surfaces';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';const COVER_WIDTH_PX = 272;const CARD_MIN_HEIGHT_PX = 150;diff --git a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotGallery.tsx b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotGallery.tsxindex 779fad04693..975e2aa251a 100644--- a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotGallery.tsx+++ b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotGallery.tsx@@ -3,7 +3,7 @@ import { useDialog } from '@/ui/layout/dialog/hooks/useDialog';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useId, useState } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsApplicationScreenshotGalleryProps = {screenshots: string[];diff --git a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotLightbox.tsx b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotLightbox.tsxindex f596df525f5..463ecf7e43f 100644--- a/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotLightbox.tsx+++ b/packages/twenty-front/src/modules/settings/applications/components/SettingsApplicationScreenshotLightbox.tsx@@ -6,7 +6,7 @@ import { Key } from 'ts-key-enum';import { IconButton } from 'twenty-ui/components';import { IconChevronLeft, IconChevronRight, IconX } from 'twenty-ui/icon';import { Dialog } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsApplicationScreenshotLightboxProps = {modalInstanceId: string;diff --git a/packages/twenty-front/src/modules/settings/billing/components/AddCreditCardModal.tsx b/packages/twenty-front/src/modules/settings/billing/components/AddCreditCardModal.tsxindex 501094fcf01..3a34dfac97f 100644--- a/packages/twenty-front/src/modules/settings/billing/components/AddCreditCardModal.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/AddCreditCardModal.tsx@@ -6,7 +6,7 @@ import { useLingui } from '@lingui/react/macro';import { Section } from 'twenty-ui/components';import { Dialog } from 'twenty-ui/primitives/surfaces';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type AddCreditCardModalProps = {modalInstanceId: string;diff --git a/packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsx b/packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsxindex 0a960ee1f35..4fe5bb94033 100644--- a/packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/AddPaymentMethodForm.tsx@@ -19,7 +19,7 @@ import { useLocation } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { Info, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { CreateBillingPaymentMethodSetupIntentDocument } from '~/generated-metadata/graphql';type AddPaymentMethodFormContentProps = {diff --git a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingContentSkeleton.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingContentSkeleton.tsxindex f4ba29e05eb..6ae5a0dedd6 100644--- a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingContentSkeleton.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingContentSkeleton.tsx@@ -1,6 +1,6 @@import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledBillingContentSkeleton = styled.div`background: linear-gradient(diff --git a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsxindex 95bafd41706..8c1d361e582 100644--- a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsx@@ -32,7 +32,7 @@ import {} from 'twenty-ui/icon';import { ProgressBar } from 'twenty-ui/primitives/feedback';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';import {PermissionFlagType,SubscriptionStatus,diff --git a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitForm.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitForm.tsxindex 2797585e42d..55db26ffd26 100644--- a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitForm.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitForm.tsx@@ -4,7 +4,7 @@ import { INTERNAL_CREDITS_PER_DISPLAY_CREDIT } from 'twenty-shared/constants';import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SettingsBillingLimitUsageSelect } from '@/settings/billing/components/SettingsBillingLimitUsageSelect';import { SettingsBillingLimitAmount } from '@/settings/billing/components/internal/SettingsBillingLimitAmount';diff --git a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitSpenderCell.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitSpenderCell.tsxindex 3e2fe39835b..ad426d8c109 100644--- a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitSpenderCell.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitSpenderCell.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';import { USAGE_LIMIT_SPENDER_TYPE_ICONS } from '@/settings/billing/constants/UsageLimitSpenderTypeIcons';@@ -37,7 +36,7 @@ type SettingsBillingLimitSpenderCellProps = {export const SettingsBillingLimitSpenderCell = ({row,}: SettingsBillingLimitSpenderCellProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const currentWorkspace = useAtomStateValue(currentWorkspaceState);const isWorkspaceWide = row.spenderType === 'workspace';diff --git a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitsTable.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitsTable.tsxindex 13e25e98c0c..937722bceef 100644--- a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitsTable.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingLimitsTable.tsx@@ -1,11 +1,11 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type ReactNode, useContext, useState } from 'react';+import { type ReactNode, useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { SearchInput } from 'twenty-ui/components';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SettingsBillingLimitSpenderCell } from '@/settings/billing/components/SettingsBillingLimitSpenderCell';import { SettingsBillingLimitsFilterDropdown } from '@/settings/billing/components/SettingsBillingLimitsFilterDropdown';@@ -82,7 +82,7 @@ const StyledTooltipRow = styled.div`const NameCell = ({ item }: { item: UsageLimitRow }) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const deactivatedAnchorId = `usage-limit-deactivated-${item.id}`;diff --git a/packages/twenty-front/src/modules/settings/billing/components/SubscriptionBenefit.tsx b/packages/twenty-front/src/modules/settings/billing/components/SubscriptionBenefit.tsxindex ee98e8a402e..81bc7b8b926 100644--- a/packages/twenty-front/src/modules/settings/billing/components/SubscriptionBenefit.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SubscriptionBenefit.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';-import React, { useContext } from 'react';+import React from 'react';import { IconCheck } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledBenefitContainer = styled.div`color: ${themeCssVariables.font.color.secondary};@@ -24,7 +24,7 @@ type SubscriptionBenefitProps = {children: React.ReactNode;};export const SubscriptionBenefit = ({ children }: SubscriptionBenefitProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledBenefitContainer>diff --git a/packages/twenty-front/src/modules/settings/billing/components/SubscriptionInfoContainer.tsx b/packages/twenty-front/src/modules/settings/billing/components/SubscriptionInfoContainer.tsxindex 5b8f7bf2ade..ada720832a0 100644--- a/packages/twenty-front/src/modules/settings/billing/components/SubscriptionInfoContainer.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SubscriptionInfoContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSubscriptionInfoContainer = styled.div`background-color: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/settings/billing/components/UpdatePaymentMethodModal.tsx b/packages/twenty-front/src/modules/settings/billing/components/UpdatePaymentMethodModal.tsxindex 51cb5849bc2..99244880b37 100644--- a/packages/twenty-front/src/modules/settings/billing/components/UpdatePaymentMethodModal.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/UpdatePaymentMethodModal.tsx@@ -10,7 +10,7 @@ import { useLingui } from '@lingui/react/macro';import { Section, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';import { Dialog } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type UpdatePaymentMethodModalProps = {modalInstanceId: string;diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/PlansTags.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/PlansTags.tsxindex e8a96d42e2e..5a34e15da70 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/PlansTags.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/PlansTags.tsx@@ -3,7 +3,7 @@ import { Tag } from 'twenty-ui/primitives/data-display';import { t } from '@lingui/core/macro';import { BillingPlanKey } from '~/generated-metadata/graphql';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type PlansTagsProps = {plan: BillingPlanKey;diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/ResourceCreditPackagePickerModal.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/ResourceCreditPackagePickerModal.tsxindex cb9b26201a8..d9ec44fb14f 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/ResourceCreditPackagePickerModal.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/ResourceCreditPackagePickerModal.tsx@@ -16,7 +16,7 @@ import {} from 'twenty-ui/icon';import { Button, Slider } from 'twenty-ui/primitives/input';import { Dialog } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const PACKAGE_SUMMARY_ROW_HEIGHT = 24;const PACKAGE_SUMMARY_ROW_GAP = 4;diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/ResourceCreditPriceSelector.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/ResourceCreditPriceSelector.tsxindex 5f8a35a357c..893bc4f29b4 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/ResourceCreditPriceSelector.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/ResourceCreditPriceSelector.tsx@@ -21,7 +21,7 @@ import {IconCreditCard,} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {SetResourceCreditSubscriptionPriceDocument,SubscriptionInterval,diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingCard.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingCard.tsxindex 2343adeb3ff..4eea19390fa 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingCard.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingCard.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledSettingsBillingCard = styled.div`background-color: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingCardField.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingCardField.tsxindex 41ce6020d79..9bc3f48fec5 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingCardField.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingCardField.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { type TablerIconsProps } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledBillingFieldRow = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingFieldLabel.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingFieldLabel.tsxindex 99c7a94721e..12e65aa35e6 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingFieldLabel.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingFieldLabel.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledSettingsBillingFieldLabel = styled.span`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLabelValueItem.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLabelValueItem.tsxindex f2347a3fc81..0cc9973ca99 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLabelValueItem.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLabelValueItem.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { IconInfoCircle } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsBillingLabelValueItemProps = {label: string;diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLimitAmount.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLimitAmount.tsxindex 6095ed4d90d..ede28cfd599 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLimitAmount.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingLimitAmount.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { IconCoins } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const CREDITS_UNIT_ICON_SIZE = 12;diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTable.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTable.tsxindex eea1cc8e626..a055ad16f18 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTable.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTable.tsx@@ -16,7 +16,7 @@ import {SegmentedControl,type SegmentedControlOption,} from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {BillingPlanKey,SubscriptionInterval,diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTableRow.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTableRow.tsxindex 8d88087e806..483fb515ec3 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingPlanComparisonTableRow.tsx@@ -6,7 +6,7 @@ import {import { useLingui } from '@lingui/react/macro';import { styled } from '@linaria/react';import { IconCheck, IconX } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledFeatureCell = styled.div<{hasTopBorder?: boolean;diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingSubscriptionInfoCard.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingSubscriptionInfoCard.tsxindex 1541fddff0f..68dc9e5d3ce 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingSubscriptionInfoCard.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SettingsBillingSubscriptionInfoCard.tsx@@ -21,7 +21,7 @@ import {IconUserCircle,IconUsers,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type BillingStatusTone = 'blue' | 'gray' | 'orange' | 'red' | 'sky';diff --git a/packages/twenty-front/src/modules/settings/billing/components/internal/SubscriptionInfoRowContainer.tsx b/packages/twenty-front/src/modules/settings/billing/components/internal/SubscriptionInfoRowContainer.tsxindex 9c60d96f618..f3261f98cdb 100644--- a/packages/twenty-front/src/modules/settings/billing/components/internal/SubscriptionInfoRowContainer.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/internal/SubscriptionInfoRowContainer.tsx@@ -1,8 +1,8 @@import { type IconComponent } from 'twenty-ui/icon';-import React, { useContext } from 'react';+import React from 'react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type SubscriptionInfoRowContainerProps = {Icon: IconComponent;@@ -54,7 +54,7 @@ export const SubscriptionInfoRowContainer = ({currentValue,nextValue,}: SubscriptionInfoRowContainerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer>diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/useStripeAppearance.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useStripeAppearance.tsindex fa041fb1589..fd6a35d5344 100644--- a/packages/twenty-front/src/modules/settings/billing/hooks/useStripeAppearance.ts+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useStripeAppearance.ts@@ -1,8 +1,6 @@import { type Appearance } from '@stripe/stripe-js';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { THEME_DARK, THEME_LIGHT } from 'twenty-ui/theme';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { THEME_DARK, THEME_LIGHT, useThemeColorScheme } from 'twenty-ui/theme';// Stripe's Appearance API rejects CSS color(display-p3 ...) values, which is// how the Twenty theme stores colors; map them to sRGB so the PaymentElement@@ -25,7 +23,7 @@ const toStripeColor = (color: string): string => {};export const useStripeAppearance = (): Appearance => {- const { colorScheme } = useContext(ThemeContext);+ const colorScheme = useThemeColorScheme();const isDark = colorScheme === 'dark';const theme = isDark ? THEME_DARK : THEME_LIGHT;diff --git a/packages/twenty-front/src/modules/settings/billing/utils/__tests__/getUsageLimitRingColor.test.ts b/packages/twenty-front/src/modules/settings/billing/utils/__tests__/getUsageLimitRingColor.test.tsindex b1d2c93fe12..d5bd8fd1554 100644--- a/packages/twenty-front/src/modules/settings/billing/utils/__tests__/getUsageLimitRingColor.test.ts+++ b/packages/twenty-front/src/modules/settings/billing/utils/__tests__/getUsageLimitRingColor.test.ts@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getUsageLimitRingColor } from '@/settings/billing/utils/getUsageLimitRingColor';diff --git a/packages/twenty-front/src/modules/settings/billing/utils/getUsageLimitRingColor.ts b/packages/twenty-front/src/modules/settings/billing/utils/getUsageLimitRingColor.tsindex 392d04372fe..419d2c5ca01 100644--- a/packages/twenty-front/src/modules/settings/billing/utils/getUsageLimitRingColor.ts+++ b/packages/twenty-front/src/modules/settings/billing/utils/getUsageLimitRingColor.ts@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const getUsageLimitRingColor = ({consumedPercentage,diff --git a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsxindex b7061846bb6..c32fadeb2b7 100644--- a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx+++ b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconPoint } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledWrapper = styled.div`position: relative;@@ -37,7 +36,7 @@ export const AdvancedSettingsContentWrapperWithDot = ({hideDot = false,dotPosition = 'centered',}: AdvancedSettingsContentWrapperWithDotProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledWrapper>diff --git a/packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsx b/packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsxindex 0c528978ac9..63d731b3a4a 100644--- a/packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsx+++ b/packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import type { IconComponent } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { CancelButton } from './CancelButton';import { SaveButton } from './SaveButton';diff --git a/packages/twenty-front/src/modules/settings/components/Separator.tsx b/packages/twenty-front/src/modules/settings/components/Separator.tsxindex 2291502481e..52e9cfab4ee 100644--- a/packages/twenty-front/src/modules/settings/components/Separator.tsx+++ b/packages/twenty-front/src/modules/settings/components/Separator.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledHr = styled.hr`border: none;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsCard.tsxindex 412346e6d3b..93d0b0d09f3 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx@@ -1,12 +1,12 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconChevronRight } from 'twenty-ui/icon';import { Pill } from 'twenty-ui/primitives/data-display';import { Card, CardContent } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type SettingsCardProps = {description?: string;@@ -107,7 +107,7 @@ export const SettingsCard = ({className,Status,}: SettingsCardProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledCardWrapperdiff --git a/packages/twenty-front/src/modules/settings/components/SettingsConnectedAccountsTableRow.tsx b/packages/twenty-front/src/modules/settings/components/SettingsConnectedAccountsTableRow.tsxindex 295c13a7b75..b6140ffa738 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsConnectedAccountsTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsConnectedAccountsTableRow.tsx@@ -4,8 +4,7 @@ import { SettingsConnectedAccountIcon } from '@/settings/accounts/components/Setimport { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledNameCell = styled.div`align-items: center;@@ -30,7 +29,7 @@ type SettingsConnectedAccountsTableRowProps = {export const SettingsConnectedAccountsTableRow = ({account,}: SettingsConnectedAccountsTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const IconComponent = SettingsConnectedAccountIcon({ account });return (diff --git a/packages/twenty-front/src/modules/settings/components/SettingsCounter.tsx b/packages/twenty-front/src/modules/settings/components/SettingsCounter.tsxindex 308489e3b9c..8083ce0b5d8 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsCounter.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsCounter.tsx@@ -3,7 +3,7 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { styled } from '@linaria/react';import { IconMinus, IconPlus } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { castAsNumberOrNull } from '~/utils/cast-as-number-or-null';type SettingsCounterProps = {diff --git a/packages/twenty-front/src/modules/settings/components/SettingsCustomizeVideoModal.tsx b/packages/twenty-front/src/modules/settings/components/SettingsCustomizeVideoModal.tsxindex 4a44aa48fdd..087078526e4 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsCustomizeVideoModal.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsCustomizeVideoModal.tsx@@ -11,7 +11,7 @@ import { TabList } from '@/ui/layout/tab-list/components/TabList';import { styled } from '@linaria/react';import { IconX } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';type SettingsCustomizeVideoModalProps = {modalInstanceId: string;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsDatabaseEventsForm.tsx b/packages/twenty-front/src/modules/settings/components/SettingsDatabaseEventsForm.tsxindex 0f280b34ea0..2a2df08af90 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsDatabaseEventsForm.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsDatabaseEventsForm.tsx@@ -7,7 +7,7 @@ import { isDefined } from 'twenty-shared/utils';import { IconBox, IconNorthStar, IconPlus, IconTrash } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const OBJECT_DROPDOWN_WIDTH = 240;const ACTION_DROPDOWN_WIDTH = 240;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsDatePickerInput.tsx b/packages/twenty-front/src/modules/settings/components/SettingsDatePickerInput.tsxindex f6bb20b7616..eb3fe6c01e4 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsDatePickerInput.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsDatePickerInput.tsx@@ -22,7 +22,7 @@ import { ParentClickOutsideIdContext } from '@/ui/utilities/pointer-event/conteximport { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';import { isDefined } from 'twenty-shared/utils';import { IconCalendar } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const SETTINGS_DATE_PICKER_CLICK_OUTSIDE_ID = 'settings-date-picker-floating';diff --git a/packages/twenty-front/src/modules/settings/components/SettingsDiscoveryHeroCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsDiscoveryHeroCard.tsxindex 2c92a1ed399..c21adf2efaa 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsDiscoveryHeroCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsDiscoveryHeroCard.tsx@@ -4,9 +4,9 @@ import { HeroPlayButton } from '@/ui/layout/hero/components/HeroPlayButton';import { useDialog } from '@/ui/layout/dialog/hooks/useDialog';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { Card } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useThemeColorScheme, themeCssVariables } from 'twenty-ui/theme';const DEFAULT_COVER_HEIGHT = 150;@@ -61,7 +61,7 @@ export const SettingsDiscoveryHeroCard = ({playButtonAriaLabel,}: SettingsDiscoveryHeroCardProps) => {const { t } = useLingui();- const { colorScheme } = useContext(ThemeContext);+ const colorScheme = useThemeColorScheme();const { openDialog } = useDialog();const shouldDisplayVideo = tabs.length > 0;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsDiscoveryHeroCardFooter.tsx b/packages/twenty-front/src/modules/settings/components/SettingsDiscoveryHeroCardFooter.tsxindex a7b616bab75..f24ec08e533 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsDiscoveryHeroCardFooter.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsDiscoveryHeroCardFooter.tsx@@ -1,9 +1,9 @@import { styled } from '@linaria/react';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContent = styled.div`align-items: center;@@ -78,7 +78,7 @@ export const SettingsDiscoveryHeroCardFooter = ({description,action,}: SettingsDiscoveryHeroCardFooterProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContent>diff --git a/packages/twenty-front/src/modules/settings/components/SettingsDnsRecordsTable.tsx b/packages/twenty-front/src/modules/settings/components/SettingsDnsRecordsTable.tsxindex 65402c64f4b..4624dfcee43 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsDnsRecordsTable.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsDnsRecordsTable.tsx@@ -7,8 +7,8 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { capitalize, isDefined } from 'twenty-shared/utils';import { Status } from 'twenty-ui/primitives/data-display';-import { type ThemeColor } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { type ThemeColor, themeCssVariables } from 'twenty-ui/theme';+import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';type DnsRecord = {diff --git a/packages/twenty-front/src/modules/settings/components/SettingsEditableTitle.tsx b/packages/twenty-front/src/modules/settings/components/SettingsEditableTitle.tsxindex defb1e97f54..3fd629f61e7 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsEditableTitle.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsEditableTitle.tsx@@ -3,7 +3,7 @@ import {type TitleInputProps,} from '@/ui/input/components/TitleInput';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTitleInputContainer = styled.div`max-width: 420px;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsEmptyPlaceholder.tsx b/packages/twenty-front/src/modules/settings/components/SettingsEmptyPlaceholder.tsxindex 9680154abce..86ff03f4dd5 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsEmptyPlaceholder.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsEmptyPlaceholder.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type ThemeSpacingKey = keyof typeof themeCssVariables.spacing;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsxindex 2610d26c99f..1446fd5ffa0 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx@@ -1,11 +1,11 @@import { styled } from '@linaria/react';-import { type ComponentType, useContext } from 'react';+import { type ComponentType } from 'react';import { SettingsListSkeletonCard } from '@/settings/components/SettingsListSkeletonCard';import { type IconComponent, IconPlus } from 'twenty-ui/icon';import { Card, CardFooter } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SettingsListItemCardContent } from './SettingsListItemCardContent';const StyledFooterContainer = styled.div`@@ -73,7 +73,7 @@ export const SettingsListCard = <to,rounded,}: SettingsListCardProps<ListItem>) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();if (isLoading === true) return <SettingsListSkeletonCard />;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsListItemCardContent.tsx b/packages/twenty-front/src/modules/settings/components/SettingsListItemCardContent.tsxindex ed97a257ded..d0d8ac6a9d1 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsListItemCardContent.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsListItemCardContent.tsx@@ -1,10 +1,10 @@import { styled } from '@linaria/react';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { Link } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { IconChevronRight, type IconComponent } from 'twenty-ui/icon';import { CardContent } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledRowContainer = styled.div`> div {@@ -90,7 +90,7 @@ export const SettingsListItemCardContent = ({rightComponent,to,}: SettingsListItemCardContentProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isInteractive = isDefined(onClick) || isDefined(to);const content = (diff --git a/packages/twenty-front/src/modules/settings/components/SettingsListSkeletonCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsListSkeletonCard.tsxindex 7f478fd111c..0f504d9e83d 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsListSkeletonCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsListSkeletonCard.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCardContainer = styled.div`height: 40px;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsMorphRelationMultiSelect.tsx b/packages/twenty-front/src/modules/settings/components/SettingsMorphRelationMultiSelect.tsxindex d97cef19cfb..7bdb4cf5169 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsMorphRelationMultiSelect.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsMorphRelationMultiSelect.tsx@@ -27,7 +27,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { IconBox, type IconComponent } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type SelectSizeVariant = 'small' | 'default';diff --git a/packages/twenty-front/src/modules/settings/components/SettingsNameCellSecondaryLabel.tsx b/packages/twenty-front/src/modules/settings/components/SettingsNameCellSecondaryLabel.tsxindex 1ba13ec7047..7a1859ad15c 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsNameCellSecondaryLabel.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsNameCellSecondaryLabel.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSettingsNameCellSecondaryLabel = styled.span`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx b/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsxindex 727a5c50287..6fa11ae5476 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsNavigationDrawerItems.tsx@@ -10,7 +10,7 @@ import { NavigationDrawerItemGroup } from '@/ui/navigation/navigation-drawer/comimport { getNavigationSubItemLeftAdornment } from '@/ui/navigation/navigation-drawer/utils/getNavigationSubItemLeftAdornment';import { styled } from '@linaria/react';import { matchPath, resolvePath, useLocation } from 'react-router-dom';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getSettingsPath } from 'twenty-shared/utils';const StyledSectionsContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/NestedSettingsRow.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/NestedSettingsRow.tsxindex c1a1ed6d76d..5ed927d3954 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/NestedSettingsRow.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/NestedSettingsRow.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type NestedSettingsRowProps = {children: ReactNode;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsCardContentBase.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsCardContentBase.tsxindex 869befd92c0..e54a15162bf 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsCardContentBase.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsCardContentBase.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type StyledCardContentProps = {disabled?: boolean;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSelect.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSelect.tsxindex 72cec014ef8..5b66980e45f 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSelect.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSelect.tsx@@ -11,7 +11,7 @@ import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { type IconComponent } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsOptionCardContentSelectProps = {Icon?: IconComponent;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsxindex a741db0f464..03a4142b860 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSwitch.tsx@@ -11,7 +11,7 @@ import { useId } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { type IconComponent } from 'twenty-ui/icon';import { Switch } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSwitch = styled(Switch)`&[data-centered] {diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionIconCustomizer.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionIconCustomizer.tsxindex ba3a1223b74..fd2d45f9c38 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionIconCustomizer.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionIconCustomizer.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type SettingsOptionIconCustomizerProps = {Icon: IconComponent;@@ -21,7 +20,7 @@ export const SettingsOptionIconCustomizer = ({zoom = 1,rotate = -4,}: SettingsOptionIconCustomizerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledIconCustomizer zoom={zoom} rotate={rotate}>diff --git a/packages/twenty-front/src/modules/settings/components/SettingsPageContainer.tsx b/packages/twenty-front/src/modules/settings/components/SettingsPageContainer.tsxindex 1438d2d5088..78994c9f5c0 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsPageContainer.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsPageContainer.tsx@@ -8,7 +8,7 @@ import { type ReactNode } from 'react';import { matchPath, useLocation } from 'react-router-dom';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const SETTINGS_CONTENT_MAX_WIDTH = 760;const SETTINGS_PATHS_BY_LENGTH = Object.values(SettingsPath).sort(diff --git a/packages/twenty-front/src/modules/settings/components/SettingsPaginationControls.tsx b/packages/twenty-front/src/modules/settings/components/SettingsPaginationControls.tsxindex 1e680a4195b..8ca55f83327 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsPaginationControls.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsPaginationControls.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsPaginationControlsProps = {page: number;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsRadioCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsRadioCard.tsxindex adbbf109a82..2a574dfcd7f 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsRadioCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsRadioCard.tsx@@ -1,10 +1,10 @@import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';-import { useContext, useId } from 'react';+import { useId } from 'react';import { CardContent } from 'twenty-ui/primitives/surfaces';import { type IconComponent } from 'twenty-ui/icon';import { Radio } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledRadioCardContentContainer = styled.label`> div {@@ -56,7 +56,7 @@ export const SettingsRadioCard = ({}: SettingsRadioCardProps) => {const titleId = useId();const descriptionId = useId();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const hasDescription = isNonEmptyString(description);return (diff --git a/packages/twenty-front/src/modules/settings/components/SettingsRadioCardContainer.tsx b/packages/twenty-front/src/modules/settings/components/SettingsRadioCardContainer.tsxindex fa692e45570..08d04ab2816 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsRadioCardContainer.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsRadioCardContainer.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { RadioGroup } from 'twenty-ui/primitives/input';import { SettingsRadioCard } from '@/settings/components/SettingsRadioCard';import { type IconComponent } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRadioCardContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsRadioSettingsCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsRadioSettingsCard.tsxindex 5171a8017f0..6e81faa1c5e 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsRadioSettingsCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsRadioSettingsCard.tsx@@ -5,7 +5,7 @@ import { type ReactNode, useId } from 'react';import { isDefined } from 'twenty-shared/utils';import { Radio, RadioGroup } from 'twenty-ui/primitives/input';import { Card, CardContent } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsRadioSettingsCardProps<Option extends { value: string }> = {name: string;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsSectionSkeletonLoader.tsx b/packages/twenty-front/src/modules/settings/components/SettingsSectionSkeletonLoader.tsxindex 72af8476be9..df7378fed0c 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsSectionSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsSectionSkeletonLoader.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';@@ -19,7 +18,7 @@ const StyledRows = styled.div`export const SettingsSectionSkeletonLoader = ({rowCount = 4,}: SettingsSectionSkeletonLoaderProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledRows>diff --git a/packages/twenty-front/src/modules/settings/components/SettingsSkeletonLoader.tsx b/packages/twenty-front/src/modules/settings/components/SettingsSkeletonLoader.tsxindex 7680f788a4c..6df65627525 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsSkeletonLoader.tsx@@ -1,12 +1,11 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { PageCardHeader } from '@/ui/layout/page/components/PageCardHeader';import { PageCardLayout } from '@/ui/layout/page/components/PageCardLayout';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const SettingsSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemediff --git a/packages/twenty-front/src/modules/settings/components/SettingsStatsGrid.tsx b/packages/twenty-front/src/modules/settings/components/SettingsStatsGrid.tsxindex 0d8dd1fe96f..da700e00bbe 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsStatsGrid.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsStatsGrid.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';-import { Fragment, useContext } from 'react';+import { Fragment } from 'react';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type SettingsStatRow = {Icon: IconComponent;@@ -60,7 +60,7 @@ const StyledValue = styled.div`type StatRowProps = SettingsStatRow;const StatRow = ({ Icon, label, value }: StatRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledRow><Icon size={theme.icon.size.md} color={theme.font.color.tertiary} />diff --git a/packages/twenty-front/src/modules/settings/components/SettingsTableCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsTableCard.tsxindex 0f715632c33..a39df6e55df 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsTableCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsTableCard.tsx@@ -1,12 +1,11 @@import { Table } from '@/ui/layout/table/components/Table';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { type IconComponent } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type TableItem = {Icon?: IconComponent;@@ -32,7 +31,7 @@ export const SettingsTableCard = ({valueAlign = 'left',className,}: SettingsTableCardProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<Cardrounded={rounded}diff --git a/packages/twenty-front/src/modules/settings/components/SettingsTableListSection.tsx b/packages/twenty-front/src/modules/settings/components/SettingsTableListSection.tsxindex fccb34de7c3..a96c6c1f65a 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsTableListSection.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsTableListSection.tsx@@ -11,7 +11,7 @@ import { TableRow } from '@/ui/layout/table/components/TableRow';import { Section } from 'twenty-ui/components';import { IconChevronRight, IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTableRows = styled.div`padding-bottom: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/settings/components/SettingsTextLink.tsx b/packages/twenty-front/src/modules/settings/components/SettingsTextLink.tsxindex a8f021fce7e..7bf408c424f 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsTextLink.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsTextLink.tsx@@ -1,7 +1,7 @@import { css, cx } from '@linaria/core';import { type MouseEventHandler, type ReactNode } from 'react';import { Link, type LinkProps } from 'react-router-dom';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsTextLinkVariant = 'primary' | 'secondary';diff --git a/packages/twenty-front/src/modules/settings/components/layout/SettingsSecondaryBar.tsx b/packages/twenty-front/src/modules/settings/components/layout/SettingsSecondaryBar.tsxindex 027edd9e90f..a9fccee813b 100644--- a/packages/twenty-front/src/modules/settings/components/layout/SettingsSecondaryBar.tsx+++ b/packages/twenty-front/src/modules/settings/components/layout/SettingsSecondaryBar.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';// Bottom separator is an ::after (not border-bottom), and the bar keeps full// height (default align-items) so the active tab's underline lands exactly on it.diff --git a/packages/twenty-front/src/modules/settings/components/layout/SettingsWizardStepBar.tsx b/packages/twenty-front/src/modules/settings/components/layout/SettingsWizardStepBar.tsxindex 471d29edecb..610023435af 100644--- a/packages/twenty-front/src/modules/settings/components/layout/SettingsWizardStepBar.tsx+++ b/packages/twenty-front/src/modules/settings/components/layout/SettingsWizardStepBar.tsx@@ -3,7 +3,7 @@ import { t } from '@lingui/core/macro';import { type ReactNode } from 'react';import { LightIconButton } from 'twenty-ui/components';import { IconChevronLeft } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsWizardStepBarProps = {label: ReactNode;diff --git a/packages/twenty-front/src/modules/settings/config-variables/components/ConfigVariableEdit.tsx b/packages/twenty-front/src/modules/settings/config-variables/components/ConfigVariableEdit.tsxindex a9e7fc9dea1..3a6e61a9b81 100644--- a/packages/twenty-front/src/modules/settings/config-variables/components/ConfigVariableEdit.tsx+++ b/packages/twenty-front/src/modules/settings/config-variables/components/ConfigVariableEdit.tsx@@ -7,7 +7,7 @@ import { type Dispatch, type SetStateAction, useState } from 'react';import { Section, useToast } from 'twenty-ui/components';import { IconCheck, IconPencil, IconX } from 'twenty-ui/icon';import { Button, ButtonGroup } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSectionHeader = styled(Section.Header)`margin-block-end: 0;diff --git a/packages/twenty-front/src/modules/settings/config-variables/components/ConfigVariableTable.tsx b/packages/twenty-front/src/modules/settings/config-variables/components/ConfigVariableTable.tsxindex a999ad9a40c..ab9c6682410 100644--- a/packages/twenty-front/src/modules/settings/config-variables/components/ConfigVariableTable.tsx+++ b/packages/twenty-front/src/modules/settings/config-variables/components/ConfigVariableTable.tsx@@ -5,10 +5,9 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledTableBodyContainer = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};@@ -28,7 +27,7 @@ type ConfigVariableTableProps = { configVariables: ConfigVariable[] };export const ConfigVariableTable = ({configVariables,}: ConfigVariableTableProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<Table>diff --git a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelCardTitle.tsx b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelCardTitle.tsxindex efbf27d00e6..0468e929d57 100644--- a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelCardTitle.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelCardTitle.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTitle = styled.h3`color: ${themeCssVariables.font.color.extraLight};diff --git a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsx b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsxindex 25ad229b6d1..98c9c182c2e 100644--- a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelPreviewFormCard.tsx@@ -5,7 +5,7 @@ import { StyledFormCardTitle } from '@/settings/data-model/fields/components/Styimport { Trans } from '@lingui/react/macro';import { Card, CardContent } from 'twenty-ui/primitives/surfaces';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsDataModelPreviewFormCardProps = {className?: string;diff --git a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelTableBodyContainer.tsx b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelTableBodyContainer.tsxindex 5b663dcd25c..5d506f42bd2 100644--- a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelTableBodyContainer.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelTableBodyContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledSettingsDataModelTableBodyContainer = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/components/StyledFormCardTitle.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/components/StyledFormCardTitle.tsxindex c60949322b5..35da51afebf 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/components/StyledFormCardTitle.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/components/StyledFormCardTitle.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledFormCardTitle = styled.h3`color: ${themeCssVariables.font.color.extraLight};diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsxindex c524d65b0a3..3dcade83002 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx@@ -1,5 +1,4 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { Controller, useFormContext } from 'react-hook-form';import { type z } from 'zod';@@ -19,7 +18,7 @@ import { FieldMetadataType } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { IconInfoCircle, IconRefresh } from 'twenty-ui/icon';import { Tooltip, Card } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { computeMetadataNameFromLabel } from '~/pages/settings/data-model/utils/computeMetadataNameFromLabel';export const settingsDataModelFieldIconLabelFormSchema = (@@ -91,7 +90,7 @@ export const SettingsDataModelFieldIconLabelForm = ({trigger,} = useFormContext<SettingsDataModelFieldIconLabelFormValues>();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const label = watch('label');const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsObjectNewFieldSelector.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsObjectNewFieldSelector.tsxindex f079ebafa10..436b79e54a9 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsObjectNewFieldSelector.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsObjectNewFieldSelector.tsx@@ -13,13 +13,13 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink/UndecoratedLink';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { Controller, useFormContext } from 'react-hook-form';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconSearch } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { FieldMetadataType } from '~/generated-metadata/graphql';import { type SettingsDataModelFieldTypeFormValues } from '~/pages/settings/data-model/new-field/SettingsObjectNewFieldSelect';@@ -69,7 +69,7 @@ export const SettingsObjectNewFieldSelector = ({excludedFieldTypes = [],objectNamePlural,}: SettingsObjectNewFieldSelectorProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { control, setValue } =useFormContext<SettingsDataModelFieldTypeFormValues>();const [searchQuery, setSearchQuery] = useState('');diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsxindex 3758d6c0ca5..4a16ced2420 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx@@ -14,7 +14,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconSlash } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const fieldDateSettings = z.discriminatedUnion('displayFormat', [z.object({diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationForm.tsxindex b2fc07c888f..59d2c6dca93 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationForm.tsx@@ -18,7 +18,7 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { RelationType } from '~/generated-metadata/graphql';const StyledSelectsContainer = styled.div<{ isMobile: boolean }>`diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsxindex 6c0b86124d1..03b08311bfc 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectForm.tsx@@ -31,7 +31,7 @@ import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { t } from '@lingui/core/macro';-import { useContext, useEffect, useState } from 'react';+import { useEffect, useState } from 'react';import { useSearchParams } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { LightButton, LightIconButton } from 'twenty-ui/components';@@ -44,7 +44,7 @@ import {} from 'twenty-ui/icon';import { CardContent, CardFooter } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SettingsDataModelFieldSelectFormOptionRow } from './SettingsDataModelFieldSelectFormOptionRow';export const settingsDataModelFieldSelectFormSchema = z.object({@@ -167,7 +167,7 @@ export const SettingsDataModelFieldSelectForm = ({fieldType,disabled = false,}: SettingsDataModelFieldSelectFormProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { initialDefaultValue, initialOptions } =useSelectSettingsFormInitialValues({fieldMetadataId: existingFieldMetadataId,diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsxindex 7a64425f379..c407c97196c 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx@@ -8,7 +8,6 @@ import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/Dropimport { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { LightIconButton, type ColorLabels } from 'twenty-ui/components';import {IconCheck,@@ -19,8 +18,8 @@ import {} from 'twenty-ui/icon';import { ColorSample } from 'twenty-ui/primitives/data-display';import { ListItem } from 'twenty-ui/primitives/navigation';-import { MAIN_COLOR_NAMES } from 'twenty-ui/theme';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { MAIN_COLOR_NAMES, useTheme, themeCssVariables } from 'twenty-ui/theme';+import { computeOptionValueFromLabel } from '~/pages/settings/data-model/utils/computeOptionValueFromLabel';const useColorLabels = (): ColorLabels => ({@@ -114,7 +113,7 @@ export const SettingsDataModelFieldSelectFormOptionRow = ({isNewRow,fieldIsNullable,}: SettingsDataModelFieldSelectFormOptionRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const colorLabels = useColorLabels();const SELECT_COLOR_DROPDOWN_ID = `select-color-dropdown-${option.id}`;const SELECT_ACTIONS_DROPDOWN_ID = `select-actions-dropdown-${option.id}`;diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/utils/generateNewSelectOption.ts b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/utils/generateNewSelectOption.tsindex c040cdc22ae..adcd9971d87 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/utils/generateNewSelectOption.ts+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/utils/generateNewSelectOption.ts@@ -2,8 +2,8 @@ import { v4 } from 'uuid';import { type FieldMetadataItemOption } from '@/object-metadata/types/FieldMetadataItem';import { generateNewSelectOptionLabel } from '@/settings/data-model/fields/forms/select/utils/generateNewSelectOptionLabel';-import { MAIN_COLOR_NAMES } from 'twenty-ui/theme';-import { getNextThemeColor } from 'twenty-ui/theme-constants';+import { MAIN_COLOR_NAMES, getNextThemeColor } from 'twenty-ui/theme';+import { computeOptionValueFromLabel } from '~/pages/settings/data-model/utils/computeOptionValueFromLabel';export const generateNewSelectOption = (diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview.tsxindex 561e3556e7e..4965d79bb96 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview.tsx@@ -12,8 +12,7 @@ import { SettingsDataModelSetFieldValueEffect } from '@/settings/data-model/fielimport { SettingsDataModelSetLabelIdentifierRecordEffect } from '@/settings/data-model/fields/preview/components/SettingsDataModelSetLabelIdentifierRecordEffect';import { useFieldPreviewValue } from '@/settings/data-model/fields/preview/hooks/useFieldPreviewValue';import { useIcons } from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { FieldMetadataType } from '~/generated-metadata/graphql';type SettingsDataModelFieldPreviewProps = {@@ -63,7 +62,7 @@ export const SettingsDataModelFieldPreview = ({objectNameSingular: objectNameSingular,});- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const FieldIcon = getIcon(fieldMetadataItem.icon);diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget.tsxindex 111b283a282..d7ed3be5154 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelFieldPreviewWidget.tsx@@ -5,7 +5,7 @@ import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataIteimport { SettingsDataModelFieldPreview } from '@/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview';import { SettingsDataModelObjectPreview } from '@/settings/data-model/objects/components/SettingsDataModelObjectSummary';import { Card, CardContent } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { computeMetadataNameFromLabel } from '~/pages/settings/data-model/utils/computeMetadataNameFromLabel';type SettingsDataModelFieldPreviewWidgetProps = {diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreview.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreview.tsxindex 57eed7de953..91c96e65f9c 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreview.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreview.tsx@@ -10,8 +10,7 @@ import { RecordFieldComponentInstanceContext } from '@/object-record/record-fielimport { SettingsDataModelSetFieldValueEffect } from '@/settings/data-model/fields/preview/components/SettingsDataModelSetFieldValueEffect';import { useFieldPreviewValue } from '@/settings/data-model/fields/preview/hooks/useFieldPreviewValue';import { useIcons } from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { v4 } from 'uuid';import { FieldMetadataType } from '~/generated-metadata/graphql';@@ -61,7 +60,7 @@ export const SettingsDataModelRelationFieldPreview = ({useObjectMetadataItem({objectNameSingular: relationTargetObjectNameSingular,});- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const FieldIcon = getIcon(fieldMetadataItem.icon);diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreviewSubWidget.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreviewSubWidget.tsxindex a5bbac40d92..a7235c19532 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreviewSubWidget.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/preview/components/SettingsDataModelRelationFieldPreviewSubWidget.tsx@@ -6,7 +6,7 @@ import { SettingsDataModelRelationFieldPreview } from '@/settings/data-model/fieimport { SettingsDataModelObjectPreview } from '@/settings/data-model/objects/components/SettingsDataModelObjectSummary';import { isDefined } from 'twenty-shared/utils';import { Card, CardContent } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type SettingsDataModelRelationFieldPreviewSubWidgetProps = {fieldMetadataItem: Pick<diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverview.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverview.tsxindex 1160d834a61..e045d2d1dea 100644--- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverview.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverview.tsx@@ -34,7 +34,7 @@ import {IconX,} from 'twenty-ui/icon';import { ButtonGroup } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const nodeTypes: NodeTypes = {object: SettingsDataModelOverviewObject,diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsxindex e83f097a397..994217429f7 100644--- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx@@ -4,7 +4,7 @@ import { useEffect } from 'react';import { useFilteredObjectMetadataItems } from '@/object-metadata/hooks/useFilteredObjectMetadataItems';import { isDefined } from 'twenty-shared/utils';import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsDataModelOverviewEffectProps = {setEdges: (edges: Edge[]) => void;diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsxindex 1e8824d82c8..907b2882c0c 100644--- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx@@ -4,9 +4,8 @@ import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataIteimport { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';import { Handle, Position } from '@xyflow/react';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { RelationType } from '~/generated-metadata/graphql';type ObjectFieldRowProps = {@@ -27,7 +26,7 @@ const StyledFieldName = styled.div``;export const ObjectFieldRow = ({ field }: ObjectFieldRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const objectMetadataItems = useAtomStateValue(objectMetadataItemsSelector);const relatedObjectId = field.relation?.targetObjectMetadata.id;diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewFieldWithoutRelation.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewFieldWithoutRelation.tsxindex bf1c6a5d343..781e080561c 100644--- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewFieldWithoutRelation.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewFieldWithoutRelation.tsx@@ -3,8 +3,7 @@ import { styled } from '@linaria/react';import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';import { useIcons } from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type ObjectFieldRowWithoutRelationProps = {field: FieldMetadataItem;@@ -26,7 +25,7 @@ const StyledFieldName = styled.div`export const ObjectFieldRowWithoutRelation = ({field,}: ObjectFieldRowWithoutRelationProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const Icon = getIcon(field?.icon);diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewObject.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewObject.tsxindex 1df355d6012..a19b28b5331 100644--- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewObject.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewObject.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type Node, type NodeProps } from '@xyflow/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { Link } from 'react-router-dom';import { useNumberFormat } from '@/localization/hooks/useNumberFormat';@@ -17,7 +17,7 @@ import '@xyflow/react/dist/style.css';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { IconChevronDown, IconChevronUp } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type SettingsDataModelOverviewObjectNode = Node<EnrichedObjectMetadataItem,@@ -109,7 +109,7 @@ const StyledObjectLinkContainer = styled.div`export const SettingsDataModelOverviewObject = ({data: objectMetadataItem,}: SettingsDataModelOverviewObjectProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatNumber } = useNumberFormat();const [otherFieldsExpanded, setOtherFieldsExpanded] = useState(false);diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewRelationMarkers.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewRelationMarkers.tsxindex 5e8fe2e643e..dc93ad32132 100644--- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewRelationMarkers.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewRelationMarkers.tsx@@ -1,7 +1,6 @@-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const SettingsDataModelOverviewRelationMarkers = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<svg style={{ position: 'absolute', top: 0, left: 0 }}>diff --git a/packages/twenty-front/src/modules/settings/data-model/indexes/forms/components/SettingsObjectIndexFieldsForm.tsx b/packages/twenty-front/src/modules/settings/data-model/indexes/forms/components/SettingsObjectIndexFieldsForm.tsxindex c3f4e6f895a..7530bc1b4c8 100644--- a/packages/twenty-front/src/modules/settings/data-model/indexes/forms/components/SettingsObjectIndexFieldsForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/indexes/forms/components/SettingsObjectIndexFieldsForm.tsx@@ -10,7 +10,7 @@ import { Controller, useFormContext } from 'react-hook-form';import { IconTrash, useIcons } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type SettingsObjectNewIndexFormValues } from '~/pages/settings/data-model/new-index/SettingsObjectNewIndexFormValues';type SettingsObjectIndexFieldsFormProps = {diff --git a/packages/twenty-front/src/modules/settings/data-model/indexes/forms/components/SettingsObjectIndexOptionsForm.tsx b/packages/twenty-front/src/modules/settings/data-model/indexes/forms/components/SettingsObjectIndexOptionsForm.tsxindex 1d83ae11093..ce4da091a9d 100644--- a/packages/twenty-front/src/modules/settings/data-model/indexes/forms/components/SettingsObjectIndexOptionsForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/indexes/forms/components/SettingsObjectIndexOptionsForm.tsx@@ -2,7 +2,7 @@ import { Select } from '@/ui/input/components/Select';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Controller, useFormContext } from 'react-hook-form';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { IndexType } from '~/generated-metadata/graphql';import { type SettingsObjectNewIndexFormValues } from '~/pages/settings/data-model/new-index/SettingsObjectNewIndexFormValues';diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldDataType.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldDataType.tsxindex 94c94e9a897..132e25cbab5 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldDataType.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldDataType.tsx@@ -4,8 +4,7 @@ import { Link } from 'react-router-dom';import { type SettingsFieldType } from '@/settings/data-model/types/SettingsFieldType';import { getSettingsFieldTypeConfig } from '@/settings/data-model/utils/getSettingsFieldTypeConfig';import { type IconComponent, IconTwentyStar } from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type SettingsObjectFieldDataTypeProps = {to?: string;@@ -66,7 +65,7 @@ export const SettingsObjectFieldDataType = ({labelDetail,onClick,}: SettingsObjectFieldDataTypeProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const fieldTypeConfig = getSettingsFieldTypeConfig(value);const Icon: IconComponent =IconFromProps ?? fieldTypeConfig?.Icon ?? IconTwentyStar;diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsxindex 44788e1fa84..355d3b56f19 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsx@@ -19,7 +19,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext, useMemo } from 'react';+import { useMemo } from 'react';import { FieldMetadataType, SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';@@ -30,7 +30,7 @@ import {useIcons,} from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { RelationType } from '~/generated-metadata/graphql';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { type SettingsObjectDetailTableItem } from '~/pages/settings/data-model/types/SettingsObjectDetailTableItem';@@ -72,7 +72,7 @@ export const SettingsObjectFieldItemTableRow = ({status,isMostlyEmpty = false,}: SettingsObjectFieldItemTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { fieldMetadataItem, objectMetadataItem } =settingsObjectDetailTableItem;diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRow.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRow.tsxindex 8ee3f85e201..f2dd5f33df7 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRow.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { useNumberFormat } from '@/localization/hooks/useNumberFormat';import { ObjectMetadataIcon } from '@/object-metadata/components/ObjectMetadataIcon';@@ -16,7 +16,7 @@ import {} from '@/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type SettingsObjectMetadataItemTableRowProps = {action: ReactNode;@@ -46,7 +46,7 @@ export const SettingsObjectMetadataItemTableRow = ({totalObjectCount,}: SettingsObjectMetadataItemTableRowProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatNumber } = useNumberFormat();return (diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.tsxindex 32adfb32156..486239a1e24 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.tsx@@ -1,6 +1,6 @@import { TableCell } from '@/ui/layout/table/components/TableCell';import { styled } from '@linaria/react';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import React from 'react';export const SETTINGS_OBJECT_TABLE_COLUMN_WIDTH = '98.7px';diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationItemTableRow.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationItemTableRow.tsxindex 2b0aac6060e..fb2899a8b36 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationItemTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationItemTableRow.tsx@@ -17,7 +17,7 @@ import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLinkimport { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type MouseEvent, useContext, useMemo } from 'react';+import { type MouseEvent, useMemo } from 'react';import { FieldMetadataType, SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import {@@ -25,7 +25,7 @@ import {IconRelationManyToMany,useIcons,} from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';type SettingsObjectRelationItemTableRowProps = {@@ -67,7 +67,7 @@ export const SettingsObjectRelationItemTableRow = ({fieldMetadataItem,objectMetadataItem,}: SettingsObjectRelationItemTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const navigate = useNavigateSettings();const { getIcon } = useIcons();diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsxindex 75e8e5dba44..16f9f66e125 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx@@ -26,7 +26,7 @@ import { isDefined } from 'twenty-shared/utils';import { SettingsRow } from 'twenty-ui/components';import { IconArchive, IconFilter, IconSearch } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { normalizeSearchText } from '~/utils/normalizeSearchText';import {OBJECT_RELATION_TABLE_ROW_GRID_TEMPLATE_COLUMNS,diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm.tsxindex 54990516092..9fec7769519 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm.tsx@@ -1,6 +1,6 @@import { Button } from 'twenty-ui/primitives/input';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { isDDLLockedState } from '@/client-config/states/isDDLLockedState';import { useGetIsMetadataItemCustom } from '@/object-metadata/hooks/useGetIsMetadataItemCustom';import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectFields.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectFields.tsxindex 71d9e14f10e..2609361753a 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectFields.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectFields.tsx@@ -12,7 +12,7 @@ import { FieldMetadataType, SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SettingsObjectFieldTable } from '~/pages/settings/data-model/SettingsObjectFieldTable';const StyledButtonContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectLayout.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectLayout.tsxindex 15a7fcabd63..e2314bc1582 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectLayout.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectLayout.tsx@@ -5,7 +5,7 @@ import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconAddressBook, IconPencil, IconReload } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useEnterLayoutCustomizationMode } from '@/layout-customization/hooks/useEnterLayoutCustomizationMode';import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectSettings.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectSettings.tsxindex 9e724491527..681b715acc9 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectSettings.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/ObjectSettings.tsx@@ -19,7 +19,7 @@ import { SettingsPath } from 'twenty-shared/types';import { Section, useToast } from 'twenty-ui/components';import { IconArchive, IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';type ObjectSettingsProps = {diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection.tsxindex 3c7d6290126..6abe122b9ee 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection.tsx@@ -20,7 +20,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { SearchInput, SettingsRow, useToast } from 'twenty-ui/components';import { IconEyeOff, IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SettingsObjectIndexTable } from '~/pages/settings/data-model/SettingsObjectIndexTable';import { type SettingsObjectIndexesTableItem } from '~/pages/settings/data-model/types/SettingsObjectIndexesTableItem';import { normalizeSearchText } from '~/utils/normalizeSearchText';diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection.tsxindex 3b6a2553d66..8b3e6f67540 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectSearchSection.tsx@@ -19,7 +19,7 @@ import { TableRow } from '@/ui/layout/table/components/TableRow';import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext, useMemo, useState } from 'react';+import { useMemo, useState } from 'react';import { LightIconButton, useToast } from 'twenty-ui/components';import {IconEye,@@ -31,7 +31,7 @@ import {import { Button } from 'twenty-ui/primitives/input';import { ListItem } from 'twenty-ui/primitives/navigation';import { Card } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { FeatureFlagKey } from '~/generated-metadata/graphql';type SettingsObjectSearchSectionProps = {@@ -107,7 +107,7 @@ export const SettingsObjectSearchSection = ({}: SettingsObjectSearchSectionProps) => {const { t } = useLingui();const { getIcon } = useIcons();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { updateOneObjectMetadataItem } = useUpdateOneObjectMetadataItem();const { updateOneFieldMetadataItem } = useUpdateOneFieldMetadataItem();const { closeDropdown } = useCloseDropdown();diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/__stories__/ObjectLayoutHeroCard.stories.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/__stories__/ObjectLayoutHeroCard.stories.tsxindex d89b3a72840..9844be1f45e 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/__stories__/ObjectLayoutHeroCard.stories.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/__stories__/ObjectLayoutHeroCard.stories.tsx@@ -7,7 +7,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, within } from 'storybook/test';import { IconAddressBook, IconPencil } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { ThemeProvider, themeCssVariables } from 'twenty-ui/theme-constants';+import { ThemeProvider, themeCssVariables } from 'twenty-ui/theme';const StyledCanvas = styled.div`background: ${themeCssVariables.background.primary};diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/components/SettingsDataModelObjectSummary.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/components/SettingsDataModelObjectSummary.tsxindex 32c2a956024..001e15d5406 100644--- a/packages/twenty-front/src/modules/settings/data-model/objects/components/SettingsDataModelObjectSummary.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/objects/components/SettingsDataModelObjectSummary.tsx@@ -1,13 +1,12 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { ObjectMetadataIcon } from '@/object-metadata/components/ObjectMetadataIcon';import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';import { SettingsItemTypeTag } from '@/settings/components/SettingsItemTypeTag';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconBox } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type SettingsDataModelObjectPreviewProps = {className?: string;@@ -79,7 +78,7 @@ const SettingsDataModelObjectPreviewItem = ({pluralizeLabel = true,index,}: SettingsDataModelObjectPreviewItemProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<>@@ -112,7 +111,7 @@ const SettingsDataModelObjectPreviewOtherObjects = ({}: {selected: number;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<>diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsxindex 8c05c2bdccc..ca33d490a69 100644--- a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx@@ -12,14 +12,13 @@ import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { plural } from 'pluralize';-import { useContext } from 'react';import { Controller, useFormContext } from 'react-hook-form';import { SettingsPath } from 'twenty-shared/types';import { capitalize, isDefined } from 'twenty-shared/utils';import { InlineBanner } from 'twenty-ui/components';import { IconInfoCircle, IconLink, IconRefresh } from 'twenty-ui/icon';import { Card, Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type StringKeyOf } from 'type-fest';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { computeMetadataNamesFromLabels } from '~/pages/settings/data-model/utils/computeMetadataNamesFromLabels';@@ -77,7 +76,7 @@ export const SettingsDataModelObjectAboutForm = ({objectMetadataItem,conflictingObjectMetadataItem,}: SettingsDataModelObjectAboutFormProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { control, watch, setValue } =useFormContext<SettingsDataModelObjectAboutFormValues>();const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectIdentifiersForm.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectIdentifiersForm.tsxindex 5660c5ce0e5..c881acff71b 100644--- a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectIdentifiersForm.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectIdentifiersForm.tsx@@ -20,7 +20,7 @@ import {} from 'twenty-shared/utils';import { IconCircleOff, IconPlus, useIcons } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type z } from 'zod';export const settingsDataModelObjectIdentifiersFormSchema =diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsxindex 7d92bd577c2..0c43d28836f 100644--- a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectSettingsFormCard.tsx@@ -9,7 +9,7 @@ import { SettingsDataModelObjectPreview } from '@/settings/data-model/objects/coimport { SettingsDataModelObjectIdentifiersForm } from '@/settings/data-model/objects/forms/components/SettingsDataModelObjectIdentifiersForm';import { Trans } from '@lingui/react/macro';import { Card, CardContent } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsDataModelObjectSettingsFormCardProps = {objectMetadataItem: EnrichedObjectMetadataItem;diff --git a/packages/twenty-front/src/modules/settings/developers/components/ApiKeyInput.tsx b/packages/twenty-front/src/modules/settings/developers/components/ApiKeyInput.tsxindex a750c0759d5..8d22c0f2516 100644--- a/packages/twenty-front/src/modules/settings/developers/components/ApiKeyInput.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/ApiKeyInput.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconCopy } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/developers/components/ApiKeyNameInput.tsx b/packages/twenty-front/src/modules/settings/developers/components/ApiKeyNameInput.tsxindex 5a1903e150c..50251670572 100644--- a/packages/twenty-front/src/modules/settings/developers/components/ApiKeyNameInput.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/ApiKeyNameInput.tsx@@ -5,7 +5,7 @@ import { useDebouncedCallback } from 'use-debounce';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useMutation } from '@apollo/client/react';import { UpdateApiKeyDocument } from '~/generated-metadata/graphql';diff --git a/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysFieldItemTableRow.tsx b/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysFieldItemTableRow.tsxindex 767ea90ffc5..1c8a0275985 100644--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysFieldItemTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysFieldItemTableRow.tsx@@ -6,9 +6,8 @@ import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { IconChevronRight } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { type ApiKey } from '~/generated-metadata/graphql';const StyledEllipsisLabel = styled.div`@@ -31,7 +30,7 @@ export const SettingsApiKeysFieldItemTableRow = ({to,}: SettingsApiKeysFieldItemTableRowProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const formattedExpiration = formatExpiration(apiKey.expiresAt || null);const gridColumns = '5fr 2fr 3fr 1fr';diff --git a/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysTable.tsx b/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysTable.tsxindex 14b464f6a8f..1802fd6d844 100644--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysTable.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysTable.tsx@@ -7,7 +7,7 @@ import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useQuery } from '@apollo/client/react';import { GetApiKeysDocument } from '~/generated-metadata/graphql';diff --git a/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookTableRow.tsx b/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookTableRow.tsxindex ed6795cd8f1..56e87d1d27c 100644--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookTableRow.tsx@@ -3,11 +3,10 @@ import { styled } from '@linaria/react';import { WEBHOOK_TABLE_ROW_GRID_TEMPLATE_COLUMNS } from '@/settings/developers/constants/WebhookTableRowGridTemplateColumns';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useContext } from 'react';import { getUrlHostnameOrThrow, isValidUrl } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type Webhook } from '~/generated-metadata/graphql';const StyledIconChevronRightContainer = styled.span`@@ -26,7 +25,7 @@ export const SettingsDevelopersWebhookTableRow = ({>;to: string;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<TableRowgridTemplateColumns={WEBHOOK_TABLE_ROW_GRID_TEMPLATE_COLUMNS}diff --git a/packages/twenty-front/src/modules/settings/developers/components/SettingsWebhooksTable.tsx b/packages/twenty-front/src/modules/settings/developers/components/SettingsWebhooksTable.tsxindex 7bf816fd858..d36532a232d 100644--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsWebhooksTable.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsWebhooksTable.tsx@@ -8,7 +8,7 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useQuery } from '@apollo/client/react';import { GetWebhooksDocument } from '~/generated-metadata/graphql';diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsxindex 1f607447e7b..ad0abc23af8 100644--- a/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx@@ -19,7 +19,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconReload, IconTrash } from 'twenty-ui/icon';import { Button, ButtonGroup } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {CreatePublicDomainDocument,DeletePublicDomainDocument,diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsxindex dd71576e453..d00f91502e6 100644--- a/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx@@ -16,7 +16,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconReload, IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { useCheckCustomDomainValidRecords } from '@/settings/domains/hooks/useCheckCustomDomainValidRecords';diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingsWorkspaceDomainCard.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsWorkspaceDomainCard.tsxindex 8511d142a93..be14c7fe184 100644--- a/packages/twenty-front/src/modules/settings/domains/components/SettingsWorkspaceDomainCard.tsx+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingsWorkspaceDomainCard.tsx@@ -10,7 +10,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconWorld, IconWorldWww } from 'twenty-ui/icon';import { Status } from 'twenty-ui/primitives/data-display';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/emailing-domains/components/SettingsEmailingDomainAiSetup.tsx b/packages/twenty-front/src/modules/settings/emailing-domains/components/SettingsEmailingDomainAiSetup.tsxindex 79bc2b1757b..fdd60061d81 100644--- a/packages/twenty-front/src/modules/settings/emailing-domains/components/SettingsEmailingDomainAiSetup.tsx+++ b/packages/twenty-front/src/modules/settings/emailing-domains/components/SettingsEmailingDomainAiSetup.tsx@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';import { useState } from 'react';import { IconX } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';import ClaudeLogo from '@/settings/mcp-and-apis/assets/mcp-clients/claude-color.png';import CursorLogo from '@/settings/mcp-and-apis/assets/mcp-clients/cursor.svg';diff --git a/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx b/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsxindex 66adc5776a0..78442e202ca 100644--- a/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx+++ b/packages/twenty-front/src/modules/settings/enterprise/components/EnterprisePlanModal.tsx@@ -12,7 +12,7 @@ import { CardPicker, MainButton, useToast } from 'twenty-ui/components';import { Loader } from 'twenty-ui/primitives/feedback';import { RadioGroup } from 'twenty-ui/primitives/input';import { Dialog } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCheckoutButton = styled(MainButton)`width: 200px;diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogFilters.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogFilters.tsxindex e950a023c61..2bcd85c27b4 100644--- a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogFilters.tsx+++ b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogFilters.tsx@@ -9,7 +9,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconBox, IconUser, useIcons } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { EventLogTable } from '~/generated-metadata/graphql';diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogJsonCell.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogJsonCell.tsxindex 7eb87c08a20..e841a292986 100644--- a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogJsonCell.tsx+++ b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogJsonCell.tsx@@ -6,7 +6,7 @@ import { JsonDisplay } from '@/ui/field/display/components/JsonDisplay/JsonDisplimport { ExpandedFieldDisplay } from '@/ui/layout/expandable-list/components/ExpandedFieldDisplay';import { isDefined } from 'twenty-shared/utils';import { JsonTree } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type JsonValue } from 'type-fest';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogResultsTable.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogResultsTable.tsxindex 6f75d0f37ad..7437f095441 100644--- a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogResultsTable.tsx+++ b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogResultsTable.tsx@@ -1,7 +1,7 @@import { SettingsEmptyPlaceholder } from '@/settings/components/SettingsEmptyPlaceholder';import { styled } from '@linaria/react';import { Trans, useLingui } from '@lingui/react/macro';-import { useCallback, useContext, useEffect, useState } from 'react';+import { useCallback, useEffect, useState } from 'react';import { useInView } from 'react-intersection-observer';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';@@ -11,7 +11,7 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useScrollWrapperHTMLElement } from '@/ui/utilities/scroll/hooks/useScrollWrapperHTMLElement';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import {type EventLogRecord,@@ -96,7 +96,7 @@ export const EventLogResultsTable = ({onLoadMore,selectedTable,}: EventLogResultsTableProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const baseColumns = getColumnsForEventLogTable(selectedTable);diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/SettingsLogs.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/SettingsLogs.tsxindex ba56b9e989e..75702862b73 100644--- a/packages/twenty-front/src/modules/settings/event-logs/components/SettingsLogs.tsx+++ b/packages/twenty-front/src/modules/settings/event-logs/components/SettingsLogs.tsx@@ -26,7 +26,7 @@ import {import { Button } from 'twenty-ui/primitives/input';import { IconButton } from 'twenty-ui/components';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {BillingEntitlementKey,diff --git a/packages/twenty-front/src/modules/settings/experience/components/FormatPreferencesSettings.tsx b/packages/twenty-front/src/modules/settings/experience/components/FormatPreferencesSettings.tsxindex 56e490e06cc..8cad343e2d3 100644--- a/packages/twenty-front/src/modules/settings/experience/components/FormatPreferencesSettings.tsx+++ b/packages/twenty-front/src/modules/settings/experience/components/FormatPreferencesSettings.tsx@@ -18,7 +18,7 @@ import {WorkspaceMemberTimeFormatEnum,} from '~/generated-metadata/graphql';import { DateTimeSettingsCalendarStartDaySelect } from '~/pages/settings/profile/appearance/components/DateTimeSettingsCalendarStartDaySelect';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/experience/components/OpenRecordInCardMedia.tsx b/packages/twenty-front/src/modules/settings/experience/components/OpenRecordInCardMedia.tsxindex ad362c6f1c0..0a3eea95aa9 100644--- a/packages/twenty-front/src/modules/settings/experience/components/OpenRecordInCardMedia.tsx+++ b/packages/twenty-front/src/modules/settings/experience/components/OpenRecordInCardMedia.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { IconArrowsDiagonal, IconUserCircle } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type OpenRecordInCardMediaProps = {type: 'member-preference' | 'side-panel' | 'full-page';diff --git a/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx b/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsxindex b7b3108339a..fcad3f56c83 100644--- a/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx+++ b/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx@@ -7,7 +7,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { useState } from 'react';import { useIcons } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type FeatureFlagKey } from '~/generated-metadata/graphql';const StyledCardGrid = styled.div`diff --git a/packages/twenty-front/src/modules/settings/legal/components/DpaDocumentPreview.tsx b/packages/twenty-front/src/modules/settings/legal/components/DpaDocumentPreview.tsxindex 887c416e5fb..33ee6d47be5 100644--- a/packages/twenty-front/src/modules/settings/legal/components/DpaDocumentPreview.tsx+++ b/packages/twenty-front/src/modules/settings/legal/components/DpaDocumentPreview.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type DpaDocument } from '@/settings/legal/types/Dpa';diff --git a/packages/twenty-front/src/modules/settings/legal/components/SettingsDpaAgreementRow.tsx b/packages/twenty-front/src/modules/settings/legal/components/SettingsDpaAgreementRow.tsxindex 1eb241e25d4..c59a6c5e62c 100644--- a/packages/twenty-front/src/modules/settings/legal/components/SettingsDpaAgreementRow.tsx+++ b/packages/twenty-front/src/modules/settings/legal/components/SettingsDpaAgreementRow.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Button } from 'twenty-ui/primitives/input';diff --git a/packages/twenty-front/src/modules/settings/legal/components/SettingsDpaAgreementsTable.tsx b/packages/twenty-front/src/modules/settings/legal/components/SettingsDpaAgreementsTable.tsxindex 62b0db9c091..1d91f8bcd6d 100644--- a/packages/twenty-front/src/modules/settings/legal/components/SettingsDpaAgreementsTable.tsx+++ b/packages/twenty-front/src/modules/settings/legal/components/SettingsDpaAgreementsTable.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { Trans, useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { downloadFile } from '@/activities/files/utils/downloadFile';import {diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionNewForm.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionNewForm.tsxindex 93c9b275681..880affe0ad5 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionNewForm.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionNewForm.tsx@@ -7,7 +7,7 @@ import { t } from '@lingui/core/macro';import { Section } from 'twenty-ui/components';import { IconClockHour8 } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledInputsContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTestTab.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTestTab.tsxindex 3fb8b4c6ce9..49a02e5df38 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTestTab.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTestTab.tsx@@ -22,7 +22,7 @@ import {type IconComponent,} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type TriggerButton = {kind: TriggerKind;diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTriggersTab.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTriggersTab.tsxindex b8973369379..6cda548f9e3 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTriggersTab.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTriggersTab.tsx@@ -9,7 +9,7 @@ import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { Callout } from 'twenty-ui/components';import { IconInfoCircle } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledEmptyState = styled.div`background-color: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionCronTriggerSection.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionCronTriggerSection.tsxindex 88c51b0fffa..f90e1619b0f 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionCronTriggerSection.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionCronTriggerSection.tsx@@ -5,7 +5,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { type CronTriggerSettings } from 'twenty-shared/application';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const DEFAULT_CRON_SETTINGS: CronTriggerSettings = {pattern: '0 */1 * * *',diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionHttpTriggerSection.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionHttpTriggerSection.tsxindex 7c5290c13ce..3455e3ce65d 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionHttpTriggerSection.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionHttpTriggerSection.tsx@@ -19,7 +19,7 @@ import {type IconComponent,} from 'twenty-ui/icon';import { Switch } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useGetLogicFunctionHttpUrl } from '@/settings/logic-functions/hooks/useGetLogicFunctionHttpUrl';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionTriggerPayloadFormat.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionTriggerPayloadFormat.tsxindex c0f84c03279..1dbe7738fed 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionTriggerPayloadFormat.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionTriggerPayloadFormat.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { CodeEditor } from 'twenty-ui/components/code-editor';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionTriggerSection.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionTriggerSection.tsxindex fe5b6fba129..86fc0adf5ce 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionTriggerSection.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/triggers/SettingsLogicFunctionTriggerSection.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { Section } from 'twenty-ui/components';import { Switch } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledHeader = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/GraphQLPlayground.tsx b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/GraphQLPlayground.tsxindex 151e8025a8d..30d2141f494 100644--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/GraphQLPlayground.tsx+++ b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/GraphQLPlayground.tsx@@ -10,9 +10,8 @@ import '@graphiql/plugin-explorer/style.css';import { createGraphiQLFetcher } from '@graphiql/toolkit';import { GraphiQL } from 'graphiql';import 'graphiql/style.css';-import { useContext } from 'react';import { REACT_APP_SERVER_BASE_URL } from '~/config';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useThemeColorScheme, themeCssVariables } from 'twenty-ui/theme';type GraphQLPlaygroundProps = {onError(): void;@@ -41,7 +40,7 @@ export const GraphQLPlayground = ({const playgroundApiKey = useAtomStateValue(playgroundApiKeyState);const baseUrl = REACT_APP_SERVER_BASE_URL + '/' + schemaToPath[schema];- const { colorScheme } = useContext(ThemeContext);+ const colorScheme = useThemeColorScheme();if (!isPlaygroundApiKeyFresh(playgroundApiKey)) {onError();diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/McpClientLogo.tsx b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/McpClientLogo.tsxindex 5dce0d9d9d0..4c1b14bccab 100644--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/McpClientLogo.tsx+++ b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/McpClientLogo.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';-import { useThemeColorScheme } from 'twenty-ui/theme-constants';+import { useThemeColorScheme } from 'twenty-ui/theme';const StyledLogoImage = styled.img<{ isInverted: boolean }>`display: block;diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/PlaygroundSetupForm.tsx b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/PlaygroundSetupForm.tsxindex 769e6449e99..023f307a072 100644--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/PlaygroundSetupForm.tsx+++ b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/PlaygroundSetupForm.tsx@@ -9,7 +9,7 @@ import { useLingui } from '@lingui/react/macro';import { Controller, useForm } from 'react-hook-form';import { IconApi, IconBrandGraphql } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { z } from 'zod';const playgroundSetupFormSchema = z.object({diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlayground.tsx b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlayground.tsxindex 997d15614f5..459551dd127 100644--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlayground.tsx+++ b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/RestPlayground.tsx@@ -5,13 +5,17 @@ import {} from '@/settings/mcp-and-apis/states/playgroundApiKeyState';import { type PlaygroundSchemas } from '@/settings/mcp-and-apis/types/PlaygroundSchemas';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useContext, useState, lazy, Suspense } from 'react';+import { useState, lazy, Suspense } from 'react';import { styled } from '@linaria/react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { REACT_APP_SERVER_BASE_URL } from '~/config';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import {+ useTheme,+ useThemeColorScheme,+ themeCssVariables,+} from 'twenty-ui/theme';const StyledContainer = styled.div`border: 1px solid ${themeCssVariables.border.color.medium};@@ -54,7 +58,8 @@ type RestPlaygroundProps = {};export const RestPlayground = ({ onError, schema }: RestPlaygroundProps) => {- const { theme, colorScheme } = useContext(ThemeContext);+ const theme = useTheme();+ const colorScheme = useThemeColorScheme();const playgroundApiKey = useAtomStateValue(playgroundApiKeyState);const [specContent, setSpecContent] = useState<object | null>(null);diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetup.tsx b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetup.tsxindex 608ed4aa045..8208e92ce9e 100644--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetup.tsx+++ b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetup.tsx@@ -13,7 +13,7 @@ import {} from '@/settings/mcp-and-apis/utils/mcpSetup';import { Section } from 'twenty-ui/components';import { CodeEditor, CodeEditorHeader } from 'twenty-ui/components/code-editor';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { REACT_APP_SERVER_BASE_URL } from '~/config';const StyledMcpEditorHeaderTitle = styled.div`diff --git a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsx b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsxindex 167bae6884c..826c4127cd8 100644--- a/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsx+++ b/packages/twenty-front/src/modules/settings/mcp-and-apis/components/SettingsMcpSetupCard.tsx@@ -6,7 +6,7 @@ import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { IconExternalLink } from 'twenty-ui/icon';import { Pill } from 'twenty-ui/primitives/data-display';import { Card, CardContent, Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledCardContent = styled(CardContent)`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/members/components/MemberInfosTab.tsx b/packages/twenty-front/src/modules/settings/members/components/MemberInfosTab.tsxindex 5c4a9265c66..0150a780937 100644--- a/packages/twenty-front/src/modules/settings/members/components/MemberInfosTab.tsx+++ b/packages/twenty-front/src/modules/settings/members/components/MemberInfosTab.tsx@@ -8,7 +8,7 @@ import { type WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';import { t } from '@lingui/core/macro';import { Section } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type MemberInfosTabProps = {member: WorkspaceMember;diff --git a/packages/twenty-front/src/modules/settings/members/components/MemberPermissionsTab.tsx b/packages/twenty-front/src/modules/settings/members/components/MemberPermissionsTab.tsxindex f75e4638852..5df3a440667 100644--- a/packages/twenty-front/src/modules/settings/members/components/MemberPermissionsTab.tsx+++ b/packages/twenty-front/src/modules/settings/members/components/MemberPermissionsTab.tsx@@ -13,7 +13,7 @@ import { isDefined } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconArrowUpRight, IconUser, useIcons } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { UpdateWorkspaceMemberRoleDocument } from '~/generated-metadata/graphql';import { useNavigateSettings } from '~/hooks/useNavigateSettings';diff --git a/packages/twenty-front/src/modules/settings/profile/components/DeleteAccount.tsx b/packages/twenty-front/src/modules/settings/profile/components/DeleteAccount.tsxindex deb71b782a0..5f58cf73e91 100644--- a/packages/twenty-front/src/modules/settings/profile/components/DeleteAccount.tsx+++ b/packages/twenty-front/src/modules/settings/profile/components/DeleteAccount.tsx@@ -12,7 +12,7 @@ import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {DeleteUserAccountDocument,DeleteUserWorkspaceDocument,diff --git a/packages/twenty-front/src/modules/settings/profile/components/EmailField.tsx b/packages/twenty-front/src/modules/settings/profile/components/EmailField.tsxindex a4c6dffd70b..526a5d37af0 100644--- a/packages/twenty-front/src/modules/settings/profile/components/EmailField.tsx+++ b/packages/twenty-front/src/modules/settings/profile/components/EmailField.tsx@@ -11,7 +11,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { IconCheck, IconPencil, IconX } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';import { Button, ButtonGroup } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx b/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsxindex e00a920c5af..63b4c24ec88 100644--- a/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx+++ b/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx@@ -9,7 +9,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { useCanEditProfileField } from '@/settings/profile/hooks/useCanEditProfileField';import { useUpdateWorkspaceMemberSettings } from '@/settings/profile/hooks/useUpdateWorkspaceMemberSettings';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { logError } from '~/utils/logError';const StyledComboInputContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/profile/devices/components/SettingsProfileDevicesSection.tsx b/packages/twenty-front/src/modules/settings/profile/devices/components/SettingsProfileDevicesSection.tsxindex f9eee32ed1e..99e38df7587 100644--- a/packages/twenty-front/src/modules/settings/profile/devices/components/SettingsProfileDevicesSection.tsx+++ b/packages/twenty-front/src/modules/settings/profile/devices/components/SettingsProfileDevicesSection.tsx@@ -11,7 +11,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { Section, useToast } from 'twenty-ui/components';import { IconDeviceDesktop, IconLogout } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {CurrentUserSessionsDocument,type CurrentUserSessionsQuery,diff --git a/packages/twenty-front/src/modules/settings/profile/devices/components/__tests__/SettingsProfileDevicesSection.test.tsx b/packages/twenty-front/src/modules/settings/profile/devices/components/__tests__/SettingsProfileDevicesSection.test.tsxindex 4a6debc7ec5..6026fe7b69d 100644--- a/packages/twenty-front/src/modules/settings/profile/devices/components/__tests__/SettingsProfileDevicesSection.test.tsx+++ b/packages/twenty-front/src/modules/settings/profile/devices/components/__tests__/SettingsProfileDevicesSection.test.tsx@@ -1,5 +1,5 @@import { AppToaster } from '@/ui/feedback/toast/components/AppToaster';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { i18n } from '@lingui/core';import { I18nProvider } from '@lingui/react';import { render, screen } from '@testing-library/react';diff --git a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsx b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsxindex c1218bc0e8c..a37c0b3683b 100644--- a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsx+++ b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsx@@ -20,7 +20,7 @@ import {IconSearch,} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { sortByAscString } from '~/utils/array/sortByAscString';diff --git a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesTableRow.tsx b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesTableRow.tsxindex b8831ee6b28..72686082ea1 100644--- a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesTableRow.tsx@@ -4,12 +4,11 @@ import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { t } from '@lingui/core/macro';import { styled } from '@linaria/react';-import { useContext } from 'react';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconChevronRight, IconLock, useIcons } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { WorkspaceMemberAvatarStack } from '@/workspace-member/components/WorkspaceMemberAvatarStack';const StyledNameCell = styled.div`@@ -45,7 +44,7 @@ type SettingsRolesTableRowProps = {const MAX_VISIBLE_ROLE_MEMBER_AVATARS = 5;export const SettingsRolesTableRow = ({ role }: SettingsRolesTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const Icon = getIcon(role.icon ?? 'IconUser');diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/RoleAssignmentSection.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/RoleAssignmentSection.tsxindex 991d9fd03ec..06f0127f39f 100644--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/RoleAssignmentSection.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/RoleAssignmentSection.tsx@@ -8,7 +8,7 @@ import { Section } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type Agent, type ApiKeyForRole } from '~/generated-metadata/graphql';import {type PartialWorkspaceMember,diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentConfirmationModalSubtitle.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentConfirmationModalSubtitle.tsxindex f20050a8b6d..69a3ba2ef0a 100644--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentConfirmationModalSubtitle.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentConfirmationModalSubtitle.tsx@@ -6,7 +6,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Avatar } from 'twenty-ui/primitives/data-display';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';const StyledSettingsCardContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsxindex 228e3361278..f8ac3342429 100644--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx@@ -15,7 +15,7 @@ import {GetApiKeysDocument,} from '~/generated-metadata/graphql';import { normalizeSearchText } from '~/utils/normalizeSearchText';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLoadingContainer = styled.div`padding: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTable.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTable.tsxindex da47fb52bca..c099e99f3de 100644--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTable.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTable.tsx@@ -17,7 +17,7 @@ import { IconSearch } from 'twenty-ui/icon';import { type Agent, type ApiKeyForRole } from '~/generated-metadata/graphql';import { normalizeSearchText } from '~/utils/normalizeSearchText';import { type PartialWorkspaceMember } from '@/settings/roles/types/RoleWithPartialMembers';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTable = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTableRow.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTableRow.tsxindex 81892406d50..b8e8b193674 100644--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTableRow.tsx@@ -10,7 +10,7 @@ import { useContext } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconKey, useIcons } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type Agent, type ApiKeyForRole } from '~/generated-metadata/graphql';import { dateLocaleState } from '~/localization/states/dateLocaleState';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';@@ -51,7 +51,7 @@ export const SettingsRoleAssignmentTableRow = ({const currentWorkspaceMembers = useAtomStateValue(currentWorkspaceMembersState,);- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const { dateFormat, timeZone } = useContext(UserContext);const dateLocale = useAtomStateValue(dateLocaleState);diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/components/SettingsRolePermissions.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/components/SettingsRolePermissions.tsxindex b11fd3abc91..0786a26a0f0 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/components/SettingsRolePermissions.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/components/SettingsRolePermissions.tsx@@ -4,7 +4,7 @@ import { SettingsRolePermissionsObjectsSection } from '@/settings/roles/role-perimport { SettingsRolePermissionsSettingsSection } from '@/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection';import { SettingsRolePermissionsToolSection } from '@/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsToolSection';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRolePermissionsContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelObjectPicker.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelObjectPicker.tsxindex eb4f43642c4..496de027dd1 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelObjectPicker.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelObjectPicker.tsx@@ -7,12 +7,12 @@ import { useObjectMetadataItemsThatCanHavePermission } from '@/settings/roles/roimport { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { useSearchParams } from 'react-router-dom';import { SettingsPath } from 'twenty-shared/types';import { Section } from 'twenty-ui/components';import { IconSearch } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const StyledTypeSelectContainer = styled.div`@@ -53,7 +53,7 @@ export const SettingsRolePermissionsObjectLevelObjectPicker = ({}: {roleId: string;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const navigate = useNavigateSettings();const getIsMetadataItemCustom = useGetIsMetadataItemCustom();const [searchParams] = useSearchParams();diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelOverrideCellContainer.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelOverrideCellContainer.tsxindex 296e6e68ba8..1515f0b82cd 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelOverrideCellContainer.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelOverrideCellContainer.tsx@@ -3,7 +3,7 @@ import { SETTINGS_ROLE_OBJECT_LEVEL_PERMISSION_TO_ROLE_OBJECT_PERMISSION_MAPPINGimport { type SettingsRoleObjectPermissionKey } from '@/settings/roles/role-permissions/objects-permissions/constants/SettingsRoleObjectPermissionIconConfig';import { styled } from '@linaria/react';import { SettingsRolePermissionsObjectLevelOverrideCell } from './SettingsRolePermissionsObjectLevelOverrideCell';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSettingsRolePermissionsObjectLevelOverrideCell = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelSection.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelSection.tsxindex c937b9ada14..0650b57a624 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelSection.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelSection.tsx@@ -15,7 +15,7 @@ import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const StyledCreateObjectOverrideSectionContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelTableRow.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelTableRow.tsxindex b5e03ff4da1..155833f2334 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelTableRow.tsx@@ -8,11 +8,10 @@ import { OBJECT_LEVEL_PERMISSION_TABLE_GRID_AUTO_COLUMNS } from '@/settings/roleimport { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';-import { useContext } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledNameLabel = styled.div`overflow: hidden;@@ -33,7 +32,7 @@ export const SettingsRolePermissionsObjectLevelTableRow = ({isEditable = true,fromAgentId,}: SettingsRolePermissionsObjectLevelTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const objectLabelPlural = objectMetadataItem.labelPlural;const navigationPath = getSettingsPath(SettingsPath.RoleObjectLevel, {roleId: roleId,diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTable.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTable.tsxindex 165dd615627..f855796c0d5 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTable.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTable.tsx@@ -22,7 +22,7 @@ import { useState } from 'react';import { isNonEmptyArray } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconSearch } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { sortByProperty } from '~/utils/array/sortByProperty';export const SETTINGS_ROLE_PERMISSION_OBJECT_LEVEL_FIELD_PERMISSION_TABLE_ID =diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTableAllHeaderRow.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTableAllHeaderRow.tsxindex ef0870a5e66..84aaeb0ae31 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTableAllHeaderRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTableAllHeaderRow.tsx@@ -11,7 +11,7 @@ import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtoimport { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Text } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSectionHeader = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRow.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRow.tsxindex 6b1fdbbdec8..3a5ea246bc6 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/components/SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRow.tsx@@ -10,10 +10,10 @@ import { OverridableCheckbox } from '@/settings/roles/role-permissions/object-leimport { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';-import { useContext, useMemo } from 'react';+import { useMemo } from 'react';import { isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { v4 } from 'uuid';import {type FieldPermission,@@ -47,7 +47,7 @@ export const SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRow =roleId,isLabelIdentifier,}: SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const Icon = getIcon(fieldMetadataItem.icon);diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/OverridableCheckbox.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/OverridableCheckbox.tsxindex 6c419d3bd26..0b71f233dd9 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/OverridableCheckbox.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/OverridableCheckbox.tsx@@ -1,9 +1,8 @@import { AnimatedRotate } from '@/settings/roles/role-permissions/object-level-permissions/object-form/components/internal/AnimatedRotate/AnimatedRotate';import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconReload, IconX } from 'twenty-ui/icon';import { Checkbox } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type OverridableCheckboxType = 'default' | 'override' | 'no_cta';@@ -47,7 +46,7 @@ export const OverridableCheckbox = ({checked,disabled,}: OverridableCheckboxProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledOverridableCheckboxContainer>diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsxindex eec88654a7b..3c48eabb574 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx@@ -19,7 +19,7 @@ import {isDefined,isRecordFilterValueValid,} from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useQuery } from '@apollo/client/react';import {type BillingEntitlement,diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectFormObjectLevel.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectFormObjectLevel.tsxindex 8c0dced3bca..ba3c6671ec3 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectFormObjectLevel.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectFormObjectLevel.tsx@@ -7,7 +7,7 @@ import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtoimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTable = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectFormObjectLevelTableRow.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectFormObjectLevelTableRow.tsxindex 89f462ef251..29652ae232a 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectFormObjectLevelTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectFormObjectLevelTableRow.tsx@@ -12,7 +12,7 @@ import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type ObjectPermission, type Role } from '~/generated-metadata/graphql';const StyledPermissionContent = styled.div`diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterBuilderContent.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterBuilderContent.tsxindex 0ff745ffbc8..f4914da06f8 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterBuilderContent.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterBuilderContent.tsx@@ -5,7 +5,7 @@ import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { IconFilter, IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { CommandMenuButton } from '@/command-menu/components/CommandMenuButton';import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterRow.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterRow.tsxindex 0a6f544f614..de58fd16510 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterRow.tsx@@ -11,7 +11,7 @@ import { type RecordFilter } from '@/object-record/record-filter/types/RecordFilimport { SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelect } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelect';import { SettingsRolePermissionsObjectLevelRecordLevelPermissionLogicalOperatorCell } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionLogicalOperatorCell';import { SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInput } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInput';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFilterRow = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionLogicalOperatorCell.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionLogicalOperatorCell.tsxindex ad949f7404d..54be10f7f90 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionLogicalOperatorCell.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionLogicalOperatorCell.tsx@@ -12,7 +12,7 @@ import { AdvancedFilterContext } from '@/object-record/advanced-filter/states/coimport { type RecordFilterGroup } from '@/object-record/record-filter-group/types/RecordFilterGroup';import { Select } from '@/ui/input/components/Select';import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledText = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionMeValueSelect.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionMeValueSelect.tsxindex 98b1f8ec529..9b8185bb09c 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionMeValueSelect.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionMeValueSelect.tsx@@ -12,7 +12,7 @@ import {} from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { IconUserCircle, IconX, useIcons } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { fieldMetadataItemUsedInDropdownComponentSelector } from '@/object-record/object-filter-dropdown/states/fieldMetadataItemUsedInDropdownComponentSelector';diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInput.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInput.tsxindex d8e5754d1f3..b70716915bd 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInput.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInput.tsx@@ -26,7 +26,7 @@ import { type CompositeFieldType } from '@/settings/data-model/types/CompositeFiimport { createRecordLevelPermissionVariablePicker } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker';import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: stretch;@@ -99,7 +99,7 @@ export const SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInput =({recordFilterId,}: SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInputProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { objectMetadataItem } = useContext(AdvancedFilterContext);const currentRecordFilters = useAtomComponentStateValue(diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsxindex 974581ee8f4..262267cfb76 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx@@ -2,8 +2,7 @@import { styled } from '@linaria/react';import { IconVariablePlus } from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';import { SettingsRolePermissionsObjectLevelRecordLevelPermissionMeValueSelect } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionMeValueSelect';@@ -64,7 +63,7 @@ export const createRecordLevelPermissionVariablePicker = (disabled,multiline,}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<Dropdowndiff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelSection.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelSection.tsxindex 55901953d0d..fbfcd8df6b2 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelSection.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelSection.tsx@@ -13,7 +13,7 @@ import { SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterBuilder }import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { SettingsPath } from 'twenty-shared/types';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { OrganizationAdornment } from '~/pages/settings/enterprise/components/OrganizationAdornment';diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/PermissionIcon.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/PermissionIcon.tsxindex 2d72307b829..e6cb66ca9bf 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/PermissionIcon.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/PermissionIcon.tsx@@ -3,8 +3,7 @@ import {type SettingsRoleObjectPermissionKey,} from '@/settings/roles/role-permissions/objects-permissions/constants/SettingsRoleObjectPermissionIconConfig';import { styled } from '@linaria/react';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type PermissionIconProps = {permission: SettingsRoleObjectPermissionKey;@@ -41,7 +40,7 @@ export const PermissionIcon = ({ permission, state }: PermissionIconProps) => {const { Icon, IconForbidden } =SETTINGS_ROLE_OBJECT_PERMISSION_ICON_CONFIG[permission];- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isRevoked = state === 'revoked';return (diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsSection.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsSection.tsxindex 14c8c6aa77f..87ee98a3ce3 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsSection.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsSection.tsx@@ -7,7 +7,7 @@ import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTable = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableHeader.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableHeader.tsxindex e937730845b..37a4154ff8a 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableHeader.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableHeader.tsx@@ -6,7 +6,7 @@ import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtimport { TableRow } from '@/ui/layout/table/components/TableRow';import { t } from '@lingui/core/macro';import { Checkbox } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsRolePermissionsObjectsTableHeaderProps = {roleId: string;diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableRow.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableRow.tsxindex 834b8f07ee9..b2b44cb2c51 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableRow.tsx@@ -6,7 +6,7 @@ import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';import { plural } from '@lingui/core/macro';import { Checkbox } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledPermissionContent = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection.tsxindex ba585ad7aee..c8b0b062d80 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection.tsx@@ -12,7 +12,7 @@ import { Section } from 'twenty-ui/components';import { IconSettings } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTable = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsTableHeader.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsTableHeader.tsxindex 8393d0f4068..11bc13fb355 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsTableHeader.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsTableHeader.tsx@@ -8,7 +8,7 @@ import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDrimport { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';import { v4 } from 'uuid';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsRolePermissionsSettingsTableHeaderProps = {roleId: string;diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsTableRow.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsTableRow.tsxindex 55ac20ee5c0..9e44e641cb9 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsTableRow.tsx@@ -7,8 +7,7 @@ import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtimport { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';import { Checkbox } from 'twenty-ui/primitives/input';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { v4 } from 'uuid';const StyledName = styled.span`@@ -37,7 +36,7 @@ export const SettingsRolePermissionsSettingsTableRow = ({permission,isEditable,}: SettingsRolePermissionsSettingsTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const settingsDraftRole = useAtomFamilyStateValue(settingsDraftRoleFamilyState,roleId,diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsToolSection.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsToolSection.tsxindex 9d67119cab3..abe3dde8153 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsToolSection.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsToolSection.tsx@@ -13,7 +13,7 @@ import { Section } from 'twenty-ui/components';import { IconTool } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTable = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/settings/roles/role-settings/components/SettingsRoleApplicability.tsx b/packages/twenty-front/src/modules/settings/roles/role-settings/components/SettingsRoleApplicability.tsxindex 5f911d5a8f1..4cd4b83037b 100644--- a/packages/twenty-front/src/modules/settings/roles/role-settings/components/SettingsRoleApplicability.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-settings/components/SettingsRoleApplicability.tsx@@ -4,8 +4,7 @@ import { t } from '@lingui/core/macro';import { Section } from 'twenty-ui/components';import { IconKey, IconLego, IconUsers } from 'twenty-ui/icon';import { Checkbox } from 'twenty-ui/primitives/input';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledCheckboxContainer = styled.div<{ disabled: boolean }>`align-items: center;@@ -48,7 +47,7 @@ export const SettingsRoleApplicability = ({onApplicabilityChange,isEditable,}: SettingsRoleApplicabilityProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const options = [{diff --git a/packages/twenty-front/src/modules/settings/roles/role-settings/components/SettingsRoleSettings.tsx b/packages/twenty-front/src/modules/settings/roles/role-settings/components/SettingsRoleSettings.tsxindex d148f6afcb9..134173e6a38 100644--- a/packages/twenty-front/src/modules/settings/roles/role-settings/components/SettingsRoleSettings.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-settings/components/SettingsRoleSettings.tsx@@ -13,7 +13,7 @@ import { TextArea } from '@/ui/input/components/TextArea';import { useDialog } from '@/ui/layout/dialog/hooks/useDialog';import { Section } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledInputsContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsxindex cb6adf72c32..7d202618d1a 100644--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx@@ -12,7 +12,7 @@ import { capitalize } from 'twenty-shared/utils';import { useToast } from 'twenty-ui/components';import { IconGoogle, IconMicrosoft, IconPassword } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {type AuthProviders,UpdateWorkspaceDocument,diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsxindex 80dcc5457c5..427ad9b7872 100644--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx@@ -22,7 +22,7 @@ import {IconPassword,} from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {type AuthProviders,UpdateWorkspaceDocument,diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsxindex 5c0154fd982..1dbe0d7e444 100644--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx@@ -21,7 +21,7 @@ import {} from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';import { ListItem } from 'twenty-ui/primitives/navigation';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';const StyledDropdownContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityIframeOrigins.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityIframeOrigins.tsxindex 76a5e0e0204..190bc9e2720 100644--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityIframeOrigins.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityIframeOrigins.tsx@@ -6,7 +6,7 @@ import { isDefined, normalizeAllowedIframeOrigin } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconPlus, IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getToastOptionsFromError } from '@/error-handler/utils/getToastOptionsFromError';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecuritySettings.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecuritySettings.tsxindex 451ebac5da9..7a23be296ed 100644--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecuritySettings.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecuritySettings.tsx@@ -23,7 +23,7 @@ import { useLingui } from '@lingui/react/macro';import { Section, useToast } from 'twenty-ui/components';import { IconClockHour8, IconHistory, IconTrash } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';import { OrganizationAdornment } from '~/pages/settings/enterprise/components/OrganizationAdornment';diff --git a/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoIdentitiesProvidersForm.tsx b/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoIdentitiesProvidersForm.tsxindex d26be04c7a6..9f3dd426c8a 100644--- a/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoIdentitiesProvidersForm.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoIdentitiesProvidersForm.tsx@@ -12,7 +12,7 @@ import { type ReactElement, useMemo } from 'react';import { Controller, useFormContext } from 'react-hook-form';import { Section } from 'twenty-ui/components';import { type IconComponent, IconKey } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { IdentityProviderType } from '~/generated-metadata/graphql';const StyledInputsContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoIdentityProviderRowRightContainer.tsx b/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoIdentityProviderRowRightContainer.tsxindex 8c1a577a2c2..cea8e9a055e 100644--- a/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoIdentityProviderRowRightContainer.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoIdentityProviderRowRightContainer.tsx@@ -5,7 +5,7 @@ import { type SsoIdentityProvider } from '@/settings/security/types/SsoIdentityPimport { getColorBySsoIdentityProviderStatus } from '@/settings/security/utils/getColorBySsoIdentityProviderStatus';import { styled } from '@linaria/react';import { Status } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRowRightContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoOidcForm.tsx b/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoOidcForm.tsxindex 4ccac92e3c5..95dcab45190 100644--- a/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoOidcForm.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoOidcForm.tsx@@ -7,7 +7,7 @@ import { Controller, useFormContext } from 'react-hook-form';import { Section } from 'twenty-ui/components';import { IconCopy } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { REACT_APP_SERVER_BASE_URL } from '~/config';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';diff --git a/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoSamlForm.tsx b/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoSamlForm.tsxindex a0de017c883..24bbc8cb1a4 100644--- a/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoSamlForm.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/sso/SettingsSsoSamlForm.tsx@@ -2,14 +2,14 @@ import { parseSamlMetadataFromXmlFile } from '@/settings/security/utils/parseSamimport { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type ChangeEvent, useContext, useRef } from 'react';+import { type ChangeEvent, useRef } from 'react';import { useFormContext } from 'react-hook-form';import { isDefined } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconCheck, IconCopy, IconDownload, IconUpload } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { REACT_APP_SERVER_BASE_URL } from '~/config';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';/* @license Enterprise */@@ -48,7 +48,7 @@ const StyledButtonCopy = styled.div``;export const SettingsSsoSamlForm = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { enqueueToast } = useToast();const { setValue, getValues, watch, trigger } = useFormContext();const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/settings/translations/components/MetadataTranslationValueCell.tsx b/packages/twenty-front/src/modules/settings/translations/components/MetadataTranslationValueCell.tsxindex 8788278b212..7481bf1db1d 100644--- a/packages/twenty-front/src/modules/settings/translations/components/MetadataTranslationValueCell.tsx+++ b/packages/twenty-front/src/modules/settings/translations/components/MetadataTranslationValueCell.tsx@@ -3,7 +3,7 @@ import { TextInput } from '@/ui/input/components/TextInput';import { styled } from '@linaria/react';import { useState } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { MetadataTranslationProvenance } from '~/generated-metadata/graphql';const StyledValue = styled.div<{ isInherited: boolean }>`diff --git a/packages/twenty-front/src/modules/settings/translations/components/SidePanelSettingsMetadataTranslationsPage.tsx b/packages/twenty-front/src/modules/settings/translations/components/SidePanelSettingsMetadataTranslationsPage.tsxindex 739299a7855..57538e0a21f 100644--- a/packages/twenty-front/src/modules/settings/translations/components/SidePanelSettingsMetadataTranslationsPage.tsx+++ b/packages/twenty-front/src/modules/settings/translations/components/SidePanelSettingsMetadataTranslationsPage.tsx@@ -16,7 +16,7 @@ import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { LightIconButton, Section } from 'twenty-ui/components';import { IconRestore } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { MetadataTranslationProvenance } from '~/generated-metadata/graphql';import { useLocaleOptions } from '~/localization/hooks/useLocaleOptions';diff --git a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeDash.tsx b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeDash.tsxindex 1904c9cd917..43d05990d85 100644--- a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeDash.tsx+++ b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeDash.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDashContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot.tsx b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot.tsxindex b4ef4c5bbee..d875986ebe8 100644--- a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot.tsx+++ b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type SlotProps } from 'input-otp';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSlot = styled.div<{ isActive: boolean }>`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationForSettings.tsx b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationForSettings.tsxindex 7b21f2bd47b..f4729bfbae3 100644--- a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationForSettings.tsx+++ b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationForSettings.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { OTPInput } from 'input-otp';import { Controller, useFormContext } from 'react-hook-form';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { TwoFactorAuthenticationVerificationCodeDash } from '@/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeDash';import { TwoFactorAuthenticationVerificationCodeSlot } from '@/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot';diff --git a/packages/twenty-front/src/modules/settings/unsubscribe-topics/components/SettingsWorkspaceUnsubscribeTopicSection.tsx b/packages/twenty-front/src/modules/settings/unsubscribe-topics/components/SettingsWorkspaceUnsubscribeTopicSection.tsxindex 85c02ecbb46..76f5d5b980f 100644--- a/packages/twenty-front/src/modules/settings/unsubscribe-topics/components/SettingsWorkspaceUnsubscribeTopicSection.tsx+++ b/packages/twenty-front/src/modules/settings/unsubscribe-topics/components/SettingsWorkspaceUnsubscribeTopicSection.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';diff --git a/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribePreview.tsx b/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribePreview.tsxindex 7056e19821e..e0cf1aa04eb 100644--- a/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribePreview.tsx+++ b/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribePreview.tsx@@ -6,7 +6,7 @@ import { Section } from 'twenty-ui/components';import { Button, Checkbox } from 'twenty-ui/primitives/input';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { UnsubscribeTopicVisibility } from '~/generated-metadata/graphql';const StyledViewport = styled.div`diff --git a/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribersList.tsx b/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribersList.tsxindex 84b7cbb826a..c3dcd7fb670 100644--- a/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribersList.tsx+++ b/packages/twenty-front/src/modules/settings/unsubscribers/components/SettingsUnsubscribersList.tsx@@ -16,7 +16,7 @@ import { useMessageSuppressions } from '@/settings/unsubscribers/hooks/useMessagimport { getMessageSuppressionReasonBadge } from '@/settings/unsubscribers/utils/getMessageSuppressionReasonBadge';import { SearchInput } from 'twenty-ui/components';import { Status } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {MessageSuppressionReason,type MessageSuppressionsQuery,diff --git a/packages/twenty-front/src/modules/settings/usage/components/UsageBreakdownPieSection.tsx b/packages/twenty-front/src/modules/settings/usage/components/UsageBreakdownPieSection.tsxindex 992e56527f5..1aec933583c 100644--- a/packages/twenty-front/src/modules/settings/usage/components/UsageBreakdownPieSection.tsx+++ b/packages/twenty-front/src/modules/settings/usage/components/UsageBreakdownPieSection.tsx@@ -8,10 +8,9 @@ import { useUsageValueFormatter } from '@/settings/usage/hooks/useUsageValueFormimport { getUsageOperationTypeLabel } from '@/settings/usage/utils/getUsageOperationTypeLabel';import { Select } from '@/ui/input/components/Select';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { type UsageOperationType } from '~/generated-metadata/graphql';type UsageBreakdownField = 'operationType' | 'application' | 'model';@@ -35,7 +34,7 @@ export const UsageBreakdownPieSection = ({breakdownField,sectionId,}: UsageBreakdownPieSectionProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { formatUsageValue } = useUsageValueFormatter();const colorRegistry = createGraphColorRegistry(theme.color);diff --git a/packages/twenty-front/src/modules/settings/usage/components/UsageByUserTableSection.tsx b/packages/twenty-front/src/modules/settings/usage/components/UsageByUserTableSection.tsxindex f3ddba4a15b..19c23df47e0 100644--- a/packages/twenty-front/src/modules/settings/usage/components/UsageByUserTableSection.tsx+++ b/packages/twenty-front/src/modules/settings/usage/components/UsageByUserTableSection.tsx@@ -8,11 +8,11 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { SearchInput, Section } from 'twenty-ui/components';import { IconChevronRight } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type UsageOperationType } from '~/generated-metadata/graphql';import { normalizeSearchText } from '~/utils/normalizeSearchText';@@ -43,7 +43,7 @@ export const UsageByUserTableSection = ({getDetailPath,showAvatar = false,}: UsageByUserTableSectionProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatUsageValue } = useUsageValueFormatter();const [searchTerm, setSearchTerm] = useState('');diff --git a/packages/twenty-front/src/modules/settings/usage/components/UsagePieChart.tsx b/packages/twenty-front/src/modules/settings/usage/components/UsagePieChart.tsxindex 32285f75718..180875bfc53 100644--- a/packages/twenty-front/src/modules/settings/usage/components/UsagePieChart.tsx+++ b/packages/twenty-front/src/modules/settings/usage/components/UsagePieChart.tsx@@ -3,8 +3,7 @@ import { GraphWidgetLegendDot } from '@/page-layout/widgets/graph/components/Graimport { useUsageValueFormatter } from '@/settings/usage/hooks/useUsageValueFormatter';import { styled } from '@linaria/react';import { ResponsivePie } from '@nivo/pie';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type UsagePieChartDatum = {id: string;@@ -51,7 +50,7 @@ const StyledTooltipValue = styled.span``;export const UsagePieChart = ({ data }: UsagePieChartProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatUsageValue } = useUsageValueFormatter();return (diff --git a/packages/twenty-front/src/modules/settings/usage/components/UsageSectionSkeleton.tsx b/packages/twenty-front/src/modules/settings/usage/components/UsageSectionSkeleton.tsxindex 1cab1960cfa..2a74f3a4022 100644--- a/packages/twenty-front/src/modules/settings/usage/components/UsageSectionSkeleton.tsx+++ b/packages/twenty-front/src/modules/settings/usage/components/UsageSectionSkeleton.tsx@@ -1,11 +1,9 @@-import { useContext } from 'react';-import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { Section } from 'twenty-ui/components';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const UsageSectionSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemediff --git a/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx b/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsxindex 7fb007c1915..8f8524a87da 100644--- a/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx+++ b/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx@@ -9,7 +9,7 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { useLingui } from '@lingui/react/macro';import isEmpty from 'lodash.isempty';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useMutation } from '@apollo/client/react';import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';diff --git a/packages/twenty-front/src/modules/settings/workspace/components/SettingsWorkspaceEmailGroupSourceCell.tsx b/packages/twenty-front/src/modules/settings/workspace/components/SettingsWorkspaceEmailGroupSourceCell.tsxindex 4c68c8bcb79..2b17a77b4b7 100644--- a/packages/twenty-front/src/modules/settings/workspace/components/SettingsWorkspaceEmailGroupSourceCell.tsx+++ b/packages/twenty-front/src/modules/settings/workspace/components/SettingsWorkspaceEmailGroupSourceCell.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { type MessageChannel } from '@/accounts/types/MessageChannel';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledNameCell = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelBackButton.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelBackButton.tsxindex fcb810476eb..c5313b4fdbc 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelBackButton.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelBackButton.tsx@@ -10,7 +10,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { IconButton, MenuItem } from 'twenty-ui/components';import { IconChevronLeft } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledNavigationIcon = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChip.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChip.tsxindex 5051b65a3cd..6e428606905 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChip.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChip.tsx@@ -4,7 +4,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { Fragment } from 'react/jsx-runtime';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type SidePanelNavigationStackItem } from '@/side-panel/states/sidePanelNavigationStackState';diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChipIconWrapper.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChipIconWrapper.tsxindex 10b77f81aac..7cb945259c8 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChipIconWrapper.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelContextChipIconWrapper.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSidePanelContextChipIconWrapper = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelContextRecordChipAvatars.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelContextRecordChipAvatars.tsxindex 427ec32da9b..e63030b2533 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelContextRecordChipAvatars.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelContextRecordChipAvatars.tsx@@ -4,9 +4,8 @@ import { useRecordChipData } from '@/object-record/hooks/useRecordChipData';import { type ObjectRecord } from '@/object-record/types/ObjectRecord';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';import { styled } from '@linaria/react';-import { useContext } from 'react';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledIconWrapper = styled.div<{ withIconBackground?: boolean }>`align-items: center;background: ${({ withIconBackground }) =>@@ -31,7 +30,7 @@ export const SidePanelContextRecordChipAvatars = ({objectMetadataItem: EnrichedObjectMetadataItem;record: ObjectRecord;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { recordChipData } = useRecordChipData({objectNameSingular: objectMetadataItem.nameSingular,record,diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelForDesktop.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelForDesktop.tsxindex d0f5116558d..7c03c9005c3 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelForDesktop.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelForDesktop.tsx@@ -27,7 +27,7 @@ import {useCallback,useState,} from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSidePanelWrapper = styled.div<{ isOpen: boolean }>`background: ${themeCssVariables.background.primary};diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelGroup.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelGroup.tsxindex 3afa383e6e0..98e14f6d855 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelGroup.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelGroup.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import React from 'react';import { isDefined } from 'twenty-shared/utils';import { Text } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledGroupHeadingContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelGroupFormContainer.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelGroupFormContainer.tsxindex 832ea5e77ac..4af020168a1 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelGroupFormContainer.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelGroupFormContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFormContainer = styled.div`padding-inline: ${themeCssVariables.spacing[1]};diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelList.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelList.tsxindex 4d372512681..e71f2e8d716 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelList.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelList.tsx@@ -10,7 +10,7 @@ import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomStatimport { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';type SidePanelListProps = {selectableItemIds: string[];diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelMultipleRecordsInfo.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelMultipleRecordsInfo.tsxindex 6b0497617ff..d40b8f4adb2 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelMultipleRecordsInfo.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelMultipleRecordsInfo.tsx@@ -2,9 +2,8 @@ import { HeaderIdentifier } from '@/ui/layout/page/components/HeaderIdentifier';import { useFindManyRecordsSelectedInContextStore } from '@/context-store/hooks/useFindManyRecordsSelectedInContextStore';import { useNumberFormat } from '@/localization/hooks/useNumberFormat';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { IconPencil } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type SidePanelMultipleRecordsInfoProps = {sidePanelPageInstanceId: string;@@ -13,7 +12,7 @@ type SidePanelMultipleRecordsInfoProps = {export const SidePanelMultipleRecordsInfo = ({sidePanelPageInstanceId,}: SidePanelMultipleRecordsInfoProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatNumber } = useNumberFormat();const { totalCount } = useFindManyRecordsSelectedInContextStore({instanceId: sidePanelPageInstanceId,diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelPageLayoutInfoContent.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelPageLayoutInfoContent.tsxindex 0b3d169fb1a..efb1423d448 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelPageLayoutInfoContent.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelPageLayoutInfoContent.tsx@@ -15,11 +15,11 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { css } from '@linaria/core';import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';-import { useContext, useState } from 'react';+import { useState } from 'react';import { SidePanelPages } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { HeaderIdentifier } from '@/ui/layout/page/components/HeaderIdentifier';const StyledClickableIconWrapper = styled.div`@@ -38,7 +38,7 @@ export const SidePanelPageLayoutInfoContent = ({}: {pageLayoutId: string;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const sidePanelPageInfo = useAtomStateValue(sidePanelPageInfoSelector);const sidePanelPage = sidePanelPageInfo.page;diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelRouter.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelRouter.tsxindex e068fe85d88..b77de005eb0 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelRouter.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelRouter.tsx@@ -16,10 +16,10 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';import { motion } from 'framer-motion';-import React, { useContext, useMemo, useState } from 'react';+import React, { useMemo, useState } from 'react';import { SidePanelPages } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const StyledSidePanelContent = styled.div`flex: 1;@@ -68,7 +68,7 @@ export const SidePanelRouter = () => {}): rawPageComponent;- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [headerTitlePortal, setHeaderTitlePortal] =useState<HTMLElement | null>(null);diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelToggleButton.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelToggleButton.tsxindex cbc87942abd..e6add32c15b 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelToggleButton.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelToggleButton.tsx@@ -15,7 +15,7 @@ import { IconDotsVertical } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';import { Tooltip } from 'twenty-ui/primitives/surfaces';import { getOsControlSymbol, useIsMobile } from 'twenty-ui/utilities';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledButtonWrapper = styled.div<{ alignToTop: boolean }>`align-items: ${({ alignToTop }) => (alignToTop ? 'center' : 'initial')};diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBar.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBar.tsxindex e7754ba445f..43e8132ff5d 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBar.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBar.tsx@@ -22,11 +22,11 @@ import { useLingui } from '@lingui/react/macro';import { AnimatePresence, motion } from 'framer-motion';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useContext, useRef } from 'react';+import { useRef } from 'react';import { Key } from 'ts-key-enum';import { SidePanelPages } from 'twenty-shared/types';import { useIsMobile } from 'twenty-ui/utilities';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledInputContainer = styled.div<{ isMobile: boolean }>`align-items: center;@@ -138,7 +138,7 @@ export const SidePanelTopBar = ({const sidePanelPage =sidePanelNavigationStack.at(-1)?.page ?? SidePanelPages.CommandMenuDisplay;- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { contextChips } = useSidePanelContextChips();diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBarRightCornerIcon.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBarRightCornerIcon.tsxindex dd5d01f4102..24cd5e617d8 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBarRightCornerIcon.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelTopBarRightCornerIcon.tsx@@ -10,7 +10,7 @@ import { SidePanelPages } from 'twenty-shared/types';import { IconEdit } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';import { useIsMobile } from 'twenty-ui/utilities';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledIconButtonContainer = styled.div`color: ${themeCssVariables.font.color.secondary};diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelWorkflowStepInfo.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelWorkflowStepInfo.tsxindex d242c5deebd..58d36f7ed06 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelWorkflowStepInfo.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelWorkflowStepInfo.tsx@@ -23,20 +23,20 @@ import { getActionIconColorOrThrow } from '@/workflow/workflow-steps/workflow-acimport { getTriggerIcon } from '@/workflow/workflow-trigger/utils/getTriggerIcon';import { getTriggerIconColor } from '@/workflow/workflow-trigger/utils/getTriggerIconColor';import { t } from '@lingui/core/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { SidePanelPages } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';import { useIcons } from 'twenty-ui/icon';import { HeaderIdentifier } from '@/ui/layout/page/components/HeaderIdentifier';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const SidePanelWorkflowStepInfo = ({sidePanelPageInstanceId,}: {sidePanelPageInstanceId: string;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const sidePanelPage = useAtomStateValue(sidePanelPageInfoSelector).page;diff --git a/packages/twenty-front/src/modules/side-panel/components/hooks/usePageLayoutHeaderInfo.ts b/packages/twenty-front/src/modules/side-panel/components/hooks/usePageLayoutHeaderInfo.tsindex f156228468f..d868d355477 100644--- a/packages/twenty-front/src/modules/side-panel/components/hooks/usePageLayoutHeaderInfo.ts+++ b/packages/twenty-front/src/modules/side-panel/components/hooks/usePageLayoutHeaderInfo.ts@@ -6,7 +6,6 @@ import { getCurrentGraphTypeFromConfig } from '@/side-panel/pages/page-layout/utimport { isWidgetConfigurationOfTypeGraph } from '@/side-panel/pages/page-layout/utils/isWidgetConfigurationOfTypeGraph';import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';-import { useContext } from 'react';import { SidePanelPages } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import {@@ -19,7 +18,7 @@ import {type IconComponent,useIcons,} from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type PageLayoutHeaderInfo = {headerIcon: IconComponent | undefined;@@ -80,7 +79,7 @@ export const usePageLayoutHeaderInfo = ({openTabId,editedTitle,}: UsePageLayoutHeaderInfoParams): PageLayoutHeaderInfo | null => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const iconColor = theme.font.color.tertiary;diff --git a/packages/twenty-front/src/modules/side-panel/constants/SidePanelAnimationVariants.ts b/packages/twenty-front/src/modules/side-panel/constants/SidePanelAnimationVariants.tsindex 16d0b1f5575..35aa9050bf9 100644--- a/packages/twenty-front/src/modules/side-panel/constants/SidePanelAnimationVariants.ts+++ b/packages/twenty-front/src/modules/side-panel/constants/SidePanelAnimationVariants.ts@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const SIDE_PANEL_ANIMATION_VARIANTS = {fullScreen: {diff --git a/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelContextChips.tsx b/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelContextChips.tsxindex 4969e4b65ab..20f6cc968dd 100644--- a/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelContextChips.tsx+++ b/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelContextChips.tsx@@ -9,14 +9,14 @@ import { recordStoreIdentifiersFamilySelector } from '@/object-record/record-stoimport { recordStoreRecordsSelector } from '@/object-record/record-store/states/selectors/recordStoreRecordsSelector';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useContext, useMemo } from 'react';+import { useMemo } from 'react';import { createPath } from 'react-router-dom';import { SidePanelPages } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export const useSidePanelContextChips = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const iconSizeSm = theme.icon.size.sm;const sidePanelNavigationStack = useAtomStateValue(sidePanelNavigationStackState,diff --git a/packages/twenty-front/src/modules/side-panel/pages/common/components/SidePanelSubPageNavigationHeader.tsx b/packages/twenty-front/src/modules/side-panel/pages/common/components/SidePanelSubPageNavigationHeader.tsxindex fcbb04c4b68..fecf9f2bdd1 100644--- a/packages/twenty-front/src/modules/side-panel/pages/common/components/SidePanelSubPageNavigationHeader.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/common/components/SidePanelSubPageNavigationHeader.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { IconChevronLeft } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailAlignmentInput.tsx b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailAlignmentInput.tsxindex 25a9775d1c1..8358baa4bbb 100644--- a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailAlignmentInput.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailAlignmentInput.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { IconAlignCenter, IconAlignLeft, IconAlignRight } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { StyledEmailFieldLabel } from '@/side-panel/pages/email-block-settings/components/StyledEmailFieldLabel';diff --git a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailBoxSidesInput.tsx b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailBoxSidesInput.tsxindex 28d60db3c3c..3b80b23bfb9 100644--- a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailBoxSidesInput.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailBoxSidesInput.tsx@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';import { useState } from 'react';import { LightIconButton } from 'twenty-ui/components';import { IconFrame, IconSquare } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { StyledEmailFieldLabel } from '@/side-panel/pages/email-block-settings/components/StyledEmailFieldLabel';import { TextInput } from '@/ui/input/components/TextInput';diff --git a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailColorInput.tsx b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailColorInput.tsxindex 3ea86f4c734..651c5d0860d 100644--- a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailColorInput.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailColorInput.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { StyledEmailFieldLabel } from '@/side-panel/pages/email-block-settings/components/StyledEmailFieldLabel';import { TextInput } from '@/ui/input/components/TextInput';diff --git a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailPageStyleSection.tsx b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailPageStyleSection.tsxindex 05678a0567e..fc51cdf6887 100644--- a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailPageStyleSection.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailPageStyleSection.tsx@@ -6,7 +6,7 @@ import {isDefined,resolveCanvasTheme,} from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useLiveEditorState } from '@/advanced-text-editor/hooks/useLiveEditorState';import { EmailBlockSettingsFieldInput } from '@/side-panel/pages/email-block-settings/components/EmailBlockSettingsFieldInput';diff --git a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailSizeInput.tsx b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailSizeInput.tsxindex 93893373881..c19e54f138b 100644--- a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailSizeInput.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/EmailSizeInput.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { parseCssSizeValue } from '@/advanced-text-editor/utils/parseCssSizeValue';import { StyledEmailFieldLabel } from '@/side-panel/pages/email-block-settings/components/StyledEmailFieldLabel';diff --git a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/SidePanelEmailBlockSettingsPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/SidePanelEmailBlockSettingsPage.tsxindex 437c89c2d39..8bbbe4e8a38 100644--- a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/SidePanelEmailBlockSettingsPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/SidePanelEmailBlockSettingsPage.tsx@@ -8,7 +8,7 @@ import {} from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconTrash } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { activeEmailEditorState } from '@/activities/emails/states/activeEmailEditorState';import { ADVANCED_TEXT_EDITOR_BLOCK_CATALOG } from '@/advanced-text-editor/constants/AdvancedTextEditorBlockCatalog';diff --git a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/StyledEmailFieldLabel.tsx b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/StyledEmailFieldLabel.tsxindex fc0f1490381..1532b03dad9 100644--- a/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/StyledEmailFieldLabel.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/email-block-settings/components/StyledEmailFieldLabel.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledEmailFieldLabel = styled.div`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/ChartFiltersSettings.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/ChartFiltersSettings.tsxindex 608e31fe0e6..c5ecf32c18c 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/ChartFiltersSettings.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/ChartFiltersSettings.tsx@@ -19,7 +19,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useStore } from 'jotai';import { useMemo } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledChartFiltersPageContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/ChartTypeSelectionSection.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/ChartTypeSelectionSection.tsxindex b931a513b8a..1d4ef32e458 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/ChartTypeSelectionSection.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/ChartTypeSelectionSection.tsx@@ -4,7 +4,7 @@ import { styled } from '@linaria/react';import { GraphType } from '@/side-panel/pages/page-layout/types/GraphType';import { t } from '@lingui/core/macro';import { MenuPicker } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const graphTypeOptions = [GraphType.VERTICAL_BAR,diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelFieldRelationTableFieldsSubPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelFieldRelationTableFieldsSubPage.tsxindex 4dd6c05987c..00b7bbd2b6c 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelFieldRelationTableFieldsSubPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelFieldRelationTableFieldsSubPage.tsx@@ -4,7 +4,7 @@ import { usePageLayoutIdFromContextStore } from '@/side-panel/pages/page-layout/import { useWidgetInEditMode } from '@/side-panel/pages/page-layout/hooks/useWidgetInEditMode';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelFieldsLayoutSubPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelFieldsLayoutSubPage.tsxindex 6310410ddd9..1211725c53c 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelFieldsLayoutSubPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelFieldsLayoutSubPage.tsx@@ -5,7 +5,7 @@ import { usePageLayoutIdFromContextStore } from '@/side-panel/pages/page-layout/import { useWidgetInEditMode } from '@/side-panel/pages/page-layout/hooks/useWidgetInEditMode';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {type FieldsConfiguration,WidgetConfigurationType,diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorGradientOption.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorGradientOption.tsxindex 998c687963a..71e6e72eec7 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorGradientOption.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorGradientOption.tsx@@ -3,11 +3,10 @@ import { createGraphColorRegistry } from '@/page-layout/widgets/graph/utils/creaimport { generateGroupColor } from '@/page-layout/widgets/graph/utils/generateGroupColor';import { SelectableListItem } from '@/ui/layout/selectable-list/components/SelectableListItem';import { styled } from '@linaria/react';-import { useContext } from 'react';import { ColorSample } from 'twenty-ui/primitives/data-display';import { ListItem } from 'twenty-ui/primitives/navigation';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';-import { type ThemeColor } from 'twenty-ui/theme';+import { useTheme, themeCssVariables, type ThemeColor } from 'twenty-ui/theme';+type ChartColorGradientOptionProps = {colorOption: {id: string;@@ -33,7 +32,7 @@ export const ChartColorGradientOption = ({}: ChartColorGradientOptionProps) => {const colorName = colorOption.colorName as ThemeColor;- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const colorRegistry = createGraphColorRegistry(theme.color);const colorSamples = (diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorPaletteOption.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorPaletteOption.tsxindex 644e6885e46..d0babc3b6a2 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorPaletteOption.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorPaletteOption.tsx@@ -4,12 +4,11 @@ import { getColorSchemeByIndex } from '@/page-layout/widgets/graph/utils/getColoimport { SelectableListItem } from '@/ui/layout/selectable-list/components/SelectableListItem';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { ColorSample } from 'twenty-ui/primitives/data-display';import { ListItem } from 'twenty-ui/primitives/navigation';import { getMainColorNameFromPaletteColorName } from 'twenty-ui/utilities';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';-import { type ThemeColor } from 'twenty-ui/theme';+import { useTheme, themeCssVariables, type ThemeColor } from 'twenty-ui/theme';+type ChartColorPaletteOptionProps = {selectedItemId: string | null;currentColor: string | null | undefined;@@ -27,7 +26,7 @@ export const ChartColorPaletteOption = ({currentColor,onSelectColor,}: ChartColorPaletteOptionProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const colorRegistry = createGraphColorRegistry(theme.color);const paletteColors = Array.from(diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsFieldVisibility.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsFieldVisibility.tsxindex 80009fae3f6..063949cfe24 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsFieldVisibility.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsFieldVisibility.tsx@@ -9,7 +9,7 @@ import { t } from '@lingui/core/macro';import { useMemo } from 'react';import { LightIconButton, MenuItemDraggable } from 'twenty-ui/components';import { IconEye, IconEyeOff, useIcons } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFieldListContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsFilters.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsFilters.tsxindex 19617eb9fb7..501860ca47b 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsFilters.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsFilters.tsx@@ -10,7 +10,7 @@ import { InputLabel } from '@/ui/input/components/internal/InputLabel/InputLabelimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFilterSettingsContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsSorts.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsSorts.tsxindex 7f42949e8dd..5c149decea2 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsSorts.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsSorts.tsx@@ -12,7 +12,7 @@ import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ViewSortDirection } from '~/generated-metadata/graphql';const StyledSortSettingsContainer = styled.div`diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsSortsContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsSortsContent.tsxindex 632862713b1..a351b2d6acf 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsSortsContent.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/record-table-settings/RecordTableSettingsSortsContent.tsx@@ -7,7 +7,7 @@ import { isDefined } from 'twenty-shared/utils';import { IconArrowsSort, IconTrash } from 'twenty-ui/icon';import { Button, type SelectOption } from 'twenty-ui/primitives/input';import { Select } from '@/ui/input/components/Select';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { v4 as uuidv4 } from 'uuid';import { ViewSortDirection } from '~/generated-metadata/graphql';diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/SidePanelRecordCreationFormPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/SidePanelRecordCreationFormPage.tsxindex dbdd5e746c8..a6a32fb7b02 100644--- a/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/SidePanelRecordCreationFormPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/SidePanelRecordCreationFormPage.tsx@@ -17,7 +17,7 @@ import { recordCreationFormRequestComponentState } from '@/side-panel/pages/recoimport { SidePanelFooter } from '@/ui/layout/side-panel/components/SidePanelFooter';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import { useContext, useState } from 'react';+import { useState } from 'react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Key } from 'ts-key-enum';@@ -25,7 +25,7 @@ import { type JsonValue } from 'type-fest';import { isDefined } from 'twenty-shared/utils';import { IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { getOsControlSymbol } from 'twenty-ui/utilities';const StyledContainer = styled.div`@@ -75,7 +75,7 @@ const SidePanelRecordCreationForm = ({});const { objectMetadataItems } = useObjectMetadataItems();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { settleRecordCreationDraft } = useRecordCreationFormSettle();diff --git a/packages/twenty-front/src/modules/side-panel/pages/rich-text-page/components/SidePanelEditRichTextPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/rich-text-page/components/SidePanelEditRichTextPage.tsxindex d7ca020be0e..142b7ab7bd4 100644--- a/packages/twenty-front/src/modules/side-panel/pages/rich-text-page/components/SidePanelEditRichTextPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/rich-text-page/components/SidePanelEditRichTextPage.tsx@@ -2,10 +2,10 @@ import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoimport { viewableRichTextComponentState } from '@/side-panel/pages/rich-text-page/states/viewableRichTextComponentState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';-import { lazy, Suspense, useContext } from 'react';+import { lazy, Suspense } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { CoreObjectNameSingular } from 'twenty-shared/types';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const ActivityRichTextEditor = lazy(() =>import('@/activities/components/ActivityRichTextEditor').then((module) => ({@@ -29,7 +29,7 @@ const StyledContainer = styled.div``;const LoadingSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/side-panel/pages/search/components/SidePanelSearchRecordPreviewCard.tsx b/packages/twenty-front/src/modules/side-panel/pages/search/components/SidePanelSearchRecordPreviewCard.tsxindex 1ea0a0e1774..3864dfc045e 100644--- a/packages/twenty-front/src/modules/side-panel/pages/search/components/SidePanelSearchRecordPreviewCard.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/search/components/SidePanelSearchRecordPreviewCard.tsx@@ -17,10 +17,10 @@ import { useSidePanelSearchRecordPreviewRecord } from '@/side-panel/pages/searchimport { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';const SKELETON_HEIGHT = SKELETON_LOADER_HEIGHT_SIZES.standard.s;@@ -117,7 +117,7 @@ export const SidePanelSearchRecordPreviewCard = ({}: SidePanelSearchRecordPreviewCardProps) => {const { objectMetadataItem } = useObjectMetadataItem({ objectNameSingular });const { getIcon } = useIcons();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [areAllFieldsVisible, setAreAllFieldsVisible] = useState(false);diff --git a/packages/twenty-front/src/modules/side-panel/pages/search/components/SidePanelSearchRecordsPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/search/components/SidePanelSearchRecordsPage.tsxindex 11d248608a0..1975c0a537f 100644--- a/packages/twenty-front/src/modules/side-panel/pages/search/components/SidePanelSearchRecordsPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/search/components/SidePanelSearchRecordsPage.tsx@@ -18,7 +18,7 @@ import { AppPath, CoreObjectNameSingular } from 'twenty-shared/types';import { getAppPath, isDefined } from 'twenty-shared/utils';import { Avatar } from 'twenty-ui/primitives/data-display';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';// The card brings its own surface, so the tooltip only contributes the shadow.diff --git a/packages/twenty-front/src/modules/side-panel/pages/send-campaign-test/components/SidePanelSendCampaignTestPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/send-campaign-test/components/SidePanelSendCampaignTestPage.tsxindex 0b4d1c2c8de..60f94d90412 100644--- a/packages/twenty-front/src/modules/side-panel/pages/send-campaign-test/components/SidePanelSendCampaignTestPage.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/send-campaign-test/components/SidePanelSendCampaignTestPage.tsx@@ -16,7 +16,7 @@ import { sendCampaignTestCampaignIdComponentState } from '@/side-panel/pages/senimport { useSidePanelHistory } from '@/side-panel/hooks/useSidePanelHistory';import { SidePanelFooter } from '@/ui/layout/side-panel/components/SidePanelFooter';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/side-panel/pages/send-campaign/components/SendCampaignForm.tsx b/packages/twenty-front/src/modules/side-panel/pages/send-campaign/components/SendCampaignForm.tsxindex ea93bf8e2d6..40d717a09b1 100644--- a/packages/twenty-front/src/modules/side-panel/pages/send-campaign/components/SendCampaignForm.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/send-campaign/components/SendCampaignForm.tsx@@ -10,7 +10,7 @@ import { isDefined } from 'twenty-shared/utils';import { IconClock, IconSend } from 'twenty-ui/icon';import { Button, type SelectOption } from 'twenty-ui/primitives/input';import { Text } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCampaignAudiencePreview } from '@/activities/emails/hooks/useCampaignAudiencePreview';import { useSendMessageCampaign } from '@/activities/emails/hooks/useSendMessageCampaign';diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsxindex 30ef3fad7a9..284a8911693 100644--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx@@ -35,7 +35,7 @@ import {IconStepInto,IconTerminal,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/trigger-type/components/SidePanelWorkflowSelectTriggerTypeContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/workflow/trigger-type/components/SidePanelWorkflowSelectTriggerTypeContent.tsxindex fe8f03cf9e3..553b91501db 100644--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/trigger-type/components/SidePanelWorkflowSelectTriggerTypeContent.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/trigger-type/components/SidePanelWorkflowSelectTriggerTypeContent.tsx@@ -15,15 +15,14 @@ import { OTHER_TRIGGER_TYPES } from '@/workflow/workflow-trigger/constants/Otherimport { useUpdateWorkflowVersionTrigger } from '@/workflow/workflow-trigger/hooks/useUpdateWorkflowVersionTrigger';import { getTriggerDefaultDefinition } from '@/workflow/workflow-trigger/utils/getTriggerDefaultDefinition';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';import { MenuItem } from 'twenty-ui/components';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const SidePanelWorkflowSelectTriggerTypeContent = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const workflowId = useSidePanelWorkflowIdOrThrow();const { updateTrigger } = useUpdateWorkflowVersionTrigger();diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockTable.tsx b/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockTable.tsxindex d3ffa288d20..324e97c7276 100644--- a/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockTable.tsx+++ b/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockTable.tsx@@ -1,5 +1,4 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { BackgroundMockTableRow } from '@/sign-in-background-mock/components/BackgroundMockTableRow';import { BACKGROUND_MOCK_COLUMNS } from '@/sign-in-background-mock/constants/BackgroundMockColumns';@@ -8,7 +7,7 @@ import { BACKGROUND_MOCK_TABLE_DIMENSIONS } from '@/sign-in-background-mock/consimport { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronDown, IconPlus, useIcons } from 'twenty-ui/icon';import { Checkbox } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledTableWrapper = styled.div`display: flex;@@ -148,7 +147,7 @@ const StyledLastEmptyCell = styled.div``;export const BackgroundMockTable = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();return (diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockTableRow.tsx b/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockTableRow.tsxindex 792718701d9..ab290b2f17a 100644--- a/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockTableRow.tsx+++ b/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockTableRow.tsx@@ -1,5 +1,4 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { type BackgroundMockCompany } from '@/sign-in-background-mock/constants/BackgroundMockCompanies';import { BACKGROUND_MOCK_COLUMN_WIDTHS } from '@/sign-in-background-mock/constants/BackgroundMockColumnWidths';@@ -8,7 +7,7 @@ import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';import { Avatar, Chip } from 'twenty-ui/primitives/data-display';import { Checkbox } from 'twenty-ui/primitives/input';import { IconLink } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { getLogoUrlFromDomainName } from 'twenty-shared/utils';@@ -97,7 +96,7 @@ const PersonChip = ({ fullName }: { fullName: string | null }) => {export const BackgroundMockTableRow = ({company,}: BackgroundMockTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const logoUrl = getLogoUrlFromDomainName(company.domainName);diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockViewBar.tsx b/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockViewBar.tsxindex 5923cb4b9b2..b89a051d48d 100644--- a/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockViewBar.tsx+++ b/packages/twenty-front/src/modules/sign-in-background-mock/components/BackgroundMockViewBar.tsx@@ -1,10 +1,9 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { TopBar } from '@/ui/layout/top-bar/components/TopBar';import { TintedIconTile } from 'twenty-ui/components';import { IconBuildingSkyscraper, IconChevronDown } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledViewPicker = styled.div`align-items: center;@@ -31,7 +30,7 @@ const StyledRightAction = styled.div``;export const BackgroundMockViewBar = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<TopBardiff --git a/packages/twenty-front/src/modules/skill-suggestion/components/SkillReferenceChip.tsx b/packages/twenty-front/src/modules/skill-suggestion/components/SkillReferenceChip.tsxindex ea5f38e0c10..136c824d2ec 100644--- a/packages/twenty-front/src/modules/skill-suggestion/components/SkillReferenceChip.tsx+++ b/packages/twenty-front/src/modules/skill-suggestion/components/SkillReferenceChip.tsx@@ -2,7 +2,7 @@ import { LinkChip } from '@/ui/navigation/link/components/LinkChip/LinkChip';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/icon';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { DEFAULT_SKILL_ICON } from '@/skill-suggestion/constants/DefaultSkillIcon';diff --git a/packages/twenty-front/src/modules/skill-suggestion/components/SkillSuggestionPreviewCard.tsx b/packages/twenty-front/src/modules/skill-suggestion/components/SkillSuggestionPreviewCard.tsxindex 4b33e97988f..75744ffba37 100644--- a/packages/twenty-front/src/modules/skill-suggestion/components/SkillSuggestionPreviewCard.tsx+++ b/packages/twenty-front/src/modules/skill-suggestion/components/SkillSuggestionPreviewCard.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { useIcons } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';import { DEFAULT_SKILL_ICON } from '@/skill-suggestion/constants/DefaultSkillIcon';import { SKILL_SUGGESTION_PREVIEW_WIDTH } from '@/skill-suggestion/constants/SkillSuggestionPreviewWidth';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/Heading.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/Heading.tsxindex 1c027183a2c..fe4b9565518 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/Heading.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/Heading.tsx@@ -1,6 +1,6 @@import React from 'react';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type HeadingProps = {title: string;diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/MatchColumnToFieldSelect.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/MatchColumnToFieldSelect.tsxindex 7a64c974407..f2ed5c973a5 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/MatchColumnToFieldSelect.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/MatchColumnToFieldSelect.tsx@@ -15,7 +15,7 @@ import { isDefined } from 'twenty-shared/utils';import { MenuItem } from 'twenty-ui/components';import { IconChevronDown } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';interface MatchColumnToFieldSelectProps {columnIndex: string;diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsxindex 7f0c1330214..24ad3525a41 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadSheetImportModalWrapper.tsx@@ -5,7 +5,7 @@ import { styled } from '@linaria/react';import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme';import { SpreadSheetImportModalCloseButton } from './SpreadSheetImportModalCloseButton';const StyledInnerContainer = styled.div`diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsxindex 98c22b4023d..3b2e878088d 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx@@ -1,10 +1,10 @@import { styled } from '@linaria/react';-import { type Key, useContext } from 'react';+import { type Key } from 'react';import { type SpreadsheetImportTableProps } from '@/spreadsheet-import/types/SpreadsheetImportTableProps';import { DataGrid } from 'react-data-grid';import 'react-data-grid/lib/styles.css';import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreadsheetImportInternal';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useThemeColorScheme, themeCssVariables } from 'twenty-ui/theme';const StyledDataGridContainer = styled.div<{ headerRowHeight?: number }>`--rdg-background-color: ${themeCssVariables.background.primary};@@ -119,7 +119,7 @@ export const SpreadsheetImportTable = <TData, TRowKey extends Key = Key>({selectedRows,onSelectedRowsChange,}: SpreadsheetImportTableProps<TData, TRowKey>) => {- const { colorScheme } = useContext(ThemeContext);+ const colorScheme = useThemeColorScheme();const { rtl } = useSpreadsheetImportInternal();const themeClassName = colorScheme === 'dark' ? 'rdg-dark' : 'rdg-light';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsxindex 017ea75cc36..a17715e46b3 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx@@ -1,7 +1,7 @@import { Dialog } from 'twenty-ui/primitives/surfaces';import { styled } from '@linaria/react';import { MainButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { t } from '@lingui/core/macro';import { CircularProgressBar } from 'twenty-ui/primitives/feedback';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/provider/components/SpreadsheetImportProvider.tsx b/packages/twenty-front/src/modules/spreadsheet-import/provider/components/SpreadsheetImportProvider.tsxindex 0b243089804..1e69a474b83 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/provider/components/SpreadsheetImportProvider.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/provider/components/SpreadsheetImportProvider.tsx@@ -1,6 +1,6 @@-import React, { useContext } from 'react';+import React from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { SPREADSHEET_IMPORT_MODAL_ID } from '@/spreadsheet-import/constants/SpreadsheetImportModalId';@@ -17,7 +17,7 @@ const SpreadsheetImport = React.lazy(() =>);const LoadingSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ImportDataStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ImportDataStep.tsxindex e63edea8aa3..1ccb5d00bee 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ImportDataStep.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ImportDataStep.tsx@@ -5,7 +5,7 @@ import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreimport { spreadsheetImportCreatedRecordsProgressState } from '@/spreadsheet-import/states/spreadsheetImportCreatedRecordsProgressState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { t } from '@lingui/core/macro';import { Loader } from 'twenty-ui/primitives/feedback';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsxindex d47acecee39..36da25e1f9e 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep.tsx@@ -30,7 +30,7 @@ import { type SpreadsheetImportField } from '@/spreadsheet-import/types/Spreadshimport { useAtomFamilySelectorState } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorState';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { Trans, useLingui } from '@lingui/react/macro';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledColumnsContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/ColumnGrid.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/ColumnGrid.tsxindex 22a6a4cc637..83a4b9ade53 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/ColumnGrid.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/ColumnGrid.tsx@@ -1,7 +1,7 @@import { type SpreadsheetColumns } from '@/spreadsheet-import/types/SpreadsheetColumns';import { t } from '@lingui/core/macro';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import React from 'react';const StyledGridContainer = styled.div`diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectControlContainer.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectControlContainer.tsxindex 4d6e7469885..80cb03ba7e9 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectControlContainer.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectControlContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledControlContainer = styled.div<{ cursor: string }>`align-items: center;diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectDropdownButton.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectDropdownButton.tsxindex cebe90985ee..f312c7d19ac 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectDropdownButton.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectDropdownButton.tsx@@ -8,8 +8,7 @@ import {import { type SpreadsheetMatchedOptions } from '@/spreadsheet-import/types/SpreadsheetMatchedOptions';import { getFieldOptions } from '@/spreadsheet-import/utils/getFieldOptions';import { styled } from '@linaria/react';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { Tag, type TagColor } from 'twenty-ui/primitives/data-display';import { IconChevronDown } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';@@ -31,7 +30,7 @@ export const SubMatchingSelectDropdownButton = ({column,placeholder,}: SubMatchingSelectDropdownButtonProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { spreadsheetImportFields: fields } = useSpreadsheetImportInternal();const options = getFieldOptions(fields, column.value) as SelectOption[];const value = options.find((opt) => opt.value === option.value);diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectRow.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectRow.tsxindex 375a4a26948..b8da942bc13 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectRow.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectRow.tsx@@ -6,7 +6,7 @@ import {} from '@/spreadsheet-import/types/SpreadsheetColumn';import { type SpreadsheetMatchedOptions } from '@/spreadsheet-import/types/SpreadsheetMatchedOptions';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledRowContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectRowLeftSelect.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectRowLeftSelect.tsxindex aabb92cd6f1..99d4dcc91a6 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectRowLeftSelect.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectRowLeftSelect.tsx@@ -2,7 +2,7 @@ import { SubMatchingSelectControlContainer } from '@/spreadsheet-import/steps/coimport { type SpreadsheetMatchedOptions } from '@/spreadsheet-import/types/SpreadsheetMatchedOptions';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLabel = styled.span`color: ${themeCssVariables.font.color.primary};diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsxindex f53a83c4535..82a5dd73e4b 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { MatchColumnToFieldSelect } from '@/spreadsheet-import/components/MatchColumnToFieldSelect';import { DO_NOT_IMPORT_OPTION_KEY } from '@/spreadsheet-import/constants/DoNotImportOptionKey';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumn.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumn.tsxindex 9670807eb29..af7d93e29e5 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumn.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumn.tsx@@ -6,7 +6,7 @@ import { type SpreadsheetColumn } from '@/spreadsheet-import/types/SpreadsheetCoimport { type SpreadsheetColumns } from '@/spreadsheet-import/types/SpreadsheetColumns';import { SpreadsheetColumnType } from '@/spreadsheet-import/types/SpreadsheetColumnType';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { t } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumnBanner.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumnBanner.tsxindex 39423356139..dc31b178df4 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumnBanner.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UnmatchColumnBanner.tsx@@ -2,8 +2,7 @@ import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';import { Banner } from 'twenty-ui/primitives/feedback';import { IconChevronDown, IconInfoCircle } from 'twenty-ui/icon';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledBannerContainer = styled.div<{ allMatched: boolean }>`> div {@@ -65,7 +64,7 @@ export const UnmatchColumnBanner = ({buttonOnClick?: () => void;allMatched: boolean;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledBannerContainer allMatched={allMatched}>diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UserTableColumn.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UserTableColumn.tsxindex ab8fa59f5eb..486d97ef09a 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UserTableColumn.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/UserTableColumn.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type ImportedRow } from '@/spreadsheet-import/types';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsxindex c5aedd56583..c1f3444a564 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectHeaderStep/SelectHeaderStep.tsx@@ -1,6 +1,6 @@import { Dialog } from 'twenty-ui/primitives/surfaces';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCallback, useState } from 'react';import { Heading } from '@/spreadsheet-import/components/Heading';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsxindex 75b8a5cb79b..55094e80f1d 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SelectSheetStep/SelectSheetStep.tsx@@ -12,7 +12,7 @@ import { mapWorkbook } from '@/spreadsheet-import/utils/mapWorkbook';import { useLingui } from '@lingui/react/macro';import { Radio, RadioGroup } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type WorkBook } from 'xlsx-ugnis';const StyledRadioContainer = styled.div`diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsxindex be51d3c2106..0e9925168da 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx@@ -2,11 +2,11 @@ import { useSpreadsheetImportInternal } from '@/spreadsheet-import/hooks/useSpreimport { ImportDataStep } from '@/spreadsheet-import/steps/components/ImportDataStep';import { type SpreadsheetImportStep } from '@/spreadsheet-import/steps/types/SpreadsheetImportStep';import { SpreadsheetImportStepType } from '@/spreadsheet-import/steps/types/SpreadsheetImportStepType';-import { useCallback, useContext, useState } from 'react';+import { useCallback, useState } from 'react';import { useToast } from 'twenty-ui/components';import { CircularProgressBar } from 'twenty-ui/primitives/feedback';import { Dialog } from 'twenty-ui/primitives/surfaces';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { MatchColumnsStep } from './MatchColumnsStep/MatchColumnsStep';import { SelectHeaderStep } from './SelectHeaderStep/SelectHeaderStep';import { SelectSheetStep } from './SelectSheetStep/SelectSheetStep';@@ -22,7 +22,7 @@ export const SpreadsheetImportStepper = ({nextStep,prevStep,}: SpreadsheetImportStepperProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { initialStepState } = useSpreadsheetImportInternal();const [currentStepState, setCurrentStepState] =diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepperContainer.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepperContainer.tsxindex 6f2a1314b98..0422885f6e8 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepperContainer.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepperContainer.tsx@@ -9,7 +9,7 @@ import { useStepBar } from '@/ui/navigation/step-bar/hooks/useStepBar';import { spreadsheetImportDialogState } from '@/spreadsheet-import/states/spreadsheetImportDialogState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useLingui } from '@lingui/react/macro';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { SpreadsheetImportStepper } from './SpreadsheetImportStepper';const StyledImportHeader = styled(Dialog.Header)`diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/components/DropZone.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/components/DropZone.tsxindex 031a646a26c..76c22d5c941 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/components/DropZone.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/UploadStep/components/DropZone.tsx@@ -8,7 +8,7 @@ import { Trans, useLingui } from '@lingui/react/macro';import { useState } from 'react';import { useDropzone } from 'react-dropzone';import { MainButton, useToast } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { read, type WorkBook } from 'xlsx-ugnis';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsxindex 7323552fc02..dd24a9a5d4a 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx@@ -22,7 +22,7 @@ import {useMemo,useState,} from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type RowsChangeData } from 'react-data-grid';import { isDefined } from 'twenty-shared/utils';import { IconTrash } from 'twenty-ui/icon';diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsxindex a03df22def7..9e251121954 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/components/columns.tsx@@ -1,6 +1,6 @@import { t } from '@lingui/core/macro';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type Column, useRowSelection } from 'react-data-grid';import {diff --git a/packages/twenty-front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsx b/packages/twenty-front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsxindex 56ef9599815..91a13c0b357 100644--- a/packages/twenty-front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/dialog-manager/components/Dialog.tsx@@ -12,7 +12,7 @@ import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useLisimport { useRef } from 'react';import { isDefined } from 'twenty-shared/utils';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDialogOverlayBase = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/feedback/empty-state/components/AnimatedPlaceholder/AnimatedPlaceholder.tsx b/packages/twenty-front/src/modules/ui/feedback/empty-state/components/AnimatedPlaceholder/AnimatedPlaceholder.tsxindex d4569c07660..eb6b6d972fe 100644--- a/packages/twenty-front/src/modules/ui/feedback/empty-state/components/AnimatedPlaceholder/AnimatedPlaceholder.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/empty-state/components/AnimatedPlaceholder/AnimatedPlaceholder.tsx@@ -7,7 +7,7 @@ import { BACKGROUND } from '@/ui/feedback/empty-state/components/AnimatedPlacehoimport { DARK_BACKGROUND } from '@/ui/feedback/empty-state/components/AnimatedPlaceholder/constants/DarkBackground';import { DARK_MOVING_IMAGE } from '@/ui/feedback/empty-state/components/AnimatedPlaceholder/constants/DarkMovingImage';import { MOVING_IMAGE } from '@/ui/feedback/empty-state/components/AnimatedPlaceholder/constants/MovingImage';-import { useThemeColorScheme } from 'twenty-ui/theme-constants';+import { useThemeColorScheme } from 'twenty-ui/theme';const styles = {container: css`diff --git a/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/ProgressRing.tsx b/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/ProgressRing.tsxindex 0435dc076a9..d9fe7e1ca2d 100644--- a/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/ProgressRing.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/ProgressRing.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type ProgressRingProps = {value: number;diff --git a/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/ProgressRingWithLabel.tsx b/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/ProgressRingWithLabel.tsxindex 24ae754d647..1317ff6981d 100644--- a/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/ProgressRingWithLabel.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/ProgressRingWithLabel.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ProgressRing } from '@/ui/feedback/progress-ring/components/ProgressRing';diff --git a/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/UsageProgressRow.tsx b/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/UsageProgressRow.tsxindex 2a6f245a997..fa7ee3ac656 100644--- a/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/UsageProgressRow.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/progress-ring/components/UsageProgressRow.tsx@@ -2,7 +2,7 @@ import { isDefined } from 'twenty-shared/utils';import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { type IconComponent } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ProgressRingWithLabel } from '@/ui/feedback/progress-ring/components/ProgressRingWithLabel';diff --git a/packages/twenty-front/src/modules/ui/feedback/toast/components/__tests__/AppToaster.test.tsx b/packages/twenty-front/src/modules/ui/feedback/toast/components/__tests__/AppToaster.test.tsxindex 0e2fe5316d3..342fd211c48 100644--- a/packages/twenty-front/src/modules/ui/feedback/toast/components/__tests__/AppToaster.test.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/toast/components/__tests__/AppToaster.test.tsx@@ -8,7 +8,7 @@ import { type ReactNode } from 'react';import { MemoryRouter } from 'react-router-dom';import { ToastProvider, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { getToastOptionsFromError } from '@/error-handler/utils/getToastOptionsFromError';import { AppToaster } from '@/ui/feedback/toast/components/AppToaster';diff --git a/packages/twenty-front/src/modules/ui/field/display/components/CurrencyDisplay.tsx b/packages/twenty-front/src/modules/ui/field/display/components/CurrencyDisplay.tsxindex b69db5f5af0..afc009a6a09 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/CurrencyDisplay.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/CurrencyDisplay.tsx@@ -1,8 +1,7 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { formatToShortNumber, isDefined } from 'twenty-shared/utils';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { useNumberFormat } from '@/localization/hooks/useNumberFormat';import { type FieldDefinition } from '@/object-record/record-field/ui/types/FieldDefinition';@@ -30,7 +29,7 @@ export const CurrencyDisplay = ({currencyValue,fieldDefinition,}: CurrencyDisplayProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const currencyCode = currencyValue?.currencyCode;const currencyMetadata = isDefined(currencyCode)diff --git a/packages/twenty-front/src/modules/ui/field/display/components/DateTimeDisplay.tsx b/packages/twenty-front/src/modules/ui/field/display/components/DateTimeDisplay.tsxindex ca00bdc1198..3ff8b9aad01 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/DateTimeDisplay.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/DateTimeDisplay.tsx@@ -7,7 +7,7 @@ import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { useContext } from 'react';import { Temporal } from 'temporal-polyfill';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { dateLocaleState } from '~/localization/states/dateLocaleState';import { formatDateTimeString } from '~/utils/string/formatDateTimeString';diff --git a/packages/twenty-front/src/modules/ui/field/display/components/GlobalFilePreviewModal.tsx b/packages/twenty-front/src/modules/ui/field/display/components/GlobalFilePreviewModal.tsxindex 409177f0b1d..aca3e8ba293 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/GlobalFilePreviewModal.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/GlobalFilePreviewModal.tsx@@ -11,7 +11,7 @@ import { type JSX, lazy, Suspense, useEffect } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconDownload, IconX } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const DocumentViewer = lazy(() =>import('@/activities/files/components/DocumentViewer').then((module) => ({diff --git a/packages/twenty-front/src/modules/ui/field/display/components/UploadFileChip.tsx b/packages/twenty-front/src/modules/ui/field/display/components/UploadFileChip.tsxindex 8fcec9e37d5..7ef949c19a0 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/UploadFileChip.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/UploadFileChip.tsx@@ -1,8 +1,7 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconArrowUp } from 'twenty-ui/icon';import { Loader } from 'twenty-ui/primitives/feedback';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;@@ -45,7 +44,7 @@ type UploadFileChipProps = {};export const UploadFileChip = ({ isLoading = true }: UploadFileChipProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledContainer>diff --git a/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon.tsx b/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon.tsxindex 94c8425b267..9f93c4065b0 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon.tsx@@ -3,7 +3,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { handleClickableElementKeyDown } from 'twenty-ui/primitives/accessibility';import { Avatar } from 'twenty-ui/primitives/data-display';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { isDefined } from 'twenty-ui/utilities';import { type AvatarOrIconProps } from './types/AvatarOrIconProps';diff --git a/packages/twenty-front/src/modules/ui/field/input/components/AddressInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/AddressInput.tsxindex 354dcbc28d3..717743e5e85 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/AddressInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/AddressInput.tsx@@ -15,7 +15,7 @@ import { activeDropdownFocusIdState } from '@/ui/layout/dropdown/states/activeDrimport { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme';import { t } from '@lingui/core/macro';import { type AllowedAddressSubField } from 'twenty-shared/types';diff --git a/packages/twenty-front/src/modules/ui/field/input/components/BooleanInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/BooleanInput.tsxindex 700fadd543e..7cd9aa3dc90 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/BooleanInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/BooleanInput.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useEffect, useState } from 'react';import { BooleanDisplay } from '@/ui/field/display/components/BooleanDisplay';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledEditableBooleanFieldContainer = styled.div<{ readonly?: boolean }>`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/field/input/components/CurrencyInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/CurrencyInput.tsxindex 346f929606f..bd144155247 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/CurrencyInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/CurrencyInput.tsx@@ -1,6 +1,6 @@import { isDefined } from 'twenty-shared/utils';import { styled } from '@linaria/react';-import { useContext, useEffect, useRef, useState } from 'react';+import { useEffect, useRef, useState } from 'react';import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';import { useNumberFormat } from '@/localization/hooks/useNumberFormat';@@ -10,7 +10,7 @@ import { CURRENCY_MICROS_DECIMAL_PLACES } from '@/ui/field/input/constants/Curreimport { type Currency } from '@/ui/input/components/internal/types/Currency';import { IMaskInput } from 'react-imask';import { type IconComponent } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { getSeparatorsForNumberFormat } from '~/utils/format/getSeparatorsForNumberFormat';export const StyledIMaskInput = styled.div`@@ -86,7 +86,7 @@ export const CurrencyInput = ({onChange,onSelect,}: CurrencyInputProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [internalText, setInternalText] = useState(value);const { numberFormat } = useNumberFormat();diff --git a/packages/twenty-front/src/modules/ui/field/input/components/DoubleTextInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/DoubleTextInput.tsxindex 7ee842cf317..12f631e2964 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/DoubleTextInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/DoubleTextInput.tsx@@ -17,7 +17,7 @@ import { isDefined } from 'twenty-shared/utils';import { splitFullName } from '~/utils/format/spiltFullName';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';import { StyledTextInput } from './TextInput';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ui/field/input/components/RatingInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/RatingInput.tsxindex 08523211928..3cf743810e1 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/RatingInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/RatingInput.tsx@@ -1,12 +1,12 @@import { t } from '@lingui/core/macro';import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { useClearField } from '@/object-record/record-field/ui/hooks/useClearField';import { RATING_VALUES } from 'twenty-shared/constants';import { type FieldRatingValue } from 'twenty-shared/types';import { IconTwentyStarFilled } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;@@ -32,7 +32,7 @@ export const RatingInput = ({readonly,}: RatingInputProps) => {const clearField = useClearField();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const iconSizeMd = theme.icon.size.md;const activeColor = themeCssVariables.font.color.secondary;diff --git a/packages/twenty-front/src/modules/ui/field/input/components/TextAreaInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/TextAreaInput.tsxindex 8fa6de196cf..be6a9a4475f 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/TextAreaInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/TextAreaInput.tsx@@ -6,7 +6,7 @@ import { LightCopyIconButton } from '@/object-record/record-field/ui/components/import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';import { isDefined } from 'twenty-shared/utils';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type TextAreaInputProps = {instanceId: string;diff --git a/packages/twenty-front/src/modules/ui/field/input/components/TextInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/TextInput.tsxindex e6817f043f5..b3ff0b7f70f 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/TextInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/TextInput.tsx@@ -3,7 +3,7 @@ import { useEffect, useRef, useState, type ChangeEvent } from 'react';import { LightCopyIconButton } from '@/object-record/record-field/ui/components/LightCopyIconButton';import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledTextInput = styled.input`background-color: transparent;diff --git a/packages/twenty-front/src/modules/ui/icon/components/ColoredIcon.tsx b/packages/twenty-front/src/modules/ui/icon/components/ColoredIcon.tsxindex 2e35f3154be..2e19e602878 100644--- a/packages/twenty-front/src/modules/ui/icon/components/ColoredIcon.tsx+++ b/packages/twenty-front/src/modules/ui/icon/components/ColoredIcon.tsx@@ -1,7 +1,7 @@import { css } from '@linaria/core';import { getIconTileColorShades } from 'twenty-ui/components';import { type IconComponent } from 'twenty-ui/icon';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const iconClassName = css`flex-shrink: 0;diff --git a/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx b/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsxindex c048de54c00..b3fd421d81b 100644--- a/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/AdvancedSettingsSwitch.tsx@@ -3,7 +3,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useId } from 'react';import { Switch } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.label<{ isCompact: boolean }>`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/input/components/BaseChip.tsx b/packages/twenty-front/src/modules/ui/input/components/BaseChip.tsxindex c38516a08c7..7b376191012 100644--- a/packages/twenty-front/src/modules/ui/input/components/BaseChip.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/BaseChip.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';-import { type MouseEvent, type ReactNode, useContext } from 'react';+import { type MouseEvent, type ReactNode } from 'react';import { IconX } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledChip = styled.div<{deletable: boolean;@@ -125,7 +125,7 @@ export const BaseChip = ({maxWidth,leftIcon,}: BaseChipProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isDeletable = onRemove !== undefined;return (diff --git a/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx b/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsxindex 5787c338603..31767ac9a70 100644--- a/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx@@ -15,8 +15,7 @@ import {type ButtonSize,type ButtonVariant,} from 'twenty-ui/primitives/input';-import { type ThemeColor } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { type ThemeColor, themeCssVariables } from 'twenty-ui/theme';import { ThemeColorPickerMenu } from '@/ui/input/components/ThemeColorPickerMenu';import { ICON_PICKER_DROPDOWN_CONTENT_WIDTH } from '@/ui/input/components/constants/IconPickerDropdownContentWidth';diff --git a/packages/twenty-front/src/modules/ui/input/components/ImageInput.tsx b/packages/twenty-front/src/modules/ui/input/components/ImageInput.tsxindex 943a1deaf86..b970fa96cb9 100644--- a/packages/twenty-front/src/modules/ui/input/components/ImageInput.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/ImageInput.tsx@@ -2,11 +2,11 @@ import { styled } from '@linaria/react';import { Trans, useLingui } from '@lingui/react/macro';import { isNonEmptyString } from '@sniptt/guards';-import React, { useContext, useState } from 'react';+import React, { useState } from 'react';import { getImageAbsoluteURI, isDefined } from 'twenty-shared/utils';import { IconPhotoUp, IconTrash, IconUpload, IconX } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { REACT_APP_SERVER_BASE_URL } from '~/config';const StyledContainer = styled.div`display: flex;@@ -105,7 +105,7 @@ export const ImageInput = ({className,}: ImageInputProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const hiddenFileInput = React.useRef<HTMLInputElement>(null);const onUploadButtonClick = () => {hiddenFileInput.current?.click();diff --git a/packages/twenty-front/src/modules/ui/input/components/MultiSelectControl.tsx b/packages/twenty-front/src/modules/ui/input/components/MultiSelectControl.tsxindex bc3e35f24d5..dc5b4052e2a 100644--- a/packages/twenty-front/src/modules/ui/input/components/MultiSelectControl.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/MultiSelectControl.tsx@@ -3,13 +3,12 @@ import {StyledControlContainer,} from '@/ui/input/components/SelectControl';import { styled } from '@linaria/react';-import React, { useContext } from 'react';+import React from 'react';import { isDefined } from 'twenty-shared/utils';import { TintedIconTile } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronDown, type IconComponent } from 'twenty-ui/icon';-import { type ThemeColor } from 'twenty-ui/theme';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { type ThemeColor, useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledIconChevronDownWrapper = styled.div<{disabled?: boolean;@@ -42,7 +41,7 @@ export const MultiSelectControl = ({textAccent = 'default',hasRightElement,}: MultiSelectControlProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const firstSelectedOption = selectedOptions?.[0];return (<StyledControlContainerdiff --git a/packages/twenty-front/src/modules/ui/input/components/Select.tsx b/packages/twenty-front/src/modules/ui/input/components/Select.tsxindex 15afba98db0..74136fb979e 100644--- a/packages/twenty-front/src/modules/ui/input/components/Select.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/Select.tsx@@ -25,7 +25,7 @@ import { isNonEmptyArray, isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { type IconComponent } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { normalizeSearchText } from '~/utils/normalizeSearchText';export type SelectSizeVariant = 'small' | 'default';diff --git a/packages/twenty-front/src/modules/ui/input/components/SelectControl.tsx b/packages/twenty-front/src/modules/ui/input/components/SelectControl.tsxindex 40743bbb016..dec63ded7c3 100644--- a/packages/twenty-front/src/modules/ui/input/components/SelectControl.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/SelectControl.tsx@@ -1,14 +1,14 @@import { type SelectSizeVariant } from '@/ui/input/components/Select';import { type FormFieldInputVariant } from '@/ui/input/types/FormFieldInputVariant';import { styled } from '@linaria/react';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { isDefined } from 'twenty-shared/utils';import { TintedIconTile } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronDown } from 'twenty-ui/icon';import { Tag } from 'twenty-ui/primitives/data-display';import { type SelectOption } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type SelectControlTextAccent = 'default' | 'placeholder';@@ -125,7 +125,7 @@ export const SelectControl = ({hasRightElement,variant = 'default',}: SelectControlProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const hasLeadingContent =isDefined(LeftComponent) ||isDefined(selectedOption.Icon) ||diff --git a/packages/twenty-front/src/modules/ui/input/components/SelectOptionIcon.tsx b/packages/twenty-front/src/modules/ui/input/components/SelectOptionIcon.tsxindex 82d3a2dc1e2..904d4458e45 100644--- a/packages/twenty-front/src/modules/ui/input/components/SelectOptionIcon.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/SelectOptionIcon.tsx@@ -1,8 +1,7 @@import { isDefined } from 'twenty-shared/utils';import { TintedIconTile } from 'twenty-ui/components';import { type IconComponent } from 'twenty-ui/icon';-import { type ThemeColor } from 'twenty-ui/theme';-import { useTheme } from 'twenty-ui/theme-constants';+import { type ThemeColor, useTheme } from 'twenty-ui/theme';type SelectOptionIconProps = {Icon?: IconComponent | null;diff --git a/packages/twenty-front/src/modules/ui/input/components/TextArea.tsx b/packages/twenty-front/src/modules/ui/input/components/TextArea.tsxindex ad979b08704..5a276299895 100644--- a/packages/twenty-front/src/modules/ui/input/components/TextArea.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/TextArea.tsx@@ -8,7 +8,7 @@ import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentTypimport { type FormFieldInputVariant } from '@/ui/input/types/FormFieldInputVariant';import { isDefined } from 'twenty-shared/utils';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type TextAreaProps = {textAreaId: string;diff --git a/packages/twenty-front/src/modules/ui/input/components/TextInput.tsx b/packages/twenty-front/src/modules/ui/input/components/TextInput.tsxindex f61731b6943..5874b64eb45 100644--- a/packages/twenty-front/src/modules/ui/input/components/TextInput.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/TextInput.tsx@@ -7,7 +7,6 @@ import React, {type FocusEventHandler,type InputHTMLAttributes,forwardRef,- useContext,useId,useRef,useState,@@ -15,7 +14,7 @@ import React, {import { isDefined } from 'twenty-shared/utils';import { type IconComponent, IconEye, IconEyeOff } from 'twenty-ui/icon';import { Field } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useCombinedRefs } from '~/hooks/useCombinedRefs';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';const StyledContainer = styled.div<Pick<TextInputComponentProps, 'fullWidth'>>`@@ -304,7 +303,7 @@ const TextInputComponent = forwardRef<},ref,) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const inputRef = useRef<HTMLInputElement>(null);const combinedRef = useCombinedRefs(ref, inputRef);diff --git a/packages/twenty-front/src/modules/ui/input/components/TitleInput.tsx b/packages/twenty-front/src/modules/ui/input/components/TitleInput.tsxindex 99b121758ee..2efffca1eb3 100644--- a/packages/twenty-front/src/modules/ui/input/components/TitleInput.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/TitleInput.tsx@@ -9,7 +9,7 @@ import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooksimport { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';import { styled } from '@linaria/react';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type CommonInputProps = {instanceId: string;diff --git a/packages/twenty-front/src/modules/ui/input/components/__stories__/AdvancedSettingsSwitch.stories.tsx b/packages/twenty-front/src/modules/ui/input/components/__stories__/AdvancedSettingsSwitch.stories.tsxindex cc0a572afac..ede09952d2c 100644--- a/packages/twenty-front/src/modules/ui/input/components/__stories__/AdvancedSettingsSwitch.stories.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/__stories__/AdvancedSettingsSwitch.stories.tsx@@ -3,7 +3,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';import { type ComponentProps, useState } from 'react';import { expect, fn, userEvent, within } from 'storybook/test';import { ComponentDecorator } from 'twenty-ui/testing';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';type ControlledAdvancedSettingsSwitchProps = ComponentProps<typeof AdvancedSettingsSwitchdiff --git a/packages/twenty-front/src/modules/ui/input/components/internal/currency/components/CurrencyPickerDropdownButton.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/currency/components/CurrencyPickerDropdownButton.tsxindex c748ebf77d0..940bf154fb5 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/currency/components/CurrencyPickerDropdownButton.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/currency/components/CurrencyPickerDropdownButton.tsx@@ -6,10 +6,9 @@ import { CurrencyCode } from 'twenty-shared/constants';import { CURRENCIES } from '@/settings/data-model/constants/Currencies';import { type Currency } from '@/ui/input/components/internal/types/Currency';import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';-import { useContext } from 'react';import { IconChevronDown } from 'twenty-ui/icon';import { CurrencyPickerDropdownSelect } from './CurrencyPickerDropdownSelect';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledDropdownButtonContainer = styled.div`align-items: center;border-right: 1px solid ${themeCssVariables.border.color.medium};@@ -48,7 +47,7 @@ export const CurrencyPickerDropdownButton = ({selectedCurrencyCode: string;onChange: (currency: Currency) => void;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const dropdownId = 'currency-picker-dropdown-id';const { closeDropdown } = useCloseDropdown();diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePicker.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePicker.tsxindex c8c3051f71f..b70b858b056 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePicker.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePicker.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { Suspense, lazy, useContext, type ComponentType } from 'react';+import { Suspense, lazy, type ComponentType } from 'react';import type { DatePickerProps as ReactDatePickerLibProps } from 'react-datepicker';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';@@ -30,7 +30,7 @@ import {} from 'twenty-shared/utils';import { IconCalendarX } from 'twenty-ui/icon';import { Text } from 'twenty-ui/primitives/typography';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export const MONTH_AND_YEAR_DROPDOWN_MONTH_SELECT_ID ='date-picker-month-and-year-dropdown-month-select';@@ -132,7 +132,7 @@ export const DatePicker = ({onRelativeDateChange,hideHeaderInput,}: DatePickerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const plainDate = isDefined(plainDateString)? Temporal.PlainDate.from(plainDateString): Temporal.Now.plainDateISO();diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerHeader.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerHeader.tsxindex 43aa5b14fdf..1e321e935fc 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerHeader.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerHeader.tsx@@ -13,7 +13,7 @@ import { SOURCE_LOCALE } from 'twenty-shared/translations';import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconChevronLeft, IconChevronRight } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const MONTH_AND_YEAR_DROPDOWN_MONTH_SELECT_ID ='date-picker-month-and-year-dropdown-month-select';diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerInput.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerInput.tsxindex 14ffeb56376..2da696490d8 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerInput.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerInput.tsx@@ -14,7 +14,7 @@ import { type FormFieldInputVariant } from '@/ui/input/types/FormFieldInputVariaimport { useParseDateInputStringToPlainDate } from '@/ui/input/components/internal/date/hooks/useParseDateInputStringToPlainDate';import { useParseJSDateToIMaskDateInputString } from '@/ui/input/components/internal/date/hooks/useParseJSDateToIMaskDateInputString';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledInputContainer = styled.div<{$variant: FormFieldInputVariant;diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerWithoutCalendar.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerWithoutCalendar.tsxindex bc200e7a8cf..a4b402a8c19 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerWithoutCalendar.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePickerWithoutCalendar.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { Suspense, lazy, useContext, type ComponentType } from 'react';+import { Suspense, lazy, type ComponentType } from 'react';import type { DatePickerProps as ReactDatePickerLibProps } from 'react-datepicker';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';@@ -20,7 +20,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { Temporal } from 'temporal-polyfill';import { type Nullable } from 'twenty-shared/types';import { isDefined, turnJSDateToPlainDate } from 'twenty-shared/utils';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export const MONTH_AND_YEAR_DROPDOWN_MONTH_SELECT_ID ='date-picker-month-and-year-dropdown-month-select';@@ -78,7 +78,7 @@ export const DatePickerWithoutCalendar = ({onChange,onClose,}: DatePickerWithoutCalendarProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const plainDate = isDefined(date) ? Temporal.PlainDate.from(date) : null;const { closeDropdown: closeDropdownMonthSelect } = useCloseDropdown();diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePicker.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePicker.tsxindex 3940de85c6b..10f0a90475e 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePicker.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePicker.tsx@@ -17,7 +17,7 @@ import { getRelativeDatePickerCalendarRange } from '@/ui/input/components/internimport { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { Suspense, lazy, useContext, type ComponentType } from 'react';+import { Suspense, lazy, type ComponentType } from 'react';import type { DatePickerProps as ReactDatePickerLibProps } from 'react-datepicker';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';@@ -37,7 +37,7 @@ export {} from '@/ui/input/components/internal/date/components/DatePicker';export { DATE_TIME_PICKER_MONTH_YEAR_PANEL_DROPDOWN_ID } from '@/ui/input/components/internal/date/components/DateTimePickerHeader';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledOuterWrapper = styled.div`align-items: flex-start;@@ -148,7 +148,7 @@ export const DateTimePicker = ({hideHeaderInput,timeZone,}: DateTimePickerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { userFirstDayOfTheWeek } = useUserFirstDayOfTheWeek();const { userTimezone } = useUserTimezone();diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerHeader.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerHeader.tsxindex 407af66b5ff..e20179cd6b5 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerHeader.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerHeader.tsx@@ -25,7 +25,7 @@ import {IconChevronRight,IconClock,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {MONTH_AND_YEAR_DROPDOWN_MONTH_SELECT_ID,diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerInput.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerInput.tsxindex 16c96436f1f..14dfdf84c12 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerInput.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerInput.tsx@@ -18,7 +18,7 @@ import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUsimport { useEffect, useState } from 'react';import { Temporal } from 'temporal-polyfill';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { isDifferentZonedDateTime } from '~/utils/dates/isDifferentZonedDateTime';const StyledInputContainer = styled.div<{diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDatePickerCalendarNavigation.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDatePickerCalendarNavigation.tsxindex 594c61c6dff..0d3885730f5 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDatePickerCalendarNavigation.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDatePickerCalendarNavigation.tsx@@ -5,7 +5,7 @@ import { t } from '@lingui/core/macro';import { SOURCE_LOCALE } from 'twenty-shared/translations';import { LightIconButton } from 'twenty-ui/components';import { IconChevronLeft, IconChevronRight } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDatePickerHeader.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDatePickerHeader.tsxindex 0e7fdf97897..d85f8196ae0 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDatePickerHeader.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDatePickerHeader.tsx@@ -17,7 +17,7 @@ import {type RelativeDateFilterDirection,type RelativeDateFilterUnit,} from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ noPadding: boolean }>`display: flex;diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDateTimeRangeText.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDateTimeRangeText.tsxindex 1850baf7b03..a474f9a0ae3 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDateTimeRangeText.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/RelativeDateTimeRangeText.tsx@@ -4,7 +4,7 @@ import { styled } from '@linaria/react';import { type Temporal } from 'temporal-polyfill';import { SOURCE_LOCALE } from 'twenty-shared/translations';import { IconArrowDown } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/StyledDatePickerContainer.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/StyledDatePickerContainer.tsxindex f4b6ed4501c..821a08a8708 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/StyledDatePickerContainer.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/StyledDatePickerContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const DATE_PICKER_CONTAINER_WIDTH = 280;diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/TimeZoneAbbreviation.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/TimeZoneAbbreviation.tsxindex e9038fc82e2..338cdfb4a32 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/TimeZoneAbbreviation.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/TimeZoneAbbreviation.tsx@@ -3,7 +3,7 @@ import { getTimezoneAbbreviationForZonedDateTime } from '@/ui/input/components/iimport { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { type Temporal } from 'temporal-polyfill';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTimezoneAbbreviation = styled.span<{ hasError?: boolean }>`background: transparent;diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownButton.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownButton.tsxindex cec691c1945..5284df5e67b 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownButton.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownButton.tsx@@ -2,7 +2,7 @@ import { useCountries } from '@/ui/input/components/internal/hooks/useCountries'import { type Country } from '@/ui/input/components/internal/types/Country';import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { styled } from '@linaria/react';-import { useContext, useEffect, useState } from 'react';+import { useEffect, useState } from 'react';import { PhoneCountryPickerDropdownSelect } from './PhoneCountryPickerDropdownSelect';@@ -13,7 +13,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport 'react-phone-number-input/style.css';import { isDefined } from 'twenty-shared/utils';import { IconChevronDown, IconWorld } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type StyledDropdownButtonProps = {isUnfolded: boolean;@@ -89,7 +89,7 @@ export const PhoneCountryPickerDropdownButton = ({};const countries = useCountries();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();useEffect(() => {const country = countries.find(({ countryCode }) => countryCode === value);diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownSelect.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownSelect.tsxindex 67c565bf373..7df06263168 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownSelect.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownSelect.tsx@@ -9,7 +9,7 @@ import { useMemo, useState } from 'react';import 'react-phone-number-input/style.css';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { ListItem } from 'twenty-ui/primitives/navigation';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledIconContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/input/constants/FormFieldPlaceholderStyles.ts b/packages/twenty-front/src/modules/ui/input/constants/FormFieldPlaceholderStyles.tsindex 0f127b1adfc..faf53b904c5 100644--- a/packages/twenty-front/src/modules/ui/input/constants/FormFieldPlaceholderStyles.ts+++ b/packages/twenty-front/src/modules/ui/input/constants/FormFieldPlaceholderStyles.ts@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const FORM_FIELD_PLACEHOLDER_STYLES = `color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/ui/input/relation-picker/components/skeletons/DropdownMenuSkeletonItem.tsx b/packages/twenty-front/src/modules/ui/input/relation-picker/components/skeletons/DropdownMenuSkeletonItem.tsxindex cf47082cbe3..081b79b89c0 100644--- a/packages/twenty-front/src/modules/ui/input/relation-picker/components/skeletons/DropdownMenuSkeletonItem.tsx+++ b/packages/twenty-front/src/modules/ui/input/relation-picker/components/skeletons/DropdownMenuSkeletonItem.tsx@@ -1,9 +1,8 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { type CSSWidth } from '@/ui/types/CSSWidth';import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledDropdownMenuSkeletonContainer = styled.div`--horizontal-padding: ${themeCssVariables.spacing[1]};--vertical-padding: ${themeCssVariables.spacing[2]};@@ -27,7 +26,7 @@ export const DropdownMenuSkeletonItem = ({}: {width?: CSSWidth;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledDropdownMenuSkeletonContainer><SkeletonThemediff --git a/packages/twenty-front/src/modules/ui/input/styles/ButtonInvertedClassName.ts b/packages/twenty-front/src/modules/ui/input/styles/ButtonInvertedClassName.tsindex c58685783a1..ea41efa1b07 100644--- a/packages/twenty-front/src/modules/ui/input/styles/ButtonInvertedClassName.ts+++ b/packages/twenty-front/src/modules/ui/input/styles/ButtonInvertedClassName.ts@@ -1,5 +1,5 @@import { css } from '@linaria/core';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const BUTTON_INVERTED_CLASS_NAME = css`&[data-variant='outline'],diff --git a/packages/twenty-front/src/modules/ui/layout/dialog/components/ConfirmationDialog.tsx b/packages/twenty-front/src/modules/ui/layout/dialog/components/ConfirmationDialog.tsxindex 9127b67bb32..9b8d554f15c 100644--- a/packages/twenty-front/src/modules/ui/layout/dialog/components/ConfirmationDialog.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dialog/components/ConfirmationDialog.tsx@@ -12,7 +12,7 @@ import { msg } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import { Section } from 'twenty-ui/components';import { Dialog } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCenteredButton = styled(Button)`box-sizing: border-box;diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader.tsxindex 86dda2f8b04..a1905c2d2e5 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { type ComponentProps, type MouseEvent } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledHeader = styled.li`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/internal/DropdownMenuHeaderLeftComponent.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/internal/DropdownMenuHeaderLeftComponent.tsxindex 9029bfbc8ac..7ed04d3ba0a 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/internal/DropdownMenuHeaderLeftComponent.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuHeader/internal/DropdownMenuHeaderLeftComponent.tsx@@ -1,13 +1,13 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { type MouseEvent, type ReactElement, useContext } from 'react';+import { type MouseEvent, type ReactElement } from 'react';import { LightIconButton } from 'twenty-ui/components';import { type IconComponent } from 'twenty-ui/icon';import {type Avatar,type AvatarProps,} from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledNonClickableStartIcon = styled.div`align-items: center;@@ -41,7 +41,7 @@ export const DropdownMenuHeaderLeftComponent = ({}| Record<never, never>)) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<>{'Icon' in props &&diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInnerSelect.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInnerSelect.tsxindex c9e076184db..8e3d325fc1d 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInnerSelect.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInnerSelect.tsx@@ -3,11 +3,10 @@ import { LegacyDropdownContent } from '@/ui/layout/dropdown/components/LegacyDroimport { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconChevronDown } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';import { ListItem } from 'twenty-ui/primitives/navigation';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledDropdownMenuInnerSelectDropdownButton = styled.div`align-items: center;@@ -43,7 +42,7 @@ export const DropdownMenuInnerSelect = ({dropdownId,widthInPixels,}: DropdownMenuInnerSelectProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { closeDropdown } = useCloseDropdown();return (diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInput.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInput.tsxindex f92f104649a..90a8a1cb928 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInput.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInput.tsx@@ -9,7 +9,7 @@ import 'react-phone-number-input/style.css';import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCombinedRefs } from '~/hooks/useCombinedRefs';const StyledInput = styled.input<{diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsxindex ec70d79113a..1ad15cfc064 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx@@ -1,6 +1,6 @@import { DROPDOWN_MENU_ITEMS_CONTAINER_MAX_HEIGHT } from '@/ui/layout/dropdown/constants/DropdownMenuItemsContainerMaxHeight';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledExternalContainer = styled.div<{maxHeight?: number;diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSearchInput.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSearchInput.tsxindex 0f546af269f..00403fdddf0 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSearchInput.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSearchInput.tsx@@ -3,7 +3,7 @@ import { useLingui } from '@lingui/react/macro';import { useInputFocusWithoutScrollOnMount } from '@/ui/input/hooks/useInputFocusWithoutScrollOnMount';import { styled } from '@linaria/react';import { forwardRef, type InputHTMLAttributes } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDropdownMenuSearchInputContainer = styled.div`--vertical-padding: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSectionLabel.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSectionLabel.tsxindex 63d1e74c77b..a2d1bc1e287 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSectionLabel.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSectionLabel.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';const StyledDropdownMenuSectionLabel = styled.div`diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSeparator.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSeparator.tsxindex 4593de943d1..f0601ec4fa4 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSeparator.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuSeparator.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { forwardRef } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDropdownMenuSeparator = styled.div`background-color: ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledDropdownButtonContainer.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledDropdownButtonContainer.tsxindex adb9bd64980..20a07359c90 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledDropdownButtonContainer.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledDropdownButtonContainer.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';type StyledDropdownButtonProps = {diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledDropdownMenuSubheader.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledDropdownMenuSubheader.tsxindex 755b8ea8b81..9bb9e91eb26 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledDropdownMenuSubheader.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledDropdownMenuSubheader.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { Text } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDropdownMenuSubheaderContainer = styled.div`background-color: ${themeCssVariables.background.transparent.lighter};diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledHeaderDropdownButton.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledHeaderDropdownButton.tsxindex c84783c2cd6..2c59def4817 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledHeaderDropdownButton.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/StyledHeaderDropdownButton.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';type StyledDropdownButtonProps = {diff --git a/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandableList.tsx b/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandableList.tsxindex 48ebed2d873..f9ffec3a768 100644--- a/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandableList.tsx+++ b/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandableList.tsx@@ -13,7 +13,7 @@ import { ExpandedListDropdown } from '@/ui/layout/expandable-list/components/Expimport { isFirstOverflowingChildElement } from '@/ui/layout/expandable-list/utils/isFirstOverflowingChildElement';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandedFieldDisplay.tsx b/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandedFieldDisplay.tsxindex f7e2a2e734b..213fd05f363 100644--- a/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandedFieldDisplay.tsx+++ b/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandedFieldDisplay.tsx@@ -4,7 +4,7 @@ import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useLisimport { styled } from '@linaria/react';import { flip, FloatingPortal, offset, useFloating } from '@floating-ui/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type ExpandedFieldDisplayProps = {anchorElement?: HTMLElement;diff --git a/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandedListDropdown.tsx b/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandedListDropdown.tsxindex f58968cbeb1..60730ab151a 100644--- a/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandedListDropdown.tsx+++ b/packages/twenty-front/src/modules/ui/layout/expandable-list/components/ExpandedListDropdown.tsx@@ -5,7 +5,7 @@ import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useLisimport { styled } from '@linaria/react';import { FloatingPortal, offset, shift, useFloating } from '@floating-ui/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type ExpandedListDropdownProps = {anchorElement?: HTMLElement;diff --git a/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenContainer.tsx b/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenContainer.tsxindex e38ae8bc43d..92ee454335c 100644--- a/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenContainer.tsx+++ b/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenContainer.tsx@@ -7,7 +7,7 @@ import {} from '@/ui/navigation/bread-crumb/components/Breadcrumb';import { styled } from '@linaria/react';import { useIsMobile } from 'twenty-ui/utilities';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type FullScreenContainerProps = {children: JSX.Element | JSX.Element[];diff --git a/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenModal.tsx b/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenModal.tsxindex cbe9a2d2aee..ce0d95c0483 100644--- a/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenModal.tsx+++ b/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenModal.tsx@@ -6,7 +6,7 @@ import {} from '@/ui/navigation/bread-crumb/components/Breadcrumb';import { styled } from '@linaria/react';import { forwardRef } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFullScreenOverlay = styled.div`background: ${themeCssVariables.background.noisy};diff --git a/packages/twenty-front/src/modules/ui/layout/hero/components/HeroPlayButton.tsx b/packages/twenty-front/src/modules/ui/layout/hero/components/HeroPlayButton.tsxindex 66cd3675aad..55af2893f0c 100644--- a/packages/twenty-front/src/modules/ui/layout/hero/components/HeroPlayButton.tsx+++ b/packages/twenty-front/src/modules/ui/layout/hero/components/HeroPlayButton.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { IconPlayerPlay } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type HeroPlayButtonProps = {onClick?: () => void;@@ -47,7 +46,7 @@ export const HeroPlayButton = ({ariaLabel = 'Play video',className,}: HeroPlayButtonProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledButtondiff --git a/packages/twenty-front/src/modules/ui/layout/information-card/components/StyledInformationCard.tsx b/packages/twenty-front/src/modules/ui/layout/information-card/components/StyledInformationCard.tsxindex 35647f0a052..d30123afcfc 100644--- a/packages/twenty-front/src/modules/ui/layout/information-card/components/StyledInformationCard.tsx+++ b/packages/twenty-front/src/modules/ui/layout/information-card/components/StyledInformationCard.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledInformationCard = styled.div`backdrop-filter: blur(20px);diff --git a/packages/twenty-front/src/modules/ui/layout/overlay/components/OverlayContainer.tsx b/packages/twenty-front/src/modules/ui/layout/overlay/components/OverlayContainer.tsxindex 0e1b724ac14..bf386da4133 100644--- a/packages/twenty-front/src/modules/ui/layout/overlay/components/OverlayContainer.tsx+++ b/packages/twenty-front/src/modules/ui/layout/overlay/components/OverlayContainer.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';// oxlint-disable-next-line twenty/styled-components-prefixed-with-styleddiff --git a/packages/twenty-front/src/modules/ui/layout/page/components/AuthFlowLayout.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/AuthFlowLayout.tsxindex fe5915d3509..4689acfbd42 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/AuthFlowLayout.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/AuthFlowLayout.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { Outlet } from 'react-router-dom';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledBackground = styled.div`background: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/BlankLayout.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/BlankLayout.tsxindex 6302f277e2c..50ae679d2c1 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/BlankLayout.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/BlankLayout.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { Outlet } from 'react-router-dom';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AppErrorBoundary } from '@/error-handler/components/AppErrorBoundary';import { AppFullScreenErrorFallback } from '@/error-handler/components/AppFullScreenErrorFallback';diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsxindex f4e0008676b..90db28b1b0b 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx@@ -12,7 +12,7 @@ import { useShowFullscreen } from '@/ui/layout/fullscreen/hooks/useShowFullscreeimport { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { styled } from '@linaria/react';import { Outlet } from 'react-router-dom';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLayout = styled.div`background: ${themeCssVariables.grayScale.gray3};display: flex;diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/HeaderIdentifier.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/HeaderIdentifier.tsxindex 162f0378623..0643e83b5b3 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/HeaderIdentifier.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/HeaderIdentifier.tsx@@ -8,7 +8,7 @@ import {Avatar,type AvatarProps,} from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const HEADER_IDENTIFIER_TILE_SIZE = AVATAR_PROPERTIES_BY_SIZE.lg.width;diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/PageCardHeader.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/PageCardHeader.tsxindex 9892b4ff924..94d6254eadf 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/PageCardHeader.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/PageCardHeader.tsx@@ -13,7 +13,7 @@ import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { createPortal } from 'react-dom';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type PageCardHeaderProps = {links?: BreadcrumbProps['links'];diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/PageCardLayout.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/PageCardLayout.tsxindex e7eff73797f..1d25c9ead21 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/PageCardLayout.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/PageCardLayout.tsx@@ -2,7 +2,7 @@ import { InformationBannerWrapper } from '@/information-banner/components/Informimport { useWorkspaceSurface } from '@/ui/layout/hooks/useWorkspaceSurface';import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';type PageCardLayoutProps = {header: ReactNode;diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/PageHeader.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/PageHeader.tsxindex 9baa4ec6548..13bd8035c8c 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/PageHeader.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/PageHeader.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { FrontComponentMediaSessionIndicator } from '@/front-components/media-session/components/FrontComponentMediaSessionIndicator';import { NavigationDrawerCollapseButton } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton';@@ -15,11 +15,7 @@ import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { type IconComponent, IconX } from 'twenty-ui/icon';-import {- MOBILE_VIEWPORT,- ThemeContext,- themeCssVariables,-} from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledTopBarContainer = styled.div<{ isMobile: boolean }>`align-items: center;@@ -105,7 +101,7 @@ export const PageHeader = ({}: PageHeaderProps) => {const isMobile = useIsMobile();const isSettingsPage = useIsSettingsPage();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isNavigationDrawerExpanded = useNavigationDrawerExpanded();return (diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/ShowPageContainer.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/ShowPageContainer.tsxindex 8e28f10d4d0..3d078e0a254 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/ShowPageContainer.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/ShowPageContainer.tsx@@ -3,7 +3,7 @@ import { type CSSProperties, type ReactNode } from 'react';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledOuterContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/StyledHeaderIdentifierLabel.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/StyledHeaderIdentifierLabel.tsxindex 5ce365f82f6..54a9eebdb96 100644--- a/packages/twenty-front/src/modules/ui/layout/page/components/StyledHeaderIdentifierLabel.tsx+++ b/packages/twenty-front/src/modules/ui/layout/page/components/StyledHeaderIdentifierLabel.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledHeaderIdentifierLabel = styled.span`color: ${themeCssVariables.font.color.tertiary};diff --git a/packages/twenty-front/src/modules/ui/layout/resizable-panel/components/ResizablePanelEdge.tsx b/packages/twenty-front/src/modules/ui/layout/resizable-panel/components/ResizablePanelEdge.tsxindex cfb8542de0c..9d79bf91247 100644--- a/packages/twenty-front/src/modules/ui/layout/resizable-panel/components/ResizablePanelEdge.tsx+++ b/packages/twenty-front/src/modules/ui/layout/resizable-panel/components/ResizablePanelEdge.tsx@@ -4,7 +4,7 @@ import { RESIZE_EDGE_WIDTH_PX } from '@/ui/layout/resizable-panel/constants/Resiimport { useResizablePanel } from '@/ui/layout/resizable-panel/hooks/useResizablePanel';import { type ResizablePanelConstraints } from '@/ui/layout/resizable-panel/types/ResizablePanelConstraints';import { type ResizablePanelSide } from '@/ui/layout/resizable-panel/types/ResizablePanelSide';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type StyledEdgeProps = {isActive: boolean;diff --git a/packages/twenty-front/src/modules/ui/layout/show-page/components/FieldRichTextCard.tsx b/packages/twenty-front/src/modules/ui/layout/show-page/components/FieldRichTextCard.tsxindex 41ba8c41674..8c8e847f6c4 100644--- a/packages/twenty-front/src/modules/ui/layout/show-page/components/FieldRichTextCard.tsx+++ b/packages/twenty-front/src/modules/ui/layout/show-page/components/FieldRichTextCard.tsx@@ -4,11 +4,11 @@ import { recordStoreFamilySelector } from '@/object-record/record-store/states/simport { useTargetRecord } from '@/ui/layout/contexts/useTargetRecord';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { styled } from '@linaria/react';-import { lazy, Suspense, useContext } from 'react';+import { lazy, Suspense } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const ActivityRichTextEditor = lazy(() =>import('@/activities/components/ActivityRichTextEditor').then((module) => ({@@ -32,7 +32,7 @@ const StyledSkeletonContainer = styled.div``;const LoadingSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledSkeletonContainer><SkeletonThemediff --git a/packages/twenty-front/src/modules/ui/layout/side-panel/components/SidePanelFooter.tsx b/packages/twenty-front/src/modules/ui/layout/side-panel/components/SidePanelFooter.tsxindex 90a4628a9c6..af2a21b1ac2 100644--- a/packages/twenty-front/src/modules/ui/layout/side-panel/components/SidePanelFooter.tsx+++ b/packages/twenty-front/src/modules/ui/layout/side-panel/components/SidePanelFooter.tsx@@ -2,7 +2,7 @@ import { SidePanelFooterWidthContext } from '@/ui/layout/side-panel/contexts/Sidimport { NodeDimension } from '@/ui/utilities/dimensions/components/NodeDimension';import { styled } from '@linaria/react';import { Fragment, useCallback, useState } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`background: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabAvatar.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabAvatar.tsxindex e922a9a0487..ef37cf57636 100644--- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabAvatar.tsx+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabAvatar.tsx@@ -1,12 +1,11 @@import { type SingleTabProps } from '@/ui/layout/tab-list/types/SingleTabProps';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';export const TabAvatar = ({ tab }: { tab: SingleTabProps }) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();if (isDefined(tab.logo)) {return (diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabList.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabList.tsxindex b85757e28ce..3570a7b5423 100644--- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabList.tsx+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabList.tsx@@ -16,7 +16,7 @@ import { useLocation, useNavigate } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { TabListRow } from '@/ui/layout/tab-list/components/TabListRow';import { TabListItem } from '@/ui/layout/tab-list/components/TabListItem';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { TabListDropdown } from './TabListDropdown';import { TabListSelectionSyncEffect } from '@/ui/layout/tab-list/components/TabListSelectionSyncEffect';diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/Tablist.stories.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/Tablist.stories.tsxindex 13d8c3f4858..0e003053d39 100644--- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/Tablist.stories.tsx+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/__stories__/Tablist.stories.tsx@@ -38,7 +38,7 @@ const tabs = [{ id: 'reports', title: 'Reports', Icon: IconCheckbox },];-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';const StyledInteractiveContainer = styled.div`diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/constants/TabListHeight.ts b/packages/twenty-front/src/modules/ui/layout/tab-list/constants/TabListHeight.tsindex b6a6bea41b7..e8b9712b55c 100644--- a/packages/twenty-front/src/modules/ui/layout/tab-list/constants/TabListHeight.ts+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/constants/TabListHeight.ts@@ -1,3 +1,3 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const TAB_LIST_HEIGHT = themeCssVariables.spacing[10];diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/Table.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/Table.tsxindex efd33cabd61..e3964e70cd4 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/Table.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/Table.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTable = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/TableBody.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/TableBody.tsxindex 00165ca04d3..2e0becd2b40 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/TableBody.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/TableBody.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTableBody = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/TableCell.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/TableCell.tsxindex 919f2f30cfb..fdd2ae3884a 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/TableCell.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/TableCell.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type TableCellProps = {align?: 'left' | 'center' | 'right';diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/TableHeader.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/TableHeader.tsxindex 9828c638a54..f8a98e39c02 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/TableHeader.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/TableHeader.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ComponentPropsWithoutRef, type Ref, forwardRef } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type TableHeaderProps = Omit<ComponentPropsWithoutRef<'div'>, 'onClick'> & {align?: 'left' | 'center' | 'right';diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/TableHeaderText.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/TableHeaderText.tsxindex 3a06f6da636..21bfa21881c 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/TableHeaderText.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/TableHeaderText.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledTableHeaderText = styled.div`padding-bottom: ${themeCssVariables.spacing['0.5']};diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/TableRow.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/TableRow.tsxindex 5c7b3243c14..82aaa9bc2cc 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/TableRow.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/TableRow.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { Link } from 'react-router-dom';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';const StyledTableRow = styled.div<{isSelected?: boolean;diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/TableSection.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/TableSection.tsxindex 94b27c29cf6..bac2752045a 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/TableSection.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/TableSection.tsx@@ -1,8 +1,8 @@import { styled } from '@linaria/react';-import { type ReactNode, useContext, useState } from 'react';+import { type ReactNode, useState } from 'react';import { IconChevronDown, IconChevronUp } from 'twenty-ui/icon';import { Text } from 'twenty-ui/primitives/typography';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { TableBody } from './TableBody';type TableSectionProps = {@@ -41,7 +41,7 @@ export const TableSection = ({isInitiallyExpanded = true,title,}: TableSectionProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [isExpanded, setIsExpanded] = useState(isInitiallyExpanded);const handleToggleSection = () =>diff --git a/packages/twenty-front/src/modules/ui/layout/top-bar/components/TopBar.tsx b/packages/twenty-front/src/modules/ui/layout/top-bar/components/TopBar.tsxindex 3c2e5949fe6..2ca516df49d 100644--- a/packages/twenty-front/src/modules/ui/layout/top-bar/components/TopBar.tsx+++ b/packages/twenty-front/src/modules/ui/layout/top-bar/components/TopBar.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ReactNode } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type TopBarProps = {className?: string;diff --git a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/Breadcrumb.tsx b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/Breadcrumb.tsxindex 2c4afe0087a..7e8c8df88b4 100644--- a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/Breadcrumb.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/Breadcrumb.tsx@@ -3,7 +3,7 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { styled } from '@linaria/react';import { Fragment, type ReactNode } from 'react';import { Link } from 'react-router-dom';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type BreadcrumbProps = {className?: string;diff --git a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/MobileBreadcrumb.tsx b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/MobileBreadcrumb.tsxindex 382aca3fdd2..7b909a54735 100644--- a/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/MobileBreadcrumb.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/bread-crumb/components/MobileBreadcrumb.tsx@@ -2,10 +2,10 @@ import { t } from '@lingui/core/macro';import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage';import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { Link } from 'react-router-dom';import { IconChevronLeft } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type MobileBreadcrumbProps = {className?: string;@@ -46,7 +46,7 @@ export const MobileBreadcrumb = ({className,links,}: MobileBreadcrumbProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isSettingsPage = useIsSettingsPage();if (isSettingsPage && links.length <= 2) {diff --git a/packages/twenty-front/src/modules/ui/navigation/menu-item/components/MenuItemWithOptionDropdown.tsx b/packages/twenty-front/src/modules/ui/navigation/menu-item/components/MenuItemWithOptionDropdown.tsxindex 5f45b3ffe44..550cecd4762 100644--- a/packages/twenty-front/src/modules/ui/navigation/menu-item/components/MenuItemWithOptionDropdown.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/menu-item/components/MenuItemWithOptionDropdown.tsx@@ -1,11 +1,11 @@import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { t } from '@lingui/core/macro';-import { type MouseEvent, useContext } from 'react';+import { type MouseEvent } from 'react';import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconDotsVertical } from 'twenty-ui/icon';import { ListItem } from 'twenty-ui/primitives/navigation';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { type MenuItemWithOptionDropdownProps } from './types/MenuItemWithOptionDropdownProps';// TODO: refactor this@@ -26,7 +26,7 @@ export const MenuItemWithOptionDropdown = ({dropdownPlacement = 'bottom-end',selected = false,}: MenuItemWithOptionDropdownProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const handleMenuItemClick = (event: MouseEvent<HTMLDivElement>) => {if (!onClick) return;event.preventDefault();diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/CollapsibleNavigationDrawerSection.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/CollapsibleNavigationDrawerSection.tsxindex a1c1d880049..326d1d7b8eb 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/CollapsibleNavigationDrawerSection.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/CollapsibleNavigationDrawerSection.tsx@@ -5,7 +5,7 @@ import { useNavigationSection } from '@/ui/navigation/navigation-drawer/hooks/usimport { styled } from '@linaria/react';import { type ReactNode } from 'react';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledItems = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspaceDropdownClickableComponent.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspaceDropdownClickableComponent.tsxindex ce704e529bb..bb86d6c017a 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspaceDropdownClickableComponent.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspaceDropdownClickableComponent.tsx@@ -10,9 +10,8 @@ import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constaimport { useIsNavigationDrawerContentExpanded } from '@/navigation/hooks/useIsNavigationDrawerContentExpanded';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';-import { useContext } from 'react';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type MultiWorkspaceDropdownClickableComponentProps = {disabled?: boolean;@@ -23,7 +22,7 @@ export const MultiWorkspaceDropdownClickableComponent = ({disabled,shouldHideLabel = false,}: MultiWorkspaceDropdownClickableComponentProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const currentWorkspace = useAtomStateValue(currentWorkspaceState);const isNavigationDrawerExpanded = useIsNavigationDrawerContentExpanded();diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspacesDropdownStyles.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspacesDropdownStyles.tsxindex 2ee8d547a64..ebc5aaa0c66 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspacesDropdownStyles.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspacesDropdownStyles.tsx@@ -1,7 +1,7 @@import { NAVIGATION_DRAWER_COLLAPSED_BUTTON_SIZE } from '@/ui/navigation/navigation-drawer/constants/NavigationDrawerCollapsedButtonSize';import { styled } from '@linaria/react';import { IconChevronDown } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledContainer = styled.div<{isNavigationDrawerExpanded: boolean;diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsxindex 4cbf1dec240..42ce76b74b0 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx@@ -18,7 +18,7 @@ import {import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { NavigationDrawerHeader } from './NavigationDrawerHeader';export type NavigationDrawerProps = {diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerAnimatedCollapseWrapper.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerAnimatedCollapseWrapper.tsxindex 04846f026be..8ca895958e8 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerAnimatedCollapseWrapper.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerAnimatedCollapseWrapper.tsx@@ -5,8 +5,7 @@ import {motion,type TargetAndTransition,} from 'framer-motion';-import { useContext } from 'react';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const StyledAnimatedContainerBase = styled.span`display: block;`;@@ -18,7 +17,7 @@ export const NavigationDrawerAnimatedCollapseWrapper = ({}: {children: React.ReactNode;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isNavigationDrawerExpanded = useIsNavigationDrawerContentExpanded();const animate: AnimationControls | TargetAndTransition =diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton.tsxindex ae8a3669f61..ac1477d9199 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton.tsx@@ -6,7 +6,7 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { styled } from '@linaria/react';import { LightIconButton } from 'twenty-ui/components';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledCollapseButton = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerFixedContent.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerFixedContent.tsxindex fd7e1c14ad4..3b2d77659cb 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerFixedContent.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerFixedContent.tsx@@ -3,7 +3,7 @@ import { type ReactNode } from 'react';import { NavigationDrawerSection } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerSection';import { styled } from '@linaria/react';import { useIsMobile } from 'twenty-ui/utilities';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFixedContainer = styled.div<{ isMobile?: boolean }>`flex-shrink: 0;diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsxindex 015652c42d6..9f9d4463ae7 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx@@ -5,7 +5,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { LightIconButton } from 'twenty-ui/components';import { IconSearch } from 'twenty-ui/icon';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { useIsNavigationDrawerContentExpanded } from '@/navigation/hooks/useIsNavigationDrawerContentExpanded';import { useOpenRecordsSearchPageInSidePanel } from '@/side-panel/hooks/useOpenRecordsSearchPageInSidePanel';diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsxindex f49ab4d6464..e8070c80963 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItem.tsx@@ -23,11 +23,7 @@ import {Text,OverflowingTextWithTooltip,} from 'twenty-ui/primitives/typography';-import {- MOBILE_VIEWPORT,- ThemeContext,- themeCssVariables,-} from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, useTheme, themeCssVariables } from 'twenty-ui/theme';const DEFAULT_INDENTATION_LEVEL = 1;export type NavigationDrawerItemIndentationLevel = 1 | 2;@@ -263,7 +259,7 @@ export const NavigationDrawerItem = ({isSelectedInEditMode = false,variant = 'default',}: NavigationDrawerItemProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const editingContent = useContext(NavigationDrawerItemEditingContext);const isMobile = useIsMobile();const isExpanded = useIsNavigationDrawerContentExpanded();diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemBreadcrumb.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemBreadcrumb.tsxindex 6fda238f3ae..3e3fae91754 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemBreadcrumb.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemBreadcrumb.tsx@@ -1,6 +1,6 @@import { type NavigationDrawerSubItemState } from '@/ui/navigation/navigation-drawer/types/NavigationDrawerSubItemState';import { styled } from '@linaria/react';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';export type NavigationDrawerItemBreadcrumbProps = {state?: NavigationDrawerSubItemState;diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemsCollapsableContainer.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemsCollapsableContainer.tsxindex 8ea69a4aab4..d4d8615eaf0 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemsCollapsableContainer.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemsCollapsableContainer.tsx@@ -1,13 +1,13 @@import { NAVIGATION_DRAWER_COLLAPSED_BUTTON_SIZE } from '@/ui/navigation/navigation-drawer/constants/NavigationDrawerCollapsedButtonSize';import { useIsNavigationDrawerContentExpanded } from '@/navigation/hooks/useIsNavigationDrawerContentExpanded';import { styled } from '@linaria/react';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import {type AnimationControls,motion,type TargetAndTransition,} from 'framer-motion';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledAnimationGroupContainerBase = styled.div<{isCollapsedGroup: boolean;@@ -39,7 +39,7 @@ export const NavigationDrawerItemsCollapsableContainer = ({isGroup = false,children,}: NavigationDrawerItemsCollapsableContainerProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isExpanded = useIsNavigationDrawerContentExpanded();const animate: AnimationControls | TargetAndTransition = isExpandeddiff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerScrollableContent.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerScrollableContent.tsxindex e4688ca9d93..bae08434a30 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerScrollableContent.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerScrollableContent.tsx@@ -3,7 +3,7 @@ import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { useIsMobile } from 'twenty-ui/utilities';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledItemsContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSection.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSection.tsxindex af02e0c7962..fcbffae6cc8 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSection.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSection.tsx@@ -1,7 +1,7 @@import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';const StyledSection = styled.div`diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitle.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitle.tsxindex bd9fc294299..55418fe8ef4 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitle.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitle.tsx@@ -2,11 +2,11 @@ import { useIsNavigationDrawerContentExpanded } from '@/navigation/hooks/useIsNaimport { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { styled } from '@linaria/react';import { motion } from 'framer-motion';-import React, { useContext } from 'react';+import React from 'react';import { isDefined } from 'twenty-shared/utils';import { IconChevronRight } from 'twenty-ui/icon';import { Text } from 'twenty-ui/primitives/typography';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledTitle = styled.div`align-items: center;@@ -79,7 +79,7 @@ export const NavigationDrawerSectionTitle = ({alwaysShowRightIcon = false,isOpen,}: NavigationDrawerSectionTitleProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const isMobile = useIsMobile();const isNavigationDrawerExpanded = useIsNavigationDrawerContentExpanded();const handleTitleClick = (e: React.MouseEvent<HTMLDivElement>) => {diff --git a/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.ts b/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.tsindex 1da6fea849f..c35b9031a61 100644--- a/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.ts+++ b/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.ts@@ -1,5 +1,5 @@import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme';const isMobile = window.innerWidth <= MOBILE_VIEWPORT;diff --git a/packages/twenty-front/src/modules/ui/navigation/states/navigationDrawerExpandedMemorizedState.ts b/packages/twenty-front/src/modules/ui/navigation/states/navigationDrawerExpandedMemorizedState.tsindex 1ebed494b32..ee4a040e621 100644--- a/packages/twenty-front/src/modules/ui/navigation/states/navigationDrawerExpandedMemorizedState.ts+++ b/packages/twenty-front/src/modules/ui/navigation/states/navigationDrawerExpandedMemorizedState.ts@@ -1,4 +1,4 @@-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme';import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';diff --git a/packages/twenty-front/src/modules/ui/navigation/step-bar/components/Step.tsx b/packages/twenty-front/src/modules/ui/navigation/step-bar/components/Step.tsxindex 032081cac23..c3dda29bcc4 100644--- a/packages/twenty-front/src/modules/ui/navigation/step-bar/components/Step.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/step-bar/components/Step.tsx@@ -1,14 +1,9 @@import { styled } from '@linaria/react';import { motion } from 'framer-motion';-import { useContext } from 'react';import { AnimatedCheckmark } from '@/ui/navigation/step-bar/components/internal/AnimatedCheckmark/AnimatedCheckmark';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';-import {- MOBILE_VIEWPORT,- ThemeContext,- themeCssVariables,-} from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ isLast: boolean }>`align-items: center;@@ -87,7 +82,7 @@ export const Step = ({activeStep = 0,}: StepProps) => {const isMobile = useIsMobile();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const variantsLine = {previous: {diff --git a/packages/twenty-front/src/modules/ui/navigation/step-bar/components/StepBar.tsx b/packages/twenty-front/src/modules/ui/navigation/step-bar/components/StepBar.tsxindex dd577a625e0..d11506f56ce 100644--- a/packages/twenty-front/src/modules/ui/navigation/step-bar/components/StepBar.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/step-bar/components/StepBar.tsx@@ -3,7 +3,7 @@ import React from 'react';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme';import { Step, type StepProps } from './Step';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/ui/navigation/step-bar/components/internal/AnimatedCheckmark/AnimatedCheckmark.tsx b/packages/twenty-front/src/modules/ui/navigation/step-bar/components/internal/AnimatedCheckmark/AnimatedCheckmark.tsxindex 7681c8f89e0..7115cc84854 100644--- a/packages/twenty-front/src/modules/ui/navigation/step-bar/components/internal/AnimatedCheckmark/AnimatedCheckmark.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/step-bar/components/internal/AnimatedCheckmark/AnimatedCheckmark.tsx@@ -1,5 +1,5 @@import { css } from '@linaria/core';-import { useTheme } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';const styles = {animatedPath: css`diff --git a/packages/twenty-front/src/modules/ui/suggestion/components/SuggestionMenu.tsx b/packages/twenty-front/src/modules/ui/suggestion/components/SuggestionMenu.tsxindex a6367e8f24c..ae92faf2b50 100644--- a/packages/twenty-front/src/modules/ui/suggestion/components/SuggestionMenu.tsx+++ b/packages/twenty-front/src/modules/ui/suggestion/components/SuggestionMenu.tsx@@ -24,7 +24,7 @@ import type { SuggestionMenuProps } from '@/ui/suggestion/types/SuggestionMenuPrimport { getSuggestionMenuItemAnchorId } from '@/ui/suggestion/utils/getSuggestionMenuItemAnchorId';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';// The preview card brings its own surface, so the tooltip only contributes// the shadow. Tooltips render at 0.9 opacity, which would make it translucent.diff --git a/packages/twenty-front/src/modules/ui/theme/components/BaseThemeProvider.tsx b/packages/twenty-front/src/modules/ui/theme/components/BaseThemeProvider.tsxindex 6051292d4c9..ac0d5eb1d96 100644--- a/packages/twenty-front/src/modules/ui/theme/components/BaseThemeProvider.tsx+++ b/packages/twenty-front/src/modules/ui/theme/components/BaseThemeProvider.tsx@@ -7,7 +7,7 @@ import { persistedUiScaleStepState } from '@/ui/theme/states/persistedUiScaleSteimport { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { type ColorScheme } from 'twenty-ui/primitives/input';-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';type BaseThemeProviderProps = {children: JSX.Element | JSX.Element[];diff --git a/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemDropTarget.tsx b/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemDropTarget.tsxindex 8dae0d0995a..adcea557eb0 100644--- a/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemDropTarget.tsx+++ b/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemDropTarget.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { type ReactNode, useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { DragDropItemDndContext } from '@/ui/utilities/drag-and-drop/context/DragDropItemDndContext';import { type DragDropItemDropTargetOrientation } from '@/ui/utilities/drag-and-drop/types/DragDropItemDropTargetOrientation';diff --git a/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemSortableCell.tsx b/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemSortableCell.tsxindex 0e9a3754b89..2a16c4b60bf 100644--- a/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemSortableCell.tsx+++ b/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemSortableCell.tsx@@ -8,7 +8,7 @@ import { type UseSortableInput, useSortable } from '@dnd-kit/react/sortable';import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { DND_KIT_PLUGINS_WITHOUT_OPTIMISTIC } from '@/ui/utilities/drag-and-drop/constants/DndKitPluginsWithoutOptimistic';import { DRAG_SOURCE_OPACITY } from '@/ui/utilities/drag-and-drop/constants/DragSourceOpacity';diff --git a/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemSortableHandle.tsx b/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemSortableHandle.tsxindex 6d9ba190b1d..3a07697380b 100644--- a/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemSortableHandle.tsx+++ b/packages/twenty-front/src/modules/ui/utilities/drag-and-drop/components/DragDropItemSortableHandle.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { type ReactNode, useContext } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { DragDropItemSortableHandleRefContext } from '@/ui/utilities/drag-and-drop/context/DragDropItemSortableHandleRefContext';diff --git a/packages/twenty-front/src/modules/ui/utilities/drag-select/components/DragSelect.tsx b/packages/twenty-front/src/modules/ui/utilities/drag-select/components/DragSelect.tsxindex 9df871a3ff5..0d2d901cb82 100644--- a/packages/twenty-front/src/modules/ui/utilities/drag-select/components/DragSelect.tsx+++ b/packages/twenty-front/src/modules/ui/utilities/drag-select/components/DragSelect.tsx@@ -23,7 +23,7 @@ type Position = {y: number;};-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledDragSelection = styled.div<SelectionBox>`background: ${themeCssVariables.color.blue7};diff --git a/packages/twenty-front/src/modules/ui/utilities/drag-select/components/__stories__/DragSelect.stories.tsx b/packages/twenty-front/src/modules/ui/utilities/drag-select/components/__stories__/DragSelect.stories.tsxindex c0e2462be2d..ae4aef6afcc 100644--- a/packages/twenty-front/src/modules/ui/utilities/drag-select/components/__stories__/DragSelect.stories.tsx+++ b/packages/twenty-front/src/modules/ui/utilities/drag-select/components/__stories__/DragSelect.stories.tsx@@ -7,7 +7,7 @@ import { DragSelect } from '@/ui/utilities/drag-select/components/DragSelect';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { isDefined } from 'twenty-shared/utils';import { ComponentDecorator } from 'twenty-ui/testing';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`border: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/ui/utilities/responsive/hooks/useIsMobile.ts b/packages/twenty-front/src/modules/ui/utilities/responsive/hooks/useIsMobile.tsindex 6cc69d0321d..6b51d75e2e4 100644--- a/packages/twenty-front/src/modules/ui/utilities/responsive/hooks/useIsMobile.ts+++ b/packages/twenty-front/src/modules/ui/utilities/responsive/hooks/useIsMobile.ts@@ -1,5 +1,5 @@import { useMediaQuery } from 'react-responsive';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme';export const useIsMobile = () =>useMediaQuery({ query: `(max-width: ${MOBILE_VIEWPORT}px)` });diff --git a/packages/twenty-front/src/modules/ui/utilities/scroll/components/ScrollOverlayButton.tsx b/packages/twenty-front/src/modules/ui/utilities/scroll/components/ScrollOverlayButton.tsxindex 6f1372c56f4..6d6b63476b0 100644--- a/packages/twenty-front/src/modules/ui/utilities/scroll/components/ScrollOverlayButton.tsx+++ b/packages/twenty-front/src/modules/ui/utilities/scroll/components/ScrollOverlayButton.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';import { type IconComponent } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledScrollOverlayButton = styled.button<{hasTitle: boolean;diff --git a/packages/twenty-front/src/modules/ui/utilities/scroll/components/__stories__/ScrollOverlayButton.stories.tsx b/packages/twenty-front/src/modules/ui/utilities/scroll/components/__stories__/ScrollOverlayButton.stories.tsxindex 310d528f640..5d7939d21d1 100644--- a/packages/twenty-front/src/modules/ui/utilities/scroll/components/__stories__/ScrollOverlayButton.stories.tsx+++ b/packages/twenty-front/src/modules/ui/utilities/scroll/components/__stories__/ScrollOverlayButton.stories.tsx@@ -4,7 +4,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';import { expect, fn, userEvent, within } from 'storybook/test';import { IconArrowDown } from 'twenty-ui/icon';import { ComponentDecorator } from 'twenty-ui/testing';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledScrollAreaMock = styled.div`background: ${themeCssVariables.background.secondary};diff --git a/packages/twenty-front/src/modules/views/components/SortOrFilterChip.tsx b/packages/twenty-front/src/modules/views/components/SortOrFilterChip.tsxindex c003b6ac7bd..cbb134462c2 100644--- a/packages/twenty-front/src/modules/views/components/SortOrFilterChip.tsx+++ b/packages/twenty-front/src/modules/views/components/SortOrFilterChip.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';-import { useContext, type ReactNode } from 'react';+import { type ReactNode } from 'react';import { type IconComponent, IconX } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { isDefined } from 'twenty-shared/utils';const StyledChip = styled.div<{ variant: SortOrFilterChipVariant }>`@@ -140,7 +140,7 @@ export const SortOrFilterChip = ({onClick,type,}: SortOrFilterChipProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const handleDeleteClick = (e: React.MouseEvent) => {e.stopPropagation();diff --git a/packages/twenty-front/src/modules/views/components/UpdateViewButtonGroup.tsx b/packages/twenty-front/src/modules/views/components/UpdateViewButtonGroup.tsxindex fd9b8e11b61..29e7a83c80c 100644--- a/packages/twenty-front/src/modules/views/components/UpdateViewButtonGroup.tsx+++ b/packages/twenty-front/src/modules/views/components/UpdateViewButtonGroup.tsx@@ -26,7 +26,7 @@ import { t } from '@lingui/core/macro';import { IconChevronDown, IconPlus } from 'twenty-ui/icon';import { Button, ButtonGroup } from 'twenty-ui/primitives/input';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`border-radius: ${themeCssVariables.border.radius.md};diff --git a/packages/twenty-front/src/modules/views/components/ViewBarDetails.tsx b/packages/twenty-front/src/modules/views/components/ViewBarDetails.tsxindex b5ff90d1ed7..45553514324 100644--- a/packages/twenty-front/src/modules/views/components/ViewBarDetails.tsx+++ b/packages/twenty-front/src/modules/views/components/ViewBarDetails.tsx@@ -37,7 +37,7 @@ import { t } from '@lingui/core/macro';import { isNonEmptyArray, isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { LightButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type ViewBarDetailsProps = {hasFilterButton?: boolean;diff --git a/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsx b/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsxindex fe31fb12fd7..650b74d6470 100644--- a/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsx+++ b/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsx@@ -27,7 +27,7 @@ import { RecordFilterGroupLogicalOperator } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { IconFilter } from 'twenty-ui/icon';import { Pill } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { v4 } from 'uuid';const StyledPillContainer = styled.span`diff --git a/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownBottomMenu.tsx b/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownBottomMenu.tsxindex e75e9aae1a9..972ce159b68 100644--- a/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownBottomMenu.tsx+++ b/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownBottomMenu.tsx@@ -1,7 +1,7 @@import { ViewBarFilterDropdownAdvancedFilterButton } from '@/views/components/ViewBarFilterDropdownAdvancedFilterButton';import { ViewBarFilterDropdownAnyFieldSearchButton } from '@/views/components/ViewBarFilterDropdownAnyFieldSearchButton';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownFieldSelectMenu.tsx b/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownFieldSelectMenu.tsxindex 7a5d9569d49..ee6a605b52e 100644--- a/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownFieldSelectMenu.tsx+++ b/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownFieldSelectMenu.tsx@@ -24,7 +24,7 @@ import { DropdownComponentInstanceContext } from '@/ui/layout/dropdown/contexts/import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useLingui } from '@lingui/react/macro';import { IconX } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const StyledInput = styled.input`background: transparent;diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsxindex 03dd2230eb0..a7ca2d81a3d 100644--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx@@ -37,7 +37,7 @@ import { viewPickerTypeComponentState } from '@/views/view-picker/states/viewPicimport { Trans, useLingui } from '@lingui/react/macro';import { useMemo, useState } from 'react';import { IconX } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledFieldAvailableContainer = styled.div`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerDropdown.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerDropdown.tsxindex 46b57a8ca68..15bbc92d4e4 100644--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerDropdown.tsx+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerDropdown.tsx@@ -15,15 +15,10 @@ import { useViewPickerMode } from '@/views/view-picker/hooks/useViewPickerMode';import { getViewPickerDropdownId } from '@/views/view-picker/utils/getViewPickerDropdownId';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronDown, IconList, useIcons } from 'twenty-ui/icon';-import {- MOBILE_VIEWPORT,- ThemeContext,- themeCssVariables,-} from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledIconContainer = styled.span`display: flex;@@ -53,7 +48,7 @@ const StyledViewName = styled.span``;export const ViewPickerDropdown = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { currentView } = useGetCurrentViewOnly();const { updateViewFromCurrentState } = useUpdateViewFromCurrentState();diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerIconAndNameContainer.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerIconAndNameContainer.tsxindex 24cb34eb2c2..467367ea402 100644--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerIconAndNameContainer.tsx+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerIconAndNameContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledIconAndNameContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerListContent.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerListContent.tsxindex 78ae1a0ff60..3a408c76136 100644--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerListContent.tsx+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerListContent.tsx@@ -25,7 +25,7 @@ import { computeViewPickerVisibleViews } from '@/views/view-picker/utils/computeimport { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { useLingui } from '@lingui/react/macro';import { IconPlus } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { FeatureFlagKey, ViewVisibility } from '~/generated-metadata/graphql';import { moveArrayItem } from '~/utils/array/moveArrayItem';diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerSaveButtonContainer.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerSaveButtonContainer.tsxindex d36d0e56e43..499ad0f4c0d 100644--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerSaveButtonContainer.tsx+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerSaveButtonContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSaveButtonContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerSelectContainer.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerSelectContainer.tsxindex 0ee5f7a77f7..dc9dcd46ca3 100644--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerSelectContainer.tsx+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerSelectContainer.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSelectContainer = styled.div`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/workflow/components/WorkflowStepExecutionResult.tsx b/packages/twenty-front/src/modules/workflow/components/WorkflowStepExecutionResult.tsxindex 3508b17d1ad..4d0060b12f6 100644--- a/packages/twenty-front/src/modules/workflow/components/WorkflowStepExecutionResult.tsx+++ b/packages/twenty-front/src/modules/workflow/components/WorkflowStepExecutionResult.tsx@@ -2,14 +2,13 @@ import { LightCopyIconButton } from '@/object-record/record-field/ui/components/import { AnimatedCircleLoading } from '@/workflow/components/internal/AnimatedCircleLoading/AnimatedCircleLoading';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { CodeEditor, CodeEditorHeader } from 'twenty-ui/components/code-editor';import {IconLoader,IconSquareRoundedCheck,IconSquareRoundedX,} from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;flex: 1;@@ -75,7 +74,7 @@ export const WorkflowStepExecutionResult = ({loadingMessage = t`Processing...`,idleMessage = t`Output`,}: WorkflowStepExecutionResultProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const SuccessLeftNode = (<StyledOutput accent="success">diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasBase.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasBase.tsxindex a1411ec9184..dbcfc936a19 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasBase.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasBase.tsx@@ -70,7 +70,11 @@ import React, {import { isDefined } from 'twenty-shared/utils';import { WORKFLOW_DIAGRAM_DEFAULT_NODE_DIMENSIONS } from 'twenty-shared/workflow';import { Tag, type TagColor } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import {+ useTheme,+ useThemeColorScheme,+ themeCssVariables,+} from 'twenty-ui/theme';const StyledResetReactflowStyles = styled.div`--xy-node-background-color: none;--xy-node-border: none;@@ -171,7 +175,8 @@ export const WorkflowDiagramCanvasBase = ({event: MouseEvent | React.MouseEvent<Element, MouseEvent>;}) => void;}) => {- const { theme, colorScheme } = useContext(ThemeContext);+ const theme = useTheme();+ const colorScheme = useThemeColorScheme();const allowPageScroll = useContext(WorkflowDiagramAllowPageScrollContext);const store = useStore();const reactflow = useReactFlow();diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramConnector.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramConnector.tsxindex 683b539a702..9d033c22adf 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramConnector.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramConnector.tsx@@ -1,7 +1,6 @@-import { ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { useTheme } from 'twenty-ui/theme';export const WorkflowDiagramConnector = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<svgxmlns="http://www.w3.org/2000/svg"diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramRightClickCommandMenu.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramRightClickCommandMenu.tsxindex 72642d74a74..051793ba2f8 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramRightClickCommandMenu.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramRightClickCommandMenu.tsx@@ -11,7 +11,7 @@ import { useRef } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconPlus, IconReorder } from 'twenty-ui/icon';import { WorkflowDiagramRightClickCommandMenuClickOutsideEffect } from './WorkflowDiagramRightClickCommandMenuClickOutsideEffect';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ x: number; y: number }>`background: ${themeCssVariables.background.primary};diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunCard.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunCard.tsxindex 0af4761aa65..ed803dd15d8 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunCard.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunCard.tsx@@ -7,9 +7,9 @@ import { WorkflowRunVisualizerEffect } from '@/workflow/workflow-diagram/componeimport { WorkflowRunVisualizerComponentInstanceContext } from '@/workflow/workflow-diagram/states/contexts/WorkflowRunVisualizerComponentInstanceContext';import { WorkflowVisualizerComponentInstanceContext } from '@/workflow/workflow-diagram/states/contexts/WorkflowVisualizerComponentInstanceContext';import { styled } from '@linaria/react';-import { Suspense, useContext, useId } from 'react';+import { Suspense, useId } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledLoadingSkeletonContainer = styled.div`display: flex;flex-direction: column;@@ -20,7 +20,7 @@ const StyledLoadingSkeletonContainer = styled.div``;const LoadingSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledLoadingSkeletonContainer><SkeletonThemediff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowVersionCard.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowVersionCard.tsxindex 840c010aac6..4cc241a406e 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowVersionCard.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowVersionCard.tsx@@ -5,9 +5,9 @@ import { WorkflowVersionVisualizer } from '@/workflow/workflow-diagram/componentimport { WorkflowVersionVisualizerEffect } from '@/workflow/workflow-diagram/components/WorkflowVersionVisualizerEffect';import { WorkflowVisualizerComponentInstanceContext } from '@/workflow/workflow-diagram/states/contexts/WorkflowVisualizerComponentInstanceContext';import { styled } from '@linaria/react';-import { Suspense, useContext } from 'react';+import { Suspense } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledLoadingSkeletonContainer = styled.div`display: flex;flex-direction: column;@@ -18,7 +18,7 @@ const StyledLoadingSkeletonContainer = styled.div``;const LoadingSkeleton = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledLoadingSkeletonContainer><SkeletonThemediff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/hooks/useWorkflowDiagramScreenToFlowPosition.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/hooks/useWorkflowDiagramScreenToFlowPosition.tsindex a94bc453f32..3dc3dbb2f4b 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/hooks/useWorkflowDiagramScreenToFlowPosition.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/hooks/useWorkflowDiagramScreenToFlowPosition.ts@@ -1,9 +1,8 @@import { useReactFlow } from '@xyflow/react';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const useWorkflowDiagramScreenToFlowPosition = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { screenToFlowPosition } = useReactFlow();const workflowDiagramScreenToFlowPosition = (position?: {diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/getWorkflowDiagramColors.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/getWorkflowDiagramColors.tsindex 03c0b10f52f..7a2eb7f4cf9 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/getWorkflowDiagramColors.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/getWorkflowDiagramColors.ts@@ -1,5 +1,5 @@import type { WorkflowRunStepStatus } from '@/workflow/types/Workflow';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowDiagramColors = {background: string;diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramBaseEdge.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramBaseEdge.tsxindex 435ecae8b2d..5a3b0699706 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramBaseEdge.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramBaseEdge.tsx@@ -1,8 +1,7 @@import { useEdgeState } from '@/workflow/workflow-diagram/workflow-edges/hooks/useEdgeState';import { type WorkflowDiagramEdgeComponentProps } from '@/workflow/workflow-diagram/workflow-edges/types/WorkflowDiagramEdgeComponentProps';import { BaseEdge } from '@xyflow/react';-import { ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { useTheme } from 'twenty-ui/theme';type WorkflowDiagramBaseEdgeProps = Pick<WorkflowDiagramEdgeComponentProps,@@ -25,7 +24,7 @@ export const WorkflowDiagramBaseEdge = ({markerEnd,path,}: WorkflowDiagramBaseEdgeProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { isEdgeSelected, isEdgeHovered } = useEdgeState();const selected = isEdgeSelected({diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramBlankEdge.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramBlankEdge.tsxindex c3a2616e64a..323e94daa65 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramBlankEdge.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramBlankEdge.tsx@@ -1,8 +1,7 @@import { type WorkflowDiagramEdge } from '@/workflow/workflow-diagram/types/WorkflowDiagram';import { getEdgePath } from '@/workflow/workflow-diagram/workflow-edges/utils/getEdgePath';import { BaseEdge, type EdgeProps } from '@xyflow/react';-import { ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { useTheme } from 'twenty-ui/theme';type WorkflowDiagramBlankEdgeProps = EdgeProps<WorkflowDiagramEdge>;@@ -16,7 +15,7 @@ export const WorkflowDiagramBlankEdge = ({targetX,targetPosition,}: WorkflowDiagramBlankEdgeProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { segments } = getEdgePath({sourceX,sourceY,diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramConnection.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramConnection.tsxindex 432c6632bc5..9dc4aaa487b 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramConnection.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramConnection.tsx@@ -3,8 +3,7 @@ import {getBezierPath,} from '@xyflow/react';import { EDGE_BRANCH_ARROW_MARKER } from '@/workflow/workflow-diagram/workflow-edges/constants/EdgeBranchArrowMarker';-import { ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { useTheme } from 'twenty-ui/theme';type WorkflowDiagramConnectionProps = ConnectionLineComponentProps;@@ -14,7 +13,7 @@ export const WorkflowDiagramConnection = ({toX,toY,}: WorkflowDiagramConnectionProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [path] = getBezierPath({sourceX: fromX,sourceY: fromY + 4,diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramCustomMarkers.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramCustomMarkers.tsxindex 2529e225b77..e89369c95ea 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramCustomMarkers.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramCustomMarkers.tsx@@ -1,9 +1,8 @@import { EDGE_BRANCH_ARROW_MARKER } from '@/workflow/workflow-diagram/workflow-edges/constants/EdgeBranchArrowMarker';-import { ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { useTheme } from 'twenty-ui/theme';export const WorkflowDiagramCustomMarkers = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<svg style={{ position: 'absolute', top: 0, left: 0 }}><defs>diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramDefaultEdgeReadonly.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramDefaultEdgeReadonly.tsxindex 79d4f20c9e7..29aa4090c70 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramDefaultEdgeReadonly.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramDefaultEdgeReadonly.tsx@@ -5,8 +5,7 @@ import { getEdgePath } from '@/workflow/workflow-diagram/workflow-edges/utils/geimport { i18n } from '@lingui/core';import { BaseEdge, EdgeLabelRenderer } from '@xyflow/react';import { isDefined } from 'twenty-shared/utils';-import { ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { useTheme } from 'twenty-ui/theme';type WorkflowDiagramDefaultEdgeReadonlyProps =WorkflowDiagramEdgeComponentProps;@@ -22,7 +21,7 @@ export const WorkflowDiagramDefaultEdgeReadonly = ({markerEnd,data,}: WorkflowDiagramDefaultEdgeReadonlyProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const {segments,overlayPosition: [labelX, labelY],diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeButtonGroup.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeButtonGroup.tsxindex 91c7c78624e..95b3dd0be2b 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeButtonGroup.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeButtonGroup.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { type ReactNode } from 'react';import { ButtonGroup } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledButtonGroupContainer = styled.div`pointer-events: all;diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeLabel.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeLabel.tsxindex 2f573a014fb..9aca3e4ec0d 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeLabel.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeLabel.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';import { Text } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeV2Container.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeV2Container.tsxindex bf6bc522ee0..e0db181494b 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeV2Container.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-edges/components/WorkflowDiagramEdgeV2Container.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';const StyledContainer = styled.div<{ labelX: number; labelY: number }>`diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleSource.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleSource.tsxindex 3137ed10b8e..e1d213456cf 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleSource.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleSource.tsx@@ -5,7 +5,7 @@ import { getWorkflowDiagramColors } from '@/workflow/workflow-diagram/utils/getWimport { styled } from '@linaria/react';import { Handle, Position, type HandleProps } from '@xyflow/react';import { useMemo, type CSSProperties } from 'react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const HANDLE_SCALE_ON_HOVER = 1.5;diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleTarget.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleTarget.tsxindex 45530b0beae..6050181de70 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleTarget.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleTarget.tsx@@ -3,7 +3,7 @@ import { WorkflowDiagramHandleTargetEffect } from '@/workflow/workflow-diagram/wimport { styled } from '@linaria/react';import { Handle, Position, useNodeId } from '@xyflow/react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowDiagramHandleTargetProps = {isConnectable?: boolean;diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeIcon.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeIcon.tsxindex 2d25bcf6e56..91dbc64c468 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeIcon.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeIcon.tsx@@ -6,15 +6,14 @@ import { WorkflowDiagramStepNodeLogicFunctionIcon } from '@/workflow/workflow-diimport { getActionIconColorOrThrow } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIconColorOrThrow';import { getTriggerIconColor } from '@/workflow/workflow-trigger/utils/getTriggerIconColor';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';-import { useContext } from 'react';+import { useTheme } from 'twenty-ui/theme';export const WorkflowDiagramStepNodeIcon = ({data,}: {data: WorkflowDiagramStepNodeData;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const Icon = getIcon(getWorkflowNodeIconKey(data));diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeLogicFunctionIcon.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeLogicFunctionIcon.tsxindex 643bfdf6add..731c92b6d79 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeLogicFunctionIcon.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeLogicFunctionIcon.tsx@@ -4,17 +4,16 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { getActionIconStrokeOrThrow } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIconStrokeOrThrow';import { getActionIconColorOrThrow } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIconColorOrThrow';import { getActionIcon } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIcon';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';export const WorkflowDiagramStepNodeLogicFunctionIcon = ({logicFunctionId,}: {logicFunctionId?: string;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const logicFunctions = useAtomStateValue(logicFunctionsSelector);diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeOptionsDropdown.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeOptionsDropdown.tsxindex dcd425dfe85..56568408c16 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeOptionsDropdown.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeOptionsDropdown.tsx@@ -10,7 +10,7 @@ import { useLingui } from '@lingui/react/macro';import { useId } from 'react';import { Dropdown, IconButton } from 'twenty-ui/components';import { IconDotsVertical } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledOptionsButtonContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeContainer.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeContainer.tsxindex c6ac34d9d9d..154e2e02e76 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeContainer.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeContainer.tsx@@ -1,7 +1,7 @@import type { WorkflowRunStepStatus } from '@/workflow/types/Workflow';import { getWorkflowDiagramColors } from '@/workflow/workflow-diagram/utils/getWorkflowDiagramColors';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const TARGET_HANDLE_SPACING = 32;diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeIconContainer.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeIconContainer.tsxindex b17890ccc4e..2c3e550e117 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeIconContainer.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeIconContainer.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';const StyledNodeIconContainer = styled.div`diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeTitle.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeTitle.tsxindex 6eea8e18a44..be07be7dcae 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeTitle.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowNodeTitle.tsx@@ -1,7 +1,7 @@import type { WorkflowRunStepStatus } from '@/workflow/types/Workflow';import { getWorkflowDiagramColors } from '@/workflow/workflow-diagram/utils/getWorkflowDiagramColors';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledNodeTitle = styled.div<{highlight?: boolean;diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowRunDiagramStepNode.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowRunDiagramStepNode.tsxindex fe3242e079b..7280c1f5280 100644--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowRunDiagramStepNode.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowRunDiagramStepNode.tsx@@ -31,7 +31,7 @@ import { isDefined } from 'twenty-shared/utils';import { StepStatus } from 'twenty-shared/workflow';import { IconCheck, IconX, useIcons } from 'twenty-ui/icon';import { Loader } from 'twenty-ui/primitives/feedback';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledNodeLabelWithCounterPart = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/SidePanelWorkflowSelectStepContainer.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/SidePanelWorkflowSelectStepContainer.tsxindex 42704a68885..19b99eb4f69 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/SidePanelWorkflowSelectStepContainer.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/SidePanelWorkflowSelectStepContainer.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';const StyledStepListContainer = styled.div`diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/SidePanelWorkflowSelectStepTitle.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/SidePanelWorkflowSelectStepTitle.tsxindex 153e448db87..4fa385bed04 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/SidePanelWorkflowSelectStepTitle.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/SidePanelWorkflowSelectStepTitle.tsx@@ -1,4 +1,4 @@-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { styled } from '@linaria/react';const StyledSelectStepTitle = styled.span`diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepBody.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepBody.tsxindex e934a1339e2..291bb8631f4 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepBody.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepBody.tsx@@ -2,7 +2,7 @@ import { AppErrorBoundary } from '@/error-handler/components/AppErrorBoundary';import { AppErrorDisplay } from '@/error-handler/components/internal/AppErrorDisplay';import { type AppErrorDisplayProps } from '@/error-handler/types/AppErrorDisplayProps';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledWorkflowStepBody = styled.div<{rowGap?: string;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterAddRootStepFilterButton.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterAddRootStepFilterButton.tsxindex 338742292e3..a9ad2dadbd5 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterAddRootStepFilterButton.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterAddRootStepFilterButton.tsx@@ -5,7 +5,7 @@ import { useLingui } from '@lingui/react/macro';import { useContext } from 'react';import { IconFilter } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledButtonContainer = styled.div`margin-top: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterBuilder.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterBuilder.tsxindex f7041d9c0e2..a8338c6331c 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterBuilder.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterBuilder.tsx@@ -18,7 +18,7 @@ import { isStepFilterGroupChildAStepFilterGroup } from '@/workflow/workflow-stepimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: start;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterColumn.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterColumn.tsxindex 602eafd0884..4b869835f19 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterColumn.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterColumn.tsx@@ -8,7 +8,7 @@ import { WorkflowStepFilterContext } from '@/workflow/workflow-steps/filters/staimport { styled } from '@linaria/react';import { useContext } from 'react';import { type StepFilter, type StepFilterGroup } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowStepFilterColumnProps = {stepFilterGroup: StepFilterGroup;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterGroupChildren.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterGroupChildren.tsxindex 3872d07d997..e996ccedae6 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterGroupChildren.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterGroupChildren.tsx@@ -5,7 +5,7 @@ import { WorkflowStepFilterContext } from '@/workflow/workflow-steps/filters/staimport { styled } from '@linaria/react';import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ isGrayBackground?: boolean }>`align-items: start;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterGroupColumn.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterGroupColumn.tsxindex 30045f159d7..4c5bf05e677 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterGroupColumn.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterGroupColumn.tsx@@ -6,7 +6,7 @@ import { WorkflowStepFilterContext } from '@/workflow/workflow-steps/filters/staimport { styled } from '@linaria/react';import { useContext } from 'react';import { type StepFilterGroup } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowStepFilterGroupColumnProps = {parentStepFilterGroup: StepFilterGroup;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterLogicalOperatorCell.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterLogicalOperatorCell.tsxindex 6cfc6d3dd2c..ee87f953ced 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterLogicalOperatorCell.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/WorkflowStepFilterLogicalOperatorCell.tsx@@ -9,7 +9,7 @@ import { useLingui } from '@lingui/react/macro';import { useContext, useMemo } from 'react';import { StepLogicalOperator, type StepFilterGroup } from 'twenty-shared/types';import { capitalize, isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledText = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/__stories__/WorkflowStepFilterBuilder.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/__stories__/WorkflowStepFilterBuilder.stories.tsxindex 2ba38ab7695..eb389ad35cc 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/__stories__/WorkflowStepFilterBuilder.stories.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/components/__stories__/WorkflowStepFilterBuilder.stories.tsx@@ -3,7 +3,7 @@ import { WorkflowStepFilterBuilder } from '@/workflow/workflow-steps/filters/comimport { type Meta, type StoryObj } from '@storybook/react-vite';import { fn } from 'storybook/test';import { ComponentDecorator } from 'twenty-ui/testing';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowAiAgentPermissionsTab.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowAiAgentPermissionsTab.tsxindex d8ca2c61a28..011ae3e459a 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowAiAgentPermissionsTab.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowAiAgentPermissionsTab.tsx@@ -22,7 +22,7 @@ import { filterBySearchQuery } from '~/utils/filterBySearchQuery';import { isNonTextWritingKey } from '@/ui/utilities/hotkey/utils/isNonTextWritingKey';import { WorkflowAiAgentPermissionList } from '@/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowAiAgentPermissionList';import { CRUD_PERMISSIONS } from '@/workflow/workflow-steps/workflow-actions/ai-agent-action/constants/WorkflowAiAgentCrudPermissions';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { WorkflowAiAgentPermissionsCrudList } from './WorkflowAiAgentPermissionsCrudList';import { WorkflowAiAgentPermissionsFlagList } from './WorkflowAiAgentPermissionsFlagList';import { WorkflowAiAgentPermissionsObjectsList } from './WorkflowAiAgentPermissionsObjectsList';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowEditActionAiAgent.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowEditActionAiAgent.tsxindex d3b9f640617..db751f874fb 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowEditActionAiAgent.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowEditActionAiAgent.tsx@@ -22,7 +22,7 @@ import { useEffect, useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { IconLock, IconSparkles } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';import {FindOneAgentDocument,diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaBuilder.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaBuilder.tsxindex 1cf94da5a25..7aea8cc721f 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaBuilder.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaBuilder.tsx@@ -11,7 +11,7 @@ import { isValidAgentResponseSchemaPropertyKey } from 'twenty-shared/ai';import { IconPlus } from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';import { ListItem } from 'twenty-ui/primitives/navigation';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { WorkflowOutputFieldTypeSelector } from './WorkflowOutputFieldTypeSelector';import { WorkflowOutputSchemaFieldHeader } from './WorkflowOutputSchemaFieldHeader';type WorkflowOutputSchemaBuilderProps = {diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaFieldHeader.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaFieldHeader.tsxindex 6892bf9c362..63c8597a6df 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaFieldHeader.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaFieldHeader.tsx@@ -4,7 +4,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { LightIconButton } from 'twenty-ui/components';import { IconChevronDown, IconVariable, IconX } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';type WorkflowOutputSchemaFieldHeaderProps = {name: string;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowRunStepLogsAiAgentDetail.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowRunStepLogsAiAgentDetail.tsxindex 73b168fb811..7cbe4b4674d 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowRunStepLogsAiAgentDetail.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowRunStepLogsAiAgentDetail.tsx@@ -11,7 +11,7 @@ import {IconTool,IconWorld,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { formatDuration } from '@/workflow/workflow-steps/workflow-actions/utils/formatDuration';import {diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowRunStepLogsToolCallRow.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowRunStepLogsToolCallRow.tsxindex d5d64107281..1c8147c1de3 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowRunStepLogsToolCallRow.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowRunStepLogsToolCallRow.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { type AiToolCallLog } from 'twenty-shared/workflow';import { useToolDisplayContext } from '@/ai/hooks/useToolDisplayContext';@@ -15,7 +15,7 @@ import {IconCircleX,} from 'twenty-ui/icon';import { AnimatedExpandableContainer } from 'twenty-ui/primitives/layout';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type JsonValue } from 'type-fest';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';@@ -144,7 +144,7 @@ export const WorkflowRunStepLogsToolCallRow = ({}: {toolCall: AiToolCallLog;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { copyToClipboard } = useCopyToClipboard();const [isExpanded, setIsExpanded] = useState(false);diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/WorkflowClassifyQuestionCriteria.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/WorkflowClassifyQuestionCriteria.tsxindex c0e233a1a45..bb6cabd84be 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/WorkflowClassifyQuestionCriteria.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/WorkflowClassifyQuestionCriteria.tsx@@ -8,7 +8,7 @@ import { useState } from 'react';import { type WorkflowClassifyCriterion } from 'twenty-shared/workflow';import { IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { v4 } from 'uuid';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/WorkflowEditActionClassify.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/WorkflowEditActionClassify.tsxindex 50030b670b5..fc6aed0eaac 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/WorkflowEditActionClassify.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/classify-action/components/WorkflowEditActionClassify.tsx@@ -28,7 +28,7 @@ import {} from 'twenty-ui/icon';import { Button, Field } from 'twenty-ui/primitives/input';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledQuestion = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsxindex d6f6807b4d3..363909534af 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowCodeEditor.tsx@@ -6,7 +6,7 @@ import { type editor } from 'monaco-editor';import { LightIconButton } from 'twenty-ui/components';import { CodeEditor } from 'twenty-ui/components/code-editor';import { IconMaximize } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const CODE_EDITOR_MIN_HEIGHT = 343;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsxindex 23b5266ef05..5e4d30164e0 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx@@ -49,7 +49,7 @@ import {import { isDefined } from 'twenty-shared/utils';import { getFunctionInputFromInputSchema } from 'twenty-shared/workflow';import { IconCode, IconPlayerPlay } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useIsMobile } from 'twenty-ui/utilities';import { useDebouncedCallback } from 'use-debounce';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsxindex bf751838150..515d6416df5 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx@@ -8,7 +8,7 @@ import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { isPlainObject } from 'twenty-shared/utils';import { type FunctionInput, type InputSchema } from 'twenty-shared/workflow';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div<{ fullWidth?: boolean }>`display: flex;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowRunStepLogsCodeDetail.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowRunStepLogsCodeDetail.tsxindex ea7d2588c25..95dabae69f4 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowRunStepLogsCodeDetail.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowRunStepLogsCodeDetail.tsx@@ -8,7 +8,7 @@ import {IconClock,IconTerminal,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { MONOSPACE_FONT_FAMILY } from '@/ui/theme/constants/MonospaceFontFamily';import { formatDuration } from '@/workflow/workflow-steps/workflow-actions/utils/formatDuration';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsDetail.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsDetail.tsxindex 48c1f7430e9..30091fd8818 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsDetail.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsDetail.tsx@@ -4,7 +4,7 @@ import { isDefined } from 'twenty-shared/utils';import { workflowRunStepLogSchema } from 'twenty-shared/workflow';import { JsonTree } from 'twenty-ui/components';import { IconInfoCircle } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type JsonValue } from 'type-fest';import { useFlowOrThrow } from '@/workflow/hooks/useFlowOrThrow';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsEmailDetail.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsEmailDetail.tsxindex f8d5809f2d0..7207c2698b8 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsEmailDetail.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsEmailDetail.tsx@@ -10,7 +10,7 @@ import {IconMail,IconPaperclip,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { formatBytes } from '@/workflow/workflow-steps/workflow-actions/utils/formatBytes';import { formatDuration } from '@/workflow/workflow-steps/workflow-actions/utils/formatDuration';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsEntries.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsEntries.tsxindex 236ceda4b71..c036c574c9f 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsEntries.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowRunStepLogsEntries.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { type WorkflowRunStepLog } from 'twenty-shared/workflow';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { MONOSPACE_FONT_FAMILY } from '@/ui/theme/constants/MonospaceFontFamily';import {diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSendEmailAttachments.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSendEmailAttachments.tsxindex a2da3621b43..e3e2598d116 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSendEmailAttachments.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSendEmailAttachments.tsx@@ -8,11 +8,11 @@ import { useUploadWorkflowFile } from '@/workflow/workflow-steps/workflow-actionimport { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isString } from '@sniptt/guards';-import { useContext, useId } from 'react';+import { useId } from 'react';import { isDefined } from 'twenty-shared/utils';import { type WorkflowEmailFiles } from 'twenty-shared/workflow';import { IconUpload } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type WorkflowSendEmailAttachmentsProps = {files: WorkflowEmailFiles;@@ -87,7 +87,7 @@ export const WorkflowSendEmailAttachments = ({VariablePicker,}: WorkflowSendEmailAttachmentsProps) => {const instanceId = useId();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { uploadWorkflowFile } = useUploadWorkflowFile();const { openFileUpload } = useFileUpload();const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/workflowRunStepLogsStyles.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/workflowRunStepLogsStyles.tsindex edbbfe1b158..c64e3cee965 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/workflowRunStepLogsStyles.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/workflowRunStepLogsStyles.ts@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { MONOSPACE_FONT_FAMILY } from '@/ui/theme/constants/MonospaceFontFamily';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/WorkflowEditActionFilter.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/WorkflowEditActionFilter.tsxindex 71f282af266..eba85963b7e 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/WorkflowEditActionFilter.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/filter-action/components/WorkflowEditActionFilter.tsx@@ -3,7 +3,7 @@ import { WorkflowStepBody } from '@/workflow/workflow-steps/components/WorkflowSimport { WorkflowStepFooter } from '@/workflow/workflow-steps/components/WorkflowStepFooter';import { WorkflowStepFilterBuilder } from '@/workflow/workflow-steps/filters/components/WorkflowStepFilterBuilder';import { type FilterSettings } from '@/workflow/workflow-steps/filters/types/FilterSettings';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowEditActionFilterProps = {action: WorkflowFilterAction;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowEditActionFindRecords.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowEditActionFindRecords.tsxindex 2ae7a6fac78..200f094a4b3 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowEditActionFindRecords.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowEditActionFindRecords.tsx@@ -35,7 +35,7 @@ import { WorkflowFindRecordsSorts } from '@/workflow/workflow-steps/workflow-actimport { WorkflowObjectDropdownContent } from '@/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowObjectDropdownContent';import { WorkflowVariablePicker } from '@/workflow/workflow-variables/components/WorkflowVariablePicker';import { isStandaloneVariableString } from 'twenty-shared/workflow';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLabel = styled.span`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowFindRecordsSorts.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowFindRecordsSorts.tsxindex 9f1a7d6e92a..4d97eb9f269 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowFindRecordsSorts.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowFindRecordsSorts.tsx@@ -8,7 +8,7 @@ import { IconArrowsSort, IconTrash, useIcons } from 'twenty-ui/icon';import { Button, type SelectOption } from 'twenty-ui/primitives/input';import { v4 as uuidv4 } from 'uuid';import { ViewSortDirection } from '~/generated-metadata/graphql';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormBuilder.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormBuilder.tsxindex f97a5708a96..c6b6df4955b 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormBuilder.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormBuilder.tsx@@ -19,7 +19,7 @@ import { getDefaultFormFieldSettings } from '@/workflow/workflow-steps/workflow-import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isNonEmptyString } from '@sniptt/guards';-import { useContext, useEffect, useState } from 'react';+import { useEffect, useState } from 'react';import { FieldMetadataType } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { Callout, LightIconButton } from 'twenty-ui/components';@@ -30,7 +30,7 @@ import {IconPlus,IconTrash,} from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';import { v4 } from 'uuid';@@ -154,7 +154,7 @@ export const WorkflowEditActionFormBuilder = ({actionOptions,}: WorkflowEditActionFormBuilderProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const [formData, setFormData] = useState<FormData>(action.settings.input);diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormFieldSettings.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormFieldSettings.tsxindex 592f41de599..a2c830c609e 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormFieldSettings.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowEditActionFormFieldSettings.tsx@@ -8,10 +8,9 @@ import { type WorkflowFormFieldType } from '@/workflow/workflow-steps/workflow-aimport { getDefaultFormFieldSettings } from '@/workflow/workflow-steps/workflow-actions/form-action/utils/getDefaultFormFieldSettings';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { LightIconButton } from 'twenty-ui/components';import { IconSettingsAutomation, IconX } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type WorkflowEditActionFormFieldSettingsProps = {field: WorkflowFormActionField;onChange: (field: WorkflowFormActionField) => void;@@ -62,7 +61,7 @@ export const WorkflowEditActionFormFieldSettings = ({onChange,onClose,}: WorkflowEditActionFormFieldSettingsProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledFormFieldSettingsContainer>diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsNumber.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsNumber.tsxindex ee700e47953..f954708beeb 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsNumber.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsNumber.tsx@@ -7,7 +7,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import camelCase from 'lodash.camelcase';import { FieldMetadataType } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowFormFieldSettingsNumberProps = {field: WorkflowFormActionField;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsRecordPicker.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsRecordPicker.tsxindex efe2925b6fe..f338d88ec79 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsRecordPicker.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsRecordPicker.tsx@@ -11,7 +11,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import camelCase from 'lodash.camelcase';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowFormFieldSettingsRecordPickerProps = {field: WorkflowFormActionField;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsSelect.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsSelect.tsxindex 4adde166ba5..9b0b6d78fb6 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsSelect.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsSelect.tsx@@ -9,7 +9,7 @@ import { getDefaultFormFieldSettings } from '@/workflow/workflow-steps/workflow-import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import camelCase from 'lodash.camelcase';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowFormFieldSettingsSelectProps = {field: WorkflowFormActionField;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsText.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsText.tsxindex aaf3f5d05eb..5f87c4fb031 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsText.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/components/WorkflowFormFieldSettingsText.tsx@@ -7,7 +7,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import camelCase from 'lodash.camelcase';import { FieldMetadataType } from 'twenty-shared/types';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowFormFieldSettingsTextProps = {field: WorkflowFormActionField;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/BodyInput.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/BodyInput.tsxindex b5f0bc4dfc1..55eba24c826 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/BodyInput.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/BodyInput.tsx@@ -22,7 +22,7 @@ import {type BodyType,} from 'twenty-shared/workflow';import { IconFileText, IconKey } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type JsonValue } from 'type-fest';import { KeyValuePairInput } from './KeyValuePairInput';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/HttpRequestTestVariableInput.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/HttpRequestTestVariableInput.tsxindex 771ede16a67..9c7ea0dc614 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/HttpRequestTestVariableInput.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/HttpRequestTestVariableInput.tsx@@ -8,7 +8,7 @@ import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtimport { httpRequestTestDataFamilyState } from '@/workflow/workflow-steps/workflow-actions/http-request-action/states/httpRequestTestDataFamilyState';import { t } from '@lingui/core/macro';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledVariableInputsContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/KeyValuePairInput.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/KeyValuePairInput.tsxindex ec504efde63..cbdb61b6ee6 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/KeyValuePairInput.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/KeyValuePairInput.tsx@@ -9,7 +9,7 @@ import { t } from '@lingui/core/macro';import { useState } from 'react';import { IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { v4 } from 'uuid';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/WorkflowEditActionHttpRequest.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/WorkflowEditActionHttpRequest.tsxindex d9a258950ab..4a3f8b80c89 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/WorkflowEditActionHttpRequest.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/WorkflowEditActionHttpRequest.tsx@@ -17,7 +17,7 @@ import { isMethodWithBody } from '@/workflow/workflow-steps/workflow-actions/httimport { WorkflowVariablePicker } from '@/workflow/workflow-variables/components/WorkflowVariablePicker';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext, useEffect } from 'react';+import { useEffect } from 'react';import { IconPlayerPlay, IconSettings } from 'twenty-ui/icon';import {HTTP_METHODS,@@ -32,7 +32,7 @@ import { BodyInput } from './BodyInput';import { HttpRequestExecutionResult } from './HttpRequestExecutionResult';import { HttpRequestTestVariableInput } from './HttpRequestTestVariableInput';import { KeyValuePairInput } from './KeyValuePairInput';-import { themeCssVariables, ThemeContext } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';type WorkflowEditActionHttpRequestProps = {action: WorkflowHttpRequestAction;actionOptions: {@@ -90,7 +90,7 @@ export const WorkflowEditActionHttpRequest = ({actionOptions,}: WorkflowEditActionHttpRequestProps) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const activeTabId = useAtomComponentStateValue(activeTabIdComponentState,WORKFLOW_HTTP_REQUEST_TAB_LIST_COMPONENT_ID,diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/WorkflowRunStepLogsHttpRequestDetail.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/WorkflowRunStepLogsHttpRequestDetail.tsxindex ba0a33f9414..83fbbf8b93b 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/WorkflowRunStepLogsHttpRequestDetail.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/components/WorkflowRunStepLogsHttpRequestDetail.tsx@@ -10,7 +10,7 @@ import {IconClock,IconWorld,} from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { MONOSPACE_FONT_FAMILY } from '@/ui/theme/constants/MonospaceFontFamily';import { formatBytes } from '@/workflow/workflow-steps/workflow-actions/utils/formatBytes';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowEditActionIfElseBody.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowEditActionIfElseBody.tsxindex 231653b4b77..67b056a17c0 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowEditActionIfElseBody.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowEditActionIfElseBody.tsx@@ -29,7 +29,7 @@ import { type StepIfElseBranch } from 'twenty-shared/workflow';import { IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';import { HorizontalSeparator } from 'twenty-ui/primitives/layout';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: start;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowIfElseBranchEditor.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowIfElseBranchEditor.tsxindex d16bcbf4c3e..ca5ce2141be 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowIfElseBranchEditor.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/if-else-action/components/WorkflowIfElseBranchEditor.tsx@@ -11,7 +11,7 @@ import { i18n, type MessageDescriptor } from '@lingui/core';import { type StepFilter, type StepFilterGroup } from 'twenty-shared/types';import { capitalize, isDefined } from 'twenty-shared/utils';import { type StepIfElseBranch } from 'twenty-shared/workflow';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledBranchContainer = styled.div`align-items: start;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/iterator-action/components/WorkflowIteratorSubStepSwitcher.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/iterator-action/components/WorkflowIteratorSubStepSwitcher.tsxindex a7dd1941859..836b4aee51d 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/iterator-action/components/WorkflowIteratorSubStepSwitcher.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/iterator-action/components/WorkflowIteratorSubStepSwitcher.tsx@@ -11,7 +11,7 @@ import { plural, t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { IconChevronLeft, IconChevronRight } from 'twenty-ui/icon';import { IconButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/logic-function-action/components/WorkflowEditActionLogicFunction.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/logic-function-action/components/WorkflowEditActionLogicFunction.tsxindex 851e76fdbcd..fb7a9d60e14 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/logic-function-action/components/WorkflowEditActionLogicFunction.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/logic-function-action/components/WorkflowEditActionLogicFunction.tsx@@ -29,7 +29,7 @@ import { isDefined } from 'twenty-shared/utils';import { getFunctionInputFromInputSchema } from 'twenty-shared/workflow';import { Callout } from 'twenty-ui/components';import { IconPlayerPlay, IconSettingsAutomation } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';const INPUT_TAB_ID = 'input';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/pick-record-action/components/WorkflowEditActionPickRecord.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/pick-record-action/components/WorkflowEditActionPickRecord.tsxindex ff8afaa0d83..2c4ea68ef22 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/pick-record-action/components/WorkflowEditActionPickRecord.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/pick-record-action/components/WorkflowEditActionPickRecord.tsx@@ -21,7 +21,7 @@ import { type WorkflowPickRecordAction } from '@/workflow/types/Workflow';import { WorkflowStepBody } from '@/workflow/workflow-steps/components/WorkflowStepBody';import { WorkflowStepFooter } from '@/workflow/workflow-steps/components/WorkflowStepFooter';import { WorkflowObjectDropdownContent } from '@/workflow/workflow-steps/workflow-actions/find-records-action/components/WorkflowObjectDropdownContent';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLabel = styled.span`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/__tests__/getActionIconColorOrThrow.test.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/__tests__/getActionIconColorOrThrow.test.tsindex 74f19140025..988ab804f48 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/__tests__/getActionIconColorOrThrow.test.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/__tests__/getActionIconColorOrThrow.test.ts@@ -1,6 +1,6 @@import { type WorkflowActionType } from '@/workflow/types/Workflow';import { getActionIconColorOrThrow } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIconColorOrThrow';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';describe('getActionIconColorOrThrow', () => {it('returns red9 for CODE, HTTP_REQUEST, SEND_EMAIL, DRAFT_EMAIL, LOGIC_FUNCTION', () => {diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/getActionIconColorOrThrow.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/getActionIconColorOrThrow.tsindex 8fc3b2fb6e9..94cb3ae0f6e 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/getActionIconColorOrThrow.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/getActionIconColorOrThrow.ts@@ -1,6 +1,6 @@import { type WorkflowActionType } from '@/workflow/types/Workflow';import { assertUnreachable } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const getActionIconColorOrThrow = (actionType: WorkflowActionType,diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/CronExpressionHelper.tsx b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/CronExpressionHelper.tsxindex 7918354d0e5..e60b0cffa06 100644--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/CronExpressionHelper.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/CronExpressionHelper.tsx@@ -9,7 +9,7 @@ import { getTriggerScheduleDescription } from '@/workflow/workflow-trigger/utilsimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { CronExpressionParser } from 'cron-parser';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { dateLocaleState } from '~/localization/states/dateLocaleState';import { formatDateTimeString } from '~/utils/string/formatDateTimeString';diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerDatabaseEventForm.tsx b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerDatabaseEventForm.tsxindex 29d6586570a..212bb443ec9 100644--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerDatabaseEventForm.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerDatabaseEventForm.tsx@@ -28,7 +28,7 @@ import { useMemo, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLabel = styled.span`color: ${themeCssVariables.font.color.light};diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerManual.tsx b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerManual.tsxindex aa395ad1683..cb8bf9db66a 100644--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerManual.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerManual.tsx@@ -17,7 +17,7 @@ import { isDefined } from 'twenty-shared/utils';import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';import { useIcons } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type WorkflowEditTriggerManualProps = {trigger: WorkflowManualTrigger;diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsxindex f831514b580..718f8cc1f1d 100644--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerWebhookForm.tsx@@ -14,7 +14,7 @@ import { WEBHOOK_TRIGGER_HTTP_METHOD_OPTIONS } from '@/workflow/workflow-triggerimport { getWebhookTriggerDefaultSettings } from '@/workflow/workflow-trigger/utils/getWebhookTriggerDefaultSettings';import { isNonEmptyString } from '@sniptt/guards';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useContext, useState } from 'react';+import { useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { getOutputSchemaFromValue } from 'twenty-shared/logic-function';import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';@@ -24,7 +24,7 @@ import { IconCopy } from 'twenty-ui/icon';import { useDebouncedCallback } from 'use-debounce';import { REACT_APP_SERVER_BASE_URL } from '~/config';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type WorkflowEditTriggerWebhookFormProps = {trigger: WorkflowWebhookTrigger;@@ -50,7 +50,7 @@ export const WorkflowEditTriggerWebhookForm = ({trigger,triggerOptions,}: WorkflowEditTriggerWebhookFormProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { copyToClipboard } = useCopyToClipboard();const [errorMessages, setErrorMessages] = useState<FormErrorMessages>({});const [errorMessagesVisible, setErrorMessagesVisible] = useState(false);diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/__tests__/getTriggerIconColor.test.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/__tests__/getTriggerIconColor.test.tsindex aaa56f00032..e7c3f9327f2 100644--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/__tests__/getTriggerIconColor.test.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/__tests__/getTriggerIconColor.test.ts@@ -1,5 +1,5 @@import { getTriggerIconColor } from '@/workflow/workflow-trigger/utils/getTriggerIconColor';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';describe('getTriggerIconColor', () => {it('returns the blue9 css variable for DATABASE_EVENT', () => {diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerIconColor.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerIconColor.tsindex 89cdf06c811..ba5af99a542 100644--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerIconColor.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerIconColor.ts@@ -1,5 +1,5 @@import { type WorkflowTriggerType } from '@/workflow/types/Workflow';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export const getTriggerIconColor = (triggerType: WorkflowTriggerType,diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowTextEditorTextChip.tsx b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowTextEditorTextChip.tsxindex 65e36e62df4..e155934af29 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowTextEditorTextChip.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowTextEditorTextChip.tsx@@ -1,7 +1,7 @@import { BaseChip } from '@/ui/input/components/BaseChip';import { styled } from '@linaria/react';import { NodeViewWrapper, type NodeViewProps } from '@tiptap/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledWrapper = styled.span`display: inline-block;diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowTextEditorVariableChip.tsx b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowTextEditorVariableChip.tsxindex bee8d533f25..26c67e89a07 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowTextEditorVariableChip.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowTextEditorVariableChip.tsx@@ -1,7 +1,7 @@import { VariableChip } from '@/object-record/record-field/ui/form-types/components/VariableChip';import { styled } from '@linaria/react';import { NodeViewWrapper, type NodeViewProps } from '@tiptap/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledWrapper = styled.span`display: inline-block;diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablePicker.tsx b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablePicker.tsxindex d408410aa00..14b14bb2f37 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablePicker.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablePicker.tsx@@ -4,7 +4,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport { WorkflowVariablesDropdown } from '@/workflow/workflow-variables/components/WorkflowVariablesDropdown';import { SEARCH_VARIABLES_DROPDOWN_ID } from '@/workflow/workflow-variables/constants/SearchVariablesDropdownId';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledSearchVariablesDropdownContainer = styled.div<{isReadonly?: boolean;diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdown.tsx b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdown.tsxindex 175a3e6ad9f..f08061f9b71 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdown.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablesDropdown.tsx@@ -11,11 +11,11 @@ import { type StepOutputSchemaV2 } from '@/workflow/workflow-variables/types/Steimport { type WorkflowVariableStepSelection } from '@/workflow/workflow-variables/types/WorkflowVariableSelection';import { t } from '@lingui/core/macro';import { styled } from '@linaria/react';-import { useContext, useState } from 'react';+import { useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconVariablePlus } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledDropdownVariableButtonContainer = styled.div<{disabled?: boolean;@@ -51,7 +51,7 @@ export const WorkflowVariablesDropdown = ({shouldDisplayRecordObjects: boolean;objectNameSingularsToSelect?: string[];}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const dropdownId = `${SEARCH_VARIABLES_DROPDOWN_ID}-${instanceId}`;const { closeDropdown } = useCloseDropdown();const availableVariablesInWorkflowStep = useAvailableVariablesInWorkflowStep({diff --git a/packages/twenty-front/src/modules/workspace-member/components/WorkspaceMemberAvatarStack.tsx b/packages/twenty-front/src/modules/workspace-member/components/WorkspaceMemberAvatarStack.tsxindex 89a05e9d5a5..cddce476d64 100644--- a/packages/twenty-front/src/modules/workspace-member/components/WorkspaceMemberAvatarStack.tsx+++ b/packages/twenty-front/src/modules/workspace-member/components/WorkspaceMemberAvatarStack.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { AvatarGroup } from 'twenty-ui/components';import { Avatar } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';diff --git a/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteLink.tsx b/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteLink.tsxindex 18b8b00bd3a..983c2738883 100644--- a/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteLink.tsx+++ b/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteLink.tsx@@ -4,7 +4,7 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { useLingui } from '@lingui/react/macro';import { IconLink } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx b/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsxindex 4af9159b03f..bafdfce2c1a 100644--- a/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx+++ b/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx@@ -22,7 +22,7 @@ import {type IconComponent,} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/pages/ai-chat/AiChatPage.tsx b/packages/twenty-front/src/pages/ai-chat/AiChatPage.tsxindex 7feee068bf1..b08e6460810 100644--- a/packages/twenty-front/src/pages/ai-chat/AiChatPage.tsx+++ b/packages/twenty-front/src/pages/ai-chat/AiChatPage.tsx@@ -1,5 +1,5 @@import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiChatPageCloseAskAiPanelEffect } from '@/ai/components/AiChatPageCloseAskAiPanelEffect';import { AiChatPageContinueInSidePanelEffect } from '@/ai/components/AiChatPageContinueInSidePanelEffect';diff --git a/packages/twenty-front/src/pages/auth/Authorize.tsx b/packages/twenty-front/src/pages/auth/Authorize.tsxindex da406c81a40..49236676ba5 100644--- a/packages/twenty-front/src/pages/auth/Authorize.tsx+++ b/packages/twenty-front/src/pages/auth/Authorize.tsx@@ -1,6 +1,6 @@import { StyledAuthContent } from '@/auth/components/StyledAuthContent';import { styled } from '@linaria/react';-import { useContext, useEffect, useState } from 'react';+import { useEffect, useState } from 'react';import { useSearchParams } from 'react-router-dom';import { Key } from 'ts-key-enum';import { AppPath } from 'twenty-shared/types';@@ -18,7 +18,11 @@ import {IconUserCircle,} from 'twenty-ui/icon';import { Heading } from 'twenty-ui/primitives/typography';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import {+ useTheme,+ useThemeColorScheme,+ themeCssVariables,+} from 'twenty-ui/theme';import {AuthorizeAppDocument,FindApplicationRegistrationByClientIdDocument,@@ -135,7 +139,8 @@ const OAUTH_SCOPE_ICONS: { [scope: string]: IconComponent | undefined } = {export const Authorize = () => {const { t } = useLingui();- const { theme, colorScheme } = useContext(ThemeContext);+ const theme = useTheme();+ const colorScheme = useThemeColorScheme();const navigate = useNavigateApp();const [searchParam] = useSearchParams();const { redirect } = useRedirect();diff --git a/packages/twenty-front/src/pages/auth/PasswordReset.tsx b/packages/twenty-front/src/pages/auth/PasswordReset.tsxindex 6faa54d6d8f..3835429811c 100644--- a/packages/twenty-front/src/pages/auth/PasswordReset.tsx+++ b/packages/twenty-front/src/pages/auth/PasswordReset.tsx@@ -25,13 +25,13 @@ import { msg } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import { isNonEmptyString } from '@sniptt/guards';import { motion } from 'framer-motion';-import { useContext, useEffect, useState } from 'react';+import { useEffect, useState } from 'react';import { Controller, useForm } from 'react-hook-form';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { useParams } from 'react-router-dom';import { AppPath } from 'twenty-shared/types';import { MainButton, useToast } from 'twenty-ui/components';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { z } from 'zod';import {UpdatePasswordViaResetTokenDocument,@@ -81,7 +81,7 @@ const StyledMainButtonContainer = styled.div``;export const PasswordReset = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { enqueueToast } = useToast();diff --git a/packages/twenty-front/src/pages/auth/SignInUp.tsx b/packages/twenty-front/src/pages/auth/SignInUp.tsxindex 2835057df58..26c4b15c2fb 100644--- a/packages/twenty-front/src/pages/auth/SignInUp.tsx+++ b/packages/twenty-front/src/pages/auth/SignInUp.tsx@@ -37,7 +37,7 @@ import { useLingui } from '@lingui/react/macro';import { useSearchParams } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { Loader } from 'twenty-ui/primitives/feedback';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledLoaderContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/pages/mobile-home/MobileHomePage.tsx b/packages/twenty-front/src/pages/mobile-home/MobileHomePage.tsxindex e72490924a1..d7dd3bdb08f 100644--- a/packages/twenty-front/src/pages/mobile-home/MobileHomePage.tsx+++ b/packages/twenty-front/src/pages/mobile-home/MobileHomePage.tsx@@ -8,7 +8,7 @@ import { NavigationDrawerScrollableContent } from '@/ui/navigation/navigation-drimport { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { styled } from '@linaria/react';import { Navigate } from 'react-router-dom';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { PermissionFlagType } from '~/generated-metadata/graphql';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/pages/not-found/NotFound.tsx b/packages/twenty-front/src/pages/not-found/NotFound.tsxindex bf63b7247a1..5ec0b739d53 100644--- a/packages/twenty-front/src/pages/not-found/NotFound.tsx+++ b/packages/twenty-front/src/pages/not-found/NotFound.tsx@@ -16,7 +16,7 @@ import { RootStackingContextZIndices } from '@/ui/layout/constants/RootStackingCimport { PageTitle } from '@/ui/utilities/page-title/components/PageTitle';import { styled } from '@linaria/react';import { MainButton } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledBackDrop = styled.div`align-items: center;diff --git a/packages/twenty-front/src/pages/onboarding/BookCall.tsx b/packages/twenty-front/src/pages/onboarding/BookCall.tsxindex 4027ae711c3..6b1f37aa949 100644--- a/packages/twenty-front/src/pages/onboarding/BookCall.tsx+++ b/packages/twenty-front/src/pages/onboarding/BookCall.tsx@@ -17,7 +17,7 @@ import { useLingui } from '@lingui/react/macro';import { AppPath } from 'twenty-shared/types';import { LightButton } from 'twenty-ui/components';import { IconChevronLeft } from 'twenty-ui/icon';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { OnboardingStatus } from '~/generated-metadata/graphql';const StyledPage = styled(StyledOnboardingStepPage)`diff --git a/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx b/packages/twenty-front/src/pages/onboarding/CreateProfile.tsxindex 52a53e068a5..29dbf0ebe70 100644--- a/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx+++ b/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx@@ -27,7 +27,7 @@ import { Controller, type SubmitHandler, useForm } from 'react-hook-form';import { Key } from 'ts-key-enum';import { isDefined } from 'twenty-shared/utils';import { MainButton, useToast } from 'twenty-ui/components';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { z } from 'zod';const StyledForm = styled.div`diff --git a/packages/twenty-front/src/pages/onboarding/ImportContacts.tsx b/packages/twenty-front/src/pages/onboarding/ImportContacts.tsxindex c88d4d6ea3e..7050f77ac52 100644--- a/packages/twenty-front/src/pages/onboarding/ImportContacts.tsx+++ b/packages/twenty-front/src/pages/onboarding/ImportContacts.tsx@@ -14,7 +14,7 @@ import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { MainButton } from 'twenty-ui/components';import { IconGoogle, IconMicrosoft } from 'twenty-ui/icon';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';const StyledOnboardingStep = styled(StyledOnboardingStepPage)`gap: ${themeCssVariables.spacing[8]};diff --git a/packages/twenty-front/src/pages/onboarding/InstallAppsContent.tsx b/packages/twenty-front/src/pages/onboarding/InstallAppsContent.tsxindex f46e2699645..48c1fb4bf82 100644--- a/packages/twenty-front/src/pages/onboarding/InstallAppsContent.tsx+++ b/packages/twenty-front/src/pages/onboarding/InstallAppsContent.tsx@@ -18,7 +18,7 @@ import {} from 'twenty-ui/components';import { IconCheck, IconPlus } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';-import { themeCssVariables, useTheme } from 'twenty-ui/theme-constants';+import { themeCssVariables, useTheme } from 'twenty-ui/theme';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';const StyledTitleRow = styled.div`diff --git a/packages/twenty-front/src/pages/onboarding/InviteTeam.tsx b/packages/twenty-front/src/pages/onboarding/InviteTeam.tsxindex 70869134352..6dde2e6d92b 100644--- a/packages/twenty-front/src/pages/onboarding/InviteTeam.tsx+++ b/packages/twenty-front/src/pages/onboarding/InviteTeam.tsx@@ -21,7 +21,7 @@ import { isDefined } from 'twenty-shared/utils';import { MainButton } from 'twenty-ui/components';import { IconX } from 'twenty-ui/icon';import { Loader } from 'twenty-ui/primitives/feedback';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledForm = styled.div`display: flex;diff --git a/packages/twenty-front/src/pages/onboarding/PaymentSuccess.tsx b/packages/twenty-front/src/pages/onboarding/PaymentSuccess.tsxindex 28362a693e2..228fedfc29c 100644--- a/packages/twenty-front/src/pages/onboarding/PaymentSuccess.tsx+++ b/packages/twenty-front/src/pages/onboarding/PaymentSuccess.tsx@@ -10,7 +10,7 @@ import { AnimatePresence, motion } from 'framer-motion';import { useEffect, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { MainButton, useToast } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const SUBSCRIPTION_CONFIRMATION_POLL_INTERVAL_MS = 2000;const SUBSCRIPTION_CONFIRMATION_MAX_ATTEMPTS = 30;diff --git a/packages/twenty-front/src/pages/onboarding/UpgradeFreeTrial.tsx b/packages/twenty-front/src/pages/onboarding/UpgradeFreeTrial.tsxindex 3ed8790d7d7..5f92629991c 100644--- a/packages/twenty-front/src/pages/onboarding/UpgradeFreeTrial.tsx+++ b/packages/twenty-front/src/pages/onboarding/UpgradeFreeTrial.tsx@@ -31,7 +31,7 @@ import { Info, MainButton } from 'twenty-ui/components';import { Loader } from 'twenty-ui/primitives/feedback';import { RadioGroup } from 'twenty-ui/primitives/input';import { CAL_LINK, ClickToActionLink } from 'twenty-ui/primitives/navigation';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import {type Billing,type BillingPlanKey,diff --git a/packages/twenty-front/src/pages/onboarding/WorkspaceActivation.tsx b/packages/twenty-front/src/pages/onboarding/WorkspaceActivation.tsxindex b3fa0471105..c01d8cabaaa 100644--- a/packages/twenty-front/src/pages/onboarding/WorkspaceActivation.tsx+++ b/packages/twenty-front/src/pages/onboarding/WorkspaceActivation.tsx@@ -18,7 +18,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { useCallback, useEffect, useRef } from 'react';import { isDefined } from 'twenty-shared/utils';import { MainButton, useToast } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ActivateWorkspaceDocument } from '~/generated-metadata/graphql';import { getToastOptionsFromError } from '@/error-handler/utils/getToastOptionsFromError';diff --git a/packages/twenty-front/src/pages/page-layout/StandalonePageHeader.tsx b/packages/twenty-front/src/pages/page-layout/StandalonePageHeader.tsxindex 48108bc5915..a72c2f596d9 100644--- a/packages/twenty-front/src/pages/page-layout/StandalonePageHeader.tsx+++ b/packages/twenty-front/src/pages/page-layout/StandalonePageHeader.tsx@@ -4,10 +4,9 @@ import { navigationMenuItemsSelector } from '@/navigation-menu-item/common/stateimport { SidePanelToggleButton } from '@/side-panel/components/SidePanelToggleButton';import { PageCardHeader } from '@/ui/layout/page/components/PageCardHeader';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';type StandalonePageHeaderProps = {pageLayoutId: string;@@ -17,7 +16,7 @@ export const StandalonePageHeader = ({pageLayoutId,}: StandalonePageHeaderProps) => {const { getIcon } = useIcons();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const navigationMenuItems = useAtomStateValue(navigationMenuItemsSelector);const isLayoutCustomizationModeEnabled = useAtomStateValue(isLayoutCustomizationModeEnabledState,diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationClaims.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationClaims.tsxindex c024f97dcb5..55a6652ad64 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationClaims.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationClaims.tsx@@ -1,5 +1,5 @@import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useApolloAdminClient } from '@/settings/admin-panel/apollo/hooks/useApolloAdminClient';import { Table } from '@/ui/layout/table/components/Table';import { TableBody } from '@/ui/layout/table/components/TableBody';diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDangerZone.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDangerZone.tsxindex e0a01981968..84eab175218 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDangerZone.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationDangerZone.tsx@@ -14,7 +14,7 @@ import { Section, useToast } from 'twenty-ui/components';import { IconShare, IconTrash, IconUserPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';import { Dialog, Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {type ApplicationRegistration,ClaimApplicationRegistrationOwnershipDocument,diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationGeneralSwitches.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationGeneralSwitches.tsxindex 9b25e83587e..ca390f47662 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationGeneralSwitches.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminApplicationRegistrationGeneralSwitches.tsx@@ -5,7 +5,7 @@ import { IconArrowBarToDown, IconPinned, IconShield } from 'twenty-ui/icon';import { type ApplicationRegistration } from '~/generated-metadata/graphql';import { UpdateAdminApplicationRegistrationDocument } from '~/generated-admin/graphql';import { styled } from '@linaria/react';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useMutation } from '@apollo/client/react';import { useLingui } from '@lingui/react/macro';import { useApolloAdminClient } from '@/settings/admin-panel/apollo/hooks/useApolloAdminClient';diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminChats.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminChats.tsxindex 6decdd106f4..cd815cfb0d3 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminChats.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminChats.tsx@@ -7,7 +7,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { SearchInput, Section } from 'twenty-ui/components';import { IconDotsVertical } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AI_ADMIN_PATH } from '@/settings/admin-panel/ai/constants/AiAdminPath';import { SettingsAdminChatsContent } from '@/settings/admin-panel/chats/components/SettingsAdminChatsContent';diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsxindex 3d1d6279ed4..d46d9c7764f 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx@@ -12,7 +12,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { Heading } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useQuery } from '@apollo/client/react';import {AdminPanelHealthServiceStatus,diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminInferredVersion.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminInferredVersion.tsxindex bba17aaeb62..b7d10548468 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminInferredVersion.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminInferredVersion.tsx@@ -10,7 +10,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconId } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {GetInstanceAndAllWorkspacesUpgradeStatusDocument,RefreshUpgradeStatusDocument,diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminInstanceStatus.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminInstanceStatus.tsxindex c9f8569be51..ae585949468 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminInstanceStatus.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminInstanceStatus.tsx@@ -21,7 +21,7 @@ import {} from 'twenty-ui/icon';import { Status } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {GetInstanceAndAllWorkspacesUpgradeStatusDocument,RefreshUpgradeStatusDocument,diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiModel.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiModel.tsxindex afef5526590..2f6fdb7061a 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiModel.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiModel.tsx@@ -22,7 +22,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Info, Section, useToast } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';import { Checkbox, Switch } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { OrganizationAdornment } from '~/pages/settings/enterprise/components/OrganizationAdornment';const StyledComboInputContainer = styled.div`diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminUserDetail.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminUserDetail.tsxindex 3c1deea35b4..c9edf8070d0 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminUserDetail.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminUserDetail.tsx@@ -40,7 +40,7 @@ import {} from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { REACT_APP_SERVER_BASE_URL } from '~/config';import {type UserLookupAdminPanelQuery,diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspaceDetail.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspaceDetail.tsxindex 427e661b98f..4329a9ab821 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspaceDetail.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspaceDetail.tsx@@ -55,7 +55,7 @@ import {Text,OverflowingTextWithTooltip,} from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {GetUpgradeStatusDocument,UpdateWorkspaceFeatureFlagDocument,diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspacesStatus.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspacesStatus.tsxindex f7816385553..632abd34db4 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspacesStatus.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminWorkspacesStatus.tsx@@ -10,7 +10,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {GetInstanceAndAllWorkspacesUpgradeStatusDocument,RefreshUpgradeStatusDocument,diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsAgentForm.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsAgentForm.tsxindex 3e5763000bf..de1e79f06ce 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsAgentForm.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsAgentForm.tsx@@ -1,11 +1,10 @@import { useQuery } from '@apollo/client/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { useParams } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';@@ -16,7 +15,7 @@ import { useNavigateToNotFoundOnLoadFailure } from '~/pages/settings/ai/hooks/usimport { getSettingsAiBreadcrumbLinks } from '~/pages/settings/ai/utils/getSettingsAiBreadcrumbLinks';export const SettingsAgentForm = ({ mode }: { mode: 'create' | 'edit' }) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const { agentId = '' } = useParams<{ agentId: string }>();diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsAgentTurnDetail.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsAgentTurnDetail.tsxindex c591df80249..449549f7dc0 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsAgentTurnDetail.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsAgentTurnDetail.tsx@@ -16,7 +16,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { Status } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {type AgentMessage,GetAgentTurnsDocument,diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsAiPrompts.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsAiPrompts.tsxindex ad94fabdd17..8d08c7b4f90 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsAiPrompts.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsAiPrompts.tsx@@ -15,7 +15,7 @@ import {isDefined,} from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { GetAiSystemPromptPreviewDocument } from '~/generated-metadata/graphql';import { formatNumber } from '~/utils/format/formatNumber';diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsSkillForm.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsSkillForm.tsxindex 15e0721156c..dcc2052b878 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsSkillForm.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsSkillForm.tsx@@ -1,12 +1,11 @@import { useQuery } from '@apollo/client/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import Skeleton from 'react-loading-skeleton';import { useParams } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';@@ -16,7 +15,7 @@ import { useNavigateToNotFoundOnLoadFailure } from '~/pages/settings/ai/hooks/usimport { getSettingsAiBreadcrumbLinks } from '~/pages/settings/ai/utils/getSettingsAiBreadcrumbLinks';export const SettingsSkillForm = ({ mode }: { mode: 'create' | 'edit' }) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const { skillId = '' } = useParams<{ skillId: string }>();diff --git a/packages/twenty-front/src/pages/settings/ai/SettingsToolDetail.tsx b/packages/twenty-front/src/pages/settings/ai/SettingsToolDetail.tsxindex ac176b9285c..0f1f2cb3a26 100644--- a/packages/twenty-front/src/pages/settings/ai/SettingsToolDetail.tsx+++ b/packages/twenty-front/src/pages/settings/ai/SettingsToolDetail.tsx@@ -10,7 +10,7 @@ import { useDialog } from '@/ui/layout/dialog/hooks/useDialog';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useQuery } from '@apollo/client/react';import { t } from '@lingui/core/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { useNavigate, useParams } from 'react-router-dom';import { SettingsPath } from 'twenty-shared/types';@@ -18,7 +18,7 @@ import { getSettingsPath, isDefined, isValidUuid } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';import {GetToolIndexDocument,@@ -31,7 +31,7 @@ const DELETE_TOOL_MODAL_ID = 'delete-tool-modal';export const SettingsToolDetail = () => {const { toolIdentifier } = useParams();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const navigate = useNavigate();const { enqueueToast } = useToast();const { updateLogicFunction, deleteLogicFunction } =diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentDetailSkeletonLoader.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentDetailSkeletonLoader.tsxindex 5b55fae94fb..3cd06096965 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentDetailSkeletonLoader.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentDetailSkeletonLoader.tsx@@ -1,9 +1,8 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledSkeletonContainer = styled.div`display: flex;@@ -32,7 +31,7 @@ const StyledNameContainer = styled.div``;export const SettingsAgentDetailSkeletonLoader = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentEvalsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentEvalsTab.tsxindex 6a70e666d40..b0b4a3cc3a4 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentEvalsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentEvalsTab.tsx@@ -27,7 +27,7 @@ import {IconTrash,} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SETTINGS_AGENT_DETAIL_TABS } from '~/pages/settings/ai/constants/SettingsAgentDetailTabs';import { getOperationName } from '~/utils/getOperationName';diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentFormContent.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentFormContent.tsxindex 8d571183c7b..fe74cf40479 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentFormContent.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentFormContent.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';@@ -11,7 +11,7 @@ import {IconTerminal,useIcons,} from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SaveAndCancelButtons } from '@/settings/components/SaveAndCancelButtons/SaveAndCancelButtons';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';@@ -56,7 +56,7 @@ type SettingsAgentFormContentProps = {export const SettingsAgentFormContent = ({agent,}: SettingsAgentFormContentProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const navigate = useNavigateSettings();const currentWorkspace = useAtomStateValue(currentWorkspaceState);diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentLogsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentLogsTab.tsxindex 6dd4f46a69a..158083eb5b3 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentLogsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentLogsTab.tsx@@ -17,7 +17,7 @@ import { Status } from 'twenty-ui/primitives/data-display';import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink/UndecoratedLink';import { LightIconButton, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {EvaluateAgentTurnDocument,GetAgentTurnsDocument,diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentResponseFormat.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentResponseFormat.tsxindex acdf5aa1d2d..8cc50bc38d2 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentResponseFormat.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentResponseFormat.tsx@@ -7,7 +7,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useState } from 'react';import { type AgentResponseSchema } from 'twenty-shared/ai';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentRoleTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentRoleTab.tsxindex 1d8b0b2d50e..dbdebe5b4fa 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentRoleTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentRoleTab.tsx@@ -13,7 +13,7 @@ import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useMutation, useQuery } from '@apollo/client/react';import {AssignRoleToAgentDocument,diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSettingsTab.tsxindex 76eb4040307..19d9860a16b 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx@@ -12,7 +12,7 @@ import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type Agent } from '~/generated-metadata/graphql';import { SettingsAgentDeleteConfirmationModal } from '~/pages/settings/ai/components/SettingsAgentDeleteConfirmationModal';import { SettingsAgentResponseFormat } from '~/pages/settings/ai/components/SettingsAgentResponseFormat';diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsxindex 5f2b0cbcdab..7a6717de85d 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx@@ -18,7 +18,7 @@ import {useToast,} from 'twenty-ui/components';import { IconArchive, IconSettings } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {ActivateSkillDocument,DeleteSkillDocument,diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTable.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTable.tsxindex 01e0a814f2c..c72f6dc8022 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTable.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTable.tsx@@ -1,6 +1,5 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import Skeleton from 'react-loading-skeleton';import { SortableTableHeader } from '@/ui/layout/table/components/SortableTableHeader';@@ -10,7 +9,7 @@ import { TableRow } from '@/ui/layout/table/components/TableRow';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconChevronRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SettingsSkillInactiveMenuDropDown } from '~/pages/settings/ai/components/SettingsSkillInactiveMenuDropDown';import { SETTINGS_SKILL_TABLE_METADATA } from '~/pages/settings/ai/constants/SettingsSkillTableMetadata';@@ -34,7 +33,7 @@ export const SettingsAgentSkillsTable = ({onActivate,onDelete,}: SettingsAgentSkillsTableProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const showSkeleton = loading && skills.length === 0;diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTab.tsxindex 493d93f2e3d..00130910dc0 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTab.tsx@@ -7,7 +7,7 @@ import { type ReactNode, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { SearchInput, Section, SettingsRow } from 'twenty-ui/components';import { IconLock, IconPuzzle, IconTool } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { SettingsAgentToolsTable } from '~/pages/settings/ai/components/SettingsAgentToolsTable';import { useSettingsAgentToolsTable } from '~/pages/settings/ai/hooks/useSettingsAgentToolsTable';import { type SettingsAgentToolItem } from '~/pages/settings/ai/types/SettingsAgentToolItem';diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTable.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTable.tsxindex 9c031254d89..2feb7db9b76 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTable.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTable.tsx@@ -1,4 +1,3 @@-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { type CurrentWorkspace } from '@/auth/states/currentWorkspaceState';@@ -9,7 +8,7 @@ import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { IconChevronRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { SettingsToolIcon } from '~/pages/settings/ai/components/SettingsToolIcon';import {SettingsToolTableRow,@@ -43,7 +42,7 @@ export const SettingsAgentToolsTable = ({marketplaceAppByUniversalIdentifier,currentWorkspace,}: SettingsAgentToolsTableProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();return (diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelTiersPreview.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelTiersPreview.tsxindex dbc1a07705a..83dc733b7f9 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelTiersPreview.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelTiersPreview.tsx@@ -3,7 +3,7 @@ import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiModelTierIndicator } from '@/ai/components/AiModelTierIndicator';import { useAiModelTiers } from '@/ai/hooks/useAiModelTiers';diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsxindex 52dcabb3b83..8150e51fe11 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiModelsTab.tsx@@ -3,7 +3,7 @@ import { AI_MODEL_TIERS, type AiModelTier } from 'twenty-shared/ai';import { Section } from 'twenty-ui/components';import { IconMessage, IconRobot, IconWand } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { AiModelTierIndicator } from '@/ai/components/AiModelTierIndicator';import { useAiModelTiers } from '@/ai/hooks/useAiModelTiers';diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiOverviewTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiOverviewTab.tsxindex 3b0ffa2f15a..45378485be6 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiOverviewTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiOverviewTab.tsx@@ -10,12 +10,12 @@ import { CombinedGraphQLErrors } from '@apollo/client';import { useMutation, useQuery } from '@apollo/client/react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { Fragment, useContext, useState } from 'react';+import { Fragment, useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconBook, IconMessage, IconSparkles, IconTool } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useDebouncedCallback } from 'use-debounce';import {FindWorkspaceAiStatsDocument,@@ -31,7 +31,7 @@ const StyledInstructionsContainer = styled.div`const MCP_DEEP_LINK = `${getSettingsPath(SettingsPath.ApiWebhooks)}#mcp`;export const SettingsAiOverviewTab = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { enqueueToast } = useToast();const [currentWorkspace, setCurrentWorkspace] = useAtomState(currentWorkspaceState,diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiSystemPromptsSection.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiSystemPromptsSection.tsxindex ab0cb660423..f1d9bce77de 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAiSystemPromptsSection.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAiSystemPromptsSection.tsx@@ -2,17 +2,16 @@ import { SettingsCard } from '@/settings/components/SettingsCard';import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink/UndecoratedLink';import { useQuery } from '@apollo/client/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconPrompt } from 'twenty-ui/icon';-import { ThemeContext } from 'twenty-ui/theme-constants';+import { useTheme } from 'twenty-ui/theme';import { GetAiSystemPromptPreviewDocument } from '~/generated-metadata/graphql';import { formatNumber } from '~/utils/format/formatNumber';export const SettingsAiSystemPromptsSection = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { data: previewData } = useQuery(GetAiSystemPromptPreviewDocument);const systemPromptTokenCount =diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillDangerZone.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillDangerZone.tsxindex 583e2399283..2539f39e4b8 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillDangerZone.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillDangerZone.tsx@@ -6,7 +6,7 @@ import { SettingsPath } from 'twenty-shared/types';import { Section, useToast } from 'twenty-ui/components';import { IconArchive, IconArchiveOff, IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getToastOptionsFromError } from '@/error-handler/utils/getToastOptionsFromError';import { ConfirmationDialog } from '@/ui/layout/dialog/components/ConfirmationDialog';diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillFormContent.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillFormContent.tsxindex ccc07f08514..0487e5c3fde 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillFormContent.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillFormContent.tsx@@ -1,12 +1,12 @@import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { IconInfoCircle, IconRefresh, useIcons } from 'twenty-ui/icon';import { Tooltip, Card } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { FormAdvancedTextFieldInput } from '@/advanced-text-editor/components/FormAdvancedTextFieldInput';import { AI_INSTRUCTIONS_EDITOR_PROFILE } from '@/ai/constants/AiInstructionsEditorProfile';@@ -63,7 +63,7 @@ type SettingsSkillFormContentProps = {export const SettingsSkillFormContent = ({skill,}: SettingsSkillFormContentProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const navigate = useNavigateSettings();diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillTableRow.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillTableRow.tsxindex adabc9c0099..8d97311a53d 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillTableRow.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsSkillTableRow.tsx@@ -1,12 +1,12 @@import { styled } from '@linaria/react';-import { type ReactNode, useContext } from 'react';+import { type ReactNode } from 'react';import { SettingsItemTypeTag } from '@/settings/components/SettingsItemTypeTag';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { useIcons } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type Skill } from '~/generated-metadata/graphql';@@ -27,7 +27,7 @@ export const SettingsSkillTableRow = ({action,link,}: SettingsSkillTableRowProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const Icon = getIcon(skill.icon ?? 'IconBook');diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsToolIcon.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsToolIcon.tsxindex 1acbc2863ff..7e1393cbedb 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsToolIcon.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsToolIcon.tsx@@ -1,5 +1,4 @@import { styled } from '@linaria/react';-import { useContext } from 'react';import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';import { getObjectColorWithFallback } from '@/object-metadata/utils/getObjectColorWithFallback';@@ -15,7 +14,7 @@ import {type IconComponent,} from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type SettingsAgentToolApplication } from '~/pages/settings/ai/types/SettingsAgentToolApplication';import { type SettingsAgentToolMarketplaceApp } from '~/pages/settings/ai/types/SettingsAgentToolMarketplaceApp';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';@@ -91,7 +90,7 @@ export const SettingsToolIcon = ({marketplaceApp,}: SettingsToolIconProps) => {const { getIcon } = useIcons();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { objectMetadataItems } = useObjectMetadataItems();if (isDefined(application) && isDefined(marketplaceApp?.logoUrl)) {diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsToolParameterTable.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsToolParameterTable.tsxindex 28f5046a607..c516ebb8d10 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsToolParameterTable.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsToolParameterTable.tsx@@ -3,7 +3,7 @@ import { NavigationButton } from '@/ui/input/components/NavigationButton';import { SettingsEmptyPlaceholder } from '@/settings/components/SettingsEmptyPlaceholder';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { type ComponentType, useContext } from 'react';+import { type ComponentType } from 'react';import { isDefined } from 'twenty-shared/utils';import { Table } from '@/ui/layout/table/components/Table';@@ -24,7 +24,7 @@ import {IllustrationIconToggle,} from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';type SchemaProperty = {type?: string;@@ -95,7 +95,7 @@ export const SettingsToolParameterTable = ({requiredFields,functionLink,}: SettingsToolParameterTableProps) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const entries = Object.entries(schemaProperties);if (entries.length === 0 && !functionLink) {diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsToolTableRow.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsToolTableRow.tsxindex d3395a36a87..1d51420c0cb 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsToolTableRow.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsToolTableRow.tsx@@ -6,7 +6,7 @@ import { StyledNameTableCell } from '@/settings/data-model/object-details/componimport { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type SettingsToolTableRowProps = {leftIcon: ReactNode;diff --git a/packages/twenty-front/src/pages/settings/api-webhooks/SettingsApiWebhooks.tsx b/packages/twenty-front/src/pages/settings/api-webhooks/SettingsApiWebhooks.tsxindex fa57399a00f..a1c66e13a51 100644--- a/packages/twenty-front/src/pages/settings/api-webhooks/SettingsApiWebhooks.tsx+++ b/packages/twenty-front/src/pages/settings/api-webhooks/SettingsApiWebhooks.tsx@@ -26,7 +26,7 @@ import {IconSparkles,IconWebhook,} from 'twenty-ui/icon';-import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';import { SETTINGS_API_WEBHOOKS_TABS } from '~/pages/settings/api-webhooks/constants/SettingsApiWebhooksTabs';type TabKey =diff --git a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationConnectionDetail.tsx b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationConnectionDetail.tsxindex 23e492a464a..8edfaa3fb85 100644--- a/packages/twenty-front/src/pages/settings/applications/SettingsApplicationConnectionDetail.tsx+++ b/packages/twenty-front/src/pages/settings/applications/SettingsApplicationConnectionDetail.tsx@@ -10,7 +10,7 @@ import { Section } from 'twenty-ui/components';import { Status, Tag } from 'twenty-ui/primitives/data-display';import { IconRefresh, IconTrash, IconUsers } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { GET_MY_CONNECTED_ACCOUNTS } from '@/settings/accounts/graphql/queries/getMyConnectedAccounts';import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationContentSubtable.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationContentSubtable.tsxindex af647f21777..9b3da317b1c 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationContentSubtable.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationContentSubtable.tsx@@ -6,11 +6,10 @@ import {import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { TableSection } from '@/ui/layout/table/components/TableSection';-import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronRight, useIcons } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';export type ApplicationContentRow = {key: string;@@ -37,7 +36,7 @@ export const SettingsApplicationContentSubtable = ({name?: string | null;};}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();if (rows.length === 0) {diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationGeneralInfo.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationGeneralInfo.tsxindex 73a30fffa51..a3d7d787ba5 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationGeneralInfo.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationGeneralInfo.tsx@@ -19,7 +19,7 @@ import {IconWorld,} from 'twenty-ui/icon';import { Chip, Tag } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {type ApplicationRegistration,ApplicationRegistrationSourceType,diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationInstalledWorkspaces.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationInstalledWorkspaces.tsxindex 8c9368a7278..472320a0cab 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationInstalledWorkspaces.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationInstalledWorkspaces.tsx@@ -8,7 +8,7 @@ import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconChevronDown, IconDotsVertical } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useDebounce } from 'use-debounce';import { useApolloAdminClient } from '@/settings/admin-panel/apollo/hooks/useApolloAdminClient';diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationRedirectURIsInput.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationRedirectURIsInput.tsxindex c4f08aeb765..379974fc56f 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationRedirectURIsInput.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationRedirectURIsInput.tsx@@ -7,7 +7,7 @@ import { z } from 'zod';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { useLingui } from '@lingui/react/macro';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationRedirectURIsTable.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationRedirectURIsTable.tsxindex 98bc9422aef..646ef44be5a 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationRedirectURIsTable.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationRedirectURIsTable.tsx@@ -8,7 +8,7 @@ import { t } from '@lingui/core/macro';import { IconButton } from 'twenty-ui/components';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { IconX } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsApplicationRegistrationRedirectURIsTableProps = {redirectUris: string[];diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationShareLinkButtons.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationShareLinkButtons.tsxindex 1046a23316d..d6d99d5f416 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationShareLinkButtons.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationRegistrationShareLinkButtons.tsx@@ -14,7 +14,7 @@ import {IconInfoCircle,} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { FindMarketplaceAppDetailDocument } from '~/generated-metadata/graphql';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationTableRow.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationTableRow.tsxindex b783a11e205..c5435f0f85f 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationTableRow.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationTableRow.tsx@@ -9,7 +9,7 @@ import { TableRow } from '@/ui/layout/table/components/TableRow';import { t } from '@lingui/core/macro';import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';import { Tag } from 'twenty-ui/primitives/data-display';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { ApplicationRegistrationSourceType } from '~/generated-metadata/graphql';import { getApplicationDescriptionSummary } from '~/pages/settings/applications/utils/getApplicationDescriptionSummary';diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationVariableLabelRow.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationVariableLabelRow.tsxindex b7a21f4c521..23148f630b0 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationVariableLabelRow.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationVariableLabelRow.tsx@@ -2,11 +2,10 @@ import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isNonEmptyString } from '@sniptt/guards';-import { useContext } from 'react';import { IconInfoCircle } from 'twenty-ui/icon';import { Pill } from 'twenty-ui/primitives/data-display';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledLabelRow = styled.div`align-items: center;@@ -35,7 +34,7 @@ export const SettingsApplicationVariableLabelRow = ({tooltipId: string;}) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();return (<StyledLabelRow>diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsTable.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsTable.tsxindex ba187df395f..9b3ab867416 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsTable.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsApplicationsTable.tsx@@ -3,12 +3,12 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { SearchInput, Section } from 'twenty-ui/components';import { IconChevronRight } from 'twenty-ui/icon';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { ApplicationRegistrationSourceType } from '~/generated-metadata/graphql';import {APPLICATION_TABLE_ROW_GRID_TEMPLATE_COLUMNS,@@ -32,7 +32,7 @@ export const SettingsApplicationsTable = ({}: {applications: ApplicationWithoutRelation[];}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const [searchTerm, setSearchTerm] = useState('');diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsAvailableApplicationCard.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsAvailableApplicationCard.tsxindex 4ab696c81a9..6c23609eb74 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsAvailableApplicationCard.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsAvailableApplicationCard.tsx@@ -10,7 +10,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Avatar } from 'twenty-ui/primitives/data-display';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type MarketplaceApp } from '~/generated-metadata/graphql';import { getApplicationDescriptionSummary } from '~/pages/settings/applications/utils/getApplicationDescriptionSummary';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';diff --git a/packages/twenty-front/src/pages/settings/applications/components/SettingsClaimApplicationSection.tsx b/packages/twenty-front/src/pages/settings/applications/components/SettingsClaimApplicationSection.tsxindex 748380e4606..94a5792d936 100644--- a/packages/twenty-front/src/pages/settings/applications/components/SettingsClaimApplicationSection.tsx+++ b/packages/twenty-front/src/pages/settings/applications/components/SettingsClaimApplicationSection.tsx@@ -20,7 +20,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Callout, Section, useToast } from 'twenty-ui/components';import { IconBrandGithub, IconRefresh, IconSearch } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {FindClaimableApplicationRegistrationDocument,GithubClaimAuthorizationUrlDocument,diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationCommandMenuItemSettingsTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationCommandMenuItemSettingsTab.tsxindex d242e54dac4..f073601cbc1 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationCommandMenuItemSettingsTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationCommandMenuItemSettingsTab.tsx@@ -7,7 +7,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { type ReactNode } from 'react';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsApplicationCommandMenuItemSettingsTabProps = {label: string;diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationConnectionsSection.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationConnectionsSection.tsxindex 90b1d81241d..2a90c3f415d 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationConnectionsSection.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationConnectionsSection.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isNonEmptyString } from '@sniptt/guards';-import { useContext } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';@@ -13,7 +12,7 @@ import { Info, Section } from 'twenty-ui/components';import { IconChevronRight, IconPlus } from 'twenty-ui/icon';import { Avatar, Status } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useApplicationConnectedAccounts } from '~/pages/settings/applications/hooks/useApplicationConnectedAccounts';import { useFindApplicationConnectionProviders } from '~/pages/settings/applications/hooks/useFindApplicationConnectionProviders';import { useTriggerAppOAuth } from '~/pages/settings/applications/hooks/useTriggerAppOAuth';@@ -39,7 +38,7 @@ export const SettingsApplicationConnectionsSection = ({applicationId: string;}) => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { triggerAppOAuth } = useTriggerAppOAuth();const { connectionProviders, loading } =useFindApplicationConnectionProviders(applicationId);diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab.tsxindex 26f796b43d2..3e5e98a1787 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailAboutTab.tsx@@ -8,7 +8,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { getApplicationDescriptionSummary } from '~/pages/settings/applications/utils/getApplicationDescriptionSummary';type SettingsApplicationDetailAboutTabProps = {diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailVariablesTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailVariablesTab.tsxindex 68d75cc231c..089165c0204 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailVariablesTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailVariablesTab.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { type ApplicationVariableOption } from 'twenty-shared/application';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type ApplicationVariable } from '~/generated-metadata/graphql';import { SettingsApplicationVariableInput } from '~/pages/settings/applications/components/SettingsApplicationVariableInput';import { SettingsApplicationVariableLabelRow } from '~/pages/settings/applications/components/SettingsApplicationVariableLabelRow';diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFrontComponentPreviewTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFrontComponentPreviewTab.tsxindex 78c7a3c2ac5..ce8250cbfbb 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFrontComponentPreviewTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFrontComponentPreviewTab.tsx@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Suspense, lazy } from 'react';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { FrontComponentSkeletonLoader } from '@/front-components/components/FrontComponentSkeletonLoader';diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFrontComponentSettingsTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFrontComponentSettingsTab.tsxindex c91e063daef..01294e2b1c9 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFrontComponentSettingsTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFrontComponentSettingsTab.tsx@@ -7,7 +7,7 @@ import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { type ReactNode } from 'react';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type SettingsApplicationFrontComponentSettingsTabProps = {description?: string | null;diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFunctionDomainSection.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFunctionDomainSection.tsxindex 1c507d19180..f4fdddab3f0 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFunctionDomainSection.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationFunctionDomainSection.tsx@@ -6,7 +6,7 @@ import { useGetLogicFunctionHttpUrl } from '@/settings/logic-functions/hooks/useimport { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { Section } from 'twenty-ui/components';import { IconCopy } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledContent = styled.div`diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationConfigTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationConfigTab.tsxindex 6d601808e9a..d35f8100986 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationConfigTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationConfigTab.tsx@@ -10,7 +10,7 @@ import {} from '~/generated-admin/graphql';import { styled } from '@linaria/react';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';import { type ApplicationVariableOption } from 'twenty-shared/application';diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationOAuthTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationOAuthTab.tsxindex 16a2763526f..df96c118b1e 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationOAuthTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationOAuthTab.tsx@@ -11,7 +11,7 @@ import { useState } from 'react';import { Section, useToast } from 'twenty-ui/components';import { IconKey, IconRefresh, IconShield } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {RotateApplicationRegistrationClientSecretDocument,UpdateApplicationRegistrationDocument,diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationTimelineActivityTypeSettingsTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationTimelineActivityTypeSettingsTab.tsxindex 74fb17e0569..8c9dde17665 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationTimelineActivityTypeSettingsTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationTimelineActivityTypeSettingsTab.tsx@@ -11,7 +11,7 @@ import { Section } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';import { IconRestore, IconTimelineEvent } from 'twenty-ui/icon';import { Card } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type SettingsApplicationTimelineActivityType } from '~/pages/settings/applications/types/settingsApplicationTimelineActivityType';type SettingsApplicationTimelineActivityTypeSettingsTabProps = {diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsAvailableTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsAvailableTab.tsxindex 0899d1577dd..3d73007a2a4 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsAvailableTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsAvailableTab.tsx@@ -12,7 +12,7 @@ import {SettingsRow,} from 'twenty-ui/components';import { IconSparkles } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useMarketplaceApps } from '~/modules/marketplace/hooks/useMarketplaceApps';import { SettingsAvailableApplicationCard } from '~/pages/settings/applications/components/SettingsAvailableApplicationCard';diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab.tsxindex d21c02f4ef6..f7a257f9d2e 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationsDeveloperTab.tsx@@ -9,13 +9,13 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { useQuery } from '@apollo/client/react';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useContext, useState } from 'react';+import { useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { CommandBlock, SearchInput, Section } from 'twenty-ui/components';import { IconArrowUpRight, IconChevronRight, IconCopy } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import {type ApplicationRegistrationListItemFragment,FindManyApplicationRegistrationsDocument,@@ -45,7 +45,7 @@ const StyledTableRowsContainer = styled.div`export const SettingsApplicationsDeveloperTab = () => {const { t } = useLingui();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState);const { copyToClipboard } = useCopyToClipboard();diff --git a/packages/twenty-front/src/pages/settings/billing/SettingsUsageUserDetail.tsx b/packages/twenty-front/src/pages/settings/billing/SettingsUsageUserDetail.tsxindex 0d8929612ad..c5d5cf7f3cb 100644--- a/packages/twenty-front/src/pages/settings/billing/SettingsUsageUserDetail.tsx+++ b/packages/twenty-front/src/pages/settings/billing/SettingsUsageUserDetail.tsx@@ -10,14 +10,13 @@ import { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayimport { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';-import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { useParams } from 'react-router-dom';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { Avatar } from 'twenty-ui/primitives/data-display';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';const StyledUserHeader = styled.div`align-items: center;@@ -45,7 +44,7 @@ const StyledUserCredits = styled.span`export const SettingsUsageUserDetail = () => {const { t: tLingui } = useLingui();const { userWorkspaceId } = useParams<{ userWorkspaceId: string }>();- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { formatUsageValue } = useUsageValueFormatter();const { analytics, isInitialLoading } = useUsageAnalyticsData({diff --git a/packages/twenty-front/src/pages/settings/communications/SettingsWorkspaceCommunicationGroupChannelDetail.tsx b/packages/twenty-front/src/pages/settings/communications/SettingsWorkspaceCommunicationGroupChannelDetail.tsxindex d5b96819f42..583010c4328 100644--- a/packages/twenty-front/src/pages/settings/communications/SettingsWorkspaceCommunicationGroupChannelDetail.tsx+++ b/packages/twenty-front/src/pages/settings/communications/SettingsWorkspaceCommunicationGroupChannelDetail.tsx@@ -23,7 +23,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconCopy, IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { GetEmailingDomainsDocument } from '~/generated-metadata/graphql';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';import { useNavigateSettings } from '~/hooks/useNavigateSettings';diff --git a/packages/twenty-front/src/pages/settings/communications/SettingsWorkspaceCommunications.tsx b/packages/twenty-front/src/pages/settings/communications/SettingsWorkspaceCommunications.tsxindex a50e1766d72..3dfbd414008 100644--- a/packages/twenty-front/src/pages/settings/communications/SettingsWorkspaceCommunications.tsx+++ b/packages/twenty-front/src/pages/settings/communications/SettingsWorkspaceCommunications.tsx@@ -21,8 +21,7 @@ import {import coverDark from '~/pages/settings/communications/assets/cover-dark.png';import coverLight from '~/pages/settings/communications/assets/cover-light.png';import { SettingsCard } from '@/settings/components/SettingsCard';-import { useContext } from 'react';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const COMMUNICATIONS_TABS_INSTANCE_ID = 'settings-communications-tabs';@@ -34,7 +33,7 @@ const StyledCardsColumn = styled.div``;export const SettingsWorkspaceCommunications = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();diff --git a/packages/twenty-front/src/pages/settings/community/SettingsCommunity.tsx b/packages/twenty-front/src/pages/settings/community/SettingsCommunity.tsxindex d9dc6e55f0c..e8cdf5279bd 100644--- a/packages/twenty-front/src/pages/settings/community/SettingsCommunity.tsx+++ b/packages/twenty-front/src/pages/settings/community/SettingsCommunity.tsx@@ -5,7 +5,6 @@ import { SettingsLabContent } from '@/settings/lab/components/SettingsLabContentimport { SettingsPageLayout } from '@/settings/components/layout/SettingsPageLayout';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useContext } from 'react';import { Section } from 'twenty-ui/components';import {IconBrandX,@@ -16,11 +15,7 @@ import {} from 'twenty-ui/icon';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';-import {- MOBILE_VIEWPORT,- ThemeContext,- themeCssVariables,-} from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, useTheme, themeCssVariables } from 'twenty-ui/theme';import coverDark from '~/pages/settings/community/assets/cover-dark.png';import coverLight from '~/pages/settings/community/assets/cover-light.png';@@ -55,7 +50,7 @@ type SettingsCommunityLink = {};export const SettingsCommunity = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { getIcon } = useIcons();const IconBrandDiscord = getIcon('IconBrandDiscord');diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsxindex c56fa143ef1..dc062d1d668 100644--- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx@@ -38,7 +38,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconArchive, IconArchiveOff, IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { FieldMetadataType } from '~/generated-metadata/graphql';import { useNavigateApp } from '~/hooks/useNavigateApp';import { useNavigateSettings } from '~/hooks/useNavigateSettings';diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldTable.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldTable.tsxindex ba7e3a8080c..c8a7f3095ce 100644--- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldTable.tsx+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldTable.tsx@@ -28,7 +28,7 @@ import { useEffect, useMemo, useState } from 'react';import { FieldMetadataType } from 'twenty-shared/types';import { SearchInput, SettingsRow } from 'twenty-ui/components';import { IconArchive, IconCircleDashed, IconSettings } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useMapFieldMetadataItemToSettingsObjectDetailTableItem } from '~/pages/settings/data-model/hooks/useMapFieldMetadataItemToSettingsObjectDetailTableItem';import { type SettingsObjectDetailTableItem } from '~/pages/settings/data-model/types/SettingsObjectDetailTableItem';import { normalizeSearchText } from '~/utils/normalizeSearchText';diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectIndexTable.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectIndexTable.tsxindex 5c106b1a4c7..c8ef8edf923 100644--- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectIndexTable.tsx+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectIndexTable.tsx@@ -11,7 +11,7 @@ import { msg } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import { LightIconButton } from 'twenty-ui/components';import { IconSquareKey, IconTrash } from 'twenty-ui/icon';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type SettingsObjectIndexesTableItem } from '~/pages/settings/data-model/types/SettingsObjectIndexesTableItem';const OBJECT_INDEX_TABLE_GRID_TEMPLATE_COLUMNS = '1fr 70px 80px 32px';diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsxindex ded37333ffe..bb3a9827e68 100644--- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx@@ -27,16 +27,12 @@ import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/stimport { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type ReactNode, useContext, useMemo, useState } from 'react';+import { type ReactNode, useMemo, useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { SearchInput, SettingsRow } from 'twenty-ui/components';import { IconArchive, IconChevronRight, IconSettings } from 'twenty-ui/icon';-import {- MOBILE_VIEWPORT,- ThemeContext,- themeCssVariables,-} from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, useTheme, themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { GET_SETTINGS_OBJECT_TABLE_METADATA } from '~/pages/settings/data-model/constants/SettingsObjectTableMetadata';import type { SettingsObjectTableItem } from '~/pages/settings/data-model/types/SettingsObjectTableItem';@@ -70,7 +66,7 @@ export const SettingsObjectTable = ({objectMetadataItems: EnrichedObjectMetadataItem[];withSearchBar?: boolean;}) => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const getIsMetadataItemCustom = useGetIsMetadataItemCustom();const navigate = useNavigateSettings();diff --git a/packages/twenty-front/src/pages/settings/data-model/new-field/SettingsObjectNewFieldConfigure.tsx b/packages/twenty-front/src/pages/settings/data-model/new-field/SettingsObjectNewFieldConfigure.tsxindex 28156822d4a..884e4a9142c 100644--- a/packages/twenty-front/src/pages/settings/data-model/new-field/SettingsObjectNewFieldConfigure.tsx+++ b/packages/twenty-front/src/pages/settings/data-model/new-field/SettingsObjectNewFieldConfigure.tsx@@ -25,7 +25,7 @@ import {import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { type z } from 'zod';import { FieldMetadataType } from '~/generated-metadata/graphql';import { useNavigateApp } from '~/hooks/useNavigateApp';diff --git a/packages/twenty-front/src/pages/settings/data-model/new-field/SettingsObjectNewFieldSelect.tsx b/packages/twenty-front/src/pages/settings/data-model/new-field/SettingsObjectNewFieldSelect.tsxindex 505e3a97329..6c4bfa5c435 100644--- a/packages/twenty-front/src/pages/settings/data-model/new-field/SettingsObjectNewFieldSelect.tsx+++ b/packages/twenty-front/src/pages/settings/data-model/new-field/SettingsObjectNewFieldSelect.tsx@@ -16,7 +16,7 @@ import { FormProvider, useForm } from 'react-hook-form';import { useParams } from 'react-router-dom';import { AppPath, SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { z } from 'zod';import { FieldMetadataType } from '~/generated-metadata/graphql';import { useNavigateApp } from '~/hooks/useNavigateApp';diff --git a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsxindex d3cca988e81..e61341f04c2 100644--- a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx+++ b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx@@ -23,7 +23,7 @@ import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Section, useToast } from 'twenty-ui/components';import { IconRepeat, IconTrash } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import {AssignRoleToApiKeyDocument,CreateApiKeyDocument,diff --git a/packages/twenty-front/src/pages/settings/enterprise/SettingsEnterprise.tsx b/packages/twenty-front/src/pages/settings/enterprise/SettingsEnterprise.tsxindex a58f60c1e8a..039c5f29e6d 100644--- a/packages/twenty-front/src/pages/settings/enterprise/SettingsEnterprise.tsx+++ b/packages/twenty-front/src/pages/settings/enterprise/SettingsEnterprise.tsx@@ -42,7 +42,7 @@ import {IconUser,} from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { isGraphqlErrorOfType } from '~/utils/is-graphql-error-of-type.util';const RELEASE_ENTERPRISE_BINDING_CONFIRMATION_MODAL_ID =diff --git a/packages/twenty-front/src/pages/settings/enterprise/components/OrganizationAdornment.tsx b/packages/twenty-front/src/pages/settings/enterprise/components/OrganizationAdornment.tsxindex 513275d3484..8631cc1945f 100644--- a/packages/twenty-front/src/pages/settings/enterprise/components/OrganizationAdornment.tsx+++ b/packages/twenty-front/src/pages/settings/enterprise/components/OrganizationAdornment.tsx@@ -6,7 +6,7 @@ import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconLock } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { billingState } from '@/client-config/states/billingState';import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';diff --git a/packages/twenty-front/src/pages/settings/layout/components/SettingsLayoutDetailScaffold.tsx b/packages/twenty-front/src/pages/settings/layout/components/SettingsLayoutDetailScaffold.tsxindex dc4ca0c2db9..d7ccc0be8cb 100644--- a/packages/twenty-front/src/pages/settings/layout/components/SettingsLayoutDetailScaffold.tsx+++ b/packages/twenty-front/src/pages/settings/layout/components/SettingsLayoutDetailScaffold.tsx@@ -12,7 +12,7 @@ import { type ReactNode } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';export type DetailRow = { key: string; label: string; value: ReactNode };diff --git a/packages/twenty-front/src/pages/settings/layout/components/SettingsLayoutItemTable.tsx b/packages/twenty-front/src/pages/settings/layout/components/SettingsLayoutItemTable.tsxindex b1973091412..7136ab014a3 100644--- a/packages/twenty-front/src/pages/settings/layout/components/SettingsLayoutItemTable.tsx+++ b/packages/twenty-front/src/pages/settings/layout/components/SettingsLayoutItemTable.tsx@@ -5,7 +5,7 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { type ReactNode } from 'react';import { Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';type Column = {key: string;diff --git a/packages/twenty-front/src/pages/settings/members/roles/SettingsRoleAddObjectLevel.tsx b/packages/twenty-front/src/pages/settings/members/roles/SettingsRoleAddObjectLevel.tsxindex 5232751a35d..f8c571d37ed 100644--- a/packages/twenty-front/src/pages/settings/members/roles/SettingsRoleAddObjectLevel.tsx+++ b/packages/twenty-front/src/pages/settings/members/roles/SettingsRoleAddObjectLevel.tsx@@ -9,7 +9,7 @@ import { t } from '@lingui/core/macro';import { Navigate, useParams, useSearchParams } from 'react-router-dom';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { useQuery } from '@apollo/client/react';import { FindOneAgentDocument } from '~/generated-metadata/graphql';diff --git a/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersInviteTab.tsx b/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersInviteTab.tsxindex 17c41b9631c..30e06f6b44d 100644--- a/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersInviteTab.tsx+++ b/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersInviteTab.tsx@@ -18,13 +18,13 @@ import { styled } from '@linaria/react';import { Trans, useLingui } from '@lingui/react/macro';import { isNonEmptyArray } from '@sniptt/guards';import { formatDistanceToNow } from 'date-fns';-import { useContext, useMemo } from 'react';+import { useMemo } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconButton, Section, useToast } from 'twenty-ui/components';import { IconMail, IconReload, IconTrash } from 'twenty-ui/icon';import { Status } from 'twenty-ui/primitives/data-display';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { GetWorkspaceInvitationsDocument } from '~/generated-metadata/graphql';import { dateLocaleState } from '~/localization/states/dateLocaleState';@@ -65,7 +65,7 @@ const StyledTableRows = styled.div``;export const SettingsWorkspaceMembersInviteTab = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const { enqueueToast } = useToast();const roles = useSettingsAllRoles();diff --git a/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx b/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsxindex c86bec837cf..e76fcc0cca7 100644--- a/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx+++ b/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx@@ -12,7 +12,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateimport { type WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';import { styled } from '@linaria/react';import { Trans, useLingui } from '@lingui/react/macro';-import { useContext, useMemo, useState } from 'react';+import { useMemo, useState } from 'react';import { useInView } from 'react-intersection-observer';import {AppPath,@@ -30,7 +30,7 @@ import {import { Avatar } from 'twenty-ui/primitives/data-display';import { Button } from 'twenty-ui/primitives/input';import { Tooltip } from 'twenty-ui/primitives/surfaces';-import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';+import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { useDebounce } from 'use-debounce';import { useNavigateApp } from '~/hooks/useNavigateApp';import { useNavigateSettings } from '~/hooks/useNavigateSettings';@@ -79,7 +79,7 @@ const StyledChevronWrapper = styled.div``;export const SettingsWorkspaceMembersTeamTab = () => {- const { theme } = useContext(ThemeContext);+ const theme = useTheme();const { t } = useLingui();const navigateApp = useNavigateApp();const navigateSettings = useNavigateSettings();diff --git a/packages/twenty-front/src/pages/settings/profile/SettingsTwoFactorAuthenticationMethod.tsx b/packages/twenty-front/src/pages/settings/profile/SettingsTwoFactorAuthenticationMethod.tsxindex 35c9c5aaa67..65926a3518d 100644--- a/packages/twenty-front/src/pages/settings/profile/SettingsTwoFactorAuthenticationMethod.tsx+++ b/packages/twenty-front/src/pages/settings/profile/SettingsTwoFactorAuthenticationMethod.tsx@@ -18,7 +18,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { Section } from 'twenty-ui/components';import { Loader } from 'twenty-ui/primitives/feedback';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { resolveCjsModuleDefaultExport } from '~/utils/resolveCjsModuleDefaultExport';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';diff --git a/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx b/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsxindex abab1d889ec..d45f6660f7b 100644--- a/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx+++ b/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx@@ -14,7 +14,7 @@ import { type APP_LOCALES } from 'twenty-shared/translations';import { isDefined } from 'twenty-shared/utils';import { useLocaleOptions } from '~/localization/hooks/useLocaleOptions';import { dateLocaleState } from '~/localization/states/dateLocaleState';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { dynamicActivate } from '~/utils/i18n/dynamicActivate';import { logError } from '~/utils/logError';diff --git a/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsExperience.tsx b/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsExperience.tsxindex 2acdc0fe2b6..9887969dd92 100644--- a/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsExperience.tsx+++ b/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsExperience.tsx@@ -10,7 +10,7 @@ import { Trans, useLingui } from '@lingui/react/macro';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { ColorSchemePicker, Section } from 'twenty-ui/components';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { themeCssVariables } from 'twenty-ui/theme';import { LocalePicker } from '~/pages/settings/profile/appearance/components/LocalePicker';const StyledInterfaceControls = styled.div`diff --git a/packages/twenty-ui/.oxlintrc.json b/packages/twenty-ui/.oxlintrc.jsonindex 0a644122fe8..fbc882fc50b 100644--- a/packages/twenty-ui/.oxlintrc.json+++ b/packages/twenty-ui/.oxlintrc.json@@ -99,5 +99,30 @@"jsx-a11y/no-static-element-interactions": "warn","jsx-a11y/no-autofocus": "warn"- }+ },+ "overrides": [+ {+ "files": [+ "src/theme/*.ts",+ "src/theme/*.tsx",+ "src/theme/constants/**/*.ts",+ "src/theme/internal/**/*.ts"+ ],+ "rules": {+ "no-restricted-imports": [+ "error",+ {+ "paths": [+ {+ "name": "react",+ "allowImportNames": ["default"],+ "allowTypeImports": true,+ "message": "twenty-ui/theme must load under the react-server condition, where React has no createContext or hooks. Import React as a default and call its APIs, such as React.useState, at render time."+ }+ ]+ }+ ]+ }+ }+ ]}diff --git a/packages/twenty-ui/.size-limit.json b/packages/twenty-ui/.size-limit.jsonindex c35acf269df..d975f11aa39 100644--- a/packages/twenty-ui/.size-limit.json+++ b/packages/twenty-ui/.size-limit.json@@ -84,12 +84,7 @@{"name": "theme","path": "dist/theme.mjs",- "limit": "25 kB"- },- {- "name": "theme-constants",- "path": "dist/theme-constants.mjs",- "limit": "12 kB"+ "limit": "37 kB"},{"name": "utilities",diff --git a/packages/twenty-ui/.storybook/preview.tsx b/packages/twenty-ui/.storybook/preview.tsxindex ecbdb206e8d..056321260d0 100644--- a/packages/twenty-ui/.storybook/preview.tsx+++ b/packages/twenty-ui/.storybook/preview.tsx@@ -5,9 +5,9 @@ import '@fontsource/inter/500.css';import '@fontsource/inter/600.css';import { type Preview } from '@storybook/react-vite';-import '@ui/theme-constants/theme-light.css';-import '@ui/theme-constants/theme-dark.css';-import { ThemeProvider } from '@ui/theme-constants';+import '@ui/theme/theme-light.css';+import '@ui/theme/theme-dark.css';+import { ThemeProvider } from '@ui/theme';import './setupMonacoEnvironment';diff --git a/packages/twenty-ui/CHANGELOG.md b/packages/twenty-ui/CHANGELOG.mdindex 7b19caaa42f..2d77e71a9d4 100644--- a/packages/twenty-ui/CHANGELOG.md+++ b/packages/twenty-ui/CHANGELOG.md@@ -4,6 +4,8 @@### Breaking Changes+- All theme exports now live in `twenty-ui/theme`. The `twenty-ui/theme-constants` entry, `ThemeContext`, `ThemeScopeContext`, and `ThemeContextType` are removed. Read values with `useTheme`, `useThemeColorScheme`, and `useThemeContainer`; configure them with `ThemeProvider`. The top-level theme stylesheet URLs and token values are unchanged.+- Worker apps retain provider-less CSS-variable values. Apps that supplied a context value can pass `THEME_LIGHT` or `THEME_DARK` directly through `ThemeProvider`'s `theme` prop. The in-repo call-recorder, companion, fireflies, Granola, Slack, and Teams apps import `twenty-ui/theme-constants` and must move those imports to `twenty-ui/theme` when they upgrade; call-recorder and Granola must also replace their `ThemeContext` providers with the `theme` prop. Their current pinned UI versions expose neither, so each app needs a coordinated source and dependency upgrade.- `twenty-ui/testing` no longer exports `RouterDecorator`, `ComponentWithRouterDecorator`, `RouteParams`, `isRouteParams`, or `computeLocation`. Use application-owned router decorators when routing is needed, or `ComponentDecorator` for router-free stories. React Router is no longer a peer dependency.- `ResizeHandle` owns pointer and keyboard resizing through `value`/`onValueChange` or `defaultValue`, with configurable `min`, `max`, and `step`. The public `useResizeHandle` hook is removed.- **Public module ownership changes without a deprecation window.** This release removes 55 public React exports and the `twenty-ui/primitives/json-visualizer` entry point. Applications using the removed imports must migrate when upgrading; compatibility exports are not provided.diff --git a/packages/twenty-ui/README.md b/packages/twenty-ui/README.mdindex ef460e66d33..4227e4fc68c 100644--- a/packages/twenty-ui/README.md+++ b/packages/twenty-ui/README.md@@ -35,7 +35,7 @@ For Twenty apps, follow [Using Twenty UI components](https://docs.twenty.com/devFor a standalone React application, import the base styles once, pick a theme stylesheet, and wrap your app in `ThemeProvider`:```tsx-import { ThemeProvider } from 'twenty-ui/theme-constants';+import { ThemeProvider } from 'twenty-ui/theme';import { Button } from 'twenty-ui/primitives/input';import 'twenty-ui/style.css';@@ -73,8 +73,7 @@ import { Button } from 'twenty-ui/primitives/input';| `twenty-ui/primitives/surfaces` | Cards, dialogs, menus, popovers, and tooltips || `twenty-ui/primitives/typography` | Text and headings || `twenty-ui/testing` | Storybook and test decorators |-| `twenty-ui/theme` | Theme types and helpers |-| `twenty-ui/theme-constants` | Design tokens, `ThemeProvider`, and `useTheme` |+| `twenty-ui/theme` | Design tokens, `ThemeProvider`, and `useTheme` || `twenty-ui/utilities` | Hooks and shared utilities |# Themingdiff --git a/packages/twenty-ui/docs/theme.md b/packages/twenty-ui/docs/theme.mdnew file mode 100644index 00000000000..e131edc3f44--- /dev/null+++ b/packages/twenty-ui/docs/theme.md@@ -0,0 +1,29 @@+# Theme++Import `ThemeProvider`, `useTheme`, `useThemeColorScheme`, `useThemeContainer`, `themeCssVariables`, and public theme types and constants from `twenty-ui/theme`. `THEME_LIGHT` and `THEME_DARK` remain available for styles, Stripe configuration, and other consumers that need static values. Load the existing `twenty-ui/theme-light.css` and `twenty-ui/theme-dark.css` stylesheets to supply CSS variables.++`ThemeProvider` applies the color-scheme class to the document root by default. Set `applyToRoot={false}` to scope the class to its children. `overrides` accepts CSS custom properties and creates a scope. Nested scopes resolve their own values, and `useThemeContainer()` identifies the nearest scope for portals. A popup's explicit `container` continues to take precedence over that scope. Root providers retain the `scale` preference; scoped providers ignore it.++Contexts initialize when a provider or hook is used, so importing static tokens also works under React’s server condition. The build can place the static tokens and the provider in the same chunk, so the theme runtime files import React as a default and call its APIs at render time; a lint rule on those files rejects named React value imports.++`useTheme()` without a provider returns CSS-variable references. Worker-rendered apps rely on these references resolving in the host document when its color scheme changes. Supplying static light values as a default would freeze those apps in light mode.++For consumers that need concrete JavaScript values in a worker, pass the theme explicitly:++```tsx+import { THEME_DARK, THEME_LIGHT, ThemeProvider } from 'twenty-ui/theme';++<ThemeProvider+ colorScheme={colorScheme}+ applyToRoot={false}+ theme={colorScheme === 'dark' ? THEME_DARK : THEME_LIGHT}+>+ {children}+</ThemeProvider>;+```++The explicit `theme` supplies hook values and updates when the prop changes. Nested providers inherit it, and a provider with an explicit theme skips reading computed CSS values. Pass `theme` on a nested provider to replace the values for that subtree, for example when it switches color scheme. CSS classes, overrides, scaling, and portal scope retain their existing behavior. CSS overrides do not modify an explicitly supplied theme object. `THEME_LIGHT` and `THEME_DARK` keep their callable spacing helper; the provider resolves it into the same spacing entries that `useTheme()` returns from CSS variables, so `theme.spacing[3]` works with either source.++Raw contexts and their implementation types are private. Replace a direct context read with the corresponding hook, including separate hook calls when reading both the theme and color scheme. The React and Preact theme-token gallery stories demonstrate the public provider configuration used to replace the call-recorder and Granola context providers.++The separately versioned apps under `packages/twenty-apps` must upgrade their source and aligned UI/SDK dependencies together. Their current UI versions cannot use the new provider prop. This workspace migration leaves those packages unchanged.diff --git a/packages/twenty-ui/package.json b/packages/twenty-ui/package.jsonindex 4ef0b4b295f..70aba2d9152 100644--- a/packages/twenty-ui/package.json+++ b/packages/twenty-ui/package.json@@ -187,11 +187,6 @@"import": "./dist/theme.mjs","require": "./dist/theme.cjs"},- "./theme-constants": {- "types": "./dist/theme-constants/index.d.ts",- "import": "./dist/theme-constants.mjs",- "require": "./dist/theme-constants.cjs"- },"./utilities": {"types": "./dist/utilities/index.d.ts","import": "./dist/utilities.mjs",@@ -248,9 +243,6 @@"theme": ["dist/theme/index.d.ts"],- "theme-constants": [- "dist/theme-constants/index.d.ts"- ],"utilities": ["dist/utilities/index.d.ts"]diff --git a/packages/twenty-ui/project.json b/packages/twenty-ui/project.jsonindex 678502334de..56a491c5729 100644--- a/packages/twenty-ui/project.json+++ b/packages/twenty-ui/project.json@@ -111,7 +111,7 @@"inputs": ["production"],"options": {"cwd": "{projectRoot}",- "command": "tsx scripts/checkOptionalDependencies.ts"+ "command": "tsx scripts/checkOptionalDependencies.ts && tsx scripts/checkThemeExports.ts"}},"clean": {diff --git a/packages/twenty-ui/scripts/checkThemeExports.ts b/packages/twenty-ui/scripts/checkThemeExports.tsnew file mode 100644index 00000000000..7bd5f049e50--- /dev/null+++ b/packages/twenty-ui/scripts/checkThemeExports.ts@@ -0,0 +1,33 @@+import { spawnSync } from 'node:child_process';+import { dirname, resolve } from 'node:path';+import { fileURLToPath } from 'node:url';++const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');++for (const inputType of ['module', 'commonjs']) {+ const importTheme =+ inputType === 'module'+ ? "import * as theme from 'twenty-ui/theme';"+ : "const theme = require('twenty-ui/theme');";+ const result = spawnSync(+ process.execPath,+ [+ '--conditions=react-server',+ `--input-type=${inputType}`,+ '--eval',+ `${importTheme}+ if (!theme.THEME_LIGHT || !theme.THEME_DARK || !theme.themeCssVariables) {+ throw new Error('Static theme exports are missing');+ }+ if ('ThemeContext' in theme || 'ThemeScopeContext' in theme) {+ throw new Error('Theme contexts must remain private');+ }+ `,+ ],+ { cwd: packageRoot, stdio: 'inherit' },+ );++ if (result.status !== 0) {+ process.exit(result.status ?? 1);+ }+}diff --git a/packages/twenty-ui/scripts/generateThemeTokens.ts b/packages/twenty-ui/scripts/generateThemeTokens.tsindex 5b52bc304f8..4635d0f2be7 100644--- a/packages/twenty-ui/scripts/generateThemeTokens.ts+++ b/packages/twenty-ui/scripts/generateThemeTokens.ts@@ -18,26 +18,25 @@ import { THEME_COMMON_ROOT_KEYS } from '../design-tokens/themeCommonRootKeys';import { THEME_CSS_FILE_NAME_BY_SCHEME } from '../design-tokens/themeCssFileNameByScheme';const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');-const themeConstantsDirectory = resolve(packageRoot, 'src/theme-constants');const themeDirectory = resolve(packageRoot, 'src/theme');const leaves = collectLeaves(DESIGN_TOKENS);const sourceOutputs = [{- path: resolve(themeConstantsDirectory, THEME_CSS_FILE_NAME_BY_SCHEME.light),+ path: resolve(themeDirectory, THEME_CSS_FILE_NAME_BY_SCHEME.light),content: buildThemeCss({ leaves, scheme: 'light' }),},{- path: resolve(themeConstantsDirectory, THEME_CSS_FILE_NAME_BY_SCHEME.dark),+ path: resolve(themeDirectory, THEME_CSS_FILE_NAME_BY_SCHEME.dark),content: buildThemeCss({ leaves, scheme: 'dark' }),},{- path: resolve(themeConstantsDirectory, 'themeCssVariables.ts'),+ path: resolve(themeDirectory, 'themeCssVariables.ts'),content: buildThemeCssVariables(leaves),},{- path: resolve(themeConstantsDirectory, 'themeTypes.ts'),+ path: resolve(themeDirectory, 'themeTypes.ts'),content: buildThemeTypes(leaves),},{diff --git a/packages/twenty-ui/src/components/code-editor/CodeEditor/CodeEditor.tsx b/packages/twenty-ui/src/components/code-editor/CodeEditor/CodeEditor.tsxindex 2159f7f0f90..f961c39a2c7 100644--- a/packages/twenty-ui/src/components/code-editor/CodeEditor/CodeEditor.tsx+++ b/packages/twenty-ui/src/components/code-editor/CodeEditor/CodeEditor.tsx@@ -3,11 +3,7 @@ import { Loader } from '@ui/primitives/feedback/Loader/Loader';import { BASE_CODE_EDITOR_THEME_ID } from '@ui/components/code-editor/CodeEditor/constants/BaseCodeEditorThemeId';import { getBaseCodeEditorTheme } from '@ui/components/code-editor/CodeEditor/utils/getBaseCodeEditorTheme';import { ResizeHandle } from '@ui/primitives/layout/ResizeHandle/ResizeHandle';-import {- useTheme,- useThemeColorScheme,- type ThemeType,-} from '@ui/theme-constants';+import { useTheme, useThemeColorScheme, type ThemeType } from '@ui/theme';import { type editor } from 'monaco-editor';import { type KeyboardEvent, useEffect, useId, useState } from 'react';import { isDefined } from '@ui/utilities/utils/isDefined';diff --git a/packages/twenty-ui/src/components/code-editor/CodeEditor/utils/getBaseCodeEditorTheme.ts b/packages/twenty-ui/src/components/code-editor/CodeEditor/utils/getBaseCodeEditorTheme.tsindex 433674776b2..ab9f57110cd 100644--- a/packages/twenty-ui/src/components/code-editor/CodeEditor/utils/getBaseCodeEditorTheme.ts+++ b/packages/twenty-ui/src/components/code-editor/CodeEditor/utils/getBaseCodeEditorTheme.ts@@ -1,4 +1,4 @@-import { type ThemeType } from '@ui/theme-constants';+import { type ThemeType } from '@ui/theme';import { type editor } from 'monaco-editor';import { isDefined } from '@ui/utilities/utils/isDefined';diff --git a/packages/twenty-ui/src/components/data-display/JsonTree/__tests__/JsonTree.test.tsx b/packages/twenty-ui/src/components/data-display/JsonTree/__tests__/JsonTree.test.tsxindex 04b0f63b5bb..8fe323ba94c 100644--- a/packages/twenty-ui/src/components/data-display/JsonTree/__tests__/JsonTree.test.tsx+++ b/packages/twenty-ui/src/components/data-display/JsonTree/__tests__/JsonTree.test.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react';import userEvent from '@testing-library/user-event';-import { ThemeProvider } from '@ui/theme-constants';+import { ThemeProvider } from '@ui/theme';import { JsonTree } from '../JsonTree';diff --git a/packages/twenty-ui/src/components/data-display/JsonTree/internal/JsonArrow.tsx b/packages/twenty-ui/src/components/data-display/JsonTree/internal/JsonArrow.tsxindex eac6d6d904f..f892fef43d3 100644--- a/packages/twenty-ui/src/components/data-display/JsonTree/internal/JsonArrow.tsx+++ b/packages/twenty-ui/src/components/data-display/JsonTree/internal/JsonArrow.tsx@@ -1,7 +1,7 @@import { useJsonTreeContextOrThrow } from '@ui/components/data-display/JsonTree/internal/hooks/useJsonTreeContextOrThrow';import { IconChevronDown } from '@ui/icon';import { VisibilityHidden } from '@ui/primitives/accessibility/components/VisibilityHidden';-import { themeCssVariables, useTheme } from '@ui/theme-constants';+import { themeCssVariables, useTheme } from '@ui/theme';import { clsx } from 'clsx';import styles from './JsonArrow.module.scss';diff --git a/packages/twenty-ui/src/components/data-display/JsonTree/internal/JsonNodeLabel.tsx b/packages/twenty-ui/src/components/data-display/JsonTree/internal/JsonNodeLabel.tsxindex 817a2cc889f..1477a0a65eb 100644--- a/packages/twenty-ui/src/components/data-display/JsonTree/internal/JsonNodeLabel.tsx+++ b/packages/twenty-ui/src/components/data-display/JsonTree/internal/JsonNodeLabel.tsx@@ -1,6 +1,6 @@import { type JsonNodeHighlighting } from '@ui/components/data-display/JsonTree/types/JsonNodeHighlighting';import { type IconComponent } from '@ui/icon';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import { clsx } from 'clsx';import styles from './JsonNodeLabel.module.scss';diff --git a/packages/twenty-ui/src/components/data-display/TintedIconTile/TintedIconTile.tsx b/packages/twenty-ui/src/components/data-display/TintedIconTile/TintedIconTile.tsxindex 0444caf3e3e..675e9e71426 100644--- a/packages/twenty-ui/src/components/data-display/TintedIconTile/TintedIconTile.tsx+++ b/packages/twenty-ui/src/components/data-display/TintedIconTile/TintedIconTile.tsx@@ -1,7 +1,7 @@import { StyledTintedIconTileContainer } from '@ui/components/data-display/TintedIconTile/internal/StyledTintedIconTileContainer/StyledTintedIconTileContainer';import { getIconTileColorShades } from '@ui/components/data-display/TintedIconTile/utils/getIconTileColorShades';-import { DEFAULT_THEME_COLOR_FALLBACK } from '@ui/theme';-import { useTheme } from '@ui/theme-constants';+import { DEFAULT_THEME_COLOR_FALLBACK, useTheme } from '@ui/theme';+import { isDefined } from '@ui/utilities/utils/isDefined';import { type TintedIconTileProps } from './types/TintedIconTileProps';diff --git a/packages/twenty-ui/src/components/data-display/TintedIconTile/internal/utils/getColorFromTheme.ts b/packages/twenty-ui/src/components/data-display/TintedIconTile/internal/utils/getColorFromTheme.tsindex 6325f91f15d..bfe964917bd 100644--- a/packages/twenty-ui/src/components/data-display/TintedIconTile/internal/utils/getColorFromTheme.ts+++ b/packages/twenty-ui/src/components/data-display/TintedIconTile/internal/utils/getColorFromTheme.ts@@ -1,5 +1,4 @@-import { type ThemeColor } from '@ui/theme';-import { themeCssVariables } from '@ui/theme-constants';+import { type ThemeColor, themeCssVariables } from '@ui/theme';export const getColorFromTheme = (themeColor: ThemeColor,diff --git a/packages/twenty-ui/src/components/feedback/Info/Info.tsx b/packages/twenty-ui/src/components/feedback/Info/Info.tsxindex 82c9238ad71..b34284c967e 100644--- a/packages/twenty-ui/src/components/feedback/Info/Info.tsx+++ b/packages/twenty-ui/src/components/feedback/Info/Info.tsx@@ -1,5 +1,5 @@import { IconInfoCircle } from '@ui/icon/components/TablerIcons';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import { clsx } from 'clsx';import { type InfoAccent } from './types/InfoAccent';import { type InfoProps } from './types/InfoProps';diff --git a/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.tsx b/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.tsxindex 9724a42d368..14b1d61accd 100644--- a/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.tsx+++ b/packages/twenty-ui/src/components/feedback/InlineBanner/InlineBanner.tsx@@ -6,7 +6,7 @@ import {} from '@ui/primitives/feedback/Banner/Banner';import { Button } from '@ui/primitives/input/Button/Button';import { OverflowingTextWithTooltip } from '@ui/primitives/typography/OverflowingTextWithTooltip/OverflowingTextWithTooltip';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import { isDefined } from '@ui/utilities/utils/isDefined';import { clsx } from 'clsx';diff --git a/packages/twenty-ui/src/components/feedback/Toast/Toast.tsx b/packages/twenty-ui/src/components/feedback/Toast/Toast.tsxindex fd842138662..0d4c37b3e4e 100644--- a/packages/twenty-ui/src/components/feedback/Toast/Toast.tsx+++ b/packages/twenty-ui/src/components/feedback/Toast/Toast.tsx@@ -11,7 +11,7 @@ import {import { ProgressBar } from '@ui/primitives/feedback/ProgressBar/ProgressBar';import { Button } from '@ui/primitives/input/Button/Button';import { HorizontalSeparator } from '@ui/primitives/layout/HorizontalSeparator/HorizontalSeparator';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import { isDefined } from '@ui/utilities/utils/isDefined';import styles from './Toast.module.scss';diff --git a/packages/twenty-ui/src/components/feedback/Toaster/Toaster.tsx b/packages/twenty-ui/src/components/feedback/Toaster/Toaster.tsxindex 834ae329b63..bfbade681e8 100644--- a/packages/twenty-ui/src/components/feedback/Toaster/Toaster.tsx+++ b/packages/twenty-ui/src/components/feedback/Toaster/Toaster.tsx@@ -3,7 +3,7 @@ import { useRender } from '@base-ui/react/use-render';import { clsx } from 'clsx';import { createPortal } from 'react-dom';-import { useThemeContainer } from '@ui/theme-constants';+import { useThemeContainer } from '@ui/theme';import { isDefined } from '@ui/utilities/utils/isDefined';import styles from './Toaster.module.scss';diff --git a/packages/twenty-ui/src/components/feedback/Toaster/__stories__/Toaster.stories.tsx b/packages/twenty-ui/src/components/feedback/Toaster/__stories__/Toaster.stories.tsxindex 2255105c6dd..0758baa6a5c 100644--- a/packages/twenty-ui/src/components/feedback/Toaster/__stories__/Toaster.stories.tsx+++ b/packages/twenty-ui/src/components/feedback/Toaster/__stories__/Toaster.stories.tsx@@ -4,7 +4,7 @@ import { expect, fn, userEvent, waitFor, within } from 'storybook/test';import { ToastProvider } from '@ui/components/feedback/Toast/ToastProvider';import { ComponentDecorator } from '@ui/testing';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { Toaster } from '../Toaster';import { ToastControls } from './ToastControls';diff --git a/packages/twenty-ui/src/components/input/ColorSchemePicker/internal/Checkmark/Checkmark.tsx b/packages/twenty-ui/src/components/input/ColorSchemePicker/internal/Checkmark/Checkmark.tsxindex 6e161ceae29..f3911088485 100644--- a/packages/twenty-ui/src/components/input/ColorSchemePicker/internal/Checkmark/Checkmark.tsx+++ b/packages/twenty-ui/src/components/input/ColorSchemePicker/internal/Checkmark/Checkmark.tsx@@ -3,7 +3,7 @@ import React from 'react';import { clsx } from 'clsx';import { IconCheck } from '@ui/icon/components/TablerIcons';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import styles from './Checkmark.module.scss';diff --git a/packages/twenty-ui/src/components/input/SearchInput/SearchInput.tsx b/packages/twenty-ui/src/components/input/SearchInput/SearchInput.tsxindex bff305d1fbf..c0c5f70f7d5 100644--- a/packages/twenty-ui/src/components/input/SearchInput/SearchInput.tsx+++ b/packages/twenty-ui/src/components/input/SearchInput/SearchInput.tsx@@ -5,7 +5,7 @@ import { type SearchInputProps } from './types/SearchInputProps';import { IconFilter, IconSearch } from '@ui/icon';import { Button } from '@ui/primitives/input/Button/Button';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import styles from './SearchInput.module.scss';diff --git a/packages/twenty-ui/src/components/layout/AnimatedIconCrossfade/AnimatedIconCrossfade.tsx b/packages/twenty-ui/src/components/layout/AnimatedIconCrossfade/AnimatedIconCrossfade.tsxindex 7e59c40d3fd..039feda14d6 100644--- a/packages/twenty-ui/src/components/layout/AnimatedIconCrossfade/AnimatedIconCrossfade.tsx+++ b/packages/twenty-ui/src/components/layout/AnimatedIconCrossfade/AnimatedIconCrossfade.tsx@@ -1,7 +1,7 @@import { clsx } from 'clsx';import { type IconComponent } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import styles from './AnimatedIconCrossfade.module.scss';diff --git a/packages/twenty-ui/src/components/navigation/MenuItem/MenuItem.tsx b/packages/twenty-ui/src/components/navigation/MenuItem/MenuItem.tsxindex 39a8b54721c..81d1c38da29 100644--- a/packages/twenty-ui/src/components/navigation/MenuItem/MenuItem.tsx+++ b/packages/twenty-ui/src/components/navigation/MenuItem/MenuItem.tsx@@ -8,7 +8,7 @@ import {StyledMenuItemRightContent,} from '@ui/components/navigation/MenuItem/parts/StyledMenuItemBase';import { MenuItemHotKeys } from '@ui/primitives/navigation/ListItem/internal/MenuItemHotKeys/MenuItemHotKeys';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import { clsx } from 'clsx';import styles from './MenuItem.module.scss';diff --git a/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemIcon.tsx b/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemIcon.tsxindex 65723d1bcee..8ee8df65f1f 100644--- a/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemIcon.tsx+++ b/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemIcon.tsx@@ -1,8 +1,8 @@import { MenuItemIconBoxContainer } from '@ui/components/navigation/MenuItem/parts/MenuItemIconBoxContainer';import { TintedIconTile } from '@ui/components/data-display/TintedIconTile/TintedIconTile';import { type IconComponent } from '@ui/icon';-import { type ThemeColor } from '@ui/theme';-import { useTheme } from '@ui/theme-constants';+import { type ThemeColor, useTheme } from '@ui/theme';+import { isDefined } from '@ui/utilities/utils/isDefined';export type MenuItemIconProps = {diff --git a/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemIconWithGripSwap.tsx b/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemIconWithGripSwap.tsxindex 6d3dc8f542a..4c792cb0089 100644--- a/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemIconWithGripSwap.tsx+++ b/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemIconWithGripSwap.tsx@@ -1,8 +1,8 @@import { MenuItemIconBoxContainer } from '@ui/components/navigation/MenuItem/parts/MenuItemIconBoxContainer';import { TintedIconTile } from '@ui/components/data-display/TintedIconTile/TintedIconTile';import { IconGripVertical, type IconComponent } from '@ui/icon';-import { type ThemeColor } from '@ui/theme';-import { useTheme } from '@ui/theme-constants';+import { type ThemeColor, useTheme } from '@ui/theme';+import { isDefined } from '@ui/utilities/utils/isDefined';import { clsx } from 'clsx';diff --git a/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemLeftContent.tsx b/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemLeftContent.tsxindex 2e468869a46..3b57f8019f7 100644--- a/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemLeftContent.tsx+++ b/packages/twenty-ui/src/components/navigation/MenuItem/parts/MenuItemLeftContent.tsx@@ -14,8 +14,7 @@ import {import { type MenuItemDraggableGripMode } from '@ui/components/navigation/MenuItem/types/MenuItemDraggableGripMode';import { OverflowingTextWithTooltip } from '@ui/primitives/typography/OverflowingTextWithTooltip/OverflowingTextWithTooltip';import { IconGripVertical, type IconComponent } from '@ui/icon';-import { type ThemeColor } from '@ui/theme';-import { themeCssVariables, useTheme } from '@ui/theme-constants';+import { type ThemeColor, themeCssVariables, useTheme } from '@ui/theme';import styles from './MenuItemLeftContent.module.scss';diff --git a/packages/twenty-ui/src/components/navigation/MenuPicker/MenuPicker.tsx b/packages/twenty-ui/src/components/navigation/MenuPicker/MenuPicker.tsxindex 814029f131e..e6149916e12 100644--- a/packages/twenty-ui/src/components/navigation/MenuPicker/MenuPicker.tsx+++ b/packages/twenty-ui/src/components/navigation/MenuPicker/MenuPicker.tsx@@ -3,7 +3,7 @@ import { isDefined } from '@ui/utilities/utils/isDefined';import { clsx } from 'clsx';import { Tooltip } from '@ui/primitives/surfaces/Tooltip/Tooltip';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import styles from './MenuPicker.module.scss';diff --git a/packages/twenty-ui/src/components/navigation/NavigationBar/internal/NavigationBarItem/NavigationBarItem.tsx b/packages/twenty-ui/src/components/navigation/NavigationBar/internal/NavigationBarItem/NavigationBarItem.tsxindex e8de9732194..74cc1329237 100644--- a/packages/twenty-ui/src/components/navigation/NavigationBar/internal/NavigationBarItem/NavigationBarItem.tsx+++ b/packages/twenty-ui/src/components/navigation/NavigationBar/internal/NavigationBarItem/NavigationBarItem.tsx@@ -1,5 +1,5 @@import { type IconComponent } from '@ui/icon/types/IconComponent';-import { themeCssVariables, useTheme } from '@ui/theme-constants';+import { themeCssVariables, useTheme } from '@ui/theme';import styles from './NavigationBarItem.module.scss';diff --git a/packages/twenty-ui/src/icon/components/IconAddressBook.tsx b/packages/twenty-ui/src/icon/components/IconAddressBook.tsxindex d125c261bc7..c7bd4aff52a 100644--- a/packages/twenty-ui/src/icon/components/IconAddressBook.tsx+++ b/packages/twenty-ui/src/icon/components/IconAddressBook.tsx@@ -1,6 +1,6 @@import IconAddressBookRaw from '@assets/icons/address-book.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconAddressBookProps = Pick<IconComponentProps,diff --git a/packages/twenty-ui/src/icon/components/IconBrandAnthropic.tsx b/packages/twenty-ui/src/icon/components/IconBrandAnthropic.tsxindex f7980f71f11..0f34dedfd0c 100644--- a/packages/twenty-ui/src/icon/components/IconBrandAnthropic.tsx+++ b/packages/twenty-ui/src/icon/components/IconBrandAnthropic.tsx@@ -1,6 +1,6 @@import IconAnthropicRaw from '@assets/icons/anthropic.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconBrandAnthropicProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconBrandGemini.tsx b/packages/twenty-ui/src/icon/components/IconBrandGemini.tsxindex 4dd6e526bd5..f01bc501793 100644--- a/packages/twenty-ui/src/icon/components/IconBrandGemini.tsx+++ b/packages/twenty-ui/src/icon/components/IconBrandGemini.tsx@@ -1,6 +1,6 @@import IconBrandGeminiRaw from '@assets/icons/gemini.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconBrandGeminiProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconBrandGroq.tsx b/packages/twenty-ui/src/icon/components/IconBrandGroq.tsxindex 610a4ffd432..307c0d70935 100644--- a/packages/twenty-ui/src/icon/components/IconBrandGroq.tsx+++ b/packages/twenty-ui/src/icon/components/IconBrandGroq.tsx@@ -1,6 +1,6 @@import IconBrandGroqRaw from '@assets/icons/groq.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconBrandGroqProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconBrandMistral.tsx b/packages/twenty-ui/src/icon/components/IconBrandMistral.tsxindex e5c390a51b4..d2478edda18 100644--- a/packages/twenty-ui/src/icon/components/IconBrandMistral.tsx+++ b/packages/twenty-ui/src/icon/components/IconBrandMistral.tsx@@ -1,6 +1,6 @@import IconBrandMistralRaw from '@assets/icons/mistral.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconBrandMistralProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconBrandTypesafeAi.tsx b/packages/twenty-ui/src/icon/components/IconBrandTypesafeAi.tsxindex 4ea556f20ae..52d04a3bc4c 100644--- a/packages/twenty-ui/src/icon/components/IconBrandTypesafeAi.tsx+++ b/packages/twenty-ui/src/icon/components/IconBrandTypesafeAi.tsx@@ -1,6 +1,6 @@import IconBrandTypesafeAiRaw from '@assets/icons/typesafe-ai.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconBrandTypesafeAiProps = Pick<IconComponentProps, 'size' | 'color'>;diff --git a/packages/twenty-ui/src/icon/components/IconBrandXai.tsx b/packages/twenty-ui/src/icon/components/IconBrandXai.tsxindex cccbcbc9532..f9e63cb7e1e 100644--- a/packages/twenty-ui/src/icon/components/IconBrandXai.tsx+++ b/packages/twenty-ui/src/icon/components/IconBrandXai.tsx@@ -1,6 +1,6 @@import IconBrandXaiRaw from '@assets/icons/xai.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconBrandXaiProps = Pick<IconComponentProps, 'size' | 'color'>;diff --git a/packages/twenty-ui/src/icon/components/IconChartBarHorizontal.tsx b/packages/twenty-ui/src/icon/components/IconChartBarHorizontal.tsxindex 94f3d32c760..1bc89824baf 100644--- a/packages/twenty-ui/src/icon/components/IconChartBarHorizontal.tsx+++ b/packages/twenty-ui/src/icon/components/IconChartBarHorizontal.tsx@@ -1,6 +1,6 @@import { IconChartBar } from '@ui/icon/components/TablerIcons';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import styles from './IconChartBarHorizontal.module.scss';diff --git a/packages/twenty-ui/src/icon/components/IconGmail.tsx b/packages/twenty-ui/src/icon/components/IconGmail.tsxindex 79b26806508..bbbcd9e498f 100644--- a/packages/twenty-ui/src/icon/components/IconGmail.tsx+++ b/packages/twenty-ui/src/icon/components/IconGmail.tsx@@ -1,6 +1,6 @@import IconGmailRaw from '@assets/icons/gmail.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconGmailProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconGoogle.tsx b/packages/twenty-ui/src/icon/components/IconGoogle.tsxindex d88bda5f05f..24818e53260 100644--- a/packages/twenty-ui/src/icon/components/IconGoogle.tsx+++ b/packages/twenty-ui/src/icon/components/IconGoogle.tsx@@ -1,6 +1,6 @@import IconGoogleRaw from '@assets/icons/google.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconGoogleProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconGoogleCalendar.tsx b/packages/twenty-ui/src/icon/components/IconGoogleCalendar.tsxindex 86f2de68431..bd9af0a1448 100644--- a/packages/twenty-ui/src/icon/components/IconGoogleCalendar.tsx+++ b/packages/twenty-ui/src/icon/components/IconGoogleCalendar.tsx@@ -1,6 +1,6 @@import IconGoogleCalendarRaw from '@assets/icons/google-calendar.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconGoogleCalendarProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconLock.tsx b/packages/twenty-ui/src/icon/components/IconLock.tsxindex 810b5eeaabf..2c23f4ae702 100644--- a/packages/twenty-ui/src/icon/components/IconLock.tsx+++ b/packages/twenty-ui/src/icon/components/IconLock.tsx@@ -1,6 +1,6 @@import IconLockRaw from '@assets/icons/lock.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconLockCustomProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconMicrosoft.tsx b/packages/twenty-ui/src/icon/components/IconMicrosoft.tsxindex e322fe2e41b..698b43fcc8a 100644--- a/packages/twenty-ui/src/icon/components/IconMicrosoft.tsx+++ b/packages/twenty-ui/src/icon/components/IconMicrosoft.tsx@@ -1,5 +1,5 @@import IconMicrosoftRaw from '@assets/icons/microsoft.svg?react';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';interface IconMicrosoftProps {size?: number | string;diff --git a/packages/twenty-ui/src/icon/components/IconMicrosoftCalendar.tsx b/packages/twenty-ui/src/icon/components/IconMicrosoftCalendar.tsxindex 484a1919327..5f378235519 100644--- a/packages/twenty-ui/src/icon/components/IconMicrosoftCalendar.tsx+++ b/packages/twenty-ui/src/icon/components/IconMicrosoftCalendar.tsx@@ -1,5 +1,5 @@import IconMicrosoftCalendarRaw from '@assets/icons/microsoft-calendar.svg?react';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';interface IconMicrosoftCalendarProps {size?: number | string;diff --git a/packages/twenty-ui/src/icon/components/IconMicrosoftOutlook.tsx b/packages/twenty-ui/src/icon/components/IconMicrosoftOutlook.tsxindex 65adbbf4d58..25c121b2ba4 100644--- a/packages/twenty-ui/src/icon/components/IconMicrosoftOutlook.tsx+++ b/packages/twenty-ui/src/icon/components/IconMicrosoftOutlook.tsx@@ -1,5 +1,5 @@import IconMicrosoftOutlookRaw from '@assets/icons/microsoft-outlook.svg?react';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';interface IconMicrosoftOutlookProps {size?: number | string;diff --git a/packages/twenty-ui/src/icon/components/IconModelClaude.tsx b/packages/twenty-ui/src/icon/components/IconModelClaude.tsxindex a363c1adf03..8853018c818 100644--- a/packages/twenty-ui/src/icon/components/IconModelClaude.tsx+++ b/packages/twenty-ui/src/icon/components/IconModelClaude.tsx@@ -1,6 +1,6 @@import IconModelClaudeRaw from '@assets/icons/claude.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconModelClaudeProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IconProviderOpenai.tsx b/packages/twenty-ui/src/icon/components/IconProviderOpenai.tsxindex e335b02c578..9d20dffa6ae 100644--- a/packages/twenty-ui/src/icon/components/IconProviderOpenai.tsx+++ b/packages/twenty-ui/src/icon/components/IconProviderOpenai.tsx@@ -1,6 +1,6 @@import IconOpenaiRaw from '@assets/icons/openai.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconProviderOpenaiProps = Pick<IconComponentProps, 'size' | 'color'>;diff --git a/packages/twenty-ui/src/icon/components/IconRelationManyToOne.tsx b/packages/twenty-ui/src/icon/components/IconRelationManyToOne.tsxindex 9366126b89b..8dc971b0468 100644--- a/packages/twenty-ui/src/icon/components/IconRelationManyToOne.tsx+++ b/packages/twenty-ui/src/icon/components/IconRelationManyToOne.tsx@@ -1,6 +1,6 @@import IconRelationManyToOneRaw from '@assets/icons/many-to-one.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconRelationManyToOneProps = Pick<IconComponentProps, 'size' | 'stroke'>;diff --git a/packages/twenty-ui/src/icon/components/IconTrashXOff.tsx b/packages/twenty-ui/src/icon/components/IconTrashXOff.tsxindex 35bd053da18..4cd873f4d1c 100644--- a/packages/twenty-ui/src/icon/components/IconTrashXOff.tsx+++ b/packages/twenty-ui/src/icon/components/IconTrashXOff.tsx@@ -1,6 +1,6 @@import IconTrashXOffRaw from '@assets/icons/trash-x-off.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconTrashXOffProps = Pick<IconComponentProps, 'size' | 'stroke'>;diff --git a/packages/twenty-ui/src/icon/components/IconTwentyStar.tsx b/packages/twenty-ui/src/icon/components/IconTwentyStar.tsxindex c6ea2bbc9ae..5089f39caf1 100644--- a/packages/twenty-ui/src/icon/components/IconTwentyStar.tsx+++ b/packages/twenty-ui/src/icon/components/IconTwentyStar.tsx@@ -1,6 +1,6 @@import IconTwentyStarRaw from '@assets/icons/twenty-star.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconTwentyStarProps = Pick<IconComponentProps, 'size' | 'stroke'>;diff --git a/packages/twenty-ui/src/icon/components/IconTwentyStarFilled.tsx b/packages/twenty-ui/src/icon/components/IconTwentyStarFilled.tsxindex 7c75f770817..99444598602 100644--- a/packages/twenty-ui/src/icon/components/IconTwentyStarFilled.tsx+++ b/packages/twenty-ui/src/icon/components/IconTwentyStarFilled.tsx@@ -1,6 +1,6 @@import IconTwentyStarFilledRaw from '@assets/icons/twenty-star-filled.svg?react';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IconTwentyStarFilledProps = Pick<IconComponentProps, 'size' | 'stroke'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconArray.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconArray.tsxindex ba5b52d4938..fe7cc182071 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconArray.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconArray.tsx@@ -1,7 +1,7 @@import IllustrationIconArrayRaw from '@assets/icons/illustration-array.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconArrayProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconCalendarEvent.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconCalendarEvent.tsxindex 44fc3559895..75822a852f4 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconCalendarEvent.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconCalendarEvent.tsx@@ -1,7 +1,7 @@import IllustrationIconCalendarEventRaw from '@assets/icons/illustration-calendar-event.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconCalendarEventProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconCalendarTime.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconCalendarTime.tsxindex 410233b579b..99a4f63f2a2 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconCalendarTime.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconCalendarTime.tsx@@ -1,7 +1,7 @@import IllustrationIconCalendarTimeRaw from '@assets/icons/illustration-calendar-time.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconCalendarTimeProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconCurrency.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconCurrency.tsxindex d9652899c55..c6b31089a3b 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconCurrency.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconCurrency.tsx@@ -1,7 +1,7 @@import IllustrationIconCurrencyRaw from '@assets/icons/illustration-currency.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconCurrencyProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconFile.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconFile.tsxindex f276815bdb3..ce59fa00423 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconFile.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconFile.tsx@@ -1,7 +1,7 @@import IllustrationIconFileRaw from '@assets/icons/illustration-file.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconFileProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconJson.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconJson.tsxindex f1b7602d9d1..b102af4987a 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconJson.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconJson.tsx@@ -1,7 +1,7 @@import IllustrationIconJsonRaw from '@assets/icons/illustration-json.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconJsonProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconLink.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconLink.tsxindex 3b7ce44a712..367fb27f5a8 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconLink.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconLink.tsx@@ -1,7 +1,7 @@import IllustrationIconLinkRaw from '@assets/icons/illustration-link.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconLinkProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconMail.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconMail.tsxindex cba3a820420..1253a8a5725 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconMail.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconMail.tsx@@ -1,7 +1,7 @@import IllustrationIconMailRaw from '@assets/icons/illustration-mail.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconMailProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconManyToMany.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconManyToMany.tsxindex 2eed205207a..478c3ca8c7f 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconManyToMany.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconManyToMany.tsx@@ -1,7 +1,7 @@import IllustrationIconManyToManyRaw from '@assets/icons/illustration-many-to-many.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconManyToManyProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconMap.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconMap.tsxindex 2c620678652..9281efb19cc 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconMap.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconMap.tsx@@ -1,7 +1,7 @@import IllustrationIconMapRaw from '@assets/icons/illustration-map.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconMapProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconNumbers.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconNumbers.tsxindex 5dfeb026dbe..92fa32cc7de 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconNumbers.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconNumbers.tsx@@ -1,7 +1,7 @@import IllustrationIconNumbersRaw from '@assets/icons/illustration-numbers.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconNumbersProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconOneToMany.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconOneToMany.tsxindex 90eab8e7a06..3d46eb464dc 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconOneToMany.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconOneToMany.tsx@@ -1,7 +1,7 @@import IllustrationIconOneToManyRaw from '@assets/icons/illustration-one-to-many.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconOneToManyProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconOneToOne.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconOneToOne.tsxindex bbdcda978f7..ff035662b16 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconOneToOne.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconOneToOne.tsx@@ -1,7 +1,7 @@import IllustrationIconOneToOneRaw from '@assets/icons/illustration-one-to-one.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconOneToOneProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconPhone.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconPhone.tsxindex 3a1ac82fd36..0ca75b082fa 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconPhone.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconPhone.tsx@@ -1,7 +1,7 @@import IllustrationIconPhoneRaw from '@assets/icons/illustration-phone.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconPhoneProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconSetting.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconSetting.tsxindex 55b86f8af7a..eb2a25a15d2 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconSetting.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconSetting.tsx@@ -1,7 +1,7 @@import IllustrationIconSettingRaw from '@assets/icons/illustration-setting.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconSettingProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconStar.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconStar.tsxindex 56312c55ea3..38969988ec7 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconStar.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconStar.tsx@@ -1,7 +1,7 @@import IllustrationIconStarRaw from '@assets/icons/illustration-star.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconStarProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconTag.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconTag.tsxindex 65b546346ea..439b15e61d5 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconTag.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconTag.tsx@@ -1,7 +1,7 @@import IllustrationIconTagRaw from '@assets/icons/illustration-tag.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconTagProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconTags.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconTags.tsxindex dc03e6ab0a9..2908082b3f8 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconTags.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconTags.tsx@@ -1,7 +1,7 @@import IllustrationIconTagsRaw from '@assets/icons/illustration-tags.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconTagsProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconText.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconText.tsxindex 8c2cfe8f217..49df2ece4ca 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconText.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconText.tsx@@ -1,7 +1,7 @@import IllustrationIconTextRaw from '@assets/icons/illustration-text.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconTextProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconToggle.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconToggle.tsxindex 1da007fa37b..684535daee0 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconToggle.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconToggle.tsx@@ -1,7 +1,7 @@import IllustrationIconToggleRaw from '@assets/icons/illustration-toggle.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconToggleProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconUid.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconUid.tsxindex 09a132ee65a..c1c36dc1ce8 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconUid.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconUid.tsx@@ -1,7 +1,7 @@import IllustrationIconUidRaw from '@assets/icons/illustration-uid.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconUidProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/icon/components/IllustrationIconUser.tsx b/packages/twenty-ui/src/icon/components/IllustrationIconUser.tsxindex f2d11828f5c..4982bbd7727 100644--- a/packages/twenty-ui/src/icon/components/IllustrationIconUser.tsx+++ b/packages/twenty-ui/src/icon/components/IllustrationIconUser.tsx@@ -1,7 +1,7 @@import IllustrationIconUserRaw from '@assets/icons/illustration-user.svg?react';import { IllustrationIconWrapper } from '@ui/icon/components/IllustrationIconWrapper';import { type IconComponentProps } from '@ui/icon/types/IconComponent';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';type IllustrationIconUserProps = Pick<IconComponentProps, 'size'>;diff --git a/packages/twenty-ui/src/index.ts b/packages/twenty-ui/src/index.tsindex 2f2a17ab45e..6b44021ed16 100644--- a/packages/twenty-ui/src/index.ts+++ b/packages/twenty-ui/src/index.ts@@ -13,5 +13,4 @@ export * from './components';export * from './icon';export * from './primitives';export * from './theme';-export * from './theme-constants';export * from './utilities';diff --git a/packages/twenty-ui/src/individual-entry.ts b/packages/twenty-ui/src/individual-entry.tsindex 8c4e563bb9f..b39c30913f0 100644--- a/packages/twenty-ui/src/individual-entry.ts+++ b/packages/twenty-ui/src/individual-entry.ts@@ -11,5 +11,4 @@ export * from './components';export * from './icon';export * from './primitives';export * from './theme';-export * from './theme-constants';export * from './utilities';diff --git a/packages/twenty-ui/src/primitives/data-display/Avatar/Avatar.tsx b/packages/twenty-ui/src/primitives/data-display/Avatar/Avatar.tsxindex 45387ad5a03..33d48a8072b 100644--- a/packages/twenty-ui/src/primitives/data-display/Avatar/Avatar.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Avatar/Avatar.tsx@@ -2,7 +2,7 @@ import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';import { Button as ButtonPrimitive } from '@base-ui/react/button';import { type CSSProperties } from 'react';-import { useTheme } from '@ui/theme-constants';+import { useTheme } from '@ui/theme';import { stringToThemeColorP3String } from '@ui/utilities';import { isDefined } from '@ui/utilities/utils/isDefined';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';diff --git a/packages/twenty-ui/src/primitives/data-display/ColorSample/ColorSample.tsx b/packages/twenty-ui/src/primitives/data-display/ColorSample/ColorSample.tsxindex 763c3db47ef..d384509b557 100644--- a/packages/twenty-ui/src/primitives/data-display/ColorSample/ColorSample.tsx+++ b/packages/twenty-ui/src/primitives/data-display/ColorSample/ColorSample.tsx@@ -1,7 +1,7 @@import { clsx } from 'clsx';-import { type ThemeColor } from '@ui/theme';-import { themeCssVariables } from '@ui/theme-constants';+import { type ThemeColor, themeCssVariables } from '@ui/theme';+import { isDefined } from '@ui/utilities/utils/isDefined';import styles from './ColorSample.module.scss';diff --git a/packages/twenty-ui/src/primitives/data-display/Status/Status.tsx b/packages/twenty-ui/src/primitives/data-display/Status/Status.tsxindex bcbc97abd03..bcf68cc88ac 100644--- a/packages/twenty-ui/src/primitives/data-display/Status/Status.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Status/Status.tsx@@ -4,7 +4,7 @@ import { clsx } from 'clsx';import { type CSSProperties } from 'react';import { Loader } from '@ui/primitives/feedback/Loader/Loader';-import { themeCssVariables } from '@ui/theme-constants';+import { themeCssVariables } from '@ui/theme';import { parseThemeColor } from '@ui/utilities';import { isDefined } from '@ui/utilities/utils/isDefined';diff --git a/packages/twenty-ui/src/primitives/data-display/Status/__tests__/Status.test.tsx b/packages/twenty-ui/src/primitives/data-display/Status/__tests__/Status.test.tsxindex e56533eef63..1243b817468 100644--- a/packages/twenty-ui/src/primitives/data-display/Status/__tests__/Status.test.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Status/__tests__/Status.test.tsx@@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event';import { createRef } from 'react';import { expectTypeOf, it, expect, vi } from 'vitest';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { Status } from '../Status';import styles from '../Status.module.scss';diff --git a/packages/twenty-ui/src/primitives/data-display/Tag/Tag.tsx b/packages/twenty-ui/src/primitives/data-display/Tag/Tag.tsxindex 55e11ba2c23..e42b17893b5 100644--- a/packages/twenty-ui/src/primitives/data-display/Tag/Tag.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Tag/Tag.tsx@@ -8,7 +8,7 @@ import {} from 'react';import { OverflowingTextWithTooltip } from '@ui/primitives/typography/OverflowingTextWithTooltip/OverflowingTextWithTooltip';-import { themeCssVariables } from '@ui/theme-constants';+import { themeCssVariables } from '@ui/theme';import { isDefined } from '@ui/utilities/utils/isDefined';import styles from './Tag.module.scss';diff --git a/packages/twenty-ui/src/primitives/data-display/Tag/__tests__/Tag.test.tsx b/packages/twenty-ui/src/primitives/data-display/Tag/__tests__/Tag.test.tsxindex 3772a5e3262..21c93475ae4 100644--- a/packages/twenty-ui/src/primitives/data-display/Tag/__tests__/Tag.test.tsx+++ b/packages/twenty-ui/src/primitives/data-display/Tag/__tests__/Tag.test.tsx@@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react';import userEvent from '@testing-library/user-event';import { expect, it, vi } from 'vitest';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { Tag } from '../Tag';import styles from '../Tag.module.scss';diff --git a/packages/twenty-ui/src/primitives/feedback/Loader/Loader.tsx b/packages/twenty-ui/src/primitives/feedback/Loader/Loader.tsxindex bc8a4ae4b69..6d51e2758b7 100644--- a/packages/twenty-ui/src/primitives/feedback/Loader/Loader.tsx+++ b/packages/twenty-ui/src/primitives/feedback/Loader/Loader.tsx@@ -1,5 +1,4 @@-import { type ThemeColor } from '@ui/theme';-import { themeCssVariables } from '@ui/theme-constants';+import { type ThemeColor, themeCssVariables } from '@ui/theme';import styles from './Loader.module.scss';diff --git a/packages/twenty-ui/src/primitives/input/Select/__stories__/Select.portals.stories.tsx b/packages/twenty-ui/src/primitives/input/Select/__stories__/Select.portals.stories.tsxindex 40175b9d682..ce448fd892e 100644--- a/packages/twenty-ui/src/primitives/input/Select/__stories__/Select.portals.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Select/__stories__/Select.portals.stories.tsx@@ -4,7 +4,7 @@ import { useState } from 'react';import { expect, userEvent, waitFor, within } from 'storybook/test';import { ComponentDecorator } from '@ui/testing';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { Select } from '../Select';import { SelectExample, type SelectExampleProps } from './SelectExample';diff --git a/packages/twenty-ui/src/primitives/input/Select/internal/SelectPopup.tsx b/packages/twenty-ui/src/primitives/input/Select/internal/SelectPopup.tsxindex fead121256d..eb7a411b955 100644--- a/packages/twenty-ui/src/primitives/input/Select/internal/SelectPopup.tsx+++ b/packages/twenty-ui/src/primitives/input/Select/internal/SelectPopup.tsx@@ -1,7 +1,7 @@import { useDirection } from '@base-ui/react/direction-provider';import { Select as SelectPrimitive } from '@base-ui/react/select';-import { useThemeContainer } from '@ui/theme-constants';+import { useThemeContainer } from '@ui/theme';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';import styles from '../Select.module.scss';diff --git a/packages/twenty-ui/src/primitives/input/Switch/__stories__/Switch.stories.tsx b/packages/twenty-ui/src/primitives/input/Switch/__stories__/Switch.stories.tsxindex 1c8c4cebad3..cd9b219b80c 100644--- a/packages/twenty-ui/src/primitives/input/Switch/__stories__/Switch.stories.tsx+++ b/packages/twenty-ui/src/primitives/input/Switch/__stories__/Switch.stories.tsx@@ -6,7 +6,7 @@ import {type CatalogStory,ComponentDecorator,} from '@ui/testing';-import { themeCssVariables } from '@ui/theme-constants';+import { themeCssVariables } from '@ui/theme';import { Switch } from '../Switch';import { type SwitchProps } from '../types/SwitchProps';diff --git a/packages/twenty-ui/src/primitives/surfaces/AlertDialog/__stories__/AlertDialog.portals.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/AlertDialog/__stories__/AlertDialog.portals.stories.tsxindex 9703a6a96a3..2cb2f131e8a 100644--- a/packages/twenty-ui/src/primitives/surfaces/AlertDialog/__stories__/AlertDialog.portals.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/AlertDialog/__stories__/AlertDialog.portals.stories.tsx@@ -4,7 +4,7 @@ import { useRef, useState } from 'react';import { expect, userEvent, waitFor, within } from 'storybook/test';import { ComponentDecorator } from '@ui/testing';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { AlertDialogExample } from './AlertDialogExample';import { waitForAlertDialog } from './waitForAlertDialog';diff --git a/packages/twenty-ui/src/primitives/surfaces/AlertDialog/internal/AlertDialogPopup.tsx b/packages/twenty-ui/src/primitives/surfaces/AlertDialog/internal/AlertDialogPopup.tsxindex d5b0cef6714..93e2c761f93 100644--- a/packages/twenty-ui/src/primitives/surfaces/AlertDialog/internal/AlertDialogPopup.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/AlertDialog/internal/AlertDialogPopup.tsx@@ -1,7 +1,7 @@import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';import { useDirection } from '@base-ui/react/direction-provider';-import { useThemeContainer } from '@ui/theme-constants';+import { useThemeContainer } from '@ui/theme';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';import styles from '@ui/primitives/surfaces/internal/Dialog.module.scss';diff --git a/packages/twenty-ui/src/primitives/surfaces/Dialog/__stories__/Dialog.portals.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Dialog/__stories__/Dialog.portals.stories.tsxindex 3e88c93f593..db317f307b4 100644--- a/packages/twenty-ui/src/primitives/surfaces/Dialog/__stories__/Dialog.portals.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Dialog/__stories__/Dialog.portals.stories.tsx@@ -5,7 +5,7 @@ import { useRef, useState } from 'react';import { expect, userEvent, waitFor, within } from 'storybook/test';import { ComponentDecorator } from '@ui/testing';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { DialogExample } from './DialogExample';import { waitForDialog } from './waitForDialog';diff --git a/packages/twenty-ui/src/primitives/surfaces/Dialog/__tests__/DialogTitle.test.tsx b/packages/twenty-ui/src/primitives/surfaces/Dialog/__tests__/DialogTitle.test.tsxindex debc262d422..66692e4547b 100644--- a/packages/twenty-ui/src/primitives/surfaces/Dialog/__tests__/DialogTitle.test.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Dialog/__tests__/DialogTitle.test.tsx@@ -3,7 +3,7 @@ import { type ReactNode } from 'react';import { expect, it } from 'vitest';import { runComponentConformance } from '@test-utilities/conformance/runComponentConformance';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { Dialog } from '../Dialog';diff --git a/packages/twenty-ui/src/primitives/surfaces/Dialog/internal/DialogPopup.tsx b/packages/twenty-ui/src/primitives/surfaces/Dialog/internal/DialogPopup.tsxindex a495b447cd5..d25034d0ce4 100644--- a/packages/twenty-ui/src/primitives/surfaces/Dialog/internal/DialogPopup.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Dialog/internal/DialogPopup.tsx@@ -2,7 +2,7 @@ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';import { isBoolean } from '@sniptt/guards';import { useDirection } from '@base-ui/react/direction-provider';-import { useThemeContainer } from '@ui/theme-constants';+import { useThemeContainer } from '@ui/theme';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';import styles from '@ui/primitives/surfaces/internal/Dialog.module.scss';diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.portals.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.portals.stories.tsxindex 1f343fb6b1b..341ccec7fbb 100644--- a/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.portals.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.portals.stories.tsx@@ -3,7 +3,7 @@ import { useId, useState } from 'react';import { expect, userEvent, within } from 'storybook/test';import { ComponentDecorator } from '@ui/testing';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { Menu } from '../Menu';import { type MenuPopupProps } from '../types/MenuPopupProps';diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopup.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopup.tsxindex fee19a8b12d..73d65474e0d 100644--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopup.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopup.tsx@@ -1,7 +1,7 @@import { Menu as MenuPrimitive } from '@base-ui/react/menu';import { useContext } from 'react';-import { useThemeContainer } from '@ui/theme-constants';+import { useThemeContainer } from '@ui/theme';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';import styles from '../Menu.module.scss';diff --git a/packages/twenty-ui/src/primitives/surfaces/Popover/__stories__/Popover.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Popover/__stories__/Popover.stories.tsxindex e2252492039..6f764c13a2a 100644--- a/packages/twenty-ui/src/primitives/surfaces/Popover/__stories__/Popover.stories.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Popover/__stories__/Popover.stories.tsx@@ -10,7 +10,7 @@ import {type CatalogStory,ComponentDecorator,} from '@ui/testing';-import { ThemeProvider } from '@ui/theme-constants/ThemeProvider';+import { ThemeProvider } from '@ui/theme/ThemeProvider';import { Popover } from '../Popover';import { type PopoverPopupProps } from '../types/PopoverPopupProps';diff --git a/packages/twenty-ui/src/primitives/surfaces/Popover/internal/PopoverPopup.tsx b/packages/twenty-ui/src/primitives/surfaces/Popover/internal/PopoverPopup.tsxindex c3955d9d3fe..1205509caa0 100644--- a/packages/twenty-ui/src/primitives/surfaces/Popover/internal/PopoverPopup.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Popover/internal/PopoverPopup.tsx@@ -1,6 +1,6 @@import { Popover as PopoverPrimitive } from '@base-ui/react/popover';-import { useThemeContainer } from '@ui/theme-constants';+import { useThemeContainer } from '@ui/theme';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';import styles from '../Popover.module.scss';diff --git a/packages/twenty-ui/src/primitives/surfaces/Tooltip/internal/TooltipPopup.tsx b/packages/twenty-ui/src/primitives/surfaces/Tooltip/internal/TooltipPopup.tsxindex eef5afe22ce..2d15f023e0e 100644--- a/packages/twenty-ui/src/primitives/surfaces/Tooltip/internal/TooltipPopup.tsx+++ b/packages/twenty-ui/src/primitives/surfaces/Tooltip/internal/TooltipPopup.tsx@@ -1,7 +1,7 @@import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';import { isNumber, isString } from '@sniptt/guards';-import { useThemeContainer } from '@ui/theme-constants';+import { useThemeContainer } from '@ui/theme';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';import styles from '../Tooltip.module.scss';diff --git a/packages/twenty-ui/src/testing/decorators/ComponentDecorator.tsx b/packages/twenty-ui/src/testing/decorators/ComponentDecorator.tsxindex 6e24cd0d545..04d3cf7c342 100644--- a/packages/twenty-ui/src/testing/decorators/ComponentDecorator.tsx+++ b/packages/twenty-ui/src/testing/decorators/ComponentDecorator.tsx@@ -1,6 +1,6 @@import { type Decorator } from '@storybook/react-vite';-import { themeCssVariables } from '@ui/theme-constants';+import { themeCssVariables } from '@ui/theme';import { ComponentStorybookLayout } from '../ComponentStorybookLayout';diff --git a/packages/twenty-ui/src/theme-constants/ThemeProvider.tsx b/packages/twenty-ui/src/theme-constants/ThemeProvider.tsxdeleted file mode 100644index 7c94e6f9c40..00000000000--- a/packages/twenty-ui/src/theme-constants/ThemeProvider.tsx+++ /dev/null@@ -1,174 +0,0 @@-import { isNonEmptyString } from '@sniptt/guards';-import { clsx } from 'clsx';-import { createContext, useLayoutEffect, useRef, useState } from 'react';--import { isDefined } from '@ui/utilities/utils/isDefined';--import { ThemeScopeContext } from './ThemeScopeContext';-import { themeCssVariables } from './themeCssVariables';-import { type ThemeType } from './themeTypes';--export type ThemeContextType = {- theme: ThemeType;- colorScheme: 'light' | 'dark';-};--export type ThemeOverrides = Record<string, string | number>;--const resolveTokenValue = (- cssVariableReference: string,- computedValue: string,-): string | number => {- if (!isNonEmptyString(computedValue)) {- return cssVariableReference;- }-- const numericValue = Number(computedValue);-- return Number.isNaN(numericValue) ? computedValue : numericValue;-};--const computeThemeFromCss = (sourceElement?: HTMLElement): ThemeType => {- if (- typeof document === 'undefined' ||- typeof getComputedStyle !== 'function'- ) {- return themeCssVariables as unknown as ThemeType;- }-- const computedStyle = getComputedStyle(- sourceElement ?? document.documentElement,- );-- const resolve = (obj: Record<string, unknown>): Record<string, unknown> => {- const result: Record<string, unknown> = {};-- for (const key of Object.keys(obj)) {- const value = obj[key];-- if (typeof value === 'string' && value.startsWith('var(')) {- const varName = value.slice(4, -1);-- result[key] = resolveTokenValue(- value,- computedStyle.getPropertyValue(varName).trim(),- );- } else if (typeof value === 'object' && value !== null) {- result[key] = resolve(value as Record<string, unknown>);- } else {- result[key] = value;- }- }-- return result;- };-- return resolve(- themeCssVariables as unknown as Record<string, unknown>,- ) as unknown as ThemeType;-};--const applyColorSchemeClass = (colorScheme: 'light' | 'dark') => {- if (typeof document === 'undefined') return;- const root = document.documentElement;- if (!root?.classList) return;- root.classList.toggle('dark', colorScheme === 'dark');- root.classList.toggle('light', colorScheme === 'light');-};--export const ThemeContext = createContext<ThemeContextType>({- theme: themeCssVariables as unknown as ThemeType,- colorScheme: 'light',-});--export const ThemeProvider = ({- children,- colorScheme,- applyToRoot = true,- overrides,- className,- scale,-}: {- children: React.ReactNode;- colorScheme: 'light' | 'dark';- applyToRoot?: boolean;- overrides?: ThemeOverrides;- className?: string;- scale?: number;-}) => {- const isScoped = isDefined(overrides) || !applyToRoot;-- const wrapperRef = useRef<HTMLDivElement>(null);-- const [theme, setTheme] = useState<ThemeType>(() => {- if (applyToRoot) {- applyColorSchemeClass(colorScheme);- }- return computeThemeFromCss();- });- const [scopeContainer, setScopeContainer] = useState<HTMLElement | null>(- null,- );-- const overridesKey = isDefined(overrides) ? JSON.stringify(overrides) : '';-- useLayoutEffect(() => {- if (applyToRoot) {- applyColorSchemeClass(colorScheme);- }-- setTheme(- computeThemeFromCss(- isScoped ? (wrapperRef.current ?? undefined) : undefined,- ),- );- setScopeContainer(isScoped ? wrapperRef.current : null);- }, [colorScheme, applyToRoot, isScoped, overridesKey]);-- // The interface scale preference is consumed by the root zoom rule in the- // app stylesheet through --t-scale-user, which only reads from the html- // element, so scoped providers ignore the prop instead of writing a value- // nothing consumes. Computed styles stay unzoomed, so no theme recompute is- // needed when the value changes. The cleanup is only registered from the- // branch that set the property, so a provider mounted without a scale can- // never clear a value another provider owns.- useLayoutEffect(() => {- if (typeof document === 'undefined' || isScoped || !isDefined(scale)) {- return;- }-- const scaleTarget = document.documentElement;-- scaleTarget.style.setProperty('--t-scale-user', String(scale));-- return () => {- scaleTarget.style.removeProperty('--t-scale-user');- };- }, [scale, isScoped]);-- const contextValue = { theme, colorScheme };-- if (!isScoped) {- return (- <ThemeContext.Provider value={contextValue}>- {children}- </ThemeContext.Provider>- );- }-- const overridesStyle = (overrides ?? {}) as React.CSSProperties;-- return (- <ThemeContext.Provider value={contextValue}>- <ThemeScopeContext.Provider value={scopeContainer}>- <div- ref={wrapperRef}- className={clsx(applyToRoot ? undefined : colorScheme, className)}- style={{ display: 'contents', ...overridesStyle }}- >- {children}- </div>- </ThemeScopeContext.Provider>- </ThemeContext.Provider>- );-};diff --git a/packages/twenty-ui/src/theme-constants/ThemeScopeContext.ts b/packages/twenty-ui/src/theme-constants/ThemeScopeContext.tsdeleted file mode 100644index ffd07d85c3d..00000000000--- a/packages/twenty-ui/src/theme-constants/ThemeScopeContext.ts+++ /dev/null@@ -1,3 +0,0 @@-import { createContext } from 'react';--export const ThemeScopeContext = createContext<HTMLElement | null>(null);diff --git a/packages/twenty-ui/src/theme-constants/__stories__/ThemeProvider.stories.tsx b/packages/twenty-ui/src/theme-constants/__stories__/ThemeProvider.stories.tsxdeleted file mode 100644index c4aa45283a9..00000000000--- a/packages/twenty-ui/src/theme-constants/__stories__/ThemeProvider.stories.tsx+++ /dev/null@@ -1,188 +0,0 @@-import { isNonEmptyString } from '@sniptt/guards';-import { type Meta, type StoryObj } from '@storybook/react-vite';-import { useState } from 'react';-import { expect, userEvent, within } from 'storybook/test';--import { ThemeProvider } from '../ThemeProvider';-import { themeCssVariables } from '../themeCssVariables';-import { useTheme } from '../useTheme';--const ThemeTokens = () => {- const theme = useTheme();-- return (- <>- <output aria-label="Medium icon size">- {JSON.stringify(theme.icon.size.md)}- </output>- <output aria-label="Small icon size">- {JSON.stringify(theme.icon.size.sm)}- </output>- <output aria-label="Primary font color">- {JSON.stringify(theme.font.color.primary)}- </output>- <output aria-label="Small border radius">- {JSON.stringify(theme.border.radius.sm)}- </output>- </>- );-};--type ScaleExampleProps = {- initialScale?: number | null;-};--const ScaleExample = ({ initialScale = 1.25 }: ScaleExampleProps) => {- const [scale, setScale] = useState<number | undefined>(- initialScale ?? undefined,- );- const [mounted, setMounted] = useState(true);-- return (- <>- {mounted && (- <ThemeProvider colorScheme="light" scale={scale}>- <span>Theme active</span>- </ThemeProvider>- )}- <button type="button" onClick={() => setScale(0.9)}>- Change scale- </button>- <button type="button" onClick={() => setScale(undefined)}>- Reset scale- </button>- <button type="button" onClick={() => setMounted(false)}>- Unmount theme- </button>- </>- );-};--const readInlineScale = () =>- document.documentElement.style.getPropertyValue('--t-scale-user');--const meta: Meta<typeof ThemeProvider> = {- title: 'UI/Theme/ThemeProvider',- component: ThemeProvider,- args: { colorScheme: 'light', children: <ThemeTokens /> },- beforeEach: () => {- const previousScale = readInlineScale();- document.documentElement.style.removeProperty('--t-scale-user');-- return () => {- if (isNonEmptyString(previousScale)) {- document.documentElement.style.setProperty(- '--t-scale-user',- previousScale,- );- } else {- document.documentElement.style.removeProperty('--t-scale-user');- }- };- },-};--export default meta;-type Story = StoryObj<typeof ThemeProvider>;--export const ScaleChanges: Story = {- render: () => <ScaleExample />,- play: async ({ canvasElement }) => {- const canvas = within(canvasElement);-- await expect(readInlineScale()).toBe('1.25');- await userEvent.click(canvas.getByRole('button', { name: 'Change scale' }));- await expect(readInlineScale()).toBe('0.9');- await userEvent.click(canvas.getByRole('button', { name: 'Reset scale' }));- await expect(readInlineScale()).toBe('');- },-};--export const ScaleCleanup: Story = {- render: () => <ScaleExample />,- play: async ({ canvasElement }) => {- await expect(readInlineScale()).toBe('1.25');- await userEvent.click(- within(canvasElement).getByRole('button', { name: 'Unmount theme' }),- );- await expect(readInlineScale()).toBe('');- },-};--export const ScopedScale: Story = {- args: { overrides: {}, scale: 1.25 },- play: async () => {- await expect(readInlineScale()).toBe('');- },-};--export const ExistingScale: Story = {- beforeEach: () => {- document.documentElement.style.setProperty('--t-scale-user', '1.25');- },- render: () => <ScaleExample initialScale={null} />,- play: async ({ canvasElement }) => {- await expect(readInlineScale()).toBe('1.25');- await userEvent.click(- within(canvasElement).getByRole('button', { name: 'Unmount theme' }),- );- await expect(readInlineScale()).toBe('1.25');- },-};--export const UnresolvedTokens: Story = {- args: {- applyToRoot: false,- overrides: {- '--t-icon-size-md': 'initial',- '--t-font-color-primary': 'initial',- },- },- play: async ({ canvasElement }) => {- const canvas = within(canvasElement);-- await expect(canvas.getByLabelText('Medium icon size')).toHaveTextContent(- JSON.stringify(themeCssVariables.icon.size.md),- );- await expect(canvas.getByLabelText('Primary font color')).toHaveTextContent(- JSON.stringify(themeCssVariables.font.color.primary),- );- },-};--export const NumericTokens: Story = {- args: {- applyToRoot: false,- overrides: { '--t-icon-size-md': '16', '--t-icon-size-sm': 'initial' },- },- play: async ({ canvasElement }) => {- const canvas = within(canvasElement);-- await expect(canvas.getByLabelText('Medium icon size').textContent).toBe(- '16',- );- await expect(canvas.getByLabelText('Small icon size')).toHaveTextContent(- JSON.stringify(themeCssVariables.icon.size.sm),- );- },-};--export const StringTokens: Story = {- args: {- applyToRoot: false,- overrides: {- '--t-font-color-primary': '#181d27',- '--t-border-radius-sm': '4px',- },- },- play: async ({ canvasElement }) => {- const canvas = within(canvasElement);-- await expect(canvas.getByLabelText('Primary font color').textContent).toBe(- '"#181d27"',- );- await expect(canvas.getByLabelText('Small border radius').textContent).toBe(- '"4px"',- );- },-};diff --git a/packages/twenty-ui/src/theme-constants/index.ts b/packages/twenty-ui/src/theme-constants/index.tsdeleted file mode 100644index 415337d7345..00000000000--- a/packages/twenty-ui/src/theme-constants/index.ts+++ /dev/null@@ -1,19 +0,0 @@-/*- * _____ _- *|_ _|_ _____ _ __ | |_ _ _- * | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file- * | | \ V V / __/ | | | |_| |_| | Any edits to this will be overridden- * |_| \_/\_/ \___|_| |_|\__|\__, |- * |___/- */--export { MOBILE_VIEWPORT } from './constants';-export { getNextThemeColor } from './getNextThemeColor';-export { themeCssVariables } from './themeCssVariables';-export type { ThemeContextType, ThemeOverrides } from './ThemeProvider';-export { ThemeContext, ThemeProvider } from './ThemeProvider';-export { ThemeScopeContext } from './ThemeScopeContext';-export type { ThemeType } from './themeTypes';-export { useTheme } from './useTheme';-export { useThemeColorScheme } from './useThemeColorScheme';-export { useThemeContainer } from './useThemeContainer';diff --git a/packages/twenty-ui/src/theme-constants/useTheme.ts b/packages/twenty-ui/src/theme-constants/useTheme.tsdeleted file mode 100644index 42993d06e42..00000000000--- a/packages/twenty-ui/src/theme-constants/useTheme.ts+++ /dev/null@@ -1,6 +0,0 @@-import { useContext } from 'react';--import { ThemeContext } from './ThemeProvider';-import { type ThemeType } from './themeTypes';--export const useTheme = (): ThemeType => useContext(ThemeContext).theme;diff --git a/packages/twenty-ui/src/theme-constants/useThemeColorScheme.ts b/packages/twenty-ui/src/theme-constants/useThemeColorScheme.tsdeleted file mode 100644index 0d47bff3461..00000000000--- a/packages/twenty-ui/src/theme-constants/useThemeColorScheme.ts+++ /dev/null@@ -1,6 +0,0 @@-import { useContext } from 'react';--import { ThemeContext } from './ThemeProvider';--export const useThemeColorScheme = (): 'light' | 'dark' =>- useContext(ThemeContext).colorScheme;diff --git a/packages/twenty-ui/src/theme-constants/useThemeContainer.ts b/packages/twenty-ui/src/theme-constants/useThemeContainer.tsdeleted file mode 100644index fd1cc8a8827..00000000000--- a/packages/twenty-ui/src/theme-constants/useThemeContainer.ts+++ /dev/null@@ -1,6 +0,0 @@-import { useContext } from 'react';--import { ThemeScopeContext } from './ThemeScopeContext';--export const useThemeContainer = (): HTMLElement | null =>- useContext(ThemeScopeContext);diff --git a/packages/twenty-ui/src/theme/ThemeOverrides.ts b/packages/twenty-ui/src/theme/ThemeOverrides.tsnew file mode 100644index 00000000000..ee7035df16b--- /dev/null+++ b/packages/twenty-ui/src/theme/ThemeOverrides.ts@@ -0,0 +1 @@+export type ThemeOverrides = Record<string, string | number>;diff --git a/packages/twenty-ui/src/theme/ThemeProvider.tsx b/packages/twenty-ui/src/theme/ThemeProvider.tsxnew file mode 100644index 00000000000..85b1202a3db--- /dev/null+++ b/packages/twenty-ui/src/theme/ThemeProvider.tsx@@ -0,0 +1,127 @@+import { clsx } from 'clsx';+import React from 'react';++import { isDefined } from '@ui/utilities/utils/isDefined';++import { computeThemeFromCss } from './internal/computeThemeFromCss';+import { getThemeContext } from './internal/getThemeContext';+import { getThemeScopeContext } from './internal/getThemeScopeContext';+import { resolveExplicitTheme } from './internal/resolveExplicitTheme';+import { type ThemeContextType } from './internal/ThemeContextType';+import { type ThemeProviderProps } from './ThemeProviderProps';+import { type ThemeType } from './themeTypes';++const applyColorSchemeClass = (colorScheme: 'light' | 'dark') => {+ if (typeof document === 'undefined') return;+ const root = document.documentElement;+ if (!root?.classList) return;+ root.classList.toggle('dark', colorScheme === 'dark');+ root.classList.toggle('light', colorScheme === 'light');+};++export const ThemeProvider = ({+ children,+ colorScheme,+ applyToRoot = true,+ overrides,+ className,+ scale,+ theme: providedTheme,+}: ThemeProviderProps) => {+ const ThemeContext = getThemeContext();+ const ThemeScopeContext = getThemeScopeContext();+ const isScoped = isDefined(overrides) || !applyToRoot;++ const parentThemeContext = React.useContext(ThemeContext);+ const resolvedProvidedTheme = React.useMemo(+ () =>+ isDefined(providedTheme)+ ? resolveExplicitTheme(providedTheme)+ : undefined,+ [providedTheme],+ );+ const explicitTheme =+ resolvedProvidedTheme ?? parentThemeContext.explicitTheme;+ const hasExplicitTheme = isDefined(explicitTheme);++ const wrapperRef = React.useRef<HTMLDivElement>(null);++ const [cssTheme, setCssTheme] = React.useState<ThemeType | undefined>(() => {+ if (applyToRoot) {+ applyColorSchemeClass(colorScheme);+ }+ return hasExplicitTheme ? undefined : computeThemeFromCss();+ });+ const [scopeContainer, setScopeContainer] =+ React.useState<HTMLElement | null>(null);++ const overridesKey = isDefined(overrides) ? JSON.stringify(overrides) : '';++ React.useLayoutEffect(() => {+ if (applyToRoot) {+ applyColorSchemeClass(colorScheme);+ }++ if (!hasExplicitTheme) {+ setCssTheme(+ computeThemeFromCss(+ isScoped ? (wrapperRef.current ?? undefined) : undefined,+ ),+ );+ }++ setScopeContainer(isScoped ? wrapperRef.current : null);+ }, [colorScheme, applyToRoot, isScoped, overridesKey, hasExplicitTheme]);++ // The interface scale preference is consumed by the root zoom rule in the+ // app stylesheet through --t-scale-user, which only reads from the html+ // element, so scoped providers ignore the prop instead of writing a value+ // nothing consumes. Computed styles stay unzoomed, so no theme recompute is+ // needed when the value changes. The cleanup is only registered from the+ // branch that set the property, so a provider mounted without a scale can+ // never clear a value another provider owns.+ React.useLayoutEffect(() => {+ if (typeof document === 'undefined' || isScoped || !isDefined(scale)) {+ return;+ }++ const scaleTarget = document.documentElement;++ scaleTarget.style.setProperty('--t-scale-user', String(scale));++ return () => {+ scaleTarget.style.removeProperty('--t-scale-user');+ };+ }, [scale, isScoped]);++ const theme = explicitTheme ?? cssTheme ?? parentThemeContext.theme;++ const contextValue = React.useMemo<ThemeContextType>(+ () => ({ theme, colorScheme, explicitTheme }),+ [theme, colorScheme, explicitTheme],+ );++ if (!isScoped) {+ return (+ <ThemeContext.Provider value={contextValue}>+ {children}+ </ThemeContext.Provider>+ );+ }++ const overridesStyle = (overrides ?? {}) as React.CSSProperties;++ return (+ <ThemeContext.Provider value={contextValue}>+ <ThemeScopeContext.Provider value={scopeContainer}>+ <div+ ref={wrapperRef}+ className={clsx(applyToRoot ? undefined : colorScheme, className)}+ style={{ display: 'contents', ...overridesStyle }}+ >+ {children}+ </div>+ </ThemeScopeContext.Provider>+ </ThemeContext.Provider>+ );+};diff --git a/packages/twenty-ui/src/theme/ThemeProviderProps.ts b/packages/twenty-ui/src/theme/ThemeProviderProps.tsnew file mode 100644index 00000000000..d8444d3adcd--- /dev/null+++ b/packages/twenty-ui/src/theme/ThemeProviderProps.ts@@ -0,0 +1,15 @@+import { type ReactNode } from 'react';++import { type THEME_LIGHT } from './constants/ThemeLight';+import { type ThemeOverrides } from './ThemeOverrides';+import { type ThemeType } from './themeTypes';++export type ThemeProviderProps = {+ children: ReactNode;+ colorScheme: 'light' | 'dark';+ applyToRoot?: boolean;+ overrides?: ThemeOverrides;+ className?: string;+ scale?: number;+ theme?: ThemeType | typeof THEME_LIGHT;+};diff --git a/packages/twenty-ui/src/theme/__stories__/ThemeProvider.stories.tsx b/packages/twenty-ui/src/theme/__stories__/ThemeProvider.stories.tsxnew file mode 100644index 00000000000..31eaea35eea--- /dev/null+++ b/packages/twenty-ui/src/theme/__stories__/ThemeProvider.stories.tsx@@ -0,0 +1,381 @@+import { isNonEmptyString } from '@sniptt/guards';+import { type Meta, type StoryObj } from '@storybook/react-vite';+import { useState } from 'react';+import { expect, userEvent, waitFor, within } from 'storybook/test';++import { Button } from '@ui/primitives/input';+import { Popover } from '@ui/primitives/surfaces';+import {+ THEME_DARK,+ THEME_LIGHT,+ ThemeProvider,+ themeCssVariables,+ useTheme,+ useThemeColorScheme,+ useThemeContainer,+} from '@ui/theme';++const ThemeTokens = () => {+ const theme = useTheme();++ return (+ <>+ <output aria-label="Medium icon size">+ {JSON.stringify(theme.icon.size.md)}+ </output>+ <output aria-label="Small icon size">+ {JSON.stringify(theme.icon.size.sm)}+ </output>+ <output aria-label="Primary font color">+ {JSON.stringify(theme.font.color.primary)}+ </output>+ <output aria-label="Small border radius">+ {JSON.stringify(theme.border.radius.sm)}+ </output>+ </>+ );+};++type ScaleExampleProps = {+ initialScale?: number | null;+};++const ScaleExample = ({ initialScale = 1.25 }: ScaleExampleProps) => {+ const [scale, setScale] = useState<number | undefined>(+ initialScale ?? undefined,+ );+ const [mounted, setMounted] = useState(true);++ return (+ <>+ {mounted && (+ <ThemeProvider colorScheme="light" scale={scale}>+ <span>Theme active</span>+ </ThemeProvider>+ )}+ <Button onClick={() => setScale(0.9)}>Change scale</Button>+ <Button onClick={() => setScale(undefined)}>Reset scale</Button>+ <Button onClick={() => setMounted(false)}>Unmount theme</Button>+ </>+ );+};++const readInlineScale = () =>+ document.documentElement.style.getPropertyValue('--t-scale-user');++const meta: Meta<typeof ThemeProvider> = {+ title: 'UI/Theme/ThemeProvider',+ component: ThemeProvider,+ args: { colorScheme: 'light', children: <ThemeTokens /> },+ beforeEach: () => {+ const previousScale = readInlineScale();+ document.documentElement.style.removeProperty('--t-scale-user');++ return () => {+ if (isNonEmptyString(previousScale)) {+ document.documentElement.style.setProperty(+ '--t-scale-user',+ previousScale,+ );+ } else {+ document.documentElement.style.removeProperty('--t-scale-user');+ }+ };+ },+};++export default meta;+type Story = StoryObj<typeof ThemeProvider>;++export const ScaleChanges: Story = {+ render: () => <ScaleExample />,+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);++ await expect(readInlineScale()).toBe('1.25');+ await userEvent.click(canvas.getByRole('button', { name: 'Change scale' }));+ await expect(readInlineScale()).toBe('0.9');+ await userEvent.click(canvas.getByRole('button', { name: 'Reset scale' }));+ await expect(readInlineScale()).toBe('');+ },+};++export const ScaleCleanup: Story = {+ render: () => <ScaleExample />,+ play: async ({ canvasElement }) => {+ await expect(readInlineScale()).toBe('1.25');+ await userEvent.click(+ within(canvasElement).getByRole('button', { name: 'Unmount theme' }),+ );+ await expect(readInlineScale()).toBe('');+ },+};++export const ScopedScale: Story = {+ args: { overrides: {}, scale: 1.25 },+ play: async () => {+ await expect(readInlineScale()).toBe('');+ },+};++export const ExistingScale: Story = {+ beforeEach: () => {+ document.documentElement.style.setProperty('--t-scale-user', '1.25');+ },+ render: () => <ScaleExample initialScale={null} />,+ play: async ({ canvasElement }) => {+ await expect(readInlineScale()).toBe('1.25');+ await userEvent.click(+ within(canvasElement).getByRole('button', { name: 'Unmount theme' }),+ );+ await expect(readInlineScale()).toBe('1.25');+ },+};++export const UnresolvedTokens: Story = {+ args: {+ applyToRoot: false,+ overrides: {+ '--t-icon-size-md': 'initial',+ '--t-font-color-primary': 'initial',+ },+ },+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);++ await expect(canvas.getByLabelText('Medium icon size')).toHaveTextContent(+ JSON.stringify(themeCssVariables.icon.size.md),+ );+ await expect(canvas.getByLabelText('Primary font color')).toHaveTextContent(+ JSON.stringify(themeCssVariables.font.color.primary),+ );+ },+};++export const NumericTokens: Story = {+ args: {+ applyToRoot: false,+ overrides: { '--t-icon-size-md': '16', '--t-icon-size-sm': 'initial' },+ },+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);++ await expect(canvas.getByLabelText('Medium icon size').textContent).toBe(+ '16',+ );+ await expect(canvas.getByLabelText('Small icon size')).toHaveTextContent(+ JSON.stringify(themeCssVariables.icon.size.sm),+ );+ },+};++export const StringTokens: Story = {+ args: {+ applyToRoot: false,+ overrides: {+ '--t-font-color-primary': '#181d27',+ '--t-border-radius-sm': '4px',+ },+ },+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);++ await expect(canvas.getByLabelText('Primary font color').textContent).toBe(+ '"#181d27"',+ );+ await expect(canvas.getByLabelText('Small border radius').textContent).toBe(+ '"4px"',+ );+ },+};++const ThemeReadout = () => {+ const theme = useTheme();+ const colorScheme = useThemeColorScheme();+ const container = useThemeContainer();++ return (+ <>+ <output aria-label="Color scheme">{colorScheme}</output>+ <output aria-label="Theme color">{theme.font.color.primary}</output>+ <output aria-label="Theme scope">{container?.className ?? 'root'}</output>+ <output aria-label="Icon size">{theme.icon.size.md}</output>+ <output aria-label="Spacing">{theme.spacing[3]}</output>+ </>+ );+};++const ChangingTheme = ({+ staticValues = false,+}: {+ staticValues?: boolean;+}) => {+ const [colorScheme, setColorScheme] = useState<'light' | 'dark'>('light');+ const staticTheme = colorScheme === 'dark' ? THEME_DARK : THEME_LIGHT;++ return (+ <ThemeProvider+ colorScheme={colorScheme}+ applyToRoot={false}+ theme={staticValues ? staticTheme : undefined}+ >+ <div+ style={{+ background: themeCssVariables.background.primary,+ color: themeCssVariables.font.color.primary,+ padding: 16,+ }}+ >+ <ThemeReadout />+ <Button onClick={() => setColorScheme('dark')}>Use dark theme</Button>+ </div>+ </ThemeProvider>+ );+};++export const ColorSchemeChanges: Story = {+ render: () => <ChangingTheme />,+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ await waitFor(() =>+ expect(canvas.getByLabelText('Theme color')).toHaveTextContent(+ THEME_LIGHT.font.color.primary,+ ),+ );+ await expect(canvas.getByLabelText('Spacing')).toHaveTextContent('12px');+ await userEvent.click(+ canvas.getByRole('button', { name: 'Use dark theme' }),+ );+ await expect(canvas.getByLabelText('Color scheme')).toHaveTextContent(+ 'dark',+ );+ await expect(canvas.getByLabelText('Theme color')).toHaveTextContent(+ THEME_DARK.font.color.primary,+ );+ },+};++export const StaticValues: Story = {+ ...ColorSchemeChanges,+ render: () => <ChangingTheme staticValues />,+};++const NestedThemes = () => {+ const [fontColor, setFontColor] = useState('#f5f5f5');+ const [container, setContainer] = useState<HTMLDivElement | null>(null);++ return (+ <ThemeProvider+ colorScheme="light"+ applyToRoot={false}+ className="outer-theme"+ >+ <section aria-label="Outer theme">+ <ThemeReadout />+ </section>+ <div+ ref={setContainer}+ role="region"+ aria-label="Explicit portal container"+ />+ <ThemeProvider+ colorScheme="dark"+ applyToRoot={false}+ className="inner-theme"+ overrides={{ '--t-font-color-primary': fontColor }}+ >+ <div+ style={{+ background: themeCssVariables.background.primary,+ color: themeCssVariables.font.color.primary,+ padding: 16,+ }}+ >+ <section aria-label="Inner theme">+ <ThemeReadout />+ </section>+ <Button onClick={() => setFontColor('#ededed')}>+ Change override+ </Button>+ <Popover.Root>+ <Popover.Trigger render={<Button>Open scoped portal</Button>} />+ <Popover.Popup>+ <Popover.Title>Scoped portal</Popover.Title>+ <ThemeReadout />+ <Popover.Close render={<Button>Close scoped portal</Button>} />+ </Popover.Popup>+ </Popover.Root>+ <Popover.Root>+ <Popover.Trigger render={<Button>Open explicit portal</Button>} />+ <Popover.Popup container={container}>+ <Popover.Title>Explicit portal</Popover.Title>+ <Popover.Close render={<Button>Close explicit portal</Button>} />+ </Popover.Popup>+ </Popover.Root>+ </div>+ </ThemeProvider>+ </ThemeProvider>+ );+};++export const NestedScopesAndPortals: Story = {+ render: () => <NestedThemes />,+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ const outer = within(canvas.getByRole('region', { name: 'Outer theme' }));+ const inner = within(canvas.getByRole('region', { name: 'Inner theme' }));+ await expect(outer.getByLabelText('Color scheme')).toHaveTextContent(+ 'light',+ );+ await expect(inner.getByLabelText('Color scheme')).toHaveTextContent(+ 'dark',+ );+ await expect(inner.getByLabelText('Theme scope')).toHaveTextContent(+ 'inner-theme',+ );+ await expect(inner.getByLabelText('Theme color')).toHaveTextContent(+ '#f5f5f5',+ );+ await userEvent.click(+ canvas.getByRole('button', { name: 'Change override' }),+ );+ await expect(inner.getByLabelText('Theme color')).toHaveTextContent(+ '#ededed',+ );+ await expect(outer.getByLabelText('Theme color')).toHaveTextContent(+ THEME_LIGHT.font.color.primary,+ );+ await userEvent.click(+ canvas.getByRole('button', { name: 'Open scoped portal' }),+ );+ const scopedPortal = await canvas.findByRole('dialog', {+ name: 'Scoped portal',+ });+ await expect(canvasElement.querySelector('.inner-theme')).toContainElement(+ scopedPortal,+ );+ await expect(+ within(scopedPortal).getByLabelText('Theme color'),+ ).toHaveTextContent('#ededed');+ await userEvent.click(+ canvas.getByRole('button', { name: 'Close scoped portal' }),+ );+ await waitFor(() => expect(scopedPortal).not.toBeInTheDocument());+ await userEvent.click(+ canvas.getByRole('button', { name: 'Open explicit portal' }),+ );+ const explicitContainer = canvas.getByRole('region', {+ name: 'Explicit portal container',+ });+ const explicitPortal = await within(explicitContainer).findByRole(+ 'dialog',+ {+ name: 'Explicit portal',+ },+ );+ await waitFor(() => expect(explicitPortal).toBeVisible());+ await userEvent.click(+ canvas.getByRole('button', { name: 'Close explicit portal' }),+ );+ },+};diff --git a/packages/twenty-ui/src/theme/__tests__/ThemeProvider.test.tsx b/packages/twenty-ui/src/theme/__tests__/ThemeProvider.test.tsxnew file mode 100644index 00000000000..189db667424--- /dev/null+++ b/packages/twenty-ui/src/theme/__tests__/ThemeProvider.test.tsx@@ -0,0 +1,73 @@+import { render, screen, within } from '@testing-library/react';+import { expect, it } from 'vitest';++import { THEME_DARK } from '@ui/theme/constants/ThemeDark';+import { THEME_LIGHT } from '@ui/theme/constants/ThemeLight';+import { ThemeProvider } from '@ui/theme/ThemeProvider';+import { useTheme } from '@ui/theme/useTheme';++const SpacingReadout = () => {+ const theme = useTheme();++ return (+ <>+ <output aria-label="Spacing">{theme.spacing[3]}</output>+ <output aria-label="Half spacing">{theme.spacing['0.5']}</output>+ <output aria-label="Font color">{theme.font.color.primary}</output>+ </>+ );+};++it('exposes spacing entries when given static theme values', () => {+ render(+ <ThemeProvider colorScheme="dark" applyToRoot={false} theme={THEME_DARK}>+ <SpacingReadout />+ </ThemeProvider>,+ );++ expect(screen.getByLabelText('Spacing')).toHaveTextContent('12px');+ expect(screen.getByLabelText('Half spacing')).toHaveTextContent('2px');+ expect(screen.getByLabelText('Font color')).toHaveTextContent(+ THEME_DARK.font.color.primary,+ );+});++it('keeps explicit theme values inside nested providers', () => {+ render(+ <ThemeProvider colorScheme="dark" applyToRoot={false} theme={THEME_DARK}>+ <ThemeProvider+ colorScheme="dark"+ applyToRoot={false}+ overrides={{ '--t-font-color-primary': '#ededed' }}+ >+ <section aria-label="Inherited theme">+ <SpacingReadout />+ </section>+ </ThemeProvider>+ <ThemeProvider+ colorScheme="light"+ applyToRoot={false}+ theme={THEME_LIGHT}+ >+ <section aria-label="Replaced theme">+ <SpacingReadout />+ </section>+ </ThemeProvider>+ </ThemeProvider>,+ );++ const inheritedTheme = within(+ screen.getByRole('region', { name: 'Inherited theme' }),+ );+ const replacedTheme = within(+ screen.getByRole('region', { name: 'Replaced theme' }),+ );++ expect(inheritedTheme.getByLabelText('Spacing')).toHaveTextContent('12px');+ expect(inheritedTheme.getByLabelText('Font color')).toHaveTextContent(+ THEME_DARK.font.color.primary,+ );+ expect(replacedTheme.getByLabelText('Font color')).toHaveTextContent(+ THEME_LIGHT.font.color.primary,+ );+});diff --git a/packages/twenty-ui/src/theme-constants/__tests__/getNextThemeColor.test.ts b/packages/twenty-ui/src/theme/__tests__/getNextThemeColor.test.tssimilarity index 100%rename from packages/twenty-ui/src/theme-constants/__tests__/getNextThemeColor.test.tsrename to packages/twenty-ui/src/theme/__tests__/getNextThemeColor.test.tsdiff --git a/packages/twenty-ui/src/theme-constants/constants.ts b/packages/twenty-ui/src/theme/constants/MobileViewport.tssimilarity index 100%rename from packages/twenty-ui/src/theme-constants/constants.tsrename to packages/twenty-ui/src/theme/constants/MobileViewport.tsdiff --git a/packages/twenty-ui/src/theme-constants/getNextThemeColor.ts b/packages/twenty-ui/src/theme/getNextThemeColor.tssimilarity index 100%rename from packages/twenty-ui/src/theme-constants/getNextThemeColor.tsrename to packages/twenty-ui/src/theme/getNextThemeColor.tsdiff --git a/packages/twenty-ui/src/theme/index.ts b/packages/twenty-ui/src/theme/index.tsindex 2d1d8dc2988..724c2ef8d5f 100644--- a/packages/twenty-ui/src/theme/index.ts+++ b/packages/twenty-ui/src/theme/index.ts@@ -14,7 +14,17 @@ export { GRAY_SCALE_DARK } from './constants/GrayScaleDark';export { GRAY_SCALE_LIGHT } from './constants/GrayScaleLight';export type { ThemeColor } from './constants/MainColorNames';export { MAIN_COLOR_NAMES } from './constants/MainColorNames';+export { MOBILE_VIEWPORT } from './constants/MobileViewport';export { RGBA } from './constants/Rgba';export { THEME_COMMON } from './constants/ThemeCommon';export { THEME_DARK } from './constants/ThemeDark';export { THEME_LIGHT } from './constants/ThemeLight';+export { getNextThemeColor } from './getNextThemeColor';+export { themeCssVariables } from './themeCssVariables';+export type { ThemeOverrides } from './ThemeOverrides';+export { ThemeProvider } from './ThemeProvider';+export type { ThemeProviderProps } from './ThemeProviderProps';+export type { ThemeType } from './themeTypes';+export { useTheme } from './useTheme';+export { useThemeColorScheme } from './useThemeColorScheme';+export { useThemeContainer } from './useThemeContainer';diff --git a/packages/twenty-ui/src/theme/internal/ThemeContextType.ts b/packages/twenty-ui/src/theme/internal/ThemeContextType.tsnew file mode 100644index 00000000000..bc55b2b2c74--- /dev/null+++ b/packages/twenty-ui/src/theme/internal/ThemeContextType.ts@@ -0,0 +1,7 @@+import { type ThemeType } from '../themeTypes';++export type ThemeContextType = {+ theme: ThemeType;+ colorScheme: 'light' | 'dark';+ explicitTheme?: ThemeType;+};diff --git a/packages/twenty-ui/src/theme/internal/computeThemeFromCss.ts b/packages/twenty-ui/src/theme/internal/computeThemeFromCss.tsnew file mode 100644index 00000000000..e1345107c3e--- /dev/null+++ b/packages/twenty-ui/src/theme/internal/computeThemeFromCss.ts@@ -0,0 +1,61 @@+import { isNonEmptyString, isObject, isString } from '@sniptt/guards';++import { themeCssVariables } from '../themeCssVariables';+import { type ThemeType } from '../themeTypes';++const resolveTokenValue = ({+ cssVariableReference,+ computedValue,+}: {+ cssVariableReference: string;+ computedValue: string;+}): string | number => {+ if (!isNonEmptyString(computedValue)) {+ return cssVariableReference;+ }++ const numericValue = Number(computedValue);++ return Number.isNaN(numericValue) ? computedValue : numericValue;+};++export const computeThemeFromCss = (sourceElement?: HTMLElement): ThemeType => {+ if (+ typeof document === 'undefined' ||+ typeof getComputedStyle !== 'function'+ ) {+ return themeCssVariables as unknown as ThemeType;+ }++ const computedStyle = getComputedStyle(+ sourceElement ?? document.documentElement,+ );++ const resolve = (+ tokens: Record<string, unknown>,+ ): Record<string, unknown> => {+ const result: Record<string, unknown> = {};++ for (const [key, value] of Object.entries(tokens)) {+ if (isString(value) && value.startsWith('var(')) {+ const cssVariableName = value.slice(4, -1);++ result[key] = resolveTokenValue({+ cssVariableReference: value,+ computedValue: computedStyle.getPropertyValue(cssVariableName).trim(),+ });+ continue;+ }++ result[key] = isObject(value)+ ? resolve(value as Record<string, unknown>)+ : value;+ }++ return result;+ };++ return resolve(+ themeCssVariables as unknown as Record<string, unknown>,+ ) as unknown as ThemeType;+};diff --git a/packages/twenty-ui/src/theme/internal/getThemeContext.ts b/packages/twenty-ui/src/theme/internal/getThemeContext.tsnew file mode 100644index 00000000000..0675638168f--- /dev/null+++ b/packages/twenty-ui/src/theme/internal/getThemeContext.ts@@ -0,0 +1,13 @@+import React from 'react';++import { themeCssVariables } from '../themeCssVariables';+import { type ThemeType } from '../themeTypes';+import { type ThemeContextType } from './ThemeContextType';++let themeContext: React.Context<ThemeContextType> | undefined;++export const getThemeContext = () =>+ (themeContext ??= React.createContext<ThemeContextType>({+ theme: themeCssVariables as unknown as ThemeType,+ colorScheme: 'light',+ }));diff --git a/packages/twenty-ui/src/theme/internal/getThemeScopeContext.ts b/packages/twenty-ui/src/theme/internal/getThemeScopeContext.tsnew file mode 100644index 00000000000..ffbefa2fa49--- /dev/null+++ b/packages/twenty-ui/src/theme/internal/getThemeScopeContext.ts@@ -0,0 +1,6 @@+import React from 'react';++let themeScopeContext: React.Context<HTMLElement | null> | undefined;++export const getThemeScopeContext = () =>+ (themeScopeContext ??= React.createContext<HTMLElement | null>(null));diff --git a/packages/twenty-ui/src/theme/internal/resolveExplicitTheme.ts b/packages/twenty-ui/src/theme/internal/resolveExplicitTheme.tsnew file mode 100644index 00000000000..d0fdd53c98c--- /dev/null+++ b/packages/twenty-ui/src/theme/internal/resolveExplicitTheme.ts@@ -0,0 +1,36 @@+import { isFunction } from '@sniptt/guards';++import { type THEME_LIGHT } from '../constants/ThemeLight';+import { themeCssVariables } from '../themeCssVariables';+import { type ThemeType } from '../themeTypes';++type StaticTheme = typeof THEME_LIGHT;++const isStaticTheme = (theme: ThemeType | StaticTheme): theme is StaticTheme =>+ isFunction(theme.spacing);++const resolveSpacingEntries = <TSpacingKey extends string>(+ spacingEntries: Record<TSpacingKey, string>,+ spacing: StaticTheme['spacing'],+): Record<TSpacingKey, string> => {+ const resolvedSpacingEntries = { ...spacingEntries };++ for (const spacingKey in resolvedSpacingEntries) {+ resolvedSpacingEntries[spacingKey] = spacing(Number(spacingKey));+ }++ return resolvedSpacingEntries;+};++export const resolveExplicitTheme = (+ theme: ThemeType | StaticTheme,+): ThemeType => {+ if (!isStaticTheme(theme)) {+ return theme;+ }++ return {+ ...theme,+ spacing: resolveSpacingEntries(themeCssVariables.spacing, theme.spacing),+ };+};diff --git a/packages/twenty-ui/src/theme-constants/theme-dark.css b/packages/twenty-ui/src/theme/theme-dark.csssimilarity index 100%rename from packages/twenty-ui/src/theme-constants/theme-dark.cssrename to packages/twenty-ui/src/theme/theme-dark.cssdiff --git a/packages/twenty-ui/src/theme-constants/theme-light.css b/packages/twenty-ui/src/theme/theme-light.csssimilarity index 100%rename from packages/twenty-ui/src/theme-constants/theme-light.cssrename to packages/twenty-ui/src/theme/theme-light.cssdiff --git a/packages/twenty-ui/src/theme-constants/themeCssVariables.ts b/packages/twenty-ui/src/theme/themeCssVariables.tssimilarity index 100%rename from packages/twenty-ui/src/theme-constants/themeCssVariables.tsrename to packages/twenty-ui/src/theme/themeCssVariables.tsdiff --git a/packages/twenty-ui/src/theme-constants/themeTypes.ts b/packages/twenty-ui/src/theme/themeTypes.tssimilarity index 100%rename from packages/twenty-ui/src/theme-constants/themeTypes.tsrename to packages/twenty-ui/src/theme/themeTypes.tsdiff --git a/packages/twenty-ui/src/theme/useTheme.ts b/packages/twenty-ui/src/theme/useTheme.tsnew file mode 100644index 00000000000..eb98e4b8e2a--- /dev/null+++ b/packages/twenty-ui/src/theme/useTheme.ts@@ -0,0 +1,7 @@+import React from 'react';++import { getThemeContext } from './internal/getThemeContext';+import { type ThemeType } from './themeTypes';++export const useTheme = (): ThemeType =>+ React.useContext(getThemeContext()).theme;diff --git a/packages/twenty-ui/src/theme/useThemeColorScheme.ts b/packages/twenty-ui/src/theme/useThemeColorScheme.tsnew file mode 100644index 00000000000..18f252eccd2--- /dev/null+++ b/packages/twenty-ui/src/theme/useThemeColorScheme.ts@@ -0,0 +1,6 @@+import React from 'react';++import { getThemeContext } from './internal/getThemeContext';++export const useThemeColorScheme = (): 'light' | 'dark' =>+ React.useContext(getThemeContext()).colorScheme;diff --git a/packages/twenty-ui/src/theme/useThemeContainer.ts b/packages/twenty-ui/src/theme/useThemeContainer.tsnew file mode 100644index 00000000000..c3c59842d05--- /dev/null+++ b/packages/twenty-ui/src/theme/useThemeContainer.ts@@ -0,0 +1,6 @@+import React from 'react';++import { getThemeScopeContext } from './internal/getThemeScopeContext';++export const useThemeContainer = (): HTMLElement | null =>+ React.useContext(getThemeScopeContext());diff --git a/packages/twenty-ui/src/utilities/color/utils/stringToThemeColorP3String.ts b/packages/twenty-ui/src/utilities/color/utils/stringToThemeColorP3String.tsindex c01a5e12c64..f144cf0ac89 100644--- a/packages/twenty-ui/src/utilities/color/utils/stringToThemeColorP3String.ts+++ b/packages/twenty-ui/src/utilities/color/utils/stringToThemeColorP3String.ts@@ -1,5 +1,9 @@-import { type ThemeType, type themeCssVariables } from '@ui/theme-constants';-import { type ThemeColor, MAIN_COLOR_NAMES } from '@ui/theme';+import {+ type ThemeType,+ type themeCssVariables,+ type ThemeColor,+ MAIN_COLOR_NAMES,+} from '@ui/theme';export const stringToThemeColor = (string: string): ThemeColor => {let hash = 0;diff --git a/packages/twenty-ui/src/utilities/responsive/hooks/useIsMobile.ts b/packages/twenty-ui/src/utilities/responsive/hooks/useIsMobile.tsindex cc734c964f6..69458b8915e 100644--- a/packages/twenty-ui/src/utilities/responsive/hooks/useIsMobile.ts+++ b/packages/twenty-ui/src/utilities/responsive/hooks/useIsMobile.ts@@ -1,4 +1,4 @@-import { MOBILE_VIEWPORT } from '@ui/theme-constants';+import { MOBILE_VIEWPORT } from '@ui/theme';import { useMediaQuery } from 'react-responsive';export const useIsMobile = () =>diff --git a/packages/twenty-ui/test-utilities/conformance/runComponentConformance.tsx b/packages/twenty-ui/test-utilities/conformance/runComponentConformance.tsxindex cddbe623131..4fed54931c3 100644--- a/packages/twenty-ui/test-utilities/conformance/runComponentConformance.tsx+++ b/packages/twenty-ui/test-utilities/conformance/runComponentConformance.tsx@@ -17,7 +17,7 @@ import {type MockInstance,} from 'vitest';-import { ThemeProvider } from '@ui/theme-constants';+import { ThemeProvider } from '@ui/theme';import { isDefined } from '@ui/utilities';import { type ComponentConformanceCase } from './types/ComponentConformanceCase';diff --git a/packages/twenty-ui/tsconfig.json b/packages/twenty-ui/tsconfig.jsonindex c731563661b..1695faee298 100644--- a/packages/twenty-ui/tsconfig.json+++ b/packages/twenty-ui/tsconfig.json@@ -35,6 +35,7 @@"docs/**/*.ts","scripts/checkDocsExamples.ts","scripts/checkOptionalDependencies.ts",+ "scripts/checkThemeExports.ts","scripts/checkModuleOwnership.ts"]}diff --git a/packages/twenty-ui/vite.config.ts b/packages/twenty-ui/vite.config.tsindex ccad3deeaa3..2f0b5205a0c 100644--- a/packages/twenty-ui/vite.config.ts+++ b/packages/twenty-ui/vite.config.ts@@ -107,7 +107,7 @@ export default defineConfig(({ command }) => {fs.mkdirSync(distDir, { recursive: true });for (const file of Object.values(THEME_CSS_FILE_NAME_BY_SCHEME)) {fs.copyFileSync(- path.resolve(__dirname, `src/theme-constants/${file}`),+ path.resolve(__dirname, `src/theme/${file}`),path.resolve(distDir, file),);}diff --git a/packages/twenty-website/scripts/check-conventions.mjs b/packages/twenty-website/scripts/check-conventions.mjsindex 683cba8f314..1c9575d08c4 100644--- a/packages/twenty-website/scripts/check-conventions.mjs+++ b/packages/twenty-website/scripts/check-conventions.mjs@@ -282,21 +282,14 @@ function walk(directory) {}}- // twenty-ui's theme is pure data, baked by Linaria at build time — consume- // it directly so the mockups can't drift from the product. Its components- // are React runtime (+ react-tooltip): importing them would weigh down the- // marketing bundle, so the mockups stay on lean primitives built against- // the theme.const badTwentyUiSubpath = [...content.matchAll(/from 'twenty-ui(\/[a-z-]+)?'/g),].map((match) => match[1] ?? '')- .find(- (subpath) => subpath !== '/theme' && subpath !== '/theme-constants',- );+ .find((subpath) => subpath !== '/theme');if (badTwentyUiSubpath !== undefined) {failures.push(- `src/${relativePath}: only twenty-ui/theme is importable (pure data, baked at build); twenty-ui${badTwentyUiSubpath} pulls React runtime into the bundle — build a lean primitive instead.`,+ `src/${relativePath}: only twenty-ui/theme is importable for static tokens baked at build; twenty-ui${badTwentyUiSubpath} pulls React runtime into the bundle — build a lean primitive instead.`,);}