The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Complete linaria migration (#18361)
Charles Bochet7a2e397ad14d
diff --git a/CLAUDE.md b/CLAUDE.mdindex 55b0f181199..070905e9e81 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -90,7 +90,7 @@ npx nx run twenty-front:graphql:generate --configuration=metadata## Architecture Overview### Tech Stack-- **Frontend**: React 18, TypeScript, Jotai (state management), Emotion (styling), Vite+- **Frontend**: React 18, TypeScript, Jotai (state management), Linaria (styling), Vite- **Backend**: NestJS, TypeORM, PostgreSQL, Redis, GraphQL (with GraphQL Yoga)- **Monorepo**: Nx workspace managed with Yarn 4@@ -175,7 +175,7 @@ IMPORTANT: Use Context7 for code generation, setup or configuration steps, or li5. Run `graphql:generate` after any GraphQL schema changes### Code Style Notes-- Use **Emotion** for styling with styled-components pattern+- Use **Linaria** for styling with zero-runtime CSS-in-JS (styled-components pattern)- Follow **Nx** workspace conventions for imports- Use **Lingui** for internationalization- Apply security first, then formatting (sanitize before format)diff --git a/README.md b/README.mdindex 9e3210454f2..8f3f02bada9 100644--- a/README.md+++ b/README.md@@ -109,7 +109,7 @@ Below are a few features we have implemented to date:- [TypeScript](https://www.typescriptlang.org/)- [Nx](https://nx.dev/)- [NestJS](https://nestjs.com/), with [BullMQ](https://bullmq.io/), [PostgreSQL](https://www.postgresql.org/), [Redis](https://redis.io/)-- [React](https://reactjs.org/), with [Jotai](https://jotai.org/), [Emotion](https://emotion.sh/) and [Lingui](https://lingui.dev/)+- [React](https://reactjs.org/), with [Jotai](https://jotai.org/), [Linaria](https://linaria.dev/) and [Lingui](https://lingui.dev/)diff --git a/docs/emotion-to-linaria-migration-plan.md b/docs/emotion-to-linaria-migration-plan.mddeleted file mode 100644index fa210863a83..00000000000--- a/docs/emotion-to-linaria-migration-plan.md+++ /dev/null@@ -1,423 +0,0 @@-# Emotion → Linaria Migration Plan: twenty-front--## Overview--Migrate all Emotion (`@emotion/styled`, `@emotion/react`) usages in-`packages/twenty-front/src` to Linaria (`@linaria/react`, `@linaria/core`),-following the same patterns already established in the `twenty-ui` package.--Linaria is a **zero-runtime** CSS-in-JS library. Styles are extracted at-build time by [wyw-in-js](https://wyw-in-js.dev/) (the Vite plugin is-`@wyw-in-js/vite`, already configured in `twenty-front/vite.config.ts`).-This means every expression inside a `styled` or `css` template literal-must be statically evaluable at build time — no runtime theme objects,-no closures over component state, no side-effects.--**Total files to migrate: ~998**--| Category | Files | Description |-|---|---|---|-| styled-only | 694 | Import `@emotion/styled` but not `useTheme` |-| styled + useTheme | 224 | Import both `@emotion/styled` and `useTheme` |-| useTheme-only | 79 | Import `useTheme` but not `@emotion/styled` |-| css / Global only | 1 | Import `css` or `Global` from `@emotion/react` only |--## Theme Architecture--Two build-time utilities produce the theme system:--- **`buildThemeReferencingRootCssVariables`** — walks the theme object and- builds a nested mirror where every leaf is a `var(--t-xxx)` string- (evaluated at build time by wyw-in-js)-- **`prepareThemeForRootCssVariableInjection`** — walks the runtime theme- and collects flat `[--css-variable-name, value]` pairs, injected onto- `document.documentElement` by `ThemeCssVariableInjectorEffect`--`themeCssVariables` is the build-time object; every leaf resolves to a CSS-`var()` reference. It is safe to use inside `styled` and `css` templates-because wyw-in-js can evaluate it statically.--## Migration Patterns--### 1. `styled` import--```diff-- import styled from '@emotion/styled';-+ import { styled } from '@linaria/react';-```--### 2. Theme access in styled components--Replace Emotion's `({ theme }) =>` prop-function pattern with static-`themeCssVariables` references:--```diff-+ import { themeCssVariables } from 'twenty-ui/theme';-- const StyledTitle = styled.span`-- color: ${({ theme }) => theme.font.color.primary};-- font-size: ${({ theme }) => theme.font.size.lg};-+ color: ${themeCssVariables.font.color.primary};-+ font-size: ${themeCssVariables.font.size.lg};- `;-```--### 3. Spacing--`theme.spacing(N)` is a function; in Linaria it becomes an indexed lookup:--```diff-- margin-top: ${({ theme }) => theme.spacing(3)};-+ margin-top: ${themeCssVariables.spacing[3]};-```--For multi-arg spacing like `theme.spacing(2, 4)` → `"8px 16px"`:--```diff-- padding: ${({ theme }) => theme.spacing(2, 4)};-+ padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[4]};-```--The spacing scale covers integers 0–32 plus `0.5` and `1.5`. Any other-fractional values (`0.25`, `0.75`, `1.25`, `2.5`, `3.5`) must be replaced-with literal pixel values (e.g. `theme.spacing(2.5)` → `10px`).--### 4. `useTheme` → `useContext(ThemeContext)`--For runtime theme access (icon sizes, animation durations, conditional logic-outside of styled components):--```diff-- import { useTheme } from '@emotion/react';-+ import { useContext } from 'react';-+ import { ThemeContext } from 'twenty-ui/theme';-- const MyComponent = () => {-- const theme = useTheme();-+ const { theme } = useContext(ThemeContext);- return <Icon size={theme.icon.size.sm} />;- };-```--### 5. `css` template literal--Linaria's `css` (from `@linaria/core`) returns a **class name string**, not-a serialized style object like Emotion's `css`. This has two consequences:--**Standalone usage** — apply via `className`, not the `css` prop:--```diff-- import { css } from '@emotion/react';-+ import { css } from '@linaria/core';-- const myClass = css`- text-decoration: none;- `;--- <Link css={myClass} />-+ <Link className={myClass} />-```--**Inside `styled` templates** — do NOT nest `css` tags. Linaria's `css`-returns a class name, not raw CSS text, so interpolating it inside `styled`-produces broken output. Use plain strings instead:--```diff- // WRONG — css`` returns a class name, not CSS text- ${({ handle }) =>- handle === 'left'-- ? css`left: ${themeCssVariables.spacing[1]};`-- : css`right: ${themeCssVariables.spacing[1]};`}-+ ? `left: ${themeCssVariables.spacing[1]};`-+ : `right: ${themeCssVariables.spacing[1]};`}-```--### 6. Interpolation return types--wyw-in-js requires prop interpolation functions to return `string | number`.-They must **never** return `false`, `undefined`, or `null`. Replace-short-circuit `&&` with ternary expressions:--```diff- // WRONG — returns false when condition is false-- ${({ isActive }) => isActive && `background: ${themeCssVariables.color.blue};`}- // CORRECT-+ ${({ isActive }) => isActive ? `background: ${themeCssVariables.color.blue};` : ''}-```--### 7. Block interpolations (multi-declaration returns)--Linaria wraps each interpolation result in a single CSS custom property-(`var(--xxx)`). An interpolation that returns **multiple CSS declarations**-produces invalid CSS. Split into one interpolation per property:--```diff- // WRONG — single interpolation returning multiple declarations-- ${({ divider, theme }) => {-- const border = `1px solid ${theme.border.color.light}`;-- return divider === 'left' ? `border-left: ${border}` : `border-right: ${border}`;-- }}-- // CORRECT — one interpolation per property-+ border-left: ${({ divider }) =>-+ divider === 'left' ? `1px solid ${themeCssVariables.border.color.light}` : 'none'};-+ border-right: ${({ divider }) =>-+ divider === 'right' ? `1px solid ${themeCssVariables.border.color.light}` : 'none'};-```--### 8. CSS var + unit concatenation--CSS custom properties can't be concatenated with unit suffixes directly-(`var(--x)px` is invalid). Use `calc()` to attach units:--```diff-- transition: background ${themeCssVariables.animation.duration.instant}s ease;-+ transition: background calc(${themeCssVariables.animation.duration.instant} * 1s) ease;-```--### 9. `styled(Component)` requires `className`--Linaria's `styled(Component)` works by passing a generated `className` to-the wrapped component. The component **must** accept and forward a-`className` prop — otherwise the styles are silently lost. If the component-doesn't support it, either add `className` support or use a wrapper div.--Linaria also does **not** support Emotion's `shouldForwardProp` option.-Custom props on HTML elements are automatically filtered by Linaria's-runtime (via `@emotion/is-prop-valid`). For custom components, all props are-forwarded — ensure the wrapped component ignores unknown props gracefully.--### 10. `type Theme` → `type ThemeType`--```diff-- import { type Theme } from '@emotion/react';-+ import { type ThemeType } from 'twenty-ui/theme';-```--### 11. Framer Motion integration--Linaria doesn't support `styled(motion.div)` — wrapping a motion element-with `styled()` causes the component body to be stripped at build time by-wyw-in-js. Define the styled component first, then wrap with-`motion.create()`:--```tsx-const StyledBarBase = styled.div`- background-color: ${themeCssVariables.font.color.primary};- height: 100%;-`;--const StyledBar = motion.create(StyledBarBase);-```--### 12. Dynamic styles via CSS variables--When a component needs to compute styles from multiple props with complex-branching logic (e.g. combining `variant`, `accent`, `disabled`, `focus`),-Linaria's prop interpolations become unwieldy. Use a `computeDynamicStyles`-helper that returns a `CSSProperties` object injected via `style={}`,-referenced from the static CSS with `var()`:--```tsx-const StyledButton = styled.button`- background: var(--btn-bg);- border-color: var(--btn-border-color);- &:hover { background: var(--btn-hover-bg); }-`;--const dynamicStyles = useMemo(() => {- const s = computeButtonDynamicStyles(variant, accent, ...);- return {- '--btn-bg': s.background,- '--btn-hover-bg': s.hoverBackground,- } as CSSProperties;-}, [variant, accent, ...]);--return <StyledButton style={dynamicStyles} />;-```--### 13. `Global` component--Replace Emotion's `<Global styles={...} />` with standard CSS or the-`ThemeCssVariableInjectorEffect` pattern from twenty-ui.--### 14. `ThemeProvider`--The `BaseThemeProvider` already wraps children with both Emotion's-`ThemeProvider` and Linaria's `ThemeContextProvider`. Once all Emotion usages-are gone, the Emotion `ThemeProvider` wrapper can be removed.-------## PR Breakdown--Files are grouped to keep each PR around ~100 files with consistent review-surface. We start with the simplest, lowest-risk modules.--### PR 1 (~97 files) — Small standalone modules--Low-risk modules with mostly simple `styled`-only patterns.--| Module | Files |-|---|---|-| spreadsheet-import | 28 |-| billing | 10 |-| views | 14 |-| navigation-menu-item | 14 |-| blocknote-editor | 7 |-| advanced-text-editor | 7 |-| favorites | 7 |-| navigation | 4 |-| information-banner | 3 |-| sign-in-background-mock | 3 |--### PR 2 (~100 files) — Auth, tiny modules, loading, testing, pages (part 1)--| Module | Files |-|---|---|-| auth | 19 |-| action-menu | 3 |-| object-metadata | 3 |-| onboarding | 2 |-| workspace | 2 |-| file | 2 |-| error-handler | 2 |-| front-components | 1 |-| geo-map | 1 |-| hooks | 1 |-| loading | 5 |-| testing | 5 |-| pages (first ~55 files) | ~55 |--### PR 3 (~97 files) — Pages (remaining) + activities + AI--| Module | Files |-|---|---|-| pages (remaining ~16 files) | ~16 |-| activities | 53 |-| ai | 28 |--### PR 4 (~100 files) — Command-menu + workflow (part 1)--| Module | Files |-|---|---|-| command-menu | 53 |-| workflow (first ~47 files) | ~47 |--### PR 5 (~115 files) — Workflow (remaining) + page-layout--| Module | Files |-|---|---|-| workflow (remaining ~32 files) | ~32 |-| page-layout | 83 |--### PR 6 (~100 files) — UI module (part 1)--| Module | Files |-|---|---|-| ui (first ~100 files) | ~100 |--### PR 7 (~85 files) — UI module (remaining) + object-record (start)--| Module | Files |-|---|---|-| ui (remaining ~23 files) | ~23 |-| object-record (first ~62 files) | ~62 |--### PR 8 (~100 files) — Object-record (continued)--| Module | Files |-|---|---|-| object-record (next ~100 files) | ~100 |--### PR 9 (~100 files) — Settings (part 1)--| Module | Files |-|---|---|-| settings (first ~100 files) | ~100 |--### PR 10 (~102 files) — Settings (part 2) + final cleanup--| Module | Files |-|---|---|-| settings (remaining ~102 files) | ~102 |-| css/Global-only file | 1 |--### Post-migration PR — Remove Emotion--Once all PRs are merged:--- Remove `ThemeProvider` from `@emotion/react` in `BaseThemeProvider`-- Remove `@emotion/styled` and `@emotion/react` dependencies-- Remove `@styled/typescript-styled-plugin` from tsconfig-- Clean up any remaining Emotion-related configuration-------## Risk Assessment--| Risk | Mitigation |-|---|---|-| wyw-in-js evaluates at build time; dynamic expressions may fail | Use `themeCssVariables` for static theme values; pass dynamic values as component props or via `style={}` CSS variables |-| `theme.spacing(N)` function → `themeCssVariables.spacing[N]` index | Pre-computed for integers 0–32 plus 0.5 and 1.5; other fractional values → literal pixel values |-| `useTheme` used for runtime logic (not just styles) | Replace with `useContext(ThemeContext)`, destructure `{ theme }` |-| Multi-arg `theme.spacing(a, b, c)` | Split into individual `themeCssVariables.spacing[N]` references |-| `css` tag inside `styled` templates | Linaria `css` returns class name, not CSS text; use plain strings inside `styled` |-| Interpolation returns `false` / `undefined` | wyw-in-js requires `string \| number`; use ternary `? : ''` instead of `&&` |-| Block interpolations (multiple declarations) | Split into one interpolation per CSS property |-| `var(--x)px` concatenation | Use `calc(var(--x) * 1px)` |-| `styled(motion.div)` stripped by wyw-in-js | Use `motion.create(StyledBase)` pattern |-| `styled(Component)` with no `className` prop | Add `className` support to wrapped component or use wrapper div |-| Complex multi-prop style branching | Use `computeDynamicStyles` + `style={}` + `var()` references |-------## Known Issues & TODOs--### `styled(Component)` from `twenty-ui` — style overrides silently dropped--When `twenty-front` uses `styled(SomeComponent)` to extend a pre-built-component from `twenty-ui` (e.g. `Card`, `CardContent`, `PropertyBox`,-`Chip`, `Pill`, `Avatar`, `StyledHoverableMenuItemBase`, `MenuItemLeftContent`,-`TabList`, `NavigationDrawerSection`), the style overrides are silently-ignored at runtime. This happens because `wyw-in-js` in `twenty-front`-cannot resolve the base class name of a component that was already compiled-in another package.--**Current workaround:** Replace `styled(Component)` with a plain-`styled.div` (or wrapper div) that duplicates the needed base styles.-This fixes the visual regression but loses the component's built-in-behavior (e.g. `CardContent`'s framer-motion animation, `PropertyBox`'s-layout-context padding logic, `Card`'s border/overflow).--**Proper fix (TODO):** Add customization props directly to the base-components so consumers can override styles without wrapping:--- `Card` / `CardContent` — add `padding`, `backgroundColor`, `borderColor` props-- `PropertyBox` — add `padding`, `height`, `noPadding` props-- Other frequently extended components — audit and add props as needed--**Affected files (using workaround today):**--- `CalendarEventDetails.tsx` — `styled(PropertyBox)` → `styled.div`, `styled(Chip)` → wrapper-- `CalendarEventParticipantsResponseStatusField.tsx` — `styled(PropertyBox)` → `styled.div`-- `CalendarEventNotSharedContent.tsx` — `styled(Card)` / `styled(CardContent)` → `styled.div`-- `CalendarDayCardContent.tsx` — `styled(CardContent)` → `styled(motion.div)`-- `ActivityRow.tsx` — `styled(CardContent)` → `styled.div`-- `EmailThreadPreview.tsx` — `styled(Avatar)` → wrapper div-- `SignInAppNavigationDrawerMock.tsx` — `styled(NavigationDrawerSection)` → wrapper div-- `DefaultLayout.tsx` — `styled(SignInAppNavigationDrawerMock)` → wrapper div-- `LastUsedPill.tsx` — `styled(Pill)` → wrapper span-- `Logo.tsx` — dynamic `background-image` via inline `style` instead of prop-- `DatePicker.tsx` / `DateTimePicker.tsx` — `styled(StyledHoverableMenuItemBase)` / `styled(MenuItemLeftContent)` → `styled.div`-- `SelectControl.tsx` / `MultiSelectControl.tsx` — `styled(IconChevronDown)` → wrapper div-------## Validation Checklist (per PR)--- [ ] `npx nx lint:diff-with-main twenty-front` passes-- [ ] `npx nx typecheck twenty-front` passes-- [ ] `npx nx test twenty-front` passes-- [ ] Visual spot-check of affected components in the app-- [ ] No remaining `@emotion/styled` or `@emotion/react` imports in migrated filesdiff --git a/nx.json b/nx.jsonindex 552198c0aec..7519bf837de 100644--- a/nx.json+++ b/nx.json@@ -276,7 +276,7 @@"generators": {"@nx/react": {"application": {- "style": "@emotion/styled",+ "style": "@linaria/react","linter": "eslint","bundler": "vite","compiler": "swc",@@ -284,7 +284,7 @@"projectNameAndRootFormat": "derived"},"library": {- "style": "@emotion/styled",+ "style": "@linaria/react","linter": "eslint","bundler": "vite","compiler": "swc",@@ -292,7 +292,7 @@"projectNameAndRootFormat": "derived"},"component": {- "style": "@emotion/styled"+ "style": "@linaria/react"}}},diff --git a/package.json b/package.jsonindex d241873387c..65b9909fd05 100644--- a/package.json+++ b/package.json@@ -2,14 +2,13 @@"private": true,"dependencies": {"@apollo/client": "^3.7.17",- "@emotion/react": "^11.11.1",- "@emotion/styled": "^11.11.0","@floating-ui/react": "^0.24.3","@linaria/core": "^6.2.0","@linaria/react": "^6.2.1","@radix-ui/colors": "^3.0.0","@sniptt/guards": "^0.2.0","@tabler/icons-react": "^3.31.0",+ "@wyw-in-js/babel-preset": "^1.0.6","@wyw-in-js/vite": "^0.7.0","archiver": "^7.0.1","danger-plugin-todos": "^1.3.1",@@ -41,6 +40,7 @@"lodash.snakecase": "^4.1.1","lodash.upperfirst": "^4.3.1","microdiff": "^1.3.2",+ "next-with-linaria": "^1.3.0","planer": "^1.2.0","pluralize": "^8.0.0","react": "^18.2.0",diff --git a/packages/twenty-docs/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 9fcd36f3e5d..a67980ce769 100644--- a/packages/twenty-docs/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Use StyledComponents-Style the components with [styled-components](https://emotion.sh/docs/styled).+Style the components with [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Baddiff --git a/packages/twenty-docs/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/developers/self-host/capabilities/troubleshooting.mdxindex fff725daa76..62d67b7b6dc 100644--- a/packages/twenty-docs/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/developers/self-host/capabilities/troubleshooting.mdx@@ -136,7 +136,7 @@ That's expected as user is unauthorized when logged out since its identity is noComment out checker plugin in `packages/twenty-ui/vite-config.ts` like in example below```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/ar/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/ar/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 4e467a549d9..083e2aef088 100644--- a/packages/twenty-docs/l/ar/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/ar/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### استخدام مكونات منسقة-قم بتنسيق المكونات باستخدام [styled-components](https://emotion.sh/docs/styled).+قم بتنسيق المكونات باستخدام [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ سيءdiff --git a/packages/twenty-docs/l/ar/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ar/developers/self-host/capabilities/troubleshooting.mdxindex 8aa2ba3ef76..3bf00d4c357 100644--- a/packages/twenty-docs/l/ar/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/ar/developers/self-host/capabilities/troubleshooting.mdx@@ -145,7 +145,7 @@ npx nx worker twenty-server```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/cs/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/cs/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 7f827be1d9e..445015512aa 100644--- a/packages/twenty-docs/l/cs/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/cs/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -67,11 +67,11 @@ const EmailField: React.FC<{``````tsx-/* ✅ - Dobré, explicitně definován samostatný typ (OwnProps) pro+/* ✅ - Dobré, explicitně definován samostatný typ (OwnProps) pro* rekvizity komponenty* - Tato metoda automaticky nezahrnuje rekvizitu children. Pokud* ji chcete zahrnout, musíte ji specifikovat v OwnProps.- */+ */type EmailFieldProps = {value: string;};@@ -96,7 +96,7 @@ const MyComponent = (props: OwnProps) => {```tsx/* ✅ - Dobré, explicitně uvádí všechny rekvizity* - Zvyšuje čitelnost a udržovatelnost- */+ */const MyComponent = ({ prop1, prop2, prop3 }: MyComponentProps) => {return <OtherComponent {...{ prop1, prop2, prop3 }} />;};@@ -123,7 +123,7 @@ const value = process.env.MY_VALUE ?? 'default';### Používejte volitelné zřetězení `?.````tsx-// ❌ Špatné+// ❌ ŠpatnéonClick && onClick();// ✅ Dobré@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Používejte StyledComponents-Styling komponenty s [styled-components](https://emotion.sh/docs/styled).+Styling komponenty s [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Špatnédiff --git a/packages/twenty-docs/l/cs/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/cs/developers/self-host/capabilities/troubleshooting.mdxindex 0f0f50f5437..90da88d552c 100644--- a/packages/twenty-docs/l/cs/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/cs/developers/self-host/capabilities/troubleshooting.mdx@@ -146,7 +146,7 @@ Zakomentujte plugin checker v `packages/twenty-ui/vite-config.ts` jako v příkl```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/de/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/de/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 850e42d7c2b..0e8b16643dd 100644--- a/packages/twenty-docs/l/de/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/de/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Verwenden Sie StyledComponents-Stylen Sie die Komponenten mit [styled-components](https://emotion.sh/docs/styled).+Stylen Sie die Komponenten mit [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Schlechtdiff --git a/packages/twenty-docs/l/de/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/de/developers/self-host/capabilities/troubleshooting.mdxindex d93d9cad516..8d011c7b5be 100644--- a/packages/twenty-docs/l/de/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/de/developers/self-host/capabilities/troubleshooting.mdx@@ -145,7 +145,7 @@ Kommentieren Sie das Checker-Plugin in `packages/twenty-ui/vite-config.ts` wie i```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/es/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/es/developers/contribute/capabilities/frontend-development/style-guide.mdxindex ea4c1651d08..07ed20717ff 100644--- a/packages/twenty-docs/l/es/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/es/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Usar StyledComponents-Estiliza los componentes con [styled-components](https://emotion.sh/docs/styled).+Estiliza los componentes con [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Baddiff --git a/packages/twenty-docs/l/es/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/es/developers/self-host/capabilities/troubleshooting.mdxindex 887408ed525..6aa989676f7 100644--- a/packages/twenty-docs/l/es/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/es/developers/self-host/capabilities/troubleshooting.mdx@@ -145,7 +145,7 @@ Comente el plugin checker en `packages/twenty-ui/vite-config.ts` como en el ejem```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/fr/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/fr/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 54b3473c05f..6c502fb1cf0 100644--- a/packages/twenty-docs/l/fr/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/fr/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Utilisez StyledComponents-Styliser les composants avec [styled-components](https://emotion.sh/docs/styled).+Styliser les composants avec [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Baddiff --git a/packages/twenty-docs/l/fr/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/fr/developers/self-host/capabilities/troubleshooting.mdxindex b1f25938eb2..5cf1d384e3e 100644--- a/packages/twenty-docs/l/fr/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/fr/developers/self-host/capabilities/troubleshooting.mdx@@ -145,7 +145,7 @@ Commentez le plugin de vérification dans `packages/twenty-ui/vite-config.ts` co```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/it/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/it/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 73383d5986f..e13368660d6 100644--- a/packages/twenty-docs/l/it/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/it/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Usa StyledComponents-Stile i componenti con [styled-components](https://emotion.sh/docs/styled).+Stile i componenti con [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Malediff --git a/packages/twenty-docs/l/it/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/it/developers/self-host/capabilities/troubleshooting.mdxindex 55fb1825d10..15e13ab08d4 100644--- a/packages/twenty-docs/l/it/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/it/developers/self-host/capabilities/troubleshooting.mdx@@ -146,7 +146,7 @@ Commenta il plugin checker in `packages/twenty-ui/vite-config.ts` come mostrato```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/ja/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/ja/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 39daabcda23..bf8e412718b 100644--- a/packages/twenty-docs/l/ja/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/ja/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### StyledComponentsを使用する-コンポーネントを[styled-components](https://emotion.sh/docs/styled)でスタイル設定する。+コンポーネントを[Linaria styled](https://github.com/callstack/linaria)でスタイル設定する。```tsx// ❌ Baddiff --git a/packages/twenty-docs/l/ja/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ja/developers/self-host/capabilities/troubleshooting.mdxindex 0e2a94959fd..0cd20cdad85 100644--- a/packages/twenty-docs/l/ja/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/ja/developers/self-host/capabilities/troubleshooting.mdx@@ -152,7 +152,7 @@ npx nx worker twenty-server```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/ko/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/ko/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 49b2328ec1c..81acf92246e 100644--- a/packages/twenty-docs/l/ko/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/ko/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### StyledComponents 사용-[styled-components](https://emotion.sh/docs/styled)로 구성 요소를 스타일링하십시오.+[Linaria styled](https://github.com/callstack/linaria)로 구성 요소를 스타일링하십시오.```tsx// ❌ Baddiff --git a/packages/twenty-docs/l/ko/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ko/developers/self-host/capabilities/troubleshooting.mdxindex 591bab724b6..91608b308ce 100644--- a/packages/twenty-docs/l/ko/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/ko/developers/self-host/capabilities/troubleshooting.mdx@@ -145,7 +145,7 @@ npx nx worker twenty-server```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/pt/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/pt/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 48d4c509eba..7db8c34a7fd 100644--- a/packages/twenty-docs/l/pt/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/pt/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Use StyledComponents-Estilize os componentes com [styled-components](https://emotion.sh/docs/styled).+Estilize os componentes com [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Baddiff --git a/packages/twenty-docs/l/pt/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/pt/developers/self-host/capabilities/troubleshooting.mdxindex 7ad56863ade..4f76404a502 100644--- a/packages/twenty-docs/l/pt/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/pt/developers/self-host/capabilities/troubleshooting.mdx@@ -145,7 +145,7 @@ Comente o plugin checker em `packages/twenty-ui/vite-config.ts` como no exemplo```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/ro/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/ro/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 6949fb055ed..1cbf9ba7237 100644--- a/packages/twenty-docs/l/ro/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/ro/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Folosește ComponentaStilizată-Stilizează componentele cu [styled-components](https://emotion.sh/docs/styled).+Stilizează componentele cu [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Răudiff --git a/packages/twenty-docs/l/ro/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ro/developers/self-host/capabilities/troubleshooting.mdxindex dda1e4a0768..2c1a800ad7f 100644--- a/packages/twenty-docs/l/ro/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/ro/developers/self-host/capabilities/troubleshooting.mdx@@ -146,7 +146,7 @@ Comentați pluginul checker în `packages/twenty-ui/vite-config.ts`, ca în exem```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/ru/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/ru/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 60e37a40e61..f91d5dd9f16 100644--- a/packages/twenty-docs/l/ru/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/ru/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### Использование StyledComponents-Стилизуйте компоненты с помощью [styled-components](https://emotion.sh/docs/styled).+Стилизуйте компоненты с помощью [Linaria styled](https://github.com/callstack/linaria).```tsx// ❌ Плохоdiff --git a/packages/twenty-docs/l/ru/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/ru/developers/self-host/capabilities/troubleshooting.mdxindex 81e2dedac51..41f3c1dc890 100644--- a/packages/twenty-docs/l/ru/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/ru/developers/self-host/capabilities/troubleshooting.mdx@@ -146,7 +146,7 @@ npx nx worker twenty-server```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/tr/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/tr/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 142478bdf9d..4345d4438f4 100644--- a/packages/twenty-docs/l/tr/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/tr/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -68,7 +68,7 @@ const EmailField: React.FC<{```tsx/* ✅ - İyi, bileşenin prop'ları için ayrı bir tür (OwnProps) açıkça tanımlanmıştır- * - Bu yöntem çocuk prop'unu otomatik olarak içermez.+ * - Bu yöntem çocuk prop'unu otomatik olarak içermez.* Onu dahil etmek istiyorsanız, OwnProps'ta belirtmeniz gerekir.*/type EmailFieldProps = {@@ -193,7 +193,7 @@ setHotkeyScopeAndMemorizePreviousScope(### StyledComponents kullanın-Bileşenleri [styled-components](https://emotion.sh/docs/styled) ile stillendirin.+Bileşenleri [Linaria styled](https://github.com/callstack/linaria) ile stillendirin.```tsx// ❌ Kötüdiff --git a/packages/twenty-docs/l/tr/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/tr/developers/self-host/capabilities/troubleshooting.mdxindex c3e70d05759..7c30a2883a3 100644--- a/packages/twenty-docs/l/tr/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/tr/developers/self-host/capabilities/troubleshooting.mdx@@ -145,7 +145,7 @@ Aşağıdaki örnekte olduğu gibi `packages/twenty-ui/vite-config.ts` içindeki```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-docs/l/zh/developers/contribute/capabilities/frontend-development/style-guide.mdx b/packages/twenty-docs/l/zh/developers/contribute/capabilities/frontend-development/style-guide.mdxindex 14e4a3ac5ef..d7a9db2d2e2 100644--- a/packages/twenty-docs/l/zh/developers/contribute/capabilities/frontend-development/style-guide.mdx+++ b/packages/twenty-docs/l/zh/developers/contribute/capabilities/frontend-development/style-guide.mdx@@ -194,7 +194,7 @@ setHotkeyScopeAndMemorizePreviousScope(### 使用StyledComponents-使用[styled-components](https://emotion.sh/docs/styled)对组件进行样式化。+使用[Linaria styled](https://github.com/callstack/linaria)对组件进行样式化。```tsx// ❌ Baddiff --git a/packages/twenty-docs/l/zh/developers/self-host/capabilities/troubleshooting.mdx b/packages/twenty-docs/l/zh/developers/self-host/capabilities/troubleshooting.mdxindex cc1ec60a5f4..ab13f4fc9fb 100644--- a/packages/twenty-docs/l/zh/developers/self-host/capabilities/troubleshooting.mdx+++ b/packages/twenty-docs/l/zh/developers/self-host/capabilities/troubleshooting.mdx@@ -145,7 +145,7 @@ npx nx worker twenty-server```plugins: [- react({ jsxImportSource: '@emotion/react' }),+ react({ jsxImportSource: 'react' }),tsconfigPaths(),svgr(),dts(dtsConfig),diff --git a/packages/twenty-front/.storybook/preview.tsx b/packages/twenty-front/.storybook/preview.tsxindex 6175fbda54d..e882e1981e8 100644--- a/packages/twenty-front/.storybook/preview.tsx+++ b/packages/twenty-front/.storybook/preview.tsx@@ -1,4 +1,3 @@-import { ThemeProvider } from '@emotion/react';import { i18n } from '@lingui/core';import { I18nProvider } from '@lingui/react';import { type Preview } from '@storybook/react-vite';@@ -71,15 +70,13 @@ const preview: Preview = {return (<I18nProvider i18n={i18n}>- <ThemeProvider theme={theme}>- <ThemeContextProvider theme={theme}>- <ClickOutsideListenerContext.Provider- value={{ excludedClickOutsideId: undefined }}- >- <Story />- </ClickOutsideListenerContext.Provider>- </ThemeContextProvider>- </ThemeProvider>+ <ThemeContextProvider theme={theme}>+ <ClickOutsideListenerContext.Provider+ value={{ excludedClickOutsideId: undefined }}+ >+ <Story />+ </ClickOutsideListenerContext.Provider>+ </ThemeContextProvider></I18nProvider>);},diff --git a/packages/twenty-front/src/emotion.d.ts b/packages/twenty-front/src/emotion.d.tsdeleted file mode 100644index 4052bb67303..00000000000--- a/packages/twenty-front/src/emotion.d.ts+++ /dev/null@@ -1,5 +0,0 @@-import { type ThemeType } from 'twenty-ui/theme';--declare module '@emotion/react' {- export interface Theme extends ThemeType {}-}diff --git a/packages/twenty-front/src/index.tsx b/packages/twenty-front/src/index.tsxindex 17d431f2633..714c56b917a 100644--- a/packages/twenty-front/src/index.tsx+++ b/packages/twenty-front/src/index.tsx@@ -1,7 +1,5 @@import ReactDOM from 'react-dom/client';-import '@emotion/react';-import { App } from '@/app/components/App';import 'react-loading-skeleton/dist/skeleton.css';import 'twenty-ui/style.css';diff --git a/packages/twenty-front/src/loading/components/RightPanelSkeletonLoader.tsx b/packages/twenty-front/src/loading/components/RightPanelSkeletonLoader.tsxindex a0995af3cee..8b1df4cb370 100644--- a/packages/twenty-front/src/loading/components/RightPanelSkeletonLoader.tsx+++ b/packages/twenty-front/src/loading/components/RightPanelSkeletonLoader.tsx@@ -2,8 +2,8 @@ import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoimport { styled } from '@linaria/react';import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { BORDER_COMMON, MOBILE_VIEWPORT, ThemeContext } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledMainContainer = styled.div`background: ${themeCssVariables.background.noisy};@@ -25,7 +25,7 @@ const StyledMainContainer = styled.div`const StyledPanel = styled.div`background: ${themeCssVariables.background.primary};border: 1px solid ${themeCssVariables.border.color.medium};- border-radius: ${BORDER_COMMON.radius.md};+ border-radius: ${themeCssVariables.border.radius.md};height: 100%;overflow: auto;width: 100%;diff --git a/packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsx b/packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsxindex 6609830ae08..db526b94724 100644--- a/packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsx+++ b/packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsx@@ -3,8 +3,7 @@ import { styled } from '@linaria/react';import { useShowAuthModal } from '@/ui/layout/hooks/useShowAuthModal';import { Modal } from '@/ui/layout/modal/components/Modal';import { NAVIGATION_DRAWER_CONSTRAINTS } from '@/ui/layout/resizable-panel/constants/NavigationDrawerConstraints';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';import { LeftPanelSkeletonLoader } from '~/loading/components/LeftPanelSkeletonLoader';import { RightPanelSkeletonLoader } from '~/loading/components/RightPanelSkeletonLoader';diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsxindex 32e0571e12f..8276e4d84ce 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 { motion } from 'framer-motion';+import { CardContent } from 'twenty-ui/layout';import { ThemeContext } from 'twenty-ui/theme';import { themeCssVariables } from 'twenty-ui/theme-constants';import { type TimelineCalendarEvent } from '~/generated/graphql';@@ -14,19 +14,14 @@ type CalendarDayCardContentProps = {divider?: boolean;};-const StyledCardContentBase = styled.div<{ divider?: boolean }>`+const StyledCardContent = styled(CardContent)`align-items: flex-start;- background-color: ${themeCssVariables.background.secondary};- border-bottom: ${({ divider }) =>- divider ? `1px solid ${themeCssVariables.border.color.light}` : 'none'};display: flex;flex-direction: row;gap: ${themeCssVariables.spacing[3]};padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[3]};`;-const StyledCardContent = motion.create(StyledCardContentBase);-const StyledDayContainer = styled.div`text-align: center;width: ${themeCssVariables.spacing[6]};diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventDetails.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventDetails.tsxindex 6f3a14ef446..8f8966cb1ac 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventDetails.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventDetails.tsx@@ -32,6 +32,7 @@ import {} from 'twenty-ui/components';import { IconCalendarEvent } from 'twenty-ui/display';import { themeCssVariables } from 'twenty-ui/theme-constants';+import { PropertyBox } from '@/object-record/record-inline-cell/property-box/components/PropertyBox';import { beautifyPastDateRelativeToNow } from '~/utils/date-utils';type CalendarEventDetailsProps = {@@ -84,10 +85,7 @@ const StyledFields = styled.div`width: 100%;`;-const StyledPropertyBox = styled.div`- align-self: stretch;- display: flex;- flex-direction: column;+const StyledPropertyBox = styled(PropertyBox)`height: ${themeCssVariables.spacing[6]};width: 100%;`;diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsxindex 30aa259e52b..4cf667e29dd 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventNotSharedContent.tsx@@ -2,20 +2,19 @@ import { useContext } from 'react';import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';import { IconLock } from 'twenty-ui/display';+import { Card, CardContent } from 'twenty-ui/layout';import { ThemeContext } from 'twenty-ui/theme';import { themeCssVariables } from 'twenty-ui/theme-constants';-const StyledVisibilityCard = styled.div`- border: 1px solid ${themeCssVariables.border.color.light};- border-radius: ${themeCssVariables.border.radius.sm};+const StyledVisibilityCard = styled(Card)`color: ${themeCssVariables.font.color.light};flex: 1;- overflow: hidden;+ border-color: ${themeCssVariables.border.color.light};transition: color ${themeCssVariables.animation.duration.normal} ease;width: 100%;`;-const StyledVisibilityCardContent = styled.div`+const StyledVisibilityCardContent = styled(CardContent)`align-items: center;background-color: ${themeCssVariables.background.transparent.lighter};box-sizing: border-box;diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsxindex ace4aaa0d45..2b273446e99 100644--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventParticipantsResponseStatusField.tsx@@ -2,6 +2,7 @@ import { useContext, useRef } from 'react';import { styled } from '@linaria/react';import { type CalendarEventParticipant } from '@/activities/calendar/types/CalendarEventParticipant';+import { PropertyBox } from '@/object-record/record-inline-cell/property-box/components/PropertyBox';import { ParticipantChip } from '@/activities/components/ParticipantChip';import { EllipsisDisplay } from '@/ui/field/display/components/EllipsisDisplay';import { ExpandableList } from '@/ui/layout/expandable-list/components/ExpandableList';@@ -21,10 +22,7 @@ const StyledInlineCellBaseContainer = styled.div`user-select: none;`;-const StyledPropertyBox = styled.div`- align-self: stretch;- display: flex;- flex-direction: column;+const StyledPropertyBox = styled(PropertyBox)`height: ${themeCssVariables.spacing[6]};width: 100%;`;diff --git a/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx b/packages/twenty-front/src/modules/activities/components/ActivityRow.tsxindex d696ad33c57..cfdbb594510 100644--- a/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx+++ b/packages/twenty-front/src/modules/activities/components/ActivityRow.tsx@@ -1,15 +1,18 @@import { styled } from '@linaria/react';import React from 'react';+import { CardContent } from 'twenty-ui/layout';import { themeCssVariables } from 'twenty-ui/theme-constants';-const StyledRowContent = styled.div<{ isClickable: boolean }>`+const StyledRowContent = styled(CardContent)`align-items: center;- background-color: ${themeCssVariables.background.secondary};- cursor: ${({ isClickable }) => (isClickable ? 'pointer' : 'default')};display: flex;gap: ${themeCssVariables.spacing[2]};height: ${themeCssVariables.spacing[12]};padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[4]};++ &[data-clickable='false'] {+ cursor: default;+ }`;export const ActivityRow = ({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 b86946a1ac8..20a05c9adce 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@@ -15,8 +15,7 @@ import {AnimatedPlaceholderEmptyTitle,EMPTY_PLACEHOLDER_TRANSITION_PROPS,} from 'twenty-ui/layout';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledMainContainer = styled.div`align-items: flex-start;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/activity/components/EventRowActivity.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/activity/components/EventRowActivity.tsxindex bffcec36c31..d84af27c5f1 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/activity/components/EventRowActivity.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/activity/components/EventRowActivity.tsx@@ -12,8 +12,7 @@ import { type CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNimport { useGetRecordFromCache } from '@/object-record/cache/hooks/useGetRecordFromCache';import { isNonEmptyString } from '@sniptt/guards';import { OverflowingTextWithTooltip } from 'twenty-ui/display';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';type EventRowActivityProps = EventRowDynamicComponentProps;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 0616307371d..715302b23cf 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,7 +1,6 @@import { styled } from '@linaria/react';import { Card } from 'twenty-ui/layout';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';type EventCardProps = {children: React.ReactNode;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsxindex ac77fcb9408..2d1e50796d2 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx@@ -6,8 +6,7 @@ import {import { EventRowMainObjectUpdated } from '@/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';type EventRowMainObjectProps = EventRowDynamicComponentProps;diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated.tsxindex 17215792776..4df90c5a201 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated.tsx@@ -9,8 +9,7 @@ import { EventFieldDiffContainer } from '@/activities/timeline-activities/rows/mimport { type TimelineActivity } from '@/activities/timeline-activities/types/TimelineActivity';import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';type EventRowMainObjectUpdatedProps = {mainObjectMetadataItem: ObjectMetadataItem;diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuContextChipIconWrapper.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuContextChipIconWrapper.tsxnew file mode 100644index 00000000000..e23f797b953--- /dev/null+++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuContextChipIconWrapper.tsx@@ -0,0 +1,13 @@+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';++const StyledCommandMenuContextChipIconWrapper = styled.div`+ align-items: center;+ background: ${themeCssVariables.background.primary};+ border-radius: ${themeCssVariables.border.radius.sm};+ display: flex;+ justify-content: center;+`;++export const CommandMenuContextChipIconWrapper =+ StyledCommandMenuContextChipIconWrapper;diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuList.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuList.tsxindex 624eae5c59d..9bd04b200e3 100644--- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuList.tsx+++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuList.tsx@@ -12,8 +12,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 } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';export type CommandMenuListProps = {commandGroups: ActionGroupConfig[];diff --git a/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuContextChips.tsx b/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuContextChips.tsxindex ff13ddbc7c8..6f2f9d00413 100644--- a/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuContextChips.tsx+++ b/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuContextChips.tsx@@ -1,28 +1,19 @@+import { CommandMenuContextChipIconWrapper } from '@/command-menu/components/CommandMenuContextChipIconWrapper';import { CommandMenuContextRecordChipAvatars } from '@/command-menu/components/CommandMenuContextRecordChipAvatars';import { useCommandMenuHistory } from '@/command-menu/hooks/useCommandMenuHistory';import { commandMenuNavigationMorphItemsByPageState } from '@/command-menu/states/commandMenuNavigationMorphItemsByPageState';import { commandMenuNavigationStackState } from '@/command-menu/states/commandMenuNavigationStackState';-import { CommandMenuPages } from 'twenty-shared/types';+import { allowRequestsToTwentyIconsState } from '@/client-config/states/allowRequestsToTwentyIcons';import { objectMetadataItemsState } from '@/object-metadata/states/objectMetadataItemsState';import { recordStoreIdentifiersFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreIdentifiersSelector';import { recordStoreRecordsSelector } from '@/object-record/record-store/states/selectors/recordStoreRecordsSelector';-import { styled } from '@linaria/react';-import { useContext, useMemo } from 'react';-import { isDefined } from 'twenty-shared/utils';-import { allowRequestsToTwentyIconsState } from '@/client-config/states/allowRequestsToTwentyIcons';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { useContext, useMemo } from 'react';+import { CommandMenuPages } from 'twenty-shared/types';+import { isDefined } from 'twenty-shared/utils';import { ThemeContext } from 'twenty-ui/theme';-const StyledIconWrapper = styled.div`- background: ${themeCssVariables.background.primary};- border-radius: ${themeCssVariables.border.radius.sm};- display: flex;- align-items: center;- justify-content: center;-`;-export const useCommandMenuContextChips = () => {const commandMenuNavigationStack = useAtomStateValue(commandMenuNavigationStackState,@@ -122,7 +113,7 @@ export const useCommandMenuContextChips = () => {Icons: isLastChip? [<page.pageIcon size={theme.icon.size.sm} />]: [- <StyledIconWrapper>+ <CommandMenuContextChipIconWrapper><page.pageIconsize={theme.icon.size.sm}color={@@ -132,7 +123,7 @@ export const useCommandMenuContextChips = () => {: theme.font.color.tertiary}/>- </StyledIconWrapper>,+ </CommandMenuContextChipIconWrapper>,],text: page.pageTitle,onClick: isLastChipdiff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuColumn.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuColumn.tsxindex 76fd845ff83..0da8660aa96 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuColumn.tsx@@ -1,10 +1,11 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledColumn = styled.div`display: flex;flex-direction: column;width: 100%;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;export const AdvancedFilterCommandMenuColumn = StyledColumn;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuContainer.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuContainer.tsxindex f9419455534..b6e8d575357 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuContainer.tsx@@ -9,20 +9,21 @@ import { rootLevelRecordFilterGroupComponentSelector } from '@/object-record/advimport { isRecordFilterGroupChildARecordFilterGroup } from '@/object-record/advanced-filter/utils/isRecordFilterGroupChildARecordFilterGroup';import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`align-items: start;display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledChildContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(6)};+ gap: ${themeCssVariables.spacing[6]};width: 100%;`;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuLogicalOperatorCell.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuLogicalOperatorCell.tsxindex 1b78511855a..1971f865751 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuLogicalOperatorCell.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuLogicalOperatorCell.tsx@@ -6,23 +6,24 @@ import { type RecordFilterGroup } from '@/object-record/record-filter-group/typeimport { Select } from '@/ui/input/components/Select';import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';-import styled from '@emotion/styled';+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';const StyledText = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};display: flex;- height: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};`;const StyledContainer = styled.div`align-items: start;display: flex;- min-width: ${({ theme }) => theme.spacing(20)};- color: ${({ theme }) => theme.font.color.tertiary};+ min-width: ${themeCssVariables.spacing[20]};+ color: ${themeCssVariables.font.color.tertiary};`;type AdvancedFilterCommandMenuLogicalOperatorCellProps = {diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterColumn.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterColumn.tsxindex 2fa8c4936d1..974768556f9 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterColumn.tsx@@ -11,14 +11,15 @@ import { getAdvancedFilterObjectFilterDropdownComponentInstanceId } from '@/objeimport { ObjectFilterDropdownComponentInstanceContext } from '@/object-record/object-filter-dropdown/states/contexts/ObjectFilterDropdownComponentInstanceContext';import { type RecordFilterGroup } from '@/object-record/record-filter-group/types/RecordFilterGroup';import { type RecordFilter } from '@/object-record/record-filter/types/RecordFilter';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`display: flex;flex-direction: row;justify-content: space-between;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;type AdvancedFilterCommandMenuRecordFilterColumnProps = {diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterGroupChildren.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterGroupChildren.tsxindex 335b4f6874b..bb50b019c09 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterGroupChildren.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterGroupChildren.tsx@@ -3,21 +3,24 @@ import { AdvancedFilterAddFilterRuleSelect } from '@/object-record/advanced-filtimport { useChildRecordFiltersAndRecordFilterGroups } from '@/object-record/advanced-filter/hooks/useChildRecordFiltersAndRecordFilterGroups';import { AdvancedFilterContext } from '@/object-record/advanced-filter/states/context/AdvancedFilterContext';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div<{ isGrayBackground?: boolean }>`align-items: start;- background-color: ${({ theme, isGrayBackground }) =>- isGrayBackground ? theme.background.transparent.lighter : 'transparent'};- border: ${({ theme }) => `1px solid ${theme.border.color.medium}`};- border-radius: ${({ theme }) => theme.border.radius.md};+ background-color: ${({ isGrayBackground }) =>+ isGrayBackground+ ? themeCssVariables.background.transparent.lighter+ : 'transparent'};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.md};display: flex;flex: 1;flex-direction: column;- gap: ${({ theme }) => theme.spacing(6)};- padding: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[6]};+ padding: ${themeCssVariables.spacing[2]};`;type AdvancedFilterCommandMenuRecordFilterGroupChildrenProps = {diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterGroupColumn.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterGroupColumn.tsxindex 817b8c65f50..86946f5a241 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterGroupColumn.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterGroupColumn.tsx@@ -5,14 +5,15 @@ import { AdvancedFilterRecordFilterGroupOptionsDropdown } from '@/object-record/import { AdvancedFilterContext } from '@/object-record/advanced-filter/states/context/AdvancedFilterContext';import { type RecordFilterGroup } from '@/object-record/record-filter-group/types/RecordFilterGroup';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`display: flex;flex-direction: row;justify-content: space-between;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;export const AdvancedFilterCommandMenuRecordFilterGroupColumn = ({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 5fb2b1e4e60..d511e661b95 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,9 +1,10 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRow = styled.div`display: flex;width: 100%;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;export const AdvancedFilterDropdownRow = StyledRow;diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectDropdownButton.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectDropdownButton.tsxindex 32ec5ee297e..8add14c1cb8 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectDropdownButton.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterFieldSelectDropdownButton.tsx@@ -4,7 +4,7 @@ import { DEFAULT_ADVANCED_FILTER_DROPDOWN_OFFSET } from '@/object-record/advanceimport { useAdvancedFilterFieldSelectDropdown } from '@/object-record/advanced-filter/hooks/useAdvancedFilterFieldSelectDropdown';import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledContainer = styled.div`flex: 2;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 76622cda4b9..8d34eb2f39e 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@@ -1,23 +1,24 @@import { objectFilterDropdownSearchInputComponentState } from '@/object-record/object-filter-dropdown/states/objectFilterDropdownSearchInputComponentState';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';export const StyledInput = styled.input`background: transparent;border: none;border-top: none;- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};border-radius: 0;- border-top-left-radius: ${({ theme }) => theme.border.radius.md};- border-top-right-radius: ${({ theme }) => theme.border.radius.md};- color: ${({ theme }) => theme.font.color.primary};+ border-top-left-radius: ${themeCssVariables.border.radius.md};+ border-top-right-radius: ${themeCssVariables.border.radius.md};+ color: ${themeCssVariables.font.color.primary};margin: 0;outline: none;- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};min-height: 19px;font-family: inherit;- font-size: ${({ theme }) => theme.font.size.sm};+ font-size: ${themeCssVariables.font.size.sm};font-weight: inherit;max-width: 100%;@@ -25,7 +26,7 @@ export const StyledInput = styled.input`text-decoration: none;&::placeholder {- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};}`;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 cbcdf9b8881..66ebbe45a6e 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@@ -1,23 +1,24 @@import { AdvancedFilterLogicalOperatorDropdown } from '@/object-record/advanced-filter/components/AdvancedFilterLogicalOperatorDropdown';import { type RecordFilterGroup } from '@/object-record/record-filter-group/types/RecordFilterGroup';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { capitalize } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledText = styled.div`- height: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};display: flex;align-items: center;- padding-left: ${({ theme }) => theme.spacing(2.25)};+ padding-left: 9px;`;const StyledContainer = styled.div`align-items: start;display: flex;- min-width: ${({ theme }) => theme.spacing(20)};- color: ${({ theme }) => theme.font.color.tertiary};+ min-width: ${themeCssVariables.spacing[20]};+ color: ${themeCssVariables.font.color.tertiary};`;type AdvancedFilterLogicalOperatorCellProps = {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 0544386b27e..88ff98c01c3 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@@ -2,20 +2,23 @@ import { AdvancedFilterAddFilterRuleSelect } from '@/object-record/advanced-filtimport { AdvancedFilterRecordFilterRow } from '@/object-record/advanced-filter/components/AdvancedFilterRecordFilterRow';import { useChildRecordFiltersAndRecordFilterGroups } from '@/object-record/advanced-filter/hooks/useChildRecordFiltersAndRecordFilterGroups';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div<{ isGrayBackground?: boolean }>`align-items: start;- background-color: ${({ theme, isGrayBackground }) =>- isGrayBackground ? theme.background.transparent.lighter : 'transparent'};- border: ${({ theme }) => `1px solid ${theme.border.color.medium}`};- border-radius: ${({ theme }) => theme.border.radius.md};+ background-color: ${({ isGrayBackground }) =>+ isGrayBackground+ ? themeCssVariables.background.transparent.lighter+ : 'transparent'};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.md};display: flex;flex: 1;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]};`;type AdvancedFilterRecordFilterGroupChildrenProps = {diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterOperandSelect.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterOperandSelect.tsxindex 763be722f3e..741816dc41f 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterOperandSelect.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterOperandSelect.tsx@@ -6,7 +6,7 @@ import { getRecordFilterOperands } from '@/object-record/record-filter/utils/getimport { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';import { SelectControl } from '@/ui/input/components/SelectControl';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';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 fb0c3d66d84..0c4cf193a9c 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@@ -11,16 +11,17 @@ import { isRecordFilterGroupChildARecordFilterGroup } from '@/object-record/advaimport { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`align-items: start;display: flex;flex: 1;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]};`;export const AdvancedFilterRootRecordFilterGroup = () => {diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterValueInput.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterValueInput.tsxindex af7e63eaaba..358fbdb0270 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterValueInput.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterValueInput.tsx@@ -14,7 +14,7 @@ import { type DropdownOffset } from '@/ui/layout/dropdown/types/DropdownOffset';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';const StyledValueDropdownContainer = styled.div`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 4ade62801c5..701f5d5ca77 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@@ -5,26 +5,27 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport { isNonEmptyString } from '@sniptt/guards';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useFieldMetadataItemById } from '@/object-metadata/hooks/useFieldMetadataItemById';import { 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';// TODO: factorize this with https://github.com/twentyhq/core-team-issues/issues/752const StyledControlContainer = styled.div`display: flex;align-items: center;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};box-sizing: border-box;- height: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};max-width: 100%;- padding: 0 ${({ theme }) => theme.spacing(2)};- background-color: ${({ theme }) => theme.background.transparent.lighter};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.primary};+ padding: 0 ${themeCssVariables.spacing[2]};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.primary};cursor: pointer;text-align: left;`;diff --git a/packages/twenty-front/src/modules/object-record/components/MainContainerLayoutWithCommandMenu.tsx b/packages/twenty-front/src/modules/object-record/components/MainContainerLayoutWithCommandMenu.tsxindex f1bb8ce242f..2dbb0fb1d82 100644--- a/packages/twenty-front/src/modules/object-record/components/MainContainerLayoutWithCommandMenu.tsx+++ b/packages/twenty-front/src/modules/object-record/components/MainContainerLayoutWithCommandMenu.tsx@@ -2,9 +2,10 @@ import { CommandMenuForMobile } from '@/command-menu/components/CommandMenuForMoimport { CommandMenuSidePanelForDesktop } from '@/command-menu/components/CommandMenuSidePanelForDesktop';import { useCommandMenuHotKeys } from '@/command-menu/hooks/useCommandMenuHotKeys';import { PageBody } from '@/ui/layout/page/components/PageBody';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { useIsMobile } from 'twenty-ui/utilities';+import { themeCssVariables } from 'twenty-ui/theme-constants';type MainContainerLayoutWithCommandMenuProps = {children: ReactNode;@@ -14,8 +15,8 @@ const StyledMainContainerLayoutForDesktop = styled.div`display: flex;flex: 1;min-height: 0;- padding-bottom: ${({ theme }) => theme.spacing(3)};- padding-right: ${({ theme }) => theme.spacing(3)};+ padding-bottom: ${themeCssVariables.spacing[3]};+ padding-right: ${themeCssVariables.spacing[3]};`;const StyledPageBodyForDesktop = styled(PageBody)`@@ -35,9 +36,9 @@ const StyledMainContainerLayoutForMobile = styled.div`const StyledPageBodyForMobile = styled(PageBody)`padding-bottom: 0;- padding-left: ${({ theme }) => theme.spacing(1)};+ padding-left: ${themeCssVariables.spacing[1]};- padding-right: ${({ theme }) => theme.spacing(1.5)};+ padding-right: ${themeCssVariables.spacing['1.5']};`;export const MainContainerLayoutWithCommandMenu = ({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 24230d582d0..b1754216a24 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,6 +1,8 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';+import { useContext } from 'react';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useApplyObjectFilterDropdownFilterValue } from '@/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownFilterValue';import { useObjectFilterDropdownFilterValue } from '@/object-record/object-filter-dropdown/hooks/useObjectFilterDropdownFilterValue';@@ -16,12 +18,12 @@ const StyledBooleanSelectContainer = styled.div<{ selected?: boolean }>`align-items: center;cursor: pointer;display: flex;- padding: ${({ theme }) =>- `${theme.spacing(2)} ${theme.spacing(2)} ${theme.spacing(2)} ${theme.spacing(1)}`};- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.primary};+ padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[2]}+ ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[1]};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.primary};&:hover {- background: ${({ theme }) => theme.background.transparent.light};+ background: ${themeCssVariables.background.transparent.light};}`;@@ -32,7 +34,7 @@ const StyledIconCheckContainer = styled.div``;export const ObjectFilterDropdownBooleanSelect = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 0e1ac9ed5c2..841e78a8a4d 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@@ -1,13 +1,14 @@import { useApplyObjectFilterDropdownFilterValue } from '@/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownFilterValue';import { useObjectFilterDropdownFilterValue } from '@/object-record/object-filter-dropdown/hooks/useObjectFilterDropdownFilterValue';import { RatingInput } from '@/ui/field/input/components/RatingInput';-import styled from '@emotion/styled';+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';const StyledRatingInputContainer = styled.div`- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};`;const convertFieldRatingValueToNumber = (diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordPinnedItems.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordPinnedItems.tsxindex 25f01351084..35d3c59ea45 100644--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordPinnedItems.tsx+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordPinnedItems.tsx@@ -1,12 +1,13 @@import { type SelectableItem } from '@/object-record/select/types/SelectableItem';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Avatar } from 'twenty-ui/display';import { MenuItemMultiSelectAvatar } from 'twenty-ui/navigation';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledPinnedItemsContainer = styled.div`display: flex;flex-direction: column;- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};`;export const ObjectFilterDropdownRecordPinnedItems = (props: {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 a4465ba82f0..1d768497a9c 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@@ -12,11 +12,12 @@ import { useUpdateViewFromCurrentState } from '@/views/view-picker/hooks/useUpdaimport { viewPickerIsDirtyComponentState } from '@/views/view-picker/states/viewPickerIsDirtyComponentState';import { viewPickerIsPersistingComponentState } from '@/views/view-picker/states/viewPickerIsPersistingComponentState';import { viewPickerSelectedIconComponentState } from '@/views/view-picker/states/viewPickerSelectedIconComponentState';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { useEffect, useRef, useState } from 'react';+import { styled } from '@linaria/react';+import { useContext, useEffect, useRef, useState } from 'react';import { Key } from 'ts-key-enum';import { OverflowingTextWithTooltip, useIcons } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useDebouncedCallback } from 'use-debounce';const StyledDropdownMenuIconAndNameContainer = styled.div`@@ -24,27 +25,27 @@ const StyledDropdownMenuIconAndNameContainer = styled.div`display: flex;margin-left: 0;margin-right: 0;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledMenuTitleContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};- padding: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};+ padding: ${themeCssVariables.spacing[1]};`;const StyledMenuIconContainer = styled.div`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};align-items: center;display: flex;- height: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};justify-content: center;- width: ${({ theme }) => theme.spacing(6)};+ width: ${themeCssVariables.spacing[6]};`;const StyledMainText = styled.div`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};flex-shrink: 0;overflow: hidden;text-overflow: ellipsis;@@ -110,7 +111,7 @@ export const ObjectOptionsDropdownMenuViewName = ({}}, [currentView?.key]);- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { getIcon } = useIcons();const MainIcon = getIcon(currentView?.icon);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 084af0b2144..742dc8d2c81 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,6 +1,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext, useRef } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RecordBoardColumns } from '@/object-record/record-board/components/RecordBoardColumns';import { RecordBoardDragDropContext } from '@/object-record/record-board/components/RecordBoardDragDropContext';@@ -22,7 +23,7 @@ const StyledContainer = styled.div`const StyledContainerContainer = styled.div`display: flex;flex-direction: column;- min-height: calc(100% - ${({ theme }) => theme.spacing(2)});+ min-height: calc(100% - ${themeCssVariables.spacing[2]});height: min-content;`;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 60a401b1eeb..23fe106b643 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@@ -2,13 +2,14 @@ import { RecordBoardColumn } from '@/object-record/record-board/record-board-colimport { visibleRecordGroupIdsComponentFamilySelector } from '@/object-record/record-group/states/selectors/visibleRecordGroupIdsComponentFamilySelector';import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue';import { ViewType } from '@/views/types/ViewType';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledColumnContainer = styled.div`display: flex;& > *:not(:first-of-type) {- border-left: 1px solid ${({ theme }) => theme.border.color.light};+ border-left: 1px solid ${themeCssVariables.border.color.light};}`;diff --git a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardFetchMoreInViewTriggerComponent.tsx b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardFetchMoreInViewTriggerComponent.tsxindex b9df7a5b93f..4b2d3321fdc 100644--- a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardFetchMoreInViewTriggerComponent.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardFetchMoreInViewTriggerComponent.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useEffect } from 'react';import { useInView } from 'react-intersection-observer';diff --git a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardHeader.tsx b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardHeader.tsxindex 56fc616386c..a7f6acc1cc6 100644--- a/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/components/RecordBoardHeader.tsx@@ -4,7 +4,8 @@ import { visibleRecordGroupIdsComponentFamilySelector } from '@/object-record/reimport { RecordIndexGroupAggregatesDataLoader } from '@/object-record/record-index/components/RecordIndexGroupAggregatesDataLoader';import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue';import { ViewType } from '@/views/types/ViewType';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledHeaderContainer = styled.div`display: flex;@@ -21,7 +22,7 @@ const StyledHeaderContainer = styled.div`}& > *:not(:first-of-type) {- border-left: 1px solid ${({ theme }) => theme.border.color.light};+ border-left: 1px solid ${themeCssVariables.border.color.light};}`;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 be40c552b34..95541ea0889 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@@ -30,23 +30,21 @@ import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooimport { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { AnimatedEaseInOut } from 'twenty-ui/utilities';import { useDebouncedCallback } from 'use-debounce';const StyledCardContainer = styled.div<{ isPrimaryMultiDrag?: boolean }>`position: relative;- ${({ isPrimaryMultiDrag }) =>- isPrimaryMultiDrag &&- `- transform: scale(1.02);- z-index: 10;- `}+ transform: ${({ isPrimaryMultiDrag }) =>+ isPrimaryMultiDrag ? 'scale(1.02)' : 'none'};+ z-index: ${({ isPrimaryMultiDrag }) => (isPrimaryMultiDrag ? '10' : 'auto')};`;const StyledBoardCardWrapper = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};width: 100%;`;diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardDraggableContainer.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardDraggableContainer.tsxindex cfbb276dcbc..f752d65b5ea 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardDraggableContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardDraggableContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Draggable } from '@hello-pangea/dnd';import { useContext } from 'react';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 38f5db67c62..be2202ad116 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@@ -18,8 +18,9 @@ import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtoimport { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';import { ViewOpenRecordInType } from '@/views/types/ViewOpenRecordInType';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { isDefined } from 'twenty-shared/utils';import { ChipVariant } from 'twenty-ui/components';import { IconEye, IconEyeOff } from 'twenty-ui/display';@@ -29,7 +30,7 @@ const StyledCompactIconContainer = styled.div`align-items: center;display: flex;justify-content: center;- margin-left: ${({ theme }) => theme.spacing(1)};+ margin-left: ${themeCssVariables.spacing[1]};`;const StyledCheckboxContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardMultiDragCounterChip.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardMultiDragCounterChip.tsxindex edb2bdedbe5..453a6a56ff8 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardMultiDragCounterChip.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardMultiDragCounterChip.tsx@@ -1,6 +1,6 @@import { originalDragSelectionComponentState } from '@/object-record/record-drag/states/originalDragSelectionComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { NotificationCounter } from 'twenty-ui/navigation';const StyledNotificationCounter = styled(NotificationCounter)`diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardMultiDragStack.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardMultiDragStack.tsxindex 0b4f1ec1a55..d49bf7a4d30 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardMultiDragStack.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCardMultiDragStack.tsx@@ -1,6 +1,7 @@import { originalDragSelectionComponentState } from '@/object-record/record-drag/states/originalDragSelectionComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRecordBoardCardStackCard = styled.div<{ offset: number }>`position: absolute;@@ -8,9 +9,9 @@ const StyledRecordBoardCardStackCard = styled.div<{ offset: number }>`left: 0;right: 0;height: 100%;- background-color: ${({ theme }) => theme.accent.tertiary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.accent.tertiary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};z-index: ${({ offset }) => -offset};`;diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/StopPropagationContainer.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/StopPropagationContainer.tsxindex ce8942e3764..96ed98d14be 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/StopPropagationContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/StopPropagationContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode } from 'react';const StyledFieldContainer = 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 e7000513c7d..7a3eebe9e3d 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,6 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Droppable } from '@hello-pangea/dnd';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RecordBoardColumnCardsContainer } from '@/object-record/record-board/record-board-column/components/RecordBoardColumnCardsContainer';import { RecordBoardColumnContext } from '@/object-record/record-board/record-board-column/contexts/RecordBoardColumnContext';@@ -12,14 +13,14 @@ import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooimport { isDefined } from 'twenty-shared/utils';const StyledColumn = styled.div`- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};display: flex;flex-direction: column;max-width: 200px;min-width: 200px;min-height: 100%;flex: 1;- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};padding-top: 0px;position: relative;height: 100%;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 09d3a3fa7a5..2ac532ba99e 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,6 +1,8 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { SkeletonTheme } from 'react-loading-skeleton';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { RecordCardBodyContainer } from '@/object-record/record-card/components/RecordCardBodyContainer';@@ -11,31 +13,31 @@ import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';const StyledSkeletonIconAndText = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledSkeletonTitle = styled.div`- padding-left: ${({ theme }) => theme.spacing(1)};+ padding-left: ${themeCssVariables.spacing[1]};`;const StyledBodyContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(0.5)};+ gap: ${themeCssVariables.spacing['0.5']};padding-top: 4px;padding-bottom: 4px;`;const StyledStaticCellSkeleton = styled.div<{ width: number; height: number }>`- background-color: ${({ theme }) => theme.background.tertiary};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.tertiary};+ border-radius: ${themeCssVariables.border.radius.sm};width: ${({ width }) => width}px;height: ${({ height }) => height}px;`;export const RecordBoardColumnCardContainerSkeletonLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { currentView } = useGetCurrentViewOnly();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 e78ef43fefb..a8c76e74552 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,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Draggable, type DroppableProvided } from '@hello-pangea/dnd';import { useContext } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RecordBoardCardDraggableContainer } from '@/object-record/record-board/record-board-card/components/RecordBoardCardDraggableContainer';@@ -19,7 +20,7 @@ const StyledColumnCardsContainer = styled.div``;const StyledNewButtonContainer = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(4)};+ padding-bottom: ${themeCssVariables.spacing[4]};`;type RecordBoardColumnCardsContainerProps = {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 a9dac3b7636..c7c65233715 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,5 +1,6 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext, useState } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPermissionsForObject';import { RecordBoardContext } from '@/object-record/record-board/contexts/RecordBoardContext';@@ -38,7 +39,7 @@ const StyledHeaderActions = styled.div``;const StyledHeaderContainer = styled.div`- background: ${({ theme }) => theme.background.primary};+ background: ${themeCssVariables.background.primary};display: flex;justify-content: space-between;width: 100%;@@ -46,7 +47,7 @@ const StyledHeaderContainer = styled.div`const StyledLeftContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};overflow: hidden;`;@@ -56,13 +57,13 @@ const StyledRightContainer = styled.div``;const StyledColumn = styled.div`- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};display: flex;flex-direction: column;max-width: ${RECORD_BOARD_COLUMN_WIDTH}px;min-width: ${RECORD_BOARD_COLUMN_WIDTH}px;- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};position: relative;`;diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdown.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdown.tsxindex 5070e04f5dd..03a839b7185 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdown.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdown.tsx@@ -7,7 +7,7 @@ import { RecordBoardColumnHeaderAggregateDropdownContext } from '@/object-recordimport { type RecordBoardColumnHeaderAggregateContentId } from '@/object-record/record-board/types/RecordBoardColumnHeaderAggregateContentId';import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { DROPDOWN_OFFSET_Y } from '@/ui/layout/dropdown/constants/DropdownOffsetY';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Nullable } from 'twenty-shared/types';type RecordBoardColumnHeaderAggregateDropdownProps = {diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdownButton.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdownButton.tsxindex 53be332772f..89ff4d75f7a 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdownButton.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdownButton.tsx@@ -1,7 +1,7 @@import { StyledHeaderDropdownButton } from '@/ui/layout/dropdown/components/StyledHeaderDropdownButton';import { isDropdownOpenComponentState } from '@/ui/layout/dropdown/states/isDropdownOpenComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Nullable } from 'twenty-shared/types';import { Tag } from 'twenty-ui/components';import { AppTooltip, TooltipDelay } from 'twenty-ui/display';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 0787d407a4f..3b04df05b5b 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,16 +1,17 @@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 '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSkeletonCardContainer = styled.div`- background-color: ${({ theme }) => theme.background.secondary};- border: 1px solid ${({ theme }) => theme.background.quaternary};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.secondary};+ border: 1px solid ${themeCssVariables.background.quaternary};+ border-radius: ${themeCssVariables.border.radius.sm};box-shadow:- 0px 4px 8px 0px ${({ theme }) => theme.color.gray2},- 0px 0px 4px 0px ${({ theme }) => theme.color.gray2};- color: ${({ theme }) => theme.font.color.primary};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ 0px 4px 8px 0px ${themeCssVariables.color.gray2},+ 0px 0px 4px 0px ${themeCssVariables.color.gray2};+ color: ${themeCssVariables.font.color.primary};+ margin-bottom: ${themeCssVariables.spacing[2]};`;export const RecordBoardColumnLoadingSkeletonCards = () => {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 9505ded406e..2b827d1f3e5 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@@ -4,31 +4,32 @@ import { RecordBoardColumnContext } from '@/object-record/record-board/record-boimport { hasAnySoftDeleteFilterOnViewComponentSelector } from '@/object-record/record-filter/states/hasAnySoftDeleteFilterOnView';import { useCreateNewIndexRecord } from '@/object-record/record-table/hooks/useCreateNewIndexRecord';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';import { IconPlus } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledNewButton = styled.button`align-items: center;align-self: baseline;- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};border: none;- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.tertiary};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.tertiary};cursor: pointer;display: flex;- gap: ${({ theme }) => theme.spacing(1)};- padding: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};+ padding: ${themeCssVariables.spacing[1]};&:hover {- background-color: ${({ theme }) => theme.background.tertiary};+ background-color: ${themeCssVariables.background.tertiary};}`;export const RecordBoardColumnNewRecordButton = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 7baca3e57f4..b113011920c 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { ACTION_MENU_DROPDOWN_CLICK_OUTSIDE_ID } from '@/action-menu/constants/ActionMenuDropdownClickOutsideId';import { COMMAND_MENU_CLICK_OUTSIDE_ID } from '@/command-menu/constants/CommandMenuClickOutsideId';@@ -14,14 +14,15 @@ 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 { LINK_CHIP_CLICK_OUTSIDE_ID } from 'twenty-ui/components';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainerContainer = styled.div`display: flex;flex-direction: column;height: inherit;- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2)};- padding-left: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]};+ padding-left: ${themeCssVariables.spacing[1]};`;export const RecordCalendar = () => {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 f1bb68d5045..6ecebbed665 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@@ -7,14 +7,16 @@ import { useCreateNewIndexRecord } from '@/object-record/record-table/hooks/useCimport { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { type Temporal } from 'temporal-polyfill';import { IconPlus } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledButton = styled(Button)`- padding: ${({ theme }) => theme.spacing(0.5)};+ padding: ${themeCssVariables.spacing['0.5']};min-width: unset;height: auto;`;@@ -28,7 +30,7 @@ export const RecordCalendarAddNew = ({}: RecordCalendarAddNewProps) => {const { userTimezone } = useUserTimezone();const { objectMetadataItem } = useRecordCalendarContextOrThrow();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { createNewIndexRecord } = useCreateNewIndexRecord({objectMetadataItem,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 767c94d6cf1..ec5f2c87740 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@@ -9,7 +9,7 @@ import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { type DropdownOffset } from '@/ui/layout/dropdown/types/DropdownOffset';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { format } from 'date-fns';import { Temporal } from 'temporal-polyfill';@@ -20,6 +20,7 @@ import {} from 'twenty-shared/utils';import { IconChevronLeft, IconChevronRight } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`align-items: center;@@ -30,19 +31,19 @@ const StyledContainer = styled.div``;const StyledNavigationButton = styled(Button)`- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};`;const StyledLeftSection = styled.div`display: flex;align-items: center;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledNavigationSection = styled.div`display: flex;align-items: center;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};justify-content: flex-end;`;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonth.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonth.tsxindex da9a68fd370..0c887d25628 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonth.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonth.tsx@@ -7,7 +7,7 @@ import { useEndRecordDrag } from '@/object-record/record-drag/hooks/useEndRecordimport { useProcessCalendarCardDrop } from '@/object-record/record-drag/hooks/useProcessCalendarCardDrop';import { useStartRecordDrag } from '@/object-record/record-drag/hooks/useStartRecordDrag';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {DragDropContext,type DragStart,diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBody.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBody.tsxindex 9ea32b96d78..2f88be9a3c4 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBody.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBody.tsx@@ -1,12 +1,13 @@import { RecordCalendarMonthBodyWeek } from '@/object-record/record-calendar/month/components/RecordCalendarMonthBodyWeek';import { useRecordCalendarMonthContextOrThrow } from '@/object-record/record-calendar/month/contexts/RecordCalendarMonthContext';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`display: flex;flex-direction: column;flex: 1;- border: 1px solid ${({ theme }) => theme.border.color.light};+ border: 1px solid ${themeCssVariables.border.color.light};border-radius: 4px;overflow: hidden;`;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay.tsxindex 91038111709..3beff1b796f 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay.tsx@@ -4,8 +4,7 @@ import { calendarDayRecordIdsComponentFamilySelector } from '@/object-record/recimport { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import { css } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Droppable } from '@hello-pangea/dnd';import { useState } from 'react';import { Temporal } from 'temporal-polyfill';@@ -16,6 +15,7 @@ import {isSamePlainDate,} from 'twenty-shared/utils';import { RecordCalendarAddNew } from '@/object-record/record-calendar/components/RecordCalendarAddNew';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div<{isOtherMonth: boolean;@@ -25,27 +25,20 @@ const StyledContainer = styled.div<{width: calc(100% / 7);flex-direction: column;min-height: 122px;- padding: ${({ theme }) => theme.spacing(1)};- background: ${({ theme }) => theme.background.primary};+ padding: ${themeCssVariables.spacing[1]};min-width: 0;- color: ${({ theme }) => theme.font.color.primary};+ background: ${({ isOtherMonth, isDayOfWeekend }) =>+ isOtherMonth || isDayOfWeekend+ ? themeCssVariables.background.secondary+ : themeCssVariables.background.primary};+ color: ${({ isOtherMonth }) =>+ isOtherMonth+ ? themeCssVariables.font.color.light+ : themeCssVariables.font.color.primary};&:not(:last-child) {- border-right: 1px solid ${({ theme }) => theme.border.color.light};+ border-right: 1px solid ${themeCssVariables.border.color.light};}-- ${({ isOtherMonth, theme }) =>- isOtherMonth &&- css`- background: ${theme.background.secondary};- color: ${theme.font.color.light};- `}-- ${({ isDayOfWeekend, theme }) =>- isDayOfWeekend &&- css`- background: ${theme.background.secondary};- `}`;const StyledDayHeader = styled.div`@@ -61,42 +54,44 @@ const StyledDayHeader = styled.div`const StyledDayHeaderDayContainer = styled.div`display: flex;margin-left: auto;- padding: ${({ theme }) => theme.spacing(0.5, 0.5)};+ padding: ${themeCssVariables.spacing['0.5']}+ ${themeCssVariables.spacing['0.5']};`;const StyledDayHeaderDay = styled.span<{ isToday: boolean }>`align-items: center;display: flex;- font-size: ${({ theme }) => theme.font.size.sm};+ font-size: ${themeCssVariables.font.size.sm};justify-content: center;line-height: 140%;width: 20px;-- ${({ isToday, theme }) =>- isToday &&- css`- border-radius: 4px;- background: ${theme.color.blue};- color: ${theme.font.color.inverted};- font-weight: ${theme.font.weight.medium};- `}+ border-radius: ${({ isToday }) => (isToday ? '4px' : '0')};+ background: ${({ isToday }) =>+ isToday ? themeCssVariables.color.blue : 'transparent'};+ color: ${({ isToday }) =>+ isToday+ ? themeCssVariables.font.color.inverted+ : themeCssVariables.font.color.primary};+ font-weight: ${({ isToday }) =>+ isToday ? themeCssVariables.font.weight.medium : 'normal'};`;const StyledCardsContainer = styled.div<{ isDraggedOver?: boolean }>`+ background: ${({ isDraggedOver }) =>+ isDraggedOver+ ? themeCssVariables.background.transparent.lighter+ : 'transparent'};+ border: ${({ isDraggedOver }) =>+ isDraggedOver+ ? `1px dashed ${themeCssVariables.border.color.medium}`+ : 'none'};+ border-radius: ${themeCssVariables.border.radius.sm};display: flex;- flex-direction: column;- gap: ${({ theme }) => theme.spacing(0.5)};flex: 1;+ flex-direction: column;+ gap: ${themeCssVariables.spacing['0.5']};min-height: 60px;- border-radius: ${({ theme }) => theme.border.radius.sm};transition: background-color 0.1s ease;-- ${({ isDraggedOver, theme }) =>- isDraggedOver &&- css`- background: ${theme.background.transparent.lighter};- border: 1px dashed ${theme.border.color.medium};- `}`;type RecordCalendarMonthBodyDayProps = {diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyWeek.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyWeek.tsxindex 14c975ccea8..07fadf9eeef 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyWeek.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyWeek.tsx@@ -1,6 +1,7 @@import { RecordCalendarMonthBodyDay } from '@/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay';import { useRecordCalendarMonthContextOrThrow } from '@/object-record/record-calendar/month/contexts/RecordCalendarMonthContext';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { eachDayOfInterval, endOfWeek } from 'date-fns';import { type Temporal } from 'temporal-polyfill';import {@@ -14,7 +15,7 @@ const StyledContainer = styled.div`flex: 1;&:not(:last-of-type) {- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};}`;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthHeader.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthHeader.tsxindex 2ae5e79b328..ed2a7200e41 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthHeader.tsx@@ -1,6 +1,6 @@import { RecordCalendarMonthHeaderDay } from '@/object-record/record-calendar/month/components/RecordCalendarMonthHeaderDay';import { useRecordCalendarMonthContextOrThrow } from '@/object-record/record-calendar/month/contexts/RecordCalendarMonthContext';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthHeaderDay.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthHeaderDay.tsxindex c13f4276af6..1d339550901 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthHeaderDay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthHeaderDay.tsx@@ -1,16 +1,17 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';type RecordCalendarMonthHeaderDayProps = {label: string;};const StyledLabel = styled.div`- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};display: flex;- font-size: ${({ theme }) => theme.font.size.sm};+ font-size: ${themeCssVariables.font.size.sm};height: 24px;justify-content: flex-end;- padding: ${({ theme }) => theme.spacing(0, 1)};+ padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[1]};width: calc(100% / 7);`;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 b873ebbb0b0..8e286c49a4a 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@@ -17,7 +17,7 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/comimport { useAtomComponentFamilyState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyState';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { AnimatedEaseInOut } from 'twenty-ui/utilities';const StyledContainer = styled.div`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 feaa60b0c34..368655b073f 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,10 +17,11 @@ 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 styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRecordCardBodyContainer = styled(RecordCardBodyContainer)`- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};`;type RecordCalendarCardBodyProps = {diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer.tsxindex 82d127ccbb3..35c7f1278d3 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Draggable } from '@hello-pangea/dnd';import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPermissionsForObject';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 7c24567129d..6567c577e9a 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@@ -8,7 +8,8 @@ import { recordStoreFamilyState } from '@/object-record/record-store/states/recoimport { useAtomComponentFamilyState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { isDefined } from 'twenty-shared/utils';import { ChipVariant } from 'twenty-ui/components';@@ -23,11 +24,11 @@ const StyledRecordChipContainer = styled.div`display: flex;flex: 1 1 auto;overflow: hidden;- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};`;const StyledRecordCardHeaderContainer = styled(RecordCardHeaderContainer)`- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};`;type RecordCalendarCardHeaderProps = {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 eafd98d4c88..b9be38398e7 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,41 +1,38 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledBoardCard = styled.div<{isDragging?: boolean;isSecondaryDragged?: boolean;isPrimaryMultiDrag?: boolean;}>`- background-color: ${({ theme }) => theme.background.secondary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.primary};+ background-color: ${themeCssVariables.background.secondary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.primary};cursor: pointer;width: 100%;- ${({ isSecondaryDragged }) =>- isSecondaryDragged &&- `- opacity: 0.3;- `}+ opacity: ${({ isSecondaryDragged }) => (isSecondaryDragged ? '0.3' : '1')};&[data-selected='true'] {- background-color: ${({ theme }) => theme.accent.quaternary};+ background-color: ${themeCssVariables.accent.quaternary};}&[data-focused='true'] {- background-color: ${({ theme }) => theme.background.tertiary};+ background-color: ${themeCssVariables.background.tertiary};}&[data-active='true'] {- background-color: ${({ theme }) => theme.accent.quaternary};- border: 1px solid ${({ theme }) => theme.color.blue7};+ background-color: ${themeCssVariables.accent.quaternary};+ border: 1px solid ${themeCssVariables.color.blue7};}&:hover {- border: 1px solid ${({ theme }) => theme.border.color.strong};+ border: 1px solid ${themeCssVariables.border.color.strong};&[data-active='true'] {- border: 1px solid ${({ theme }) => theme.color.blue7};+ border: 1px solid ${themeCssVariables.color.blue7};}}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 573c2661ac7..bb7bcfacec1 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,19 +1,20 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCardBodyContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(0.5)};- padding-bottom: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing['0.5']};+ padding-bottom: ${themeCssVariables.spacing[2]};padding-left: 10px;- padding-right: ${({ theme }) => theme.spacing(2)};+ padding-right: ${themeCssVariables.spacing[2]};span {align-items: center;display: flex;flex-direction: row;svg {- color: ${({ theme }) => theme.font.color.tertiary};- margin-right: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.tertiary};+ margin-right: ${themeCssVariables.spacing[2]};}}`;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 ca8437bd806..292d31922df 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,4 +1,5 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';export const StyledBoardCardHeaderContainer = styled.div<{isCompact: boolean;@@ -7,18 +8,19 @@ export const StyledBoardCardHeaderContainer = styled.div<{display: flex;flex-direction: row;justify-content: space-between;- font-weight: ${({ theme }) => theme.font.weight.medium};+ font-weight: ${themeCssVariables.font.weight.medium};height: 24px;- padding-bottom: ${({ theme, isCompact }) => theme.spacing(isCompact ? 2 : 1)};- padding-left: ${({ theme }) => theme.spacing(2)};- padding-right: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${({ isCompact }) =>+ isCompact ? themeCssVariables.spacing[2] : themeCssVariables.spacing[1]};+ padding-left: ${themeCssVariables.spacing[2]};+ padding-right: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};transition: padding ease-in-out 160ms;img {- height: ${({ theme }) => theme.icon.size.md}px;+ height: ${themeCssVariables.icon.size.md}px;object-fit: cover;- width: ${({ theme }) => theme.icon.size.md}px;+ width: ${themeCssVariables.icon.size.md}px;}`;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 e7f670edb1a..e35c8ac42e1 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,7 +1,8 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRecordsList = styled.div`- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};`;export { StyledRecordsList as RecordDetailRecordsListContainer };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 11ce48f2c22..63afc960a77 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,31 +1,46 @@import { useLayoutRenderingContext } from '@/ui/layout/contexts/LayoutRenderingContext';-import isPropValid from '@emotion/is-prop-valid';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { PageLayoutType } from '~/generated-metadata/graphql';-const StyledListItem = styled('div', {- shouldForwardProp: (prop) =>- isPropValid(prop) && prop !== 'noHorizontalPadding',-})<{ noHorizontalPadding?: boolean }>`+const StyledListItem = styled.div<{+ noHorizontalPadding?: boolean;+ isDropdownOpen?: boolean;+}>`align-items: center;justify-content: space-between;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};display: flex;- height: ${({ theme }) => theme.spacing(10)};- padding-left: ${({ theme, noHorizontalPadding }) =>- noHorizontalPadding ? 0 : theme.spacing(3)};- padding-right: ${({ theme, noHorizontalPadding }) =>- noHorizontalPadding ? 0 : theme.spacing(2)};+ height: ${themeCssVariables.spacing[10]};+ padding-left: ${({ noHorizontalPadding }) =>+ noHorizontalPadding ? 0 : themeCssVariables.spacing[3]};+ padding-right: ${({ noHorizontalPadding }) =>+ noHorizontalPadding ? 0 : themeCssVariables.spacing[2]};++ .displayOnHover {+ opacity: ${({ isDropdownOpen }) => (isDropdownOpen ? 1 : 0)};+ pointer-events: ${({ isDropdownOpen }) =>+ isDropdownOpen ? 'auto' : 'none'};+ transition: opacity+ calc(${themeCssVariables.animation.duration.instant} * 1s) ease;+ }++ &:hover .displayOnHover {+ opacity: 1;+ pointer-events: auto;+ }`;type RecordDetailRecordsListItemContainerProps = {children: React.ReactNode;className?: string;+ isDropdownOpen?: boolean;};export const RecordDetailRecordsListItemContainer = ({children,className,+ isDropdownOpen,}: RecordDetailRecordsListItemContainerProps) => {const layoutRenderingContext = useLayoutRenderingContext();@@ -36,6 +51,7 @@ export const RecordDetailRecordsListItemContainer = ({<StyledListItemclassName={className}noHorizontalPadding={isInRecordPageLayout}+ isDropdownOpen={isDropdownOpen}>{children}</StyledListItem>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 be582e014a4..a4873039546 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@@ -1,12 +1,13 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useState } from 'react';import { Link } from 'react-router-dom';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRecordDetailSectionContainer = styled(Section)`- border-top: 1px solid ${({ theme }) => theme.border.color.light};- padding-top: ${({ theme }) => theme.spacing(3)};- padding-bottom: ${({ theme }) => theme.spacing(3)};+ border-top: 1px solid ${themeCssVariables.border.color.light};+ padding-top: ${themeCssVariables.spacing[3]};+ padding-bottom: ${themeCssVariables.spacing[3]};width: auto;`;@@ -19,29 +20,29 @@ const StyledHeader = styled.header<{display: flex;height: 24px;justify-content: space-between;- margin-bottom: ${({ theme, areRecordsAvailable }) =>- areRecordsAvailable && theme.spacing(2)};- padding-left: ${({ theme }) => theme.spacing(3)};- padding-right: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${({ areRecordsAvailable }) =>+ areRecordsAvailable ? themeCssVariables.spacing[2] : '0'};+ padding-left: ${themeCssVariables.spacing[3]};+ padding-right: ${themeCssVariables.spacing[2]};`;const StyledTitle = styled.div`align-items: flex-end;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledTitleLabel = styled.div`- font-weight: ${({ theme }) => theme.font.weight.medium};+ font-weight: ${themeCssVariables.font.weight.medium};`;const StyledLink = styled(Link)`- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};text-decoration: none;- font-size: ${({ theme }) => theme.font.size.sm};+ font-size: ${themeCssVariables.font.size.sm};:hover {- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};}`;diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationRecordsListItem.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationRecordsListItem.tsxindex 6dd1c86a46b..688f6271e33 100644--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationRecordsListItem.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationRecordsListItem.tsx@@ -1,5 +1,4 @@-import { css } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { motion } from 'framer-motion';import { useCallback, useContext } from 'react';@@ -49,27 +48,6 @@ import { MenuItem } from 'twenty-ui/navigation';import { AnimatedEaseInOut } from 'twenty-ui/utilities';import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';-const StyledListItem = styled(RecordDetailRecordsListItemContainer)<{- isDropdownOpen?: boolean;-}>`- ${({ isDropdownOpen, theme }) =>- !isDropdownOpen &&- css`- .displayOnHover {- opacity: 0;- pointer-events: none;- transition: opacity ${theme.animation.duration.instant}s ease;- }- `}-- &:hover {- .displayOnHover {- opacity: 1;- pointer-events: auto;- }- }-`;-const StyledClickableZone = styled.div`align-items: center;cursor: pointer;@@ -238,7 +216,7 @@ export const RecordDetailRelationRecordsListItem = ({return (<>- <StyledListItem+ <RecordDetailRecordsListItemContainerisDropdownOpen={isDropdownOpen}data-testid="record-detail-records-list-item">@@ -286,7 +264,7 @@ export const RecordDetailRelationRecordsListItem = ({}/>)}- </StyledListItem>+ </RecordDetailRecordsListItemContainer><AnimatedEaseInOut isOpen={isExpanded}><RecordFieldListinstanceId={`${scopeInstanceId}-relation-${relationRecord.id}`}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 aece62be549..1051c18fb1c 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@@ -1,11 +1,12 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconCopy } from 'twenty-ui/display';import { LightIconButton } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledButtonContainer = styled.div`- padding: 0 ${({ theme }) => theme.spacing(1)};+ padding: 0 ${themeCssVariables.spacing[1]};`;export type LightCopyIconButtonProps = {diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/BaseChip.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/BaseChip.tsxindex 90232c0ca3b..1c44f6fb2b1 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/BaseChip.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/BaseChip.tsx@@ -1,14 +1,16 @@-import { css, useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { IconX } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledChip = styled.div<{ deletable: boolean; danger: boolean }>`- background-color: ${({ theme, danger }) =>- danger ? theme.color.red3 : theme.color.blue3};+ background-color: ${({ danger }) =>+ danger ? themeCssVariables.color.red3 : themeCssVariables.color.blue3};border-width: 1px;border-style: solid;- border-color: ${({ theme, danger }) =>- danger ? theme.color.red5 : theme.color.blue5};+ border-color: ${({ danger }) =>+ danger ? themeCssVariables.color.red5 : themeCssVariables.color.blue5};border-radius: 4px;height: 20px;box-sizing: border-box;@@ -16,24 +18,19 @@ const StyledChip = styled.div<{ deletable: boolean; danger: boolean }>`align-items: center;flex-direction: row;flex-shrink: 0;- column-gap: ${({ theme }) => theme.spacing(1)};- padding-left: ${({ theme }) => theme.spacing(1)};+ column-gap: ${themeCssVariables.spacing[1]};+ padding-left: ${themeCssVariables.spacing[1]};user-select: none;white-space: nowrap;- ${({ theme, deletable }) =>- !deletable- ? css`- padding-right: ${theme.spacing(1)};- `- : css`- cursor: pointer;- `}+ cursor: ${({ deletable }) => (deletable ? 'pointer' : 'default')};+ padding-right: ${({ deletable }) =>+ deletable ? '0' : themeCssVariables.spacing[1]};`;const StyledLabel = styled.span<{ danger: boolean }>`- color: ${({ theme, danger }) =>- danger ? theme.color.red : theme.color.blue};+ color: ${({ danger }) =>+ danger ? themeCssVariables.color.red : themeCssVariables.color.blue};line-height: 140%;`;@@ -45,20 +42,20 @@ const StyledDelete = styled.button<{ danger: boolean }>`justify-content: center;align-items: center;cursor: pointer;- font-size: ${({ theme }) => theme.font.size.sm};+ font-size: ${themeCssVariables.font.size.sm};user-select: none;padding: 0;margin: 0;background: none;border: none;- color: ${({ theme, danger }) =>- danger ? theme.color.red : theme.color.blue};- border-top-right-radius: ${({ theme }) => theme.border.radius.sm};- border-bottom-right-radius: ${({ theme }) => theme.border.radius.sm};+ color: ${({ danger }) =>+ danger ? themeCssVariables.color.red : themeCssVariables.color.blue};+ border-top-right-radius: ${themeCssVariables.border.radius.sm};+ border-bottom-right-radius: ${themeCssVariables.border.radius.sm};&:hover {- background-color: ${({ theme, danger }) =>- danger ? theme.color.red5 : theme.color.blue5};+ background-color: ${({ danger }) =>+ danger ? themeCssVariables.color.red5 : themeCssVariables.color.blue5};}`;@@ -79,7 +76,7 @@ export const BaseChip = ({danger = false,leftIcon,}: BaseChipProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isDeletable = onRemove !== undefined;return (diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormAdvancedTextFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormAdvancedTextFieldInput.tsxindex cdf40c240ec..127a8c2beff 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormAdvancedTextFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormAdvancedTextFieldInput.tsx@@ -14,12 +14,13 @@ import { type BreadcrumbProps } from '@/ui/navigation/bread-crumb/components/Breimport { usePushFocusItemToFocusStack } from '@/ui/utilities/focus/hooks/usePushFocusItemToFocusStack';import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooks/useRemoveFocusItemFromFocusStackById';import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useId, useState } from 'react';+import { useContext, useId, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconMaximize } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useIsMobile } from 'twenty-ui/utilities';const StyledAdvancedTextFieldContainer = styled(FormFieldInputContainer)`@@ -30,15 +31,15 @@ const StyledAdvancedTextFieldFieldContainer = styled.div`position: relative;display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};flex-grow: 1;`;const StyledAdvancedTextFieldInnerContainer = styled.div`flex-grow: 1;- background-color: ${({ theme }) => theme.background.transparent.lighter};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};box-sizing: border-box;display: flex;@@ -48,29 +49,29 @@ const StyledAdvancedTextFieldInnerContainer = styled.div`const StyledEditorActionButtonContainer = styled.div`position: absolute;- top: ${({ theme }) => theme.spacing(0)};- right: ${({ theme }) => theme.spacing(7.5)};+ top: ${themeCssVariables.spacing[0]};+ right: 30px;z-index: 1;`;const StyledFullScreenEditorContainer = styled.div`- background-color: ${({ theme }) => theme.background.secondary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.secondary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};flex: 1;min-height: 0;- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};overflow-y: auto;`;const StyledFullScreenButtonContainer = styled(StyledDropdownButtonContainer)`background-color: transparent;- color: ${({ theme }) => theme.font.color.tertiary};- padding: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.tertiary};+ padding: ${themeCssVariables.spacing[2]};:hover {cursor: pointer;- background-color: ${({ theme }) => theme.background.transparent.light};+ background-color: ${themeCssVariables.background.transparent.light};}`;@@ -112,7 +113,7 @@ export const FormAdvancedTextFieldInput = ({const instanceId = useId();const isMobile = useIsMobile();const [isFullScreen, setIsFullScreen] = useState(false);- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { t } = useLingui();const { pushFocusItemToFocusStack } = usePushFocusItemToFocusStack();@@ -127,7 +128,6 @@ export const FormAdvancedTextFieldInput = ({contentType,onUpdate: (editor) => {if (contentType === 'markdown') {- // For markdown mode, output the HTML which preserves formattingonChange(editor.getHTML());} else {const jsonContent = editor.getJSON();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 bec33e6bb9f..b2853017caf 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@@ -22,13 +22,14 @@ import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooksimport { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { isStandaloneVariableString } from '@/workflow/utils/isStandaloneVariableString';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isNonEmptyArray } from '@sniptt/guards';-import { useId, useRef, useState } from 'react';+import { useContext, useId, useRef, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconPlus } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { MenuItem } from 'twenty-ui/navigation';import { toSpliced } from '~/utils/array/toSpliced';@@ -48,7 +49,7 @@ const StyledDisplayModeReadonlyContainer = styled.div`border: none;display: flex;font-family: inherit;- padding-inline: ${({ theme }) => theme.spacing(2)};+ padding-inline: ${themeCssVariables.spacing[2]};width: 100%;`;@@ -59,12 +60,12 @@ const StyledDisplayModeContainer = styled(StyledDisplayModeReadonlyContainer)`&:hover,&[data-open='true'] {- background-color: ${({ theme }) => theme.background.transparent.lighter};+ background-color: ${themeCssVariables.background.transparent.lighter};}`;const StyledInput = styled(TextInput)`- padding: ${({ theme }) => `${theme.spacing(1)} ${theme.spacing(2)}`};+ padding: ${themeCssVariables.spacing[1]} ${themeCssVariables.spacing[2]};`;const StyledPlaceholder = styled(FormFieldPlaceholder)`@@ -85,7 +86,7 @@ export const FormArrayFieldInput = ({testId,}: FormArrayFieldInputProps) => {const { t } = useLingui();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const instanceId = useId();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 fe60b4b96cd..f4c41da20e4 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@@ -8,11 +8,11 @@ import { Select } from '@/ui/input/components/Select';import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooks/useRemoveFocusItemFromFocusStackById';import { isStandaloneVariableString } from '@/workflow/utils/isStandaloneVariableString';-import { useTheme } from '@emotion/react';import { useLingui } from '@lingui/react/macro';-import { useId, useState } from 'react';+import { useContext, useId, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconCheck, IconCircleOff, IconX } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';type FormBooleanFieldInputProps = {label?: string;@@ -45,7 +45,7 @@ export const FormBooleanFieldInput = ({readonly,VariablePicker,}: FormBooleanFieldInputProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { t } = useLingui();const instanceId = useId();diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldToggleInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldToggleInput.tsxindex 2619b6dbcd0..4e829ba0501 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldToggleInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldToggleInput.tsx@@ -3,9 +3,10 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/foimport { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { InputHint } from '@/ui/input/components/InputHint';import { InputLabel } from '@/ui/input/components/InputLabel';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useId } from 'react';import { Toggle } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';type FormBooleanFieldToggleInputProps = {label?: string;@@ -18,10 +19,10 @@ type FormBooleanFieldToggleInputProps = {const StyledDescription = styled.span`align-items: center;- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};display: flex;- font-size: ${({ theme }) => theme.font.size.md};- padding-left: ${({ theme }) => theme.spacing(2)};+ font-size: ${themeCssVariables.font.size.md};+ padding-left: ${themeCssVariables.spacing[2]};white-space: nowrap;overflow: hidden;text-overflow: ellipsis;@@ -29,14 +30,14 @@ const StyledDescription = styled.span`const StyledToggleContainer = styled.div`align-items: center;- background-color: ${({ theme }) => theme.background.transparent.lighter};- border-top: 1px solid ${({ theme }) => theme.border.color.medium};- border-bottom: 1px solid ${({ theme }) => theme.border.color.medium};- border-right: 1px solid ${({ theme }) => theme.border.color.medium};- border-bottom-right-radius: ${({ theme }) => theme.border.radius.sm};- border-top-right-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border-top: 1px solid ${themeCssVariables.border.color.medium};+ border-bottom: 1px solid ${themeCssVariables.border.color.medium};+ border-right: 1px solid ${themeCssVariables.border.color.medium};+ border-bottom-right-radius: ${themeCssVariables.border.radius.sm};+ border-top-right-radius: ${themeCssVariables.border.radius.sm};display: flex;- padding-right: ${({ theme }) => theme.spacing(2)};+ padding-right: ${themeCssVariables.spacing[2]};`;export const FormBooleanFieldToggleInput = ({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 175f03a7d7b..b118c45e38c 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@@ -18,8 +18,7 @@ import { OverlayContainer } from '@/ui/layout/overlay/components/OverlayContaineimport { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';import { isStandaloneVariableString } from '@/workflow/utils/isStandaloneVariableString';-import { css } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import {useId,@@ -30,7 +29,7 @@ import {} from 'react';import { Key } from 'ts-key-enum';import { isDefined } from 'twenty-shared/utils';-import { TEXT_INPUT_STYLE } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type Nullable } from 'twenty-ui/utilities';import { getDateFormatStringForDatePickerInputMask } from '~/utils/date-utils';@@ -44,21 +43,34 @@ const StyledInputContainer = styled(FormFieldInputInnerContainer)`const StyledDateInputAbsoluteContainer = styled.div`position: absolute;- top: ${({ theme }) => theme.spacing(1)};+ top: ${themeCssVariables.spacing[1]};`;const StyledDateInput = styled.input<{ hasError?: boolean }>`- ${TEXT_INPUT_STYLE}+ background-color: transparent;+ border: none;+ color: ${themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-size: inherit;+ font-weight: inherit;+ outline: none;+ padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[2]};++ &::placeholder,+ &::-webkit-input-placeholder {+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};+ }&:disabled {- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};}- ${({ hasError, theme }) =>- hasError &&- css`- color: ${theme.color.red};- `};+ color: ${({ hasError }) =>+ hasError+ ? themeCssVariables.color.red+ : themeCssVariables.font.color.primary};`;const StyledDateInputContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsxindex c118e604b3f..0d54a4b07c1 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx@@ -18,11 +18,12 @@ import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeimport { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';import { isStandaloneVariableString } from '@/workflow/utils/isStandaloneVariableString';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';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 { type Nullable } from 'twenty-ui/utilities';const StyledInputContainer = styled(FormFieldInputInnerContainer)`@@ -35,7 +36,7 @@ const StyledInputContainer = styled(FormFieldInputInnerContainer)`const StyledDateInputAbsoluteContainer = styled.div`position: absolute;- top: ${({ theme }) => theme.spacing(1)};+ top: ${themeCssVariables.spacing[1]};`;const StyledDateInputTextContainer = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputContainer.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputContainer.tsxindex 7ea0e36f56b..bb76e956daa 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledFormFieldInputContainer = styled.div`display: flex;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 edab7c4d4ec..0a2efe53014 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@@ -1,9 +1,9 @@import { usePushFocusItemToFocusStack } from '@/ui/utilities/focus/hooks/usePushFocusItemToFocusStack';import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooks/useRemoveFocusItemFromFocusStackById';import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';-import { css } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { forwardRef, type HTMLAttributes, type Ref } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';type FormFieldInputInnerContainerProps = {hasRightElement: boolean;@@ -16,24 +16,17 @@ type FormFieldInputInnerContainerProps = {const StyledFormFieldInputInnerContainer = styled.div<Omit<FormFieldInputInnerContainerProps, 'formFieldInputInstanceId'>>`- background-color: ${({ theme }) => theme.background.transparent.lighter};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-top-left-radius: ${({ theme }) => theme.border.radius.sm};- border-bottom-left-radius: ${({ theme }) => theme.border.radius.sm};-- ${({ multiline, hasRightElement, theme }) =>- multiline || !hasRightElement- ? css`- border-right: auto;- border-bottom-right-radius: ${theme.border.radius.sm};- border-top-right-radius: ${theme.border.radius.sm};- `- : css`- border-right: none;- border-bottom-right-radius: 0;- border-top-right-radius: 0;- `}+ background-color: ${themeCssVariables.background.transparent.lighter};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-top-left-radius: ${themeCssVariables.border.radius.sm};+ border-bottom-left-radius: ${themeCssVariables.border.radius.sm};+ border-bottom-right-radius: ${({ multiline, hasRightElement }) =>+ multiline || !hasRightElement ? themeCssVariables.border.radius.sm : '0'};+ border-right: ${({ multiline, hasRightElement }) =>+ multiline || !hasRightElement ? 'auto' : 'none'};+ border-top-right-radius: ${({ multiline, hasRightElement }) =>+ multiline || !hasRightElement ? themeCssVariables.border.radius.sm : '0'};box-sizing: border-box;display: flex;overflow-x: auto;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer.tsxindex 35ec5bd612c..36ceb9c1634 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer.tsx@@ -1,5 +1,4 @@-import { css } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';export const LINE_HEIGHT = 24;@@ -11,16 +10,13 @@ const StyledFormFieldInputRowContainer = styled.div<{flex-direction: row;position: relative;- ${({ multiline, maxHeight }) =>- multiline- ? css`- line-height: ${LINE_HEIGHT}px;- min-height: ${3 * LINE_HEIGHT}px;- max-height: ${maxHeight ?? 5 * LINE_HEIGHT}px;- `- : css`- height: 32px;- `}+ height: ${({ multiline }) => (multiline ? 'auto' : '32px')};+ line-height: ${({ multiline }) =>+ multiline ? `${LINE_HEIGHT}px` : 'normal'};+ max-height: ${({ multiline, maxHeight }) =>+ multiline ? `${maxHeight ?? 5 * LINE_HEIGHT}px` : 'none'};+ min-height: ${({ multiline }) =>+ multiline ? `${3 * LINE_HEIGHT}px` : 'auto'};`;export const FormFieldInputRowContainer = StyledFormFieldInputRowContainer;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldPlaceholder.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldPlaceholder.tsxindex 6e349b868bb..1a8e1ec5c2c 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldPlaceholder.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFieldPlaceholder.tsx@@ -1,5 +1,5 @@import { FORM_FIELD_PLACEHOLDER_STYLES } from '@/object-record/record-field/ui/form-types/constants/FormFieldPlaceholderStyles';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledPlaceholder = styled.div`${FORM_FIELD_PLACEHOLDER_STYLES}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 151e350c692..edfbd30b3f5 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { FormFieldInputContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputContainer';@@ -19,13 +19,14 @@ import { usePushFocusItemToFocusStack } from '@/ui/utilities/focus/hooks/usePushimport { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooks/useRemoveFocusItemFromFocusStackById';import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';import { isStandaloneVariableString } from '@/workflow/utils/isStandaloneVariableString';-import { useTheme } from '@emotion/react';import { isArray } from '@sniptt/guards';-import { useId, useState } from 'react';+import { useContext, useId, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { VisibilityHidden } from 'twenty-ui/accessibility';import { IconChevronDown } from 'twenty-ui/display';import { type SelectOption } from 'twenty-ui/input';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type FormMultiSelectFieldInputProps = {label?: string;@@ -46,7 +47,7 @@ const StyledDisplayModeReadonlyContainer = styled.div`border: none;display: flex;font-family: inherit;- padding-inline: ${({ theme }) => theme.spacing(2)};+ padding-inline: ${themeCssVariables.spacing[2]};width: 100%;`;@@ -55,14 +56,14 @@ const StyledDisplayModeContainer = styled(StyledDisplayModeReadonlyContainer)`&:hover,&[data-open='true'] {- background-color: ${({ theme }) => theme.background.transparent.lighter};+ background-color: ${themeCssVariables.background.transparent.lighter};}`;const StyledSelectInputContainer = styled.div`position: absolute;z-index: 1;- top: ${({ theme }) => theme.spacing(9)};+ top: ${themeCssVariables.spacing[9]};`;const StyledPlaceholder = styled(FormFieldPlaceholder)`@@ -90,7 +91,7 @@ export const FormMultiSelectFieldInput = ({dropdownWidth,}: FormMultiSelectFieldInputProps) => {const instanceId = useId();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { pushFocusItemToFocusStack } = usePushFocusItemToFocusStack();const { removeFocusItemFromFocusStackById } =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 c2beb37f181..e216bbe50a0 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,13 +1,14 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledFormNestedFieldInputContainer = styled.div`display: flex;flex-direction: column;- background: ${({ theme }) => theme.background.secondary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2)};+ background: ${themeCssVariables.background.secondary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]};`;export const FormNestedFieldInputContainer =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 ef6b03f1fd9..938a5b8ff4e 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@@ -11,12 +11,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 '@/workflow/utils/isStandaloneVariableString';-import { useTheme } from '@emotion/react';-import { useId, useState } from 'react';+import { useContext, useId, useState } from 'react';import { Key } from 'ts-key-enum';import { isDefined } from 'twenty-shared/utils';import { IconCircleOff } from 'twenty-ui/display';import { type SelectOption } from 'twenty-ui/input';+import { ThemeContext } from 'twenty-ui/theme';type FormSelectFieldInputProps = {label?: string;@@ -37,7 +37,7 @@ export const FormSelectFieldInput = ({options,readonly,}: FormSelectFieldInputProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const instanceId = useId();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 6eb92ae4726..6e881544536 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@@ -7,15 +7,16 @@ import {import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';import { type ObjectRecord } from '@/object-record/types/ObjectRecord';import { isStandaloneVariableString } from '@/workflow/utils/isStandaloneVariableString';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRecordChip = styled(RecordChip)`- margin: ${({ theme }) => theme.spacing(2)};+ margin: ${themeCssVariables.spacing[2]};`;const StyledPlaceholder = styled(FormFieldPlaceholder)`- margin: ${({ theme }) => theme.spacing(2)};+ margin: ${themeCssVariables.spacing[2]};`;type FormSingleRecordFieldChipProps = {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 02d2c3bd26b..4ae719b2346 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@@ -14,13 +14,14 @@ import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/Geneimport { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';import { isStandaloneVariableString } from '@/workflow/utils/isStandaloneVariableString';-import { css, useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';-import { useCallback, useId } from 'react';+import { useCallback, useContext, useId } from 'react';import { CustomError, isDefined, isValidUuid } from 'twenty-shared/utils';import { IconChevronDown, IconForbid } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledFormSelectContainer = styled(FormFieldInputInnerContainer)<{readonly?: boolean;@@ -28,18 +29,17 @@ const StyledFormSelectContainer = styled(FormFieldInputInnerContainer)<{align-items: center;height: 32px;justify-content: space-between;- padding-right: ${({ theme }) => theme.spacing(2)};-- ${({ readonly, theme }) =>- !readonly &&- css`- &:hover,- &[data-open='true'] {- background-color: ${theme.background.transparent.light};- }+ padding-right: ${themeCssVariables.spacing[2]};++ cursor: ${({ readonly }) => (readonly ? 'default' : 'pointer')};- cursor: pointer;- `}+ &:hover,+ &[data-open='true'] {+ background-color: ${({ readonly }) =>+ readonly+ ? 'transparent'+ : themeCssVariables.background.transparent.light};+ }`;const StyledIconButton = styled.div`@@ -80,7 +80,7 @@ export const FormSingleRecordPicker = ({testId,VariablePicker,}: FormSingleRecordPickerProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const draftValue: FormSingleRecordPickerValue = isStandaloneVariableString(defaultValue,)@@ -143,7 +143,6 @@ export const FormSingleRecordPicker = ({};const handleUnlinkVariable = (event?: React.MouseEvent<HTMLDivElement>) => {- // Prevents the dropdown to open when clicking on the chipevent?.stopPropagation();onClear?.();};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 29e332e0ee6..c32121ca8a1 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,6 +1,7 @@import { FORM_FIELD_PLACEHOLDER_STYLES } from '@/object-record/record-field/ui/form-types/constants/FormFieldPlaceholderStyles';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { EditorContent, type Editor } from '@tiptap/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledEditor = styled.div<{multiline?: boolean;@@ -9,15 +10,15 @@ const StyledEditor = styled.div<{width: 100%;display: flex;box-sizing: border-box;- padding-right: ${({ multiline, theme }) =>- multiline ? theme.spacing(4) : undefined};+ padding-right: ${({ multiline }) =>+ multiline ? themeCssVariables.spacing[4] : '0'};.editor-content {width: 100%;}.tiptap {- padding: ${({ theme }) => `${theme.spacing(1)} ${theme.spacing(2)}`};+ padding: ${themeCssVariables.spacing[1]} ${themeCssVariables.spacing[2]};box-sizing: border-box;display: flex;height: 100%;@@ -27,10 +28,12 @@ const StyledEditor = styled.div<{&::-webkit-scrollbar {display: none;}- color: ${({ theme, readonly }) =>- readonly ? theme.font.color.light : theme.font.color.primary};- font-family: ${({ theme }) => theme.font.family};- font-weight: ${({ theme }) => theme.font.weight.regular};+ color: ${({ readonly }) =>+ readonly+ ? themeCssVariables.font.color.light+ : themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.regular};border: none !important;align-items: ${({ multiline }) => (multiline ? 'top' : 'center')};white-space: ${({ multiline }) => (multiline ? 'pre' : 'nowrap')};@@ -48,17 +51,17 @@ const StyledEditor = styled.div<{}.variable-tag {- background-color: ${({ theme }) => theme.color.blue3};- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.color.blue};- padding: ${({ theme }) => theme.spacing(1)};+ background-color: ${themeCssVariables.color.blue3};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.color.blue};+ padding: ${themeCssVariables.spacing[1]};}.text-tag {- background-color: ${({ theme }) => theme.color.blue3};- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.color.blue};- padding: ${({ theme }) => theme.spacing(1)};+ background-color: ${themeCssVariables.color.blue3};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.color.blue};+ padding: ${themeCssVariables.spacing[1]};}}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 d7f22a1cddb..85d8f709414 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,10 +1,11 @@import { BaseChip } from '@/object-record/record-field/ui/form-types/components/BaseChip';import { useSearchVariable } from '@/workflow/workflow-variables/hooks/useSearchVariable';-import { useTheme } from '@emotion/react';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/display';+import { ThemeContext } from 'twenty-ui/theme';type VariableChipProps = {rawVariableName: string;@@ -17,7 +18,7 @@ export const VariableChip = ({onRemove,isFullRecord = false,}: VariableChipProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { t } = useLingui();const { variableLabel, variablePathLabel } = useSearchVariable({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 c07b28225c7..ade6102fc74 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,10 +1,11 @@import { VariableChip } from '@/object-record/record-field/ui/form-types/components/VariableChip';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`align-items: center;display: flex;- margin-left: ${({ theme }) => theme.spacing(2)};+ margin-left: ${themeCssVariables.spacing[2]};`;type VariableChipStandaloneProps = {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 ef383e8f55c..1edbad8c6d5 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,27 +1,29 @@-import { type Theme, useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';+import { useContext } from 'react';import { IconLock } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';-const StyledContainer = styled.div<{ theme: Theme }>`+const StyledContainer = styled.div`align-items: center;display: inline-flex;- background: ${({ theme }) => theme.background.transparent.light};- color: ${({ theme }) => theme.font.color.tertiary};- font-weight: ${({ theme }) => theme.font.weight.regular};- font-size: ${({ theme }) => theme.font.size.md};- padding: ${({ theme }) => theme.spacing(1)};- gap: ${({ theme }) => theme.spacing(1)};+ background: ${themeCssVariables.background.transparent.light};+ color: ${themeCssVariables.font.color.tertiary};+ font-weight: ${themeCssVariables.font.weight.regular};+ font-size: ${themeCssVariables.font.size.md};+ padding: ${themeCssVariables.spacing[1]};+ gap: ${themeCssVariables.spacing[1]};border-radius: 4px;`;export const ForbiddenFieldDisplay = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (- <StyledContainer theme={theme}>+ <StyledContainer><IconLock size={theme.icon.size.sm} /><Trans>Not shared</Trans></StyledContainer>diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/display/components/RelationFromManyFieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/display/components/RelationFromManyFieldDisplay.tsxindex 0fc61b7d679..86535b8f02e 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/display/components/RelationFromManyFieldDisplay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/display/components/RelationFromManyFieldDisplay.tsx@@ -16,14 +16,15 @@ import { getJunctionConfig } from '@/object-record/record-field/ui/utils/junctioimport { hasJunctionConfig } from '@/object-record/record-field/ui/utils/junction/hasJunctionConfig';import { ExpandableList } from '@/ui/layout/expandable-list/components/ExpandableList';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isArray } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};justify-content: flex-start;max-width: 100%;overflow: hidden;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 0c1e31052ec..a9b790d7354 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@@ -1,5 +1,4 @@-import { css } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {forwardRef,useRef,@@ -8,7 +7,7 @@ import {} from 'react';import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';-import { TEXT_INPUT_STYLE } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useCombinedRefs } from '~/hooks/useCombinedRefs';const StyledInput = styled.input<{@@ -16,34 +15,39 @@ const StyledInput = styled.input<{hasError?: boolean;hasItem: boolean;}>`- ${TEXT_INPUT_STYLE}+ background-color: transparent;+ border: none;+ color: ${themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-size: inherit;+ font-weight: inherit;+ outline: none;+ padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[2]};- ${({ hasItem, theme }) =>- hasItem &&- css`- background-color: ${theme.background.transparent.lighter};- border-radius: 4px;- border: 1px solid ${theme.border.color.medium};- `}-- ${({ hasError, hasItem, theme }) =>- hasError &&- hasItem &&- css`- border: 1px solid ${theme.border.color.danger};- `}+ &::placeholder,+ &::-webkit-input-placeholder {+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};+ }+ background-color: ${({ hasItem }) =>+ hasItem ? themeCssVariables.background.transparent.lighter : 'transparent'};+ border: ${({ hasItem, hasError }) =>+ hasItem+ ? hasError+ ? `1px solid ${themeCssVariables.border.color.danger}`+ : `1px solid ${themeCssVariables.border.color.medium}`+ : 'none'};+ border-radius: ${({ hasItem }) => (hasItem ? '4px' : '0')};box-sizing: border-box;- font-weight: ${({ theme }) => theme.font.weight.medium};+ font-weight: ${themeCssVariables.font.weight.medium};height: 32px;position: relative;width: 100%;- ${({ withRightComponent }) =>- withRightComponent &&- css`- padding-right: 32px;- `}+ padding-right: ${({ withRightComponent }) =>+ withRightComponent ? '32px' : '0'};`;const StyledInputContainer = styled.div`@@ -53,20 +57,20 @@ const StyledInputContainer = styled.div`width: 100%;&:not(:first-of-type) {- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};}`;const StyledRightContainer = styled.div`position: absolute;- right: ${({ theme }) => theme.spacing(2)};+ right: ${themeCssVariables.spacing[2]};top: 50%;transform: translateY(-50%);`;const StyledErrorDiv = styled.div`- color: ${({ theme }) => theme.color.red};- padding: 0 ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.color.red};+ padding: 0 ${themeCssVariables.spacing[2]};`;type HTMLInputProps = InputHTMLAttributes<HTMLInputElement>;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 84008ede030..e13daf536e1 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@@ -4,7 +4,7 @@ import { PhonesFieldMenuItem } from '@/object-record/record-field/ui/meta-types/import { recordFieldInputIsFieldInErrorComponentState } from '@/object-record/record-field/ui/states/recordFieldInputIsFieldInErrorComponentState';import { phoneSchema } from '@/object-record/record-field/ui/validation-schemas/phoneSchema';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { parsePhoneNumber, type E164Number } from 'libphonenumber-js';import ReactPhoneNumberInput from 'react-phone-number-input';import 'react-phone-number-input/style.css';@@ -20,11 +20,10 @@ import {} from '@/object-record/record-field/ui/types/FieldMetadata';import { phonesSchema } from '@/object-record/record-field/ui/types/guards/isFieldPhonesValue';import { PhoneCountryPickerDropdownButton } from '@/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownButton';-import { css } from '@emotion/react';import { useContext } from 'react';import { MULTI_ITEM_FIELD_DEFAULT_MAX_VALUES } from 'twenty-shared/constants';import { isDefined } from 'twenty-shared/utils';-import { TEXT_INPUT_STYLE } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { FieldMetadataType } from '~/generated-metadata/graphql';import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';@@ -32,39 +31,47 @@ const StyledCustomPhoneInputContainer = styled.div<{hasItem: boolean;hasError?: boolean;}>`- ${({ hasItem, theme }) =>- hasItem &&- css`- background-color: ${theme.background.transparent.lighter};- border-radius: 4px;- border: 1px solid ${theme.border.color.medium};- height: 30px;- `}-- ${({ hasError, hasItem, theme }) =>- hasError &&- hasItem &&- css`- border: 1px solid ${theme.border.color.danger};- `}+ background-color: ${({ hasItem }) =>+ hasItem ? themeCssVariables.background.transparent.lighter : 'transparent'};+ border: ${({ hasItem, hasError }) =>+ hasItem+ ? hasError+ ? `1px solid ${themeCssVariables.border.color.danger}`+ : `1px solid ${themeCssVariables.border.color.medium}`+ : 'none'};+ border-radius: ${({ hasItem }) => (hasItem ? '4px' : '0')};+ height: ${({ hasItem }) => (hasItem ? '30px' : 'auto')};`;const StyledCustomPhoneInput = styled(ReactPhoneNumberInput)`- ${TEXT_INPUT_STYLE}+ background-color: transparent;+ border: none;+ color: ${themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-size: inherit;+ font-weight: inherit;+ outline: none;padding: 0;++ &::placeholder,+ &::-webkit-input-placeholder {+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};+ }height: 100%;.PhoneInputInput {background: none;border: none;- color: ${({ theme }) => theme.font.color.primary};- margin-left: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ margin-left: ${themeCssVariables.spacing[2]};&::placeholder,&::-webkit-input-placeholder {- color: ${({ theme }) => theme.font.color.light};- font-family: ${({ theme }) => theme.font.family};- font-weight: ${({ theme }) => theme.font.weight.medium};+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};}:focus {@@ -73,10 +80,10 @@ const StyledCustomPhoneInput = styled(ReactPhoneNumberInput)`}& svg {- border-radius: ${({ theme }) => theme.border.radius.xs};+ border-radius: ${themeCssVariables.border.radius.xs};height: 12px;}- width: calc(100% - ${({ theme }) => theme.spacing(8)});+ width: calc(100% - ${themeCssVariables.spacing[8]});`;export const PhonesFieldInput = () => {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 42ef7887cd6..4768e75881a 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { FieldInputEventContext } from '@/object-record/record-field/ui/contexts/FieldInputEventContext';import { RecordFieldComponentInstanceContext } from '@/object-record/record-field/ui/states/contexts/RecordFieldComponentInstanceContext';@@ -12,6 +12,7 @@ import { Key } from 'ts-key-enum';import { IconPencil } from 'twenty-ui/display';import { CodeEditor, FloatingIconButton } from 'twenty-ui/input';import { JsonTree, isTwoFirstDepths } from 'twenty-ui/json-visualizer';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';import { useJsonField } from '@/object-record/record-field/ui/meta-types/hooks/useJsonField';@@ -27,16 +28,16 @@ const StyledContainer = styled.div`const StyledSwitchModeButtonContainer = styled.div`position: fixed;- top: ${({ theme }) => theme.spacing(1)};- right: ${({ theme }) => theme.spacing(1)};+ top: ${themeCssVariables.spacing[1]};+ right: ${themeCssVariables.spacing[1]};`;const StyledCodeEditorContainer = styled.div`- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};`;const StyledJsonTreeContainer = styled.div`- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};width: min-content;`;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 a5bc356fcdc..5aabe2a137e 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@@ -9,12 +9,13 @@ import { FieldInputEventContext } from '@/object-record/record-field/ui/contextsimport { type FieldRichTextV2Metadata } from '@/object-record/record-field/ui/types/FieldMetadata';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Suspense, lazy, useContext, useRef } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { IconLayoutSidebarLeftCollapse } from 'twenty-ui/display';import { FloatingIconButton } from 'twenty-ui/input';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const ActivityRichTextEditor = lazy(() =>import('@/activities/components/ActivityRichTextEditor').then((module) => ({@@ -23,25 +24,25 @@ const ActivityRichTextEditor = lazy(() =>);const StyledContainer = styled.div`- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};width: 480px;- padding: ${({ theme }) => theme.spacing(2)} ${({ theme }) => theme.spacing(2)}- ${({ theme }) => theme.spacing(2)} ${({ theme }) => theme.spacing(12)};- margin: 0 0 0 ${({ theme }) => theme.spacing(-5)};+ padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[2]}+ ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[12]};+ margin: 0 0 0 calc(-1 * ${themeCssVariables.spacing[5]});display: flex;box-sizing: border-box;position: relative;`;const StyledCollapseButton = styled.div`- border-radius: ${({ theme }) => theme.border.radius.md};- color: ${({ theme }) => theme.font.color.light};+ border-radius: ${themeCssVariables.border.radius.md};+ color: ${themeCssVariables.font.color.light};cursor: pointer;display: flex;`;const LoadingSkeleton = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<SkeletonThemediff --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 c410e8863da..d9f85299313 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@@ -1,4 +1,5 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { ObjectOptionsDropdown } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdown';import { RecordBoardContainer } from '@/object-record/record-board/components/RecordBoardContainer';@@ -27,8 +28,8 @@ const StyledContainer = styled.div`const StyledContainerWithPadding = styled.div`box-sizing: border-box;- height: calc(100% - ${({ theme }) => theme.spacing(10)});- margin-left: ${({ theme }) => theme.spacing(2)};+ height: calc(100% - ${themeCssVariables.spacing[10]});+ margin-left: ${themeCssVariables.spacing[2]};`;export const RecordIndexContainer = () => {diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainerGater.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainerGater.tsxindex c9f20a99c63..edbdf878991 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainerGater.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainerGater.tsx@@ -17,7 +17,7 @@ import { useRecordIndexIdFromCurrentContextStore } from '@/object-record/record-import { RECORD_INDEX_DRAG_SELECT_BOUNDARY_CLASS } from '@/ui/utilities/drag-select/constants/RecordIndecDragSelectBoundaryClass';import { PageTitle } from '@/ui/utilities/page-title/components/PageTitle';import { ViewComponentInstanceContext } from '@/views/states/contexts/ViewComponentInstanceContext';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useCallback } from 'react';import { NotFound } from '~/pages/not-found/NotFound';import { useStore } from 'jotai';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 564832702bc..c2cfff8ef80 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@@ -8,24 +8,25 @@ import { useRecordIndexContextOrThrow } from '@/object-record/record-index/conteimport { PageHeaderToggleCommandMenuButton } from '@/ui/layout/page-header/components/PageHeaderToggleCommandMenuButton';import { PageHeader } from '@/ui/layout/page/components/PageHeader';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTitleWithSelectedRecords = styled.div`display: flex;flex-direction: row;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledTitle = styled.div`- color: ${({ theme }) => theme.font.color.primary};- padding-right: ${({ theme }) => theme.spacing(0.5)};+ color: ${themeCssVariables.font.color.primary};+ padding-right: ${themeCssVariables.spacing['0.5']};`;const StyledSelectedRecordsCount = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};- padding-left: ${({ theme }) => theme.spacing(0.5)};+ color: ${themeCssVariables.font.color.tertiary};+ padding-left: ${themeCssVariables.spacing['0.5']};`;export const RecordIndexPageHeader = () => {diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageHeaderIcon.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageHeaderIcon.tsxindex 154cbc5325f..439f2be38b9 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageHeaderIcon.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageHeaderIcon.tsx@@ -1,4 +1,5 @@import { isNonEmptyString } from '@sniptt/guards';+import { useContext } from 'react';import { NavigationMenuItemStyleIcon } from '@/navigation-menu-item/components/NavigationMenuItemStyleIcon';import { usePrefetchedNavigationMenuItemsData } from '@/navigation-menu-item/hooks/usePrefetchedNavigationMenuItemsData';@@ -7,9 +8,9 @@ import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataIimport { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { coreIndexViewIdFromObjectMetadataItemFamilySelector } from '@/views/states/selectors/coreIndexViewIdFromObjectMetadataItemFamilySelector';import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';-import { useTheme } from '@emotion/react';import { isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';import { FeatureFlagKey } from '~/generated-metadata/graphql';export const RecordIndexPageHeaderIcon = ({@@ -17,7 +18,7 @@ export const RecordIndexPageHeaderIcon = ({}: {objectMetadataItem?: ObjectMetadataItem;}) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isNavigationMenuItemEditingEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED,);diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageKanbanAddMenuItem.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageKanbanAddMenuItem.tsxindex 847449db42e..ed5470b40ac 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageKanbanAddMenuItem.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexPageKanbanAddMenuItem.tsx@@ -1,7 +1,7 @@import { recordGroupDefinitionFamilyState } from '@/object-record/record-group/states/recordGroupDefinitionFamilyState';import { RecordGroupDefinitionType } from '@/object-record/record-group/types/RecordGroupDefinition';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';import { MenuItem } from 'twenty-ui/navigation';import { Tag } from 'twenty-ui/components';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 d9704585b35..0af9e83e431 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,6 +1,7 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';import { useFieldFocus } from '@/object-record/record-field/ui/hooks/useFieldFocus';@@ -19,7 +20,7 @@ import { useRecordInlineCellContext } from './RecordInlineCellContext';const StyledIconContainer = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;width: 16px;@@ -35,9 +36,9 @@ const StyledIconContainer = styled.div`const StyledLabelAndIconContainer = styled.div`align-items: center;align-self: flex-start;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};height: 24px;`;@@ -49,9 +50,9 @@ const StyledValueContainer = styled.div<{ readonly: boolean }>``;const StyledLabelContainer = styled.div<{ width?: number }>`- color: ${({ theme }) => theme.font.color.tertiary};- font-size: ${({ theme }) => theme.font.size.sm};- width: ${({ width }) => width}px;+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.sm};+ width: ${({ width }) => (width !== undefined ? `${width}px` : 'auto')};`;const StyledInlineCellBaseContainer = styled.div<{ readonly: boolean }>`@@ -59,7 +60,7 @@ const StyledInlineCellBaseContainer = styled.div<{ readonly: boolean }>`width: 100%;display: flex;height: fit-content;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};user-select: none;align-items: center;cursor: ${({ readonly }) => (readonly ? 'default' : 'pointer')};@@ -96,7 +97,7 @@ export const RecordInlineCellContainer = () => {onMouseLeave?.();};- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const labelId = `label-${getRecordFieldInputInstanceId({recordId,fieldName: fieldDefinition?.metadata?.fieldName,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 9b8833db15a..e5a12663bb1 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';import { useIsFieldEmpty } from '@/object-record/record-field/ui/hooks/useIsFieldEmpty';@@ -8,9 +8,9 @@ import {type RecordInlineCellContextProps,} from '@/object-record/record-inline-cell/components/RecordInlineCellContext';import { RecordInlineCellButton } from '@/object-record/record-inline-cell/components/RecordInlineCellEditButton';-import { css } from '@emotion/react';import { useLingui } from '@lingui/react/macro';import { useContext } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRecordInlineCellNormalModeOuterContainer = styled.div<Pick<@@ -19,34 +19,31 @@ const StyledRecordInlineCellNormalModeOuterContainer = styled.div<> & { isHovered?: boolean }>`outline: 1px solid- ${({ theme, isHovered, readonly }) =>- isHovered && readonly ? theme.border.color.medium : 'transparent'};+ ${({ isHovered, readonly }) =>+ isHovered && readonly+ ? themeCssVariables.border.color.medium+ : 'transparent'};align-items: center;- border-radius: ${({ theme }) => theme.border.radius.sm};+ border-radius: ${themeCssVariables.border.radius.sm};display: flex;height: ${({ isDisplayModeFixHeight }) =>isDisplayModeFixHeight ? '16px' : 'auto'};min-height: 16px;overflow: hidden;- padding-right: ${({ theme }) => theme.spacing(1)};- padding-left: ${({ theme }) => theme.spacing(1)};- ${(props) => {- if (props.isHovered === true && !props.readonly) {- return css`- background-color: ${!props.disableHoverEffect- ? props.theme.background.transparent.light- : 'transparent'};-- cursor: pointer;- `;- }- }}+ padding-right: ${themeCssVariables.spacing[1]};+ padding-left: ${themeCssVariables.spacing[1]};+ background-color: ${({ isHovered, readonly, disableHoverEffect }) =>+ isHovered && !readonly && !disableHoverEffect+ ? themeCssVariables.background.transparent.light+ : 'transparent'};+ cursor: ${({ isHovered, readonly }) =>+ isHovered && !readonly ? 'pointer' : 'default'};`;const StyledRecordInlineCellNormalModeInnerContainer = styled.div`align-content: center;align-items: center;- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};height: fit-content;overflow: hidden;@@ -59,7 +56,7 @@ const StyledRecordInlineCellNormalModeInnerContainer = styled.div`const StyledEmptyField = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};display: flex;height: 20px;`;diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditButton.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditButton.tsxindex ca5781202c7..621580c83c3 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditButton.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditButton.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type IconComponent } from 'twenty-ui/display';import { FloatingIconButton } from 'twenty-ui/input';import { AnimatedContainer } from 'twenty-ui/utilities';diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditMode.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditMode.tsxindex eb960474f01..3462661ae1f 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditMode.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditMode.tsx@@ -7,7 +7,7 @@ import { OverlayContainer } from '@/ui/layout/overlay/components/OverlayContaineimport { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {autoUpdate,flip,diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellHoveredPortal.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellHoveredPortal.tsxindex b59f6679960..9948588e026 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellHoveredPortal.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellHoveredPortal.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledRecordTableCellHoveredPortal = styled.div`height: 100%;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 4d33c12dbfa..5b921bfc09e 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,5 +1,6 @@import { RecordInlineCellHoveredPortal } from '@/object-record/record-inline-cell/components/RecordInlineCellHoveredPortal';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRecordTableCellHoveredPortalContent = styled.div<{readonly?: boolean;@@ -7,14 +8,11 @@ const StyledRecordTableCellHoveredPortalContent = styled.div<{}>`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};width: 100%;- ${({ isCentered }) =>- isCentered === true &&- `- justify-content: center;- `};+ justify-content: ${({ isCentered }) =>+ isCentered === true ? 'center' : 'normal'};`;const StyledInlineCellBaseContainer = styled.div<{ readonly: boolean }>`@@ -22,7 +20,7 @@ const StyledInlineCellBaseContainer = styled.div<{ readonly: boolean }>`width: 100%;display: flex;height: fit-content;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};user-select: none;align-items: center;`;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 bd912d7b55b..3a19ee2fb54 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,11 +1,12 @@-import { useTheme } from '@emotion/react';+import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';+import { ThemeContext } from 'twenty-ui/theme';import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { StyledSkeletonDiv } from './RecordInlineCellContainer';export const RecordInlineCellSkeletonLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<SkeletonThemediff --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 bb84725723a..745fb242927 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@@ -1,11 +1,11 @@-import { css } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { FieldDisplay } from '@/object-record/record-field/ui/components/FieldDisplay';import { useFieldFocus } from '@/object-record/record-field/ui/hooks/useFieldFocus';import { 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';const StyledClickableContainer = styled.div<{readonly?: boolean;@@ -13,20 +13,12 @@ const StyledClickableContainer = styled.div<{}>`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};width: 100%;- ${({ isCentered }) =>- isCentered === true &&- `- justify-content: center;- `};-- ${({ readonly }) =>- !readonly &&- css`- cursor: pointer;- `};+ justify-content: ${({ isCentered }) =>+ isCentered === true ? 'center' : 'normal'};+ cursor: ${({ readonly }) => (readonly ? 'default' : 'pointer')};`;export const RecordInlineCellValue = () => {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 126e91831df..d697638feff 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 isPropValid from '@emotion/is-prop-valid';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { PageLayoutType } from '~/generated-metadata/graphql';interface PropertyBoxProps {@@ -9,21 +9,20 @@ interface PropertyBoxProps {dataTestId?: string;}-const StyledPropertyBoxContainer = styled('div', {- shouldForwardProp: (prop) =>- isPropValid(prop) && prop !== 'noHorizontalPadding',-})<{ noHorizontalPadding?: boolean }>`+const StyledPropertyBoxContainer = styled.div<{+ noHorizontalPadding?: boolean;+}>`align-self: stretch;- border-radius: ${({ theme }) => theme.border.radius.sm};+ border-radius: ${themeCssVariables.border.radius.sm};display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(3)};- padding-bottom: ${({ theme }) => theme.spacing(3)};- padding-left: ${({ theme, noHorizontalPadding }) =>- noHorizontalPadding ? 0 : theme.spacing(3)};- padding-right: ${({ theme, noHorizontalPadding }) =>- noHorizontalPadding ? 0 : theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[3]};+ padding-bottom: ${themeCssVariables.spacing[3]};+ padding-left: ${({ noHorizontalPadding }) =>+ noHorizontalPadding ? 0 : themeCssVariables.spacing[3]};+ padding-right: ${({ noHorizontalPadding }) =>+ noHorizontalPadding ? 0 : themeCssVariables.spacing[2]};`;export const PropertyBox = ({diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBoxSkeletonLoader.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBoxSkeletonLoader.tsxindex 88a499952c1..cdcaeb4bd40 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBoxSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBoxSkeletonLoader.tsx@@ -1,17 +1,19 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSkeletonDiv = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};width: 100%;height: 24px;`;export const PropertyBoxSkeletonLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const skeletonItems = Array.from({ length: 4 }).map((_, index) => ({id: `skeleton-item-${index}`,}));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 a8ee6346334..5f852e76b77 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@@ -1,4 +1,5 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { ShowPageContainer } from '@/ui/layout/page/components/ShowPageContainer';import { RightDrawerProvider } from '@/ui/layout/right-drawer/contexts/RightDrawerContext';@@ -27,15 +28,15 @@ const StyledShowPageRightContainer = styled.div``;const StyledTabList = styled(TabList)`- background-color: ${({ theme }) => theme.background.secondary};- padding-left: ${({ theme }) => theme.spacing(2)};+ background-color: ${themeCssVariables.background.secondary};+ padding-left: ${themeCssVariables.spacing[2]};`;const StyledContentContainer = styled.div`flex: 1;overflow-y: auto;- background: ${({ theme }) => theme.background.primary};- padding-bottom: ${({ theme }) => theme.spacing(16)};+ background: ${themeCssVariables.background.primary};+ padding-bottom: ${themeCssVariables.spacing[16]};`;type MergeRecordsContainerProps = {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 228af53c687..4c2896ccc08 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@@ -1,26 +1,27 @@import { SIDE_PANEL_FOCUS_ID } from '@/command-menu/constants/SidePanelFocusId';import { useMergeRecordsActions } from '@/object-record/record-merge/hooks/useMergeRecordsActions';import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Key } from 'ts-key-enum';import { t } from '@lingui/core/macro';import { IconArrowMerge } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledFooterContainer = styled.div`align-items: flex-end;- background: ${({ theme }) => theme.background.primary};- border-top: 1px solid ${({ theme }) => theme.border.color.light};+ background: ${themeCssVariables.background.primary};+ border-top: 1px solid ${themeCssVariables.border.color.light};display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};justify-content: flex-end;- padding: ${({ theme }) => theme.spacing(3)};+ padding: ${themeCssVariables.spacing[3]};`;const StyledFooterActions = styled.div`display: flex;align-items: flex-end;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;type MergeRecordsFooterProps = {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 e318654554d..323022cadbf 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@@ -2,13 +2,14 @@ import { t } from '@lingui/core/macro';import { useMergeRecordsSelectedRecords } from '@/object-record/record-merge/hooks/useMergeRecordsSelectedRecords';import { useMergeRecordsSettings } from '@/object-record/record-merge/hooks/useMergeRecordsSettings';import { Select } from '@/ui/input/components/Select';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Section } from 'twenty-ui/layout';import { getPositionNumberIcon } from '@/object-record/record-merge/utils/getPositionNumberIcon';import { getPositionWordLabel } from '@/object-record/record-merge/utils/getPositionWordLabel';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSection = styled(Section)`- margin: ${({ theme }) => theme.spacing(4)};+ margin: ${themeCssVariables.spacing[4]};width: auto;`;diff --git a/packages/twenty-front/src/modules/object-record/record-picker/components/RecordPickerInitialLoadingEmptyContainer.tsx b/packages/twenty-front/src/modules/object-record/record-picker/components/RecordPickerInitialLoadingEmptyContainer.tsxindex b7e895c1a80..4620e46ace7 100644--- a/packages/twenty-front/src/modules/object-record/record-picker/components/RecordPickerInitialLoadingEmptyContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-picker/components/RecordPickerInitialLoadingEmptyContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledRecordPickerInitialLoadingEmptyContainer = styled.div`height: 320px;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 ef602b99f92..3e47edd39bc 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@@ -14,19 +14,20 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/comimport { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+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';const StyledText = styled.div`align-items: center;box-shadow: none;- color: ${({ theme }) => theme.grayScale.gray9};+ color: ${themeCssVariables.grayScale.gray9};display: flex;height: 32px;- margin-left: ${({ theme }) => theme.spacing(8)};- padding-left: ${({ theme }) => theme.spacing(2)};+ margin-left: ${themeCssVariables.spacing[8]};+ padding-left: ${themeCssVariables.spacing[2]};`;const StyledIntersectionObserver = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItem.tsx b/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItem.tsxindex 99f6b69afda..837ae06ba68 100644--- a/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItem.tsx+++ b/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItem.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useRecordPickerGetSearchRecordAndObjectMetadataItemFromRecordId } from '@/object-record/record-picker/hooks/useRecordPickerGetSearchRecordAndObjectMetadataItemFromRecordId';import { MultipleRecordPickerMenuItemContent } from '@/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItemContent';diff --git a/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItemContent.tsx b/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItemContent.tsxindex 4655fbbdea3..8a97314b2a3 100644--- a/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItemContent.tsx+++ b/packages/twenty-front/src/modules/object-record/record-picker/multiple-record-picker/components/MultipleRecordPickerMenuItemContent.tsx@@ -1,5 +1,5 @@import { t } from '@lingui/core/macro';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';import { getAvatarType } from '@/object-metadata/utils/getAvatarType';diff --git a/packages/twenty-front/src/modules/object-record/record-picker/single-record-picker/components/SingleRecordPickerMenuItem.tsx b/packages/twenty-front/src/modules/object-record/record-picker/single-record-picker/components/SingleRecordPickerMenuItem.tsxindex 73b6f29d8a3..a127079af81 100644--- a/packages/twenty-front/src/modules/object-record/record-picker/single-record-picker/components/SingleRecordPickerMenuItem.tsx+++ b/packages/twenty-front/src/modules/object-record/record-picker/single-record-picker/components/SingleRecordPickerMenuItem.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { getAvatarType } from '@/object-metadata/utils/getAvatarType';import { searchRecordStoreFamilyState } from '@/object-record/record-picker/multiple-record-picker/states/searchRecordStoreComponentFamilyState';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 24c2417b2ff..390cd952a52 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@@ -8,9 +8,11 @@ import { useRecordShowPage } from '@/object-record/record-show/hooks/useRecordShimport { useRecordShowPagePagination } from '@/object-record/record-show/hooks/useRecordShowPagePagination';import { RecordTitleCell } from '@/object-record/record-title-cell/components/RecordTitleCell';import { RecordTitleCellContainerType } from '@/object-record/record-title-cell/types/RecordTitleCellContainerType';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { FieldMetadataType } from 'twenty-shared/types';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledEditableTitleContainer = styled.div`align-items: center;@@ -22,11 +24,11 @@ const StyledEditableTitleContainer = styled.div`const StyledEditableTitlePrefix = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};cursor: pointer;display: flex;flex-direction: row;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledTitle = styled.div`@@ -36,7 +38,7 @@ const StyledTitle = styled.div``;const StyledPaginationInformation = styled.span`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;export const ObjectRecordShowPageBreadcrumb = ({@@ -80,7 +82,7 @@ export const ObjectRecordShowPageBreadcrumb = ({objectRecordId,);- const theme = useTheme();+ const { theme } = useContext(ThemeContext);if (loading) {return null;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 d76a10cf684..5a5e8e59ed1 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@@ -10,9 +10,10 @@ import { usePageLayoutIdForRecord } from '@/page-layout/hooks/usePageLayoutIdForimport { LayoutRenderingProvider } from '@/ui/layout/contexts/LayoutRenderingContext';import { type TargetRecordIdentifier } from '@/ui/layout/contexts/TargetRecordIdentifier';import { RightDrawerFooter } from '@/ui/layout/right-drawer/components/RightDrawerFooter';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { PageLayoutType } from '~/generated-metadata/graphql';const StyledShowPageBannerContainer = styled.div`@@ -31,9 +32,9 @@ const StyledShowPageRightContainer = styled.div`const StyledContentContainer = styled.div<{ isInRightDrawer: boolean }>`flex: 1;overflow-y: auto;- background: ${({ theme }) => theme.background.primary};- padding-bottom: ${({ theme, isInRightDrawer }) =>- isInRightDrawer ? theme.spacing(16) : 0};+ background: ${themeCssVariables.background.primary};+ padding-bottom: ${({ isInRightDrawer }) =>+ isInRightDrawer ? themeCssVariables.spacing[16] : 0};`;export const PageLayoutRecordPageRenderer = ({diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableContent.tsx b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableContent.tsxindex b31a4b78fe4..91dae7b2cf6 100644--- a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableContent.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableContent.tsx@@ -1,6 +1,9 @@import { RecordTableColumnWidthEffect } from '@/object-record/record-table/components/RecordTableColumnWidthEffect';import { RecordTableScrollAndZIndexEffect } from '@/object-record/record-table/components/RecordTableScrollAndZIndexEffect';-import { RecordTableStyleWrapper } from '@/object-record/record-table/components/RecordTableStyleWrapper';+import {+ getRecordTableColumnWidthInlineStyles,+ RecordTableStyleWrapper,+} from '@/object-record/record-table/components/RecordTableStyleWrapper';import { RecordTableWidthEffect } from '@/object-record/record-table/components/RecordTableWidthEffect';import { RECORD_TABLE_HTML_ID } from '@/object-record/record-table/constants/RecordTableHtmlId';import { useRecordTableContextOrThrow } from '@/object-record/record-table/contexts/RecordTableContext';@@ -15,8 +18,8 @@ import { RECORD_INDEX_DRAG_SELECT_BOUNDARY_CLASS } from '@/ui/utilities/drag-selimport { useAtomComponentStateCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState';import { useAtomComponentSelectorCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorCallbackState';import { useAtomComponentFamilyStateCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateCallbackState';-import styled from '@emotion/styled';-import { useCallback, useRef, useState } from 'react';+import { styled } from '@linaria/react';+import { useCallback, useMemo, useRef, useState } from 'react';import { useStore } from 'jotai';const StyledTableContainer = styled.div`@@ -125,12 +128,17 @@ export const RecordTableContent = ({[store, isSomeCellInEditMode, recordTableHoverPositionCallbackState],);+ const columnWidthStyles = useMemo(+ () => getRecordTableColumnWidthInlineStyles(visibleRecordFields),+ [visibleRecordFields],+ );+return (<StyledTableContainer ref={containerRef}><RecordTableStyleWrapperref={tableBodyRef}isDragging={isDragging}- visibleRecordFields={visibleRecordFields}+ style={columnWidthStyles}id={RECORD_TABLE_HTML_ID}onMouseMove={handleDelegatedMouseMove}onMouseLeave={handleMouseLeave}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 8f1a8a943ba..ab7e2fc9fd6 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@@ -1,6 +1,9 @@import { hasRecordGroupsComponentSelector } from '@/object-record/record-group/states/selectors/hasRecordGroupsComponentSelector';import { RecordTableColumnWidthEffect } from '@/object-record/record-table/components/RecordTableColumnWidthEffect';-import { RecordTableStyleWrapper } from '@/object-record/record-table/components/RecordTableStyleWrapper';+import {+ getRecordTableColumnWidthInlineStyles,+ RecordTableStyleWrapper,+} from '@/object-record/record-table/components/RecordTableStyleWrapper';import { RecordTableWidthEffect } from '@/object-record/record-table/components/RecordTableWidthEffect';import { RECORD_TABLE_COLUMN_ADD_COLUMN_BUTTON_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnAddColumnButtonWidth';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';@@ -17,7 +20,8 @@ import { computeVisibleRecordFieldsWidthOnTable } from '@/object-record/record-timport { RecordTableVirtualizedDataChangedEffect } from '@/object-record/record-table/virtualization/components/RecordTableVirtualizedDataChangedEffect';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useMemo } from 'react';import { isDefined } from 'twenty-shared/utils';const StyledEmptyStateContainer = styled.div<{ width: number }>`@@ -81,11 +85,16 @@ export const RecordTableEmpty = ({ tableBodyRef }: RecordTableEmptyProps) => {hasRecordGroupsComponentSelector,);+ const columnWidthStyles = useMemo(+ () => getRecordTableColumnWidthInlineStyles(visibleRecordFields),+ [visibleRecordFields],+ );+return (<StyledEmptyStateContainer width={tableContainerWidth}><RecordTableStyleWrapperref={tableBodyRef}- visibleRecordFields={visibleRecordFields}+ style={columnWidthStyles}id={RECORD_TABLE_HTML_ID}hasRecordGroups={hasRecordGroups}>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 1507f7b5697..a11d0237a72 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@@ -15,15 +15,15 @@ import { RECORD_TABLE_VERTICAL_SCROLL_SHADOW_VISIBILITY_CSS_VARIABLE_NAME } fromimport { TABLE_Z_INDEX } from '@/object-record/record-table/constants/TableZIndex';import { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';import { getRecordTableColumnFieldWidthCSSVariableName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthCSSVariableName';-import { css, type Theme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';-export const VerticalScrollBoxShadowCSS = ({ theme }: { theme: Theme }) => css`+export const VerticalScrollBoxShadowCSS = `&::before {bottom: -1px;box-shadow:- 0px 2px 4px 0px ${theme.boxShadow.color},- 0px 0px 4px 0px ${theme.boxShadow.color};+ 0px 2px 4px 0px ${themeCssVariables.boxShadow.color},+ 0px 0px 4px 0px ${themeCssVariables.boxShadow.color};clip-path: inset(0px 0px -4px 0px);content: '';height: 4px;@@ -36,11 +36,7 @@ export const VerticalScrollBoxShadowCSS = ({ theme }: { theme: Theme }) => css`}`;-export const HorizontalScrollBoxShadowCSS = ({- theme,-}: {- theme: Theme;-}) => css`+export const HorizontalScrollBoxShadowCSS = `&::after {content: '';position: absolute;@@ -49,8 +45,8 @@ export const HorizontalScrollBoxShadowCSS = ({width: 4px;right: -1px;box-shadow:- 2px 0px 4px 0px ${theme.boxShadow.color},- 0px 0px 4px 0px ${theme.boxShadow.color};+ 2px 0px 4px 0px ${themeCssVariables.boxShadow.color},+ 0px 0px 4px 0px ${themeCssVariables.boxShadow.color};clip-path: inset(0px -4px 0px 0px);visibility: var(${RECORD_TABLE_HORIZONTAL_SCROLL_SHADOW_VISIBILITY_CSS_VARIABLE_NAME},@@ -59,9 +55,31 @@ export const HorizontalScrollBoxShadowCSS = ({}`;+const MAX_COLUMNS = 100;++const columnFieldWidthRules = Array.from(+ { length: MAX_COLUMNS },+ (_, i) =>+ `div.${getRecordTableColumnFieldWidthClassName(i)} {+ width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});+ min-width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});+ max-width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});+ }`,+).join('\n');++export const getRecordTableColumnWidthInlineStyles = (+ visibleRecordFields: RecordField[],+): Record<string, string> => {+ const style: Record<string, string> = {};+ for (let i = 0; i < visibleRecordFields.length; i++) {+ style[`--record-table-column-field-${i}`] =+ `${visibleRecordFields[i].size}px`;+ }+ return style;+};+const StyledTable = styled.div<{isDragging?: boolean;- visibleRecordFields: RecordField[];hasRecordGroups: boolean;}>`& > * {@@ -92,7 +110,7 @@ const StyledTable = styled.div<{div.header-cell:nth-of-type(1) {left: 0px;- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};z-index: ${({ hasRecordGroups }) =>hasRecordGroups@@ -104,7 +122,7 @@ const StyledTable = styled.div<{left: ${RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH}px;top: 0;- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};z-index: ${({ hasRecordGroups }) =>hasRecordGroups@@ -117,7 +135,7 @@ const StyledTable = styled.div<{RECORD_TABLE_COLUMN_CHECKBOX_WIDTH}px;right: 0;- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};z-index: ${({ hasRecordGroups }) =>hasRecordGroups@@ -183,23 +201,7 @@ const StyledTable = styled.div<{max-width: ${RECORD_TABLE_COLUMN_ADD_COLUMN_BUTTON_WIDTH}px;}- ${({ visibleRecordFields }) => {- let returnedCSS = '';-- for (let i = 0; i < visibleRecordFields.length; i++) {- returnedCSS += `--record-table-column-field-${i}: ${visibleRecordFields[i].size}px; \n`;- }-- for (let i = 0; i < visibleRecordFields.length; i++) {- returnedCSS += `div.${getRecordTableColumnFieldWidthClassName(i)} {- width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});- min-width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});- max-width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});- } \n`;- }-- return returnedCSS;- }};+ ${columnFieldWidthRules}div.${RECORD_TABLE_COLUMN_LAST_EMPTY_COLUMN_WIDTH_CLASS_NAME} {width: var(${RECORD_TABLE_COLUMN_LAST_EMPTY_COLUMN_WIDTH_VARIABLE_NAME});diff --git a/packages/twenty-front/src/modules/object-record/record-table/empty-state/components/RecordTableEmptyStateDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-table/empty-state/components/RecordTableEmptyStateDisplay.tsxindex 8bf547d3283..b09a18116f9 100644--- a/packages/twenty-front/src/modules/object-record/record-table/empty-state/components/RecordTableEmptyStateDisplay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/empty-state/components/RecordTableEmptyStateDisplay.tsx@@ -4,8 +4,7 @@ import { hasAnySoftDeleteFilterOnViewComponentSelector } from '@/object-record/rimport { useRecordTableContextOrThrow } from '@/object-record/record-table/contexts/RecordTableContext';import { useScrollWrapperHTMLElement } from '@/ui/utilities/scroll/hooks/useScrollWrapperHTMLElement';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';-import styled from '@emotion/styled';-import { isDefined } from 'twenty-shared/utils';+import { styled } from '@linaria/react';import { type IconComponent } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import {@@ -23,12 +22,6 @@ const StyledEmptyPlaceholderOuterContainer = styled(align-items: flex-start;`;-const StyledEmptyPlaceholderInnerContainer = styled(- AnimatedPlaceholderEmptyContainer,-)<{ width?: number }>`- width: ${({ width }) => (isDefined(width) ? `${width}px` : '100%')};-`;-type RecordTableEmptyStateDisplayButtonComponentProps = {buttonComponent?: React.ReactNode;};@@ -71,7 +64,7 @@ export const RecordTableEmptyStateDisplay = (return (<StyledEmptyPlaceholderOuterContainer>- <StyledEmptyPlaceholderInnerContainer width={scrollWrapperWidth}>+ <AnimatedPlaceholderEmptyContainer width={scrollWrapperWidth}><AnimatedPlaceholder type={props.animatedPlaceholderType} /><AnimatedPlaceholderEmptyTextContainer><AnimatedPlaceholderEmptyTitle>@@ -93,7 +86,7 @@ export const RecordTableEmptyStateDisplay = (disabled={props.buttonIsDisabled}/>)}- </StyledEmptyPlaceholderInnerContainer>+ </AnimatedPlaceholderEmptyContainer></StyledEmptyPlaceholderOuterContainer>);};diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-body/components/RecordTableBody.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-body/components/RecordTableBody.tsxindex 00595fe97d5..9509fe37469 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-body/components/RecordTableBody.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-body/components/RecordTableBody.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledTableBody = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-body/components/RecordTableBodyVirtualizedDraggableClone.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-body/components/RecordTableBodyVirtualizedDraggableClone.tsxindex 2d80936210b..525794c2bcc 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-body/components/RecordTableBodyVirtualizedDraggableClone.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-body/components/RecordTableBodyVirtualizedDraggableClone.tsx@@ -1,5 +1,7 @@-import { type RecordField } from '@/object-record/record-field/types/RecordField';-import { HorizontalScrollBoxShadowCSS } from '@/object-record/record-table/components/RecordTableStyleWrapper';+import {+ getRecordTableColumnWidthInlineStyles,+ HorizontalScrollBoxShadowCSS,+} from '@/object-record/record-table/components/RecordTableStyleWrapper';import { RECORD_TABLE_COLUMN_ADD_COLUMN_BUTTON_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnAddColumnButtonWidth';import { RECORD_TABLE_COLUMN_ADD_COLUMN_BUTTON_WIDTH_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableColumnAddColumnButtonWidthClassName';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';@@ -24,25 +26,48 @@ import { RecordTableRowMultiDragPreview } from '@/object-record/record-table/recimport { RecordTableTr } from '@/object-record/record-table/record-table-row/components/RecordTableTr';import { useIsTableRowSecondaryDragged } from '@/object-record/record-table/record-table-row/hooks/useIsRecordSecondaryDragged';import { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';-import { getRecordTableColumnFieldWidthCSSVariableName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthCSSVariableName';import { recordIdByRealIndexComponentFamilySelector } from '@/object-record/record-table/virtualization/states/recordIdByRealIndexComponentFamilySelector';import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {type DraggableProvided,type DraggableRubric,type DraggableStateSnapshot,} from '@hello-pangea/dnd';+import { useContext, useMemo } from 'react';import { isDefined } from 'twenty-shared/utils';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';--// TODO: see how we can merge this with RecordTableStyleWrapper,-// because we have not decided a strategy for sharing CSS bits yet-const StyledRowDraggableCloneCSSBridge = styled.div<{- visibleRecordFields: RecordField[];- lastColumnWidth: number;-}>`+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';++const MAX_COLUMNS = 100;++const cloneColumnFieldWidthRules = Array.from(+ { length: MAX_COLUMNS },+ (_, i) => {+ const className = getRecordTableColumnFieldWidthClassName(i);+ const cssVar = `var(--record-table-column-field-${i})`;+ const baseRule = `div.${className} {+ width: ${cssVar};+ min-width: ${cssVar};+ max-width: ${cssVar};+ }`;++ if (i === 0) {+ return `${baseRule}+ div.${className} {+ @media (max-width: ${MOBILE_VIEWPORT}px) {+ width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;+ max-width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;+ min-width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;+ }+ }`;+ }++ return baseRule;+ },+).join('\n');++const StyledRowDraggableCloneCSSBridge = styled.div`div.table-cell:nth-of-type(1) {position: sticky;left: 0px;@@ -90,38 +115,7 @@ const StyledRowDraggableCloneCSSBridge = styled.div<{max-width: ${RECORD_TABLE_COLUMN_ADD_COLUMN_BUTTON_WIDTH}px;}- ${({ visibleRecordFields, lastColumnWidth }) => {- let returnedCSS = '';-- for (let i = 0; i < visibleRecordFields.length; i++) {- returnedCSS += `--record-table-column-field-${i}: ${visibleRecordFields[i].size}px; \n`;- }-- for (let i = 0; i < visibleRecordFields.length; i++) {- returnedCSS += `div.${getRecordTableColumnFieldWidthClassName(i)} {- width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});- min-width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});- max-width: var(${getRecordTableColumnFieldWidthCSSVariableName(i)});- } \n`;-- const isLabelIdentifierColumn = i === 0;-- if (isLabelIdentifierColumn) {- returnedCSS += `div.${getRecordTableColumnFieldWidthClassName(i)} {- @media (max-width: ${MOBILE_VIEWPORT}px) {- width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;- max-width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;- min-width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;- }- } \n`;- }- }-- returnedCSS += `${RECORD_TABLE_COLUMN_LAST_EMPTY_COLUMN_WIDTH_VARIABLE_NAME}: ${lastColumnWidth}px;`;- returnedCSS += `${RECORD_TABLE_COLUMN_WITH_GROUP_LAST_EMPTY_COLUMN_WIDTH_VARIABLE_NAME}: ${lastColumnWidth}px;`;-- return returnedCSS;- }};+ ${cloneColumnFieldWidthRules}div.${RECORD_TABLE_COLUMN_LAST_EMPTY_COLUMN_WIDTH_CLASS_NAME} {width: var(${RECORD_TABLE_COLUMN_LAST_EMPTY_COLUMN_WIDTH_VARIABLE_NAME});@@ -145,7 +139,7 @@ export const RecordTableBodyVirtualizedDraggableClone = ({}) => {const realIndex = rubric.source.index;- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const recordId = useAtomComponentFamilySelectorValue(recordIdByRealIndexComponentFamilySelector,@@ -158,15 +152,23 @@ export const RecordTableBodyVirtualizedDraggableClone = ({const { isSecondaryDragged } = useIsTableRowSecondaryDragged(recordId);+ const columnWidthStyles = useMemo(() => {+ const styles: Record<string, string> =+ getRecordTableColumnWidthInlineStyles(visibleRecordFields);+ styles[RECORD_TABLE_COLUMN_LAST_EMPTY_COLUMN_WIDTH_VARIABLE_NAME] =+ `${lastColumnWidth}px`;+ styles[+ RECORD_TABLE_COLUMN_WITH_GROUP_LAST_EMPTY_COLUMN_WIDTH_VARIABLE_NAME+ ] = `${lastColumnWidth}px`;+ return styles;+ }, [visibleRecordFields, lastColumnWidth]);+if (!isDefined(recordId)) {return null;}return (- <StyledRowDraggableCloneCSSBridge- lastColumnWidth={lastColumnWidth}- visibleRecordFields={visibleRecordFields}- >+ <StyledRowDraggableCloneCSSBridge style={columnWidthStyles}><RecordTableTrrecordId={recordId}focusIndex={realIndex}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 6a689392770..a65986530f9 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,9 +9,7 @@ import { useOpenRecordTableCellFromCell } from '@/object-record/record-table/recimport { ThemeContext } from 'twenty-ui/theme';const StyledBaseContainer = styled.div<{- fontColorExtraLight: string;fontColorMedium: string;- backgroundColorTransparentSecondary: string;backgroundColorSecondary: string;fontColorSecondary: string;isReadOnly: boolean;@@ -26,24 +24,22 @@ const StyledBaseContainer = styled.div<{position: relative;&:hover {- ${(props) => {- if (!props.isReadOnly) return '';+ outline: ${({ isReadOnly, fontColorMedium }) =>+ isReadOnly ? `1px solid ${fontColorMedium}` : 'unset'};+ border-radius: ${({ isReadOnly }) => (isReadOnly ? '0px' : 'unset')};+ background-color: ${({ isReadOnly, backgroundColorSecondary }) =>+ isReadOnly ? backgroundColorSecondary : 'unset'};+ color: ${({ isReadOnly, fontColorSecondary }) =>+ isReadOnly ? fontColorSecondary : 'unset'};- return `- outline: 1px solid ${props.fontColorMedium};- border-radius: 0px;- background-color: ${props.backgroundColorSecondary};- color: ${props.fontColorSecondary};-- svg {- color: ${props.fontColorSecondary};- }-- img {- opacity: 0.64;- }- `;- }}+ svg {+ color: ${({ isReadOnly, fontColorSecondary }) =>+ isReadOnly ? fontColorSecondary : 'unset'};+ }++ img {+ opacity: ${({ isReadOnly }) => (isReadOnly ? '0.64' : 'unset')};+ }}`;@@ -74,11 +70,7 @@ export const RecordTableCellBaseContainer = ({return (<StyledBaseContaineronClick={handleContainerClick}- backgroundColorTransparentSecondary={- theme.background.transparent.secondary- }backgroundColorSecondary={theme.background.secondary}- fontColorExtraLight={theme.font.color.extraLight}fontColorSecondary={theme.font.color.secondary}fontColorMedium={theme.border.color.medium}isReadOnly={isReadOnly ?? false}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 2d1b5cc09b1..ca0585fdfa7 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@@ -1,17 +1,17 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type IconComponent } from 'twenty-ui/display';import { LightIconButtonGroup } from 'twenty-ui/input';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';import { AnimatedContainer } from 'twenty-ui/utilities';const StyledButtonContainer = styled.div`- margin: ${({ theme }) => theme.spacing(1)};+ margin: ${themeCssVariables.spacing[1]};@media (max-width: ${MOBILE_VIEWPORT}px) {position: relative;right: 7px;}- border-radius: ${({ theme }) => theme.border.radius.sm};- border: 1px solid ${({ theme }) => theme.border.color.strong};+ border-radius: ${themeCssVariables.border.radius.sm};+ border: 1px solid ${themeCssVariables.border.color.strong};`;type RecordTableCellButtonsProps = {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 cb3e81ea1d5..3735578c0e8 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,5 +1,6 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useCallback } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';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';@@ -18,7 +19,7 @@ const StyledContainer = styled.div`justify-content: center;min-width: ${RECORD_TABLE_COLUMN_CHECKBOX_WIDTH};width: ${RECORD_TABLE_COLUMN_CHECKBOX_WIDTH};- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;// TODO: refactordiff --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 c200d0cea72..30ba1cdad77 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,6 +1,7 @@-import styled from '@emotion/styled';+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 { 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';@@ -15,7 +16,7 @@ const StyledContainer = styled.div`justify-content: center;min-width: ${RECORD_TABLE_COLUMN_CHECKBOX_WIDTH};width: ${RECORD_TABLE_COLUMN_CHECKBOX_WIDTH};- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;// TODO: refactordiff --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 76522348cfb..f68ff053b5f 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@@ -1,7 +1,7 @@import { t } from '@lingui/core/macro';-import { type Theme, withTheme } from '@emotion/react';import { styled } from '@linaria/react';import { type Ref } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledOuterContainer = styled.div`align-items: center;@@ -21,10 +21,10 @@ const StyledInnerContainer = styled.div`white-space: nowrap;`;-const StyledEmptyPlaceholderField = withTheme(styled.div<{ theme: Theme }>`- color: ${({ theme }) => theme.font.color.light};+const StyledEmptyPlaceholderField = styled.div`+ color: ${themeCssVariables.font.color.light};padding-left: 4px;-`);+`;export type EditableCellDisplayContainerProps = {focus?: boolean;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 2ae657fe590..e8571c3390d 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@@ -1,6 +1,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableColumnDragAndDropWidthClassName';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';import { TABLE_Z_INDEX } from '@/object-record/record-table/constants/TableZIndex';import { useRecordTableRowDraggableContextOrThrow } from '@/object-record/record-table/contexts/RecordTableRowDraggableContext';@@ -24,7 +25,7 @@ const StyledIconWrapper = styled.div<{ isDragging: boolean }>`opacity: ${({ isDragging }) => (isDragging ? 1 : 0)};transition: opacity 0.1s;svg path {- fill: ${({ theme }) => theme.border.color.strong};+ fill: ${themeCssVariables.border.color.strong};}`;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsxindex 718f3a8b2b7..840a09ca0f5 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx@@ -9,7 +9,7 @@ import { OverlayContainer } from '@/ui/layout/overlay/components/OverlayContaineimport { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {autoUpdate,flip,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 9b229954c8a..4c1360a5a71 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@@ -6,7 +6,7 @@ import { recordTableHoverPositionComponentState } from '@/object-record/record-timport { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type DraggableProvidedDragHandleProps } from '@hello-pangea/dnd';import { cx } from '@linaria/core';import { useContext, type ReactNode } from 'react';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 d0416af17bd..28091c52634 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@@ -9,26 +9,26 @@ import { recordTableFocusPositionComponentState } from '@/object-record/record-timport { recordTableHoverPositionComponentState } from '@/object-record/record-table/states/recordTableHoverPositionComponentState';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';-import { BORDER_COMMON } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRecordTableCellFocusPortalContent = styled.div<{isRecordTableRowActive: boolean;}>`align-items: center;- background: ${({ theme }) => theme.background.transparent.secondary};- background-color: ${({ theme, isRecordTableRowActive }) =>+ background: ${themeCssVariables.background.transparent.secondary};+ background-color: ${({ isRecordTableRowActive }) =>isRecordTableRowActive- ? theme.accent.quaternary- : theme.background.primary};- border-radius: ${BORDER_COMMON.radius.sm};+ ? themeCssVariables.accent.quaternary+ : themeCssVariables.background.primary};+ border-radius: ${themeCssVariables.border.radius.sm};box-sizing: border-box;display: flex;height: ${RECORD_TABLE_ROW_HEIGHT}px;- outline: ${({ theme }) => `1px solid ${theme.color.blue8}`};+ outline: 1px solid ${themeCssVariables.color.blue8};user-select: none;`;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 8f4c0ae2994..12743aba152 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@@ -13,9 +13,9 @@ import { isRecordTableRowActiveComponentFamilyState } from '@/object-record/recoimport { recordTableHoverPositionComponentState } from '@/object-record/record-table/states/recordTableHoverPositionComponentState';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';-import { BORDER_COMMON } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useIsMobile } from 'twenty-ui/utilities';const StyledRecordTableCellHoveredPortalContent = styled.div<{@@ -23,13 +23,13 @@ const StyledRecordTableCellHoveredPortalContent = styled.div<{isRecordTableRowActive: boolean;}>`align-items: center;- background: ${({ theme }) => theme.background.transparent.secondary};- background-color: ${({ theme, isRecordTableRowActive }) =>+ background: ${themeCssVariables.background.transparent.secondary};+ background-color: ${({ isRecordTableRowActive }) =>isRecordTableRowActive- ? theme.accent.quaternary- : theme.background.primary};+ ? themeCssVariables.accent.quaternary+ : themeCssVariables.background.primary};border-radius: ${({ showInteractiveStyle }) =>- showInteractiveStyle ? BORDER_COMMON.radius.sm : 'none'};+ showInteractiveStyle ? themeCssVariables.border.radius.sm : 'none'};box-sizing: border-box;cursor: ${({ showInteractiveStyle }) =>showInteractiveStyle ? 'pointer' : 'default'};@@ -37,12 +37,12 @@ const StyledRecordTableCellHoveredPortalContent = styled.div<{height: ${RECORD_TABLE_ROW_HEIGHT}px;- outline: ${({ theme, showInteractiveStyle, isRecordTableRowActive }) =>+ outline: ${({ showInteractiveStyle, isRecordTableRowActive }) =>isRecordTableRowActive? 'none': showInteractiveStyle- ? `1px solid ${theme.font.color.extraLight}`- : `1px solid ${theme.border.color.medium}`};+ ? `1px solid ${themeCssVariables.font.color.extraLight}`+ : `1px solid ${themeCssVariables.border.color.medium}`};user-select: none;`;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 8a2ac1daee2..e74377da758 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,11 +1,11 @@import { RecordTableCellStyleWrapper } from '@/object-record/record-table/record-table-cell/components/RecordTableCellStyleWrapper';import { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';-import { type Theme, useTheme } from '@emotion/react';import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';-const StyledStaticCellSkeleton = styled.div<{ theme: Theme }>`- background-color: ${({ theme }) => theme.background.tertiary};- border-radius: ${({ theme }) => theme.border.radius.sm};+const StyledStaticCellSkeleton = styled.div`+ background-color: ${themeCssVariables.background.tertiary};+ border-radius: ${themeCssVariables.border.radius.sm};padding: 8px;margin: 8px;`;@@ -17,14 +17,12 @@ export const RecordTableCellLoading = ({recordFieldIndex: number;isSelected?: boolean;}) => {- const theme = useTheme();-return (<RecordTableCellStyleWrapperwidthClassName={getRecordTableColumnFieldWidthClassName(recordFieldIndex)}isSelected={isSelected}>- <StyledStaticCellSkeleton theme={theme} />+ <StyledStaticCellSkeleton /></RecordTableCellStyleWrapper>);};diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellPortalRootContainer.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellPortalRootContainer.tsxindex 0a5d952230b..c24f360669c 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellPortalRootContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellPortalRootContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledRecordTableCellPortalRootContainer = styled.div<{zIndex?: number;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellSkeletonLoader.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellSkeletonLoader.tsxindex 6a492bba022..ba960a42b4a 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellSkeletonLoader.tsx@@ -1,16 +1,18 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSkeletonContainer = styled.div`- padding-left: ${({ theme }) => theme.spacing(2)};- padding-right: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(1.6)};+ padding-left: ${themeCssVariables.spacing[2]};+ padding-right: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing['1.5']};`;const StyledRecordTableCellLoader = ({ width }: { width?: number }) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<SkeletonThemebaseColor={theme.background.tertiary}diff --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 e53831a5465..17bd659de89 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@@ -1,16 +1,17 @@import { RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnDragAndDropWidth';import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { cx } from '@linaria/core';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledPlaceholderDragAndDropCell = styled.div`height: ${RECORD_TABLE_ROW_HEIGHT}px;width: ${RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH}px;min-width: ${RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH}px;- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};- border-bottom: 1px solid ${({ theme }) => theme.background.primary};+ border-bottom: 1px solid ${themeCssVariables.background.primary};position: sticky;left: 0;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 1d680ddd9b5..1c1d63b3305 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@@ -1,6 +1,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { RECORD_TABLE_COLUMN_ADD_COLUMN_BUTTON_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnAddColumnButtonWidth';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';import { RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnDragAndDropWidth';import { RECORD_TABLE_COLUMN_LAST_EMPTY_COLUMN_WIDTH_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableColumnLastEmptyColumnWidthClassName';@@ -13,7 +14,7 @@ import { isDefined } from 'twenty-shared/utils';const StyledPlaceholderDragAndDropFooterCell = styled.div<{isTableWithGroups: boolean;}>`- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};width: ${RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH +RECORD_TABLE_COLUMN_CHECKBOX_WIDTH}px;position: sticky;@@ -29,7 +30,7 @@ const StyledPlaceholderDragAndDropFooterCell = styled.div<{const StyledPlaceholderAddButtonPlaceholderFooterCell = styled.div<{isTableWithGroups: boolean;}>`- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};width: ${RECORD_TABLE_COLUMN_ADD_COLUMN_BUTTON_WIDTH}px;position: sticky;bottom: 0;@@ -42,7 +43,7 @@ const StyledPlaceholderAddButtonPlaceholderFooterCell = styled.div<{const StyledPlaceholderLastColumnEmptyFooterCell = styled.div<{isTableWithGroups: boolean;}>`- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};position: sticky;bottom: 0;z-index: ${({ isTableWithGroups }) =>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 d1b5414ac60..a4bff550783 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,5 +1,6 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';+import { themeCssVariables, MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';import { RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnDragAndDropWidth';@@ -12,32 +13,25 @@ import { RecordTableColumnFooterWithDropdown } from '@/object-record/record-tablimport { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';import { cx } from '@linaria/core';import { findByProperty, isDefined } from 'twenty-shared/utils';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';const StyledColumnFooterCell = styled.div<{columnWidth: number;isFirstCell: boolean;isTableWithGroups: boolean;}>`- background-color: ${({ theme }) => theme.background.primary};- color: ${({ theme }) => theme.font.color.tertiary};+ background-color: ${themeCssVariables.background.primary};+ color: ${themeCssVariables.font.color.tertiary};- border-right: solid 1px ${({ theme }) => theme.background.primary};+ border-right: solid 1px ${themeCssVariables.background.primary};padding: 0;- ${({ columnWidth }) => `- min-width: ${columnWidth}px;- width: ${columnWidth}px;- `}+ min-width: ${({ columnWidth }) => columnWidth}px;+ width: ${({ columnWidth }) => columnWidth}px;text-align: left;- ${({ theme }) => {- return `- &:hover {- background: ${theme.background.secondary};- };- `;- }};+ &:hover {+ background: ${themeCssVariables.background.secondary};+ }height: ${RECORD_TABLE_ROW_HEIGHT}px;overflow: hidden;@@ -45,21 +39,33 @@ const StyledColumnFooterCell = styled.div<{position: sticky;bottom: 0;- ${({ isFirstCell }) =>+ left: ${({ isFirstCell }) =>isFirstCell- ? `- @media (max-width: ${MOBILE_VIEWPORT}px) {- width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;- max-width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;- min-width: ${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px;- }- `- : ''}-- ${({ isFirstCell, isTableWithGroups }) =>+ ? `${RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH + RECORD_TABLE_COLUMN_CHECKBOX_WIDTH}px`+ : 'auto'};+ z-index: ${({ isFirstCell, isTableWithGroups }) =>isFirstCell- ? `left: ${RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH + RECORD_TABLE_COLUMN_CHECKBOX_WIDTH}px; z-index: ${isTableWithGroups ? TABLE_Z_INDEX.footer.tableWithGroups.stickyColumn : TABLE_Z_INDEX.footer.tableWithoutGroups.stickyColumn};`- : `z-index: ${isTableWithGroups ? TABLE_Z_INDEX.footer.tableWithGroups.default : TABLE_Z_INDEX.footer.tableWithoutGroups.default};`}+ ? isTableWithGroups+ ? TABLE_Z_INDEX.footer.tableWithGroups.stickyColumn+ : TABLE_Z_INDEX.footer.tableWithoutGroups.stickyColumn+ : isTableWithGroups+ ? TABLE_Z_INDEX.footer.tableWithGroups.default+ : TABLE_Z_INDEX.footer.tableWithoutGroups.default};++ @media (max-width: ${MOBILE_VIEWPORT}px) {+ max-width: ${({ isFirstCell }) =>+ isFirstCell+ ? `${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px`+ : 'none'};+ min-width: ${({ isFirstCell }) =>+ isFirstCell+ ? `${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px`+ : '0'};+ width: ${({ isFirstCell }) =>+ isFirstCell+ ? `${RECORD_TABLE_LABEL_IDENTIFIER_COLUMN_WIDTH_ON_MOBILE}px`+ : 'auto'};+ }`;const StyledColumnFootContainer = styled.div`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 c32dc847924..90a42ae2cc8 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@@ -1,7 +1,8 @@import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';import { useAggregateRecordsForRecordTableColumnFooter } from '@/object-record/record-table/record-table-footer/hooks/useAggregateRecordsForRecordTableColumnFooter';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip } from 'twenty-ui/display';@@ -15,7 +16,7 @@ const StyledText = styled.span`gap: 4px;flex-grow: 1;- padding-left: ${({ theme }) => theme.spacing(2)};+ padding-left: ${themeCssVariables.spacing[2]};z-index: 1;`;@@ -40,7 +41,7 @@ const StyledValueContainer = styled(StyledScrollableContainer)``;const StyledValue = styled.div`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};max-width: 100%;`;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 dc1a11a5a46..8cf95e7bb22 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@@ -8,35 +8,35 @@ import { isDropdownOpenComponentState } from '@/ui/layout/dropdown/states/isDropimport { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext, useState } from 'react';import { IconChevronDown } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCell = styled.div<{ isUnfolded: boolean; isFirstCell: boolean }>`align-items: center;display: flex;flex-direction: row;flex-shrink: 0;- font-weight: ${({ theme }) => theme.font.weight.medium};+ font-weight: ${themeCssVariables.font.weight.medium};- gap: ${({ theme }) => theme.spacing(1)};- height: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[1]};+ height: ${themeCssVariables.spacing[8]};justify-content: space-between;- min-width: ${({ theme }) => theme.spacing(7)};+ min-width: ${themeCssVariables.spacing[7]};flex-grow: 1;max-width: 100%;cursor: pointer;- background: ${({ theme, isUnfolded }) =>- isUnfolded ? theme.background.tertiary : 'none'};+ background: ${({ isUnfolded }) =>+ isUnfolded ? themeCssVariables.background.tertiary : 'none'};- ${({ isFirstCell, theme }) =>- isFirstCell &&- `- padding-left: calc(${RECORD_TABLE_COLUMN_CHECKBOX_WIDTH} + ${theme.spacing(1)});- `}+ padding-left: ${({ isFirstCell }) =>+ isFirstCell+ ? `calc(${RECORD_TABLE_COLUMN_CHECKBOX_WIDTH} + ${themeCssVariables.spacing[1]})`+ : '0'};`;const StyledIcon = styled(IconChevronDown)`@@ -46,7 +46,7 @@ const StyledIcon = styled(IconChevronDown)`justify-content: center;flex-grow: 0;flex-shrink: 0;- padding-right: ${({ theme }) => theme.spacing(2)};+ padding-right: ${themeCssVariables.spacing[2]};`;export const RecordTableColumnAggregateFooterValueCell = ({@@ -63,7 +63,7 @@ export const RecordTableColumnAggregateFooterValueCell = ({dropdownId,);- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 6ba7d873ce0..35026533b64 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,5 @@-import { css, useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { fieldMetadataItemByIdSelector } from '@/object-metadata/states/fieldMetadataItemByIdSelector';import { isFieldMetadataItemLabelIdentifierSelector } from '@/object-metadata/states/isFieldMetadataItemLabelIdentifierSelector';@@ -8,25 +8,22 @@ import { shouldCompactRecordTableFirstColumnComponentState } from '@/object-recoimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { useIcons } from 'twenty-ui/display';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledTitle = styled.div<{ hideTitle?: boolean }>`align-items: center;display: flex;flex-direction: row;- font-weight: ${({ theme }) => theme.font.weight.medium};- gap: ${({ theme }) => theme.spacing(1)};- height: ${({ theme }) => theme.spacing(8)};- padding-left: ${({ theme }) => theme.spacing(2)};- padding-right: ${({ theme }) => theme.spacing(2)};+ font-weight: ${themeCssVariables.font.weight.medium};+ gap: ${themeCssVariables.spacing[1]};+ height: ${themeCssVariables.spacing[8]};+ padding-left: ${themeCssVariables.spacing[2]};+ padding-right: ${themeCssVariables.spacing[2]};- ${({ hideTitle }) =>- hideTitle &&- css`- @media (max-width: ${MOBILE_VIEWPORT}px) {- display: none;- }- `}+ @media (max-width: ${MOBILE_VIEWPORT}px) {+ display: ${({ hideTitle }) => (hideTitle ? 'none' : 'flex')};+ }`;const StyledIcon = styled.div`@@ -34,8 +31,8 @@ const StyledIcon = styled.div`flex-shrink: 0;& > svg {- height: ${({ theme }) => theme.icon.size.md}px;- width: ${({ theme }) => theme.icon.size.md}px;+ height: ${themeCssVariables.icon.size.md}px;+ width: ${themeCssVariables.icon.size.md}px;}`;@@ -52,7 +49,7 @@ type RecordTableColumnHeadProps = {export const RecordTableColumnHead = ({recordField,}: RecordTableColumnHeadProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 81d87d49440..785a53f4560 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@@ -12,7 +12,8 @@ import { useOpenRecordFilterChipFromTableHeader } from '@/object-record/record-timport { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { useToggleScrollWrapper } from '@/ui/utilities/scroll/hooks/useToggleScrollWrapper';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useLingui } from '@lingui/react/macro';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import {@@ -30,7 +31,7 @@ export type RecordTableColumnHeadDropdownMenuProps = {};const StyledDropdownMenuItemsContainer = styled(DropdownMenuItemsContainer)`- z-index: ${({ theme }) => theme.lastLayerZIndex};+ z-index: ${themeCssVariables.lastLayerZIndex};`;export const RecordTableColumnHeadDropdownMenu = ({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 a8c5719ca68..6224ac3959d 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { hasRecordGroupsComponentSelector } from '@/object-record/record-group/states/selectors/hasRecordGroupsComponentSelector';import { HIDDEN_TABLE_COLUMN_DROPDOWN_ID } from '@/object-record/record-table/constants/HiddenTableColumnDropdownId';@@ -16,21 +16,23 @@ import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import { useTheme } from '@emotion/react';import { cx } from '@linaria/core';+import { useContext } from 'react';import { IconPlus } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledPlusIconHeaderCell = styled.div<{shouldDisplayBorderBottom: boolean;}>`- border-bottom: ${({ theme, shouldDisplayBorderBottom }) =>+ border-bottom: ${({ shouldDisplayBorderBottom }) =>shouldDisplayBorderBottom- ? `1px solid ${theme.border.color.light}`+ ? `1px solid ${themeCssVariables.border.color.light}`: 'none'};- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};- color: ${({ theme }) => theme.font.color.tertiary};- border-right: ${({ theme }) => theme.border.color.light} !important;+ color: ${themeCssVariables.font.color.tertiary};+ border-right: ${themeCssVariables.border.color.light} !important;cursor: pointer;@@ -42,7 +44,7 @@ const StyledPlusIconHeaderCell = styled.div<{max-height: ${RECORD_TABLE_ROW_HEIGHT}px;&:hover {- background: ${({ theme }) => theme.background.secondary};+ background: ${themeCssVariables.background.secondary};}`;@@ -60,7 +62,7 @@ const StyledDropdownContainer = styled.div``;export const RecordTableHeaderAddColumnButton = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 45cb8174e5f..6a003f469bb 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,12 +1,13 @@import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledHeaderCell = styled.div<{zIndex?: number;shouldDisplayBorderBottom: boolean;isResizing: boolean;}>`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};padding: 0;text-align: left;@@ -15,29 +16,29 @@ const StyledHeaderCell = styled.div<{height: ${RECORD_TABLE_ROW_HEIGHT}px;max-height: ${RECORD_TABLE_ROW_HEIGHT}px;- background-color: ${({ theme }) => theme.background.primary};- border-right: 1px solid ${({ theme }) => theme.border.color.light};+ background-color: ${themeCssVariables.background.primary};+ border-right: 1px solid ${themeCssVariables.border.color.light};- border-bottom: ${({ theme, shouldDisplayBorderBottom }) =>+ border-bottom: ${({ shouldDisplayBorderBottom }) =>shouldDisplayBorderBottom- ? `1px solid ${theme.border.color.light}`+ ? `1px solid ${themeCssVariables.border.color.light}`: 'none'};user-select: none;- ${({ theme, isResizing }) => {- if (isResizing) {- return '';- }-- return `- &:hover {- background: ${theme.background.secondary};- };- &:active {- background: ${theme.background.tertiary};- };- `;- }};++ &:hover {+ background: ${({ isResizing }) =>+ isResizing+ ? themeCssVariables.background.primary+ : themeCssVariables.background.secondary};+ }++ &:active {+ background: ${({ isResizing }) =>+ isResizing+ ? themeCssVariables.background.primary+ : themeCssVariables.background.tertiary};+ }cursor: ${({ isResizing }) => (isResizing ? 'col-resize' : 'pointer')};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 ea4f5e7d003..9760a6c083d 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@@ -1,6 +1,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { recordIndexAllRecordIdsComponentSelector } from '@/object-record/record-index/states/selectors/recordIndexAllRecordIdsComponentSelector';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { hasRecordGroupsComponentSelector } from '@/object-record/record-group/states/selectors/hasRecordGroupsComponentSelector';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';@@ -29,16 +30,16 @@ const StyledContainer = styled.div<{height: ${RECORD_TABLE_ROW_HEIGHT}px;justify-content: center;min-width: 24px;- padding-right: ${({ theme }) => theme.spacing(1)};- background-color: ${({ theme }) => theme.background.primary};- border-bottom: ${({ theme, shouldDisplayBorderBottom }) =>+ padding-right: ${themeCssVariables.spacing[1]};+ background-color: ${themeCssVariables.background.primary};+ border-bottom: ${({ shouldDisplayBorderBottom }) =>shouldDisplayBorderBottom- ? `1px solid ${theme.border.color.light}`+ ? `1px solid ${themeCssVariables.border.color.light}`: 'none'};`;const StyledColumnHeaderCell = styled.div`- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};min-width: ${RECORD_TABLE_COLUMN_CHECKBOX_WIDTH}px;box-sizing: border-box;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 68738188986..1fc29656268 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@@ -9,10 +9,11 @@ import { isRecordTableScrolledVerticallyComponentState } from '@/object-record/rimport { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { cx } from '@linaria/core';import { useContext } from 'react';import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledDragDropHeaderCell = styled.div<{shouldDisplayBorderBottom: boolean;@@ -27,9 +28,9 @@ const StyledDragDropHeaderCell = styled.div<{cursor: pointer;- border-bottom: ${({ theme, shouldDisplayBorderBottom }) =>+ border-bottom: ${({ shouldDisplayBorderBottom }) =>shouldDisplayBorderBottom- ? `1px solid ${theme.background.primary}`+ ? `1px solid ${themeCssVariables.background.primary}`: 'none'};`;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderFirstCell.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderFirstCell.tsxindex 0ca8fff4c03..84177df26ad 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderFirstCell.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderFirstCell.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useRecordTableContextOrThrow } from '@/object-record/record-table/contexts/RecordTableContext';import { RecordTableColumnHeadWithDropdown } from '@/object-record/record-table/record-table-header/components/RecordTableColumnHeadWithDropdown';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 b3278c107a0..e1454fb952d 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@@ -3,13 +3,15 @@ import { hasAnySoftDeleteFilterOnViewComponentSelector } from '@/object-record/rimport { useRecordTableContextOrThrow } from '@/object-record/record-table/contexts/RecordTableContext';import { useCreateNewIndexRecord } from '@/object-record/record-table/hooks/useCreateNewIndexRecord';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { IconPlus } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { LightIconButton } from 'twenty-ui/input';import { useIsMobile } from 'twenty-ui/utilities';const StyledHeaderIcon = styled.div`- margin: ${({ theme }) => theme.spacing(1, 1, 1, 1.5)};+ margin: ${themeCssVariables.spacing[1]} ${themeCssVariables.spacing[1]}+ ${themeCssVariables.spacing[1]} ${themeCssVariables.spacing['1.5']};`;export const RecordTableHeaderLabelIdentifierCellPlusButton = () => {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 c931425cb9b..c13e27e0dc2 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@@ -8,20 +8,21 @@ import { isRecordTableScrolledVerticallyComponentState } from '@/object-record/rimport { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { cx } from '@linaria/core';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledLastColumnHeader = styled.div<{shouldDisplayBorderBottom: boolean;}>`- border-bottom: ${({ theme, shouldDisplayBorderBottom }) =>+ border-bottom: ${({ shouldDisplayBorderBottom }) =>shouldDisplayBorderBottom- ? `1px solid ${theme.border.color.light}`+ ? `1px solid ${themeCssVariables.border.color.light}`: 'none'};- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};border-left: none !important;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};cursor: pointer;diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderResizeHandler.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderResizeHandler.tsxindex d6c49b06efb..92e5ac6fada 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderResizeHandler.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderResizeHandler.tsx@@ -3,7 +3,8 @@ import { useRecordTableContextOrThrow } from '@/object-record/record-table/conteimport { resizedFieldMetadataIdComponentState } from '@/object-record/record-table/states/resizedFieldMetadataIdComponentState';import { useDragSelect } from '@/ui/utilities/drag-select/hooks/useDragSelect';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useIsMobile } from 'twenty-ui/utilities';const StyledResizeHandler = styled.div<{@@ -13,26 +14,23 @@ const StyledResizeHandler = styled.div<{bottom: 0;cursor: col-resize;position: absolute;- ${({ position }) => (position === 'left' ? 'left: -1px;' : 'right: -1px;')}+ left: ${({ position }) => (position === 'left' ? '-1px' : 'auto')};+ right: ${({ position }) => (position === 'right' ? '-1px' : 'auto')};top: 0;width: 10px;z-index: 1;- ${({ isResizing, theme, position }) => {- if (isResizing === true) {- return `&:after {- background-color: ${theme.color.blue};- bottom: 0;- content: '';- display: block;- position: absolute;- ${position === 'left' ? 'left: -1px;' : 'right: -1px;'}-- top: 0;- width: 2px;- }`;- }- }};+ &:after {+ background-color: ${themeCssVariables.color.blue};+ bottom: 0;+ content: '';+ display: ${({ isResizing }) => (isResizing ? 'block' : 'none')};+ left: ${({ position }) => (position === 'left' ? '-1px' : 'auto')};+ position: absolute;+ right: ${({ position }) => (position === 'right' ? '-1px' : 'auto')};+ top: 0;+ width: 2px;+ }`;export const RecordTableHeaderResizeHandler = ({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 4e2c91afa56..05766fba4d4 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@@ -1,6 +1,8 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useRecordIndexContextOrThrow } from '@/object-record/record-index/contexts/RecordIndexContext';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RECORD_TABLE_COLUMN_CHECKBOX_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnCheckboxWidth';import { RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnDragAndDropWidth';import { RECORD_TABLE_COLUMN_MIN_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnMinWidth';@@ -10,7 +12,7 @@ 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 { useTheme } from '@emotion/react';+import { useContext } from 'react';import {filterOutByProperty,findByProperty,@@ -36,7 +38,7 @@ const StyledRecordTableDraggableTr = styled.div`cursor: pointer;border: none;- background: ${({ theme }) => theme.background.primary};+ background: ${themeCssVariables.background.primary};display: flex;flex-direction: row;@@ -44,12 +46,12 @@ const StyledRecordTableDraggableTr = styled.div`&:hover {div:not(:first-of-type) {- background-color: ${({ theme }) => theme.background.secondary};+ background-color: ${themeCssVariables.background.secondary};}}div:not(:first-of-type) {- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};}width: 100%;@@ -59,7 +61,7 @@ const StyledIconContainer = styled.div`align-items: center;background-color: transparent;border-right: none;- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};display: flex;height: ${RECORD_TABLE_ROW_HEIGHT}px;justify-content: center;@@ -85,9 +87,9 @@ const StyledActionTextContainer = styled.div<{ width: number }>``;const StyledText = styled.span`- color: ${({ theme }) => theme.font.color.tertiary};- margin-left: ${({ theme }) => theme.spacing(2)};- font-size: ${({ theme }) => theme.font.size.md};+ color: ${themeCssVariables.font.color.tertiary};+ margin-left: ${themeCssVariables.spacing[2]};+ font-size: ${themeCssVariables.font.size.md};text-align: left;vertical-align: middle;white-space: nowrap;@@ -106,7 +108,7 @@ export const RecordTableActionRow = ({text,onClick,}: RecordTableActionRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { visibleRecordFields } = useRecordTableContextOrThrow();const { labelIdentifierFieldMetadataItem } = useRecordIndexContextOrThrow();diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableAddButtonPlaceholderCell.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableAddButtonPlaceholderCell.tsxindex a00a7cd5320..3186087f0a7 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableAddButtonPlaceholderCell.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableAddButtonPlaceholderCell.tsx@@ -1,6 +1,6 @@import { RECORD_TABLE_COLUMN_ADD_COLUMN_BUTTON_WIDTH } from '@/object-record/record-table/constants/RecordTableColumnAddColumnButtonWidth';import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { cx } from '@linaria/core';const StyledPlaceholderAddButtonCell = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTr.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTr.tsxindex 50cbd943fc3..f1050040cb6 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTr.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTr.tsx@@ -1,6 +1,6 @@-import { useTheme } from '@emotion/react';import { Draggable } from '@hello-pangea/dnd';-import { type ReactNode } from 'react';+import { type ReactNode, useContext } from 'react';+import { ThemeContext } from 'twenty-ui/theme';import { RecordTableRowDraggableContextProvider } from '@/object-record/record-table/contexts/RecordTableRowDraggableContext';import { RecordTableRowMultiDragPreview } from '@/object-record/record-table/record-table-row/components/RecordTableRowMultiDragPreview';@@ -26,7 +26,7 @@ export const RecordTableDraggableTr = ({onClick,children,}: RecordTableDraggableTrProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { isSecondaryDragged } = useIsTableRowSecondaryDragged(recordId);diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTrFirstRowOfGroup.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTrFirstRowOfGroup.tsxindex 67bd892780d..69d94e27182 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTrFirstRowOfGroup.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTrFirstRowOfGroup.tsx@@ -1,6 +1,6 @@-import { useTheme } from '@emotion/react';import { Draggable } from '@hello-pangea/dnd';-import { type ReactNode } from 'react';+import { type ReactNode, useContext } from 'react';+import { ThemeContext } from 'twenty-ui/theme';import { RecordTableRowDraggableContextProvider } from '@/object-record/record-table/contexts/RecordTableRowDraggableContext';import { RecordTableRowMultiDragPreview } from '@/object-record/record-table/record-table-row/components/RecordTableRowMultiDragPreview';@@ -29,7 +29,7 @@ export const RecordTableDraggableTrFirstRowOfGroup = ({onClick,children,}: RecordTableDraggableTrFirstRowOfGroupProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { isSecondaryDragged } = useIsTableRowSecondaryDragged(recordId);diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableGroupSectionLastDynamicFillingCell.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableGroupSectionLastDynamicFillingCell.tsxindex a2b4dedd6a2..687d74fb085 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableGroupSectionLastDynamicFillingCell.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableGroupSectionLastDynamicFillingCell.tsx@@ -1,6 +1,6 @@import { RECORD_TABLE_COLUMN_WITH_GROUP_LAST_EMPTY_COLUMN_WIDTH_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableColumnWithGroupLastEmptyColumnWidthClassName';import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { cx } from '@linaria/core';const StyledPlaceholderLastDynamicFillingCell = styled.div`diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableLastDynamicFillingCell.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableLastDynamicFillingCell.tsxindex d2d65c8fc22..ee1d1b38284 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableLastDynamicFillingCell.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableLastDynamicFillingCell.tsx@@ -1,6 +1,6 @@import { RECORD_TABLE_COLUMN_LAST_EMPTY_COLUMN_WIDTH_CLASS_NAME } from '@/object-record/record-table/constants/RecordTableColumnLastEmptyColumnWidthClassName';import { RECORD_TABLE_ROW_HEIGHT } from '@/object-record/record-table/constants/RecordTableRowHeight';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { cx } from '@linaria/core';const StyledPlaceholderLastDynamicFillingCell = styled.div`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 ab101232b42..3789291de6e 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,6 @@import { TABLE_Z_INDEX } from '@/object-record/record-table/constants/TableZIndex';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTr = styled.div<{isDragging: boolean;@@ -30,8 +31,8 @@ const StyledTr = styled.div<{? TABLE_Z_INDEX.activeRows.afterFirstRow.normal.scrolledVertically: TABLE_Z_INDEX.activeRows.afterFirstRow.normal.noVerticalScroll};- border-top: ${({ isDragging, theme }) =>- isDragging ? `1px solid ${theme.border.color.medium}` : 'none'};+ border-top: ${({ isDragging }) =>+ isDragging ? `1px solid ${themeCssVariables.border.color.medium}` : 'none'};display: flex;flex-direction: row;@@ -41,12 +42,12 @@ const StyledTr = styled.div<{div.table-cell,div.table-cell-0-0 {&:not(:first-of-type) {- border-bottom: 1px solid ${({ theme }) => theme.border.color.medium};- border-color: ${({ theme }) => theme.border.color.medium};- background-color: ${({ theme }) => theme.background.tertiary};+ border-bottom: 1px solid ${themeCssVariables.border.color.medium};+ border-color: ${themeCssVariables.border.color.medium};+ background-color: ${themeCssVariables.background.tertiary};}&:nth-of-type(2) {- border-left: 1px solid ${({ theme }) => theme.border.color.medium};+ border-left: 1px solid ${themeCssVariables.border.color.medium};margin-left: -1px;@@ -55,9 +56,9 @@ const StyledTr = styled.div<{}}&:last-of-type {- border-right: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: 0 ${({ theme }) => theme.border.radius.sm}- ${({ theme }) => theme.border.radius.sm} 0;+ border-right: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: 0 ${themeCssVariables.border.radius.sm}+ ${themeCssVariables.border.radius.sm} 0;}}}diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowMultiDragCounterChip.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowMultiDragCounterChip.tsxindex 9f8b2496956..c3a7064c9d2 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowMultiDragCounterChip.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableRowMultiDragCounterChip.tsx@@ -1,6 +1,6 @@import { originalDragSelectionComponentState } from '@/object-record/record-drag/states/originalDragSelectionComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { NotificationCounter } from 'twenty-ui/navigation';const StyledNotificationCounter = styled(NotificationCounter)`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 afe9ff1169e..fe53fb9f02d 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,6 +1,7 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { useCallback } from 'react';+import { styled } from '@linaria/react';+import { useCallback, useContext } from 'react';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RecordBoardColumnHeaderAggregateDropdown } from '@/object-record/record-board/record-board-column/components/RecordBoardColumnHeaderAggregateDropdown';import { visibleRecordFieldsComponentSelector } from '@/object-record/record-field/states/visibleRecordFieldsComponentSelector';@@ -45,13 +46,13 @@ const StyledTrContainer = styled.div`flex-direction: row;div:not(:first-of-type) {- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};}`;const StyledChevronContainer = styled.div`border-right: none;- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};display: flex;text-align: center;vertical-align: middle;@@ -76,7 +77,7 @@ const StyledRecordGroupSection = styled.div<{ width: number }>`border-right: none;display: flex;flex-direction: row;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};height: ${RECORD_TABLE_ROW_HEIGHT}px;width: ${({ width }) => width}px;min-width: ${({ width }) => width}px;@@ -105,9 +106,9 @@ const StyledRecordTableDragAndDropPlaceholderCell = styled.div`width: ${RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH}px;min-width: ${RECORD_TABLE_COLUMN_DRAG_AND_DROP_WIDTH}px;- background-color: ${({ theme }) => theme.background.primary};+ background-color: ${themeCssVariables.background.primary};- border-bottom: 1px solid ${({ theme }) => theme.background.primary};+ border-bottom: 1px solid ${themeCssVariables.background.primary};position: sticky;left: 0;@@ -115,7 +116,7 @@ const StyledRecordTableDragAndDropPlaceholderCell = styled.div``;export const RecordTableRecordGroupSection = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const currentRecordGroupId = useCurrentRecordGroupId();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 16bddf45e09..55eac7a5985 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@@ -10,20 +10,21 @@ import { recordIdByRealIndexComponentFamilySelector } from '@/object-record/recoimport { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledDebugRow = styled.div`position: absolute;left: 250px;top: 5px;z-index: 20;- color: ${({ theme }) => theme.font.color.primary};- background-color: ${({ theme }) => theme.color.gray3};- border: 1px solid ${({ theme }) => theme.color.blue8};- padding: ${({ theme }) => theme.spacing(0.5)};+ color: ${themeCssVariables.font.color.primary};+ background-color: ${themeCssVariables.color.gray3};+ border: 1px solid ${themeCssVariables.color.blue8};+ padding: ${themeCssVariables.spacing['0.5']};display: flex;- max-height: ${({ theme }) => theme.spacing(4)};+ max-height: ${themeCssVariables.spacing[4]};overflow: hidden;`;@@ -35,8 +36,8 @@ const StyledDebugColumn = styled.div<{ width: number }>`display: flex;text-wrap-mode: nowrap;- padding-right: ${({ theme }) => theme.spacing(0.5)};- padding-left: ${({ theme }) => theme.spacing(0.5)};+ padding-right: ${themeCssVariables.spacing['0.5']};+ padding-left: ${themeCssVariables.spacing['0.5']};`;type RecordTableRowVirtualizedDebugRowHelperProps = {diff --git a/packages/twenty-front/src/modules/object-record/record-table/virtualization/constants/NumberOfVirtualizedRows.ts b/packages/twenty-front/src/modules/object-record/record-table/virtualization/constants/NumberOfVirtualizedRows.tsindex 0b874e408a1..4b89cde38f6 100644--- a/packages/twenty-front/src/modules/object-record/record-table/virtualization/constants/NumberOfVirtualizedRows.ts+++ b/packages/twenty-front/src/modules/object-record/record-table/virtualization/constants/NumberOfVirtualizedRows.ts@@ -1 +1 @@-export const NUMBER_OF_VIRTUALIZED_ROWS = 200;+export const NUMBER_OF_VIRTUALIZED_ROWS = 240;diff --git a/packages/twenty-front/src/modules/object-record/record-table/virtualization/constants/TableVirtualizationNumberOfOverscanPages.ts b/packages/twenty-front/src/modules/object-record/record-table/virtualization/constants/TableVirtualizationNumberOfOverscanPages.tsindex fb2cbc0f480..b716bacd0d5 100644--- a/packages/twenty-front/src/modules/object-record/record-table/virtualization/constants/TableVirtualizationNumberOfOverscanPages.ts+++ b/packages/twenty-front/src/modules/object-record/record-table/virtualization/constants/TableVirtualizationNumberOfOverscanPages.ts@@ -1 +1 @@-export const TABLE_VIRTUALIZATION_NUMBER_OF_OVERSCAN_PAGES = 5;+export const TABLE_VIRTUALIZATION_NUMBER_OF_OVERSCAN_PAGES = 7;diff --git a/packages/twenty-front/src/modules/object-record/record-table/virtualization/hooks/useProcessTreadmillScrollTop.ts b/packages/twenty-front/src/modules/object-record/record-table/virtualization/hooks/useProcessTreadmillScrollTop.tsindex 3ecae7dde8d..f775a4e8b19 100644--- a/packages/twenty-front/src/modules/object-record/record-table/virtualization/hooks/useProcessTreadmillScrollTop.ts+++ b/packages/twenty-front/src/modules/object-record/record-table/virtualization/hooks/useProcessTreadmillScrollTop.ts@@ -50,7 +50,7 @@ export const useProcessTreadmillScrollTop = () => {const numberOfRowsDisplayedInTable = Math.min(Math.floor(tableScrollWrapperHeight / (RECORD_TABLE_ROW_HEIGHT + 1)),- 30,+ 40,);const halfNumberOfRowsVisible = Math.floor(diff --git a/packages/twenty-front/src/modules/object-record/record-table/virtualization/utils/getVirtualizationOverscanWindow.ts b/packages/twenty-front/src/modules/object-record/record-table/virtualization/utils/getVirtualizationOverscanWindow.tsindex 342e26afdd8..041a97b11e8 100644--- a/packages/twenty-front/src/modules/object-record/record-table/virtualization/utils/getVirtualizationOverscanWindow.ts+++ b/packages/twenty-front/src/modules/object-record/record-table/virtualization/utils/getVirtualizationOverscanWindow.ts@@ -9,7 +9,7 @@ export const getVirtualizationOverscanWindow = () => {const numberOfRowsDisplayedInTable = Math.min(Math.floor(scrollWrapperHeight / (RECORD_TABLE_ROW_HEIGHT + 1)),- 30,+ 40,);const halfNumberOfRowsVisible = Math.floor(numberOfRowsDisplayedInTable / 2);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 739e31eb552..73c92b3df67 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@@ -4,33 +4,33 @@ import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtoimport { useRecordTitleCell } from '@/object-record/record-title-cell/hooks/useRecordTitleCell';import { type RecordTitleCellContainerType } from '@/object-record/record-title-cell/types/RecordTitleCellContainerType';import { getRecordFieldInputInstanceId } from '@/object-record/utils/getRecordFieldInputId';-import { withTheme, type Theme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledDiv = styled.div`background: inherit;border: none;- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.primary};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.primary};cursor: pointer;overflow: hidden;height: 24px;- padding: ${({ theme }) => theme.spacing(0, 1.25)};+ padding: ${themeCssVariables.spacing[0]} 5px;box-sizing: border-box;display: flex;align-items: center;justify-content: center;:hover {- background: ${({ theme }) => theme.background.transparent.light};+ background: ${themeCssVariables.background.transparent.light};}`;-const StyledEmptyText = withTheme(styled.div<{ theme: Theme }>`- color: ${({ theme }) => theme.font.color.tertiary};-`);+const StyledEmptyText = styled.div`+ color: ${themeCssVariables.font.color.tertiary};+`;export const RecordTitleCellSingleTextDisplayMode = ({containerType,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 0e2a66effc5..9e98d695a31 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@@ -2,22 +2,23 @@ import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContimport { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { type RecordTitleCellContainerType } from '@/object-record/record-title-cell/types/RecordTitleCellContainerType';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useContext } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledDiv = styled.div`align-items: center;background: inherit;border: none;- border-radius: ${({ theme }) => theme.border.radius.sm};+ border-radius: ${themeCssVariables.border.radius.sm};box-sizing: border-box;- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};display: flex;height: 24px;justify-content: center;overflow: hidden;- padding: ${({ theme }) => theme.spacing(0, 1.25)};+ padding: ${themeCssVariables.spacing[0]} 5px;`;export const RecordTitleCellUuidFieldDisplay = ({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 68365040272..76099fbeab7 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useEffect, useRef, useState, type ClipboardEvent } from 'react';import { Key } from 'ts-key-enum';@@ -9,12 +9,13 @@ 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 { splitFullName } from '~/utils/format/spiltFullName';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';const StyledContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};justify-content: inherit;width: 100%;`;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 559eb0e7ab3..951b2bd1153 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@@ -4,34 +4,34 @@ import { useRecordTitleCell } from '@/object-record/record-title-cell/hooks/useRimport { getRecordFieldInputInstanceId } from '@/object-record/utils/getRecordFieldInputId';import { usePushFocusItemToFocusStack } from '@/ui/utilities/focus/hooks/usePushFocusItemToFocusStack';import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';-import { withTheme, type Theme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';import { useContext } from 'react';import { OverflowingTextWithTooltip } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledDiv = styled.div`background: inherit;border: none;- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.primary};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.primary};cursor: pointer;overflow: hidden;height: 24px;- padding: ${({ theme }) => theme.spacing(0, 1.25)};+ padding: ${themeCssVariables.spacing[0]} 5px;box-sizing: border-box;display: flex;align-items: center;justify-content: center;:hover {- background: ${({ theme }) => theme.background.transparent.light};+ background: ${themeCssVariables.background.transparent.light};}`;-const StyledEmptyText = withTheme(styled.div<{ theme: Theme }>`- color: ${({ theme }) => theme.font.color.tertiary};-`);+const StyledEmptyText = styled.div`+ color: ${themeCssVariables.font.color.tertiary};+`;export const RecordTitleFullNameFieldDisplay = ({containerType,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 5721a5bbdad..702e6bb5084 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@@ -5,9 +5,10 @@ import { useUpdateMultipleRecordsActions } from '@/object-record/record-update-mimport { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { ShowPageContainer } from '@/ui/layout/page/components/ShowPageContainer';import { RightDrawerProvider } from '@/ui/layout/right-drawer/contexts/RightDrawerContext';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledShowPageRightContainer = styled.div`display: flex;@@ -21,8 +22,8 @@ const StyledShowPageRightContainer = styled.div`const StyledContentContainer = styled.div`flex: 1;overflow-y: auto;- background: ${({ theme }) => theme.background.primary};- padding-bottom: ${({ theme }) => theme.spacing(16)};+ background: ${themeCssVariables.background.primary};+ padding-bottom: ${themeCssVariables.spacing[16]};`;export type UpdateMultipleRecordsState = Record<string, any>;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 322cd3f12a2..22e70768f24 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@@ -2,8 +2,9 @@ import { computeProgressText } from '@/action-menu/utils/computeProgressText';import { SIDE_PANEL_FOCUS_ID } from '@/command-menu/constants/SidePanelFocusId';import { type ObjectRecordQueryProgress } from '@/object-record/types/ObjectRecordQueryProgress';import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { Key } from 'ts-key-enum';import { IconBoxMultiple } from 'twenty-ui/display';@@ -11,18 +12,18 @@ import { Button } from 'twenty-ui/input';const StyledFooterContainer = styled.div`align-items: flex-end;- background: ${({ theme }) => theme.background.primary};- border-top: 1px solid ${({ theme }) => theme.border.color.light};+ background: ${themeCssVariables.background.primary};+ border-top: 1px solid ${themeCssVariables.border.color.light};display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};justify-content: flex-end;- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};`;const StyledFooterActions = styled.div`display: flex;align-items: flex-end;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;type UpdateMultipleRecordsFooterProps = {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 473bbe6c9e9..03d39106147 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@@ -5,15 +5,16 @@ import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/isimport { type UpdateMultipleRecordsState } from '@/object-record/record-update-multiple/components/UpdateMultipleRecordsContainer';import { isUpdateRecordValueEmpty } from '@/object-record/record-update-multiple/utils/isUpdateRecordValueEmpty';import { shouldDisplayFormMultiEditField } from '@/object-record/record-update-multiple/utils/shouldDisplayFormMultiEditField';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { FieldMetadataType } from 'twenty-shared/types';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSection = styled(Section)`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(6)};- padding: ${({ theme }) => theme.spacing(4)} ${({ theme }) => theme.spacing(3)};+ gap: ${themeCssVariables.spacing[6]};+ padding: ${themeCssVariables.spacing[4]} ${themeCssVariables.spacing[3]};width: auto;`;diff --git a/packages/twenty-front/src/modules/page-layout/constants/PageLayoutBreakpoints.ts b/packages/twenty-front/src/modules/page-layout/constants/PageLayoutBreakpoints.tsindex 115d947c862..702c4f58cb9 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';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';export const PAGE_LAYOUT_CONFIG = {breakpoints: {diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountLoader.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountLoader.tsxindex 89c31e34cd8..fd14514b71e 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountLoader.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountLoader.tsx@@ -1,8 +1,9 @@+import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';-import { useTheme } from '@emotion/react';+import { ThemeContext } from 'twenty-ui/theme';export const SettingsAccountLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsxindex e634c2e471b..c30dd5cd103 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { zodResolver } from '@hookform/resolvers/zod';import { useEffect } from 'react';import { Controller, useForm } from 'react-hook-form';@@ -9,6 +9,7 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { useLingui } from '@lingui/react/macro';import { isValidHostname } from 'twenty-shared/utils';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`display: flex;@@ -17,7 +18,7 @@ const StyledContainer = styled.div`const StyledLinkContainer = styled.div`flex: 1;- margin-right: ${({ theme }) => theme.spacing(2)};+ margin-right: ${themeCssVariables.spacing[2]};`;type SettingsAccountsBlocklistInputProps = {diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTable.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTable.tsxindex e2862987977..0bc00b238da 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTable.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistTable.tsx@@ -4,8 +4,9 @@ import { Table } from '@/ui/layout/table/components/Table';import { TableBody } from '@/ui/layout/table/components/TableBody';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsAccountsBlocklistTableProps = {blocklist: BlocklistItem[];@@ -13,11 +14,11 @@ type SettingsAccountsBlocklistTableProps = {};const StyledTable = styled(Table)`- margin-top: ${({ theme }) => theme.spacing(4)};+ margin-top: ${themeCssVariables.spacing[4]};`;const StyledTableBody = styled(TableBody)`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;export const SettingsAccountsBlocklistTable = ({diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelDetails.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelDetails.tsxindex ad3927a09f4..84e2a877f90 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelDetails.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelDetails.tsx@@ -3,17 +3,18 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSiimport { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';import { SettingsAccountsEventVisibilitySettingsCard } from '@/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard';import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsOptions/SettingsOptionCardContentToggle';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Section } from '@react-email/components';import { H2Title, IconUserPlus } from 'twenty-ui/display';import { Card } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type CalendarChannelVisibility } from '~/generated/graphql';const StyledDetailsContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(6)};+ gap: ${themeCssVariables.spacing[6]};`;type SettingsAccountsCalendarChannelDetailsProps = {diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsContainer.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsContainer.tsxindex c88f63cab05..d794481b70e 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsContainer.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {type CalendarChannel,@@ -16,9 +16,10 @@ import { TabList } from '@/ui/layout/tab-list/components/TabList';import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import React from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCalenderContainer = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(6)};+ padding-bottom: ${themeCssVariables.spacing[6]};`;export const SettingsAccountsCalendarChannelsContainer = () => {diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsGeneral.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsGeneral.tsxindex 67668cb28bf..3142dadb8ea 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsGeneral.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarChannelsGeneral.tsx@@ -2,12 +2,13 @@ import { CalendarMonthCard } from '@/activities/calendar/components/CalendarMontimport { CalendarContext } from '@/activities/calendar/contexts/CalendarContext';import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';import { SettingsAccountsCalendarDisplaySettings } from '@/settings/accounts/components/SettingsAccountsCalendarDisplaySettings';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Section } from '@react-email/components';import { addMinutes, endOfDay, min, startOfDay } from 'date-fns';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { H2Title } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';import {CalendarChannelVisibility,type TimelineCalendarEvent,@@ -16,8 +17,8 @@ import {const StyledGeneralContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(6)};- padding-top: ${({ theme }) => theme.spacing(6)};+ gap: ${themeCssVariables.spacing[6]};+ padding-top: ${themeCssVariables.spacing[6]};`;export const SettingsAccountsCalendarChannelsGeneral = () => {diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarDisplaySettings.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarDisplaySettings.tsxindex 25f584a5f64..cfafd1aecf2 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarDisplaySettings.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarDisplaySettings.tsx@@ -1,15 +1,16 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useDateTimeFormat } from '@/localization/hooks/useDateTimeFormat';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';const StyledContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;export const SettingsAccountsCalendarDisplaySettings = () => {diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard.tsxindex ee3fbde653d..46f91951624 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCalendarVisibilitySettingsCard.tsx@@ -1,9 +1,10 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsAccountsRadioSettingsCard } from '@/settings/accounts/components/SettingsAccountsRadioSettingsCard';import { SettingsAccountsVisibilityIcon } from '@/settings/accounts/components/SettingsAccountsVisibilityIcon';import { msg } from '@lingui/core/macro';import { CalendarChannelVisibility } from '~/generated/graphql';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsAccountsEventVisibilitySettingsCardProps = {onChange: (nextValue: CalendarChannelVisibility) => void;@@ -11,7 +12,7 @@ type SettingsAccountsEventVisibilitySettingsCardProps = {};const StyledCardMedia = styled(SettingsAccountsVisibilityIcon)`- height: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};`;const eventSettingsVisibilityOptions = [diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCardMedia.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCardMedia.tsxindex 69f4e60e05e..a0ab6adcaeb 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCardMedia.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsCardMedia.tsx@@ -1,17 +1,18 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCardMedia = styled.div`align-items: center;- border: 2px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.light};+ border: 2px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.light};display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(0.5)};- height: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing['0.5']};+ height: ${themeCssVariables.spacing[8]};justify-content: center;- padding: ${({ theme }) => theme.spacing(0.5)};- width: ${({ theme }) => theme.spacing(6)};+ padding: ${themeCssVariables.spacing['0.5']};+ width: ${themeCssVariables.spacing[6]};`;export { StyledCardMedia as SettingsAccountsCardMedia };diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsListCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsListCard.tsxindex 8945cc4471f..4a1cd11b455 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsListCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsListCard.tsx@@ -3,7 +3,7 @@ import { SettingsAccountsListEmptyStateCard } from '@/settings/accounts/componenimport { SettingsConnectedAccountsTableHeader } from '@/settings/accounts/components/SettingsConnectedAccountsTableHeader';import { SettingsConnectedAccountsTableRow } from '@/settings/components/SettingsConnectedAccountsTableRow';import { Table } from '@/ui/layout/table/components/Table';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsPath } from 'twenty-shared/types';import { useLingui } from '@lingui/react/macro';@@ -11,18 +11,19 @@ import { IconPlus } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const StyledTableRows = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};`;const StyledAddAccountSection = styled(Section)`- border-top: 1px solid ${({ theme }) => theme.border.color.light};+ border-top: 1px solid ${themeCssVariables.border.color.light};display: flex;justify-content: flex-end;- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-top: ${themeCssVariables.spacing[2]};`;export const SettingsAccountsConnectedAccountsListCard = ({diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer.tsxindex 7b1d9e33a6c..4d9f6a157e4 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer.tsx@@ -2,14 +2,15 @@ import { type ConnectedAccount } from '@/accounts/types/ConnectedAccount';import { SettingsAccountsRowDropdownMenu } from '@/settings/accounts/components/SettingsAccountsRowDropdownMenu';import { SyncStatus } from '@/settings/accounts/constants/SyncStatus';import { computeSyncStatus } from '@/settings/accounts/utils/computeSyncStatus';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Status } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRowRightContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;export const SettingsAccountsConnectedAccountsRowRightContainer = ({diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsxindex 841af508a90..d4c60e44c7a 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { type Control, Controller } from 'react-hook-form';@@ -8,41 +8,41 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { type ConnectionFormData } from '@/settings/accounts/hooks/useImapSmtpCaldavConnectionForm';import { H2Title } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledFormContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(6)};+ gap: ${themeCssVariables.spacing[6]};`;const StyledConnectionSection = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledSectionHeader = styled.div`- margin-bottom: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${themeCssVariables.spacing[2]};`;const StyledSectionTitle = styled.h3`- color: ${({ theme }) => theme.font.color.primary};- font-size: ${({ theme }) => theme.font.size.md};- font-weight: ${({ theme }) => theme.font.weight.medium};+ color: ${themeCssVariables.font.color.primary};+ font-size: ${themeCssVariables.font.size.md};+ font-weight: ${themeCssVariables.font.weight.medium};margin: 0;- margin-bottom: ${({ theme }) => theme.spacing(1)};+ margin-bottom: ${themeCssVariables.spacing[1]};`;const StyledSectionDescription = styled.p`- color: ${({ theme }) => theme.font.color.tertiary};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.sm};margin: 0;`;const StyledFieldRow = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(3)};+ gap: ${themeCssVariables.spacing[3]};@media (max-width: ${MOBILE_VIEWPORT}px) {flex-direction: column;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsEditImapSmtpCaldavConnection.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsEditImapSmtpCaldavConnection.tsxindex 2e0712a888e..72202b8ee61 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsEditImapSmtpCaldavConnection.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsEditImapSmtpCaldavConnection.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { FormProvider } from 'react-hook-form';import { useParams } from 'react-router-dom';diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsListEmptyStateCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsListEmptyStateCard.tsxindex 91cacff9d61..4a3e46c2cbe 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsListEmptyStateCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsListEmptyStateCard.tsx@@ -5,26 +5,28 @@ import { isMicrosoftCalendarEnabledState } from '@/client-config/states/isMicrosimport { isMicrosoftMessagingEnabledState } from '@/client-config/states/isMicrosoftMessagingEnabledState';import { useTriggerApisOAuth } from '@/settings/accounts/hooks/useTriggerApiOAuth';import { SettingsCard } from '@/settings/components/SettingsCard';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { useLingui } from '@lingui/react/macro';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { ConnectedAccountProvider, SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconAt, IconGoogle, IconMicrosoft } from 'twenty-ui/display';import { UndecoratedLink } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCardsContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;export const SettingsAccountsListEmptyStateCard = () => {const { triggerApisOAuth } = useTriggerApisOAuth();const { t } = useLingui();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isGoogleMessagingEnabled = useAtomStateValue(isGoogleMessagingEnabledState,diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon.tsxindex d628f347c9d..8307e68e1fa 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon.tsx@@ -1,6 +1,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsAccountsCardMedia } from '@/settings/accounts/components/SettingsAccountsCardMedia';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsAccountsMessageAutoCreationIconProps = {className?: string;@@ -13,8 +14,10 @@ const StyledIconContainer = styled(SettingsAccountsCardMedia)``;const StyledDirectionSkeleton = styled.div<{ isActive?: boolean }>`- background-color: ${({ isActive, theme }) =>- isActive ? theme.accent.accent4060 : theme.background.quaternary};+ background-color: ${({ isActive }) =>+ isActive+ ? themeCssVariables.accent.accent4060+ : themeCssVariables.background.quaternary};border-radius: 1px;height: 24px;`;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelDetails.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelDetails.tsxindex 53a8cffbb1d..edf18c2222e 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelDetails.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelDetails.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {type MessageChannel,@@ -14,6 +14,7 @@ import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsOimport { t } from '@lingui/core/macro';import { H2Title, IconBriefcase, IconUsers } from 'twenty-ui/display';import { Card, Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type MessageChannelVisibility } from '~/generated/graphql';type SettingsAccountsMessageChannelDetailsProps = {@@ -33,7 +34,7 @@ type SettingsAccountsMessageChannelDetailsProps = {const StyledDetailsContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(6)};+ gap: ${themeCssVariables.spacing[6]};`;export const SettingsAccountsMessageChannelDetails = ({@@ -98,7 +99,7 @@ export const SettingsAccountsMessageChannelDetails = ({<Section><H2Titletitle={t`Import`}- description={t`Emails from the blocklist will be ignored. Manage blocklist on the “Accounts” setting page.`}+ description={t`Emails from the blocklist will be ignored. Manage blocklist on the "Accounts" setting page.`}/><SettingsAccountsMessageFolderCardonChange={handleMessageFolderImportPolicyChange}diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelsContainer.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelsContainer.tsxindex e5006b57080..da0a925621c 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelsContainer.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageChannelsContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ConnectedAccount } from '@/accounts/types/ConnectedAccount';import {@@ -20,9 +20,10 @@ import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import React, { useCallback } from 'react';import { isDefined } from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledMessageContainer = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(6)};+ padding-bottom: ${themeCssVariables.spacing[6]};`;export const SettingsAccountsMessageChannelsContainer = () => {diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageFolderIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageFolderIcon.tsxindex 92af0a5620e..b78110137c7 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,8 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { MessageFolderImportPolicy } from '@/accounts/types/MessageChannel';import { SettingsAccountsCardMedia } from '@/settings/accounts/components/SettingsAccountsCardMedia';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsAccountsMessageFolderIconProps = {className?: string;@@ -20,16 +21,20 @@ const StyledFolderRow = styled.div``;const StyledFolderIcon = styled.div<{ isDisabled?: boolean }>`- background-color: ${({ isDisabled, theme }) =>- isDisabled ? theme.background.quaternary : theme.accent.accent4060};+ background-color: ${({ isDisabled }) =>+ isDisabled+ ? themeCssVariables.background.quaternary+ : themeCssVariables.accent.accent4060};border-radius: 1px;height: 5px;width: 5px;`;const StyledFolderLabel = styled.div<{ isDisabled?: boolean }>`- background-color: ${({ isDisabled, theme }) =>- isDisabled ? theme.background.quaternary : theme.accent.accent4060};+ background-color: ${({ isDisabled }) =>+ isDisabled+ ? themeCssVariables.background.quaternary+ : themeCssVariables.accent.accent4060};border-radius: 1px;flex: 1;height: 5px;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsRadioSettingsCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsRadioSettingsCard.tsxindex 78568218574..70b366cbe51 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsRadioSettingsCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsRadioSettingsCard.tsx@@ -1,9 +1,10 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type MessageDescriptor } from '@lingui/core';import { Trans } from '@lingui/react';import { type ReactNode } from 'react';import { Radio } from 'twenty-ui/input';import { Card, CardContent } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsAccountsRadioSettingsCardProps<Option extends { value: string }> ={@@ -17,25 +18,25 @@ const StyledCardContent = styled(CardContent)`cursor: pointer;&:hover {- background: ${({ theme }) => theme.background.transparent.lighter};+ background: ${themeCssVariables.background.transparent.lighter};}`;const StyledOptionHeader = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;const StyledTitle = styled.div`- color: ${({ theme }) => theme.font.color.primary};- font-weight: ${({ theme }) => theme.font.weight.medium};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ font-weight: ${themeCssVariables.font.weight.medium};+ margin-bottom: ${themeCssVariables.spacing[2]};`;const StyledDescription = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.sm};`;const StyledRadio = styled(Radio)`@@ -43,7 +44,7 @@ const StyledRadio = styled(Radio)``;const StyledExpandedContent = styled.div`- margin-top: ${({ theme }) => theme.spacing(4)};+ margin-top: ${themeCssVariables.spacing[4]};`;export const SettingsAccountsRadioSettingsCard = <diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsxindex 8adf48c1b8d..06c042a6724 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsx@@ -1,19 +1,20 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsCard } from '@/settings/components/SettingsCard';-import { useTheme } from '@emotion/react';+import { useContext } from 'react';import { useLingui } from '@lingui/react/macro';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { H2Title, IconCalendarEvent, IconMailCog } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';import { UndecoratedLink } from 'twenty-ui/navigation';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledCardsContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(4)};- margin-top: ${({ theme }) => theme.spacing(6)};+ gap: ${themeCssVariables.spacing[4]};+ margin-top: ${themeCssVariables.spacing[6]};@media (max-width: ${MOBILE_VIEWPORT}pxF) {flex-direction: column;@@ -22,7 +23,7 @@ const StyledCardsContainer = styled.div`export const SettingsAccountsSettingsSection = () => {const { t } = useLingui();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<Section><H2Titlediff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsToggleSettingCard.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsToggleSettingCard.tsxindex c4b5ff4d0fd..661d98b5952 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsToggleSettingCard.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsToggleSettingCard.tsx@@ -1,6 +1,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Card, CardContent } from 'twenty-ui/layout';import { Toggle } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';type Parameter = {value: boolean;@@ -16,23 +17,23 @@ type SettingsAccountsToggleSettingCardProps = {const StyledCardContent = styled(CardContent)`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};cursor: pointer;&:hover {- background: ${({ theme }) => theme.background.transparent.lighter};+ background: ${themeCssVariables.background.transparent.lighter};}`;const StyledTitle = styled.div`- color: ${({ theme }) => theme.font.color.primary};- font-weight: ${({ theme }) => theme.font.weight.medium};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ font-weight: ${themeCssVariables.font.weight.medium};+ margin-bottom: ${themeCssVariables.spacing[2]};`;const StyledDescription = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.sm};`;const StyledToggle = styled(Toggle)`diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsVisibilityIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsVisibilityIcon.tsxindex 5931d828ec0..de9f7e676c0 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,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsAccountsCardMedia } from '@/settings/accounts/components/SettingsAccountsCardMedia';+import { themeCssVariables } from 'twenty-ui/theme-constants';type VisibilityElementState = 'active' | 'inactive';@@ -16,18 +17,20 @@ const StyledCardMedia = styled(SettingsAccountsCardMedia)``;const StyledSubjectSkeleton = styled.div<{ isActive?: boolean }>`- background-color: ${({ isActive, theme }) =>- isActive ? theme.accent.accent4060 : theme.background.quaternary};+ background-color: ${({ isActive }) =>+ isActive+ ? themeCssVariables.accent.accent4060+ : themeCssVariables.background.quaternary};border-radius: 1px;height: 3px;`;const StyledMetadataSkeleton = styled(StyledSubjectSkeleton)`- margin-right: ${({ theme }) => theme.spacing(2)};+ margin-right: ${themeCssVariables.spacing[2]};`;const StyledBodySkeleton = styled(StyledSubjectSkeleton)`- border-radius: ${({ theme }) => theme.border.radius.xs};+ border-radius: ${themeCssVariables.border.radius.xs};flex: 1 0 auto;`;diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountIcon.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountIcon.tsxindex 9cf27dea3ee..9ccd7296b93 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountIcon.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountIcon.tsx@@ -1,5 +1,5 @@import { type ConnectedAccount } from '@/accounts/types/ConnectedAccount';-import { useTheme } from '@emotion/react';+import { useContext } from 'react';import { ConnectedAccountProvider } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import {@@ -12,11 +12,12 @@ import {IconMicrosoft,IconSend,} from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';const ImapSmtpCaldavIcon = (props: IconComponentProps & { account: ConnectedAccount },) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 771c507f628..4a74608151e 100644--- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountsTableHeader.tsx+++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsConnectedAccountsTableHeader.tsx@@ -1,11 +1,12 @@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 styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTableHeader = styled(TableHeader)`- padding-right: ${({ theme }) => theme.spacing(14)};+ padding-right: ${themeCssVariables.spacing[14]};`;export const SettingsConnectedAccountsTableHeader = () => {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 0b9f1c134ed..d5d5e8de39c 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@@ -1,11 +1,12 @@import { type MessageFolder } from '@/accounts/types/MessageFolder';-import { useTheme } from '@emotion/react';+import { useContext } from 'react';import {IconFolder,IconFolderRoot,IconInbox,IconSend,} from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';type SettingsAccountsMessageFolderIconProps = {folder: MessageFolder;@@ -16,7 +17,7 @@ export const SettingsAccountsMessageFolderIcon = ({folder,isChildFolder = false,}: SettingsAccountsMessageFolderIconProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 d54f9554026..0e30fbebc9d 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@@ -15,13 +15,14 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { Table } from '@/ui/layout/table/components/Table';import { TableCell } from '@/ui/layout/table/components/TableCell';import { ApolloError } from '@apollo/client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useMemo, useState } from 'react';import { Label } from 'twenty-ui/display';import { Checkbox, CheckboxSize } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTreeList = styled.ul`list-style: none;@@ -32,38 +33,38 @@ const StyledTreeList = styled.ul`const StyledFoldersContainer = styled.div`max-height: 400px;overflow-y: auto;- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};`;const StyledSearchInput = styled(SettingsTextInput)`- margin-bottom: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${themeCssVariables.spacing[2]};width: 100%;`;const StyledCheckboxCell = styled(TableCell)`align-items: center;display: flex;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};justify-content: flex-end;`;const StyledSectionHeader = styled.div`align-items: center;- background-color: ${({ theme }) => theme.background.transparent.lighter};- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};cursor: pointer;display: flex;- height: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};justify-content: space-between;- padding-left: ${({ theme }) => theme.spacing(1)};+ padding-left: ${themeCssVariables.spacing[1]};text-align: left;`;const StyledLabel = styled(Label)`- color: ${({ theme }) => theme.font.color.tertiary};- margin-bottom: ${({ theme }) => theme.spacing(2)};- margin-top: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.tertiary};+ margin-bottom: ${themeCssVariables.spacing[2]};+ margin-top: ${themeCssVariables.spacing[2]};`;export const SettingsAccountsMessageFoldersCard = () => {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 7b0ded26c2e..ac67b0c62cb 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,4 +1,5 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const BREADCRUMB_WIDTH = 24;const ICON_CENTER_OFFSET = 8;@@ -22,8 +23,8 @@ const StyledAncestorLine = styled.div<{index: number;showLine: boolean;}>`- background: ${({ theme, showLine }) =>- showLine ? theme.border.color.strong : 'transparent'};+ background: ${({ showLine }) =>+ showLine ? themeCssVariables.border.color.strong : 'transparent'};height: 28px;left: ${({ index }) => index * BREADCRUMB_WIDTH + ICON_CENTER_OFFSET}px;position: absolute;@@ -40,7 +41,7 @@ const StyledBreadcrumbConnector = styled.div<{ depth: number }>``;const StyledVerticalLineTop = styled.div`- background: ${({ theme }) => theme.border.color.strong};+ background: ${themeCssVariables.border.color.strong};height: 12px;left: 0;position: absolute;@@ -49,9 +50,9 @@ const StyledVerticalLineTop = styled.div``;const StyledRoundedCorner = styled.div`- border-bottom: 1px solid ${({ theme }) => theme.border.color.strong};+ border-bottom: 1px solid ${themeCssVariables.border.color.strong};border-bottom-left-radius: 4px;- border-left: 1px solid ${({ theme }) => theme.border.color.strong};+ border-left: 1px solid ${themeCssVariables.border.color.strong};height: 8px;left: 0;position: absolute;@@ -60,7 +61,7 @@ const StyledRoundedCorner = styled.div``;const StyledVerticalLineBottom = styled.div`- background: ${({ theme }) => theme.border.color.strong};+ background: ${themeCssVariables.border.color.strong};height: 16px;left: 0;position: absolute;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 277b787b3b5..57d299e6fb5 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@@ -1,21 +1,23 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { t } from '@lingui/core/macro';import { IconFolder } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledEmptyState = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[8]};text-align: center;`;export const SettingsMessageFoldersEmptyStateCard = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<Section>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 95340af8b0a..f08c6e3a893 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,27 +1,29 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSkeletonContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(1)};- padding: ${({ theme }) => theme.spacing(2)} 0;+ gap: ${themeCssVariables.spacing[1]};+ padding: ${themeCssVariables.spacing[2]} 0;`;const StyledSkeletonRow = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[1]};`;const StyledSkeletonFolderInfo = styled.div`align-items: center;display: flex;flex: 1;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const SKELETON_ROWS = [@@ -34,7 +36,7 @@ const SKELETON_ROWS = [];export const SettingsMessageFoldersSkeletonLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<SkeletonThemediff --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 dbf5e3459d6..fa566a85431 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@@ -5,11 +5,12 @@ import { type MessageFolderTreeNode } from '@/settings/accounts/components/messaimport { countNestedFolders } from '@/settings/accounts/components/message-folders/utils/countNestedFolders';import { formatFolderName } from '@/settings/accounts/components/message-folders/utils/formatFolderName';import { isFolderTreePartiallySelected } from '@/settings/accounts/components/message-folders/utils/isFolderTreePartiallySelected';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';import { IconChevronDown, IconChevronUp } from 'twenty-ui/display';import { Checkbox, CheckboxSize } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsMessageFoldersTreeItemProps = {depth?: number;@@ -35,7 +36,7 @@ const StyledCollapsibleWrapper = styled.div<{ isExpanded: boolean }>`display: grid;grid-template-rows: ${({ isExpanded }) => (isExpanded ? '1fr' : '0fr')};transition: grid-template-rows- ${({ theme }) => theme.animation.duration.fast}s ease-out;+ calc(${themeCssVariables.animation.duration.fast} * 1s) ease-out;`;const StyledCollapsibleContent = styled.div`@@ -44,17 +45,17 @@ const StyledCollapsibleContent = styled.div`const StyledTreeItemContent = styled.div<{ depth: number }>`align-items: center;- border-radius: ${({ theme }) => theme.border.radius.sm};+ border-radius: ${themeCssVariables.border.radius.sm};cursor: pointer;display: flex;height: 28px;padding-left: ${({ depth }) => depth * BREADCRUMB_WIDTH}px;transition: background-color- ${({ theme }) => theme.animation.duration.instant}s;+ calc(${themeCssVariables.animation.duration.instant} * 1s);user-select: none;&:hover {- background-color: ${({ theme }) => theme.background.transparent.lighter};+ background-color: ${themeCssVariables.background.transparent.lighter};}`;@@ -62,23 +63,23 @@ const StyledFolderContent = styled.div`align-items: center;display: flex;flex: 1;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};min-width: 0;- padding-left: ${({ theme }) => theme.spacing(1)};- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-left: ${themeCssVariables.spacing[1]};+ padding-right: ${themeCssVariables.spacing[1]};`;const StyledFolderInfo = styled.div`align-items: center;display: flex;flex: 1;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};min-width: 0;`;const StyledFolderName = styled.span`- color: ${({ theme }) => theme.font.color.primary};- font-size: ${({ theme }) => theme.font.size.md};+ color: ${themeCssVariables.font.color.primary};+ font-size: ${themeCssVariables.font.size.md};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;@@ -88,14 +89,14 @@ const StyledRightSection = styled.div`align-items: center;display: flex;flex-shrink: 0;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};margin-left: auto;`;const StyledChildCount = styled.span`- color: ${({ theme }) => theme.font.color.tertiary};- font-size: ${({ theme }) => theme.font.size.sm};- min-width: ${({ theme }) => theme.spacing(3)};+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.sm};+ min-width: ${themeCssVariables.spacing[3]};text-align: right;`;@@ -103,16 +104,16 @@ const StyledExpandButton = styled.button`align-items: center;background: none;border: none;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};cursor: pointer;display: flex;- height: ${({ theme }) => theme.spacing(4)};+ height: ${themeCssVariables.spacing[4]};justify-content: center;padding: 0;- width: ${({ theme }) => theme.spacing(4)};+ width: ${themeCssVariables.spacing[4]};&:hover {- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};}`;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 00eb5e781c4..2f88eeaa914 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@@ -1,5 +1,5 @@import { useState } from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useClientConfig } from '@/client-config/hooks/useClientConfig';import { GET_ADMIN_AI_MODELS } from '@/settings/admin-panel/ai/graphql/queries/getAdminAiModels';@@ -21,6 +21,7 @@ import {import { Button } from 'twenty-ui/input';import { Card, Section } from 'twenty-ui/layout';import { MenuItemToggle } from 'twenty-ui/navigation';+import { themeCssVariables } from 'twenty-ui/theme-constants';import {useCreateDatabaseConfigVariableMutation,useGetAdminAiModelsQuery,@@ -31,8 +32,8 @@ import { getModelProviderLabel } from '~/pages/settings/ai/utils/getModelProvideconst StyledSearchAndFilterContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[2]};width: 100%;`;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 a7388223073..0a43cd7d797 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@@ -5,7 +5,7 @@ import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { TabList } from '@/ui/layout/tab-list/components/TabList';import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceLogo';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';@@ -30,12 +30,13 @@ import {} from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`align-items: center;display: flex;flex-direction: row;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;export const SettingsAdminGeneral = () => {diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTabSkeletonLoader.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTabSkeletonLoader.tsxindex 0ee92eb678c..7b5a77231c1 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTabSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTabSkeletonLoader.tsx@@ -1,10 +1,11 @@-import { useTheme } from '@emotion/react';+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';export const SettingsAdminTabSkeletonLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTableCard.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTableCard.tsxindex c0041d999f4..de62a1a47ff 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTableCard.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminTableCard.tsx@@ -2,28 +2,30 @@ import { Table } from '@/ui/layout/table/components/Table';import { TableBody } from '@/ui/layout/table/components/TableBody';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { type IconComponent } from 'twenty-ui/display';import { Card } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCard = styled(Card)`- background-color: ${({ theme }) => theme.background.secondary};- border: 1px solid ${({ theme }) => theme.border.color.medium};+ background-color: ${themeCssVariables.background.secondary};+ border: 1px solid ${themeCssVariables.border.color.medium};`;const StyledTableRow = styled(TableRow)`- height: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};`;const StyledTableCellLabel = styled(TableCell)<{align?: 'left' | 'center' | 'right';}>`- color: ${({ theme }) => theme.font.color.tertiary};- height: ${({ theme }) => theme.spacing(6)};+ color: ${themeCssVariables.font.color.tertiary};+ height: ${themeCssVariables.spacing[6]};display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};justify-content: ${({ align }) =>align === 'right'? 'flex-end'@@ -36,9 +38,9 @@ const StyledTableCellValue = styled(TableCell)<{align?: 'left' | 'center' | 'right';clickable?: boolean;}>`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};cursor: ${({ clickable }) => (clickable ? 'pointer' : 'default')};- height: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};justify-content: ${({ align }) =>align === 'left'? 'flex-start'@@ -71,7 +73,7 @@ export const SettingsAdminTableCard = ({valueAlign = 'left',className,}: SettingsAdminTableCardProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledCard rounded={rounded} className={className}>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 076e074e7f7..7739aa954c6 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,5 +1,6 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsAdminVersionDisplayProps = {version: string | undefined | null;@@ -9,23 +10,23 @@ type SettingsAdminVersionDisplayProps = {const StyledActionLink = styled.a`align-items: center;- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};display: flex;- font-size: ${({ theme }) => theme.font.size.sm};- font-weight: ${({ theme }) => theme.font.weight.regular};- gap: ${({ theme }) => theme.spacing(1)};+ font-size: ${themeCssVariables.font.size.sm};+ font-weight: ${themeCssVariables.font.weight.regular};+ gap: ${themeCssVariables.spacing[1]};text-decoration: none;:hover {- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};cursor: pointer;}`;const StyledSpan = styled.span`- color: ${({ theme }) => theme.font.color.primary};- font-size: ${({ theme }) => theme.font.size.sm};- font-weight: ${({ theme }) => theme.font.weight.regular};+ color: ${themeCssVariables.font.color.primary};+ font-size: ${themeCssVariables.font.size.sm};+ font-weight: ${themeCssVariables.font.weight.regular};`;export const SettingsAdminVersionDisplay = ({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 0147c9c5228..bcddd31bb10 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@@ -15,7 +15,7 @@ import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceLogo';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isNonEmptyString } from '@sniptt/guards';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -33,6 +33,7 @@ import {} from 'twenty-ui/display';import { Button, Toggle } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { REACT_APP_SERVER_BASE_URL } from '~/config';import {type FeatureFlagKey,@@ -47,12 +48,12 @@ type SettingsAdminWorkspaceContentProps = {const StyledContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(3)};- margin-top: ${({ theme }) => theme.spacing(6)};+ gap: ${themeCssVariables.spacing[3]};+ margin-top: ${themeCssVariables.spacing[6]};`;const StyledButtonContainer = styled.div`- margin-top: ${({ theme }) => theme.spacing(3)};+ margin-top: ${themeCssVariables.spacing[3]};`;export const SettingsAdminWorkspaceContent = ({diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableFilterContainer.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableFilterContainer.tsxindex adccb7a45d4..04c87328c8b 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableFilterContainer.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableFilterContainer.tsx@@ -1,6 +1,6 @@import { type ConfigVariableSourceFilter } from '@/settings/admin-panel/config-variables/types/ConfigVariableSourceFilter';import { SortOrFilterChip } from '@/views/components/SortOrFilterChip';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledChipContainer = styled.div`display: flex;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 b41eb14993e..c6636011aff 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@@ -1,16 +1,17 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';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 {ConfigSource,type ConfigVariable,} from '~/generated-metadata/graphql';const StyledHelpText = styled.div<{ color?: string }>`- color: ${({ theme, color }) => color || theme.font.color.tertiary};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.sm};line-height: 1.5;`;diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableOptionsDropdownContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableOptionsDropdownContent.tsxindex 757f25ed328..cf3d3faab35 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableOptionsDropdownContent.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableOptionsDropdownContent.tsx@@ -8,11 +8,12 @@ import { DropdownMenuHeader } from '@/ui/layout/dropdown/components/DropdownMenuimport { DropdownMenuHeaderLeftComponent } from '@/ui/layout/dropdown/components/DropdownMenuHeader/internal/DropdownMenuHeaderLeftComponent';import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';-import { useTheme } from '@emotion/react';import { t } from '@lingui/core/macro';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { useContext } from 'react';import { IconChevronLeft, IconEye, IconEyeOff } from 'twenty-ui/display';import { MenuItem, MenuItemSelectTag } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';type ConfigVariableOptionsDropdownContentProps = {selectedCategory: ConfigVariableFilterCategory | null;@@ -37,7 +38,7 @@ export const ConfigVariableOptionsDropdownContent = ({onGroupFilterChange,onShowHiddenChange,}: ConfigVariableOptionsDropdownContentProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isConfigVariablesInDbEnabled = useAtomStateValue(isConfigVariablesInDbEnabledState,diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableSearchInput.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableSearchInput.tsxindex 7fc466c9e3d..3df590bf52b 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableSearchInput.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableSearchInput.tsx@@ -1,5 +1,5 @@import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { IconSearch } from 'twenty-ui/display';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableValueInput.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableValueInput.tsxindex 7c5e9898aee..5de37dffa97 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableValueInput.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableValueInput.tsx@@ -2,7 +2,7 @@ import { useLingui } from '@lingui/react/macro';import { isConfigVariablesInDbEnabledState } from '@/client-config/states/isConfigVariablesInDbEnabledState';import { TextInput } from '@/ui/input/components/TextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { type ConfigVariableValue } from 'twenty-shared/types';import { type ConfigVariable } from '~/generated-metadata/graphql';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsxindex 244101cfc00..6fb4af8d8f4 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx@@ -6,7 +6,7 @@ import { CONFIG_VARIABLE_SOURCE_OPTIONS } from '@/settings/admin-panel/config-vaimport { configVariableGroupFilterState } from '@/settings/admin-panel/config-variables/states/configVariableGroupFilterState';import { configVariableSourceFilterState } from '@/settings/admin-panel/config-variables/states/configVariableSourceFilterState';import { showHiddenGroupVariablesState } from '@/settings/admin-panel/config-variables/states/showHiddenGroupVariablesState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useMemo, useState } from 'react';import { H2Title } from 'twenty-ui/display';diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariablesRow.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariablesRow.tsxindex 3317112b80c..88958ad9de8 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariablesRow.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariablesRow.tsx@@ -1,10 +1,12 @@import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconChevronRight } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type ConfigVariable } from '~/generated-metadata/graphql';type SettingsAdminConfigVariablesRowProps = {@@ -20,7 +22,7 @@ const StyledTruncatedCell = styled(TableCell)`const StyledTableRow = styled(TableRow)`&:hover {- background-color: ${({ theme }) => theme.background.transparent.light};+ background-color: ${themeCssVariables.background.transparent.light};}`;@@ -33,7 +35,7 @@ const StyledEllipsisLabel = styled.div`export const SettingsAdminConfigVariablesRow = ({variable,}: SettingsAdminConfigVariablesRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const displayValue =variable.value === ''diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariablesTable.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariablesTable.tsxindex 8f18365f3dc..8402c74cc39 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariablesTable.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariablesTable.tsx@@ -4,11 +4,12 @@ import { Table } from '@/ui/layout/table/components/Table';import { TableBody } from '@/ui/layout/table/components/TableBody';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type ConfigVariable } from '~/generated-metadata/graphql';const StyledTableBody = styled(TableBody)`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;type SettingsAdminConfigVariablesTableProps = {diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/utils/useSourceContent.ts b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/utils/useSourceContent.tsindex 24d8f8a443b..3fcb976f2d7 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/utils/useSourceContent.ts+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/utils/useSourceContent.ts@@ -1,12 +1,13 @@-import { useTheme } from '@emotion/react';import { useLingui } from '@lingui/react/macro';+import { useContext } from 'react';import { CustomError } from 'twenty-shared/utils';+import { ThemeContext } from 'twenty-ui/theme';import { ConfigSource } from '~/generated-metadata/graphql';export const useSourceContent = (source: ConfigSource) => {const { t } = useLingui();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);switch (source) {case ConfigSource.DATABASE: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 ea2180c35f4..a4a1a3bbd33 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@@ -1,19 +1,20 @@import { SettingsAdminHealthAccountSyncCountersTable } from '@/settings/admin-panel/health-status/components/SettingsAdminHealthAccountSyncCountersTable';import { SettingsAdminIndicatorHealthContext } from '@/settings/admin-panel/health-status/contexts/SettingsAdminIndicatorHealthContext';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { AdminPanelHealthServiceStatus } from '~/generated-metadata/graphql';const StyledErrorMessage = styled.div`- color: ${({ theme }) => theme.color.red};- margin-top: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.color.red};+ margin-top: ${themeCssVariables.spacing[2]};`;const StyledContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[8]};`;export const SettingsAdminConnectedAccountHealthStatus = () => {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 b33b2f6ba19..0de3d9bda3d 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@@ -1,12 +1,13 @@import { SettingsAdminTableCard } from '@/settings/admin-panel/components/SettingsAdminTableCard';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { H2Title } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSettingsAdminTableCard = styled(SettingsAdminTableCard)`- padding-left: ${({ theme }) => theme.spacing(2)};- padding-right: ${({ theme }) => theme.spacing(2)};+ padding-left: ${themeCssVariables.spacing[2]};+ padding-right: ${themeCssVariables.spacing[2]};`;export const SettingsAdminHealthAccountSyncCountersTable = ({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 e8ebf36a07d..ff61b84f9a0 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@@ -1,5 +1,5 @@import { SettingsListCard } from '@/settings/components/SettingsListCard';-import { useTheme } from '@emotion/react';+import { useContext } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import {@@ -10,6 +10,7 @@ import {IconTool,IconUserCircle,} from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';import {HealthIndicatorId,type SystemHealthService,@@ -32,7 +33,7 @@ export const SettingsAdminHealthStatusListCard = ({services: Array<SystemHealthService>;loading?: boolean;}) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 5ed6d536f97..3a96ed2404e 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@@ -1,7 +1,8 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { JsonTree } from 'twenty-ui/json-visualizer';import { AnimatedExpandableContainer } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type QueueJob } from '~/generated-metadata/graphql';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';@@ -11,13 +12,13 @@ type SettingsAdminJobDetailsExpandableProps = {};const StyledDetailsContainer = styled.div`- background-color: ${({ theme }) => theme.background.secondary};- border-top: 1px solid ${({ theme }) => theme.border.color.medium};- padding: ${({ theme }) => theme.spacing(4)};+ background-color: ${themeCssVariables.background.secondary};+ border-top: 1px solid ${themeCssVariables.border.color.medium};+ padding: ${themeCssVariables.spacing[4]};`;const StyledSection = styled.div`- margin-bottom: ${({ theme }) => theme.spacing(4)};+ margin-bottom: ${themeCssVariables.spacing[4]};&:last-child {margin-bottom: 0;@@ -25,35 +26,35 @@ const StyledSection = styled.div``;const StyledSectionTitle = styled.div`- color: ${({ theme }) => theme.font.color.secondary};- font-size: ${({ theme }) => theme.font.size.sm};- font-weight: ${({ theme }) => theme.font.weight.medium};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.secondary};+ font-size: ${themeCssVariables.font.size.sm};+ font-weight: ${themeCssVariables.font.weight.medium};+ margin-bottom: ${themeCssVariables.spacing[2]};`;const StyledPreformattedText = styled.pre`- background-color: ${({ theme }) => theme.background.primary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.danger};- font-family: ${({ theme }) => theme.font.family};- font-size: ${({ theme }) => theme.font.size.sm};+ background-color: ${themeCssVariables.background.primary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.danger};+ font-family: ${themeCssVariables.font.family};+ font-size: ${themeCssVariables.font.size.sm};margin: 0;max-height: 300px;overflow: auto;- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};white-space: pre-wrap;word-break: break-word;`;const StyledLogEntry = styled.div`- background-color: ${({ theme }) => theme.background.primary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};- font-family: ${({ theme }) => theme.font.family};- font-size: ${({ theme }) => theme.font.size.sm};- margin-bottom: ${({ theme }) => theme.spacing(1)};- padding: ${({ theme }) => theme.spacing(2)};+ background-color: ${themeCssVariables.background.primary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};+ font-family: ${themeCssVariables.font.family};+ font-size: ${themeCssVariables.font.size.sm};+ margin-bottom: ${themeCssVariables.spacing[1]};+ padding: ${themeCssVariables.spacing[2]};`;export const SettingsAdminJobDetailsExpandable = ({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 5395bbb2640..1197559af03 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,5 +1,6 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Tag, type TagColor } from 'twenty-ui/components';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { JobState } from '~/generated-metadata/graphql';type SettingsAdminJobStateBadgeProps = {@@ -20,17 +21,17 @@ const JOB_STATE_COLORS: Record<JobState, TagColor> = {const StyledContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledAttemptBadge = styled.span`- background-color: ${({ theme }) => theme.background.danger};- border: 1px solid ${({ theme }) => theme.border.color.danger};- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.danger};- font-size: ${({ theme }) => theme.font.size.xs};- font-weight: ${({ theme }) => theme.font.weight.medium};- padding: ${({ theme }) => `${theme.spacing(0.5)} ${theme.spacing(1)}`};+ background-color: ${themeCssVariables.background.danger};+ border: 1px solid ${themeCssVariables.border.color.danger};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.danger};+ font-size: ${themeCssVariables.font.size.xs};+ font-weight: ${themeCssVariables.font.weight.medium};+ padding: ${themeCssVariables.spacing['0.5']} ${themeCssVariables.spacing[1]};white-space: nowrap;`;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 ae61779a12c..1b24e8d2535 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@@ -1,25 +1,26 @@import { SettingsAdminIndicatorHealthContext } from '@/settings/admin-panel/health-status/contexts/SettingsAdminIndicatorHealthContext';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useContext } from 'react';import { JsonTree } from 'twenty-ui/json-visualizer';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { AdminPanelHealthServiceStatus } from '~/generated-metadata/graphql';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledDetailsContainer = styled.div`- background-color: ${({ theme }) => theme.background.secondary};- padding: ${({ theme }) => theme.spacing(4)};- border-radius: ${({ theme }) => theme.border.radius.md};- border: 1px solid ${({ theme }) => theme.border.color.medium};- font-size: ${({ theme }) => theme.font.size.sm};+ background-color: ${themeCssVariables.background.secondary};+ padding: ${themeCssVariables.spacing[4]};+ border-radius: ${themeCssVariables.border.radius.md};+ border: 1px solid ${themeCssVariables.border.color.medium};+ font-size: ${themeCssVariables.font.size.sm};overflow-x: auto;`;const StyledErrorMessage = styled.div`- color: ${({ theme }) => theme.color.red};- margin-top: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(4)};+ color: ${themeCssVariables.color.red};+ margin-top: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[4]};`;export const SettingsAdminJsonDataIndicatorHealthStatus = () => {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 811aa043446..820c30d7b84 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@@ -12,11 +12,12 @@ import { TableBody } from '@/ui/layout/table/components/TableBody';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { plural, t } from '@lingui/core/macro';import { useState } from 'react';import { IconRefresh, IconTrash } from 'twenty-ui/display';import { Button, Checkbox } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import {JobState,type QueueJob,@@ -37,19 +38,19 @@ type SettingsAdminQueueJobsTableProps = {const StyledContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;const StyledControlsContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};justify-content: space-between;`;const StyledEmptyState = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};- padding: ${({ theme }) => theme.spacing(8)};+ color: ${themeCssVariables.font.color.tertiary};+ padding: ${themeCssVariables.spacing[8]};text-align: center;`;@@ -57,7 +58,7 @@ const StyledPaginationContainer = styled.div`align-items: center;display: flex;justify-content: space-between;- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};`;const StyledTableCell = styled(TableCell)`@@ -69,11 +70,13 @@ const StyledTableCell = styled(TableCell)`const StyledExpandableTableRow = styled(TableRow)<{ isExpanded: boolean }>`cursor: pointer;- background-color: ${({ theme, isExpanded }) =>- isExpanded ? theme.background.transparent.light : 'transparent'};+ background-color: ${({ isExpanded }) =>+ isExpanded+ ? themeCssVariables.background.transparent.light+ : 'transparent'};&:hover {- background-color: ${({ theme }) => theme.background.transparent.light};+ background-color: ${themeCssVariables.background.transparent.light};}`;@@ -84,19 +87,19 @@ const StyledJobRowWrapper = styled.div`const StyledCheckboxCell = styled(TableCell)`justify-content: center;padding: 0;- padding-left: ${({ theme }) => theme.spacing(1)};+ padding-left: ${themeCssVariables.spacing[1]};`;const StyledHeaderCheckboxCell = styled(TableHeader)`align-items: center;display: flex;justify-content: center;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;const StyledButtonGroup = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const RETRY_MODAL_ID = 'retry-jobs-modal';@@ -150,7 +153,6 @@ export const SettingsAdminQueueJobsTable = ({const totalCount = data?.getQueueJobs?.totalCount || 0;const failedJobs = jobs.filter((job) => job.state === JobState.FAILED);- // Pass retention config to parent when data loadsconst shouldPassConfig =data?.getQueueJobs?.retentionConfig !== undefined &&onRetentionConfigLoaded !== undefined;@@ -165,7 +167,6 @@ export const SettingsAdminQueueJobsTable = ({const someJobsSelected =jobs.some((job) => selectedJobIds.has(job.id)) && !allJobsSelected;- // Check if all selected jobs are failed (for showing retry button)const selectedJobs = jobs.filter((job) => selectedJobIds.has(job.id));const allSelectedAreFailed =selectedJobs.length > 0 &&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 18eb92c114f..1f8bc860ea0 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@@ -1,13 +1,14 @@import { SettingsAdminWorkerQueueMetricsSection } from '@/settings/admin-panel/health-status/components/SettingsAdminWorkerQueueMetricsSection';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';import { AdminPanelHealthServiceStatus } from '~/generated-metadata/graphql';import { SettingsAdminIndicatorHealthContext } from '@/settings/admin-panel/health-status/contexts/SettingsAdminIndicatorHealthContext';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledErrorMessage = styled.div`- color: ${({ theme }) => theme.color.red};- margin-top: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.color.red};+ margin-top: ${themeCssVariables.spacing[2]};`;export const SettingsAdminWorkerHealthStatus = () => {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 a4f0bb1d51d..962e35f9276 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@@ -1,36 +1,38 @@import { SettingsAdminTableCard } from '@/settings/admin-panel/components/SettingsAdminTableCard';import { SettingsAdminWorkerMetricsTooltip } from '@/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsTooltip';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { ResponsiveLine } from '@nivo/line';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import {QueueMetricsTimeRange,useGetQueueMetricsQuery,} from '~/generated-metadata/graphql';const StyledGraphContainer = styled.div`- background-color: ${({ theme }) => theme.background.secondary};- border-radius: ${({ theme }) => theme.border.radius.md};+ background-color: ${themeCssVariables.background.secondary};+ border-radius: ${themeCssVariables.border.radius.md};height: 240px;- border: 1px solid ${({ theme }) => theme.border.color.medium};- margin-bottom: ${({ theme }) => theme.spacing(4)};+ border: 1px solid ${themeCssVariables.border.color.medium};+ margin-bottom: ${themeCssVariables.spacing[4]};padding-top: 10px;width: 100%;`;const StyledNoDataMessage = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};display: flex;height: 100%;justify-content: center;`;const StyledSettingsAdminTableCard = styled(SettingsAdminTableCard)`- padding-left: ${({ theme }) => theme.spacing(2)};- padding-right: ${({ theme }) => theme.spacing(2)};+ padding-left: ${themeCssVariables.spacing[2]};+ padding-right: ${themeCssVariables.spacing[2]};`;type SettingsAdminWorkerMetricsGraphProps = {@@ -43,7 +45,7 @@ export const SettingsAdminWorkerMetricsGraph = ({queueName,timeRange,}: SettingsAdminWorkerMetricsGraphProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { enqueueErrorSnackBar } = useSnackBar();const { loading, data } = useGetQueueMetricsQuery({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 e303ad7b8b6..19b4cfc1f30 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,23 +1,24 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import type { LineSeries, Point } from '@nivo/line';import { type ReactElement } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTooltipContainer = styled.div`- backdrop-filter: ${({ theme }) => theme.blur.medium};- background-color: ${({ theme }) => theme.background.transparent.secondary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.md};- box-shadow: ${({ theme }) => theme.boxShadow.light};+ backdrop-filter: ${themeCssVariables.blur.medium};+ background-color: ${themeCssVariables.background.transparent.secondary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.md};+ box-shadow: ${themeCssVariables.boxShadow.light};display: flex;flex-direction: column;- font-size: ${({ theme }) => theme.font.size.sm};- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2)};+ font-size: ${themeCssVariables.font.size.sm};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]};`;const StyledTooltipItem = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};display: flex;`;@@ -25,7 +26,7 @@ const StyledTooltipColorCircle = styled.div<{ color: string }>`background-color: ${({ color }) => color};border-radius: 50%;height: 8px;- margin-right: ${({ theme }) => theme.spacing(2)};+ margin-right: ${themeCssVariables.spacing[2]};width: 8px;`;@@ -33,14 +34,14 @@ const StyledTooltipDataRow = styled.div`align-items: center;display: flex;justify-content: space-between;- color: ${({ theme }) => theme.font.color.tertiary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.tertiary};+ gap: ${themeCssVariables.spacing[2]};width: 100%;`;const StyledTooltipValue = styled.span`- color: ${({ theme }) => theme.font.color.primary};- font-weight: ${({ theme }) => theme.font.weight.medium};+ color: ${themeCssVariables.font.color.primary};+ font-weight: ${themeCssVariables.font.weight.medium};`;type SettingsAdminWorkerMetricsTooltipProps = {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 e79cfe62d99..09cf37fbf8d 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@@ -1,7 +1,7 @@import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSkeletonLoader';import { WORKER_QUEUE_METRICS_SELECT_OPTIONS } from '@/settings/admin-panel/health-status/constants/WorkerQueueMetricsSelectOptions';import { Select } from '@/ui/input/components/Select';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { lazy, Suspense, useState } from 'react';import { SettingsPath } from 'twenty-shared/types';@@ -9,6 +9,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { H2Title, IconList } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import {type AdminPanelWorkerQueueHealth,QueueMetricsTimeRange,@@ -33,13 +34,13 @@ const StyledControlsContainer = styled.div`const StyledRightControls = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledContainer = styled.div`display: flex;flex-direction: column;- margin-bottom: ${({ theme }) => theme.spacing(8)};+ margin-bottom: ${themeCssVariables.spacing[8]};`;export const SettingsAdminWorkerQueueMetricsSection = ({diff --git a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsxindex 11fd648e4b9..16ebac5a6ea 100644--- a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx+++ b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsContentWrapperWithDot.tsx@@ -1,6 +1,8 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { IconPoint } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledWrapper = styled.div`position: relative;@@ -18,18 +20,11 @@ const StyledDotContainer = styled.div<{ dotPosition: DotPosition }>`display: flex;position: absolute;height: 100%;- left: ${({ theme }) => theme.spacing(-5)};+ left: calc(-1 * ${themeCssVariables.spacing[5]});- ${({ dotPosition }) => {- if (dotPosition === 'top') {- return `- top: 0;- `;- }- return `- align-items: center;- `;- }}+ top: ${({ dotPosition }) => (dotPosition === 'top' ? '0' : 'auto')};+ align-items: ${({ dotPosition }) =>+ dotPosition === 'top' ? 'stretch' : 'center'};`;const StyledIconPoint = styled(IconPoint)`@@ -41,7 +36,7 @@ export const AdvancedSettingsContentWrapperWithDot = ({hideDot = false,dotPosition = 'centered',}: AdvancedSettingsContentWrapperWithDotProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledWrapper>{!hideDot && (diff --git a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsxindex dffcaf8e3c0..809c2182c83 100644--- a/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx+++ b/packages/twenty-front/src/modules/settings/components/AdvancedSettingsWrapper.tsx@@ -2,7 +2,7 @@ import { AdvancedSettingsContentWrapperWithDot } from '@/settings/components/Advimport { ADVANCED_SETTINGS_ANIMATION_DURATION } from '@/settings/constants/AdvancedSettingsAnimationDurations';import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { AnimatedExpandableContainer } from 'twenty-ui/layout';const StyledContent = styled.div`diff --git a/packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsx b/packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsxindex 37b5b9af640..30b7dbf4b4e 100644--- a/packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsx+++ b/packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsx@@ -1,5 +1,6 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import type { IconComponent } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { CancelButton } from './CancelButton';import { SaveButton } from './SaveButton';@@ -7,7 +8,7 @@ import { SaveButton } from './SaveButton';const StyledContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;type SaveAndCancelButtonsProps = {diff --git a/packages/twenty-front/src/modules/settings/components/Separator.tsx b/packages/twenty-front/src/modules/settings/components/Separator.tsxindex a7550220765..2291502481e 100644--- a/packages/twenty-front/src/modules/settings/components/Separator.tsx+++ b/packages/twenty-front/src/modules/settings/components/Separator.tsx@@ -1,11 +1,12 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledHr = styled.hr`border: none;- border-top: 1px solid ${({ theme }) => theme.border.color.light};+ border-top: 1px solid ${themeCssVariables.border.color.light};margin: 0px;- margin-left: ${({ theme }) => theme.spacing(4)};- margin-right: ${({ theme }) => theme.spacing(4)};+ margin-left: ${themeCssVariables.spacing[4]};+ margin-right: ${themeCssVariables.spacing[4]};`;export const Separator = () => {diff --git a/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsCard.tsxindex ffec5866aae..0e83d9f861d 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsCard.tsx@@ -1,11 +1,12 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';-import { type ReactNode } from 'react';+import { type ReactNode, useContext } from 'react';import { t } from '@lingui/core/macro';import { Card, CardContent } from 'twenty-ui/layout';import { IconChevronRight } from 'twenty-ui/display';import { Pill } from 'twenty-ui/components';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsCardProps = {description?: string;@@ -22,21 +23,23 @@ const StyledCard = styled(Card)<{disabled?: boolean;onClick?: () => void;}>`- color: ${({ disabled, theme }) =>- disabled ? theme.font.color.extraLight : theme.font.color.tertiary};+ color: ${({ disabled }) =>+ disabled+ ? themeCssVariables.font.color.extraLight+ : themeCssVariables.font.color.tertiary};cursor: ${({ disabled, onClick }) =>disabled ? 'not-allowed' : onClick ? 'pointer' : 'default'};width: 100%;`;-const StyledCardContent = styled(CardContent)<object>`+const StyledCardContent = styled(CardContent)`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2, 2)};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[2]};&:hover {- background-color: ${({ theme }) => theme.background.quaternary};+ background-color: ${themeCssVariables.background.quaternary};cursor: pointer;}`;@@ -44,26 +47,28 @@ const StyledCardContent = styled(CardContent)<object>`const StyledHeader = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledTitle = styled.div<{ disabled?: boolean }>`- color: ${({ disabled, theme }) =>- disabled ? 'inherit' : theme.font.color.secondary};+ color: ${({ disabled }) =>+ disabled+ ? themeCssVariables.font.color.extraLight+ : themeCssVariables.font.color.secondary};display: flex;flex: 1 0 auto;- font-weight: ${({ theme }) => theme.font.weight.medium};- gap: ${({ theme }) => theme.spacing(2)};+ font-weight: ${themeCssVariables.font.weight.medium};+ gap: ${themeCssVariables.spacing[2]};justify-content: flex-start;`;const StyledIconChevronRight = styled(IconChevronRight)`- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};`;const StyledDescription = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-left: ${({ theme }) => theme.spacing(7)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-left: ${themeCssVariables.spacing[7]};`;const StyledIconContainer = styled.div`@@ -84,7 +89,7 @@ export const SettingsCard = ({className,Status,}: SettingsCardProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledCarddiff --git a/packages/twenty-front/src/modules/settings/components/SettingsConnectedAccountsTableRow.tsx b/packages/twenty-front/src/modules/settings/components/SettingsConnectedAccountsTableRow.tsxindex f5fac373061..6f4d8f3a948 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsConnectedAccountsTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsConnectedAccountsTableRow.tsx@@ -3,19 +3,21 @@ import { SettingsAccountsConnectedAccountsRowRightContainer } from '@/settings/aimport { SettingsConnectedAccountIcon } from '@/settings/accounts/components/SettingsConnectedAccountIcon';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledNameCell = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledTableRow = styled(TableRow)`&:hover {- background: ${({ theme }) => theme.background.transparent.light};+ background: ${themeCssVariables.background.transparent.light};cursor: pointer;}`;@@ -27,7 +29,7 @@ type SettingsConnectedAccountsTableRowProps = {export const SettingsConnectedAccountsTableRow = ({account,}: SettingsConnectedAccountsTableRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const IconComponent = SettingsConnectedAccountIcon({ account });diff --git a/packages/twenty-front/src/modules/settings/components/SettingsCounter.tsx b/packages/twenty-front/src/modules/settings/components/SettingsCounter.tsxindex f265a00fecf..23c4a62be7f 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsCounter.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsCounter.tsx@@ -1,7 +1,8 @@import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { IconMinus, IconPlus } from 'twenty-ui/display';import { IconButton } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { castAsNumberOrNull } from '~/utils/cast-as-number-or-null';type SettingsCounterProps = {@@ -16,19 +17,21 @@ type SettingsCounterProps = {const StyledCounterContainer = styled.div<{ showButtons: boolean }>`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};margin-left: auto;- width: ${({ theme, showButtons }) =>- showButtons ? theme.spacing(30) : theme.spacing(16)};+ width: ${({ showButtons }) =>+ showButtons+ ? themeCssVariables.spacing[30]+ : themeCssVariables.spacing[16]};`;const StyledTextInput = styled(SettingsTextInput)`- width: ${({ theme }) => theme.spacing(16)};+ width: ${themeCssVariables.spacing[16]};input {- width: ${({ theme }) => theme.spacing(16)};- height: ${({ theme }) => theme.spacing(6)};+ width: ${themeCssVariables.spacing[16]};+ height: ${themeCssVariables.spacing[6]};text-align: center;- font-weight: ${({ theme }) => theme.font.weight.medium};+ font-weight: ${themeCssVariables.font.weight.medium};}`;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsDatabaseEventsForm.tsx b/packages/twenty-front/src/modules/settings/components/SettingsDatabaseEventsForm.tsxindex 7fbfeb966b0..0e36c4f3ef5 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsDatabaseEventsForm.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsDatabaseEventsForm.tsx@@ -1,11 +1,12 @@import { WebhookEntitySelect } from '@/settings/developers/components/WebhookEntitySelect';import { Select } from '@/ui/input/components/Select';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { IconBox, IconNorthStar, IconPlus, IconTrash } from 'twenty-ui/display';import { IconButton, type SelectOption } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const OBJECT_DROPDOWN_WIDTH = 240;const ACTION_DROPDOWN_WIDTH = 240;@@ -18,14 +19,14 @@ const StyledFilterRow = styled.div<{ isMobile: boolean }>`isMobile? `${OBJECT_MOBILE_WIDTH}px ${ACTION_MOBILE_WIDTH}px auto`: `${OBJECT_DROPDOWN_WIDTH}px ${ACTION_DROPDOWN_WIDTH}px auto`};- gap: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[2]};align-items: center;`;const StyledPlaceholder = styled.div`- height: ${({ theme }) => theme.spacing(8)};- width: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};+ width: ${themeCssVariables.spacing[8]};`;export const SettingsDatabaseEventsForm = ({diff --git a/packages/twenty-front/src/modules/settings/components/SettingsDnsRecordsTable.tsx b/packages/twenty-front/src/modules/settings/components/SettingsDnsRecordsTable.tsxindex 3fedcb3e6dc..ca0a777b1a6 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsDnsRecordsTable.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsDnsRecordsTable.tsx@@ -2,7 +2,7 @@ import { Table } from '@/ui/layout/table/components/Table';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { capitalize, isDefined } from 'twenty-shared/utils';import { OverflowingTextWithTooltip, Status } from 'twenty-ui/display';diff --git a/packages/twenty-front/src/modules/settings/components/SettingsHeaderContainer.tsx b/packages/twenty-front/src/modules/settings/components/SettingsHeaderContainer.tsxindex f6d0cfd0e2e..253e6768412 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsHeaderContainer.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsHeaderContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledSettingsHeaderContainer = styled.div`align-items: center;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsItemTypeTag.tsx b/packages/twenty-front/src/modules/settings/components/SettingsItemTypeTag.tsxindex 48f1c36e29e..de38f3dde29 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsItemTypeTag.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsItemTypeTag.tsx@@ -1,9 +1,11 @@import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';import { getItemTagInfo } from '@/settings/data-model/utils/getItemTagInfo';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { Avatar } from 'twenty-ui/display';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsItemTypeTagProps = {item: {@@ -17,16 +19,16 @@ type SettingsItemTypeTagProps = {const StyledContainer = styled.div`align-items: center;display: flex;- font-size: ${({ theme }) => theme.font.size.sm};- gap: ${({ theme }) => theme.spacing(1)};- color: ${({ theme }) => theme.font.color.secondary};+ font-size: ${themeCssVariables.font.size.sm};+ gap: ${themeCssVariables.spacing[1]};+ color: ${themeCssVariables.font.color.secondary};`;export const SettingsItemTypeTag = ({className,item: { isCustom, isRemote, applicationId },}: SettingsItemTypeTagProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const currentWorkspace = useAtomStateValue(currentWorkspaceState);const itemTagInfo = getItemTagInfo({item: { isCustom, isRemote, applicationId },diff --git a/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsxindex 84f745ef21f..786cfb64ef5 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsListCard.tsx@@ -1,36 +1,37 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { type ComponentType } from 'react';+import { styled } from '@linaria/react';+import { type ComponentType, useContext } from 'react';import { SettingsListSkeletonCard } from '@/settings/components/SettingsListSkeletonCard';import { type IconComponent, IconPlus } from 'twenty-ui/display';import { Card, CardFooter } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { SettingsListItemCardContent } from './SettingsListItemCardContent';const StyledFooter = styled(CardFooter)`align-items: center;display: flex;- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};`;const StyledButton = styled.button`align-items: center;- background: ${({ theme }) => theme.background.primary};+ background: ${themeCssVariables.background.primary};border: none;- border-radius: ${({ theme }) => theme.border.radius.sm};- color: ${({ theme }) => theme.font.color.secondary};- gap: ${({ theme }) => theme.spacing(2)};- padding: 0 ${({ theme }) => theme.spacing(1)};- padding-left: ${({ theme }) => theme.spacing(2)};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${themeCssVariables.font.color.secondary};+ gap: ${themeCssVariables.spacing[2]};+ padding: 0 ${themeCssVariables.spacing[1]};+ padding-left: ${themeCssVariables.spacing[2]};cursor: pointer;display: flex;flex: 1 0 0;- height: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};width: 100%;&:hover {- background: ${({ theme }) => theme.background.transparent.light};+ background: ${themeCssVariables.background.transparent.light};}`;@@ -71,7 +72,7 @@ export const SettingsListCard = <to,rounded,}: SettingsListCardProps<ListItem>) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 ac2433e936c..aaa477d3312 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsListItemCardContent.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsListItemCardContent.tsx@@ -1,41 +1,33 @@-import isPropValid from '@emotion/is-prop-valid';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { type ReactNode } from 'react';+import { styled } from '@linaria/react';+import { type ReactNode, useContext } from 'react';import { Link } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { IconChevronRight, type IconComponent } from 'twenty-ui/display';import { CardContent } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';-const StyledRow = styled(CardContent, {- shouldForwardProp: (prop) => prop !== 'to' && isPropValid(prop),-})<{ to?: boolean }>`+const StyledRow = styled(CardContent)`align-items: center;- cursor: ${({ onClick, to }) => (onClick || to ? 'pointer' : 'default')};display: flex;- font-size: ${({ theme }) => theme.font.size.sm};- font-weight: ${({ theme }) => theme.font.weight.medium};- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2)};- padding-left: ${({ theme }) => theme.spacing(3)};- min-height: ${({ theme }) => theme.spacing(6)};-- &:hover {- ${({ to, theme }) =>- to && `background: ${theme.background.transparent.light};`}- }+ font-size: ${themeCssVariables.font.size.sm};+ font-weight: ${themeCssVariables.font.weight.medium};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]};+ padding-left: ${themeCssVariables.spacing[3]};+ min-height: ${themeCssVariables.spacing[6]};`;const StyledRightContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledContent = styled.div`flex: 1 1 0;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};min-width: 0;overflow: hidden;`;@@ -47,13 +39,13 @@ const StyledLabel = styled.span``;const StyledDescription = styled.span`- color: ${({ theme }) => theme.font.color.light};- font-weight: ${({ theme }) => theme.font.weight.regular};- padding-left: ${({ theme }) => theme.spacing(1)};+ color: ${themeCssVariables.font.color.light};+ font-weight: ${themeCssVariables.font.weight.regular};+ padding-left: ${themeCssVariables.spacing[1]};`;const StyledLink = styled(Link)`- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};text-decoration: none;`;@@ -78,10 +70,15 @@ export const SettingsListItemCardContent = ({rightComponent,to,}: SettingsListItemCardContentProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const content = (- <StyledRow onClick={onClick} divider={divider} to={!!to}>+ <StyledRow+ onClick={onClick}+ divider={divider}+ isClickable={!!onClick || !!to}+ hasHoverHighlight={!!to}+ >{!!LeftIcon && (<LeftIconsize={theme.icon.size.md}diff --git a/packages/twenty-front/src/modules/settings/components/SettingsListSkeletonCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsListSkeletonCard.tsxindex 8899a9b7880..b93b816a9b9 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsListSkeletonCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsListSkeletonCard.tsx@@ -1,8 +1,9 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Card } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCard = styled(Card)`- background-color: ${({ theme }) => theme.background.secondary};+ background-color: ${themeCssVariables.background.secondary};height: 40px;`;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsMorphRelationMultiSelect.tsx b/packages/twenty-front/src/modules/settings/components/SettingsMorphRelationMultiSelect.tsxindex fe1c49dc750..6f1c105017a 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsMorphRelationMultiSelect.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsMorphRelationMultiSelect.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { plural } from '@lingui/core/macro';import { useMemo, useRef, useState, type MouseEvent } from 'react';@@ -23,6 +23,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { IconBox, useIcons, type IconComponent } from 'twenty-ui/display';import { MenuItem, MenuItemMultiSelect } from 'twenty-ui/navigation';+import { themeCssVariables } from 'twenty-ui/theme-constants';export type SelectSizeVariant = 'small' | 'default';@@ -58,23 +59,23 @@ const StyledContainer = styled.div<{ fullWidth?: boolean }>``;const StyledLabel = styled.span`- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};display: block;- font-size: ${({ theme }) => theme.font.size.xs};- font-weight: ${({ theme }) => theme.font.weight.semiBold};- margin-bottom: ${({ theme }) => theme.spacing(1)};+ font-size: ${themeCssVariables.font.size.xs};+ font-weight: ${themeCssVariables.font.weight.semiBold};+ margin-bottom: ${themeCssVariables.spacing[1]};`;const StyledDescription = styled.span`- color: ${({ theme }) => theme.font.color.light};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.light};+ font-size: ${themeCssVariables.font.size.sm};`;const StyledError = styled.span`- color: ${({ theme }) => theme.color.red};+ color: ${themeCssVariables.color.red};display: block;- font-size: ${({ theme }) => theme.font.size.xs};- margin-top: ${({ theme }) => theme.spacing(1)};+ font-size: ${themeCssVariables.font.size.xs};+ margin-top: ${themeCssVariables.spacing[1]};`;export const SettingsMorphRelationMultiSelect = ({diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsCardContentBase.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsCardContentBase.tsxindex 87014ec321e..cc33dc74437 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsCardContentBase.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsCardContentBase.tsx@@ -1,4 +1,5 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';type StyledCardContentProps = {disabled?: boolean;@@ -9,27 +10,27 @@ type StyledCardContentProps = {export const StyledSettingsCardContent = styled.div<StyledCardContentProps>`align-items: ${({ alignItems }) => alignItems ?? 'center'};display: flex;- gap: ${({ theme }) => theme.spacing(3)};- background-color: ${({ theme }) => theme.background.secondary};+ gap: ${themeCssVariables.spacing[3]};+ background-color: ${themeCssVariables.background.secondary};height: ${({ fullHeight }) => (fullHeight ? '100%' : 'auto')};- padding: ${({ theme }) => theme.spacing(4)};+ padding: ${themeCssVariables.spacing[4]};`;export const StyledSettingsCardIcon = styled.div`align-items: center;- border: 2px solid ${({ theme }) => theme.border.color.light};- border-radius: ${({ theme }) => theme.border.radius.sm};- background-color: ${({ theme }) => theme.background.primary};+ border: 2px solid ${themeCssVariables.border.color.light};+ border-radius: ${themeCssVariables.border.radius.sm};+ background-color: ${themeCssVariables.background.primary};display: flex;- height: ${({ theme }) => theme.spacing(7)};+ height: ${themeCssVariables.spacing[7]};justify-content: center;- width: ${({ theme }) => theme.spacing(7)};- min-width: ${({ theme }) => theme.icon.size.md};+ width: ${themeCssVariables.spacing[7]};+ min-width: ${themeCssVariables.icon.size.md};`;export const StyledSettingsCardTitle = styled.div`- color: ${({ theme }) => theme.font.color.primary};- font-weight: ${({ theme }) => theme.font.weight.medium};- margin-bottom: ${({ theme }) => theme.spacing(1)};+ color: ${themeCssVariables.font.color.primary};+ font-weight: ${themeCssVariables.font.weight.medium};+ margin-bottom: ${themeCssVariables.spacing[1]};`;export const StyledSettingsCardTextContainer = styled.div`@@ -38,8 +39,8 @@ export const StyledSettingsCardTextContainer = styled.div``;export const StyledSettingsCardDescription = styled.div`- color: ${({ theme }) => theme.font.color.secondary};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.secondary};+ font-size: ${themeCssVariables.font.size.sm};overflow: hidden;line-height: 1.5;@@ -51,7 +52,7 @@ export const StyledSettingsCardDescription = styled.div``;export const StyledSettingsCardThirdLine = styled.div`- color: ${({ theme }) => theme.font.color.light};- font-size: ${({ theme }) => theme.font.size.xs};- margin-top: ${({ theme }) => theme.spacing(1)};+ color: ${themeCssVariables.font.color.light};+ font-size: ${themeCssVariables.font.size.xs};+ margin-top: ${themeCssVariables.spacing[1]};`;diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentButton.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentButton.tsxindex a34e5478756..c24d686abcf 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentButton.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentButton.tsx@@ -6,7 +6,7 @@ import {StyledSettingsCardTitle,} from '@/settings/components/SettingsOptions/SettingsCardContentBase';import { SettingsOptionIconCustomizer } from '@/settings/components/SettingsOptions/SettingsOptionIconCustomizer';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {type IconComponent,OverflowingTextWithTooltip,diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSelect.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSelect.tsxindex 254ce0b78dd..a7342cd5596 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSelect.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentSelect.tsx@@ -6,7 +6,7 @@ import {StyledSettingsCardTitle,} from '@/settings/components/SettingsOptions/SettingsCardContentBase';import { SettingsOptionIconCustomizer } from '@/settings/components/SettingsOptions/SettingsOptionIconCustomizer';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {type IconComponent,OverflowingTextWithTooltip,diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentToggle.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentToggle.tsxindex fbdee0cd6bb..f97ef1372d2 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentToggle.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionCardContentToggle.tsx@@ -7,14 +7,15 @@ import {StyledSettingsCardTitle,} from '@/settings/components/SettingsOptions/SettingsCardContentBase';import { SettingsOptionIconCustomizer } from '@/settings/components/SettingsOptions/SettingsOptionIconCustomizer';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { useId } from 'react';+import { styled } from '@linaria/react';+import { useContext, useId } from 'react';import {type IconComponent,OverflowingTextWithTooltip,} from 'twenty-ui/display';import { Toggle } from 'twenty-ui/input';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSettingsCardToggleContent = styled(StyledSettingsCardContent)`cursor: ${({ disabled }) => (disabled ? 'default' : 'pointer')};@@ -22,15 +23,11 @@ const StyledSettingsCardToggleContent = styled(StyledSettingsCardContent)`pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};&:hover {- background: ${({ theme }) => theme.background.transparent.lighter};+ background: ${themeCssVariables.background.transparent.lighter};}`;-const StyledSettingsCardToggleButton = styled(Toggle)<{- toggleCentered?: boolean;-}>`- align-self: ${({ toggleCentered }) =>- toggleCentered ? 'center' : 'flex-start'};+const StyledSettingsCardToggleButton = styled(Toggle)`flex-shrink: 0;margin-left: auto;`;@@ -64,7 +61,7 @@ export const SettingsOptionCardContentToggle = ({checked,onChange,}: SettingsOptionCardContentToggleProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const toggleId = useId();return (@@ -95,7 +92,7 @@ export const SettingsOptionCardContentToggle = ({disabled={disabled}toggleSize="small"color={advancedMode ? theme.color.yellow : theme.color.blue}- toggleCentered={toggleCentered}+ centered={toggleCentered}/></StyledSettingsCardToggleContent>{divider && <Separator />}diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionIconCustomizer.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionIconCustomizer.tsxindex 1a44290c72c..017dd509539 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionIconCustomizer.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/SettingsOptionIconCustomizer.tsx@@ -1,6 +1,7 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { type IconComponent } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';type SettingsOptionIconCustomizerProps = {Icon: IconComponent;@@ -20,7 +21,7 @@ export const SettingsOptionIconCustomizer = ({zoom = 1,rotate = -4,}: SettingsOptionIconCustomizerProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledIconCustomizer zoom={zoom} rotate={rotate}><Icondiff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentCounter.stories.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentCounter.stories.tsxindex 23d77abeb90..006c990e6e2 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentCounter.stories.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentCounter.stories.tsx@@ -1,5 +1,5 @@import { SettingsOptionCardContentCounter } from '@/settings/components/SettingsOptions/SettingsOptionCardContentCounter';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { useState } from 'react';import { IconUsers } from 'twenty-ui/display';diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentSelect.stories.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentSelect.stories.tsxindex 539c1bc6efe..ba3bc1cc1e7 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentSelect.stories.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentSelect.stories.tsx@@ -1,7 +1,7 @@import { SettingsOptionCardContentSelect } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSelect';import { Select } from '@/ui/input/components/Select';import { type SelectValue } from '@/ui/input/components/internal/select/types';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { useState } from 'react';import {diff --git a/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentToggle.stories.tsx b/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentToggle.stories.tsxindex 9af0a293bb0..a85a630c1e1 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentToggle.stories.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsOptions/__stories__/SettingsOptionCardContentToggle.stories.tsx@@ -1,5 +1,5 @@import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsOptions/SettingsOptionCardContentToggle';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { useState } from 'react';import { IconBell, IconLock, IconRobot, IconUsers } from 'twenty-ui/display';diff --git a/packages/twenty-front/src/modules/settings/components/SettingsPageContainer.tsx b/packages/twenty-front/src/modules/settings/components/SettingsPageContainer.tsxindex 795ebb12306..94c504a4818 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsPageContainer.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsPageContainer.tsx@@ -2,20 +2,22 @@ import { OBJECT_SETTINGS_WIDTH } from '@/settings/data-model/constants/ObjectSetimport { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useScrollRestoration } from '@/ui/utilities/scroll/hooks/useScrollRestoration';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode, useMemo } 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';const StyledSettingsPageContainer = styled.div<{width?: number;}>`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[8]};overflow: auto;- padding: ${({ theme }) => theme.spacing(6, 8, 8)};+ padding: ${themeCssVariables.spacing[6]} ${themeCssVariables.spacing[8]}+ ${themeCssVariables.spacing[8]};width: ${({ width }) => {if (isDefined(width)) {return width + 'px';@@ -25,7 +27,7 @@ const StyledSettingsPageContainer = styled.div<{}return OBJECT_SETTINGS_WIDTH + 'px';}};- padding-bottom: ${({ theme }) => theme.spacing(20)};+ padding-bottom: ${themeCssVariables.spacing[20]};`;export const SettingsPageContainer = ({diff --git a/packages/twenty-front/src/modules/settings/components/SettingsRadioCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsRadioCard.tsxindex 66c6c3f05d7..3ec7d4a6424 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsRadioCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsRadioCard.tsx@@ -1,37 +1,39 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { CardContent } from 'twenty-ui/layout';import { type IconComponent } from 'twenty-ui/display';import { Radio } from 'twenty-ui/input';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRadioCardContent = styled(CardContent)`display: flex;align-items: center;- padding: ${({ theme }) => theme.spacing(2)};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};+ padding: ${themeCssVariables.spacing[2]};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};flex-grow: 1;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};cursor: pointer;&:hover {- background: ${({ theme }) => theme.background.transparent.lighter};+ background: ${themeCssVariables.background.transparent.lighter};}`;const StyledRadio = styled(Radio)`margin-left: auto;- padding: ${({ theme }) => theme.spacing(1)};+ padding: ${themeCssVariables.spacing[1]};`;const StyledTitle = styled.div`- color: ${({ theme }) => theme.font.color.secondary};- font-weight: ${({ theme }) => theme.font.weight.medium};+ color: ${themeCssVariables.font.color.secondary};+ font-weight: ${themeCssVariables.font.weight.medium};`;const StyledDescription = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.sm};`;type SettingsRadioCardProps = {@@ -53,7 +55,7 @@ export const SettingsRadioCard = ({isSelected,Icon,}: SettingsRadioCardProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const onClick = () => handleSelect(value);diff --git a/packages/twenty-front/src/modules/settings/components/SettingsRadioCardContainer.tsx b/packages/twenty-front/src/modules/settings/components/SettingsRadioCardContainer.tsxindex 00528e0ae50..cf70ecc24ea 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsRadioCardContainer.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsRadioCardContainer.tsx@@ -1,11 +1,12 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsRadioCard } from '@/settings/components/SettingsRadioCard';import { type IconComponent } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRadioCardContainer = styled.div`display: flex;flex-wrap: wrap;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;type SettingsRadioCardContainerProps = {diff --git a/packages/twenty-front/src/modules/settings/components/SettingsSkeletonLoader.tsx b/packages/twenty-front/src/modules/settings/components/SettingsSkeletonLoader.tsxindex 1e9403a3aa6..53990de3a08 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsSkeletonLoader.tsx@@ -1,9 +1,11 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';import { PageBody } from '@/ui/layout/page/components/PageBody';import { PageHeader } from '@/ui/layout/page/components/PageHeader';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`display: flex;@@ -12,11 +14,12 @@ const StyledContainer = styled.div``;const StyledTitleLoaderContainer = styled.div`- margin: ${({ theme }) => theme.spacing(8, 8, 2)};+ margin: ${themeCssVariables.spacing[8]} ${themeCssVariables.spacing[8]}+ ${themeCssVariables.spacing[2]};`;export const SettingsSkeletonLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledContainer><PageHeaderdiff --git a/packages/twenty-front/src/modules/settings/components/SettingsSummaryCard.tsx b/packages/twenty-front/src/modules/settings/components/SettingsSummaryCard.tsxindex 9eeda85fe5a..779b7468e9c 100644--- a/packages/twenty-front/src/modules/settings/components/SettingsSummaryCard.tsx+++ b/packages/twenty-front/src/modules/settings/components/SettingsSummaryCard.tsx@@ -1,6 +1,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { Card, CardContent } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsSummaryCardProps = {title: ReactNode;@@ -10,16 +11,16 @@ type SettingsSummaryCardProps = {const StyledCardContent = styled(CardContent)`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2)};- min-height: ${({ theme }) => theme.spacing(6)};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]};+ min-height: ${themeCssVariables.spacing[6]};`;const StyledTitle = styled.div`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};display: flex;- font-weight: ${({ theme }) => theme.font.weight.medium};- gap: ${({ theme }) => theme.spacing(2)};+ font-weight: ${themeCssVariables.font.weight.medium};+ gap: ${themeCssVariables.spacing[2]};margin-right: auto;`;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 9fbc11715a5..efbf27d00e6 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,11 +1,12 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTitle = styled.h3`- color: ${({ theme }) => theme.font.color.extraLight};- font-size: ${({ theme }) => theme.font.size.sm};- font-weight: ${({ theme }) => theme.font.weight.medium};+ color: ${themeCssVariables.font.color.extraLight};+ font-size: ${themeCssVariables.font.size.sm};+ font-weight: ${themeCssVariables.font.weight.medium};margin: 0;- margin-bottom: ${({ theme }) => theme.spacing(4)};+ margin-bottom: ${themeCssVariables.spacing[4]};`;export { StyledTitle as SettingsDataModelCardTitle };diff --git a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelNewFieldBreadcrumbDropDown.tsx b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelNewFieldBreadcrumbDropDown.tsxindex 5a72e39ce6f..66c1d622728 100644--- a/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelNewFieldBreadcrumbDropDown.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/components/SettingsDataModelNewFieldBreadcrumbDropDown.tsx@@ -3,23 +3,25 @@ import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';+import { useContext } from 'react';import { useLocation, useParams, useSearchParams } from 'react-router-dom';import { SettingsPath } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { IconChevronDown } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { MenuItem } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const StyledContainer = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};cursor: default;display: flex;- font-size: ${({ theme }) => theme.font.size.md};+ font-size: ${themeCssVariables.font.size.md};`;const StyledButtonContainer = styled.div`@@ -28,9 +30,9 @@ const StyledButtonContainer = styled.div``;const StyledDownChevron = styled(IconChevronDown)`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};position: absolute;- right: ${({ theme }) => theme.spacing(1.5)};+ right: ${themeCssVariables.spacing['1.5']};top: 50%;transform: translateY(-50%);`;@@ -40,28 +42,13 @@ const StyledMenuItemWrapper = styled.div<{ disabled?: boolean }>`width: 100%;`;-const StyledMenuItem = styled(MenuItem)<{- selected?: boolean;- disabled?: boolean;-}>`- background: ${({ theme, selected }) =>- selected ? theme.background.quaternary : 'transparent'};- opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};- pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};-- &:hover {- background: ${({ theme, disabled }) =>- disabled ? 'transparent' : theme.background.tertiary};- }-`;-const StyledSpan = styled.span`- margin-left: ${({ theme }) => theme.spacing(2)};+ margin-left: ${themeCssVariables.spacing[2]};`;const StyledButton = styled(Button)`- color: ${({ theme }) => theme.font.color.primary};- padding-right: ${({ theme }) => theme.spacing(6)};+ color: ${themeCssVariables.font.color.primary};+ padding-right: ${themeCssVariables.spacing[6]};`;export const SettingsDataModelNewFieldBreadcrumbDropDown = () => {@@ -71,7 +58,7 @@ export const SettingsDataModelNewFieldBreadcrumbDropDown = () => {const location = useLocation();const { objectNamePlural = '' } = useParams();const [searchParams] = useSearchParams();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const fieldType = searchParams.get('fieldType') as SettingsFieldType;const isConfigureStep = location.pathname.includes('/configure');@@ -113,14 +100,14 @@ export const SettingsDataModelNewFieldBreadcrumbDropDown = () => {<DropdownContent><DropdownMenuItemsContainer><StyledMenuItemWrapper>- <StyledMenuItem+ <MenuItemtext={t`1. Type`}onClick={() => handleClick('select')}selected={!isConfigureStep}/></StyledMenuItemWrapper><StyledMenuItemWrapper disabled={!isDefined(fieldType)}>- <StyledMenuItem+ <MenuItemtext={t`2. Configure`}onClick={() => handleClick('configure')}selected={isConfigureStep}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 488e307975c..1f288b3b79e 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@@ -1,9 +1,10 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { StyledFormCardTitle } from '@/settings/data-model/fields/components/StyledFormCardTitle';import { Trans } from '@lingui/react/macro';import { Card, CardContent } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsDataModelPreviewFormCardProps = {className?: string;@@ -13,7 +14,7 @@ type SettingsDataModelPreviewFormCardProps = {};const StyledPreviewContainer = styled(CardContent)`- background-color: ${({ theme }) => theme.background.transparent.lighter};+ background-color: ${themeCssVariables.background.transparent.lighter};`;const StyledFormContainer = styled(CardContent)`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 03d4ebb9152..c60949322b5 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,9 +1,10 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';export const StyledFormCardTitle = styled.h3`- color: ${({ theme }) => theme.font.color.extraLight};- font-size: ${({ theme }) => theme.font.size.sm};- font-weight: ${({ theme }) => theme.font.weight.medium};+ color: ${themeCssVariables.font.color.extraLight};+ font-size: ${themeCssVariables.font.size.sm};+ font-weight: ${themeCssVariables.font.weight.medium};margin: 0;- margin-bottom: ${({ theme }) => theme.spacing(4)};+ margin-bottom: ${themeCssVariables.spacing[4]};`;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 45512b62586..d95bb33d1bc 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,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Controller, useFormContext } from 'react-hook-form';import { type z } from 'zod';@@ -11,8 +11,8 @@ import { DATABASE_IDENTIFIER_MAXIMUM_LENGTH } from '@/settings/data-model/constaimport { getErrorMessageFromError } from '@/settings/data-model/fields/forms/utils/errorMessages';import { IconPicker } from '@/ui/input/components/IconPicker';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import { useTheme } from '@emotion/react';import { useLingui } from '@lingui/react/macro';+import { useContext } from 'react';import { FieldMetadataType } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import {@@ -22,6 +22,8 @@ import {TooltipDelay,} from 'twenty-ui/display';import { Card } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { computeMetadataNameFromLabel } from '~/pages/settings/data-model/utils/computeMetadataNameFromLabel';export const settingsDataModelFieldIconLabelFormSchema = (@@ -48,26 +50,26 @@ type SettingsDataModelFieldIconLabelFormValues = z.infer<const StyledInputsContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[1]};width: 100%;`;const StyledAdvancedSettingsSectionInputWrapper = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};width: 100%;flex: 1;`;const StyledAdvancedSettingsOuterContainer = styled.div`- padding-top: ${({ theme }) => theme.spacing(4)};+ padding-top: ${themeCssVariables.spacing[4]};`;const StyledAdvancedSettingsContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};position: relative;width: 100%;`;@@ -93,7 +95,7 @@ export const SettingsDataModelFieldIconLabelForm = ({trigger,} = useFormContext<SettingsDataModelFieldIconLabelFormValues>();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const label = watch('label');@@ -126,15 +128,12 @@ export const SettingsDataModelFieldIconLabelForm = ({const isCustomButNotRelationField =fieldMetadataItem?.isCustom === true && !isRelation;- // TODO: remove the custom RELATION edge case, this will result in canToggleSyncLabelWithName = isCustomconst canToggleSyncLabelWithName =!isCreationMode && isCustomButNotRelationField;- // TODO: remove custom RELATION edge case, this will result in isNameEditEnabled = isCustomconst isNameEditEnabled =isLabelSyncedWithName === false && isCustomButNotRelationField;- // TODO: remove custom RELATION edge case, this will result in isLabelEditEnabled = trueconst isLabelEditEnabled =isCreationMode ||(!isCreationMode &&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 23346d0eaa8..c724426fbfb 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@@ -10,16 +10,17 @@ import { useSelectSettingsFormInitialValues } from '@/settings/data-model/fieldsimport { type FieldType } from '@/settings/data-model/types/FieldType';import { type SettingsFieldType } from '@/settings/data-model/types/SettingsFieldType';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Section } from '@react-email/components';-import { useState } from 'react';+import { useContext, useState } from 'react';import { Controller, useFormContext } from 'react-hook-form';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { H2Title, IconSearch } from 'twenty-ui/display';import { UndecoratedLink } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { FieldMetadataType } from '~/generated-metadata/graphql';import { type SettingsDataModelFieldTypeFormValues } from '~/pages/settings/data-model/new-field/SettingsObjectNewFieldSelect';@@ -43,7 +44,7 @@ const StyledTypeSelectContainer = styled.div`const StyledContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};justify-content: flex-start;flex-wrap: wrap;width: 100%;@@ -53,7 +54,7 @@ const StyledCardContainer = styled.div`display: flex;position: relative;- width: calc(50% - ${({ theme }) => theme.spacing(1)});+ width: calc(50% - ${themeCssVariables.spacing[1]});`;const StyledSearchInput = styled(SettingsTextInput)`@@ -64,7 +65,7 @@ export const SettingsObjectNewFieldSelector = ({excludedFieldTypes = [],objectNamePlural,}: SettingsObjectNewFieldSelectorProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { control, setValue } =useFormContext<SettingsDataModelFieldTypeFormValues>();const [searchQuery, setSearchQuery] = useState('');@@ -132,8 +133,6 @@ export const SettingsObjectNewFieldSelector = ({<StyledContainer>{fieldTypeConfigs.filter(([, config]) => config.category === category)- // by default, we hide the relation type and create only the morph relation type- // on submit the new field, we choose the relation type based on the amount of target object.filter(([key]) => key !== FieldMetadataType.RELATION).map(([key, config]) =>diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/__stories__/SettingsDataModelFieldIconLabelForm.stories.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/__stories__/SettingsDataModelFieldIconLabelForm.stories.tsxindex 2bbab3988b3..a3984ac2e0c 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/__stories__/SettingsDataModelFieldIconLabelForm.stories.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/__stories__/SettingsDataModelFieldIconLabelForm.stories.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { FormProviderDecorator } from '~/testing/decorators/FormProviderDecorator';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 6e7a34d719e..885d2015a79 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@@ -10,10 +10,11 @@ import { useDateSettingsFormInitialValues } from '@/settings/data-model/fields/fimport { getDisplayFormatLabel } from '@/settings/data-model/fields/forms/date/utils/getDisplayFormatLabel';import { Select } from '@/ui/input/components/Select';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconSlash } from 'twenty-ui/display';import { AnimatedExpandableContainer } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const fieldDateSettings = z.discriminatedUnion('displayFormat', [z.object({@@ -33,7 +34,7 @@ export const settingsDataModelFieldDateFormSchema = z.object({});const StyledTextInput = styled(SettingsTextInput)`- padding: ${({ theme }) => theme.spacing(4)};+ padding: ${themeCssVariables.spacing[4]};padding-top: 0;`;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 2637b36181d..26f75ba4775 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@@ -15,28 +15,29 @@ import { IconPicker } from '@/ui/input/components/IconPicker';import { Select } from '@/ui/input/components/Select';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';-import styled from '@emotion/styled';+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 { RelationType } from '~/generated-metadata/graphql';const StyledSelectsContainer = styled.div<{ isMobile: boolean }>`display: grid;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};grid-template-columns: ${({ isMobile }) => (isMobile ? '1fr' : '1fr 1fr')};- margin-bottom: ${({ theme }) => theme.spacing(4)};+ margin-bottom: ${themeCssVariables.spacing[4]};`;const StyledInputsLabel = styled.span`- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};display: block;- font-size: ${({ theme }) => theme.font.size.xs};- font-weight: ${({ theme }) => theme.font.weight.semiBold};- margin-bottom: ${({ theme }) => theme.spacing(1)};+ font-size: ${themeCssVariables.font.size.xs};+ font-weight: ${themeCssVariables.font.weight.semiBold};+ margin-bottom: ${themeCssVariables.spacing[1]};`;const StyledInputsContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};width: 100%;`;diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationPreviewContent.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationPreviewContent.tsxindex eb397d88d5f..476dc78b207 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationPreviewContent.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationPreviewContent.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode } from 'react';const StyledPreviewContent = styled.div<{ isMobile: boolean }>`diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationPreviewImageCard.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationPreviewImageCard.tsxindex 6557428dbdd..1554d0d04d2 100644--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationPreviewImageCard.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationPreviewImageCard.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledRelationImage = styled.img<{flip?: 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 319f4905762..24efee2b6df 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type DropResult } from '@hello-pangea/dnd';import { Controller, useFormContext } from 'react-hook-form';import { z } from 'zod';@@ -29,9 +29,8 @@ import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/Geneimport { 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 { useTheme } from '@emotion/react';import { t } from '@lingui/core/macro';-import { useEffect, useState } from 'react';+import { useContext, useEffect, useState } from 'react';import { useSearchParams } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import {@@ -44,6 +43,8 @@ import {import { LightButton, LightIconButton } from 'twenty-ui/input';import { CardContent, CardFooter } from 'twenty-ui/layout';import { MenuItem } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { SettingsDataModelFieldSelectFormOptionRow } from './SettingsDataModelFieldSelectFormOptionRow';export const settingsDataModelFieldSelectFormSchema = z.object({@@ -75,29 +76,30 @@ const StyledOptionsLabel = styled.div<{isAdvancedModeEnabled: boolean;isBulkInputMode: boolean;}>`- color: ${({ theme }) => theme.font.color.light};- font-size: ${({ theme }) => theme.font.size.xs};- font-weight: ${({ theme }) => theme.font.weight.semiBold};- margin-bottom: ${({ theme }) => theme.spacing(1.5)};- margin-top: ${({ theme }) => theme.spacing(1)};+ color: ${themeCssVariables.font.color.light};+ font-size: ${themeCssVariables.font.size.xs};+ font-weight: ${themeCssVariables.font.weight.semiBold};+ margin-bottom: ${themeCssVariables.spacing['1.5']};+ margin-top: ${themeCssVariables.spacing[1]};width: 100%;- margin-left: ${({ theme, isAdvancedModeEnabled, isBulkInputMode }) =>- theme.spacing(isAdvancedModeEnabled && !isBulkInputMode ? 10 : 0)};-};+ margin-left: ${({ isAdvancedModeEnabled, isBulkInputMode }) =>+ isAdvancedModeEnabled && !isBulkInputMode+ ? themeCssVariables.spacing[10]+ : themeCssVariables.spacing[0]};`;const StyledApiKeyContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};width: 100%;`;const StyledApiKey = styled.span`- color: ${({ theme }) => theme.font.color.light};- font-size: ${({ theme }) => theme.font.size.xs};- font-weight: ${({ theme }) => theme.font.weight.semiBold};- margin-bottom: ${({ theme }) => theme.spacing(1.5)};- margin-top: ${({ theme }) => theme.spacing(1)};+ color: ${themeCssVariables.font.color.light};+ font-size: ${themeCssVariables.font.size.xs};+ font-weight: ${themeCssVariables.font.weight.semiBold};+ margin-bottom: ${themeCssVariables.spacing['1.5']};+ margin-top: ${themeCssVariables.spacing[1]};width: 100%;white-space: nowrap;@@ -111,20 +113,20 @@ const StyledLabelContainer = styled.div`const StyledIconContainer = styled.div`align-items: center;- border-right: 1px solid ${({ theme }) => theme.color.yellow};+ border-right: 1px solid ${themeCssVariables.color.yellow};display: flex;- margin-bottom: ${({ theme }) => theme.spacing(1.5)};- margin-top: ${({ theme }) => theme.spacing(1)};+ margin-bottom: ${themeCssVariables.spacing['1.5']};+ margin-top: ${themeCssVariables.spacing[1]};`;const StyledIconPoint = styled(IconPoint)`- margin-right: ${({ theme }) => theme.spacing(0.5)};+ margin-right: ${themeCssVariables.spacing['0.5']};`;const StyledFooter = styled(CardFooter)`- background-color: ${({ theme }) => theme.background.secondary};- padding: ${({ theme }) => theme.spacing(1)};+ background-color: ${themeCssVariables.background.secondary};+ padding: ${themeCssVariables.spacing[1]};`;const StyledButton = styled(LightButton)`@@ -136,20 +138,20 @@ const StyledOptionsHeaderContainer = styled.div`display: flex;align-items: center;justify-content: space-between;- margin-bottom: ${({ theme }) => theme.spacing(1.5)};- margin-top: ${({ theme }) => theme.spacing(1)};+ margin-bottom: ${themeCssVariables.spacing['1.5']};+ margin-top: ${themeCssVariables.spacing[1]};width: 100%;`;const StyledTextAreaContainer = styled.div`- margin-bottom: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${themeCssVariables.spacing[2]};`;const StyledHelpText = styled.div`- color: ${({ theme }) => theme.font.color.light};- font-size: ${({ theme }) => theme.font.size.xs};- margin-top: ${({ theme }) => theme.spacing(1)};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.light};+ font-size: ${themeCssVariables.font.size.xs};+ margin-top: ${themeCssVariables.spacing[1]};+ margin-bottom: ${themeCssVariables.spacing[2]};`;export const SettingsDataModelFieldSelectForm = ({@@ -300,7 +302,7 @@ export const SettingsDataModelFieldSelectForm = ({setFormValue('options', newOptions, { shouldDirty: true });};- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<>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 201c9be3110..0a23e86c769 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@@ -6,8 +6,8 @@ import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import {ColorSample,@@ -23,7 +23,8 @@ import {MenuItem,MenuItemSelectColor,} from 'twenty-ui/navigation';-import { MAIN_COLOR_NAMES } from 'twenty-ui/theme';+import { MAIN_COLOR_NAMES, ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { computeOptionValueFromLabel } from '~/pages/settings/data-model/utils/computeOptionValueFromLabel';const useColorLabels = (): ColorLabels => ({@@ -70,24 +71,25 @@ type SettingsDataModelFieldSelectFormOptionRowProps = {const StyledRow = styled.div`align-items: center;display: flex;- height: ${({ theme }) => theme.spacing(6)};- padding: ${({ theme }) => theme.spacing(1.5)} 0;+ height: ${themeCssVariables.spacing[6]};+ padding: ${themeCssVariables.spacing['1.5']} 0;`;const StyledColorSample = styled(ColorSample)`cursor: pointer;- margin-top: ${({ theme }) => theme.spacing(1)};- margin-bottom: ${({ theme }) => theme.spacing(1)};+ margin-top: ${themeCssVariables.spacing[1]};+ margin-bottom: ${themeCssVariables.spacing[1]};margin-right: 14px;margin-left: 14px;`;-const StyledOptionInput = styled(SettingsTextInput)`Chip+const StyledOptionInputContainer = styled.div`flex-grow: 1;width: 100%;+& input {- height: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};}`;@@ -96,7 +98,7 @@ const StyledIconGripVertical = styled(IconGripVertical)``;const StyledLightIconButton = styled(LightIconButton)`- margin-left: ${({ theme }) => theme.spacing(2)};+ margin-left: ${themeCssVariables.spacing[2]};`;export const SettingsDataModelFieldSelectFormOptionRow = ({@@ -111,7 +113,7 @@ export const SettingsDataModelFieldSelectFormOptionRow = ({isNewRow,fieldIsNullable,}: SettingsDataModelFieldSelectFormOptionRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const colorLabels = useColorLabels();const SELECT_COLOR_DROPDOWN_ID = `select-color-dropdown-${option.id}`;const SELECT_ACTIONS_DROPDOWN_ID = `select-actions-dropdown-${option.id}`;@@ -134,18 +136,20 @@ export const SettingsDataModelFieldSelectFormOptionRow = ({color={theme.font.color.extraLight}/><AdvancedSettingsWrapper animationDimension="width" hideDot>- <StyledOptionInput- instanceId={`select-option-value-${option.id}`}- value={option.value}- onChange={(input) =>- onChange({- ...option,- value: computeOptionValueFromLabel(input),- })- }- RightIcon={isDefault ? IconCheck : undefined}- maxLength={OPTION_VALUE_MAXIMUM_LENGTH}- />+ <StyledOptionInputContainer>+ <SettingsTextInput+ instanceId={`select-option-value-${option.id}`}+ value={option.value}+ onChange={(input) =>+ onChange({+ ...option,+ value: computeOptionValueFromLabel(input),+ })+ }+ RightIcon={isDefault ? IconCheck : undefined}+ maxLength={OPTION_VALUE_MAXIMUM_LENGTH}+ />+ </StyledOptionInputContainer></AdvancedSettingsWrapper><DropdowndropdownId={SELECT_COLOR_DROPDOWN_ID}@@ -170,27 +174,29 @@ export const SettingsDataModelFieldSelectFormOptionRow = ({</DropdownContent>}/>- <StyledOptionInput- instanceId={`select-option-label-${option.id}`}- value={option.label}- onChange={(label) => {- const optionNameHasBeenEdited = !(- option.value === computeOptionValueFromLabel(option.label)- );- onChange({- ...option,- label,- value: optionNameHasBeenEdited- ? option.value- : computeOptionValueFromLabel(label),- });- }}- RightIcon={isDefault ? IconCheck : undefined}- maxLength={OPTION_VALUE_MAXIMUM_LENGTH}- onInputEnter={handleInputEnter}- autoFocusOnMount={isNewRow}- autoSelectOnMount={isNewRow}- />+ <StyledOptionInputContainer>+ <SettingsTextInput+ instanceId={`select-option-label-${option.id}`}+ value={option.label}+ onChange={(label) => {+ const optionNameHasBeenEdited = !(+ option.value === computeOptionValueFromLabel(option.label)+ );+ onChange({+ ...option,+ label,+ value: optionNameHasBeenEdited+ ? option.value+ : computeOptionValueFromLabel(label),+ });+ }}+ RightIcon={isDefault ? IconCheck : undefined}+ maxLength={OPTION_VALUE_MAXIMUM_LENGTH}+ onInputEnter={handleInputEnter}+ autoFocusOnMount={isNewRow}+ autoSelectOnMount={isNewRow}+ />+ </StyledOptionInputContainer><DropdowndropdownId={SELECT_ACTIONS_DROPDOWN_ID}dropdownPlacement="right-start"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 44f6a92d180..b0f19d0b7b2 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@@ -1,5 +1,5 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { useLabelIdentifierFieldMetadataItem } from '@/object-metadata/hooks/useLabelIdentifierFieldMetadataItem';import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';@@ -13,6 +13,8 @@ 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/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { FieldMetadataType } from '~/generated-metadata/graphql';type SettingsDataModelFieldPreviewProps = {@@ -27,27 +29,28 @@ type SettingsDataModelFieldPreviewProps = {const StyledFieldPreview = styled.div<{ shrink?: boolean }>`align-items: center;- background-color: ${({ theme }) => theme.background.primary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.primary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};height: fit-content;line-height: 24px;overflow: hidden;padding: 0- ${({ shrink, theme }) => (shrink ? theme.spacing(1) : theme.spacing(2))};+ ${({ shrink }) =>+ shrink ? themeCssVariables.spacing[1] : themeCssVariables.spacing[2]};white-space: nowrap;- margin-top: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};- padding-bottom: ${({ theme }) => theme.spacing(2)};+ margin-top: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};+ padding-bottom: ${themeCssVariables.spacing[2]};`;const StyledFieldLabel = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;export const SettingsDataModelFieldPreview = ({@@ -56,7 +59,7 @@ export const SettingsDataModelFieldPreview = ({shrink,withFieldLabel = true,}: SettingsDataModelFieldPreviewProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { labelIdentifierFieldMetadataItem } =useLabelIdentifierFieldMetadataItem({objectNameSingular: objectNameSingular,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 6ac54e27fb0..a62169982e0 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@@ -1,10 +1,11 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';import { SettingsDataModelFieldPreview } from '@/settings/data-model/fields/preview/components/SettingsDataModelFieldPreview';import { SettingsDataModelObjectPreview } from '@/settings/data-model/objects/components/SettingsDataModelObjectSummary';import { Card, CardContent } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { computeMetadataNameFromLabel } from '~/pages/settings/data-model/utils/computeMetadataNameFromLabel';type SettingsDataModelFieldPreviewWidgetProps = {@@ -21,12 +22,12 @@ type SettingsDataModelFieldPreviewWidgetProps = {};const StyledCard = styled(Card)`- border-radius: ${({ theme }) => theme.border.radius.md};- color: ${({ theme }) => theme.font.color.primary};+ border-radius: ${themeCssVariables.border.radius.md};+ color: ${themeCssVariables.font.color.primary};`;const StyledCardContent = styled(CardContent)`- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};`;export const SettingsDataModelFieldPreviewWidget = ({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 3888acecdf7..7051450afb1 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@@ -1,5 +1,5 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';@@ -11,6 +11,8 @@ 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/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { v4 } from 'uuid';import { FieldMetadataType } from '~/generated-metadata/graphql';@@ -26,27 +28,28 @@ type SettingsDataModelRelationFieldPreviewProps = {const StyledFieldPreview = styled.div<{ shrink?: boolean }>`align-items: center;- background-color: ${({ theme }) => theme.background.primary};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.primary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};height: fit-content;line-height: 24px;overflow: hidden;padding: 0- ${({ shrink, theme }) => (shrink ? theme.spacing(1) : theme.spacing(2))};+ ${({ shrink }) =>+ shrink ? themeCssVariables.spacing[1] : themeCssVariables.spacing[2]};white-space: nowrap;- margin-top: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};- padding-bottom: ${({ theme }) => theme.spacing(2)};+ margin-top: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};+ padding-bottom: ${themeCssVariables.spacing[2]};`;const StyledFieldLabel = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;export const SettingsDataModelRelationFieldPreview = ({@@ -60,7 +63,7 @@ export const SettingsDataModelRelationFieldPreview = ({objectNameSingular: relationTargetObjectNameSingular,});- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 472155ee9fd..975d0bf0120 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';@@ -6,6 +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/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';export type SettingsDataModelRelationFieldPreviewSubWidgetProps = {fieldMetadataItem: Pick<@@ -21,13 +22,13 @@ export type SettingsDataModelRelationFieldPreviewSubWidgetProps = {};const StyledCard = styled(Card)`- border-radius: ${({ theme }) => theme.border.radius.md};- color: ${({ theme }) => theme.font.color.primary};+ border-radius: ${themeCssVariables.border.radius.md};+ color: ${themeCssVariables.font.color.primary};margin: auto;`;const StyledCardContent = styled(CardContent)`- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};`;export const SettingsDataModelRelationFieldPreviewSubWidget = ({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 24b463d70a7..a294e465526 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@@ -2,7 +2,7 @@ import { SettingsDataModelOverviewEffect } from '@/settings/data-model/graph-oveimport { SettingsDataModelOverviewObject } from '@/settings/data-model/graph-overview/components/SettingsDataModelOverviewObject';import { SettingsDataModelOverviewRelationMarkers } from '@/settings/data-model/graph-overview/components/SettingsDataModelOverviewRelationMarkers';import { calculateHandlePosition } from '@/settings/data-model/graph-overview/utils/calculateHandlePosition';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {Background,type Edge,@@ -31,6 +31,7 @@ import {IconX,} from 'twenty-ui/display';import { Button, IconButtonGroup } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const nodeTypes: NodeTypes = {object: SettingsDataModelOverviewObject,@@ -63,8 +64,8 @@ const StyledContainer = styled.div`const StyledCloseButton = styled.div`position: absolute;- top: ${({ theme }) => theme.spacing(3)};- left: ${({ theme }) => theme.spacing(3)};+ top: ${themeCssVariables.spacing[3]};+ left: ${themeCssVariables.spacing[3]};z-index: 5;`;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 605e35552c6..5aef1c2aabc 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@@ -1,9 +1,9 @@-import { useTheme } from '@emotion/react';import { type Edge, type Node } from '@xyflow/react';-import { useEffect } from 'react';+import { useContext, useEffect } from 'react';import { useFilteredObjectMetadataItems } from '@/object-metadata/hooks/useFilteredObjectMetadataItems';import { isDefined } from 'twenty-shared/utils';+import { ThemeContext } from 'twenty-ui/theme';import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';type SettingsDataModelOverviewEffectProps = {@@ -15,7 +15,7 @@ export const SettingsDataModelOverviewEffect = ({setEdges,setNodes,}: SettingsDataModelOverviewEffectProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { activeNonSystemObjectMetadataItems: items } =useFilteredObjectMetadataItems();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 b3e2a07d79a..b53ba6af1dc 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@@ -1,10 +1,12 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Handle, Position } from '@xyflow/react';import { objectMetadataItemsState } from '@/object-metadata/states/objectMetadataItemsState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';+import { useContext } from 'react';import { useIcons } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RelationType } from '~/generated-metadata/graphql';type ObjectFieldRowProps = {@@ -14,20 +16,20 @@ type ObjectFieldRowProps = {const StyledRow = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};position: relative;width: 100%;- padding: 0 ${({ theme }) => theme.spacing(2)};+ padding: 0 ${themeCssVariables.spacing[2]};`;const StyledFieldName = styled.div`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};`;export const ObjectFieldRow = ({ field }: ObjectFieldRowProps) => {const objectMetadataItems = useAtomStateValue(objectMetadataItemsState);const { getIcon } = useIcons();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 e61bbcde447..3a9a002c59c 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@@ -1,8 +1,10 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';import { useIcons } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type ObjectFieldRowWithoutRelationProps = {field: FieldMetadataItem;@@ -11,21 +13,21 @@ type ObjectFieldRowWithoutRelationProps = {const StyledRow = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};position: relative;width: 100%;- padding: 0 ${({ theme }) => theme.spacing(2)};+ padding: 0 ${themeCssVariables.spacing[2]};`;const StyledFieldName = styled.div`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};`;export const ObjectFieldRowWithoutRelation = ({field,}: ObjectFieldRowWithoutRelationProps) => {const { getIcon } = useIcons();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 26f122f0b81..753d09e7394 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,5 +1,5 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext, useState } from 'react';+import { styled } from '@linaria/react';import { type Node, type NodeProps } from '@xyflow/react';import { Link } from 'react-router-dom';@@ -11,26 +11,27 @@ import { FieldMetadataType } from '~/generated-metadata/graphql';import { ObjectFieldRowWithoutRelation } from '@/settings/data-model/graph-overview/components/SettingsDataModelOverviewFieldWithoutRelation';import '@xyflow/react/dist/style.css';-import { useState } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconChevronDown, IconChevronUp, useIcons } from 'twenty-ui/display';import { SettingsItemTypeTag } from '@/settings/components/SettingsItemTypeTag';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsDataModelOverviewObjectNode = Node<ObjectMetadataItem, 'object'>;type SettingsDataModelOverviewObjectProps =NodeProps<SettingsDataModelOverviewObjectNode>;const StyledNode = styled.div`- background-color: ${({ theme }) => theme.background.secondary};- border-radius: ${({ theme }) => theme.border.radius.md};+ background-color: ${themeCssVariables.background.secondary};+ border-radius: ${themeCssVariables.border.radius.md};display: flex;flex-direction: column;width: 220px;- padding: ${({ theme }) => theme.spacing(2)};- gap: ${({ theme }) => theme.spacing(2)};- border: 1px solid ${({ theme }) => theme.border.color.medium};- box-shadow: ${({ theme }) => theme.boxShadow.light};+ padding: ${themeCssVariables.spacing[2]};+ gap: ${themeCssVariables.spacing[2]};+ border: 1px solid ${themeCssVariables.border.color.medium};+ box-shadow: ${themeCssVariables.boxShadow.light};`;const StyledHeader = styled.div`@@ -43,29 +44,28 @@ const StyledObjectName = styled.div`border: 0;border-radius: 4px 4px 0 0;display: flex;- font-weight: ${({ theme }) => theme.font.weight.medium};- gap: ${({ theme }) => theme.spacing(1)};+ font-weight: ${themeCssVariables.font.weight.medium};+ gap: ${themeCssVariables.spacing[1]};position: relative;text-align: center;`;const StyledInnerCard = styled.div`- border: 1px solid ${({ theme }) => theme.border.color.light};- background-color: ${({ theme }) => theme.background.primary};- border-radius: ${({ theme }) => theme.border.radius.sm};- padding: ${({ theme }) => theme.spacing(2)} 0- ${({ theme }) => theme.spacing(2)} 0;+ border: 1px solid ${themeCssVariables.border.color.light};+ background-color: ${themeCssVariables.background.primary};+ border-radius: ${themeCssVariables.border.radius.sm};+ padding: ${themeCssVariables.spacing[2]} 0 ${themeCssVariables.spacing[2]} 0;display: flex;flex-flow: column nowrap;- gap: ${({ theme }) => theme.spacing(0.5)};- color: ${({ theme }) => theme.font.color.tertiary};+ gap: ${themeCssVariables.spacing['0.5']};+ color: ${themeCssVariables.font.color.tertiary};`;const StyledCardRow = styled.div`align-items: center;display: flex;height: 24px;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledCardRowOther = styled.div`@@ -73,36 +73,36 @@ const StyledCardRowOther = styled.div`cursor: pointer;display: flex;height: 24px;- padding: 0 ${({ theme }) => theme.spacing(2)};- gap: ${({ theme }) => theme.spacing(2)};+ padding: 0 ${themeCssVariables.spacing[2]};+ gap: ${themeCssVariables.spacing[2]};&:hover {- background-color: ${({ theme }) => theme.background.tertiary};+ background-color: ${themeCssVariables.background.tertiary};}`;const StyledCardRowText = styled.div``;const StyledObjectInstanceCount = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;const StyledObjectLink = styled(Link)`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};text-decoration: none;- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};&:hover {- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};}`;export const SettingsDataModelOverviewObject = ({data: objectMetadataItem,}: SettingsDataModelOverviewObjectProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { getIcon } = useIcons();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 bc36c6c937a..161b262512f 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,8 @@-import { useTheme } from '@emotion/react';+import { useContext } from 'react';+import { ThemeContext } from 'twenty-ui/theme';export const SettingsDataModelOverviewRelationMarkers = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<svg style={{ position: 'absolute', top: 0, left: 0 }}><defs>diff --git a/packages/twenty-front/src/modules/settings/data-model/new-object/components/SettingsAvailableStandardObjectItemTableRow.tsx b/packages/twenty-front/src/modules/settings/data-model/new-object/components/SettingsAvailableStandardObjectItemTableRow.tsxindex 3ff8b1aaed3..f63a445a4d5 100644--- a/packages/twenty-front/src/modules/settings/data-model/new-object/components/SettingsAvailableStandardObjectItemTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/new-object/components/SettingsAvailableStandardObjectItemTableRow.tsx@@ -1,11 +1,13 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { Checkbox } from 'twenty-ui/input';import { useIcons } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsAvailableStandardObjectItemTableRowProps = {isSelected?: boolean;@@ -20,12 +22,12 @@ export const StyledAvailableStandardObjectTableRow = styled(TableRow)`const StyledCheckboxTableCell = styled(TableCell)`justify-content: center;padding: 0;- padding-left: ${({ theme }) => theme.spacing(1)};+ padding-left: ${themeCssVariables.spacing[1]};`;const StyledNameTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.primary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ gap: ${themeCssVariables.spacing[2]};`;const StyledDescription = styled.div`@@ -39,7 +41,7 @@ export const SettingsAvailableStandardObjectItemTableRow = ({objectItem,onClick,}: SettingsAvailableStandardObjectItemTableRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { getIcon } = useIcons();const Icon = getIcon(objectItem.icon);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 1a035e489f8..aa397fca09a 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@@ -1,10 +1,12 @@-import { css, useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';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/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsObjectFieldDataTypeProps = {to?: string;@@ -21,28 +23,26 @@ const StyledDataType = styled.div<{}>`align-items: center;border: 1px solid transparent;- border-radius: ${({ theme }) => theme.border.radius.sm};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${({ to }) =>+ to+ ? themeCssVariables.font.color.secondary+ : themeCssVariables.font.color.primary};+ cursor: ${({ to }) => (to ? 'pointer' : 'default')};display: flex;- font-size: ${({ theme }) => theme.font.size.sm};- gap: ${({ theme }) => theme.spacing(2)};+ font-size: ${themeCssVariables.font.size.sm};+ gap: ${themeCssVariables.spacing[2]};height: 20px;overflow: hidden;- text-decoration: none;-+ text-decoration: ${({ to }) => (to ? 'underline' : 'none')};user-select: none;- ${({ to, theme }) =>- to- ? css`- cursor: pointer;- color: ${theme.font.color.secondary};- text-decoration: underline;-- &:hover {- color: ${theme.font.color.primary};- }- `- : ''}+ &:hover {+ color: ${({ to }) =>+ to+ ? themeCssVariables.font.color.primary+ : themeCssVariables.font.color.primary};+ }`;const StyledLabelContainer = styled.div`@@ -51,8 +51,13 @@ const StyledLabelContainer = styled.div`white-space: nowrap;`;+const StyledIconWrapper = styled.div`+ display: flex;+ flex: 1 0 auto;+`;+const StyledSpan = styled.span`- color: ${({ theme }) => theme.font.color.extraLight};+ color: ${themeCssVariables.font.color.extraLight};`;export const SettingsObjectFieldDataType = ({to,@@ -62,17 +67,13 @@ export const SettingsObjectFieldDataType = ({labelDetail,onClick,}: SettingsObjectFieldDataTypeProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const fieldTypeConfig = getSettingsFieldTypeConfig(value);const Icon: IconComponent =IconFromProps ?? fieldTypeConfig?.Icon ?? IconTwentyStar;const label = labelFromProps ?? fieldTypeConfig?.label;- const StyledIcon = styled(Icon)`- flex: 1 0 auto;- `;-return (<StyledDataTypeas={to ? Link : 'div'}@@ -80,7 +81,9 @@ export const SettingsObjectFieldDataType = ({value={value}onClick={onClick}>- <StyledIcon size={theme.icon.size.sm} />+ <StyledIconWrapper>+ <Icon size={theme.icon.size.sm} />+ </StyledIconWrapper><StyledLabelContainer>{label} <StyledSpan>{labelDetail && `· ${labelDetail}`}</StyledSpan></StyledLabelContainer>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 e8a0e7001d0..8b817104fba 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@@ -10,11 +10,10 @@ import { settingsObjectFieldsFamilyState } from '@/settings/data-model/object-deimport { isFieldTypeSupportedInSettings } from '@/settings/data-model/utils/isFieldTypeSupportedInSettings';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext, useMemo } from 'react';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';-import { useMemo } from 'react';import { FieldMetadataType, SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import {@@ -25,6 +24,8 @@ import {} from 'twenty-ui/display';import { LightIconButton } from 'twenty-ui/input';import { UndecoratedLink } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { RelationType } from '~/generated-metadata/graphql';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { type SettingsObjectDetailTableItem } from '~/pages/settings/data-model/types/SettingsObjectDetailTableItem';@@ -41,8 +42,8 @@ export const StyledObjectFieldTableRow = styled(TableRow)``;const StyledNameTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.primary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ gap: ${themeCssVariables.spacing[2]};`;const StyledNameContainer = styled.div`@@ -50,7 +51,7 @@ const StyledNameContainer = styled.div`align-items: center;flex: 1;min-width: 0;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledNameLabel = styled.div`@@ -60,8 +61,8 @@ const StyledNameLabel = styled.div``;const StyledInactiveLabel = styled.span`- color: ${({ theme }) => theme.font.color.extraLight};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.extraLight};+ font-size: ${themeCssVariables.font.size.sm};white-space: nowrap;text-overflow: ellipsis;overflow: hidden;@@ -70,17 +71,17 @@ const StyledInactiveLabel = styled.span`&::before {content: '·';- margin-right: ${({ theme }) => theme.spacing(1)};+ margin-right: ${themeCssVariables.spacing[1]};}`;const StyledIconTableCell = styled(TableCell)`justify-content: center;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;const StyledIconChevronRight = styled(IconChevronRight)`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;export const SettingsObjectFieldItemTableRow = ({@@ -98,7 +99,7 @@ export const SettingsObjectFieldItemTableRow = ({const navigate = useNavigateSettings();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { getIcon } = useIcons();const Icon = getIcon(fieldMetadataItem.icon);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 c2bc2bbb9c3..9c97e1f24a0 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,7 +1,6 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext, type ReactNode } from 'react';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type ReactNode } from 'react';import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';import { isHiddenSystemField } from '@/object-metadata/utils/isHiddenSystemField';@@ -13,6 +12,8 @@ import {} from '@/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents';import { TableCell } from '@/ui/layout/table/components/TableCell';import { useIcons } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';export type SettingsObjectMetadataItemTableRowProps = {action: ReactNode;@@ -26,7 +27,7 @@ const StyledNameContainer = styled.div`align-items: center;flex: 1;min-width: 0;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledNameLabel = styled.div`@@ -36,8 +37,8 @@ const StyledNameLabel = styled.div``;const StyledInactiveLabel = styled.span`- color: ${({ theme }) => theme.font.color.extraLight};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.extraLight};+ font-size: ${themeCssVariables.font.size.sm};white-space: nowrap;text-overflow: ellipsis;overflow: hidden;@@ -46,7 +47,7 @@ const StyledInactiveLabel = styled.span`&::before {content: '·';- margin-right: ${({ theme }) => theme.spacing(1)};+ margin-right: ${themeCssVariables.spacing[1]};}`;@@ -57,7 +58,7 @@ export const SettingsObjectMetadataItemTableRow = ({totalObjectCount,}: SettingsObjectMetadataItemTableRowProps) => {const { t } = useLingui();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { getIcon } = useIcons();const Icon = getIcon(objectMetadataItem.icon);diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.ts b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.tsindex 50feb0bc9c8..a5491d4fe2d 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.ts+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectItemTableRowStyledComponents.ts@@ -1,7 +1,8 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';+import { themeCssVariables } from 'twenty-ui/theme-constants';export const SETTINGS_OBJECT_TABLE_COLUMN_WIDTH = '98.7px';@@ -10,11 +11,11 @@ export const StyledObjectTableRow = styled(TableRow)``;export const StyledNameTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.primary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ gap: ${themeCssVariables.spacing[2]};`;export const StyledActionTableCell = styled(TableCell)`justify-content: center;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;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 eb6016391c9..eacaee23fc2 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@@ -9,15 +9,16 @@ import { RELATION_TYPES } from '@/settings/data-model/constants/RelationTypes';import { SettingsObjectFieldInactiveActionDropdown } from '@/settings/data-model/object-details/components/SettingsObjectFieldDisabledActionDropdown';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { useMemo } from 'react';+import { useContext, useMemo } from 'react';import { Link } from 'react-router-dom';import { FieldMetadataType, SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';import { IconChevronRight, useIcons } from 'twenty-ui/display';import { UndecoratedLink } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useNavigateSettings } from '~/hooks/useNavigateSettings';type SettingsObjectRelationItemTableRowProps = {@@ -30,8 +31,8 @@ export const StyledObjectRelationTableRow = styled(TableRow)``;const StyledNameTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.primary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ gap: ${themeCssVariables.spacing[2]};`;const StyledNameContainer = styled.div`@@ -39,7 +40,7 @@ const StyledNameContainer = styled.div`align-items: center;flex: 1;min-width: 0;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledNameLabel = styled.div`@@ -49,8 +50,8 @@ const StyledNameLabel = styled.div``;const StyledInactiveLabel = styled.span`- color: ${({ theme }) => theme.font.color.extraLight};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.extraLight};+ font-size: ${themeCssVariables.font.size.sm};white-space: nowrap;text-overflow: ellipsis;overflow: hidden;@@ -59,38 +60,38 @@ const StyledInactiveLabel = styled.span`&::before {content: '·';- margin-right: ${({ theme }) => theme.spacing(1)};+ margin-right: ${themeCssVariables.spacing[1]};}`;const StyledIconTableCell = styled(TableCell)`justify-content: center;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;const StyledIconChevronRight = styled(IconChevronRight)`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;const StyledRelationType = styled.div`align-items: center;display: flex;- font-size: ${({ theme }) => theme.font.size.sm};- gap: ${({ theme }) => theme.spacing(1)};+ font-size: ${themeCssVariables.font.size.sm};+ gap: ${themeCssVariables.spacing[1]};`;const StyledLink = styled(Link)`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};text-decoration: underline;- text-decoration-color: ${({ theme }) => theme.border.color.strong};+ text-decoration-color: ${themeCssVariables.border.color.strong};text-underline-offset: 2px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;&:hover {- color: ${({ theme }) => theme.color.blue};- text-decoration-color: ${({ theme }) => theme.color.blue};+ color: ${themeCssVariables.color.blue};+ text-decoration-color: ${themeCssVariables.color.blue};}`;@@ -100,7 +101,7 @@ export const SettingsObjectRelationItemTableRow = ({}: SettingsObjectRelationItemTableRowProps) => {const { t } = useLingui();const navigate = useNavigateSettings();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { getIcon } = useIcons();const Icon = getIcon(fieldMetadataItem.icon);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 086bcdd6d8d..66047123484 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@@ -12,7 +12,7 @@ import { useSortedArray } from '@/ui/layout/table/hooks/useSortedArray';import { type TableMetadata } from '@/ui/layout/table/types/TableMetadata';import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { msg } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import { useMemo, useState } from 'react';@@ -25,6 +25,7 @@ import {} from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { MenuItemToggle } from 'twenty-ui/navigation';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { normalizeSearchText } from '~/utils/normalizeSearchText';import {SettingsObjectRelationItemTableRow,@@ -33,8 +34,8 @@ import {const StyledSearchAndFilterContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};- padding-bottom: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ padding-bottom: ${themeCssVariables.spacing[2]};width: 100%;`;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 f7bae6224aa..75500ee46ca 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@@ -2,7 +2,7 @@ import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataIimport { isHiddenSystemField } from '@/object-metadata/utils/isHiddenSystemField';import { isObjectMetadataReadOnly } from '@/object-record/read-only/utils/isObjectMetadataReadOnly';import { SettingsObjectRelationsTable } from '@/settings/data-model/object-details/components/SettingsObjectRelationsTable';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { FieldMetadataType, SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';@@ -10,12 +10,13 @@ import { H2Title, IconPlus } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';import { UndecoratedLink } from 'twenty-ui/navigation';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { SettingsObjectFieldTable } from '~/pages/settings/data-model/SettingsObjectFieldTable';const StyledButtonContainer = styled.div`display: flex;justify-content: flex-end;- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-top: ${themeCssVariables.spacing[2]};`;type ObjectFieldsProps = {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 6f1966fb3ac..612ea4c310d 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@@ -8,12 +8,13 @@ import { SettingsDataModelObjectSettingsFormCard } from '@/settings/data-model/oimport { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';import { useModal } from '@/ui/layout/modal/hooks/useModal';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { SettingsPath } from 'twenty-shared/types';import { H2Title, IconArchive, IconTrash } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useNavigateSettings } from '~/hooks/useNavigateSettings';type ObjectSettingsProps = {@@ -25,7 +26,7 @@ type ObjectSettingsProps = {const StyledContentContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[8]};`;const StyledFormSection = styled(Section)`@@ -34,7 +35,7 @@ const StyledFormSection = styled(Section)`const StyledDangerButtonsContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const DELETE_OBJECT_MODAL_ID = 'delete-object-confirmation-modal';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 5bdc6b7a82e..32416d16a74 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,6 +1,6 @@import { t } from '@lingui/core/macro';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';import {@@ -9,6 +9,8 @@ import {useIcons,} from 'twenty-ui/display';import { SettingsItemTypeTag } from '@/settings/components/SettingsItemTypeTag';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';export type SettingsDataModelObjectPreviewProps = {className?: string;@@ -27,17 +29,17 @@ const StyledObjectPreview = styled.div`const StyledObjectName = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};max-width: 60%;`;const StyledOverflowingTextWithTooltip = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;const StyledNumber = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};- padding-right: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.tertiary};+ padding-right: ${themeCssVariables.spacing[2]};`;const StyledIconContainer = styled.div`@@ -46,10 +48,10 @@ const StyledIconContainer = styled.div`const StyledSeparator = styled.div`align-self: stretch;- background: ${({ theme }) => theme.background.quaternary};+ background: ${themeCssVariables.background.quaternary};height: 1px;- margin-bottom: ${({ theme }) => theme.spacing(2)};- margin-top: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${themeCssVariables.spacing[2]};+ margin-top: ${themeCssVariables.spacing[2]};`;type SettingsDataModelObjectPreviewItemProps = {@@ -66,7 +68,7 @@ const SettingsDataModelObjectPreviewItem = ({pluralizeLabel = true,index,}: SettingsDataModelObjectPreviewItemProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { getIcon } = useIcons();const ObjectIcon = getIcon(objectMetadataItem.icon);@@ -100,7 +102,7 @@ const SettingsDataModelObjectPreviewOtherObjects = ({}: {selected: number;}) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<><StyledSeparator />diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/components/SettingsObjectCoverImage.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/components/SettingsObjectCoverImage.tsxindex 8241d3c4da0..964385599f3 100644--- a/packages/twenty-front/src/modules/settings/data-model/objects/components/SettingsObjectCoverImage.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/objects/components/SettingsObjectCoverImage.tsx@@ -1,6 +1,7 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';+import { useContext } from 'react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { IconEye } from 'twenty-ui/display';@@ -9,30 +10,36 @@ import { Card } from 'twenty-ui/layout';import DarkCoverImage from '@/settings/data-model/assets/cover-dark.png';import LightCoverImage from '@/settings/data-model/assets/cover-light.png';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCoverImageContainer = styled(Card)`align-items: center;- background-image: ${({ theme }) =>- theme.name === 'light'- ? `url('${LightCoverImage.toString()}')`- : `url('${DarkCoverImage.toString()}')`};background-size: cover;- border-radius: ${({ theme }) => theme.border.radius.md};+ border-radius: ${themeCssVariables.border.radius.md};box-sizing: border-box;display: flex;min-height: 153px;justify-content: center;position: relative;- margin-bottom: ${({ theme }) => theme.spacing(8)};+ margin-bottom: ${themeCssVariables.spacing[8]};`;const StyledButtonContainer = styled.div`- padding-top: ${({ theme }) => theme.spacing(5)};+ padding-top: ${themeCssVariables.spacing[5]};`;export const SettingsObjectCoverImage = () => {const { t } = useLingui();+ const { theme } = useContext(ThemeContext);return (- <StyledCoverImageContainer>+ <StyledCoverImageContainer+ style={{+ backgroundImage:+ theme.name === 'light'+ ? `url('${LightCoverImage.toString()}')`+ : `url('${DarkCoverImage.toString()}')`,+ }}+ ><StyledButtonContainer><FloatingButtonIcon={IconEye}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 4f83f74b713..793f0a3e747 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@@ -6,8 +6,8 @@ import { type SettingsDataModelObjectAboutFormValues } from '@/settings/data-modimport { IconPicker } from '@/ui/input/components/IconPicker';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { TextArea } from '@/ui/input/components/TextArea';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { plural } from 'pluralize';import { Controller, useFormContext } from 'react-hook-form';@@ -22,6 +22,8 @@ import {} from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Card } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type StringKeyOf } from 'type-fest';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { computeMetadataNameFromLabel } from '~/pages/settings/data-model/utils/computeMetadataNameFromLabel';@@ -35,8 +37,8 @@ type SettingsDataModelObjectAboutFormProps = {const StyledInputsContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[2]};width: 100%;`;@@ -48,60 +50,60 @@ const StyledInputContainer = styled.div`const StyledAdvancedSettingsSectionInputWrapper = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};width: 100%;flex: 1;`;const StyledAdvancedSettingsOuterContainer = styled.div`- padding-top: ${({ theme }) => theme.spacing(4)};+ padding-top: ${themeCssVariables.spacing[4]};`;const StyledAdvancedSettingsContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};position: relative;width: 100%;`;const StyledLabel = styled.span`- color: ${({ theme }) => theme.font.color.light};- font-size: ${({ theme }) => theme.font.size.xs};- font-weight: ${({ theme }) => theme.font.weight.semiBold};- margin-bottom: ${({ theme }) => theme.spacing(1)};+ color: ${themeCssVariables.font.color.light};+ font-size: ${themeCssVariables.font.size.xs};+ font-weight: ${themeCssVariables.font.weight.semiBold};+ margin-bottom: ${themeCssVariables.spacing[1]};`;const StyledConflictBanner = styled.div`align-items: center;- background-color: ${({ theme }) => theme.accent.secondary};- border-radius: ${({ theme }) => theme.border.radius.md};+ background-color: ${themeCssVariables.accent.secondary};+ border-radius: ${themeCssVariables.border.radius.md};box-sizing: border-box;display: flex;- gap: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[2]};`;const StyledBannerContent = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};flex: 1;`;const StyledBannerText = styled.span`- color: ${({ theme }) => theme.color.blue};+ color: ${themeCssVariables.color.blue};flex: 1;`;const StyledConflictButton = styled(Button)`- border-color: ${({ theme }) => theme.color.blue};- color: ${({ theme }) => theme.color.blue};+ border-color: ${themeCssVariables.color.blue};+ color: ${themeCssVariables.color.blue};&:hover {- background: ${({ theme }) => theme.accent.secondary};+ background: ${themeCssVariables.accent.secondary};}&:focus-visible {- box-shadow: 0 0 0 3px ${({ theme }) => theme.accent.tertiary};+ box-shadow: 0 0 0 3px ${themeCssVariables.accent.tertiary};}`;@@ -116,7 +118,7 @@ export const SettingsDataModelObjectAboutForm = ({const { control, watch, setValue } =useFormContext<SettingsDataModelObjectAboutFormValues>();const { t } = useLingui();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const navigateSettings = useNavigateSettings();const isLabelSyncedWithName = watch('isLabelSyncedWithName');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 c9a8ca8498a..fae6b266d8f 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@@ -4,7 +4,7 @@ import { getActiveFieldMetadataItems } from '@/object-metadata/utils/getActiveFiimport { objectMetadataItemSchema } from '@/object-metadata/validation-schemas/objectMetadataItemSchema';import { isObjectMetadataReadOnly } from '@/object-record/read-only/utils/isObjectMetadataReadOnly';import { Select } from '@/ui/input/components/Select';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { zodResolver } from '@hookform/resolvers/zod';import { t } from '@lingui/core/macro';import { useMemo } from 'react';@@ -13,6 +13,7 @@ import { useNavigate } from 'react-router-dom';import { isLabelIdentifierFieldMetadataTypes } from 'twenty-shared/utils';import { IconCircleOff, IconPlus, useIcons } from 'twenty-ui/display';import { type SelectOption } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type z } from 'zod';export const settingsDataModelObjectIdentifiersFormSchema =@@ -36,7 +37,7 @@ const IMAGE_IDENTIFIER_FIELD_METADATA_ID: SettingsDataModelObjectIdentifiers =const StyledContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;export const SettingsDataModelObjectIdentifiersForm = ({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 79f721bb7c1..de4dd920c37 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useMemo } from 'react';import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';@@ -9,23 +9,24 @@ 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/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';type SettingsDataModelObjectSettingsFormCardProps = {objectMetadataItem: ObjectMetadataItem;};const StyledTopCardContent = styled(CardContent)`- background-color: ${({ theme }) => theme.background.transparent.lighter};+ background-color: ${themeCssVariables.background.transparent.lighter};`;const StyledObjectSummaryCard = styled(Card)`- border-radius: ${({ theme }) => theme.border.radius.md};- color: ${({ theme }) => theme.font.color.primary};+ border-radius: ${themeCssVariables.border.radius.md};+ color: ${themeCssVariables.font.color.primary};max-width: 480px;`;const StyledObjectSummaryCardContent = styled(CardContent)`- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};`;export const SettingsDataModelObjectSettingsFormCard = ({diff --git a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/__stories__/SettingsDataModelObjectAboutForm.stories.tsx b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/__stories__/SettingsDataModelObjectAboutForm.stories.tsxindex 79155a10d7d..c4a81765540 100644--- a/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/__stories__/SettingsDataModelObjectAboutForm.stories.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/objects/forms/components/__stories__/SettingsDataModelObjectAboutForm.stories.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { FormProviderDecorator } from '~/testing/decorators/FormProviderDecorator';import { IconsProviderDecorator } from '~/testing/decorators/IconsProviderDecorator';diff --git a/packages/twenty-front/src/modules/settings/developers/components/ApiKeyInput.tsx b/packages/twenty-front/src/modules/settings/developers/components/ApiKeyInput.tsxindex 43546bd74c9..a6fe74101ad 100644--- a/packages/twenty-front/src/modules/settings/developers/components/ApiKeyInput.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/ApiKeyInput.tsx@@ -1,8 +1,9 @@import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { IconCopy } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledContainer = styled.div`@@ -12,7 +13,7 @@ const StyledContainer = styled.div`const StyledLinkContainer = styled.div`flex: 1;- margin-right: ${({ theme }) => theme.spacing(2)};+ margin-right: ${themeCssVariables.spacing[2]};`;type ApiKeyInputProps = { apiKey: string };diff --git a/packages/twenty-front/src/modules/settings/developers/components/ApiKeyNameInput.tsx b/packages/twenty-front/src/modules/settings/developers/components/ApiKeyNameInput.tsxindex 2d944835a13..f619486410a 100644--- a/packages/twenty-front/src/modules/settings/developers/components/ApiKeyNameInput.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/ApiKeyNameInput.tsx@@ -1,17 +1,18 @@import { t } from '@lingui/core/macro';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useCallback, useEffect } from 'react';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 { useUpdateApiKeyMutation } from '~/generated-metadata/graphql';const StyledComboInputContainer = styled.div`display: flex;flex-direction: row;> * + * {- margin-left: ${({ theme }) => theme.spacing(4)};+ margin-left: ${themeCssVariables.spacing[4]};}`;diff --git a/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysFieldItemTableRow.tsx b/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysFieldItemTableRow.tsxindex d756d5b3c96..78ca68de550 100644--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysFieldItemTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysFieldItemTableRow.tsx@@ -1,5 +1,5 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import {formatExpiration,@@ -8,7 +8,8 @@ import {import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { IconChevronRight } from 'twenty-ui/display';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';import { type ApiKey } from '~/generated-metadata/graphql';export const StyledApisFieldTableRow = styled(TableRow)`@@ -43,7 +44,7 @@ export const SettingsApiKeysFieldItemTableRow = ({apiKey,to,}: SettingsApiKeysFieldItemTableRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 6a117d7ccab..e10b0a18afd 100644--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysTable.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsApiKeysTable.tsx@@ -3,14 +3,15 @@ import { Table } from '@/ui/layout/table/components/Table';import { TableBody } from '@/ui/layout/table/components/TableBody';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+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 { useGetApiKeysQuery } from '~/generated-metadata/graphql';const StyledTableBody = styled(TableBody)`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;export const SettingsApiKeysTable = () => {diff --git a/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookTableRow.tsx b/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookTableRow.tsxindex bf3b84f5bf7..a5e638bf027 100644--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsDevelopersWebhookTableRow.tsx@@ -1,13 +1,15 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';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 {IconChevronRight,OverflowingTextWithTooltip,} from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type Webhook } from '~/generated-metadata/graphql';export const StyledApisFieldTableRow = styled(TableRow)`@@ -16,17 +18,17 @@ export const StyledApisFieldTableRow = styled(TableRow)`const StyledIconTableCell = styled(TableCell)`justify-content: center;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};padding-left: 0;`;const StyledUrlTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};overflow: hidden;`;const StyledIconChevronRight = styled(IconChevronRight)`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;export const SettingsDevelopersWebhookTableRow = ({@@ -39,7 +41,7 @@ export const SettingsDevelopersWebhookTableRow = ({>;to: string;}) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledApisFieldTableRow to={to}>diff --git a/packages/twenty-front/src/modules/settings/developers/components/SettingsWebhooksTable.tsx b/packages/twenty-front/src/modules/settings/developers/components/SettingsWebhooksTable.tsxindex a5e255f520c..6d283fc7d15 100644--- a/packages/twenty-front/src/modules/settings/developers/components/SettingsWebhooksTable.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/SettingsWebhooksTable.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsDevelopersWebhookTableRow } from '@/settings/developers/components/SettingsDevelopersWebhookTableRow';import { Table } from '@/ui/layout/table/components/Table';@@ -7,10 +7,11 @@ 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 { useGetWebhooksQuery } from '~/generated-metadata/graphql';const StyledTableBody = styled(TableBody)`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};max-height: 260px;overflow-y: auto;`;diff --git a/packages/twenty-front/src/modules/settings/developers/components/WebhookEntitySelect.tsx b/packages/twenty-front/src/modules/settings/developers/components/WebhookEntitySelect.tsxindex 19c6d086576..75ce39c3d94 100644--- a/packages/twenty-front/src/modules/settings/developers/components/WebhookEntitySelect.tsx+++ b/packages/twenty-front/src/modules/settings/developers/components/WebhookEntitySelect.tsx@@ -11,10 +11,9 @@ import { SelectableList } from '@/ui/layout/selectable-list/components/Selectablimport { SelectableListItem } from '@/ui/layout/selectable-list/components/SelectableListItem';import { selectedItemIdComponentState } from '@/ui/layout/selectable-list/states/selectedItemIdComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext, useState } from 'react';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useState } from 'react';import { isDefined } from 'twenty-shared/utils';import {IconBox,@@ -27,34 +26,36 @@ import {useIcons,} from 'twenty-ui/display';import { MenuItemSelect } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const WEBHOOK_ENTITY_DROPDOWN_ID = 'webhook-entity-select';const StyledControlContainer = styled.div<{ disabled?: boolean }>`align-items: center;- background-color: ${({ theme }) => theme.background.transparent.lighter};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};box-sizing: border-box;cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};display: flex;- gap: ${({ theme }) => theme.spacing(1)};- height: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[1]};+ height: ${themeCssVariables.spacing[8]};justify-content: space-between;- padding: 0 ${({ theme }) => theme.spacing(2)};+ padding: 0 ${themeCssVariables.spacing[2]};width: 100%;&:hover {- background-color: ${({ theme, disabled }) =>+ background-color: ${({ disabled }) =>disabled- ? theme.background.transparent.lighter- : theme.background.transparent.light};+ ? themeCssVariables.background.transparent.lighter+ : themeCssVariables.background.transparent.light};}`;const StyledControlLabel = styled.span`- color: ${({ theme }) => theme.font.color.primary};- font-size: ${({ theme }) => theme.font.size.md};+ color: ${themeCssVariables.font.color.primary};+ font-size: ${themeCssVariables.font.size.md};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;@@ -63,8 +64,10 @@ const StyledControlLabel = styled.span`const StyledControlIconChevronDown = styled(IconChevronDown)<{disabled?: boolean;}>`- color: ${({ disabled, theme }) =>- disabled ? theme.font.color.extraLight : theme.font.color.tertiary};+ color: ${({ disabled }) =>+ disabled+ ? themeCssVariables.font.color.extraLight+ : themeCssVariables.font.color.tertiary};`;type WebhookEntitySelectProps = {@@ -80,7 +83,7 @@ export const WebhookEntitySelect = ({disabled = false,dropdownId = WEBHOOK_ENTITY_DROPDOWN_ID,}: WebhookEntitySelectProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const [searchInput, setSearchInput] = useState('');const { objectMetadataItems } = useObjectMetadataItems();const { getIcon } = useIcons();@@ -118,7 +121,6 @@ export const WebhookEntitySelect = ({option.label.toLowerCase().includes(searchInput.toLowerCase()),);- // Find selected option label for displayconst getSelectedLabel = () => {if (!isDefined(value)) {return t`Select entity`;diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsxindex 7ea93a5ac73..2a8123043c4 100644--- a/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx@@ -8,7 +8,7 @@ import { SettingsPageContainer } from '@/settings/components/SettingsPageContainimport { TextInput } from '@/ui/input/components/TextInput';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { Button, ButtonGroup } from 'twenty-ui/input';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsDomainRecords } from '@/settings/domains/components/SettingsDomainRecords';import { useCheckPublicDomainValidRecords } from '@/settings/domains/hooks/useCheckPublicDomainValidRecords';import {@@ -23,6 +23,7 @@ import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useState } from 'react';import { SaveAndCancelButtons } from '@/settings/components/SaveAndCancelButtons/SaveAndCancelButtons';import { getDomainValidationSchema } from '@/settings/domains/utils/get-domain-validation-schema';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledButtonGroup = styled(ButtonGroup)`& > :not(:first-of-type) > button {@@ -36,14 +37,14 @@ const StyledButton = styled(Button)`const StyledDomainFormWrapper = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledRecordsWrapper = styled.div`- margin-top: ${({ theme }) => theme.spacing(2)};+ margin-top: ${themeCssVariables.spacing[2]};& > :not(:first-of-type) {- margin-top: ${({ theme }) => theme.spacing(4)};+ margin-top: ${themeCssVariables.spacing[4]};}`;diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsxindex d633a4bdc65..fd8438021dc 100644--- a/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx@@ -1,13 +1,14 @@/* @license Enterprise */import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';import { TextInput } from '@/ui/input/components/TextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Controller, useFormContext } from 'react-hook-form';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { H2Title, IconReload, IconTrash } from 'twenty-ui/display';import { Button, ButtonGroup } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { SettingsDomainRecords } from '@/settings/domains/components/SettingsDomainRecords';import { CheckCustomDomainValidRecordsEffect } from '@/settings/domains/components/CheckCustomDomainValidRecordsEffect';import { useCheckCustomDomainValidRecords } from '@/settings/domains/hooks/useCheckCustomDomainValidRecords';@@ -15,7 +16,7 @@ import { customDomainRecordsState } from '@/settings/domains/states/customDomainconst StyledDomainFormWrapper = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledButtonGroup = styled(ButtonGroup)`@@ -29,10 +30,10 @@ const StyledButton = styled(Button)``;const StyledRecordsWrapper = styled.div`- margin-top: ${({ theme }) => theme.spacing(2)};+ margin-top: ${themeCssVariables.spacing[2]};& > :not(:first-of-type) {- margin-top: ${({ theme }) => theme.spacing(4)};+ margin-top: ${themeCssVariables.spacing[4]};}`;diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingsSubdomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsSubdomain.tsxindex bb56d53d697..3ba3b7e7984 100644--- a/packages/twenty-front/src/modules/settings/domains/components/SettingsSubdomain.tsx+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingsSubdomain.tsx@@ -1,5 +1,5 @@import { TextInput } from '@/ui/input/components/TextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Controller, useFormContext } from 'react-hook-form';diff --git a/packages/twenty-front/src/modules/settings/experience/components/FormatPreferencesSettings.tsx b/packages/twenty-front/src/modules/settings/experience/components/FormatPreferencesSettings.tsxindex 11a1ee9fcd7..56e490e06cc 100644--- a/packages/twenty-front/src/modules/settings/experience/components/FormatPreferencesSettings.tsx+++ b/packages/twenty-front/src/modules/settings/experience/components/FormatPreferencesSettings.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -18,11 +18,12 @@ import {WorkspaceMemberTimeFormatEnum,} from '~/generated-metadata/graphql';import { DateTimeSettingsCalendarStartDaySelect } from '~/pages/settings/profile/appearance/components/DateTimeSettingsCalendarStartDaySelect';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;export const FormatPreferencesSettings = () => {@@ -51,7 +52,6 @@ export const FormatPreferencesSettings = () => {updateFormatPreference('calendarStartDay', value);};- // Convert workspace member values to display valuesconst displayTimeZone =currentWorkspaceMember.timeZone === 'system'? 'system'diff --git a/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx b/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsxindex 780b1371bf4..5ed465309fe 100644--- a/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx+++ b/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx@@ -1,20 +1,21 @@import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsOptions/SettingsOptionCardContentToggle';import { useLabPublicFeatureFlags } from '@/settings/lab/hooks/useLabPublicFeatureFlags';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useState } from 'react';import { Card } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type FeatureFlagKey } from '~/generated-metadata/graphql';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';const StyledCardGrid = styled.div`display: grid;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};grid-template-columns: 1fr;`;const StyledImage = styled.img`- border-bottom: 1px solid ${({ theme }) => theme.border.color.medium};+ border-bottom: 1px solid ${themeCssVariables.border.color.medium};height: 120px;width: 100%;object-fit: cover;diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionLabelContainer.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionLabelContainer.tsxindex 3b215b97fbb..e4324c51151 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionLabelContainer.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionLabelContainer.tsx@@ -1,15 +1,16 @@import { TitleInput } from '@/ui/input/components/TitleInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledHeaderTitle = styled.div`- color: ${({ theme }) => theme.font.color.primary};- font-weight: ${({ theme }) => theme.font.weight.semiBold};- font-size: ${({ theme }) => theme.font.size.lg};+ color: ${themeCssVariables.font.color.primary};+ font-weight: ${themeCssVariables.font.weight.semiBold};+ font-size: ${themeCssVariables.font.size.lg};width: fit-content;max-width: 420px;& > input:disabled {- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};}`;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 19b642473b1..917689c073c 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@@ -3,15 +3,16 @@ import { SettingsOptionCardContentCounter } from '@/settings/components/Settingsimport { SettingsOptionCardContentToggle } from '@/settings/components/SettingsOptions/SettingsOptionCardContentToggle';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { TextArea } from '@/ui/input/components/TextArea';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { H2Title, IconClockHour8, IconTool } from 'twenty-ui/display';import { Card, Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledInputsContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;export const SettingsLogicFunctionNewForm = ({diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionsFieldItemTableRow.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionsFieldItemTableRow.tsxindex 3c3d40adfae..00ce9ec8d9c 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionsFieldItemTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionsFieldItemTableRow.tsx@@ -1,27 +1,29 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type LogicFunction } from '~/generated-metadata/graphql';import { TableCell } from '@/ui/layout/table/components/TableCell';-import { useTheme } from '@emotion/react';+import { useContext } from 'react';import { IconChevronRight } from 'twenty-ui/display';import { StyledTableRow } from '@/settings/logic-functions/components/SettingsLogicFunctionsTable';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledNameTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.primary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ gap: ${themeCssVariables.spacing[2]};`;const StyledRuntimeTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.secondary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.secondary};+ gap: ${themeCssVariables.spacing[2]};`;const StyledIconTableCell = styled(TableCell)`justify-content: center;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;const StyledIconChevronRight = styled(IconChevronRight)`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;export const SettingsLogicFunctionsFieldItemTableRow = ({@@ -31,7 +33,7 @@ export const SettingsLogicFunctionsFieldItemTableRow = ({logicFunction: LogicFunction;to: string;}) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledTableRow to={to}><StyledNameTableCell>{logicFunction.name}</StyledNameTableCell>diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionsTable.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionsTable.tsxindex 089d0d2c1c2..81364546930 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionsTable.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionsTable.tsx@@ -3,19 +3,20 @@ import { Table } from '@/ui/layout/table/components/Table';import { TableBody } from '@/ui/layout/table/components/TableBody';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { type LogicFunction } from '~/generated-metadata/graphql';import { useLingui } from '@lingui/react/macro';import { useParams } from 'react-router-dom';+import { themeCssVariables } from 'twenty-ui/theme-constants';export const StyledTableRow = styled(TableRow)`grid-template-columns: 164px 1fr 96px 32px;`;const StyledTableBody = styled(TableBody)`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;export const SettingsLogicFunctionsTable = ({diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionCodeEditorTab.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionCodeEditorTab.tsxindex 862e78dc6c7..9eaef9f5a0b 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionCodeEditorTab.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionCodeEditorTab.tsx@@ -6,7 +6,7 @@ import { SETTINGS_LOGIC_FUNCTION_TAB_LIST_COMPONENT_ID } from '@/settings/logic-import { TabList } from '@/ui/layout/tab-list/components/TabList';import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTabIdComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { H2Title, IconPlayerPlay } from 'twenty-ui/display';import { Button, CoreEditorHeader } from 'twenty-ui/input';diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTabEnvironmentVariableTableRow.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTabEnvironmentVariableTableRow.tsxindex 17f25f5221d..f3a4f903278 100644--- a/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTabEnvironmentVariableTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/tabs/SettingsLogicFunctionTabEnvironmentVariableTableRow.tsx@@ -5,7 +5,7 @@ import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/Dropimport { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useState } from 'react';import {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 9c6128ac6b9..29e372e25de 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@@ -2,18 +2,19 @@ import { LogicFunctionExecutionResult } from '@/logic-functions/components/Logicimport { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';import { logicFunctionTestDataFamilyState } from '@/workflow/workflow-steps/workflow-actions/code-action/states/logicFunctionTestDataFamilyState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { H2Title, IconPlayerPlay } from 'twenty-ui/display';import { Button, CodeEditor, CoreEditorHeader } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { InputLabel } from '@/ui/input/components/InputLabel';import { TextArea } from '@/ui/input/components/TextArea';const StyledInputsContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;const StyledCodeEditorContainer = styled.div`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 e0f8204f059..ca1c2f5905c 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@@ -3,7 +3,7 @@ import { SettingsDatabaseEventsForm } from '@/settings/components/SettingsDatabaimport { Table } from '@/ui/layout/table/components/Table';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { H2Title, OverflowingTextWithTooltip } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';@@ -12,27 +12,28 @@ import { TableCell } from '@/ui/layout/table/components/TableCell';import { REACT_APP_SERVER_BASE_URL } from '~/config';import { Tag } from 'twenty-ui/components';import { type LogicFunction } from '~/generated-metadata/graphql';+import { themeCssVariables } from 'twenty-ui/theme-constants';export const StyledRouteTriggerTableRow = styled(TableRow)`grid-template-columns: 1fr 120px 120px;`;const StyledTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.tertiary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.tertiary};+ gap: ${themeCssVariables.spacing[2]};min-width: 0;overflow: hidden;`;const StyledRouteTriggerTableHeaderRow = styled(StyledRouteTriggerTableRow)`- margin-bottom: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${themeCssVariables.spacing[2]};`;const StyledEmptyState = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;- font-size: ${({ theme }) => theme.font.size.md};+ font-size: ${themeCssVariables.font.size.md};height: 160px;justify-content: center;text-align: 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 2962285aa05..931740ac102 100644--- a/packages/twenty-front/src/modules/settings/members/components/MemberInfosTab.tsx+++ b/packages/twenty-front/src/modules/settings/members/components/MemberInfosTab.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useState } from 'react';import { MemberEmailField } from '@/settings/members/components/MemberEmailField';@@ -9,6 +9,7 @@ import { t } from '@lingui/core/macro';import { H2Title } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';type MemberInfosTabProps = {member: WorkspaceMember;@@ -19,13 +20,13 @@ type MemberInfosTabProps = {const StyledNameRow = styled.div`display: grid;- gap: ${({ theme }) => theme.spacing(3)};+ gap: ${themeCssVariables.spacing[3]};grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));`;const StyledActionRow = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;export const MemberInfosTab = ({diff --git a/packages/twenty-front/src/modules/settings/members/components/MemberPermissionsTab.tsx b/packages/twenty-front/src/modules/settings/members/components/MemberPermissionsTab.tsxindex 4f332ca7906..028e204a203 100644--- a/packages/twenty-front/src/modules/settings/members/components/MemberPermissionsTab.tsx+++ b/packages/twenty-front/src/modules/settings/members/components/MemberPermissionsTab.tsx@@ -5,7 +5,7 @@ import { Select } from '@/ui/input/components/Select';import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';import { useModal } from '@/ui/layout/modal/hooks/useModal';import { type WorkspaceMember } from '@/workspace-member/types/WorkspaceMember';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useState } from 'react';import { SettingsPath } from 'twenty-shared/types';@@ -18,6 +18,7 @@ import {} from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useUpdateWorkspaceMemberRoleMutation } from '~/generated-metadata/graphql';import { useNavigateSettings } from '~/hooks/useNavigateSettings';@@ -25,17 +26,17 @@ const CONFIRM_ROLE_CHANGE_MODAL_ID = 'confirm-role-change-modal';const StyledNoRoleContainer = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;justify-content: center;- padding: ${({ theme }) => theme.spacing(8)};+ padding: ${themeCssVariables.spacing[8]};`;const StyledRoleContainer = styled.div`align-items: flex-end;display: flex;- gap: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[8]};`;const StyledRoleSelector = styled.div`diff --git a/packages/twenty-front/src/modules/settings/playground/components/GraphQLPlayground.tsx b/packages/twenty-front/src/modules/settings/playground/components/GraphQLPlayground.tsxindex 59595a7fc96..c3b8b891d17 100644--- a/packages/twenty-front/src/modules/settings/playground/components/GraphQLPlayground.tsx+++ b/packages/twenty-front/src/modules/settings/playground/components/GraphQLPlayground.tsx@@ -1,7 +1,7 @@import { playgroundApiKeyState } from '@/settings/playground/states/playgroundApiKeyState';import { PlaygroundSchemas } from '@/settings/playground/types/PlaygroundSchemas';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { explorerPlugin } from '@graphiql/plugin-explorer';import '@graphiql/plugin-explorer/dist/style.css';import { createGraphiQLFetcher } from '@graphiql/toolkit';@@ -9,6 +9,7 @@ import { GraphiQL } from 'graphiql';import 'graphiql/graphiql.css';import { useContext } from 'react';import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { REACT_APP_SERVER_BASE_URL } from '~/config';type GraphQLPlaygroundProps = {@@ -26,8 +27,8 @@ const StyledGraphiQLContainer = styled.div`width: 100%;.graphiql-container {- background: ${({ theme }) => theme.background.primary};- border-radius: ${({ theme }) => theme.border.radius.md};+ background: ${themeCssVariables.background.primary};+ border-radius: ${themeCssVariables.border.radius.md};}`;diff --git a/packages/twenty-front/src/modules/settings/playground/components/PlaygroundSetupForm.tsx b/packages/twenty-front/src/modules/settings/playground/components/PlaygroundSetupForm.tsxindex c7dfbe2a7da..68a69018611 100644--- a/packages/twenty-front/src/modules/settings/playground/components/PlaygroundSetupForm.tsx+++ b/packages/twenty-front/src/modules/settings/playground/components/PlaygroundSetupForm.tsx@@ -5,7 +5,7 @@ import { PlaygroundTypes } from '@/settings/playground/types/PlaygroundTypes';import { Select } from '@/ui/input/components/Select';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { zodResolver } from '@hookform/resolvers/zod';import { useLingui } from '@lingui/react/macro';import { Controller, useForm } from 'react-hook-form';@@ -13,6 +13,7 @@ import { SettingsPath } from 'twenty-shared/types';import { CustomError } from 'twenty-shared/utils';import { IconApi, IconBrandGraphql } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { z } from 'zod';import { REACT_APP_SERVER_BASE_URL } from '~/config';import { useNavigateSettings } from '~/hooks/useNavigateSettings';@@ -29,8 +30,8 @@ const StyledForm = styled.form`display: grid;grid-template-columns: 1.5fr 1fr 1fr 0.5fr;align-items: end;- gap: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[2]};width: 100%;`;@@ -58,7 +59,6 @@ export const PlaygroundSetupForm = () => {const validateApiKey = async (values: PlaygroundSetupFormValues) => {try {- // Validate by fetching the schema (but not storing it)const response = await fetch(`${REACT_APP_SERVER_BASE_URL}/rest/open-api/${values.schema}`,{diff --git a/packages/twenty-front/src/modules/settings/playground/components/RestPlayground.tsx b/packages/twenty-front/src/modules/settings/playground/components/RestPlayground.tsxindex 5c6ffc2759c..38cfdb720b6 100644--- a/packages/twenty-front/src/modules/settings/playground/components/RestPlayground.tsx+++ b/packages/twenty-front/src/modules/settings/playground/components/RestPlayground.tsx@@ -1,31 +1,32 @@import { playgroundApiKeyState } from '@/settings/playground/states/playgroundApiKeyState';import { type PlaygroundSchemas } from '@/settings/playground/types/PlaygroundSchemas';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { lazy, Suspense } from 'react';+import { useContext, 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 { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { REACT_APP_SERVER_BASE_URL } from '~/config';const StyledContainer = styled.div`- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.md};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.md};height: 100%;overflow-y: scroll;width: 100%;.scalar-api-reference {- --scalar-background-1: ${({ theme }) => theme.background.primary};- --scalar-background-2: ${({ theme }) => theme.background.secondary};- --scalar-background-3: ${({ theme }) => theme.background.tertiary};- --scalar-background-accent: ${({ theme }) =>- theme.background.transparent.lighter};- --scalar-border-color: ${({ theme }) => theme.border.color.medium};- --scalar-color-1: ${({ theme }) => theme.font.color.primary};- --scalar-color-2: ${({ theme }) => theme.font.color.secondary};- --scalar-color-3: ${({ theme }) => theme.font.color.tertiary};+ --scalar-background-1: ${themeCssVariables.background.primary};+ --scalar-background-2: ${themeCssVariables.background.secondary};+ --scalar-background-3: ${themeCssVariables.background.tertiary};+ --scalar-background-accent: ${themeCssVariables.background.transparent+ .lighter};+ --scalar-border-color: ${themeCssVariables.border.color.medium};+ --scalar-color-1: ${themeCssVariables.font.color.primary};+ --scalar-color-2: ${themeCssVariables.font.color.secondary};+ --scalar-color-3: ${themeCssVariables.font.color.tertiary};}.scalar-app .text-pretty {@@ -50,7 +51,7 @@ type RestPlaygroundProps = {};export const RestPlayground = ({ onError, schema }: RestPlaygroundProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const playgroundApiKey = useAtomStateValue(playgroundApiKeyState);if (!playgroundApiKey) {diff --git a/packages/twenty-front/src/modules/settings/playground/components/SettingsPlaygroundCoverImage.tsx b/packages/twenty-front/src/modules/settings/playground/components/SettingsPlaygroundCoverImage.tsxindex 779e9ea03bf..3bd58f66829 100644--- a/packages/twenty-front/src/modules/settings/playground/components/SettingsPlaygroundCoverImage.tsx+++ b/packages/twenty-front/src/modules/settings/playground/components/SettingsPlaygroundCoverImage.tsx@@ -1,22 +1,45 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { type ReactNode, useContext } from 'react';import DarkCoverImage from '@/settings/playground/assets/cover-dark.png';import LightCoverImage from '@/settings/playground/assets/cover-light.png';import { Card } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';-export const StyledSettingsApiPlaygroundCoverImage = styled(Card)`+const StyledCard = styled(Card)`align-items: center;- background-image: ${({ theme }) =>- theme.name === 'light'- ? `url('${LightCoverImage.toString()}')`- : `url('${DarkCoverImage.toString()}')`};background-size: cover;- border-radius: ${({ theme }) => theme.border.radius.md};+ border-radius: ${themeCssVariables.border.radius.md};box-sizing: border-box;display: flex;height: 153px;justify-content: center;position: relative;- margin-top: ${({ theme }) => theme.spacing(4)};- margin-bottom: ${({ theme }) => theme.spacing(4)};+ margin-top: ${themeCssVariables.spacing[4]};+ margin-bottom: ${themeCssVariables.spacing[4]};`;++type StyledSettingsApiPlaygroundCoverImageProps = {+ children?: ReactNode;+ className?: string;+};++export const StyledSettingsApiPlaygroundCoverImage = ({+ children,+ className,+}: StyledSettingsApiPlaygroundCoverImageProps) => {+ const { theme } = useContext(ThemeContext);+ const coverImage =+ theme.name === 'light'+ ? LightCoverImage.toString()+ : DarkCoverImage.toString();+ return (+ <StyledCard+ className={className}+ style={{ backgroundImage: `url('${coverImage}')` }}+ >+ {children}+ </StyledCard>+ );+};diff --git a/packages/twenty-front/src/modules/settings/profile/components/DeleteAccount.tsx b/packages/twenty-front/src/modules/settings/profile/components/DeleteAccount.tsxindex 2cf54d092f1..67fdfa0e14a 100644--- a/packages/twenty-front/src/modules/settings/profile/components/DeleteAccount.tsx+++ b/packages/twenty-front/src/modules/settings/profile/components/DeleteAccount.tsx@@ -7,11 +7,12 @@ import { countAvailableWorkspaces } from '@/auth/utils/availableWorkspacesUtils'import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';import { useModal } from '@/ui/layout/modal/hooks/useModal';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { isDefined } from 'twenty-shared/utils';import { H2Title } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import {useDeleteUserAccountMutation,useDeleteUserWorkspaceMutation,@@ -21,7 +22,7 @@ const DELETE_ACCOUNT_MODAL_ID = 'delete-account-modal';const LEAVE_WORKSPACE_MODAL_ID = 'leave-workspace-modal';const StyledDiv = styled.div`- margin-bottom: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${themeCssVariables.spacing[2]};`;export const DeleteAccount = () => {diff --git a/packages/twenty-front/src/modules/settings/profile/components/EmailField.tsx b/packages/twenty-front/src/modules/settings/profile/components/EmailField.tsxindex df549d07a6c..c9aa6bcecbd 100644--- a/packages/twenty-front/src/modules/settings/profile/components/EmailField.tsx+++ b/packages/twenty-front/src/modules/settings/profile/components/EmailField.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useState } from 'react';import { currentUserState } from '@/auth/states/currentUserState';@@ -8,17 +8,18 @@ import { useUpdateEmail } from '@/settings/profile/hooks/useUpdateEmail';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';import { IconCheck, IconPencil, IconX } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledFieldRow = styled.div`display: flex;align-items: stretch;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledActionWrapper = styled.div`diff --git a/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx b/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsxindex 06e802dc17f..e03407ac121 100644--- a/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx+++ b/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useEffect, useState } from 'react';import { useDebouncedCallback } from 'use-debounce';@@ -11,13 +11,14 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSiimport { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';import { useCanEditProfileField } from '@/settings/profile/hooks/useCanEditProfileField';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { logError } from '~/utils/logError';const StyledComboInputContainer = styled.div`display: flex;flex-direction: row;> * + * {- margin-left: ${({ theme }) => theme.spacing(4)};+ margin-left: ${themeCssVariables.spacing[4]};}`;diff --git a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsx b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsxindex 1e253d32081..bfe66f02272 100644--- a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsx+++ b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesList.tsx@@ -2,7 +2,7 @@ import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';import { Table } from '@/ui/layout/table/components/Table';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { SettingsRolesTableHeader } from '@/settings/roles/components/SettingsRolesTableHeader';@@ -23,30 +23,31 @@ import {import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';import { MenuItemToggle } from 'twenty-ui/navigation';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { sortByAscString } from '~/utils/array/sortByAscString';const StyledCreateRoleSection = styled(Section)`- border-top: 1px solid ${({ theme }) => theme.border.color.light};+ border-top: 1px solid ${themeCssVariables.border.color.light};display: flex;justify-content: flex-end;- padding-top: ${({ theme }) => theme.spacing(2)};- padding-bottom: ${({ theme }) => theme.spacing(2)};+ padding-top: ${themeCssVariables.spacing[2]};+ padding-bottom: ${themeCssVariables.spacing[2]};`;const StyledTableRows = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};`;const StyledNoRoles = styled(TableCell)`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;const StyledSearchAndFilterContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};- margin-bottom: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};+ margin-bottom: ${themeCssVariables.spacing[2]};width: 100%;`;diff --git a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesTableRow.tsx b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesTableRow.tsxindex 7a07ba9fb81..483857e8fde 100644--- a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesTableRow.tsx+++ b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesTableRow.tsx@@ -1,9 +1,8 @@import { currentWorkspaceMembersState } from '@/auth/states/currentWorkspaceMembersState';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import React from 'react';+import { styled } from '@linaria/react';+import React, { useContext } from 'react';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath, isDefined } from 'twenty-shared/utils';@@ -15,18 +14,20 @@ import {TooltipDelay,useIcons,} from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type RoleWithPartialMembers } from '@/settings/roles/types/RoleWithPartialMembers';const StyledAssignedText = styled.div`- color: ${({ theme }) => theme.font.color.secondary};- font-size: ${({ theme }) => theme.font.size.sm};+ color: ${themeCssVariables.font.color.secondary};+ font-size: ${themeCssVariables.font.size.sm};`;const StyledNameCell = styled.div`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledAvatarGroup = styled.div`@@ -50,7 +51,7 @@ const StyledIconLockContainer = styled.div`const StyledTableRow = styled(TableRow)`&:hover {- background: ${({ theme }) => theme.background.transparent.light};+ background: ${themeCssVariables.background.transparent.light};cursor: pointer;}`;@@ -60,7 +61,7 @@ type SettingsRolesTableRowProps = {};export const SettingsRolesTableRow = ({ role }: SettingsRolesTableRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 f59381c2e96..8ba8f5d4027 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@@ -3,10 +3,11 @@ import { SettingsRoleAssignmentTable } from '@/settings/roles/role-assignment/coimport { SettingsRoleAssignmentWorkspaceMemberPickerDropdown } from '@/settings/roles/role-assignment/components/SettingsRoleAssignmentWorkspaceMemberPickerDropdown';import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { AppTooltip, IconPlus, TooltipDelay } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type Agent, type ApiKeyForRole } from '~/generated-metadata/graphql';import {type PartialWorkspaceMember,@@ -17,7 +18,7 @@ import { ROLE_TARGET_CONFIG } from '@/settings/roles/role-assignment/constants/Rconst StyledAssignToMemberContainer = styled.div`display: flex;justify-content: flex-end;- padding-block: ${({ theme }) => theme.spacing(2)};+ padding-block: ${themeCssVariables.spacing[2]};`;type RoleAssignmentSectionProps = {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 b1b59b2111f..96de8a3361f 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@@ -2,13 +2,14 @@ import { currentWorkspaceMembersState } from '@/auth/states/currentWorkspaceMembimport { SettingsCard } from '@/settings/components/SettingsCard';import { type SettingsRoleAssignmentConfirmationModalSelectedRoleTarget } from '@/settings/roles/role-assignment/types/SettingsRoleAssignmentConfirmationModalSelectedRoleTarget';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Avatar } from 'twenty-ui/display';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSettingsCardContainer = styled.div`- margin-top: ${({ theme }) => theme.spacing(6)};+ margin-top: ${themeCssVariables.spacing[6]};`;type SettingsRoleAssignmentConfirmationModalSubtitleProps = {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 a60b4c6df19..d8b19377e7d 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@@ -3,7 +3,7 @@ import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/Dropimport { DropdownMenuSearchInput } from '@/ui/layout/dropdown/components/DropdownMenuSearchInput';import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useMemo, useState } from 'react';import {@@ -13,29 +13,30 @@ import {type ApiKeyForRole,} from '~/generated-metadata/graphql';import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledLoadingContainer = styled.div`- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};text-align: center;`;const StyledDropdownItem = styled.div`- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};cursor: pointer;&:hover {- background-color: ${({ theme }) => theme.background.transparent.lighter};+ background-color: ${themeCssVariables.background.transparent.lighter};}`;const StyledItemName = styled.div`- color: ${({ theme }) => theme.font.color.secondary};- font-weight: ${({ theme }) => theme.font.weight.medium};+ color: ${themeCssVariables.font.color.secondary};+ font-weight: ${themeCssVariables.font.weight.medium};`;const StyledEmptyState = styled.div`- color: ${({ theme }) => theme.font.color.tertiary};- padding: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.tertiary};+ padding: ${themeCssVariables.spacing[2]};text-align: center;`;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 e814a44790f..9f99d69074e 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@@ -8,7 +8,7 @@ import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtoimport { TableCell } from '@/ui/layout/table/components/TableCell';import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useMemo, useState } from 'react';@@ -16,28 +16,29 @@ import { H2Title, IconSearch } from 'twenty-ui/display';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';const StyledTable = styled.div`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;const StyledTableRows = styled.div`- gap: ${({ theme }) => theme.spacing(0.5)};- padding-block: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing['0.5']};+ padding-block: ${themeCssVariables.spacing[2]};`;const StyledEmptyState = styled(TableCell)`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;const StyledSearchContainer = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};`;const StyledSearchInput = styled(SettingsTextInput)`input {- background: ${({ theme }) => theme.background.transparent.lighter};- border: 1px solid ${({ theme }) => theme.border.color.medium};+ background: ${themeCssVariables.background.transparent.lighter};+ border: 1px solid ${themeCssVariables.border.color.medium};}`;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 99fe5191e2d..2efb3db12d4 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@@ -2,10 +2,9 @@ import { currentWorkspaceMembersState } from '@/auth/states/currentWorkspaceMembimport { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';import { UserContext } from '@/users/contexts/UserContext';-import { useTheme } from '@emotion/react';-import { t } from '@lingui/core/macro';-import styled from '@emotion/styled';import { useContext } from 'react';+import { t } from '@lingui/core/macro';+import { styled } from '@linaria/react';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import {Avatar,@@ -13,6 +12,8 @@ import {OverflowingTextWithTooltip,useIcons,} from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { type Agent, type ApiKeyForRole } from '~/generated-metadata/graphql';import { dateLocaleState } from '~/localization/states/dateLocaleState';import { formatDateString } from '~/utils/string/formatDateString';@@ -25,7 +26,7 @@ const StyledIconWrapper = styled.div``;const StyledNameCell = styled.div`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};flex: 1;min-width: 0;`;@@ -34,7 +35,7 @@ const StyledNameContainer = styled.div`align-items: center;display: flex;overflow: hidden;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};width: 100%;`;@@ -54,7 +55,7 @@ type SettingsRoleAssignmentTableRowProps = {export const SettingsRoleAssignmentTableRow = ({roleTarget,}: SettingsRoleAssignmentTableRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const currentWorkspaceMembers = useAtomStateValue(currentWorkspaceMembersState,);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 b581c8bb984..e5d57ffd8e3 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@@ -3,12 +3,13 @@ import { SettingsRolePermissionsObjectLevelSection } from '@/settings/roles/roleimport { SettingsRolePermissionsObjectsSection } from '@/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsSection';import { SettingsRolePermissionsSettingsSection } from '@/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection';import { SettingsRolePermissionsToolSection } from '@/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsToolSection';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRolePermissionsContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[8]};`;type SettingsRolePermissionsProps = {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 b21c20001c8..22aa5f51e5b 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@@ -3,14 +3,15 @@ import { SettingsCard } from '@/settings/components/SettingsCard';import { useFilterObjectMetadataItemsWithPermissionOverride } from '@/settings/roles/role-permissions/object-level-permissions/hooks/useFilterObjectWithPermissionOverride';import { useObjectMetadataItemsThatCanHavePermission } from '@/settings/roles/role-permissions/object-level-permissions/hooks/useObjectMetadataItemsThatCanHavePermission';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext, useState } from 'react';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';-import { useState } from 'react';import { useSearchParams } from 'react-router-dom';import { SettingsPath } from 'twenty-shared/types';import { H2Title, IconSearch, useIcons } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const StyledTypeSelectContainer = styled.div`@@ -22,7 +23,7 @@ const StyledTypeSelectContainer = styled.div`const StyledContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};justify-content: flex-start;flex-wrap: wrap;width: 100%;@@ -32,17 +33,17 @@ const StyledCardContainer = styled.div`cursor: pointer;display: flex;position: relative;- width: calc(50% - ${({ theme }) => theme.spacing(1)});+ width: calc(50% - ${themeCssVariables.spacing[1]});`;const StyledSearchContainer = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};`;const StyledSearchInput = styled(SettingsTextInput)`input {- background: ${({ theme }) => theme.background.transparent.lighter};- border: 1px solid ${({ theme }) => theme.border.color.medium};+ background: ${themeCssVariables.background.transparent.lighter};+ border: 1px solid ${themeCssVariables.border.color.medium};}`;@@ -51,7 +52,7 @@ export const SettingsRolePermissionsObjectLevelObjectPicker = ({}: {roleId: string;}) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const navigate = useNavigateSettings();const [searchParams] = useSearchParams();const fromAgentId = searchParams.get('fromAgent');diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelOverrideCell.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelOverrideCell.tsxindex 6ebefa6db5f..b963629c176 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelOverrideCell.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/components/SettingsRolePermissionsObjectLevelOverrideCell.tsx@@ -5,7 +5,7 @@ import { SETTINGS_ROLE_OBJECT_LEVEL_PERMISSION_TO_ROLE_OBJECT_PERMISSION_MAPPINGimport { type SettingsRoleObjectPermissionKey } from '@/settings/roles/role-permissions/objects-permissions/constants/SettingsRoleObjectPermissionIconConfig';import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { AppTooltip, TooltipDelay } from 'twenty-ui/display';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 4c79cd5c712..6489267a5ba 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@@ -1,12 +1,13 @@import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';import { SETTINGS_ROLE_OBJECT_LEVEL_PERMISSION_TO_ROLE_OBJECT_PERMISSION_MAPPING } from '@/settings/roles/role-permissions/objects-permissions/constants/SettingsRoleObjectLevelPermissionToRoleObjectPermissionMapping';import { type SettingsRoleObjectPermissionKey } from '@/settings/roles/role-permissions/objects-permissions/constants/SettingsRoleObjectPermissionIconConfig';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { SettingsRolePermissionsObjectLevelOverrideCell } from './SettingsRolePermissionsObjectLevelOverrideCell';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSettingsRolePermissionsObjectLevelOverrideCell = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;type SettingsRolePermissionsObjectLevelOverrideCellContainerProps = {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 ebe40bd6036..71391fbb13e 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@@ -7,7 +7,7 @@ import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDrimport { Table } from '@/ui/layout/table/components/Table';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { TableCell } from '@/ui/layout/table/components/TableCell';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useMemo } from 'react';import { SettingsPath } from 'twenty-shared/types';@@ -15,19 +15,20 @@ import { isDefined } from 'twenty-shared/utils';import { IconPlus } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const StyledCreateObjectOverrideSection = styled(Section)`- border-top: 1px solid ${({ theme }) => theme.border.color.light};+ border-top: 1px solid ${themeCssVariables.border.color.light};display: flex;justify-content: flex-end;- padding-top: ${({ theme }) => theme.spacing(2)};- padding-bottom: ${({ theme }) => theme.spacing(2)};+ padding-top: ${themeCssVariables.spacing[2]};+ padding-bottom: ${themeCssVariables.spacing[2]};`;const StyledTableRows = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};`;type SettingsRolePermissionsObjectLevelSectionProps = {@@ -38,7 +39,7 @@ type SettingsRolePermissionsObjectLevelSectionProps = {};const StyledNoOverride = styled(TableCell)`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};`;export const SettingsRolePermissionsObjectLevelSection = ({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 cb750253506..9c79e834444 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@@ -6,15 +6,17 @@ import { SettingsRolePermissionsObjectLevelUpdateFieldsValueForObject } from '@/import { OBJECT_LEVEL_PERMISSION_TABLE_GRID_AUTO_COLUMNS } from '@/settings/roles/role-permissions/object-level-permissions/constants/ObjectLevelPermissionTableGridAutoColumns';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { SettingsPath } from 'twenty-shared/types';import { getSettingsPath } from 'twenty-shared/utils';import { OverflowingTextWithTooltip, useIcons } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledNameTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.primary};- gap: ${({ theme }) => theme.spacing(1)};+ color: ${themeCssVariables.font.color.primary};+ gap: ${themeCssVariables.spacing[1]};`;const StyledNameLabel = styled.div`@@ -25,7 +27,7 @@ const StyledNameLabel = styled.div`const StyledOptionsTableCell = styled(TableCell)`justify-content: flex-end;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;type SettingsRolePermissionsObjectLevelTableRowProps = {@@ -42,7 +44,7 @@ export const SettingsRolePermissionsObjectLevelTableRow = ({fromAgentId,}: SettingsRolePermissionsObjectLevelTableRowProps) => {const { getIcon } = useIcons();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const Icon = getIcon(objectMetadataItem.icon);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 c60352ea70f..13f4d00355f 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@@ -15,12 +15,13 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableHeaderText } from '@/ui/layout/table/components/TableHeaderText';import { sortedFieldByTableFamilyState } from '@/ui/layout/table/states/sortedFieldByTableFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';import { isNonEmptyArray } from 'twenty-shared/utils';import { H2Title, IconSearch } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { sortByProperty } from '~/utils/array/sortByProperty';import { turnOrderByIntoSort } from '~/utils/turnOrderByIntoSort';@@ -28,7 +29,7 @@ export const SETTINGS_ROLE_PERMISSION_OBJECT_LEVEL_FIELD_PERMISSION_TABLE_ID ='settings-role-permissions-object-level-object-field-permission';const StyledSearchInput = styled(SettingsTextInput)`- padding-bottom: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};width: 100%;`;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 1ce000c84b7..87a9c0fcdb2 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@@ -8,26 +8,27 @@ import { useRestrictUpdateOnAllFieldsOfObject } from '@/settings/roles/role-permimport { OverridableCheckbox } from '@/settings/roles/role-permissions/object-level-permissions/object-form/components/OverridableCheckbox';import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Label } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSectionHeader = styled.div`align-items: center;- background-color: ${({ theme }) => theme.background.transparent.lighter};- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};display: grid;grid-template-columns: ${FIELD_LEVEL_PERMISSION_TABLE_GRID_TEMPLATE_COLUMNS};- height: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};- padding-left: ${({ theme }) => theme.spacing(2)};+ padding-left: ${themeCssVariables.spacing[2]};`;const StyledCheckboxContainer = styled.div`display: flex;justify-content: flex-end;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;export const SettingsRolePermissionsObjectLevelObjectFieldPermissionTableAllHeaderRow =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 a8ee9f1ef46..8f23780997e 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@@ -9,11 +9,12 @@ import { useUpsertFieldPermissionInDraftRole } from '@/settings/roles/role-permiimport { OverridableCheckbox } from '@/settings/roles/role-permissions/object-level-permissions/object-form/components/OverridableCheckbox';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { useMemo } from 'react';+import { styled } from '@linaria/react';+import { useContext, useMemo } from 'react';import { isDefined } from 'twenty-shared/utils';import { useIcons } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { v4 } from 'uuid';import {type FieldPermission,@@ -25,8 +26,8 @@ export const StyledObjectFieldTableRow = styled(TableRow)``;const StyledNameTableCell = styled(TableCell)`- color: ${({ theme }) => theme.font.color.primary};- gap: ${({ theme }) => theme.spacing(2)};+ color: ${themeCssVariables.font.color.primary};+ gap: ${themeCssVariables.spacing[2]};`;const StyledNameLabel = styled.div`@@ -53,7 +54,7 @@ export const SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRow =roleId,isLabelIdentifier,}: SettingsRolePermissionsObjectLevelObjectFieldPermissionTableRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 072bea943e7..943417e073a 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,7 +1,9 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { IconReload, IconX } from 'twenty-ui/display';import { Checkbox } from 'twenty-ui/input';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { AnimatedRotate } from 'twenty-ui/utilities';export type OverridableCheckboxType = 'default' | 'override' | 'no_cta';@@ -10,15 +12,15 @@ const StyledOverridableCheckboxContainer = styled.div`align-items: center;display: inline-flex;justify-content: flex-start;- width: ${({ theme }) => theme.icon.size.xl * 2}px;+ width: calc(${themeCssVariables.icon.size.xl} * 2);`;const StyledOverridableCheckboxContainerItem = styled.div`align-items: center;display: flex;- height: ${({ theme }) => theme.icon.size.xl}px;+ height: ${themeCssVariables.icon.size.xl};justify-content: center;- width: ${({ theme }) => theme.icon.size.xl}px;+ width: ${themeCssVariables.icon.size.xl};`;const StyledIconWrapper = styled.div<{@@ -46,7 +48,7 @@ export const OverridableCheckbox = ({checked,disabled,}: OverridableCheckboxProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledOverridableCheckboxContainer>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 17e7cf4ce0e..1f9a975b4c1 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@@ -4,18 +4,19 @@ import { SettingsRolePermissionsObjectLevelObjectFormObjectLevelTableRow } fromimport { type SettingsRolePermissionsObjectLevelPermission } from '@/settings/roles/role-permissions/objects-permissions/types/SettingsRolePermissionsObjectPermission';import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { H2Title } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTable = styled.div`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;const StyledTableRows = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};`;type SettingsRolePermissionsObjectLevelObjectFormObjectLevelProps = {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 d4f35fb62a5..20ce9fb650a 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@@ -9,9 +9,10 @@ import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDrimport { TableCell } from '@/ui/layout/table/components/TableCell';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+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 { type ObjectPermission, type Role } from '~/generated-metadata/graphql';const StyledTableRow = styled(TableRow)<{ isDisabled: boolean }>`@@ -24,32 +25,32 @@ const StyledPermissionCell = styled(TableCell)`align-items: center;display: flex;flex: 1;- gap: ${({ theme }) => theme.spacing(1)};- padding-left: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[1]};+ padding-left: ${themeCssVariables.spacing[2]};`;const StyledPermissionContent = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledPermissionLabel = styled.span`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};`;const StyledOverrideInfo = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledCheckboxCell = styled(TableCell)`align-items: center;display: flex;justify-content: flex-end;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;type OverridableCheckboxType = 'no_cta' | 'default' | 'override';diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelect.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelect.tsxindex c2bbccc501c..53cee79d60a 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelect.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionFieldSelect.tsx@@ -1,6 +1,6 @@/* @license Enterprise */-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { AdvancedFilterFieldSelectDropdownButtonClickableSelect } from '@/object-record/advanced-filter/components/AdvancedFilterFieldSelectDropdownButtonClickableSelect';import { DEFAULT_ADVANCED_FILTER_DROPDOWN_OFFSET } from '@/object-record/advanced-filter/constants/DefaultAdvancedFilterDropdownOffset';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 246d0bdc8b8..36aea9e6875 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@@ -1,10 +1,11 @@/* @license Enterprise */-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isDefined } from 'twenty-shared/utils';import { IconFilter, IconPlus } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { ActionButton } from '@/action-menu/actions/display/components/ActionButton';import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';@@ -31,18 +32,18 @@ const StyledContainer = styled.div`align-items: start;display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledFiltersContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};width: 100%;`;const StyledActionButtonWrapper = styled.div`- margin-top: ${({ theme }) => theme.spacing(2)};+ margin-top: ${themeCssVariables.spacing[2]};`;type SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterBuilderContentProps =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 57ce86f1480..92007b00c26 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@@ -1,6 +1,6 @@/* @license Enterprise */-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { AdvancedFilterCommandMenuRecordFilterOperandSelect } from '@/object-record/advanced-filter/command-menu/components/AdvancedFilterCommandMenuRecordFilterOperandSelect';import { AdvancedFilterRecordFilterOptionsDropdown } from '@/object-record/advanced-filter/components/AdvancedFilterRecordFilterOptionsDropdown';@@ -11,12 +11,13 @@ 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';const StyledFilterRow = styled.div`display: flex;flex-direction: row;align-items: center;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledOperandSelectContainer = styled.div`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 abbfa777fd9..2bb95a714d5 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@@ -1,6 +1,6 @@/* @license Enterprise */-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext } from 'react';import { capitalize } from 'twenty-shared/utils';@@ -12,20 +12,21 @@ 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';const StyledText = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;- height: ${({ theme }) => theme.spacing(8)};- padding-left: ${({ theme }) => theme.spacing(2)};+ height: ${themeCssVariables.spacing[8]};+ padding-left: ${themeCssVariables.spacing[2]};`;const StyledContainer = styled.div`align-items: start;display: flex;- min-width: ${({ theme }) => theme.spacing(16)};- color: ${({ theme }) => theme.font.color.tertiary};+ min-width: ${themeCssVariables.spacing[16]};+ color: ${themeCssVariables.font.color.tertiary};`;type SettingsRolePermissionsObjectLevelRecordLevelPermissionLogicalOperatorCellProps =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 6f174fd9c04..5a504318e12 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@@ -1,6 +1,6 @@/* @license Enterprise */-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useState } from 'react';import {@@ -10,6 +10,7 @@ import {import { isDefined } from 'twenty-shared/utils';import { IconUserCircle, IconX, useIcons } from 'twenty-ui/display';import { MenuItem } from 'twenty-ui/navigation';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';@@ -35,22 +36,22 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useconst StyledSearchInput = styled.input`background: transparent;border: none;- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};border-radius: 0;- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};font-family: inherit;- font-size: ${({ theme }) => theme.font.size.sm};+ font-size: ${themeCssVariables.font.size.sm};font-weight: inherit;margin: 0;max-width: 100%;min-height: 19px;outline: none;overflow: hidden;- padding: ${({ theme }) => theme.spacing(2)};+ padding: ${themeCssVariables.spacing[2]};text-decoration: none;&::placeholder {- color: ${({ theme }) => theme.font.color.light};+ color: ${themeCssVariables.font.color.light};}`;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 62138bcbdec..4f5257134e7 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@@ -1,7 +1,6 @@/* @license Enterprise */-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { useContext, useMemo } from 'react';import { FieldMetadataType } from 'twenty-shared/types';@@ -26,6 +25,8 @@ import { currentRecordFiltersComponentState } from '@/object-record/record-filteimport { type CompositeFieldType } from '@/settings/data-model/types/CompositeFieldType';import { createRecordLevelPermissionVariablePicker } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`align-items: stretch;@@ -40,17 +41,17 @@ const StyledIconContainer = styled.div`align-items: center;display: flex;justify-content: center;- background-color: ${({ theme }) => theme.background.transparent.lighter};- border-top-right-radius: ${({ theme }) => theme.border.radius.sm};- border-bottom-right-radius: ${({ theme }) => theme.border.radius.sm};- border: 1px solid ${({ theme }) => theme.border.color.medium};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border-top-right-radius: ${themeCssVariables.border.radius.sm};+ border-bottom-right-radius: ${themeCssVariables.border.radius.sm};+ border: 1px solid ${themeCssVariables.border.color.medium};border-left: none;cursor: pointer;- padding: ${({ theme }) => theme.spacing(2)};- color: ${({ theme }) => theme.font.color.tertiary};+ padding: ${themeCssVariables.spacing[2]};+ color: ${themeCssVariables.font.color.tertiary};&:hover {- background-color: ${({ theme }) => theme.background.transparent.light};+ background-color: ${themeCssVariables.background.transparent.light};}`;@@ -58,21 +59,21 @@ const StyledReadOnlyInput = styled.div`display: flex;align-items: center;flex: 1;- padding: ${({ theme }) => theme.spacing(2)};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-top-left-radius: ${({ theme }) => theme.border.radius.sm};- border-bottom-left-radius: ${({ theme }) => theme.border.radius.sm};- background-color: ${({ theme }) => theme.background.secondary};- color: ${({ theme }) => theme.font.color.primary};- font-size: ${({ theme }) => theme.font.size.md};+ padding: ${themeCssVariables.spacing[2]};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-top-left-radius: ${themeCssVariables.border.radius.sm};+ border-bottom-left-radius: ${themeCssVariables.border.radius.sm};+ background-color: ${themeCssVariables.background.secondary};+ color: ${themeCssVariables.font.color.primary};+ font-size: ${themeCssVariables.font.size.md};height: 32px;box-sizing: border-box;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};overflow: hidden;`;const StyledMeText = styled.span`- color: ${({ theme }) => theme.color.blue};+ color: ${themeCssVariables.color.blue};flex-shrink: 0;`;@@ -98,7 +99,7 @@ export const SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInput =({recordFilterId,}: SettingsRolePermissionsObjectLevelRecordLevelPermissionValueInputProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { objectMetadataItem } = useContext(AdvancedFilterContext);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 329cdb676fe..8f078d09e24 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@@ -1,8 +1,10 @@/* @license Enterprise */-import { css, useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { IconVariablePlus } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';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';@@ -16,32 +18,39 @@ const StyledRecordLevelPermissionPickerContainer = styled.div<{display: flex;justify-content: center;- ${({ theme, readonly }) =>- !readonly &&- css`- :hover {- background-color: ${theme.background.transparent.light};- }- `}-- ${({ theme, multiline }) =>+ background-color: ${({ multiline }) =>+ multiline+ ? 'transparent'+ : themeCssVariables.background.transparent.lighter};+ border: ${({ multiline }) =>+ multiline ? 'none' : `1px solid ${themeCssVariables.border.color.medium}`};+ border-bottom-right-radius: ${({ multiline }) =>+ multiline ? '0' : themeCssVariables.border.radius.sm};+ border-radius: ${({ multiline }) =>+ multiline ? themeCssVariables.border.radius.sm : '0'};+ border-top-right-radius: ${({ multiline }) =>+ multiline ? '0' : themeCssVariables.border.radius.sm};+ color: ${({ multiline }) =>multiline- ? css`- border-radius: ${theme.border.radius.sm};- padding: ${theme.spacing(0.5)} ${theme.spacing(0)};- position: absolute;- right: ${theme.spacing(0)};- top: ${theme.spacing(0)};- `- : css`- background-color: ${theme.background.transparent.lighter};- border-top-right-radius: ${theme.border.radius.sm};- border-bottom-right-radius: ${theme.border.radius.sm};- border: 1px solid ${theme.border.color.medium};- cursor: pointer;- padding: ${theme.spacing(2)};- color: ${theme.font.color.tertiary};- `}+ ? themeCssVariables.font.color.primary+ : themeCssVariables.font.color.tertiary};+ cursor: ${({ multiline }) => (multiline ? 'default' : 'pointer')};+ padding: ${({ multiline }) =>+ multiline+ ? `${themeCssVariables.spacing['0.5']} ${themeCssVariables.spacing[0]}`+ : themeCssVariables.spacing[2]};+ position: ${({ multiline }) => (multiline ? 'absolute' : 'relative')};+ right: ${({ multiline }) =>+ multiline ? themeCssVariables.spacing[0] : 'auto'};+ top: ${({ multiline }) =>+ multiline ? themeCssVariables.spacing[0] : 'auto'};++ &:hover {+ background-color: ${({ readonly }) =>+ readonly+ ? 'transparent'+ : themeCssVariables.background.transparent.light};+ }`;export const createRecordLevelPermissionVariablePicker = (@@ -56,7 +65,7 @@ export const createRecordLevelPermissionVariablePicker = (disabled,multiline,}) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 761c865b905..8c52db4bfd1 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@@ -1,6 +1,6 @@/* @license Enterprise */-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Pill } from 'twenty-ui/components';import { H2Title, IconArrowUp, IconLock } from 'twenty-ui/display';@@ -13,25 +13,26 @@ import { SettingsRolePermissionsObjectLevelRecordLevelPermissionFilterBuilder }import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { SettingsPath } from 'twenty-shared/types';import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useNavigateSettings } from '~/hooks/useNavigateSettings';const StyledContent = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(4)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[4]};`;const StyledCard = styled(Card)`- margin-top: ${({ theme }) => theme.spacing(4)};+ margin-top: ${themeCssVariables.spacing[4]};overflow: hidden;`;const StyledPill = styled(Pill)`border-radius: 40px;- border: 1px solid ${({ theme }) => theme.border.color.light};- background: ${({ theme }) => theme.background.secondary};- color: ${({ theme }) => theme.font.color.tertiary};- font-weight: ${({ theme }) => theme.font.weight.medium};- padding: ${({ theme }) => theme.spacing(1)} ${({ theme }) => theme.spacing(2)};+ border: 1px solid ${themeCssVariables.border.color.light};+ background: ${themeCssVariables.background.secondary};+ color: ${themeCssVariables.font.color.tertiary};+ font-weight: ${themeCssVariables.font.weight.medium};+ padding: ${themeCssVariables.spacing[1]} ${themeCssVariables.spacing[2]};`;type SettingsRolePermissionsObjectLevelRecordLevelSectionProps = {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 a3bff757138..2c7d3e0ec90 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@@ -2,8 +2,10 @@ import {SETTINGS_ROLE_OBJECT_PERMISSION_ICON_CONFIG,type SettingsRoleObjectPermissionKey,} from '@/settings/roles/role-permissions/objects-permissions/constants/SettingsRoleObjectPermissionIconConfig';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type PermissionIconProps = {permission: SettingsRoleObjectPermissionKey;@@ -12,28 +14,32 @@ type PermissionIconProps = {const StyledIconWrapper = styled.div<{ isRevoked?: boolean }>`align-items: center;- background: ${({ theme, isRevoked }) =>- isRevoked ? theme.color.orange3 : theme.color.blue3};+ background: ${({ isRevoked }) =>+ isRevoked+ ? themeCssVariables.color.orange3+ : themeCssVariables.color.blue3};border: 1px solid- ${({ theme, isRevoked }) =>- isRevoked ? theme.color.orange7 : theme.color.blue7};- border-radius: ${({ theme }) => theme.border.radius.sm};+ ${({ isRevoked }) =>+ isRevoked+ ? themeCssVariables.color.orange7+ : themeCssVariables.color.blue7};+ border-radius: ${themeCssVariables.border.radius.sm};display: flex;- height: ${({ theme }) => theme.spacing(4)};+ height: ${themeCssVariables.spacing[4]};justify-content: center;- width: ${({ theme }) => theme.spacing(4)};+ width: ${themeCssVariables.spacing[4]};`;const StyledIcon = styled.div<{ isRevoked?: boolean }>`align-items: center;display: flex;- color: ${({ theme, isRevoked }) =>- isRevoked ? theme.color.orange : theme.color.blue};+ color: ${({ isRevoked }) =>+ isRevoked ? themeCssVariables.color.orange : themeCssVariables.color.blue};justify-content: center;`;export const PermissionIcon = ({ permission, state }: PermissionIconProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { Icon, IconForbidden } =SETTINGS_ROLE_OBJECT_PERMISSION_ICON_CONFIG[permission];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 65ee8e345e3..17d043c71f5 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@@ -4,18 +4,19 @@ import { type SettingsRolePermissionsObjectPermission } from '@/settings/roles/rimport { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { H2Title } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTable = styled.div`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;const StyledTableRows = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};`;type SettingsRolePermissionsObjectsSectionProps = {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 a017b6d8f24..a60411af2ff 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@@ -4,9 +4,10 @@ import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Checkbox } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledNameHeader = styled(TableHeader)`flex: 1;@@ -16,7 +17,7 @@ const StyledActionsHeader = styled(TableHeader)`align-items: center;display: flex;justify-content: flex-end;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;type SettingsRolePermissionsObjectsTableHeaderProps = {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 bb572e8d887..79e3f518dfb 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@@ -3,39 +3,40 @@ import { type SettingsRoleObjectPermissionKey } from '@/settings/roles/role-permimport { type SettingsRolePermissionsObjectPermission } from '@/settings/roles/role-permissions/objects-permissions/types/SettingsRolePermissionsObjectPermission';import { TableCell } from '@/ui/layout/table/components/TableCell';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { plural } from '@lingui/core/macro';import { Checkbox, CheckboxAccent } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledPermissionCell = styled(TableCell)`align-items: center;display: flex;flex: 1;- gap: ${({ theme }) => theme.spacing(1)};- padding-left: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[1]};+ padding-left: ${themeCssVariables.spacing[2]};`;const StyledPermissionContent = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledPermissionLabel = styled.span`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};`;const StyledOverrideInfo = styled.div`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;const StyledCheckboxCell = styled(TableCell)`align-items: center;display: flex;justify-content: flex-end;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;const StyledTableRow = styled(TableRow)<{ isDisabled: boolean }>`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 80828d5191a..dc5ea36e6a8 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@@ -5,22 +5,23 @@ import { useSettingsRolePermissionFlagConfig } from '@/settings/roles/role-permiimport { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { H2Title, IconSettings } from 'twenty-ui/display';import { AnimatedExpandableContainer, Card, Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTable = styled.div`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;const StyledTableRows = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};`;const StyledCard = styled(Card)`- margin-bottom: ${({ theme }) => theme.spacing(4)};+ margin-bottom: ${themeCssVariables.spacing[4]};`;type SettingsRolePermissionsSettingsSectionProps = {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 06a8a02bd35..e13310e7064 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@@ -1,6 +1,6 @@import { TableHeader } from '@/ui/layout/table/components/TableHeader';import { TableRow } from '@/ui/layout/table/components/TableRow';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { Checkbox } from 'twenty-ui/input';@@ -9,6 +9,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';type SettingsRolePermissionsSettingsTableHeaderProps = {roleId: string;@@ -20,7 +21,7 @@ const StyledActionsHeader = styled(TableHeader)`align-items: center;display: flex;justify-content: flex-end;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;export const SettingsRolePermissionsSettingsTableHeader = ({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 335a8951912..63d07a82e0f 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@@ -4,9 +4,11 @@ import { TableCell } from '@/ui/layout/table/components/TableCell';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';import { TableRow } from '@/ui/layout/table/components/TableRow';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { Checkbox } from 'twenty-ui/input';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { v4 } from 'uuid';const StyledTableRow = styled(TableRow)<{ isDisabled: boolean }>`@@ -14,25 +16,25 @@ const StyledTableRow = styled(TableRow)<{ isDisabled: boolean }>``;const StyledName = styled.span`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};`;const StyledDescription = styled(StyledName)`- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};`;const StyledPermissionCell = styled(TableCell)`align-items: center;display: flex;flex: 1;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledCheckboxCell = styled(TableCell)`align-items: center;display: flex;justify-content: flex-end;- padding-right: ${({ theme }) => theme.spacing(1)};+ padding-right: ${themeCssVariables.spacing[1]};`;const StyledIconContainer = styled.div`@@ -53,7 +55,7 @@ export const SettingsRolePermissionsSettingsTableRow = ({permission,isEditable,}: SettingsRolePermissionsSettingsTableRowProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);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 009a34e24e2..68cd0387942 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@@ -5,23 +5,24 @@ import { useActionRolePermissionFlagConfig } from '@/settings/roles/role-permissimport { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState';import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { H2Title, IconTool } from 'twenty-ui/display';import { AnimatedExpandableContainer, Card, Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTable = styled.div`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;const StyledTableRows = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(2)};- padding-top: ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${themeCssVariables.spacing[2]};+ padding-top: ${themeCssVariables.spacing[2]};`;const StyledCard = styled(Card)`- margin-bottom: ${({ theme }) => theme.spacing(4)};+ margin-bottom: ${themeCssVariables.spacing[4]};`;type SettingsRolePermissionsToolSectionProps = {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 c98ddfbbf4c..2d2ecdb6361 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@@ -1,32 +1,34 @@import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext } from 'react';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { H2Title, IconKey, IconRobot, IconUsers } from 'twenty-ui/display';import { Checkbox } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { FeatureFlagKey } from '~/generated-metadata/graphql';const StyledCheckboxContainer = styled.div<{ disabled: boolean }>`display: flex;align-items: center;justify-content: space-between;- padding: ${({ theme }) => theme.spacing(1)};- border-radius: ${({ theme }) => theme.border.radius.sm};+ padding: ${themeCssVariables.spacing[1]};+ border-radius: ${themeCssVariables.border.radius.sm};transition: background-color- ${({ theme }) => theme.animation.duration.normal}s ease;+ calc(${themeCssVariables.animation.duration.normal} * 1s) ease;cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};&:hover {- background-color: ${({ theme }) => theme.background.transparent.light};+ background-color: ${themeCssVariables.background.transparent.light};}`;const StyledCheckboxLabel = styled.div`display: flex;align-items: center;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;type SettingsRoleApplicabilityValues = {@@ -49,7 +51,7 @@ export const SettingsRoleApplicability = ({onApplicabilityChange,isEditable,}: SettingsRoleApplicabilityProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isAiEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);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 19fe76e14cd..51eef8928b0 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { SettingsRoleApplicability } from '@/settings/roles/role-settings/components/SettingsRoleApplicability';@@ -14,12 +14,13 @@ import { useModal } from '@/ui/layout/modal/hooks/useModal';import { H2Title } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledInputsContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};width: 100%;- margin-bottom: ${({ theme }) => theme.spacing(2)};+ margin-bottom: ${themeCssVariables.spacing[2]};`;const StyledInputContainer = styled.div`diff --git a/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleLabelContainer.tsx b/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleLabelContainer.tsxindex e78e11811fd..6ca3295c6ae 100644--- a/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleLabelContainer.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role/components/SettingsRoleLabelContainer.tsx@@ -2,17 +2,18 @@ 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 { TitleInput } from '@/ui/input/components/TitleInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledHeaderTitle = styled.div`- color: ${({ theme }) => theme.font.color.primary};- font-weight: ${({ theme }) => theme.font.weight.semiBold};- font-size: ${({ theme }) => theme.font.size.lg};+ color: ${themeCssVariables.font.color.primary};+ font-weight: ${themeCssVariables.font.weight.semiBold};+ font-size: ${themeCssVariables.font.size.lg};width: fit-content;max-width: 420px;& > input:disabled {- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};}`;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 d8648a7df4c..2f66fab3567 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@@ -6,17 +6,18 @@ import { SettingsSSOOIDCForm } from '@/settings/security/components/SSO/Settingsimport { SettingsSSOSAMLForm } from '@/settings/security/components/SSO/SettingsSSOSAMLForm';import { type SettingSecurityNewSSOIdentityFormValues } from '@/settings/security/types/SSOIdentityProvider';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { type ReactElement, useMemo } from 'react';import { Controller, useFormContext } from 'react-hook-form';import { H2Title, type IconComponent, IconKey } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { IdentityProviderType } from '~/generated-metadata/graphql';const StyledInputsContainer = styled.div`display: grid;- gap: ${({ theme }) => theme.spacing(2, 4)};+ gap: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[4]};grid-template-columns: 1fr 1fr;grid-template-areas: 'input-1 input-1';diff --git a/packages/twenty-front/src/modules/settings/security/components/SSO/SettingsSSOIdentitiesProvidersListCard.tsx b/packages/twenty-front/src/modules/settings/security/components/SSO/SettingsSSOIdentitiesProvidersListCard.tsxindex 91d236fb09c..8b94188a370 100644--- a/packages/twenty-front/src/modules/settings/security/components/SSO/SettingsSSOIdentitiesProvidersListCard.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SSO/SettingsSSOIdentitiesProvidersListCard.tsx@@ -10,8 +10,7 @@ import { SettingsSSOIdentitiesProvidersListCardWrapper } from '@/settings/securiimport { SSOIdentitiesProvidersState } from '@/settings/security/states/SSOIdentitiesProvidersState';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { type ApolloError } from '@apollo/client';-import isPropValid from '@emotion/is-prop-valid';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';@@ -19,9 +18,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { IconKey } from 'twenty-ui/display';import { useGetSsoIdentityProvidersQuery } from '~/generated-metadata/graphql';-const StyledLink = styled(Link, {- shouldForwardProp: (prop) => isPropValid(prop) && prop !== 'isDisabled',-})<{ isDisabled: boolean }>`+const StyledLink = styled(Link)<{ isDisabled: boolean }>`pointer-events: ${({ isDisabled }) => (isDisabled ? 'none' : 'auto')};text-decoration: none;`;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 0e58b2d3a01..5cf947828ac 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@@ -3,13 +3,14 @@import { SettingsSecuritySSORowDropdownMenu } from '@/settings/security/components/SSO/SettingsSecuritySSORowDropdownMenu';import { type SSOIdentityProvider } from '@/settings/security/types/SSOIdentityProvider';import { getColorBySSOIdentityProviderStatus } from '@/settings/security/utils/getColorBySSOIdentityProviderStatus';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Status } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledRowRightContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};`;export const SettingsSSOIdentityProviderRowRightContainer = ({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 80807524737..302a8359541 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@@ -1,19 +1,20 @@/* @license Enterprise */import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { Controller, useFormContext } from 'react-hook-form';import { H2Title, IconCopy } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { REACT_APP_SERVER_BASE_URL } from '~/config';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledInputsContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2, 4)};+ gap: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[4]};width: 100%;`;@@ -24,13 +25,13 @@ const StyledContainer = styled.div`const StyledLinkContainer = styled.div`flex: 1;- margin-right: ${({ theme }) => theme.spacing(2)};+ margin-right: ${themeCssVariables.spacing[2]};`;const StyledButtonCopy = styled.div`align-items: end;display: flex;- margin-bottom: ${({ theme }) => theme.spacing(1)};+ margin-bottom: ${themeCssVariables.spacing[1]};`;export const SettingsSSOOIDCForm = () => {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 07b34cab90b..16ee4891f47 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@@ -3,10 +3,9 @@import { parseSAMLMetadataFromXMLFile } from '@/settings/security/utils/parseSAMLMetadataFromXMLFile';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { useContext, type ChangeEvent, useRef } from 'react';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';-import { type ChangeEvent, useRef } from 'react';import { useFormContext } from 'react-hook-form';import { isDefined } from 'twenty-shared/utils';import {@@ -19,13 +18,15 @@ import {} from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { REACT_APP_SERVER_BASE_URL } from '~/config';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';const StyledUploadFileContainer = styled.div`align-items: center;display: flex;- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};`;const StyledFileInput = styled.input`@@ -35,7 +36,7 @@ const StyledFileInput = styled.input`const StyledInputsContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2, 4)};+ gap: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[4]};width: 100%;`;@@ -46,18 +47,18 @@ const StyledContainer = styled.div`const StyledLinkContainer = styled.div`flex: 1;- margin-right: ${({ theme }) => theme.spacing(2)};+ margin-right: ${themeCssVariables.spacing[2]};`;const StyledButtonCopy = styled.div`align-items: end;display: flex;- margin-bottom: ${({ theme }) => theme.spacing(1)};+ margin-bottom: ${themeCssVariables.spacing[1]};`;export const SettingsSSOSAMLForm = () => {const { enqueueErrorSnackBar } = useSnackBar();- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { setValue, getValues, watch, trigger } = useFormContext();const { t } = useLingui();const { copyToClipboard } = useCopyToClipboard();diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsxindex b202d08d74a..10c78d40827 100644--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthBypassOptionsList.tsx@@ -3,11 +3,12 @@ import { authProvidersState } from '@/client-config/states/authProvidersState';import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsOptions/SettingsOptionCardContentToggle';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { ApolloError } from '@apollo/client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { capitalize } from 'twenty-shared/utils';import { IconGoogle, IconMicrosoft, IconPassword } from 'twenty-ui/display';import { Card } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import {type AuthProviders,useUpdateWorkspaceMutation,@@ -18,7 +19,7 @@ import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';const StyledSettingsSecurityOptionsList = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;export const SettingsSecurityAuthBypassOptionsList = () => {diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsxindex 3eb2cfda474..6dd0d5eac97 100644--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityAuthProvidersOptionsList.tsx@@ -4,7 +4,7 @@ import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsOimport { SSOIdentitiesProvidersState } from '@/settings/security/states/SSOIdentitiesProvidersState';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { ApolloError } from '@apollo/client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { ConnectedAccountProvider } from 'twenty-shared/types';@@ -16,6 +16,7 @@ import {IconPassword,} from 'twenty-ui/display';import { Card } from 'twenty-ui/layout';+import { themeCssVariables } from 'twenty-ui/theme-constants';import {type AuthProviders,useUpdateWorkspaceMutation,@@ -27,7 +28,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateconst StyledSettingsSecurityOptionsList = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[4]};`;export const SettingsSecurityAuthProvidersOptionsList = () => {diff --git a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsxindex f1d05c76745..36fb9854638 100644--- a/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/SettingsSecurityEditableProfileFields.tsx@@ -6,7 +6,7 @@ import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';import { ApolloError } from '@apollo/client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { isDefined } from 'twenty-shared/utils';@@ -19,12 +19,13 @@ import {} from 'twenty-ui/display';import { type SelectOption } from 'twenty-ui/input';import { MenuItemMultiSelect } from 'twenty-ui/navigation';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useUpdateWorkspaceMutation } from '~/generated-metadata/graphql';const StyledDropdownContainer = styled.div`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(3)};+ gap: ${themeCssVariables.spacing[3]};`;type ProfileFieldOption = {diff --git a/packages/twenty-front/src/modules/settings/security/components/approvedAccessDomains/SettingsApprovedAccessDomainsListCard.tsx b/packages/twenty-front/src/modules/settings/security/components/approvedAccessDomains/SettingsApprovedAccessDomainsListCard.tsxindex ac1a17eb4c7..cdfda80bdc1 100644--- a/packages/twenty-front/src/modules/settings/security/components/approvedAccessDomains/SettingsApprovedAccessDomainsListCard.tsx+++ b/packages/twenty-front/src/modules/settings/security/components/approvedAccessDomains/SettingsApprovedAccessDomainsListCard.tsx@@ -9,7 +9,7 @@ import { SettingsSecurityApprovedAccessDomainValidationEffect } from '@/settingsimport { approvedAccessDomainsState } from '@/settings/security/states/ApprovedAccessDomainsState';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { ApolloError } from '@apollo/client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';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 1771c0513a9..dc6aa115dd5 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,16 +1,17 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledDashContainer = styled.div`display: flex;- width: ${({ theme }) => theme.spacing(2)};+ width: ${themeCssVariables.spacing[2]};justify-content: center;align-items: center;`;const StyledDash = styled.div`- background-color: ${({ theme }) => theme.font.color.light};- height: ${({ theme }) => theme.spacing(0.4)};- width: ${({ theme }) => theme.spacing(1.5)};+ background-color: ${themeCssVariables.font.color.light};+ height: 1.6px;+ width: ${themeCssVariables.spacing['1.5']};`;export const TwoFactorAuthenticationVerificationCodeDash = () => {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 95790379248..a6576e87963 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,35 +1,34 @@-import { css } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type SlotProps } from 'input-otp';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSlot = styled.div<{ isActive: boolean }>`position: relative;width: 24px;height: 32px;- font-size: ${({ theme }) => theme.font.size.md};+ font-size: ${themeCssVariables.font.size.md};display: flex;align-items: center;justify-content: center;transition: all 0.3s;- background-color: ${({ theme }) => theme.background.transparent.lighter};- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};.group:hover &,.group:focus-within & {- border-color: ${({ theme }) => theme.border.color.medium};+ border-color: ${themeCssVariables.border.color.medium};}outline: 0;- outline-color: ${({ theme }) => theme.border.color.medium};+ outline-color: ${themeCssVariables.border.color.medium};- ${({ isActive, theme }) =>- isActive &&- css`- outline-width: 1px;- outline-style: solid;- outline-color: ${theme.border.color.strong};- `}+ outline-color: ${({ isActive }) =>+ isActive+ ? themeCssVariables.border.color.strong+ : themeCssVariables.border.color.medium};+ outline-style: ${({ isActive }) => (isActive ? 'solid' : 'none')};+ outline-width: ${({ isActive }) => (isActive ? '1px' : '0')};`;const StyledCaretContainer = styled.div`@@ -63,7 +62,7 @@ const StyledInputChar = styled.div`const StyledCaret = styled.div`width: 1px;height: 20px;- background-color: ${({ theme }) => theme.font.color.primary};+ background-color: ${themeCssVariables.font.color.primary};`;type TwoFactorAuthenticationVerificationCodeSlotProps = SlotProps;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 6ab47168480..3f194c3f616 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,6 +1,7 @@-import styled from '@emotion/styled';+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 { TwoFactorAuthenticationVerificationCodeDash } from '@/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeDash';import { TwoFactorAuthenticationVerificationCodeSlot } from '@/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot';@@ -12,8 +13,8 @@ type OTPFormValues = {const StyledOTPContainer = styled.div`display: flex;- gap: ${({ theme }) => theme.spacing(1)};- margin-bottom: ${({ theme }) => theme.spacing(8)};+ gap: ${themeCssVariables.spacing[1]};+ margin-bottom: ${themeCssVariables.spacing[8]};&:has(:disabled) {opacity: 0.3;diff --git a/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx b/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsxindex d5c92bfae04..40f911c4f6a 100644--- a/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx+++ b/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useCallback, useEffect, useState } from 'react';import { useDebouncedCallback } from 'use-debounce';@@ -9,6 +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 { useUpdateWorkspaceMutation } from '~/generated-metadata/graphql';import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { logError } from '~/utils/logError';@@ -17,7 +18,7 @@ const StyledComboInputContainer = styled.div`display: flex;flex-direction: row;> * + * {- margin-left: ${({ theme }) => theme.spacing(4)};+ margin-left: ${themeCssVariables.spacing[4]};}`;diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsxindex 68e4e00f483..34c8f9be99d 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/SpreadsheetImportTable.tsx@@ -38,12 +38,10 @@ const StyledDataGrid = styled(DataGrid)`font-size: ${themeCssVariables.font.size.sm};font-weight: ${themeCssVariables.font.weight.semiBold};letter-spacing: wider;- ${({ headerRowHeight }) =>+ border-bottom: ${({ headerRowHeight }) =>headerRowHeight === 0- ? `- border: none;- `- : ''};+ ? 'none'+ : `1px solid ${themeCssVariables.border.color.medium}`};}.rdg-cell {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 bbc45124896..22a6a4cc637 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@@ -45,29 +45,19 @@ const StyledGridCell = styled.div<PositionProps>`flex: 1;overflow-x: auto;padding-bottom: ${themeCssVariables.spacing[4]};- padding-top: ${themeCssVariables.spacing[4]};- ${({ position }) => {- if (position === 'left') {- return `- padding-left: ${themeCssVariables.spacing[4]};- padding-right: ${themeCssVariables.spacing[2]};- padding-top: ${themeCssVariables.spacing[4]};- `;- }- if (position === 'full-line') {- return `- padding-left: ${themeCssVariables.spacing[2]};- padding-right: ${themeCssVariables.spacing[4]};- padding-top: ${themeCssVariables.spacing[0]};- width: 100%;- `;- }- return `- padding-left: ${themeCssVariables.spacing[2]};- padding-right: ${themeCssVariables.spacing[4]};- padding-top: ${themeCssVariables.spacing[4]};- `;- }};+ padding-left: ${({ position }) =>+ position === 'left'+ ? themeCssVariables.spacing[4]+ : themeCssVariables.spacing[2]};+ padding-right: ${({ position }) =>+ position === 'left'+ ? themeCssVariables.spacing[2]+ : themeCssVariables.spacing[4]};+ padding-top: ${({ position }) =>+ position === 'full-line'+ ? themeCssVariables.spacing[0]+ : themeCssVariables.spacing[4]};+ width: ${({ position }) => (position === 'full-line' ? '100%' : 'auto')};`;const StyledGridHeader = styled.div<PositionProps>`diff --git a/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/components/SnackBar.tsx b/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/components/SnackBar.tsxindex aff15425617..419c379142e 100644--- a/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/components/SnackBar.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/components/SnackBar.tsx@@ -19,8 +19,8 @@ import {} from 'twenty-ui/display';import { ProgressBar, useProgressAnimation } from 'twenty-ui/feedback';import { LightButton, LightIconButton } from 'twenty-ui/input';-import { MOBILE_VIEWPORT, ThemeContext } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';export enum SnackBarVariant {Default = 'default',diff --git a/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/components/SnackBarProvider.tsx b/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/components/SnackBarProvider.tsxindex 2cd703ded11..abd9644d016 100644--- a/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/components/SnackBarProvider.tsx+++ b/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/components/SnackBarProvider.tsx@@ -7,9 +7,8 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { snackBarInternalComponentState } from '@/ui/feedback/snack-bar-manager/states/snackBarInternalComponentState';import { RootStackingContextZIndices } from '@/ui/layout/constants/RootStackingContextZIndices';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';import { SnackBar } from './SnackBar';-import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSnackBarContainer = styled.div`bottom: ${themeCssVariables.spacing[3]};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 f34b1559aae..86410bef2fe 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 } from 'twenty-shared/utils';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';import { v4 } from 'uuid';import { t } from '@lingui/core/macro';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 472b8c85048..f905f9984fe 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@@ -7,14 +7,28 @@ import { CurrencyPickerDropdownButton } from '@/ui/input/components/internal/curimport { type Currency } from '@/ui/input/components/internal/types/Currency';import { IMaskInput } from 'react-imask';import { type IconComponent } from 'twenty-ui/display';-import { TEXT_INPUT_STYLE, ThemeContext } from 'twenty-ui/theme';+import { ThemeContext } from 'twenty-ui/theme';import { themeCssVariables } from 'twenty-ui/theme-constants';export const StyledIMaskInput = styled(IMaskInput)`margin: 0;- ${TEXT_INPUT_STYLE}- width: 100%;+ background-color: transparent;+ border: none;+ color: ${themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-size: inherit;+ font-weight: inherit;+ outline: none;padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[1.5]};++ &::placeholder,+ &::-webkit-input-placeholder {+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};+ }++ width: 100%;`;const StyledContainer = styled.div`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 1a7b2a6d9a1..3e5b3aa54cb 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@@ -5,7 +5,6 @@ import TextareaAutosize from 'react-textarea-autosize';import { LightCopyIconButton } from '@/object-record/record-field/ui/components/LightCopyIconButton';import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';import { isDefined } from 'twenty-shared/utils';-import { TEXT_INPUT_STYLE } from 'twenty-ui/theme';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';import { themeCssVariables } from 'twenty-ui/theme-constants';@@ -27,7 +26,22 @@ export type TextAreaInputProps = {};const StyledTextArea = styled(TextareaAutosize)`- ${TEXT_INPUT_STYLE}+ background-color: transparent;+ border: none;+ color: ${themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-size: inherit;+ font-weight: inherit;+ outline: none;+ padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[2]};++ &::placeholder,+ &::-webkit-input-placeholder {+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};+ }+align-items: center;display: flex;justify-content: center;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 cebe1af1dd1..a6e7c06075e 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,12 +3,26 @@ 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 { TEXT_INPUT_STYLE } from 'twenty-ui/theme';import { themeCssVariables } from 'twenty-ui/theme-constants';export const StyledTextInput = styled.input`margin: 0;- ${TEXT_INPUT_STYLE}+ background-color: transparent;+ border: none;+ color: ${themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-size: inherit;+ font-weight: inherit;+ outline: none;+ padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[2]};++ &::placeholder,+ &::-webkit-input-placeholder {+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};+ }+width: 100%;&:disabled {@@ -16,7 +30,7 @@ export const StyledTextInput = styled.input`}`;-type TextInputProps = {+export type TextInputProps = {instanceId: string;placeholder?: string;autoFocus?: boolean;@@ -30,6 +44,7 @@ type TextInputProps = {copyButton?: boolean;shouldTrim?: boolean;disabled?: boolean;+ className?: string;};const getValue = (value: string, shouldTrim: boolean) => {@@ -54,6 +69,7 @@ export const TextInput = ({copyButton = true,shouldTrim = true,disabled,+ className,}: TextInputProps) => {const [internalText, setInternalText] = useState(value);@@ -91,6 +107,7 @@ export const TextInput = ({autoFocus={autoFocus}value={internalText}disabled={disabled}+ className={className}/>{copyButton && (<div ref={copyRef}>diff --git a/packages/twenty-front/src/modules/ui/input/components/ImageInput.tsx b/packages/twenty-front/src/modules/ui/input/components/ImageInput.tsxindex bbfe072272c..d0fe1f8e843 100644--- a/packages/twenty-front/src/modules/ui/input/components/ImageInput.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/ImageInput.tsx@@ -44,17 +44,12 @@ const StyledPicture = styled.button<{ withPicture: boolean }>`color: ${themeCssVariables.font.color.tertiary};}- ${({ withPicture, disabled }) => {- if ((withPicture || disabled) === true) {- return '';- }-- return `- &:hover {- background: ${themeCssVariables.background.transparent.medium};- }- `;- }};+ &:hover {+ background: ${({ withPicture, disabled }) =>+ withPicture || disabled+ ? 'transparent'+ : themeCssVariables.background.transparent.medium};+ }`;const StyledContent = styled.div`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 0303f62e4db..fcbd9e39ad1 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@@ -8,7 +8,6 @@ import {import 'react-phone-number-input/style.css';import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';-import { TEXT_INPUT_STYLE } from 'twenty-ui/theme';import { useCombinedRefs } from '~/hooks/useCombinedRefs';import { themeCssVariables } from 'twenty-ui/theme-constants';@@ -16,7 +15,21 @@ const StyledInput = styled.input<{withRightComponent?: boolean;hasError?: boolean;}>`- ${TEXT_INPUT_STYLE}+ background-color: transparent;+ border: none;+ color: ${themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-size: inherit;+ font-weight: inherit;+ outline: none;+ padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[2]};++ &::placeholder,+ &::-webkit-input-placeholder {+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};+ }box-sizing: border-box;font-weight: ${themeCssVariables.font.weight.medium};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 ba51cb32ede..61463f5909d 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,6 @@ 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 { TEXT_INPUT_STYLE } from 'twenty-ui/theme';import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledDropdownMenuSearchInputContainer = styled.div`@@ -18,7 +17,21 @@ const StyledDropdownMenuSearchInputContainer = styled.div``;const StyledInput = styled.input`- ${TEXT_INPUT_STYLE}+ background-color: transparent;+ border: none;+ color: ${themeCssVariables.font.color.primary};+ font-family: ${themeCssVariables.font.family};+ font-size: inherit;+ font-weight: inherit;+ outline: none;+ padding: ${themeCssVariables.spacing[0]} ${themeCssVariables.spacing[2]};++ &::placeholder,+ &::-webkit-input-placeholder {+ color: ${themeCssVariables.font.color.light};+ font-family: ${themeCssVariables.font.family};+ font-weight: ${themeCssVariables.font.weight.medium};+ }font-size: ${themeCssVariables.font.size.sm};background-color: transparent;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.tsxnew file mode 100644index 00000000000..2253ace8925--- /dev/null+++ b/packages/twenty-front/src/modules/ui/layout/fullscreen/components/FullScreenModal.tsx@@ -0,0 +1,71 @@+import { RootStackingContextZIndices } from '@/ui/layout/constants/RootStackingContextZIndices';+import { PageHeader } from '@/ui/layout/page/components/PageHeader';+import {+ Breadcrumb,+ type BreadcrumbProps,+} from '@/ui/navigation/bread-crumb/components/Breadcrumb';+import { styled } from '@linaria/react';+import { forwardRef } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';++const StyledFullScreenOverlay = styled.div`+ background: ${themeCssVariables.background.noisy};+ bottom: 0;+ display: flex;+ flex-direction: column;+ height: 100vh;+ left: 0;+ position: fixed;+ right: 0;+ top: 0;+ width: 100%;+ z-index: ${RootStackingContextZIndices.RootModal};+`;++const StyledFullScreenHeader = styled(PageHeader)`+ padding-left: ${themeCssVariables.spacing[3]};+`;++const StyledFullScreenContent = styled.div`+ display: flex;+ flex: 1;+ flex-direction: column;+ gap: ${themeCssVariables.spacing[3]};+ min-height: 0;+ padding: 0 ${themeCssVariables.spacing[3]} ${themeCssVariables.spacing[3]}+ ${themeCssVariables.spacing[3]};++ > * {+ display: flex;+ flex: 1;+ flex-direction: column;+ min-height: 0;+ row-gap: ${themeCssVariables.spacing[5]};+ }+`;++type FullScreenModalProps = {+ children: React.ReactNode;+ links: BreadcrumbProps['links'];+ onClose: () => void;+ hasClosePageButton?: boolean;+};++export const FullScreenModal = forwardRef<HTMLDivElement, FullScreenModalProps>(+ ({ children, links, onClose, hasClosePageButton = true }, ref) => {+ return (+ <StyledFullScreenOverlay+ ref={ref}+ data-globally-prevent-click-outside="true"+ tabIndex={-1}+ >+ <StyledFullScreenHeader+ title={<Breadcrumb links={links} />}+ hasClosePageButton={hasClosePageButton}+ onClosePage={onClose}+ />+ <StyledFullScreenContent>{children}</StyledFullScreenContent>+ </StyledFullScreenOverlay>+ );+ },+);diff --git a/packages/twenty-front/src/modules/ui/layout/fullscreen/hooks/useFullScreenModal.tsx b/packages/twenty-front/src/modules/ui/layout/fullscreen/hooks/useFullScreenModal.tsxindex df6338a0f4c..5e1b83f154b 100644--- a/packages/twenty-front/src/modules/ui/layout/fullscreen/hooks/useFullScreenModal.tsx+++ b/packages/twenty-front/src/modules/ui/layout/fullscreen/hooks/useFullScreenModal.tsx@@ -1,51 +1,7 @@-import { RootStackingContextZIndices } from '@/ui/layout/constants/RootStackingContextZIndices';-import { PageHeader } from '@/ui/layout/page/components/PageHeader';-import {- Breadcrumb,- type BreadcrumbProps,-} from '@/ui/navigation/bread-crumb/components/Breadcrumb';-import { styled } from '@linaria/react';+import { FullScreenModal } from '@/ui/layout/fullscreen/components/FullScreenModal';+import { type BreadcrumbProps } from '@/ui/navigation/bread-crumb/components/Breadcrumb';import { useRef } from 'react';import { createPortal } from 'react-dom';-import { themeCssVariables } from 'twenty-ui/theme-constants';--const StyledFullScreenOverlay = styled.div`- position: fixed;- top: 0;- left: 0;- right: 0;- bottom: 0;- background: ${themeCssVariables.background.noisy};- display: flex;- flex-direction: column;- width: 100%;- height: 100vh;- z-index: ${RootStackingContextZIndices.RootModal};-`;--const StyledFullScreenHeader = styled(PageHeader)`- padding-left: ${themeCssVariables.spacing[3]};-`;--const StyledFullScreenContent = styled.div`- display: flex;- flex-direction: column;- gap: ${themeCssVariables.spacing[3]};- flex: 1;- min-height: 0;- padding: 0 ${themeCssVariables.spacing[3]} ${themeCssVariables.spacing[3]}- ${themeCssVariables.spacing[3]};-- // Make the immediate child a flex column that grows, so nested components- // with height="100%" (e.g., editors) can size correctly.- > * {- display: flex;- flex-direction: column;- flex: 1;- min-height: 0;- row-gap: ${themeCssVariables.spacing[5]};- }-`;type UseFullScreenModalProps = {links: BreadcrumbProps['links'];@@ -67,18 +23,14 @@ export const useFullScreenModal = ({if (!isOpen) return null;return createPortal(- <StyledFullScreenOverlay+ <FullScreenModalref={overlayRef}- data-globally-prevent-click-outside="true"- tabIndex={-1}+ links={links}+ onClose={onClose}+ hasClosePageButton={hasClosePageButton}>- <StyledFullScreenHeader- title={<Breadcrumb links={links} />}- hasClosePageButton={hasClosePageButton}- onClosePage={onClose}- />- <StyledFullScreenContent>{children}</StyledFullScreenContent>- </StyledFullScreenOverlay>,+ {children}+ </FullScreenModal>,document.body,);};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 7524c557835..b6c02cdd511 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@@ -15,8 +15,8 @@ import {OverflowingTextWithTooltip,} from 'twenty-ui/display';import { LightIconButton } from 'twenty-ui/input';-import { MOBILE_VIEWPORT, ThemeContext } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledTopBarContainer = styled.div<{ isMobile: boolean }>`align-items: center;diff --git a/packages/twenty-front/src/modules/ui/layout/selectable-list/components/SelectableListItem.tsx b/packages/twenty-front/src/modules/ui/layout/selectable-list/components/SelectableListItem.tsxindex 8d0b697356a..9738d724209 100644--- a/packages/twenty-front/src/modules/ui/layout/selectable-list/components/SelectableListItem.tsx+++ b/packages/twenty-front/src/modules/ui/layout/selectable-list/components/SelectableListItem.tsx@@ -3,7 +3,7 @@ import { type ReactNode, useEffect, useRef } from 'react';import { SelectableListItemHotkeyEffect } from '@/ui/layout/selectable-list/components/SelectableListItemHotkeyEffect';import { isSelectedItemIdComponentFamilyState } from '@/ui/layout/selectable-list/states/isSelectedItemIdComponentFamilyState';import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';const StyledListItemContainer = styled.div`@@ -18,12 +18,14 @@ export type SelectableListItemProps = {itemId: string;children: ReactNode;onEnter?: () => void;+ className?: string;};export const SelectableListItem = ({itemId,children,onEnter,+ className,}: SelectableListItemProps) => {const isSelectedItemId = useAtomComponentFamilyStateValue(isSelectedItemIdComponentFamilyState,@@ -56,7 +58,7 @@ export const SelectableListItem = ({{isSelectedItemId && isDefined(onEnter) && (<SelectableListItemHotkeyEffect itemId={itemId} onEnter={onEnter} />)}- <StyledListItemContainer ref={listItemRef}>+ <StyledListItemContainer ref={listItemRef} className={className}>{children}</StyledListItemContainer></>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 7aff409cc88..01226399aae 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@@ -3,12 +3,13 @@ import { type CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNimport { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';import { useTargetRecord } from '@/ui/layout/contexts/useTargetRecord';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { lazy, Suspense } from 'react';+import { styled } from '@linaria/react';+import { lazy, Suspense, useContext } 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 } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const ActivityRichTextEditor = lazy(() =>import('@/activities/components/ActivityRichTextEditor').then((module) => ({@@ -17,7 +18,7 @@ const ActivityRichTextEditor = lazy(() =>);const StyledShowPageActivityContainer = styled.div`- margin-top: ${({ theme }) => theme.spacing(6)};+ margin-top: ${themeCssVariables.spacing[6]};width: 100%;padding-inline: 44px;box-sizing: border-box;@@ -27,11 +28,11 @@ const StyledSkeletonContainer = styled.div`display: flex;flex-direction: column;justify-content: center;- padding: ${({ theme }) => theme.spacing(0, 4)};+ padding: 0 ${themeCssVariables.spacing[4]};`;const LoadingSkeleton = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<StyledSkeletonContainer>diff --git a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSummaryCard.tsx b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSummaryCard.tsxindex 6d595518181..aeaf765e7ba 100644--- a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSummaryCard.tsx+++ b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSummaryCard.tsx@@ -1,8 +1,7 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Trans } from '@lingui/react/macro';-import { type ChangeEvent, type ReactNode, useRef } from 'react';+import { type ChangeEvent, type ReactNode, useContext, useRef } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';import { isDefined } from 'twenty-shared/utils';import {@@ -12,6 +11,8 @@ import {type IconComponent,} from 'twenty-ui/display';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { v4 as uuidV4 } from 'uuid';import { dateLocaleState } from '~/localization/states/dateLocaleState';import {@@ -39,11 +40,11 @@ export const StyledShowPageSummaryCard = styled.div<{align-items: center;display: flex;flex-direction: ${({ isMobile }) => (isMobile ? 'row' : 'column')};- gap: ${({ theme, isMobile }) =>- isMobile ? theme.spacing(2) : theme.spacing(3)};+ gap: ${({ isMobile }) =>+ isMobile ? themeCssVariables.spacing[2] : themeCssVariables.spacing[3]};justify-content: ${({ isMobile }) => (isMobile ? 'flex-start' : 'center')};- padding: ${({ theme }) => theme.spacing(4)};- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ padding: ${themeCssVariables.spacing[4]};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};height: ${({ isMobile }) => (isMobile ? '77px' : '127px')};box-sizing: border-box;`;@@ -52,21 +53,21 @@ const StyledInfoContainer = styled.div<{ isMobile: boolean }>`align-items: ${({ isMobile }) => (isMobile ? 'flex-start' : 'center')};display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};width: 100%;`;const StyledDate = styled.div<{ isMobile: boolean }>`- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};cursor: pointer;- padding-left: ${({ theme }) => theme.spacing(1)};+ padding-left: ${themeCssVariables.spacing[1]};`;const StyledTitle = styled.div<{ isMobile: boolean }>`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};display: flex;- font-size: ${({ theme }) => theme.font.size.xl};- font-weight: ${({ theme }) => theme.font.weight.semiBold};+ font-size: ${themeCssVariables.font.size.xl};+ font-weight: ${themeCssVariables.font.weight.semiBold};justify-content: ${({ isMobile }) => (isMobile ? 'flex-start' : 'center')};width: 90%;`;@@ -75,9 +76,9 @@ const StyledAvatarWrapper = styled.div<{isAvatarEditable: boolean;hasIcon: boolean;}>`- background-color: ${({ theme, hasIcon }) =>- hasIcon ? theme.background.transparent.light : 'unset'};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${({ hasIcon }) =>+ hasIcon ? themeCssVariables.background.transparent.light : 'unset'};+ border-radius: ${themeCssVariables.border.radius.sm};cursor: ${({ isAvatarEditable }) =>isAvatarEditable ? 'pointer' : 'default'};`;@@ -95,7 +96,7 @@ const StyledSubSkeleton = styled.div``;const StyledShowPageSummaryCardSkeletonLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<SkeletonThemebaseColor={theme.background.tertiary}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 6a303eb5c54..864e952c4a0 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,10 +1,11 @@import { type SingleTabProps } from '@/ui/layout/tab-list/types/SingleTabProps';-import { useTheme } from '@emotion/react';+import { useContext } from 'react';import { isDefined } from 'twenty-shared/utils';import { Avatar } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';export const TabAvatar = ({ tab }: { tab: SingleTabProps }) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);if (isDefined(tab.logo)) {return <Avatar avatarUrl={tab.logo} size="md" placeholder={tab.title} />;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 536354b52fe..5f25f355793 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@@ -7,23 +7,24 @@ import { NodeDimension } from '@/ui/utilities/dimensions/components/NodeDimensioimport { TabListHiddenMeasurements } from '@/ui/layout/tab-list/components/TabListHiddenMeasurements';import { useTabListMeasurements } from '@/ui/layout/tab-list/hooks/useTabListMeasurements';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useCallback, useEffect, useMemo } from 'react';import { useNavigate } from 'react-router-dom';import { TabButton } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { TabListDropdown } from './TabListDropdown';import { TabListFromUrlOptionalEffect } from './TabListFromUrlOptionalEffect';const StyledContainer = styled.div`box-sizing: border-box;display: flex;- height: ${({ theme }) => theme.spacing(10)};+ height: ${themeCssVariables.spacing[10]};position: relative;user-select: none;width: 100%;&::after {- background-color: ${({ theme }) => theme.border.color.light};+ background-color: ${themeCssVariables.border.color.light};bottom: 0;content: '';height: 1px;diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabListHiddenMeasurements.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabListHiddenMeasurements.tsxindex 4023b5d136a..f4ff6a3654d 100644--- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabListHiddenMeasurements.tsx+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabListHiddenMeasurements.tsx@@ -3,7 +3,7 @@ import type { ReactNode } from 'react';import { TAB_LIST_GAP } from '@/ui/layout/tab-list/constants/TabListGap';import { type SingleTabProps } from '@/ui/layout/tab-list/types/SingleTabProps';import { NodeDimension } from '@/ui/utilities/dimensions/components/NodeDimension';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { IconPlus } from 'twenty-ui/display';import { TabButton } from 'twenty-ui/input';diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabMoreButton.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabMoreButton.tsxindex fbeef1587a6..723eefe841a 100644--- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabMoreButton.tsx+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabMoreButton.tsx@@ -1,10 +1,11 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { IconChevronDown } from 'twenty-ui/display';import { TabButton } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTabMoreButton = styled(TabButton)`- height: ${({ theme }) => theme.spacing(10)};+ height: ${themeCssVariables.spacing[10]};`;export const TabMoreButton = ({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 706e3ab3ae6..5612ec94963 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@@ -1,5 +1,5 @@import { TabList } from '@/ui/layout/tab-list/components/TabList';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import {IconCalendar,@@ -35,12 +35,14 @@ const tabs = [{ id: 'reports', title: 'Reports', Icon: IconCheckbox },];+import { themeCssVariables } from 'twenty-ui/theme-constants';+const StyledInteractiveContainer = styled.div`- border: 1px solid ${({ theme }) => theme.border.color.strong};+ border: 1px solid ${themeCssVariables.border.color.strong};max-width: 100%;min-width: 300px;overflow: auto;- padding: ${({ theme }) => theme.spacing(5)};+ padding: ${themeCssVariables.spacing[5]};resize: horizontal;width: 600px;`;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 a03874fccda..22da2959e65 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,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledTable = styled.div``;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 7c9f99e54b3..00165ca04d3 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,10 +1,11 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTableBody = styled.div`display: flex;flex-direction: column;gap: 2px;- padding: ${({ theme }) => theme.spacing(2)} 0;+ padding: ${themeCssVariables.spacing[2]} 0;`;export { StyledTableBody as TableBody };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 26fd9fa15c2..17391ce7584 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,4 +1,5 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';type TableCellProps = {align?: 'left' | 'center' | 'right';@@ -7,16 +8,16 @@ type TableCellProps = {const StyledTableCell = styled.div<TableCellProps>`align-items: center;- color: ${({ color, theme }) => color || theme.font.color.secondary};+ color: ${({ color }) => color || themeCssVariables.font.color.secondary};display: flex;- height: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};justify-content: ${({ align }) =>align === 'right'? 'flex-end': align === 'center'? 'center': 'flex-start'};- padding: 0 ${({ theme }) => theme.spacing(2)};+ padding: 0 ${themeCssVariables.spacing[2]};text-align: ${({ align }) => align ?? 'left'};`;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 09e07b924b1..7d9f130179f 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,23 +1,24 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTableHeader = styled.div<{align?: 'left' | 'center' | 'right';onClick?: () => void;}>`- gap: ${({ theme }) => theme.spacing(1)};+ gap: ${themeCssVariables.spacing[1]};align-items: center;- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};- color: ${({ theme }) => theme.font.color.tertiary};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};+ color: ${themeCssVariables.font.color.tertiary};display: flex;- font-weight: ${({ theme }) => theme.font.weight.medium};- height: ${({ theme }) => theme.spacing(8)};+ font-weight: ${themeCssVariables.font.weight.medium};+ height: ${themeCssVariables.spacing[8]};justify-content: ${({ align }) =>align === 'right'? 'flex-end': align === 'center'? 'center': 'flex-start'};- padding: 0 ${({ theme }) => theme.spacing(2)};+ padding: 0 ${themeCssVariables.spacing[2]};text-align: ${({ align }) => align ?? 'left'};cursor: ${({ onClick }) => (onClick ? 'pointer' : 'default')};`;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 9d4b690d6aa..3a06f6da636 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,7 +1,8 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTableHeaderText = styled.div`- padding-bottom: ${({ theme }) => theme.spacing(0.5)};+ padding-bottom: ${themeCssVariables.spacing['0.5']};`;export { StyledTableHeaderText as TableHeaderText };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 7270bd6e3a3..813e7085db7 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,12 +1,8 @@-import isPropValid from '@emotion/is-prop-valid';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Link } from 'react-router-dom';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';-const StyledTableRow = styled('div', {- shouldForwardProp: (prop) =>- !['isSelected'].includes(prop) && isPropValid(prop),-})<{+const StyledTableRow = styled.div<{isSelected?: boolean;onClick?: () => void;to?: string;@@ -14,15 +10,13 @@ const StyledTableRow = styled('div', {gridTemplateColumns?: string;mobileGridAutoColumns?: string;}>`- background-color: ${({ isSelected, theme }) =>- isSelected ? theme.accent.quaternary : 'transparent'};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background-color: ${({ isSelected }) =>+ isSelected ? themeCssVariables.accent.quaternary : 'transparent'};+ border-radius: ${themeCssVariables.border.radius.sm};display: grid;grid-auto-columns: ${({ gridAutoColumns }) => gridAutoColumns ?? '1fr'};- ${({ gridTemplateColumns }) =>- gridTemplateColumns- ? `grid-template-columns: ${gridTemplateColumns};`- : ''};+ grid-template-columns: ${({ gridTemplateColumns }) =>+ gridTemplateColumns ?? 'none'};@media (max-width: ${MOBILE_VIEWPORT}px) {grid-auto-columns: ${({ mobileGridAutoColumns, gridAutoColumns }) =>@@ -31,13 +25,15 @@ const StyledTableRow = styled('div', {grid-auto-flow: column;transition: background-color- ${({ theme }) => theme.animation.duration.normal}s;+ calc(${themeCssVariables.animation.duration.normal} * 1s);width: 100%;text-decoration: none;&:hover {- background-color: ${({ onClick, to, theme }) =>- onClick || to ? theme.background.transparent.light : 'transparent'};+ background-color: ${({ onClick, to }) =>+ onClick || to+ ? themeCssVariables.background.transparent.light+ : 'transparent'};cursor: ${({ onClick, to }) => (onClick || to ? 'pointer' : 'default')};}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 96ea13eae06..ab78c9e4963 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,9 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';-import { type ReactNode, useState } from 'react';+import { styled } from '@linaria/react';+import { type ReactNode, useContext, useState } from 'react';import { TableBody } from './TableBody';import { IconChevronDown, IconChevronUp, Label } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type TableSectionProps = {children: ReactNode;@@ -12,27 +13,27 @@ type TableSectionProps = {const StyledSectionHeader = styled.div<{ isExpanded: boolean }>`align-items: center;- background-color: ${({ theme }) => theme.background.transparent.lighter};- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};cursor: pointer;display: flex;- height: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};justify-content: space-between;- padding: 0 ${({ theme }) => theme.spacing(2)};+ padding: 0 ${themeCssVariables.spacing[2]};text-align: left;`;const StyledSection = styled.div<{ isExpanded: boolean }>`- max-height: ${({ isExpanded }) => (isExpanded ? 'fit-content' : 0)};+ max-height: ${({ isExpanded }) => (isExpanded ? 'fit-content' : '0')};opacity: ${({ isExpanded }) => (isExpanded ? 1 : 0)};overflow: hidden;transition:- max-height ${({ theme }) => theme.animation.duration.normal}s,- opacity ${({ theme }) => theme.animation.duration.normal}s;+ max-height calc(${themeCssVariables.animation.duration.normal} * 1s),+ opacity calc(${themeCssVariables.animation.duration.normal} * 1s);`;const StyledSectionContent = styled(TableBody)`- border-bottom: 1px solid ${({ theme }) => theme.border.color.light};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};`;export const TableSection = ({@@ -41,7 +42,7 @@ export const TableSection = ({title,}: TableSectionProps) => {const [isExpanded, setIsExpanded] = useState(isInitiallyExpanded);- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const handleToggleSection = () =>setIsExpanded((previousIsExpanded) => !previousIsExpanded);diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/TableSubRow.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/TableSubRow.tsxindex 517f3546cba..481d4a80813 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/TableSubRow.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/TableSubRow.tsx@@ -1,9 +1,10 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { TableRow } from '@/ui/layout/table/components/TableRow';const StyledTableSubRow = styled(TableRow)`- padding-left: ${({ theme }) => theme.spacing(4)};+ padding-left: ${themeCssVariables.spacing[4]};`;export const TableSubRow = StyledTableSubRow;diff --git a/packages/twenty-front/src/modules/ui/layout/table/components/__stories__/Table.stories.tsx b/packages/twenty-front/src/modules/ui/layout/table/components/__stories__/Table.stories.tsxindex f66b4bb4fda..a4ab60eb1f8 100644--- a/packages/twenty-front/src/modules/ui/layout/table/components/__stories__/Table.stories.tsx+++ b/packages/twenty-front/src/modules/ui/layout/table/components/__stories__/Table.stories.tsx@@ -13,7 +13,6 @@ const meta: Meta<typeof Table> = {decorators: [ComponentDecorator],argTypes: {as: { table: { disable: true } },- theme: { table: { disable: true } },},};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 7ae9ddac47c..59db9a4642b 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,5 +1,6 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode } from 'react';+import { themeCssVariables } from 'twenty-ui/theme-constants';type TopBarProps = {className?: string;@@ -10,9 +11,9 @@ type TopBarProps = {};const StyledContainer = styled.div`- border-bottom: ${({ theme }) => `1px solid ${theme.border.color.light}`};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};display: flex;- margin-left: ${({ theme }) => theme.spacing(3)};+ margin-left: ${themeCssVariables.spacing[3]};flex-direction: column;`;@@ -21,13 +22,13 @@ const StyledTopBar = styled.div`align-items: center;box-sizing: border-box;- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};display: flex;flex-direction: row;- font-weight: ${({ theme }) => theme.font.weight.medium};+ font-weight: ${themeCssVariables.font.weight.medium};height: 39px;justify-content: space-between;- padding-right: ${({ theme }) => theme.spacing(2)};+ padding-right: ${themeCssVariables.spacing[2]};z-index: 7;`;@@ -38,8 +39,8 @@ const StyledLeftSection = styled.div`const StyledRightSection = styled.div`display: flex;- font-weight: ${({ theme }) => theme.font.weight.regular};- gap: ${({ theme }) => theme.betweenSiblingsGap};+ font-weight: ${themeCssVariables.font.weight.regular};+ gap: ${themeCssVariables.betweenSiblingsGap};`;export const TopBar = ({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 0f7923c81c7..077ffa4e5e2 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@@ -1,8 +1,9 @@import { MobileBreadcrumb } from '@/ui/navigation/bread-crumb/components/MobileBreadcrumb';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Fragment, type ReactNode } from 'react';import { Link } from 'react-router-dom';+import { themeCssVariables } from 'twenty-ui/theme-constants';export type BreadcrumbProps = {className?: string;@@ -11,14 +12,14 @@ export type BreadcrumbProps = {const StyledWrapper = styled.nav`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: grid;- font-size: ${({ theme }) => theme.font.size.md};+ font-size: ${themeCssVariables.font.size.md};grid-auto-flow: column;- grid-column-gap: ${({ theme }) => theme.spacing(1)};+ grid-column-gap: ${themeCssVariables.spacing[1]};max-width: 100%;min-width: 0;- height: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};`;const StyledLink = styled(Link)`@@ -30,14 +31,14 @@ const StyledLink = styled(Link)``;const StyledText = styled.span`- color: ${({ theme }) => theme.font.color.primary};+ color: ${themeCssVariables.font.color.primary};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;`;const StyledDivider = styled.span`- width: ${({ theme }) => theme.spacing(2)};+ width: ${themeCssVariables.spacing[2]};`;export const Breadcrumb = ({ className, links }: BreadcrumbProps) => {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 adcf74afbb5..6f050f93d0d 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@@ -1,11 +1,12 @@import { t } from '@lingui/core/macro';import { useOpenSettingsMenu } from '@/navigation/hooks/useOpenSettings';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';-import { type ReactNode } from 'react';+import { type ReactNode, useContext } from 'react';import { Link } from 'react-router-dom';import { IconChevronLeft } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';export type MobileBreadcrumbProps = {className?: string;@@ -14,14 +15,14 @@ export type MobileBreadcrumbProps = {const StyledWrapper = styled.nav`align-items: center;- color: ${({ theme }) => theme.font.color.tertiary};+ color: ${themeCssVariables.font.color.tertiary};display: grid;- font-size: ${({ theme }) => theme.font.size.md};+ font-size: ${themeCssVariables.font.size.md};grid-auto-flow: column;- grid-column-gap: ${({ theme }) => theme.spacing(1)};+ grid-column-gap: ${themeCssVariables.spacing[1]};max-width: 100%;min-width: 0;- height: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};`;const StyledLink = styled(Link)`@@ -43,7 +44,7 @@ export const MobileBreadcrumb = ({className,links,}: MobileBreadcrumbProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const { openSettingsMenu } = useOpenSettingsMenu();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 2fa97a74531..582c1f9b526 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,12 +1,13 @@import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';-import { useTheme } from '@emotion/react';import { type Placement } from '@floating-ui/react';import {type FunctionComponent,type MouseEvent,type ReactElement,type ReactNode,+ useContext,} from 'react';+import { ThemeContext } from 'twenty-ui/theme';import {IconChevronRight,type IconComponent,@@ -62,7 +63,7 @@ export const MenuItemWithOptionDropdown = ({hasSubMenu = false,dropdownPlacement = 'bottom-end',}: MenuItemWithOptionDropdownProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const handleMenuItemClick = (event: MouseEvent<HTMLDivElement>) => {if (!onClick) return;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 e5ecd8d4b4a..7f1d91d547f 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@@ -7,13 +7,14 @@ import {} from '@/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspacesDropdownStyles';import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useTheme } from '@emotion/react';+import { useContext } from 'react';import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';import { Avatar } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme';export const MultiWorkspaceDropdownClickableComponent = () => {const currentWorkspace = useAtomStateValue(currentWorkspaceState);- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isNavigationDrawerExpanded = useAtomStateValue(isNavigationDrawerExpandedState,diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspaceDropdownDefaultComponents.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspaceDropdownDefaultComponents.tsxindex 1db4f45d4c6..2e223d80e3f 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspaceDropdownDefaultComponents.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/MultiWorkspaceDropdown/internal/MultiWorkspaceDropdownDefaultComponents.tsx@@ -25,8 +25,9 @@ import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';import { type ApolloError } from '@apollo/client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useLingui } from '@lingui/react/macro';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { isNonEmptyString } from '@sniptt/guards';import { useLocation } from 'react-router-dom';import { AppPath, SettingsPath } from 'twenty-shared/types';@@ -54,8 +55,8 @@ import {import { getWorkspaceUrl } from '~/utils/getWorkspaceUrl';const StyledDescription = styled.div`- color: ${({ theme }) => theme.font.color.light};- padding-left: ${({ theme }) => theme.spacing(1)};+ color: ${themeCssVariables.font.color.light};+ padding-left: ${themeCssVariables.spacing[1]};`;export const MultiWorkspaceDropdownDefaultComponents = () => {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 c882126f5a9..4d33e550c85 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,39 +1,42 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { IconChevronDown } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';export const StyledContainer = styled.div<{isNavigationDrawerExpanded: boolean;}>`align-items: center;cursor: pointer;- color: ${({ theme }) => theme.font.color.primary};- border-radius: ${({ theme }) => theme.border.radius.sm};+ color: ${themeCssVariables.font.color.primary};+ border-radius: ${themeCssVariables.border.radius.sm};border: 1px solid transparent;display: flex;justify-content: space-between;- height: ${({ theme }) => theme.spacing(5)};- padding: calc(${({ theme }) => theme.spacing(1)} - 1px);+ height: ${themeCssVariables.spacing[5]};+ padding: calc(${themeCssVariables.spacing[1]} - 1px);width: ${({ isNavigationDrawerExpanded }) =>isNavigationDrawerExpanded ? '100%' : 'auto'};- gap: ${({ theme, isNavigationDrawerExpanded }) =>- isNavigationDrawerExpanded ? theme.spacing(1) : '0'};+ gap: ${({ isNavigationDrawerExpanded }) =>+ isNavigationDrawerExpanded ? themeCssVariables.spacing[1] : '0'};&:hover {- background-color: ${({ theme }) => theme.background.transparent.lighter};- border: 1px solid ${({ theme }) => theme.border.color.medium};+ background-color: ${themeCssVariables.background.transparent.lighter};+ border: 1px solid ${themeCssVariables.border.color.medium};}`;export const StyledLabel = styled.div`align-items: center;display: flex;- font-weight: ${({ theme }) => theme.font.weight.medium};+ font-weight: ${themeCssVariables.font.weight.medium};`;export const StyledIconChevronDown = styled(IconChevronDown)<{disabled?: boolean;}>`align-items: center;- color: ${({ disabled, theme }) =>- disabled ? theme.font.color.extraLight : theme.font.color.tertiary};+ color: ${({ disabled }) =>+ disabled+ ? themeCssVariables.font.color.extraLight+ : themeCssVariables.font.color.tertiary};display: flex;`;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 4d9ee5bc986..4fbe2dfbdbf 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode, useState } from 'react';import { useIsSettingsDrawer } from '@/navigation/hooks/useIsSettingsDrawer';@@ -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 } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';import { NavigationDrawerBackButton } from './NavigationDrawerBackButton';import { NavigationDrawerHeader } from './NavigationDrawerHeader';@@ -39,8 +39,10 @@ const StyledAnimatedContainer = styled.div<{isExpanded? `var(${NAVIGATION_DRAWER_WIDTH_VAR})`: `${NAVIGATION_DRAWER_COLLAPSED_WIDTH}px`};- transition: ${({ isResizing, theme }) =>- isResizing ? 'none' : `width ${theme.animation.duration.normal}s`};+ transition: ${({ isResizing }) =>+ isResizing+ ? 'none'+ : `width calc(${themeCssVariables.animation.duration.normal} * 1s)`};@media (max-width: ${MOBILE_VIEWPORT}px) {width: ${({ isExpanded }) => (isExpanded ? '100%' : '0')};@@ -57,18 +59,18 @@ const StyledContainer = styled.div<{flex-direction: column;width: ${({ isExpanded }) =>isExpanded ? `var(${NAVIGATION_DRAWER_WIDTH_VAR})` : '100%'};- gap: ${({ theme }) => theme.spacing(3)};+ gap: ${themeCssVariables.spacing[3]};height: 100%;- padding: ${({ theme, isSettings, isMobile }) =>+ padding: ${({ isSettings, isMobile }) =>isSettings? isMobile- ? theme.spacing(3, 0, 0, 8)- : theme.spacing(3, 0, 4, 0)- : theme.spacing(3, 0, 4, 2)};+ ? `${themeCssVariables.spacing[3]} 0 0 ${themeCssVariables.spacing[8]}`+ : `${themeCssVariables.spacing[3]} 0 ${themeCssVariables.spacing[4]} 0`+ : `${themeCssVariables.spacing[3]} 0 ${themeCssVariables.spacing[4]} ${themeCssVariables.spacing[2]}`};@media (max-width: ${MOBILE_VIEWPORT}px) {width: 100%;- padding-left: ${({ theme }) => theme.spacing(5)};- padding-right: ${({ theme }) => theme.spacing(5)};+ padding-left: ${themeCssVariables.spacing[5]};+ padding-right: ${themeCssVariables.spacing[5]};}`;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 0828630aeaa..5e480784d5a 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@@ -1,24 +1,27 @@import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage';import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import {type AnimationControls,motion,type TargetAndTransition,} from 'framer-motion';+import { ThemeContext } from 'twenty-ui/theme';-const StyledAnimatedContainer = styled(motion.span)`+const StyledAnimatedContainerBase = styled.span`display: block;`;+const StyledAnimatedContainer = motion.create(StyledAnimatedContainerBase);+export const NavigationDrawerAnimatedCollapseWrapper = ({children,}: {children: React.ReactNode;}) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isSettingsPage = useIsSettingsPage();const isNavigationDrawerExpanded = useAtomStateValue(isNavigationDrawerExpandedState,diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerBackButton.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerBackButton.tsxindex f9000051721..7a9c5531a9f 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerBackButton.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerBackButton.tsx@@ -1,5 +1,5 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';import { navigationDrawerExpandedMemorizedState } from '@/ui/navigation/states/navigationDrawerExpandedMemorizedState';@@ -10,6 +10,8 @@ import { useIsWorkspaceActivationStatusEqualsTo } from '@/workspace/hooks/useIsWimport { WorkspaceActivationStatus } from 'twenty-shared/workspace';import { IconX } from 'twenty-ui/display';import { UndecoratedLink } from 'twenty-ui/navigation';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';type NavigationDrawerBackButtonProps = {title: string;@@ -19,18 +21,18 @@ const StyledIconAndButtonContainer = styled.button`align-items: center;background: inherit;border: none;- color: ${({ theme }) => theme.font.color.secondary};+ color: ${themeCssVariables.font.color.secondary};cursor: pointer;display: flex;flex-direction: row;- font-weight: ${({ theme }) => theme.font.weight.medium};- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(1.5, 1)};+ font-weight: ${themeCssVariables.font.weight.medium};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing['1.5']} ${themeCssVariables.spacing[1]};width: 100%;- font-family: ${({ theme }) => theme.font.family};+ font-family: ${themeCssVariables.font.family};&:hover {- background: ${({ theme }) => theme.background.transparent.light};- border-radius: ${({ theme }) => theme.border.radius.sm};+ background: ${themeCssVariables.background.transparent.light};+ border-radius: ${themeCssVariables.border.radius.sm};}`;@@ -38,15 +40,15 @@ const StyledContainer = styled.div`align-items: center;display: flex;flex-direction: row;- height: ${({ theme }) => theme.spacing(8)};+ height: ${themeCssVariables.spacing[8]};justify-content: space-between;- padding-left: ${({ theme }) => theme.spacing(5)};+ padding-left: ${themeCssVariables.spacing[5]};`;export const NavigationDrawerBackButton = ({title,}: NavigationDrawerBackButtonProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const navigationMemorizedUrl = useAtomStateValue(navigationMemorizedUrlState);const setIsNavigationDrawerExpanded = useSetAtomState(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 d4d880f2088..94f2cb08d8b 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@@ -3,17 +3,18 @@ import { navigationDrawerActiveTabState } from '@/ui/navigation/states/navigatioimport { NAVIGATION_DRAWER_TABS } from '@/ui/navigation/states/navigationDrawerTabs';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {IconLayoutSidebarLeftCollapse,IconLayoutSidebarRightCollapse,} from 'twenty-ui/display';import { LightIconButton } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledCollapseButton = styled.div`align-items: center;- border-radius: ${({ theme }) => theme.border.radius.md};- color: ${({ theme }) => theme.font.color.light};+ border-radius: ${themeCssVariables.border.radius.md};+ color: ${themeCssVariables.font.color.light};cursor: pointer;display: flex;justify-content: 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 a1bbfad0450..51a46b2137b 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@@ -2,20 +2,22 @@ import { type ReactNode } from 'react';import { useIsSettingsDrawer } from '@/navigation/hooks/useIsSettingsDrawer';import { NavigationDrawerSection } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerSection';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useIsMobile } from 'twenty-ui/utilities';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledFixedContainer = styled.div<{isSettings?: boolean;isMobile?: boolean;}>`- ${({ isSettings, theme, isMobile }) =>+ padding-left: ${({ isSettings }) =>+ isSettings ? themeCssVariables.spacing[5] : '0'};+ padding-right: ${({ isSettings, isMobile }) =>isSettings- ? `- padding-left: ${theme.spacing(5)};- padding-right: ${isMobile ? theme.spacing(5) : theme.spacing(8)};-`- : ''}+ ? isMobile+ ? themeCssVariables.spacing[5]+ : themeCssVariables.spacing[8]+ : '0'};`;export const NavigationDrawerFixedContent = ({children,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 5dbfcf00f32..fb47aa1617c 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@@ -1,7 +1,8 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { IconSearch } from 'twenty-ui/display';import { LightIconButton } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';import { useOpenRecordsSearchPageInCommandMenu } from '@/command-menu/hooks/useOpenRecordsSearchPageInCommandMenu';import { PAGE_BAR_MIN_HEIGHT } from '@/ui/layout/page/constants/PageBarMinHeight';@@ -15,28 +16,28 @@ const StyledContainer = styled.div<{ isExpanded: boolean }>`align-items: center;display: flex;flex-direction: ${({ isExpanded }) => (isExpanded ? 'row' : 'column')};- gap: ${({ theme, isExpanded }) => (isExpanded ? 0 : theme.spacing(4))};+ gap: ${({ isExpanded }) => (isExpanded ? '0' : themeCssVariables.spacing[4])};user-select: none;- padding-right: ${({ theme }) => theme.spacing(2)};+ padding-right: ${themeCssVariables.spacing[2]};min-height: ${PAGE_BAR_MIN_HEIGHT}px;- transition: gap ${({ theme }) => theme.animation.duration.normal}s ease;+ transition: gap calc(${themeCssVariables.animation.duration.normal} * 1s) ease;`;const StyledRightActions = styled.div<{ isExpanded: boolean }>`align-items: center;display: flex;flex-direction: ${({ isExpanded }) => (isExpanded ? 'row' : 'column')};- gap: ${({ theme, isExpanded }) => (isExpanded ? 0 : theme.spacing(1))};- margin-left: ${({ isExpanded }) => (isExpanded ? 'auto' : 0)};- transition: gap ${({ theme }) => theme.animation.duration.normal}s ease;+ gap: ${({ isExpanded }) => (isExpanded ? '0' : themeCssVariables.spacing[1])};+ margin-left: ${({ isExpanded }) => (isExpanded ? 'auto' : '0')};+ transition: gap calc(${themeCssVariables.animation.duration.normal} * 1s) ease;`;const StyledNavigationDrawerCollapseButton = styled(NavigationDrawerCollapseButton,)`- height: ${({ theme }) => theme.spacing(6)};- padding-right: ${({ theme }) => theme.spacing(1)};- width: ${({ theme }) => theme.spacing(6)};+ height: ${themeCssVariables.spacing[6]};+ padding-right: ${themeCssVariables.spacing[1]};+ width: ${themeCssVariables.spacing[6]};`;type NavigationDrawerHeaderProps = {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 05087d88242..3d2baf6fc2f 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@@ -9,12 +9,10 @@ import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigaimport { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';-import isPropValid from '@emotion/is-prop-valid';-import { css, useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { isNonEmptyString } from '@sniptt/guards';-import { type ReactNode } from 'react';+import { type ReactNode, useContext } from 'react';import { Link } from 'react-router-dom';import { isDefined } from 'twenty-shared/utils';import { Pill } from 'twenty-ui/components';@@ -27,7 +25,8 @@ import {TooltipDelay,TooltipPosition,} from 'twenty-ui/display';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';import {type TriggerEventType,useMouseDownNavigation,@@ -81,80 +80,70 @@ type StyledItemProps = Pick<rel?: string;};-const StyledItem = styled('button', {- shouldForwardProp: (prop) =>- ![- 'active',- 'danger',- 'soon',- 'isDragging',- 'isSelectedInEditMode',- ].includes(prop) && isPropValid(prop),-})<StyledItemProps>`+const StyledItem = styled.button<StyledItemProps>`box-sizing: border-box;align-items: center;- background: ${(props) =>- props.active ? props.theme.background.transparent.light : 'inherit'};- height: ${({ theme }) => theme.spacing(7)};- border: ${({ theme, isSelectedInEditMode }) =>+ background: ${({ active }) =>+ active ? themeCssVariables.background.transparent.light : 'transparent'};+ height: ${themeCssVariables.spacing[7]};+ border: ${({ isSelectedInEditMode }) =>isSelectedInEditMode- ? `1px solid ${theme.color.blue}`+ ? `1px solid ${themeCssVariables.color.blue}`: '1px solid transparent'};- border-radius: ${({ theme }) => theme.border.radius.sm};+ border-radius: ${themeCssVariables.border.radius.sm};text-decoration: none;- color: ${(props) => {- if (props.active === true) {- return props.theme.font.color.primary;+ color: ${({ active, danger, soon }) => {+ if (active === true) {+ return themeCssVariables.font.color.primary;}- if (props.danger === true) {- return props.theme.color.red;+ if (danger === true) {+ return themeCssVariables.color.red;}- if (props.soon === true) {- return props.theme.font.color.light;+ if (soon === true) {+ return themeCssVariables.font.color.light;}- return props.theme.font.color.secondary;+ return themeCssVariables.font.color.secondary;}};- cursor: ${(props) => (props.soon ? 'default' : 'pointer')};+ cursor: ${({ soon, isDragging }) =>+ isDragging ? 'grabbing' : soon ? 'default' : 'pointer'};display: flex;- font-family: ${({ theme }) => theme.font.family};- font-size: ${({ theme }) => theme.font.size.md};+ font-family: ${themeCssVariables.font.family};+ font-size: ${themeCssVariables.font.size.md};- padding-bottom: ${({ theme }) => theme.spacing(1)};- padding-left: ${({ theme }) => theme.spacing(1)};- padding-right: ${({ theme, hasRightOptions }) =>- hasRightOptions ? theme.spacing(0.5) : theme.spacing(1)};- padding-top: ${({ theme }) => theme.spacing(1)};+ padding-bottom: ${themeCssVariables.spacing[1]};+ padding-left: ${themeCssVariables.spacing[1]};+ padding-right: ${({ hasRightOptions }) =>+ hasRightOptions+ ? themeCssVariables.spacing['0.5']+ : themeCssVariables.spacing[1]};+ padding-top: ${themeCssVariables.spacing[1]};margin-top: ${({ indentationLevel }) =>indentationLevel === 2 ? '2px' : '0'};- pointer-events: ${(props) => (props.soon ? 'none' : 'auto')};+ pointer-events: ${({ soon }) => (soon ? 'none' : 'auto')};- width: ${(props) =>- !props.isNavigationDrawerExpanded- ? `calc(${NAVIGATION_DRAWER_COLLAPSED_WIDTH}px - ${props.theme.spacing(6)} + ${props.theme.spacing(1)} + ${props.hasRightOptions ? props.theme.spacing(0.5) : props.theme.spacing(1)})`- : `calc(100% - ${props.theme.spacing(1.5)} + ${props.theme.spacing(1)} + ${props.hasRightOptions ? props.theme.spacing(0.5) : props.theme.spacing(1)})`};+ width: ${({ isNavigationDrawerExpanded, hasRightOptions }) =>+ !isNavigationDrawerExpanded+ ? `calc(${NAVIGATION_DRAWER_COLLAPSED_WIDTH}px - ${themeCssVariables.spacing[6]} + ${themeCssVariables.spacing[1]} + ${hasRightOptions ? themeCssVariables.spacing['0.5'] : themeCssVariables.spacing[1]})`+ : `calc(100% - ${themeCssVariables.spacing['1.5']} + ${themeCssVariables.spacing[1]} + ${hasRightOptions ? themeCssVariables.spacing['0.5'] : themeCssVariables.spacing[1]})`};- ${({ isDragging }) =>- isDragging &&- `- cursor: grabbing;- `}-- :hover {- background: ${({ theme }) => theme.background.transparent.light};- color: ${(props) =>- props.danger ? props.theme.color.red : props.theme.font.color.primary};+ &:hover {+ background: ${themeCssVariables.background.transparent.light};+ color: ${({ danger }) =>+ danger+ ? themeCssVariables.color.red+ : themeCssVariables.font.color.primary};}- :hover .keyboard-shortcuts {+ &:hover .keyboard-shortcuts {visibility: visible;}user-select: none;@media (max-width: ${MOBILE_VIEWPORT}px) {- font-size: ${({ theme }) => theme.font.size.lg};+ font-size: ${themeCssVariables.font.size.lg};}`;@@ -175,22 +164,22 @@ const StyledLabelParent = styled.div``;const StyledItemLabel = styled.span`- font-weight: ${({ theme }) => theme.font.weight.medium};+ font-weight: ${themeCssVariables.font.weight.medium};`;const StyledItemSecondaryLabel = styled.span`- color: ${({ theme }) => theme.font.color.light};- font-weight: ${({ theme }) => theme.font.weight.regular};+ color: ${themeCssVariables.font.color.light};+ font-weight: ${themeCssVariables.font.weight.regular};`;const StyledItemCount = styled.span`align-items: center;- background-color: ${({ theme }) => theme.color.blue};- border-radius: ${({ theme }) => theme.border.radius.rounded};- color: ${({ theme }) => theme.grayScale.gray1};+ background-color: ${themeCssVariables.color.blue};+ border-radius: ${themeCssVariables.border.radius.rounded};+ color: ${themeCssVariables.grayScale.gray1};display: flex;- font-size: ${({ theme }) => theme.font.size.xs};- font-weight: ${({ theme }) => theme.font.weight.semiBold};+ font-size: ${themeCssVariables.font.size.xs};+ font-weight: ${themeCssVariables.font.weight.semiBold};height: 16px;justify-content: center;margin-left: auto;@@ -201,15 +190,15 @@ const StyledKeyBoardShortcut = styled.span`align-items: center;display: flex;flex-direction: column;- gap: ${({ theme }) => theme.spacing(2)};- height: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[2]};+ height: ${themeCssVariables.spacing[4]};justify-content: center;- width: ${({ theme }) => theme.spacing(4)};+ width: ${themeCssVariables.spacing[4]};box-sizing: border-box;- border-radius: ${({ theme }) => theme.border.radius.sm};- border: 1px solid ${({ theme }) => theme.border.color.strong};- background: ${({ theme }) => theme.background.transparent.lighter};+ border-radius: ${themeCssVariables.border.radius.sm};+ border: 1px solid ${themeCssVariables.border.color.strong};+ background: ${themeCssVariables.background.transparent.lighter};`;const StyledNavigationDrawerItemContainer = styled.div`@@ -230,18 +219,18 @@ const StyledIcon = styled.div<{flex-grow: 0;flex-shrink: 0;justify-content: center;- margin-right: ${({ theme }) => theme.spacing(2)};-- ${({ theme, $backgroundColor, $borderColor }) =>- $backgroundColor &&- css`- background-color: ${$backgroundColor};- border-radius: 4px;- box-sizing: border-box;- height: ${theme.spacing(4)};- width: ${theme.spacing(4)};- ${$borderColor ? `border: 1px solid ${$borderColor};` : ''}- `}+ margin-right: ${themeCssVariables.spacing[2]};+ background-color: ${({ $backgroundColor }) =>+ $backgroundColor || 'transparent'};+ border-radius: ${({ $backgroundColor }) => ($backgroundColor ? '4px' : '0')};+ box-sizing: ${({ $backgroundColor }) =>+ $backgroundColor ? 'border-box' : 'content-box'};+ height: ${({ $backgroundColor }) =>+ $backgroundColor ? themeCssVariables.spacing[4] : 'auto'};+ width: ${({ $backgroundColor }) =>+ $backgroundColor ? themeCssVariables.spacing[4] : 'auto'};+ border: ${({ $backgroundColor, $borderColor }) =>+ $backgroundColor && $borderColor ? `1px solid ${$borderColor}` : 'none'};`;const StyledRightOptionsContainer = styled.div`@@ -250,42 +239,31 @@ const StyledRightOptionsContainer = styled.div`justify-content: center;flex-shrink: 0;flex-grow: 0;- height: ${({ theme }) => theme.spacing(6)};- border-radius: ${({ theme }) => theme.border.radius.sm};-`;--const visibleStateStyles = css`- clip-path: unset;- display: flex;- height: unset;- opacity: 1;- overflow: unset;- position: unset;- width: unset;+ height: ${themeCssVariables.spacing[6]};+ border-radius: ${themeCssVariables.border.radius.sm};`;-const StyledRightOptionsVisbility = styled.div<{- isMobile: boolean;- isRightOptionsDropdownOpen?: boolean;- alwaysVisible?: boolean;-}>`+const StyledRightOptionsVisbility = styled.div`display: block;opacity: 0;transition: opacity 150ms;position: absolute;- padding-left: ${({ theme }) => theme.spacing(2)};+ padding-left: ${themeCssVariables.spacing[2]};overflow: hidden;clip-path: inset(1px);white-space: nowrap;height: 1px;width: 1px;- ${({ isMobile, isRightOptionsDropdownOpen, alwaysVisible }) =>- (isMobile || isRightOptionsDropdownOpen || alwaysVisible) &&- visibleStateStyles}-+ &[data-visible='true'],.navigation-drawer-item:hover & {- ${visibleStateStyles}+ clip-path: unset;+ display: flex;+ height: unset;+ opacity: 1;+ overflow: unset;+ position: unset;+ width: unset;}`;@@ -314,7 +292,7 @@ export const NavigationDrawerItem = ({preventCollapseOnMobile = false,isSelectedInEditMode = false,}: NavigationDrawerItemProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isMobile = useIsMobile();const isSettingsPage = useIsSettingsPage();const isNavigationMenuItemEditingEnabled = useIsFeatureEnabled(@@ -472,10 +450,12 @@ export const NavigationDrawerItem = ({}}><StyledRightOptionsVisbility- alwaysVisible={alwaysShowRightOptions}- isMobile={isMobile}- isRightOptionsDropdownOpen={- isRightOptionsDropdownOpen || false+ data-visible={+ isMobile ||+ isRightOptionsDropdownOpen ||+ alwaysShowRightOptions+ ? 'true'+ : undefined}>{rightOptions}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 3d8602e4ac3..798d3ac934e 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,5 +1,6 @@import { type NavigationDrawerSubItemState } from '@/ui/navigation/navigation-drawer/types/NavigationDrawerSubItemState';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { themeCssVariables } from 'twenty-ui/theme-constants';export type NavigationDrawerItemBreadcrumbProps = {state?: NavigationDrawerSubItemState;@@ -9,13 +10,15 @@ const StyledNavigationDrawerItemBreadcrumbContainer = styled.div`height: 28px;margin-left: 7.5px;- margin-right: ${({ theme }) => theme.spacing(2)};+ margin-right: ${themeCssVariables.spacing[2]};width: 9px;`;const StyledGapVerticalLine = styled.div<{ darker: boolean }>`- background: ${({ theme, darker }) =>- darker ? theme.font.color.tertiary : theme.border.color.strong};+ background: ${({ darker }) =>+ darker+ ? themeCssVariables.font.color.tertiary+ : themeCssVariables.border.color.strong};position: relative;top: -2px;@@ -25,8 +28,10 @@ const StyledGapVerticalLine = styled.div<{ darker: boolean }>``;const StyledSecondaryFullVerticalBar = styled.div<{ darker: boolean }>`- background: ${({ theme, darker }) =>- darker ? theme.font.color.tertiary : theme.border.color.strong};+ background: ${({ darker }) =>+ darker+ ? themeCssVariables.font.color.tertiary+ : themeCssVariables.border.color.strong};position: relative;top: -17px;@@ -35,21 +40,23 @@ const StyledSecondaryFullVerticalBar = styled.div<{ darker: boolean }>``;const StyledRoundedProtrusion = styled.div<{ darker: boolean }>`- position: relative;- top: -2px;-- border-bottom-left-radius: 4px;-border: 1px solid- ${({ theme, darker }) =>- darker ? theme.font.color.tertiary : theme.border.color.strong};+ ${({ darker }) =>+ darker+ ? themeCssVariables.font.color.tertiary+ : themeCssVariables.border.color.strong};+ border-bottom-left-radius: 4px;- ${({ darker }) => (darker ? 'z-index: 1;' : '')}+ border-right: none;border-top: none;- border-right: none;+height: 14px;++ position: relative;+ top: -2px;width: 8px;+ z-index: ${({ darker }) => (darker ? '1' : 'auto')};`;export const NavigationDrawerItemBreadcrumb = ({diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemGroup.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemGroup.tsxindex dfb9b5f7c61..904c947dab3 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemGroup.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerItemGroup.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledGroup = styled.div`display: flex;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 fffb5511559..9dd2dd83f54 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,16 +1,20 @@import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage';import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext, type ReactNode } from 'react';import {type AnimationControls,motion,type TargetAndTransition,} from 'framer-motion';-import { type ReactNode } from 'react';+import { ThemeContext } from 'twenty-ui/theme';-const StyledAnimationGroupContainer = styled(motion.div)``;+const StyledAnimationGroupContainerBase = styled.div``;++const StyledAnimationGroupContainer = motion.create(+ StyledAnimationGroupContainerBase,+);type NavigationDrawerItemsCollapsableContainerProps = {isGroup?: boolean;@@ -21,7 +25,7 @@ export const NavigationDrawerItemsCollapsableContainer = ({isGroup = false,children,}: NavigationDrawerItemsCollapsableContainerProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isSettingsPage = useIsSettingsPage();const isNavigationDrawerExpanded = useAtomStateValue(isNavigationDrawerExpandedState,diff --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 6ec5905fede..47ca1d27d7f 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@@ -1,8 +1,9 @@import { useIsSettingsDrawer } from '@/navigation/hooks/useIsSettingsDrawer';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { useIsMobile } from 'twenty-ui/utilities';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledItemsContainer = styled.div`display: flex;@@ -14,9 +15,9 @@ const StyledItemsContainer = styled.div`const StyledScrollableInnerContainer = styled.div<{ isMobile?: boolean }>`height: 100%;- padding-left: ${({ theme }) => theme.spacing(5)};- padding-right: ${({ theme, isMobile }) =>- isMobile ? theme.spacing(5) : theme.spacing(8)};+ padding-left: ${themeCssVariables.spacing[5]};+ padding-right: ${({ isMobile }) =>+ isMobile ? themeCssVariables.spacing[5] : themeCssVariables.spacing[8]};`;export const NavigationDrawerScrollableContent = ({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 3e535e32717..782436a3af0 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,10 +1,11 @@import { useIsSettingsDrawer } from '@/navigation/hooks/useIsSettingsDrawer';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { useIsMobile } from 'twenty-ui/utilities';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSection = styled.div<{ isSettingsDrawer?: boolean }>`- margin-bottom: ${({ theme, isSettingsDrawer }) =>- isSettingsDrawer ? theme.spacing(3) : 0};+ margin-bottom: ${({ isSettingsDrawer }) =>+ isSettingsDrawer ? themeCssVariables.spacing[3] : '0'};width: 100%;`;@@ -14,9 +15,11 @@ const StyledSectionInnerContainerMinusScrollPadding = styled.div<{}>`display: flex;flex-direction: column;- gap: ${({ theme }) => theme.betweenSiblingsGap};- width: ${({ isMobile, theme, isSettingsDrawer }) =>- `calc(100% - ${isMobile || isSettingsDrawer ? 0 : theme.spacing(2)})`};+ gap: ${themeCssVariables.betweenSiblingsGap};+ width: ${({ isMobile, isSettingsDrawer }) =>+ isMobile || isSettingsDrawer+ ? '100%'+ : `calc(100% - ${themeCssVariables.spacing[2]})`};`;export const NavigationDrawerSection = ({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 4880266cc22..c106c5c7027 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@@ -5,25 +5,26 @@ import { NavigationDrawerSectionTitleSkeletonLoader } from '@/ui/navigation/naviimport { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import React from 'react';import { isDefined } from 'twenty-shared/utils';import { Label } from 'twenty-ui/display';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledTitle = styled.div`align-items: center;- border-radius: ${({ theme }) => theme.border.radius.sm};+ border-radius: ${themeCssVariables.border.radius.sm};display: flex;- height: ${({ theme }) => theme.spacing(5)};- padding-left: ${({ theme }) => theme.spacing(1)};- padding-right: ${({ theme }) => theme.spacing(0.5)};- padding-top: ${({ theme }) => theme.spacing(1)};- padding-bottom: ${({ theme }) => theme.spacing(1)};+ height: ${themeCssVariables.spacing[5]};+ padding-left: ${themeCssVariables.spacing[1]};+ padding-right: ${themeCssVariables.spacing['0.5']};+ padding-top: ${themeCssVariables.spacing[1]};+ padding-bottom: ${themeCssVariables.spacing[1]};justify-content: space-between;&:hover {cursor: pointer;- background-color: ${({ theme }) => theme.background.transparent.light};+ background-color: ${themeCssVariables.background.transparent.light};}`;diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitleSkeletonLoader.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitleSkeletonLoader.tsxindex 5391ea3e320..051caf7dd0e 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitleSkeletonLoader.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitleSkeletonLoader.tsx@@ -1,15 +1,17 @@import { SKELETON_LOADER_HEIGHT_SIZES } from '@/activities/components/SkeletonLoader';-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';+import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';const StyledSkeletonTitle = styled.div`- margin-bottom: ${(props) => props.theme.spacing(2)};- padding-left: ${({ theme }) => theme.spacing(1)};+ margin-bottom: ${themeCssVariables.spacing[2]};+ padding-left: ${themeCssVariables.spacing[1]};`;export const NavigationDrawerSectionTitleSkeletonLoader = () => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);return (<SkeletonThemebaseColor={theme.background.tertiary}diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawerItem.stories.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawerItem.stories.tsxindex 283dfbd14cc..e4eb47280a5 100644--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawerItem.stories.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/__stories__/NavigationDrawerItem.stories.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { NavigationDrawerItem } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerItem';diff --git a/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.ts b/packages/twenty-front/src/modules/ui/navigation/states/isNavigationDrawerExpanded.tsindex c35b9031a61..1da6fea849f 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';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';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 ee4a040e621..1ebed494b32 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';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';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 fae8cbd4eeb..c4278dbf8f7 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,10 +1,11 @@-import { useTheme } from '@emotion/react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';+import { useContext } from 'react';import { motion } from 'framer-motion';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';import { AnimatedCheckmark } from 'twenty-ui/display';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { ThemeContext } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div<{ isLast: boolean }>`align-items: center;@@ -15,15 +16,15 @@ const StyledContainer = styled.div<{ isLast: boolean }>`}`;-const StyledStepCircle = styled(motion.div)<{ isInNextSteps: boolean }>`+const StyledStepCircleBase = styled.div<{ isInNextSteps: boolean }>`align-items: center;border-radius: 50%;border-style: solid;border-width: 1px;- border-color: ${({ theme, isInNextSteps }) =>+ border-color: ${({ isInNextSteps }) =>isInNextSteps- ? theme.border.color.medium- : theme.border.color.inverted} !important;+ ? themeCssVariables.border.color.medium+ : themeCssVariables.border.color.inverted} !important;display: flex;flex-basis: auto;flex-shrink: 0;@@ -34,30 +35,38 @@ const StyledStepCircle = styled(motion.div)<{ isInNextSteps: boolean }>`width: 20px;`;+const StyledStepCircle = motion.create(StyledStepCircleBase);+const StyledStepIndex = styled.span<{ isCurrentStep: boolean }>`- color: ${({ theme, isCurrentStep }) =>- isCurrentStep ? theme.font.color.inverted : theme.font.color.tertiary};- font-size: ${({ theme }) => theme.font.size.md};- font-weight: ${({ theme }) => theme.font.weight.medium};+ color: ${({ isCurrentStep }) =>+ isCurrentStep+ ? themeCssVariables.font.color.inverted+ : themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.md};+ font-weight: ${themeCssVariables.font.weight.medium};`;const StyledStepLabel = styled.span<{ isInNextSteps: boolean }>`- color: ${({ theme, isInNextSteps }) =>- isInNextSteps ? theme.font.color.tertiary : theme.font.color.primary};- font-size: ${({ theme }) => theme.font.size.md};- font-weight: ${({ theme }) => theme.font.weight.semiBold};- margin-left: ${({ theme }) => theme.spacing(2)};+ color: ${({ isInNextSteps }) =>+ isInNextSteps+ ? themeCssVariables.font.color.tertiary+ : themeCssVariables.font.color.primary};+ font-size: ${themeCssVariables.font.size.md};+ font-weight: ${themeCssVariables.font.weight.semiBold};+ margin-left: ${themeCssVariables.spacing[2]};white-space: nowrap;`;-const StyledStepLine = styled(motion.div)`+const StyledStepLineBase = styled.div`height: 2px;- margin-left: ${({ theme }) => theme.spacing(2)};- margin-right: ${({ theme }) => theme.spacing(2)};+ margin-left: ${themeCssVariables.spacing[2]};+ margin-right: ${themeCssVariables.spacing[2]};overflow: hidden;width: 100%;`;+const StyledStepLine = motion.create(StyledStepLineBase);+export type StepProps = React.PropsWithChildren &React.ComponentProps<'div'> & {isLast?: boolean;@@ -73,7 +82,7 @@ export const Step = ({children,activeStep = 0,}: StepProps) => {- const theme = useTheme();+ const { theme } = useContext(ThemeContext);const isMobile = useIsMobile();const variantsLine = {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 b9d777fdb0d..970417bc0e9 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@@ -1,9 +1,9 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import React from 'react';import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';import { Step, type StepProps } from './Step';const StyledContainer = styled.div`diff --git a/packages/twenty-front/src/modules/ui/theme/components/BaseThemeProvider.tsx b/packages/twenty-front/src/modules/ui/theme/components/BaseThemeProvider.tsxindex aae5d745bd2..cf469d1494d 100644--- a/packages/twenty-front/src/modules/ui/theme/components/BaseThemeProvider.tsx+++ b/packages/twenty-front/src/modules/ui/theme/components/BaseThemeProvider.tsx@@ -1,4 +1,3 @@-import { ThemeProvider } from '@emotion/react';import { createContext } from 'react';import { useSystemColorScheme } from '@/ui/theme/hooks/useSystemColorScheme';@@ -32,9 +31,7 @@ export const BaseThemeProvider = ({ children }: BaseThemeProviderProps) => {return (<ThemeSchemeContext.Provider value={setPersistedColorScheme}>- <ThemeProvider theme={theme}>- <ThemeContextProvider theme={theme}>{children}</ThemeContextProvider>- </ThemeProvider>+ <ThemeContextProvider theme={theme}>{children}</ThemeContextProvider></ThemeSchemeContext.Provider>);};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 9c75af260e9..cd894b2a1a0 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type RefObject, useCallback, useState } from 'react';import { useDragSelect } from '@/ui/utilities/drag-select/hooks/useDragSelect';@@ -23,12 +23,14 @@ type Position = {y: number;};+import { themeCssVariables } from 'twenty-ui/theme-constants';+const StyledDragSelection = styled.div<SelectionBox>`position: absolute;z-index: 99;opacity: 0.2;- border: 1px solid ${({ theme }) => theme.color.blue3};- background: ${({ theme }) => theme.color.blue7};+ border: 1px solid ${themeCssVariables.color.blue3};+ background: ${themeCssVariables.color.blue7};top: ${({ top }) => top}px;left: ${({ left }) => left}px;width: ${({ width }) => width}px;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 6c59f6ea1f8..71cbd6b92f0 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@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type Meta, type StoryObj } from '@storybook/react-vite';import { useRef, useState } from 'react';import { userEvent, within } from 'storybook/test';@@ -7,13 +7,14 @@ 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';const StyledContainer = styled.div`- border: 1px solid ${({ theme }) => theme.border.color.light};- border-radius: ${({ theme }) => theme.border.radius.md};+ border: 1px solid ${themeCssVariables.border.color.light};+ border-radius: ${themeCssVariables.border.radius.md};height: 400px;overflow: hidden;- padding: ${({ theme }) => theme.spacing(4)};+ padding: ${themeCssVariables.spacing[4]};position: relative;width: 600px;`;@@ -21,27 +22,31 @@ const StyledContainer = styled.div`const StyledSelectableItem = styled.div<{ selected?: boolean }>`width: 100px;height: 80px;- border: 1px solid ${({ theme }) => theme.border.color.medium};- border-radius: ${({ theme }) => theme.border.radius.sm};- background: ${({ theme, selected }) =>- selected ? theme.color.blue3 : theme.background.secondary};+ border: 1px solid ${themeCssVariables.border.color.medium};+ border-radius: ${themeCssVariables.border.radius.sm};+ background: ${({ selected }) =>+ selected+ ? themeCssVariables.color.blue3+ : themeCssVariables.background.secondary};display: flex;align-items: center;justify-content: center;- margin: ${({ theme }) => theme.spacing(1)};+ margin: ${themeCssVariables.spacing[1]};user-select: none;cursor: pointer;&:hover {- background: ${({ theme, selected }) =>- selected ? theme.color.blue5 : theme.background.tertiary};+ background: ${({ selected }) =>+ selected+ ? themeCssVariables.color.blue5+ : themeCssVariables.background.tertiary};}`;const StyledGrid = styled.div`display: grid;grid-template-columns: repeat(4, 1fr);- gap: ${({ theme }) => theme.spacing(2)};+ gap: ${themeCssVariables.spacing[2]};width: 100%;height: 100%;`;@@ -49,15 +54,15 @@ const StyledGrid = styled.div`const StyledLargeGrid = styled.div`display: grid;grid-template-columns: repeat(6, 1fr);- gap: ${({ theme }) => theme.spacing(2)};- padding: ${({ theme }) => theme.spacing(4)};+ gap: ${themeCssVariables.spacing[2]};+ padding: ${themeCssVariables.spacing[4]};width: 900px;height: 600px;`;const StyledScrollableWrapper = styled(ScrollWrapper)`- border: 1px solid ${({ theme }) => theme.border.color.light};- border-radius: ${({ theme }) => theme.border.radius.md};+ border: 1px solid ${themeCssVariables.border.color.light};+ border-radius: ${themeCssVariables.border.radius.md};height: 300px;width: 600px;`;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 6b51d75e2e4..6cc69d0321d 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';+import { MOBILE_VIEWPORT } from 'twenty-ui/theme-constants';export const useIsMobile = () =>useMediaQuery({ query: `(max-width: ${MOBILE_VIEWPORT}px)` });diff --git a/packages/twenty-front/src/modules/ui/utilities/scroll/components/ScrollWrapper.tsx b/packages/twenty-front/src/modules/ui/utilities/scroll/components/ScrollWrapper.tsxindex 3925b4b8cdf..290cf10d996 100644--- a/packages/twenty-front/src/modules/ui/utilities/scroll/components/ScrollWrapper.tsx+++ b/packages/twenty-front/src/modules/ui/utilities/scroll/components/ScrollWrapper.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { ScrollWrapperInitEffect } from '@/ui/utilities/scroll/components/internal/ScrollWrapperInitEffect';import { ScrollWrapperComponentInstanceContext } from '@/ui/utilities/scroll/states/contexts/ScrollWrapperComponentInstanceContext';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 13e67bbf861..4e34b10b0d8 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@@ -1,18 +1,14 @@-import { getWorkflowDiagramColors } from '@/workflow/workflow-diagram/utils/getWorkflowDiagramColors';-import { css } from '@linaria/core';import { styled } from '@linaria/react';-import { useContext, useMemo, type CSSProperties } from 'react';import { IconButtonGroup, type IconButtonGroupProps } from 'twenty-ui/input';-import { ThemeContext } from 'twenty-ui/theme';+import { themeCssVariables } from 'twenty-ui/theme-constants';-const iconButtonGroupStyle = css`- background-color: var(--edge-btn-bg, transparent);- border: var(--edge-btn-border, none);+const StyledIconButtonGroup = styled(IconButtonGroup)`pointer-events: all;`;-const StyledWrapper = styled.div`- display: contents;+const StyledSelectedIconButtonGroup = styled(StyledIconButtonGroup)`+ background-color: ${themeCssVariables.color.blue2};+ border-color: ${themeCssVariables.color.blue};`;type WorkflowDiagramEdgeButtonGroupProps = IconButtonGroupProps & {@@ -23,24 +19,9 @@ export const WorkflowDiagramEdgeButtonGroup = ({selected = false,iconButtons,}: WorkflowDiagramEdgeButtonGroupProps) => {- const { theme } = useContext(ThemeContext);+ const ButtonGroup = selected+ ? StyledSelectedIconButtonGroup+ : StyledIconButtonGroup;- const dynamicStyles = useMemo(() => {- if (!selected) return {};- const colors = getWorkflowDiagramColors({ theme });- return {- '--edge-btn-bg': colors.selected.background,- // eslint-disable-next-line lingui/no-unlocalized-strings- '--edge-btn-border': `1px solid ${colors.selected.borderColor}`,- } as CSSProperties;- }, [selected, theme]);-- return (- <StyledWrapper style={dynamicStyles}>- <IconButtonGroup- className={`nodrag nopan ${iconButtonGroupStyle}`}- iconButtons={iconButtons}- />- </StyledWrapper>- );+ return <ButtonGroup className="nodrag nopan" iconButtons={iconButtons} />;};diff --git a/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx b/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsxindex 9108eb78ed2..026f56c6e7d 100644--- a/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx+++ b/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx@@ -22,8 +22,7 @@ import {type IconComponent,} from 'twenty-ui/display';import { Button } from 'twenty-ui/input';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsApiKeys.tsx b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsApiKeys.tsxindex c5575ed5d1e..0cf0975dda5 100644--- a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsApiKeys.tsx+++ b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsApiKeys.tsx@@ -10,8 +10,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { H2Title, IconPlus } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledButtonContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/pages/settings/developers/webhooks/components/SettingsWebhooks.tsx b/packages/twenty-front/src/pages/settings/developers/webhooks/components/SettingsWebhooks.tsxindex f911714ee94..9b3973b08fd 100644--- a/packages/twenty-front/src/pages/settings/developers/webhooks/components/SettingsWebhooks.tsx+++ b/packages/twenty-front/src/pages/settings/developers/webhooks/components/SettingsWebhooks.tsx@@ -9,8 +9,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { H2Title, IconPlus } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledButtonContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/pages/settings/workspace/SettingsApiWebhooks.tsx b/packages/twenty-front/src/pages/settings/workspace/SettingsApiWebhooks.tsxindex eb16d61215f..460bb5d3312 100644--- a/packages/twenty-front/src/pages/settings/workspace/SettingsApiWebhooks.tsx+++ b/packages/twenty-front/src/pages/settings/workspace/SettingsApiWebhooks.tsx@@ -12,8 +12,7 @@ import { getSettingsPath } from 'twenty-shared/utils';import { H2Title, IconPlus } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';-import { MOBILE_VIEWPORT } from 'twenty-ui/theme';-import { themeCssVariables } from 'twenty-ui/theme-constants';+import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme-constants';const StyledButtonContainer = styled.div`display: flex;diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.tsindex 81f4c9dc22a..91c9916c234 100644--- a/packages/twenty-front/vite.config.ts+++ b/packages/twenty-front/vite.config.ts@@ -96,7 +96,6 @@ export default defineConfig(({ command, mode }) => {plugins: [react({- jsxImportSource: '@emotion/react',plugins: [['@lingui/swc-plugin', {}]],}),tsconfigPaths({@@ -110,570 +109,26 @@ export default defineConfig(({ command, mode }) => {checker(checkers),{...wyw({- include: [- '**/twenty-ui/src/**/*.{ts,tsx}',- '**/AdvancedTextEditor.tsx',- '**/FileUploadProvider.tsx',- '**/MultiSelectControl.tsx',- '**/FormNumberFieldInput.tsx',- '**/FormUuidFieldInput.tsx',- '**/KeyboardShortcutMenuStyles.tsx',- '**/BubbleMenuIconButton.tsx',- '**/TextBubbleMenu.tsx',- '**/TurnIntoBlockDropdown.tsx',- '**/WorkflowAttachmentChip.tsx',- '**/WorkflowSendEmailAttachments.tsx',- '**/ResizableImageView.tsx',- '**/SettingsBillingSubscriptionInfo.tsx',- '**/SubscriptionBenefit.tsx',- '**/SubscriptionInfoContainer.tsx',- '**/SubscriptionPrice.tsx',- '**/TrialCard.tsx',- '**/MeteredPriceSelector.tsx',- '**/PlansTags.tsx',- '**/SettingsBillingLabelValueItem.tsx',- '**/SubscriptionInfoRowContainer.tsx',- '**/FileBlock.tsx',- '**/MentionInlineContent.tsx',- '**/BlockEditor.tsx',- '**/CustomMentionMenu.tsx',- '**/CustomSideMenu.tsx',- '**/CustomSideMenuOptions.tsx',- '**/CustomSlashMenu.tsx',- '**/CurrentWorkspaceMemberOrphanFavorites.tsx',- '**/FavoritesBackButton.tsx',- '**/FavoritesDroppable.tsx',- '**/FavoritesSkeletonLoader.tsx',- '**/FavoriteFolderPickerList.tsx',- '**/InformationBanner.tsx',- '**/InformationBannerWrapper.tsx',- '**/InformationBannerDeletedRecord.tsx',- '**/AddToNavigationDragHandle.tsx',- '**/CurrentWorkspaceMemberOrphanNavigationMenuItems.tsx',- '**/NavigationItemDropTarget.tsx',- '**/NavigationMenuEditModeBar.tsx',- '**/NavigationMenuItemBackButton.tsx',- '**/NavigationMenuItemDroppable.tsx',- '**/NavigationMenuItemIconContainer.tsx',- '**/NavigationMenuItemSkeletonLoader.tsx',- '**/ObjectIconWithViewOverlay.tsx',- '**/WorkspaceNavigationMenuItems.tsx',- '**/WorkspaceNavigationMenuItemsFolder.tsx',- '**/MainNavigationDrawerAIChatContent.tsx',- '**/MainNavigationDrawerNavigationContent.tsx',- '**/MainNavigationDrawerScrollableItems.tsx',- '**/MainNavigationDrawerTabsRow.tsx',- '**/RecordTableCellBaseContainer.tsx',- '**/RecordTableCellDisplayContainer.tsx',- '**/RecordTableCellFirstRowFirstColumn.tsx',- '**/RecordTableCellLoading.tsx',- '**/RecordTableCellStyleWrapper.tsx',- '**/RecordTableDragAndDropPlaceholderCell.tsx',- '**/RecordTableAggregateFooterCell.tsx',- '**/RecordTableHeaderAddColumnButton.tsx',- '**/RecordTableHeaderCell.tsx',- '**/RecordTableHeaderCheckboxColumn.tsx',- '**/RecordTableHeaderDragDropColumn.tsx',- '**/RecordTableHeaderFirstCell.tsx',- '**/RecordTableHeaderFirstScrollableCell.tsx',- '**/RecordTableHeaderLastEmptyColumn.tsx',- '**/RecordTableAddButtonPlaceholderCell.tsx',- '**/RecordTableGroupSectionLastDynamicFillingCell.tsx',- '**/RecordTableLastDynamicFillingCell.tsx',- '**/RecordTableRowVirtualizedContainer.tsx',- '**/RecordTableVirtualizedBodyPlaceholder.tsx',- '**/SignInAppNavigationDrawerMock.tsx',- '**/SignInBackgroundMockContainer.tsx',- '**/SignInBackgroundMockPage.tsx',- '**/Heading.tsx',- '**/MatchColumnSelectFieldSelectDropdownContent.tsx',- '**/MatchColumnToFieldSelect.tsx',- '**/SpreadSheetImportModalCloseButton.tsx',- '**/SpreadSheetImportModalWrapper.tsx',- '**/SpreadsheetImportTable.tsx',- '**/StepNavigationButton.tsx',- '**/ImportDataStep.tsx',- '**/MatchColumnsStep.tsx',- '**/ColumnGrid.tsx',- '**/SubMatchingSelectControlContainer.tsx',- '**/SubMatchingSelectDropdownButton.tsx',- '**/SubMatchingSelectRow.tsx',- '**/SubMatchingSelectRowLeftSelect.tsx',- '**/SubMatchingSelectRowRightDropdown.tsx',- '**/TemplateColumn.tsx',- '**/UnmatchColumn.tsx',- '**/UnmatchColumnBanner.tsx',- '**/UserTableColumn.tsx',- '**/SelectHeaderStep.tsx',- '**/SelectSheetStep.tsx',- '**/SpreadsheetImportStepper.tsx',- '**/SpreadsheetImportStepperContainer.tsx',- '**/UploadStep.tsx',- '**/DropZone.tsx',- '**/ValidationStep.tsx',- '**/columns.tsx',- '**/BooleanDisplay.tsx',- '**/EllipsisDisplay.tsx',- '**/EmailsDisplay.tsx',- '**/MultiSelectDisplay.tsx',- '**/PhonesDisplay.tsx',- '**/TextDisplay.tsx',- '**/RatingInput.tsx',- '**/SortOrFilterChip.tsx',- '**/UpdateViewButtonGroup.tsx',- '**/ViewBarDetails.tsx',- '**/ViewBarFilterDropdownAdvancedFilterButton.tsx',- '**/ViewBarFilterDropdownAnyFieldSearchButtonMenuItem.tsx',- '**/ViewBarFilterDropdownBottomMenu.tsx',- '**/ViewBarFilterDropdownFieldSelectMenu.tsx',- '**/ViewPickerContentCreateMode.tsx',- '**/ViewPickerDropdown.tsx',- '**/ViewPickerIconAndNameContainer.tsx',- '**/ViewPickerListContent.tsx',- '**/ViewPickerSaveButtonContainer.tsx',- '**/ViewPickerSelectContainer.tsx',- '**/AIChatAssistantMessageRenderer.tsx',- '**/AIChatBanner.tsx',- '**/AIChatContextUsageButton.tsx',- '**/AIChatEmptyState.tsx',- '**/AIChatErrorMessage.tsx',- '**/AIChatMessage.stories.tsx',- '**/AIChatMessage.tsx',- '**/AIChatSkeletonLoader.tsx',- '**/AIChatStandaloneError.tsx',- '**/AIChatSuggestedPrompts.tsx',- '**/AIChatTab.tsx',- '**/AIChatThreadGroup.tsx',- '**/AIChatThreadsList.tsx',- '**/ActionButton.tsx',- '**/ActivityList.tsx',- '**/ActivityRow.tsx',- '**/ActivityTargetChips.tsx',- '**/AgentChatContextPreview.tsx',- '**/AgentChatFileUploadButton.tsx',- '**/AppFullScreenErrorFallback.tsx',- '**/AppRootErrorFallback.tsx',- '**/AttachmentList.tsx',- '**/AttachmentRow.tsx',- '**/AuthModal.tsx',- '**/Authorize.tsx',- '**/BookCall.tsx',- '**/BookCallDecision.tsx',- '**/CalendarDayCardContent.tsx',- '**/CalendarEventDetails.tsx',- '**/CalendarEventNotSharedContent.tsx',- '**/CalendarEventParticipantsResponseStatusField.tsx',- '**/CalendarEventRow.tsx',- '**/CalendarEventsCard.tsx',- '**/ChooseYourPlan.tsx',- '**/ChooseYourPlanContent.tsx',- '**/CodeExecutionDisplay.tsx',- '**/ComponentStorybookLayout.tsx',- '**/ContextUsageProgressRing.tsx',- '**/CreateProfile.tsx',- '**/CreateWorkspace.tsx',- '**/CustomResolverFetchMoreLoader.tsx',- '**/DocumentViewer.tsx',- '**/EmailThreadBottomBar.tsx',- '**/EmailThreadHeader.tsx',- '**/EmailThreadMessage.tsx',- '**/EmailThreadMessageBody.tsx',- '**/EmailThreadMessageBodyPreview.tsx',- '**/EmailThreadMessageReceivers.tsx',- '**/EmailThreadMessageSender.tsx',- '**/EmailThreadNotShared.tsx',- '**/EmailThreadPreview.tsx',- '**/EmailVerificationSent.tsx',- '**/EmailsCard.tsx',- '**/EventCard.tsx',- '**/EventCardCalendarEvent.tsx',- '**/EventCardMessage.tsx',- '**/EventCardMessageBodyNotShared.tsx',- '**/EventCardMessageForbidden.tsx',- '**/EventCardToggleButton.tsx',- '**/EventFieldDiff.tsx',- '**/EventFieldDiffLabel.tsx',- '**/EventFieldDiffValue.tsx',- '**/EventList.tsx',- '**/EventLogDatePickerInput.tsx',- '**/EventLogFilters.tsx',- '**/EventLogJsonCell.tsx',- '**/EventLogResultsTable.tsx',- '**/EventRow.tsx',- '**/EventRowActivity.tsx',- '**/EventRowCalendarEvent.tsx',- '**/EventRowDynamicComponent.tsx',- '**/EventRowMainObject.tsx',- '**/EventRowMainObjectUpdated.tsx',- '**/EventRowMessage.tsx',- '**/EventsGroup.tsx',- '**/FileIcon.tsx',- '**/FilesCard.tsx',- '**/FooterNote.tsx',- '**/FullHeightStorybookLayout.tsx',- '**/FullScreenDecorator.tsx',- '**/InviteTeam.tsx',- '**/LastUsedPill.tsx',- '**/LazyMarkdownRendererStyledComponents.tsx',- '**/LeftPanelSkeletonLoader.tsx',- '**/LocalePicker.tsx',- '**/Logo.tsx',- '**/MainNavigationDrawerItemsSkeletonLoader.tsx',- '**/NavigationDrawerAIChatThreadDateSection.tsx',- '**/NavigationDrawerAIChatThreadsList.tsx',- '**/NavigationDrawerSectionForObjectMetadataItemsSkeletonLoader.tsx',- '**/NavigationDrawerSectionForWorkspaceItems.tsx',- '**/NotFound.tsx',- '**/NoteList.tsx',- '**/NoteTile.tsx',- '**/NotesCard.tsx',- '**/OnboardingModalCircularIcon.tsx',- '**/OnboardingSyncEmailsSettingsCard.tsx',- '**/PageHeaderActionMenuButtons.tsx',- '**/ParticipantChip.tsx',- '**/PasswordReset.tsx',- '**/PaymentSuccess.tsx',- '**/PlaceAutocompleteSelect.tsx',- '**/ProfilingReporter.tsx',- '**/ReasoningSummaryDisplay.tsx',- '**/RecordIndexActionMenuDropdown.tsx',- '**/RightDrawerSkeletonLoader.tsx',- '**/RightPanelSkeletonLoader.tsx',- '**/RoutingDebugDisplay.tsx',- '**/RoutingStatusDisplay.tsx',- '**/SettingsAI.tsx',- '**/SettingsAIAgentForm.tsx',- '**/SettingsAIAgentTableRow.tsx',- '**/SettingsAIAgentsTable.tsx',- '**/SettingsAIMCP.tsx',- '**/SettingsAIModelsTab.tsx',- '**/SettingsAIPrompts.tsx',- '**/SettingsAdminConfigVariableDetails.tsx',- '**/SettingsAdminIndicatorHealthStatus.tsx',- '**/SettingsAgentDetailSkeletonLoader.tsx',- '**/SettingsAgentEvalsTab.tsx',- '**/SettingsAgentForm.tsx',- '**/SettingsAgentLogsTab.tsx',- '**/SettingsAgentModelCapabilities.tsx',- '**/SettingsAgentResponseFormat.tsx',- '**/SettingsAgentRoleTab.tsx',- '**/SettingsAgentSettingsTab.tsx',- '**/SettingsAgentTurnDetail.tsx',- '**/SettingsApiKeys.tsx',- '**/SettingsApiWebhooks.tsx',- '**/SettingsApplicationCustomTab.tsx',- '**/SettingsApplicationDataTable.tsx',- '**/SettingsApplicationDataTableRow.tsx',- '**/SettingsApplicationDetailEnvironmentVariablesTable.tsx',- '**/SettingsApplicationDetailSkeletonLoader.tsx',- '**/SettingsApplicationNameDescriptionTable.tsx',- '**/SettingsApplicationRegistrationDetails.tsx',- '**/SettingsApplicationTableRow.tsx',- '**/SettingsApplicationsAvailableTab.tsx',- '**/SettingsApplicationsDeveloperTab.tsx',- '**/SettingsApplicationsTable.tsx',- '**/SettingsAvailableApplicationCard.tsx',- '**/SettingsAvailableApplicationDetails.tsx',- '**/SettingsDevelopersApiKeyDetail.tsx',- '**/SettingsDomains.tsx',- '**/SettingsEmailingDomains.tsx',- '**/SettingsEventLogs.tsx',- '**/SettingsObjectDetailPage.tsx',- '**/SettingsObjectFieldEdit.tsx',- '**/SettingsObjectFieldTable.tsx',- '**/SettingsObjectIndexTable.tsx',- '**/SettingsObjectTable.tsx',- '**/SettingsSecurity.tsx',- '**/SettingsSkillForm.tsx',- '**/SettingsSkillTableRow.tsx',- '**/SettingsSkillsTable.tsx',- '**/SettingsSystemToolTableRow.tsx',- '**/SettingsToolTableRow.tsx',- '**/SettingsToolsTable.tsx',- '**/SettingsTwoFactorAuthenticationMethod.tsx',- '**/SettingsUpdates.tsx',- '**/SettingsWebhooks.tsx',- '**/SettingsWorkspaceMembers.tsx',- '**/ShimmeringText.tsx',- '**/SignInUp.tsx',- '**/SignInUpEmailField.tsx',- '**/SignInUpGlobalScopeForm.tsx',- '**/SignInUpPasswordField.tsx',- '**/SignInUpSSOButtonStyles.ts',- '**/SignInUpSSOIdentityProviderSelection.tsx',- '**/SignInUpTwoFactorAuthenticationProvision.tsx',- '**/SignInUpTwoFactorAuthenticationVerification.tsx',- '**/SignInUpWithCredentials.tsx',- '**/SignInUpWorkspaceScopeForm.tsx',- '**/SkeletonLoader.tsx',- '**/SubTitle.tsx',- '**/SyncEmails.tsx',- '**/TaskGroups.tsx',- '**/TaskList.tsx',- '**/TaskRow.tsx',- '**/TasksCard.tsx',- '**/TerminalOutput.tsx',- '**/ThinkingStepsDisplay.tsx',- '**/TimelineCard.tsx',- '**/Title.tsx',- '**/ToolStepRenderer.tsx',- '**/UserOrMetadataLoader.tsx',- '**/WorkflowStepActionDrawerDecorator.tsx',- '**/WorkspaceInviteLink.tsx',- '**/WorkspaceInviteTeam.tsx',- '**/AddressInput.tsx',- '**/AxisLayer.tsx',- '**/BarChart.tsx',- '**/BarChartBaseLayer.tsx',- '**/BarChartHoverLayer.tsx',- '**/BarChartLayers.tsx',- '**/BarChartTotalsLayer.tsx',- '**/BlankLayout.tsx',- '**/BodyInput.tsx',- '**/BooleanInput.tsx',- '**/CalendarWidget.tsx',- '**/ChartColorGradientOption.tsx',- '**/ChartColorPaletteOption.tsx',- '**/ChartFiltersSettings.tsx',- '**/ChartSettings.tsx',- '**/ChartTypeSelectionSection.tsx',- '**/CommandGroup.tsx',- '**/CommandMenuAIChatThreadsPage.tsx',- '**/CommandMenuAskAIInfo.tsx',- '**/CommandMenuAskAIPage.tsx',- '**/CommandMenuBackButton.tsx',- '**/CommandMenuContainer.tsx',- '**/CommandMenuContextChip.tsx',- '**/CommandMenuContextRecordChipAvatars.tsx',- '**/CommandMenuEditColorOption.tsx',- '**/CommandMenuEditRichTextPage.tsx',- '**/CommandMenuFolderInfo.tsx',- '**/CommandMenuForMobile.tsx',- '**/CommandMenuItemNumberInput.tsx',- '**/CommandMenuItemTextInput.tsx',- '**/CommandMenuItemWithAddToNavigationDrag.tsx',- '**/CommandMenuList.tsx',- '**/CommandMenuMergeRecordPage.tsx',- '**/CommandMenuMessageThreadIntermediaryMessages.tsx',- '**/CommandMenuMessageThreadPage.tsx',- '**/CommandMenuNavigationMenuItemEditPage.tsx',- '**/CommandMenuOpenContainer.tsx',- '**/CommandMenuPageInfo.tsx',- '**/CommandMenuPageInfoLayout.tsx',- '**/CommandMenuPageLayoutChartSettings.tsx',- '**/CommandMenuPageLayoutFieldsLayout.tsx',- '**/CommandMenuPageLayoutFieldsSettings.tsx',- '**/CommandMenuPageLayoutIframeSettings.tsx',- '**/CommandMenuRecordPage.tsx',- '**/CommandMenuRouter.tsx',- '**/CommandMenuSidePanelForDesktop.tsx',- '**/CommandMenuSubViewWithSearch.tsx',- '**/CommandMenuTopBar.tsx',- '**/CommandMenuTopBarRightCornerIcon.tsx',- '**/CommandMenuUpdateMultipleRecords.tsx',- '**/CommandMenuWorkflowEditStepContent.tsx',- '**/CommandMenuWorkflowRunViewStepContent.tsx',- '**/CommandMenuWorkflowViewStepContent.tsx',- '**/ConfirmationModal.tsx',- '**/CreateNewButton.tsx',- '**/CronExpressionHelper.tsx',- '**/CurrencyInput.tsx',- '**/CurrencyPickerDropdownButton.tsx',- '**/DashboardColorIcon.tsx',- '**/DashboardColorSelectionMenu.tsx',- '**/DashboardEditorSideMenu.tsx',- '**/DashboardFormattingToolbar.tsx',- '**/DashboardFormattingToolbarColorButton.tsx',- '**/DashboardsBlockEditor.tsx',- '**/DatePicker.tsx',- '**/DatePickerHeader.tsx',- '**/DatePickerInput.tsx',- '**/DatePickerWithoutCalendar.tsx',- '**/DateTimeDisplay.tsx',- '**/DateTimePicker.tsx',- '**/DateTimePickerHeader.tsx',- '**/DateTimePickerInput.tsx',- '**/DefaultLayout.tsx',- '**/Dialog.tsx',- '**/DoubleTextInput.tsx',- '**/DraggableList.tsx',- '**/Dropdown.stories.tsx',- '**/Dropdown.tsx',- '**/DropdownContent.tsx',- '**/DropdownInternalContainer.tsx',- '**/DropdownMenuHeader.tsx',- '**/DropdownMenuHeaderLeftComponent.tsx',- '**/DropdownMenuInnerSelect.tsx',- '**/DropdownMenuInput.tsx',- '**/DropdownMenuItemsContainer.tsx',- '**/DropdownMenuSearchInput.tsx',- '**/DropdownMenuSectionLabel.tsx',- '**/DropdownMenuSeparator.tsx',- '**/DropdownMenuSkeletonItem.tsx',- '**/EmailWidget.tsx',- '**/ExpandableList.stories.tsx',- '**/ExpandableList.tsx',- '**/ExpandedFieldDisplay.tsx',- '**/ExpandedListDropdown.tsx',- '**/FieldInputContainer.tsx',- '**/FieldRichTextWidget.tsx',- '**/FieldWidget.tsx',- '**/FieldWidgetDisplay.tsx',- '**/FieldWidgetEditAction.tsx',- '**/FieldWidgetInlineCellContainer.tsx',- '**/FieldWidgetMorphRelationCard.tsx',- '**/FieldWidgetMorphRelationField.tsx',- '**/FieldWidgetRelationCard.tsx',- '**/FieldWidgetRelationEditAction.tsx',- '**/FieldWidgetRelationField.tsx',- '**/FieldWidgetShowMoreButton.tsx',- '**/FieldsConfigurationEditor.tsx',- '**/FieldsConfigurationGroupEditor.tsx',- '**/FieldsConfigurationGroupRenameInput.tsx',- '**/FieldsWidget.tsx',- '**/FieldsWidgetGroupContainer.tsx',- '**/FileChip.tsx',- '**/FileWidget.tsx',- '**/FrontComponentWidgetRenderer.tsx',- '**/FullScreenContainer.stories.tsx',- '**/FullScreenContainer.tsx',- '**/GlobalFilePreviewModal.tsx',- '**/GraphWidgetAggregateChart.tsx',- '**/GraphWidgetBarChart.tsx',- '**/GraphWidgetChartContainer.tsx',- '**/GraphWidgetGaugeChart.tsx',- '**/GraphWidgetLegend.tsx',- '**/GraphWidgetLegendDot.tsx',- '**/GraphWidgetLineChart.tsx',- '**/GraphWidgetPieChart.tsx',- '**/GraphWidgetTooltip.tsx',- '**/HttpRequestTestVariableInput.tsx',- '**/IconPicker.tsx',- '**/IframeWidget.tsx',- '**/ImageInput.tsx',- '**/InputErrorHelper.tsx',- '**/InputHint.tsx',- '**/InputLabel.tsx',- '**/KeyValuePairInput.tsx',- '**/Modal.tsx',- '**/NoteWidget.tsx',- '**/OverlayContainer.tsx',- '**/PageBody.tsx',- '**/PageContainer.tsx',- '**/PageHeader.tsx',- '**/PageHeaderToggleCommandMenuButton.tsx',- '**/PageLayoutCanvasViewer.tsx',- '**/PageLayoutGridLayout.tsx',- '**/PageLayoutGridOverlay.tsx',- '**/PageLayoutGridResizeHandle.tsx',- '**/PageLayoutLeftPanel.tsx',- '**/PageLayoutRendererContent.tsx',- '**/PageLayoutTabList.stories.tsx',- '**/PageLayoutTabList.tsx',- '**/PageLayoutTabListDroppableMoreButton.tsx',- '**/PageLayoutTabListReorderableOverflowDropdown.tsx',- '**/PageLayoutTabListReorderableTab.tsx',- '**/PageLayoutTabListVisibleTabs.tsx',- '**/PageLayoutTabMenuItemSelectAvatar.tsx',- '**/PageLayoutTabRenderClone.tsx',- '**/PageLayoutVerticalListEditor.tsx',- '**/PageLayoutVerticalListViewer.tsx',- '**/PageLayoutWidgetInvalidConfigDisplay.tsx',- '**/PageLayoutWidgetNoDataDisplay.tsx',- '**/PagePanel.tsx',- '**/PhoneCountryPickerDropdownButton.tsx',- '**/PhoneCountryPickerDropdownSelect.tsx',- '**/PieChartCenterMetricLayer.tsx',- '**/RelativeDatePickerHeader.tsx',- '**/ResizablePanelEdge.tsx',- '**/ResizablePanelGap.tsx',- '**/RightDrawerFooter.tsx',- '**/RightDrawerWorkflowSelectStepContainer.tsx',- '**/RightDrawerWorkflowSelectStepTitle.tsx',- '**/Select.tsx',- '**/SelectControl.tsx',- '**/ShowPageContainer.tsx',- '**/SidePanelSubPageNavigationHeader.tsx',- '**/SnackBar.tsx',- '**/SnackBarProvider.tsx',- '**/StandaloneRichTextWidget.tsx',- '**/StyledDropdownButtonContainer.tsx',- '**/StyledDropdownMenuSubheader.tsx',- '**/StyledHeaderDropdownButton.tsx',- '**/SubMenuTopBarContainer.tsx',- '**/TaskWidget.tsx',- '**/TextArea.tsx',- '**/TextAreaInput.tsx',- '**/TextInput.tsx',- '**/TimeZoneAbbreviation.tsx',- '**/TimelineWidget.tsx',- '**/TitleInput.tsx',- '**/UploadFileChip.tsx',- '**/WidgetActionFieldSeeAll.tsx',- '**/WidgetCard.tsx',- '**/WidgetCardContent.tsx',- '**/WidgetCardHeader.tsx',- '**/WidgetGrip.tsx',- '**/WidgetRenderer.tsx',- '**/WidgetSkeletonLoader.tsx',- '**/WorkflowAiAgentPermissionsStyles.ts',- '**/WorkflowAiAgentPermissionsTab.tsx',- '**/WorkflowCodeEditor.tsx',- '**/WorkflowDiagramCanvasBase.tsx',- '**/WorkflowDiagramCreateStepElement.tsx',- '**/WorkflowDiagramEdgeButtonGroup.tsx',- '**/WorkflowDiagramEdgeLabel.tsx',- '**/WorkflowDiagramEdgeLabelContainer.tsx',- '**/WorkflowDiagramEdgeV2Container.tsx',- '**/WorkflowDiagramEdgeV2VisibilityContainer.tsx',- '**/WorkflowDiagramHandleSource.tsx',- '**/WorkflowDiagramHandleTarget.tsx',- '**/WorkflowDiagramRightClickCommandMenu.tsx',- '**/WorkflowDiagramStepNodeEditableContent.tsx',- '**/WorkflowEditActionAiAgent.tsx',- '**/WorkflowEditActionCode.tsx',- '**/WorkflowEditActionCodeFields.tsx',- '**/WorkflowEditActionFilterBody.tsx',- '**/WorkflowEditActionFindRecords.tsx',- '**/WorkflowEditActionFormBuilder.tsx',- '**/WorkflowEditActionFormFieldSettings.tsx',- '**/WorkflowEditActionHttpRequest.tsx',- '**/WorkflowEditActionIfElseBody.tsx',- '**/WorkflowEditActionLogicFunction.tsx',- '**/WorkflowEditTriggerDatabaseEventForm.tsx',- '**/WorkflowEditTriggerManual.tsx',- '**/WorkflowFindRecordsSorts.tsx',- '**/WorkflowFormFieldSettingsNumber.tsx',- '**/WorkflowFormFieldSettingsRecordPicker.tsx',- '**/WorkflowFormFieldSettingsSelect.tsx',- '**/WorkflowFormFieldSettingsText.tsx',- '**/WorkflowIfElseBranchEditor.tsx',- '**/WorkflowIteratorSubStepSwitcher.tsx',- '**/WorkflowNodeContainer.tsx',- '**/WorkflowNodeIconContainer.tsx',- '**/WorkflowNodeLabel.tsx',- '**/WorkflowNodeLabelWithCounterPart.tsx',- '**/WorkflowNodeRightPart.tsx',- '**/WorkflowNodeTitle.tsx',- '**/WorkflowOutputSchemaBuilder.tsx',- '**/WorkflowReadonlyActionCode.tsx',- '**/WorkflowRunCard.tsx',- '**/WorkflowRunDiagramStepNode.tsx',- '**/WorkflowRunStepJsonContainer.tsx',- '**/WorkflowStepBody.tsx',- '**/WorkflowStepExecutionResult.tsx',- '**/WorkflowStepFilterAddRootStepFilterButton.tsx',- '**/WorkflowStepFilterColumn.tsx',- '**/WorkflowStepFilterGroupChildren.tsx',- '**/WorkflowStepFilterGroupColumn.tsx',- '**/WorkflowStepFilterLogicalOperatorCell.tsx',- '**/WorkflowTextEditorTextChip.tsx',- '**/WorkflowTextEditorVariableChip.tsx',- '**/WorkflowVariablePicker.tsx',- '**/WorkflowVariablesDropdown.tsx',- '**/WorkflowVersionCard.tsx',- '**/useCommandMenuContextChips.tsx',- '**/useFullScreenModal.tsx',+ include: ['**/*.{ts,tsx}'],+ exclude: [+ '**/generated-metadata/**',+ '**/testing/mock-data/generated/**',+ '**/*.test.{ts,tsx}',+ '**/*.spec.{ts,tsx}',+ '**/types/**',+ '**/constants/**',+ '**/states/**',+ '**/selectors/**',+ '**/guards/**',+ '**/schemas/**',+ '**/utils/**',+ '**/contexts/**',+ '**/hooks/**',+ '**/enums/**',+ '**/queries/**',+ '**/mutations/**',+ '**/fragments/**',+ '**/graphql/**',],babelOptions: {presets: ['@babel/preset-typescript', '@babel/preset-react'],diff --git a/packages/twenty-sdk/.storybook/preview.tsx b/packages/twenty-sdk/.storybook/preview.tsxindex 33a0c0165c7..acfa65702f1 100644--- a/packages/twenty-sdk/.storybook/preview.tsx+++ b/packages/twenty-sdk/.storybook/preview.tsx@@ -1,4 +1,3 @@-import { ThemeProvider } from '@emotion/react';import { type Preview } from '@storybook/react-vite';import { THEME_LIGHT, ThemeContextProvider } from 'twenty-ui/theme';@@ -9,11 +8,9 @@ const preview: Preview = {const theme = THEME_LIGHT;return (- <ThemeProvider theme={theme}>- <ThemeContextProvider theme={theme}>- <Story />- </ThemeContextProvider>- </ThemeProvider>+ <ThemeContextProvider theme={theme}>+ <Story />+ </ThemeContextProvider>);},],diff --git a/packages/twenty-sdk/package.json b/packages/twenty-sdk/package.jsonindex ed936d99a47..07747f84b6b 100644--- a/packages/twenty-sdk/package.json+++ b/packages/twenty-sdk/package.json@@ -97,6 +97,7 @@"zod": "^4.1.11"},"devDependencies": {+ "@emotion/styled": "^11.14.0","@mui/material": "^7.3.8","@prettier/sync": "^0.5.2","@storybook/addon-vitest": "^10.2.13",diff --git a/packages/twenty-sdk/src/front-component-renderer/host/components/FrontComponentRenderer.tsx b/packages/twenty-sdk/src/front-component-renderer/host/components/FrontComponentRenderer.tsxindex e929f504ae1..1e0e6dce933 100644--- a/packages/twenty-sdk/src/front-component-renderer/host/components/FrontComponentRenderer.tsx+++ b/packages/twenty-sdk/src/front-component-renderer/host/components/FrontComponentRenderer.tsx@@ -12,8 +12,7 @@ import {import { useMemo, useState } from 'react';import { isDefined } from 'twenty-shared/utils';-import { ThemeProvider } from '@emotion/react';-import { type ThemeType } from 'twenty-ui/theme';+import { type ThemeType, ThemeContextProvider } from 'twenty-ui/theme';import { FrontComponentWorkerEffect } from '../../remote/components/FrontComponentWorkerEffect';import { componentRegistry } from '../generated/host-component-registry';@@ -108,12 +107,12 @@ export const FrontComponentRenderer = ({)}{isDefined(receiver) && isExecutionContextInitialized && (- <ThemeProvider theme={theme}>+ <ThemeContextProvider theme={theme}><RemoteRootRendererreceiver={receiver}components={componentRegistry}/>- </ThemeProvider>+ </ThemeContextProvider>)}</>);diff --git a/packages/twenty-sdk/src/ui/index.ts b/packages/twenty-sdk/src/ui/index.tsindex 3e05bbfb249..d35fd14e730 100644--- a/packages/twenty-sdk/src/ui/index.ts+++ b/packages/twenty-sdk/src/ui/index.ts@@ -9,7 +9,3 @@ export * from 'twenty-ui/layout';export * from 'twenty-ui/navigation';export * from 'twenty-ui/theme';export * from 'twenty-ui/utilities';--// Re-export Emotion's ThemeProvider so front components can wrap-// their content with the Twenty UI theme without a direct @emotion/react dependency-export { ThemeProvider } from '@emotion/react';diff --git a/packages/twenty-ui/src/display/color/components/ColorSample.tsx b/packages/twenty-ui/src/display/color/components/ColorSample.tsxindex dd0602f44f3..d8dead77c96 100644--- a/packages/twenty-ui/src/display/color/components/ColorSample.tsx+++ b/packages/twenty-ui/src/display/color/components/ColorSample.tsx@@ -12,7 +12,9 @@ type StyledColorSampleProps = {variant?: ColorSampleVariant;};-export type ColorSampleProps = StyledColorSampleProps;+export type ColorSampleProps = StyledColorSampleProps & {+ className?: string;+};const getColor = (colorName: ThemeColor, color?: string) => {if (isDefined(color)) {@@ -57,8 +59,14 @@ export const ColorSample = ({colorName,color,variant,+ className,}: ColorSampleProps) => {return (- <StyledColorSample colorName={colorName} color={color} variant={variant} />+ <StyledColorSample+ colorName={colorName}+ color={color}+ variant={variant}+ className={className}+ />);};diff --git a/packages/twenty-ui/src/individual-entry.ts b/packages/twenty-ui/src/individual-entry.tsindex 034b27cedc1..d762a518931 100644--- a/packages/twenty-ui/src/individual-entry.ts+++ b/packages/twenty-ui/src/individual-entry.ts@@ -1,6 +1,6 @@// Entry point for the individual/self-contained build (vite.config.individual.ts).// This re-exports all public modules so a single .mjs bundle contains-// every component with internal deps bundled, while React and Emotion+// every component with internal deps bundled, while React// remain external for the consumer's bundler to resolve.export * from './accessibility';@@ -13,3 +13,4 @@ export * from './layout';export * from './navigation';export * from './theme';export * from './utilities';+diff --git a/packages/twenty-ui/src/input/components/Toggle.tsx b/packages/twenty-ui/src/input/components/Toggle.tsxindex 44ad6b73ad4..099dca5cf4d 100644--- a/packages/twenty-ui/src/input/components/Toggle.tsx+++ b/packages/twenty-ui/src/input/components/Toggle.tsx@@ -9,10 +9,12 @@ type ContainerProps = {isOn: boolean;color?: string;toggleSize: ToggleSize;+ centered?: boolean;'data-disabled'?: boolean;};const StyledContainer = styled.label<ContainerProps>`+ align-self: ${({ centered }) => (centered ? 'center' : 'flex-start')};align-items: center;background-color: ${({ isOn, color }) =>isOn@@ -52,6 +54,7 @@ export type ToggleProps = {color?: string;toggleSize?: ToggleSize;className?: string;+ centered?: boolean;disabled?: boolean;};@@ -62,6 +65,7 @@ export const Toggle = ({color,toggleSize = 'medium',className,+ centered,disabled,}: ToggleProps) => {const circleVariants = {@@ -75,6 +79,7 @@ export const Toggle = ({color={color}toggleSize={toggleSize}className={className}+ centered={centered}data-disabled={disabled}><VisibilityHiddenInputdiff --git a/packages/twenty-ui/src/layout/animated-placeholder/components/EmptyPlaceholderStyled.tsx b/packages/twenty-ui/src/layout/animated-placeholder/components/EmptyPlaceholderStyled.tsxindex 419c681fe54..0a1935c10aa 100644--- a/packages/twenty-ui/src/layout/animated-placeholder/components/EmptyPlaceholderStyled.tsx+++ b/packages/twenty-ui/src/layout/animated-placeholder/components/EmptyPlaceholderStyled.tsx@@ -2,6 +2,7 @@ import { styled } from '@linaria/react';import { themeCssVariables } from '@ui/theme-constants';import { type HTMLMotionProps, motion } from 'framer-motion';import { type ReactNode } from 'react';+import { isDefined } from 'twenty-shared/utils';const StyledEmptyContainerBase = styled.div`align-items: center;@@ -22,11 +23,13 @@ type AnimatedPlaceholderEmptyContainerProps = Pick<> & {children?: ReactNode;className?: string;+ width?: number;};export const AnimatedPlaceholderEmptyContainer = ({children,className,+ width,initial,animate,transition,@@ -34,6 +37,7 @@ export const AnimatedPlaceholderEmptyContainer = ({return (<MotionEmptyContainerclassName={className}+ style={isDefined(width) ? { width: `${width}px` } : undefined}initial={initial}animate={animate}transition={transition}diff --git a/packages/twenty-ui/src/layout/card/components/CardContent.tsx b/packages/twenty-ui/src/layout/card/components/CardContent.tsxindex 72b90d47770..ba5d945cf5f 100644--- a/packages/twenty-ui/src/layout/card/components/CardContent.tsx+++ b/packages/twenty-ui/src/layout/card/components/CardContent.tsx@@ -5,6 +5,8 @@ import { type ComponentProps, type ReactNode } from 'react';const StyledCardContentBase = styled.div<{divider?: boolean;+ isClickable?: boolean;+ hasHoverHighlight?: boolean;}>`background-color: ${themeCssVariables.background.secondary};padding: ${themeCssVariables.spacing[4]};@@ -12,8 +14,13 @@ const StyledCardContentBase = styled.div<{border-bottom: ${({ divider }) =>divider ? `1px solid ${themeCssVariables.border.color.medium}` : 'none'};- &[data-clickable='true'] {- cursor: pointer;+ cursor: ${({ isClickable }) => (isClickable ? 'pointer' : 'default')};++ &:hover {+ background: ${({ hasHoverHighlight }) =>+ hasHoverHighlight+ ? themeCssVariables.background.transparent.light+ : 'transparent'};}`;@@ -24,6 +31,7 @@ type CardContentProps = {className?: string;divider?: boolean;isClickable?: boolean;+ hasHoverHighlight?: boolean;} & Omit<ComponentProps<typeof MotionCardContent>, 'theme'>;export const CardContent = ({@@ -31,13 +39,15 @@ export const CardContent = ({className,divider,isClickable,+ hasHoverHighlight,...rest}: CardContentProps) => {return (<MotionCardContentclassName={className}divider={divider}- data-clickable={isClickable}+ isClickable={isClickable}+ hasHoverHighlight={hasHoverHighlight}// eslint-disable-next-line react/jsx-props-no-spreading{...rest}>diff --git a/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItem.tsx b/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItem.tsxindex d2ce59ab41f..3ff01db3e8b 100644--- a/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItem.tsx+++ b/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItem.tsx@@ -50,6 +50,7 @@ export type MenuItemProps = {contextualText?: ReactNode;hasSubMenu?: boolean;focused?: boolean;+ selected?: boolean;hotKeys?: string[];isSubMenuOpened?: boolean;};@@ -80,6 +81,7 @@ export const MenuItem = ({hasSubMenu = false,disabled = false,focused = false,+ selected = false,hotKeys,isSubMenuOpened = false,}: MenuItemProps) => {@@ -104,7 +106,7 @@ export const MenuItem = ({isIconDisplayedOnHoverOnly={isIconDisplayedOnHoverOnly}onMouseEnter={onMouseEnter}onMouseLeave={onMouseLeave}- focused={focused}+ focused={focused || selected}><MenuItemLeftContentLeftIcon={LeftIcon ?? undefined}diff --git a/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemSuggestion.tsx b/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemSuggestion.tsxindex 0be9286d817..357e775cc85 100644--- a/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemSuggestion.tsx+++ b/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemSuggestion.tsx@@ -42,7 +42,7 @@ const StyledSuggestionMenuItem = styled.li<{padding: var(--vertical-padding) var(--horizontal-padding);background: ${({ selected }) =>- selected ? themeCssVariables.background.transparent.medium : ''};+ selected ? themeCssVariables.background.transparent.medium : 'transparent'};color: ${themeCssVariables.font.color.secondary};transition: background 0.1s ease;diff --git a/packages/twenty-ui/src/navigation/menu/menu-item/internals/components/StyledMenuItemBase.tsx b/packages/twenty-ui/src/navigation/menu/menu-item/internals/components/StyledMenuItemBase.tsxindex b291c45ee3e..8e432e3488a 100644--- a/packages/twenty-ui/src/navigation/menu/menu-item/internals/components/StyledMenuItemBase.tsx+++ b/packages/twenty-ui/src/navigation/menu/menu-item/internals/components/StyledMenuItemBase.tsx@@ -39,7 +39,7 @@ export const StyledMenuItemBase = styled.div<MenuItemBaseProps>`background: ${({ isKeySelected, focused }) =>isKeySelected || focused? themeCssVariables.background.transparent.light- : ''};+ : 'transparent'};transition: ${({ isHoverBackgroundDisabled, disabled }) =>disabled || isHoverBackgroundDisabled ? 'none' : 'background 0.1s ease'};@@ -60,8 +60,17 @@ export const StyledMenuItemBase = styled.div<MenuItemBaseProps>`}};&:hover {- background: ${({ accent, disabled, isHoverBackgroundDisabled }) => {- if (disabled === true) return '';+ background: ${({+ accent,+ disabled,+ isHoverBackgroundDisabled,+ isKeySelected,+ focused,+ }) => {+ if (disabled === true)+ return isKeySelected || focused+ ? themeCssVariables.background.transparent.light+ : 'transparent';if (accent === 'danger')return themeCssVariables.background.transparent.danger;if (isHoverBackgroundDisabled === true) return 'transparent';diff --git a/packages/twenty-website/next.config.js b/packages/twenty-website/next.config.jsindex 8ff063c0f28..d5436e3abd5 100644--- a/packages/twenty-website/next.config.js+++ b/packages/twenty-website/next.config.js@@ -1,4 +1,5 @@/** @type {import('next').NextConfig} */+const withLinaria = require('next-with-linaria');const nextConfig = {images: {@@ -72,4 +73,4 @@ const nextConfig = {},};-module.exports = nextConfig;+module.exports = withLinaria(nextConfig);diff --git a/packages/twenty-website/src/app/(public)/layout.tsx b/packages/twenty-website/src/app/(public)/layout.tsxindex 77a432df29f..475fb2acb94 100644--- a/packages/twenty-website/src/app/(public)/layout.tsx+++ b/packages/twenty-website/src/app/(public)/layout.tsx@@ -5,7 +5,6 @@ import { Gabarito, Inter } from 'next/font/google';import { AppHeader } from '@/app/_components/ui/layout/header';import { FooterDesktop } from '../_components/ui/layout/FooterDesktop';-import EmotionRootStyleRegistry from '../emotion-root-style-registry';import './layout.css';@@ -42,11 +41,9 @@ export default function RootLayout({<html lang="en" className={`${gabarito.variable} ${inter.variable}`}><body><PublicEnvScript />- <EmotionRootStyleRegistry>- <AppHeader />- <div className="container">{children}</div>- <FooterDesktop />- </EmotionRootStyleRegistry>+ <AppHeader />+ <div className="container">{children}</div>+ <FooterDesktop /></body></html>);diff --git a/packages/twenty-website/src/app/_components/contributors/ActivityLog.tsx b/packages/twenty-website/src/app/_components/contributors/ActivityLog.tsxindex 764f945d23c..4eed880cf54 100644--- a/packages/twenty-website/src/app/_components/contributors/ActivityLog.tsx+++ b/packages/twenty-website/src/app/_components/contributors/ActivityLog.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { TimeRange } from '@nivo/calendar';import { getActivityEndDate } from '@/app/(public)/contributors/utils/get-activity-end-date';diff --git a/packages/twenty-website/src/app/_components/contributors/AnimatedFigures.tsx b/packages/twenty-website/src/app/_components/contributors/AnimatedFigures.tsxindex 91e962b2222..0b5ccbab353 100644--- a/packages/twenty-website/src/app/_components/contributors/AnimatedFigures.tsx+++ b/packages/twenty-website/src/app/_components/contributors/AnimatedFigures.tsx@@ -1,5 +1,5 @@import { useEffect, useRef } from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {animate,motion,diff --git a/packages/twenty-website/src/app/_components/contributors/AvatarGrid.tsx b/packages/twenty-website/src/app/_components/contributors/AvatarGrid.tsxindex f50b1a6aa3a..679a2aabeea 100644--- a/packages/twenty-website/src/app/_components/contributors/AvatarGrid.tsx+++ b/packages/twenty-website/src/app/_components/contributors/AvatarGrid.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import Link from 'next/link';import MotionContainer from '@/app/_components/ui/layout/LoaderAnimation';diff --git a/packages/twenty-website/src/app/_components/contributors/CardContainer.tsx b/packages/twenty-website/src/app/_components/contributors/CardContainer.tsxindex 87b00e940bf..02cfa4c2459 100644--- a/packages/twenty-website/src/app/_components/contributors/CardContainer.tsx+++ b/packages/twenty-website/src/app/_components/contributors/CardContainer.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';export const CardContainer = styled.div`border: 3px solid #141414;diff --git a/packages/twenty-website/src/app/_components/contributors/ContentContainer.tsx b/packages/twenty-website/src/app/_components/contributors/ContentContainer.tsxindex 27b27f33c7c..7857db23e36 100644--- a/packages/twenty-website/src/app/_components/contributors/ContentContainer.tsx+++ b/packages/twenty-website/src/app/_components/contributors/ContentContainer.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import MotionContainer from '@/app/_components/ui/layout/LoaderAnimation';diff --git a/packages/twenty-website/src/app/_components/contributors/Header.tsx b/packages/twenty-website/src/app/_components/contributors/Header.tsxindex fee05146765..21941b80958 100644--- a/packages/twenty-website/src/app/_components/contributors/Header.tsx+++ b/packages/twenty-website/src/app/_components/contributors/Header.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { motion } from 'framer-motion';const Title = styled.h2`diff --git a/packages/twenty-website/src/app/_components/contributors/ProfileCard.tsx b/packages/twenty-website/src/app/_components/contributors/ProfileCard.tsxindex 0df5a06ca1f..aea911c1b23 100644--- a/packages/twenty-website/src/app/_components/contributors/ProfileCard.tsx+++ b/packages/twenty-website/src/app/_components/contributors/ProfileCard.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { format } from 'date-fns';import { GithubIcon } from '@/app/_components/ui/icons/SvgIcons';diff --git a/packages/twenty-website/src/app/_components/contributors/ProfileInfo.tsx b/packages/twenty-website/src/app/_components/contributors/ProfileInfo.tsxindex 731959cdf2e..48a116639f2 100644--- a/packages/twenty-website/src/app/_components/contributors/ProfileInfo.tsx+++ b/packages/twenty-website/src/app/_components/contributors/ProfileInfo.tsx@@ -1,7 +1,7 @@'use client';import React from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { AnimatedFigures } from '@/app/_components/contributors/AnimatedFigures';import { CardContainer } from '@/app/_components/contributors/CardContainer';diff --git a/packages/twenty-website/src/app/_components/contributors/ProfileSharing.tsx b/packages/twenty-website/src/app/_components/contributors/ProfileSharing.tsxindex fcca7a37197..a06c4b5ab4d 100644--- a/packages/twenty-website/src/app/_components/contributors/ProfileSharing.tsx+++ b/packages/twenty-website/src/app/_components/contributors/ProfileSharing.tsx@@ -1,7 +1,7 @@'use client';import { useState } from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { IconDownload } from '@tabler/icons-react';import { CardContainer } from '@/app/_components/contributors/CardContainer';diff --git a/packages/twenty-website/src/app/_components/contributors/PullRequestItem.tsx b/packages/twenty-website/src/app/_components/contributors/PullRequestItem.tsxindex a559180d0a8..6ae3cb2674e 100644--- a/packages/twenty-website/src/app/_components/contributors/PullRequestItem.tsx+++ b/packages/twenty-website/src/app/_components/contributors/PullRequestItem.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { format } from 'date-fns';import { Tooltip } from 'react-tooltip';diff --git a/packages/twenty-website/src/app/_components/contributors/PullRequests.tsx b/packages/twenty-website/src/app/_components/contributors/PullRequests.tsxindex c8367fc0b4f..bd276fdfc3e 100644--- a/packages/twenty-website/src/app/_components/contributors/PullRequests.tsx+++ b/packages/twenty-website/src/app/_components/contributors/PullRequests.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { CardContainer } from '@/app/_components/contributors/CardContainer';import { PullRequestItem } from '@/app/_components/contributors/PullRequestItem';diff --git a/packages/twenty-website/src/app/_components/contributors/Spinner.tsx b/packages/twenty-website/src/app/_components/contributors/Spinner.tsxindex cec0a6763b1..c659867478d 100644--- a/packages/twenty-website/src/app/_components/contributors/Spinner.tsx+++ b/packages/twenty-website/src/app/_components/contributors/Spinner.tsx@@ -1,15 +1,5 @@import React from 'react';-import { keyframes } from '@emotion/react';-import styled from '@emotion/styled';--const spin = keyframes`- from {- transform: rotate(0deg);- }- to {- transform: rotate(360deg);- }-`;+import { styled } from '@linaria/react';const SpinnerWrapper = styled.div`width: 24px;@@ -17,7 +7,16 @@ const SpinnerWrapper = styled.div`border: 4px solid rgba(0, 0, 0, 0.1);border-top: 4px solid black;border-radius: 50%;- animation: ${spin} 1s linear infinite;+ animation: spin 1s linear infinite;++ @keyframes spin {+ from {+ transform: rotate(0deg);+ }+ to {+ transform: rotate(360deg);+ }+ }`;const Spinner = () => <SpinnerWrapper />;diff --git a/packages/twenty-website/src/app/_components/contributors/ThankYou.tsx b/packages/twenty-website/src/app/_components/contributors/ThankYou.tsxindex 141ba036c5c..987f8d5ca8b 100644--- a/packages/twenty-website/src/app/_components/contributors/ThankYou.tsx+++ b/packages/twenty-website/src/app/_components/contributors/ThankYou.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { CardContainer } from '@/app/_components/contributors/CardContainer';import { HeartIcon } from '@/app/_components/ui/icons/SvgIcons';diff --git a/packages/twenty-website/src/app/_components/contributors/Title.tsx b/packages/twenty-website/src/app/_components/contributors/Title.tsxindex 8e15d06546a..bf4b5223aaf 100644--- a/packages/twenty-website/src/app/_components/contributors/Title.tsx+++ b/packages/twenty-website/src/app/_components/contributors/Title.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';export const Title = styled.h3`margin: 0;diff --git a/packages/twenty-website/src/app/_components/oss-friends/Background.tsx b/packages/twenty-website/src/app/_components/oss-friends/Background.tsxindex 88ec71610d3..1fa61b405f8 100644--- a/packages/twenty-website/src/app/_components/oss-friends/Background.tsx+++ b/packages/twenty-website/src/app/_components/oss-friends/Background.tsx@@ -1,6 +1,6 @@'use client';import React from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const BACKGROUND_ROTATION = -5;diff --git a/packages/twenty-website/src/app/_components/oss-friends/Card.tsx b/packages/twenty-website/src/app/_components/oss-friends/Card.tsxindex 599d3d93ff5..097cf36cc6f 100644--- a/packages/twenty-website/src/app/_components/oss-friends/Card.tsx+++ b/packages/twenty-website/src/app/_components/oss-friends/Card.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Gabarito } from 'next/font/google';import { Theme } from '@/app/_components/ui/theme/theme';diff --git a/packages/twenty-website/src/app/_components/oss-friends/CardContainer.tsx b/packages/twenty-website/src/app/_components/oss-friends/CardContainer.tsxindex 71ed1ded497..d8e2f0ef463 100644--- a/packages/twenty-website/src/app/_components/oss-friends/CardContainer.tsx+++ b/packages/twenty-website/src/app/_components/oss-friends/CardContainer.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const Container = styled.div`display: flex;diff --git a/packages/twenty-website/src/app/_components/oss-friends/ContentContainer.tsx b/packages/twenty-website/src/app/_components/oss-friends/ContentContainer.tsxindex 075b4fd1dbe..48c7eaa643d 100644--- a/packages/twenty-website/src/app/_components/oss-friends/ContentContainer.tsx+++ b/packages/twenty-website/src/app/_components/oss-friends/ContentContainer.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const Container = styled.div`display: flex;diff --git a/packages/twenty-website/src/app/_components/oss-friends/Header.tsx b/packages/twenty-website/src/app/_components/oss-friends/Header.tsxindex 32260eac4b8..fcdf9972a7d 100644--- a/packages/twenty-website/src/app/_components/oss-friends/Header.tsx+++ b/packages/twenty-website/src/app/_components/oss-friends/Header.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { motion } from 'framer-motion';import { Theme } from '@/app/_components/ui/theme/theme';diff --git a/packages/twenty-website/src/app/_components/releases/Line.tsx b/packages/twenty-website/src/app/_components/releases/Line.tsxindex 3b9267c0b6e..b99a916ecc2 100644--- a/packages/twenty-website/src/app/_components/releases/Line.tsx+++ b/packages/twenty-website/src/app/_components/releases/Line.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledLineContainer = styled.div`width: 810px;diff --git a/packages/twenty-website/src/app/_components/releases/Release.tsx b/packages/twenty-website/src/app/_components/releases/Release.tsxindex 0c7e0b35fdb..d28a1a7be0f 100644--- a/packages/twenty-website/src/app/_components/releases/Release.tsx+++ b/packages/twenty-website/src/app/_components/releases/Release.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { Gabarito } from 'next/font/google';import { type JSXElementConstructor, type ReactElement } from 'react';diff --git a/packages/twenty-website/src/app/_components/releases/StyledTitle.tsx b/packages/twenty-website/src/app/_components/releases/StyledTitle.tsxindex 32a84c482ed..3f7348c627c 100644--- a/packages/twenty-website/src/app/_components/releases/StyledTitle.tsx+++ b/packages/twenty-website/src/app/_components/releases/StyledTitle.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { motion } from 'framer-motion';const StyledTitle = styled.div`diff --git a/packages/twenty-website/src/app/_components/ui/icons/SvgIcons.tsx b/packages/twenty-website/src/app/_components/ui/icons/SvgIcons.tsxindex e8498ebf040..99c6ee25869 100644--- a/packages/twenty-website/src/app/_components/ui/icons/SvgIcons.tsx+++ b/packages/twenty-website/src/app/_components/ui/icons/SvgIcons.tsx@@ -11,10 +11,18 @@ const getSize = (size: string) => {}};-export const GithubIcon = ({ size = 'S', color = 'rgb(179, 179, 179)' }) => {+export const GithubIcon = ({+ size = 'S',+ color = 'rgb(179, 179, 179)',+ className,+}: {+ size?: string;+ color?: string;+ className?: string;+}) => {const dimension = getSize(size);return (- <div style={{ width: dimension, height: dimension }}>+ <div className={className} style={{ width: dimension, height: dimension }}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><pathd="M 6.979 0 C 3.12 0 0 3.143 0 7.031 C 0 10.139 1.999 12.77 4.772 13.701 C 5.119 13.771 5.246 13.55 5.246 13.364 C 5.246 13.201 5.234 12.642 5.234 12.06 C 3.293 12.479 2.889 11.222 2.889 11.222 C 2.577 10.407 2.114 10.197 2.114 10.197 C 1.479 9.767 2.161 9.767 2.161 9.767 C 2.866 9.813 3.235 10.488 3.235 10.488 C 3.859 11.559 4.865 11.257 5.269 11.07 C 5.327 10.616 5.512 10.302 5.708 10.127 C 4.16 9.964 2.531 9.359 2.531 6.658 C 2.531 5.89 2.808 5.262 3.247 4.773 C 3.178 4.598 2.935 3.876 3.316 2.91 C 3.316 2.91 3.906 2.724 5.234 3.632 C 5.803 3.478 6.39 3.4 6.979 3.399 C 7.568 3.399 8.169 3.481 8.724 3.632 C 10.053 2.724 10.642 2.91 10.642 2.91 C 11.023 3.876 10.781 4.598 10.711 4.773 C 11.162 5.262 11.428 5.89 11.428 6.658 C 11.428 9.359 9.799 9.953 8.239 10.127 C 8.493 10.349 8.712 10.768 8.712 11.431 C 8.712 12.374 8.701 13.131 8.701 13.363 C 8.701 13.55 8.828 13.771 9.175 13.701 C 11.948 12.77 13.947 10.139 13.947 7.031 C 13.958 3.143 10.827 0 6.979 0 Z"@@ -118,10 +126,18 @@ export const GithubIcon2 = ({ size = 'S', color = 'rgb(179, 179, 179)' }) => {);};-export const PullRequestIcon = ({ size = 'S', color = 'rgb(179,179,179)' }) => {+export const PullRequestIcon = ({+ size = 'S',+ color = 'rgb(179,179,179)',+ className,+}: {+ size?: string;+ color?: string;+ className?: string;+}) => {const dimension = getSize(size);return (- <div style={{ width: dimension, height: dimension }}>+ <div className={className} style={{ width: dimension, height: dimension }}><svg viewBox="0 0 18 19" xmlns="http://www.w3.org/2000/svg"><pathd="M3 14C3.53043 14 4.03914 14.2107 4.41421 14.5858C4.78929 14.9609 5 15.4696 5 16C5 16.5304 4.78929 17.0391 4.41421 17.4142C4.03914 17.7893 3.53043 18 3 18C2.46957 18 1.96086 17.7893 1.58579 17.4142C1.21071 17.0391 1 16.5304 1 16C1 15.4696 1.21071 14.9609 1.58579 14.5858C1.96086 14.2107 2.46957 14 3 14ZM3 14V6M3 6C2.46957 6 1.96086 5.78929 1.58579 5.41421C1.21071 5.03914 1 4.53043 1 4C1 3.46957 1.21071 2.96086 1.58579 2.58579C1.96086 2.21071 2.46957 2 3 2C3.53043 2 4.03914 2.21071 4.41421 2.58579C4.78929 2.96086 5 3.46957 5 4C5 4.53043 4.78929 5.03914 4.41421 5.41421C4.03914 5.78929 3.53043 6 3 6ZM15 14C15.5304 14 16.0391 14.2107 16.4142 14.5858C16.7893 14.9609 17 15.4696 17 16C17 16.5304 16.7893 17.0391 16.4142 17.4142C16.0391 17.7893 15.5304 18 15 18C14.4696 18 13.9609 17.7893 13.5858 17.4142C13.2107 17.0391 13 16.5304 13 16C13 15.4696 13.2107 14.9609 13.5858 14.5858C13.9609 14.2107 14.4696 14 15 14ZM15 14V6C15 5.46957 14.7893 4.96086 14.4142 4.58579C14.0391 4.21071 13.5304 4 13 4H8M8 4L11 7M8 4L11 1"@@ -136,10 +152,19 @@ export const PullRequestIcon = ({ size = 'S', color = 'rgb(179,179,179)' }) => {);};-export const HeartIcon = ({ size = 'S', color = 'rgb(179,179,179)' }) => {+export const HeartIcon = ({+ size = 'S',+ color = 'rgb(179,179,179)',+ className,+}: {+ size?: string;+ color?: string;+ className?: string;+}) => {const dimension = getSize(size);return (<span+ className={className}style={{ width: dimension, height: dimension, display: 'inline-block' }}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 20" fill="none">diff --git a/packages/twenty-website/src/app/_components/ui/layout/Breadcrumbs.tsx b/packages/twenty-website/src/app/_components/ui/layout/Breadcrumbs.tsxindex 4f36d886fec..121e9e07f47 100644--- a/packages/twenty-website/src/app/_components/ui/layout/Breadcrumbs.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/Breadcrumbs.tsx@@ -1,19 +1,19 @@'use client';import React from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { IconChevronLeft } from '@tabler/icons-react';import Link from 'next/link';-import mq from '@/app/_components/ui/theme/mq';import { Theme } from '@/app/_components/ui/theme/theme';const Container = styled.div`- ${mq({- display: ['none', 'flex', 'flex'],- gap: `${Theme.spacing(2)}`,- color: '#b3b3b3',- })};+ display: none;+ gap: ${Theme.spacing(2)};+ color: #b3b3b3;+ @media (min-width: 810px) {+ display: flex;+ }`;const InternalLinkItem = styled(Link)`@@ -47,14 +47,15 @@ const StyledSection = styled.div``;const StyledMobileContainer = styled.div`- ${mq({- display: ['flex', 'none', 'none'],- flexDirection: 'row',- alignItems: 'center',- gap: `${Theme.spacing(1)}`,- color: `${Theme.text.color.quarternary}`,- fontSize: `${Theme.font.size.sm}`,- })};+ display: flex;+ flex-direction: row;+ align-items: center;+ gap: ${Theme.spacing(1)};+ color: ${Theme.text.color.quarternary};+ font-size: ${Theme.font.size.sm};+ @media (min-width: 810px) {+ display: none;+ }`;interface BreadcrumbsProps {diff --git a/packages/twenty-website/src/app/_components/ui/layout/ContentContainer.tsx b/packages/twenty-website/src/app/_components/ui/layout/ContentContainer.tsxindex 556401a285c..10d9e8a95c6 100644--- a/packages/twenty-website/src/app/_components/ui/layout/ContentContainer.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/ContentContainer.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const Container = styled.div`display: flex;diff --git a/packages/twenty-website/src/app/_components/ui/layout/FooterDesktop.tsx b/packages/twenty-website/src/app/_components/ui/layout/FooterDesktop.tsxindex 0a7c00551d2..3fa33c47158 100644--- a/packages/twenty-website/src/app/_components/ui/layout/FooterDesktop.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/FooterDesktop.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import {DiscordIcon,diff --git a/packages/twenty-website/src/app/_components/ui/layout/LoaderAnimation.tsx b/packages/twenty-website/src/app/_components/ui/layout/LoaderAnimation.tsxindex b7e096716a8..f178d3d1a24 100644--- a/packages/twenty-website/src/app/_components/ui/layout/LoaderAnimation.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/LoaderAnimation.tsx@@ -1,5 +1,5 @@import React from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { motion } from 'framer-motion';const StyledMotionDiv = styled(motion.div)`diff --git a/packages/twenty-website/src/app/_components/ui/layout/Logo.tsx b/packages/twenty-website/src/app/_components/ui/layout/Logo.tsxindex 30a81ed46da..5f273682a76 100644--- a/packages/twenty-website/src/app/_components/ui/layout/Logo.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/Logo.tsx@@ -1,4 +1,4 @@-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const Link = styled.a`display: block;diff --git a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleContent.tsx b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleContent.tsxindex 034e0f9b04d..e8b03d1d3a3 100644--- a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleContent.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleContent.tsx@@ -1,6 +1,6 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { type ReactNode } from 'react';import { Theme } from '@/app/_components/ui/theme/theme';diff --git a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleEditContent.tsx b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleEditContent.tsxindex 368f094d795..9abbac9a7f7 100644--- a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleEditContent.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleEditContent.tsx@@ -1,5 +1,5 @@'use client';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { usePathname } from 'next/navigation';import { StyledButton } from '@/app/_components/ui/layout/header/styled';diff --git a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticlePropsTable.tsx b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticlePropsTable.tsxindex 8e96b2cc425..6966968ff5f 100644--- a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticlePropsTable.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticlePropsTable.tsx@@ -1,6 +1,6 @@'use client';import React from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import PropTypes from 'prop-types';const StyledTableContainer = styled.div`diff --git a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleTable.tsx b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleTable.tsxindex bbab110b8f3..98ea460a513 100644--- a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleTable.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleTable.tsx@@ -1,6 +1,6 @@'use client';import React from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import PropTypes from 'prop-types';const StyledTableContainer = styled.div`diff --git a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleTabs.tsx b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleTabs.tsxindex 21a606cf2a4..9e8cc10dcf8 100644--- a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleTabs.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleTabs.tsx@@ -1,6 +1,6 @@'use client';import React, { useState } from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleWarning.tsx b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleWarning.tsxindex dce8b60a070..3672af8dcd1 100644--- a/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleWarning.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/articles/ArticleWarning.tsx@@ -1,6 +1,6 @@'use client';import { type ReactNode } from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { IconAlertCircle } from '@tabler/icons-react';const StyledContainer = styled.div`diff --git a/packages/twenty-website/src/app/_components/ui/layout/articles/SandpackEditor.tsx b/packages/twenty-website/src/app/_components/ui/layout/articles/SandpackEditor.tsxindex 90b212c0fea..9c68b2dbb75 100644--- a/packages/twenty-website/src/app/_components/ui/layout/articles/SandpackEditor.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/articles/SandpackEditor.tsx@@ -4,7 +4,7 @@ import {SandpackLayout,SandpackProvider,} from '@codesandbox/sandpack-react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';const Sandpack = styled.div`max-width: 600px;diff --git a/packages/twenty-website/src/app/_components/ui/layout/header/HeaderDesktop.tsx b/packages/twenty-website/src/app/_components/ui/layout/header/HeaderDesktop.tsxindex 2a542a19cc4..dbd447b5853 100644--- a/packages/twenty-website/src/app/_components/ui/layout/header/HeaderDesktop.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/header/HeaderDesktop.tsx@@ -1,7 +1,7 @@'use client';import React, { useEffect, useRef, useState } from 'react';-import styled from '@emotion/styled';+import { styled } from '@linaria/react';import { IconBook, IconChevronDown, IconRobotFace } from '@tabler/icons-react';import { ExternalArrow, GithubIcon } from '@/app/_components/ui/icons/SvgIcons';diff --git a/packages/twenty-website/src/app/_components/ui/layout/header/styled.ts b/packages/twenty-website/src/app/_components/ui/layout/header/styled.tsindex 11cc6ed6aa9..89453b8b150 100644--- a/packages/twenty-website/src/app/_components/ui/layout/header/styled.ts+++ b/packages/twenty-website/src/app/_components/ui/layout/header/styled.ts@@ -1,16 +1,6 @@'use client';-import styled from '@emotion/styled';-import { Gabarito } from 'next/font/google';--import mq from '@/app/_components/ui/theme/mq';--const gabarito = Gabarito({- weight: ['400', '500'],- subsets: ['latin'],- display: 'swap',- adjustFontFallback: false,-});+import { styled } from '@linaria/react';export const DesktopNav = styled.nav`display: flex;@@ -26,7 +16,7 @@ export const DesktopNav = styled.nav`z-index: 4;transform-origin: 50% 50% 0px;border-bottom: 1px solid rgba(20, 20, 20, 0.08);- font-family: ${gabarito.style.fontFamily};+ font-family: var(--font-gabarito);@media (max-width: 809px) {display: none;@@ -54,9 +44,10 @@ export const LinkList = styled.div`display: flex;flex-direction: row;gap: 2px;- ${mq({- marginRight: ['auto', 'auto', '0'],- })}+ margin-right: auto;+ @media (min-width: 1200px) {+ margin-right: 0;+ }`;export const MobileLinkList = styled.div`@@ -85,9 +76,10 @@ export const LogoContainer = styled.div`display: flex;align-items: center;gap: 8px;- ${mq({- width: ['auto', 'auto', '202px'],- })}+ width: auto;+ @media (min-width: 1200px) {+ width: 202px;+ }`;export const LogoAddon = styled.div`diff --git a/packages/twenty-website/src/app/emotion-root-style-registry.tsx b/packages/twenty-website/src/app/emotion-root-style-registry.tsxdeleted file mode 100644index 44eab80b900..00000000000--- a/packages/twenty-website/src/app/emotion-root-style-registry.tsx+++ /dev/null@@ -1,51 +0,0 @@-'use client';--import { useState } from 'react';-import createCache from '@emotion/cache';-import { CacheProvider } from '@emotion/react';-import { useServerInsertedHTML } from 'next/navigation';--export default function RootStyleRegistry({- children,-}: {- children: React.ReactNode;-}) {- const [{ cache, flush }] = useState(() => {- const cache = createCache({ key: 'emotion-cache' });- cache.compat = true;- const prevInsert = cache.insert;- let inserted: Array<string> = [];- cache.insert = (...args) => {- const serialized = args[1];- if (cache.inserted[serialized.name] === undefined) {- inserted.push(serialized.name);- }- return prevInsert(...args);- };- const flush = () => {- const prevInserted = inserted;- inserted = [];- return prevInserted;- };- return { cache, flush };- });-- useServerInsertedHTML(() => {- const names = flush();- if (names.length === 0) return null;- let styles = '';- for (const name of names) {- styles += cache.inserted[name];- }- return (- <style- data-emotion={`${cache.key} ${names.join(' ')}`}- dangerouslySetInnerHTML={{- __html: styles,- }}- />- );- });-- return <CacheProvider value={cache}>{children}</CacheProvider>;-}diff --git a/packages/twenty-website/tsconfig.json b/packages/twenty-website/tsconfig.jsonindex f9d72fad435..9194388bf5f 100644--- a/packages/twenty-website/tsconfig.json+++ b/packages/twenty-website/tsconfig.json@@ -22,8 +22,6 @@"@/*": ["./src/*"]}},- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts",- "src/app/emotion-root-style-registry"- ],+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],"exclude": ["node_modules"]}diff --git a/yarn.lock b/yarn.lockindex d7fb575f4eb..fa54c03f4b5 100644--- a/yarn.lock+++ b/yarn.lock@@ -4214,7 +4214,7 @@ __metadata:languageName: nodelinkType: hard-"@emotion/babel-plugin@npm:^11.12.0, @emotion/babel-plugin@npm:^11.13.5":+"@emotion/babel-plugin@npm:^11.13.5":version: 11.13.5resolution: "@emotion/babel-plugin@npm:11.13.5"dependencies:@@ -4233,7 +4233,7 @@ __metadata:languageName: nodelinkType: hard-"@emotion/cache@npm:^11.13.0, @emotion/cache@npm:^11.13.5, @emotion/cache@npm:^11.14.0":+"@emotion/cache@npm:^11.13.5, @emotion/cache@npm:^11.14.0":version: 11.14.0resolution: "@emotion/cache@npm:11.14.0"dependencies:@@ -4314,27 +4314,6 @@ __metadata:languageName: nodelinkType: hard-"@emotion/react@npm:^11.11.1":- version: 11.13.0- resolution: "@emotion/react@npm:11.13.0"- dependencies:- "@babel/runtime": "npm:^7.18.3"- "@emotion/babel-plugin": "npm:^11.12.0"- "@emotion/cache": "npm:^11.13.0"- "@emotion/serialize": "npm:^1.3.0"- "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.1.0"- "@emotion/utils": "npm:^1.4.0"- "@emotion/weak-memoize": "npm:^0.4.0"- hoist-non-react-statics: "npm:^3.3.1"- peerDependencies:- react: ">=16.8.0"- peerDependenciesMeta:- "@types/react":- optional: true- checksum: 10c0/28ee0ba6818ccf2726b31da0ecf3a6ac091983c8e03b3f5d6d2eb02165e3b3d1b95c267fccd08bff2f9769e0ff7361d791810583b858a9dd788de7cf82f6667d- languageName: node- linkType: hard-"@emotion/react@npm:^11.14.0":version: 11.14.0resolution: "@emotion/react@npm:11.14.0"@@ -4356,7 +4335,7 @@ __metadata:languageName: nodelinkType: hard-"@emotion/serialize@npm:^1.3.0, @emotion/serialize@npm:^1.3.3":+"@emotion/serialize@npm:^1.3.3":version: 1.3.3resolution: "@emotion/serialize@npm:1.3.3"dependencies:@@ -4376,23 +4355,23 @@ __metadata:languageName: nodelinkType: hard-"@emotion/styled@npm:^11.11.0":- version: 11.13.0- resolution: "@emotion/styled@npm:11.13.0"+"@emotion/styled@npm:^11.14.0":+ version: 11.14.1+ resolution: "@emotion/styled@npm:11.14.1"dependencies:"@babel/runtime": "npm:^7.18.3"- "@emotion/babel-plugin": "npm:^11.12.0"+ "@emotion/babel-plugin": "npm:^11.13.5""@emotion/is-prop-valid": "npm:^1.3.0"- "@emotion/serialize": "npm:^1.3.0"- "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.1.0"- "@emotion/utils": "npm:^1.4.0"+ "@emotion/serialize": "npm:^1.3.3"+ "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.2.0"+ "@emotion/utils": "npm:^1.4.2"peerDependencies:"@emotion/react": ^11.0.0-rc.0react: ">=16.8.0"peerDependenciesMeta:"@types/react":optional: true- checksum: 10c0/5e2cc85c8a2f6e7bd012731cf0b6da3aef5906225e87e8d4a5c19da50572e24d9aaf92615aa36aa863f0fe6b62a121033356e1cad62617c48bfdaa2c3cf0d8a4+ checksum: 10c0/2bbf8451df49c967e41fbcf8111a7f6dafe6757f0cc113f2f6e287206c45ac1d54dc8a95a483b7c0cee8614b8a8d08155bded6453d6721de1f8cc8d5b9216963languageName: nodelinkType: hard@@ -4410,15 +4389,6 @@ __metadata:languageName: nodelinkType: hard-"@emotion/use-insertion-effect-with-fallbacks@npm:^1.1.0":- version: 1.1.0- resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.1.0"- peerDependencies:- react: ">=16.8.0"- checksum: 10c0/a883480f3a7139fb4a43e71d3114ca57e2b7ae5ff204e05cd9e59251a113773b8f64eb75d3997726250aca85eb73447638c8f51930734bdd16b96762b65e58c3- languageName: node- linkType: hard-"@emotion/use-insertion-effect-with-fallbacks@npm:^1.2.0":version: 1.2.0resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.2.0"@@ -4428,7 +4398,7 @@ __metadata:languageName: nodelinkType: hard-"@emotion/utils@npm:^1.4.0, @emotion/utils@npm:^1.4.2":+"@emotion/utils@npm:^1.4.2":version: 1.4.2resolution: "@emotion/utils@npm:1.4.2"checksum: 10c0/7d0010bf60a2a8c1a033b6431469de4c80e47aeb8fd856a17c1d1f76bbc3a03161a34aeaa78803566e29681ca551e7bf9994b68e9c5f5c796159923e44f78d9a@@ -24376,6 +24346,15 @@ __metadata:languageName: nodelinkType: hard+"@types/node@npm:>=20.0.0":+ version: 25.3.3+ resolution: "@types/node@npm:25.3.3"+ dependencies:+ undici-types: "npm:~7.18.0"+ checksum: 10c0/63e1d3816a9f4a706ab5d588d18cb98aa824b97748ff585537d327528e9438f58f69f45c7762e7cd3a1ab32c1619f551aabe8075d13172f9273cf10f6d83ab91+ languageName: node+ linkType: hard+"@types/node@npm:^10.1.0":version: 10.17.60resolution: "@types/node@npm:10.17.60"@@ -25013,6 +24992,13 @@ __metadata:languageName: nodelinkType: hard+"@types/whatwg-mimetype@npm:^3.0.2":+ version: 3.0.2+ resolution: "@types/whatwg-mimetype@npm:3.0.2"+ checksum: 10c0/dad39d1e4abe760a0a963c84bbdbd26b1df0eb68aff83bdf6ecbb50ad781ead777f6906d19a87007790b750f7500a12e5624d31fc6a1529d14bd19b5c3a316d1+ languageName: node+ linkType: hard+"@types/wrap-ansi@npm:^3.0.0":version: 3.0.0resolution: "@types/wrap-ansi@npm:3.0.0"@@ -25038,6 +25024,15 @@ __metadata:languageName: nodelinkType: hard+"@types/ws@npm:^8.18.1":+ version: 8.18.1+ resolution: "@types/ws@npm:8.18.1"+ dependencies:+ "@types/node": "npm:*"+ checksum: 10c0/61aff1129143fcc4312f083bc9e9e168aa3026b7dd6e70796276dcfb2c8211c4292603f9c4864fae702f2ed86e4abd4d38aa421831c2fd7f856c931a481afbab+ languageName: node+ linkType: hard+"@types/xml-encryption@npm:^1.2.4":version: 1.2.4resolution: "@types/xml-encryption@npm:1.2.4"@@ -26705,6 +26700,16 @@ __metadata:languageName: nodelinkType: hard+"@wyw-in-js/babel-preset@npm:^1.0.6":+ version: 1.0.6+ resolution: "@wyw-in-js/babel-preset@npm:1.0.6"+ dependencies:+ "@babel/core": "npm:^7.23.5"+ "@wyw-in-js/transform": "npm:1.0.6"+ checksum: 10c0/a759357e5c8b920e56ad345c66e2b01573f5484756b6ce288d33ac812449fe72089de09fcab33e34aab6adfce8a700e2116308ecc21099250a56ff53f7605093+ languageName: node+ linkType: hard+"@wyw-in-js/processor-utils@npm:0.7.0":version: 0.7.0resolution: "@wyw-in-js/processor-utils@npm:0.7.0"@@ -26715,6 +26720,16 @@ __metadata:languageName: nodelinkType: hard+"@wyw-in-js/processor-utils@npm:1.0.4":+ version: 1.0.4+ resolution: "@wyw-in-js/processor-utils@npm:1.0.4"+ dependencies:+ "@babel/generator": "npm:^7.23.5"+ "@wyw-in-js/shared": "npm:1.0.4"+ checksum: 10c0/b4847df9dcc45fb969d275dda22c13b29a71f645f072fdbb97f0e552c275ee2811f3e0e0082bcef4be6aec35a9534bf4a7aec142c486f303e4b780f9882ef480+ languageName: node+ linkType: hard+"@wyw-in-js/processor-utils@npm:^0.5.3":version: 0.5.4resolution: "@wyw-in-js/processor-utils@npm:0.5.4"@@ -26747,6 +26762,17 @@ __metadata:languageName: nodelinkType: hard+"@wyw-in-js/shared@npm:1.0.4":+ version: 1.0.4+ resolution: "@wyw-in-js/shared@npm:1.0.4"+ dependencies:+ debug: "npm:^4.3.4"+ find-up: "npm:^5.0.0"+ minimatch: "npm:^9.0.3"+ checksum: 10c0/d8a253ba77de55c50e10df7c7fdb4ea2cc983e191c2ab71d8eb07a96ade9c03a84fb2468a1a7477e14b2ec3a223de92b94f78b2e66371e4a9adbbfebd89b258d+ languageName: node+ linkType: hard+"@wyw-in-js/transform@npm:0.7.0":version: 0.7.0resolution: "@wyw-in-js/transform@npm:0.7.0"@@ -26770,6 +26796,29 @@ __metadata:languageName: nodelinkType: hard+"@wyw-in-js/transform@npm:1.0.6":+ version: 1.0.6+ resolution: "@wyw-in-js/transform@npm:1.0.6"+ dependencies:+ "@babel/core": "npm:^7.23.5"+ "@babel/generator": "npm:^7.23.5"+ "@babel/helper-module-imports": "npm:^7.22.15"+ "@babel/plugin-transform-modules-commonjs": "npm:^7.23.3"+ "@babel/template": "npm:^7.22.15"+ "@babel/traverse": "npm:^7.23.5"+ "@babel/types": "npm:^7.23.5"+ "@wyw-in-js/processor-utils": "npm:1.0.4"+ "@wyw-in-js/shared": "npm:1.0.4"+ cosmiconfig: "npm:^8.0.0"+ happy-dom: "npm:^20.1.0"+ minimatch: "npm:^9.0.5"+ source-map: "npm:^0.7.4"+ stylis: "npm:^4.3.0"+ ts-invariant: "npm:^0.10.3"+ checksum: 10c0/6650e2cb67867fcc6a7543083f39de927b6af86f07e4b0c584ea5bc9aa941bc08f95d10e00fa5600cb90b73fa8c6410de0c9775c0b787f2f27efbddf3cb3961b+ languageName: node+ linkType: hard+"@wyw-in-js/transform@patch:@wyw-in-js/transform@npm%3A0.7.0#~/.yarn/patches/@wyw-in-js-transform-npm-0.7.0-ba641dc99f.patch":version: 0.7.0resolution: "@wyw-in-js/transform@patch:@wyw-in-js/transform@npm%3A0.7.0#~/.yarn/patches/@wyw-in-js-transform-npm-0.7.0-ba641dc99f.patch::version=0.7.0&hash=95ca78"@@ -34732,6 +34781,13 @@ __metadata:languageName: nodelinkType: hard+"entities@npm:^7.0.1":+ version: 7.0.1+ resolution: "entities@npm:7.0.1"+ checksum: 10c0/b4fb9937bb47ecb00aaaceb9db9cdd1cc0b0fb649c0e843d05cf5dbbd2e9d2df8f98721d8b1b286445689c72af7b54a7242fc2d63ef7c9739037a8c73363e7ca+ languageName: node+ linkType: hard+"env-paths@npm:^2.2.0, env-paths@npm:^2.2.1":version: 2.2.1resolution: "env-paths@npm:2.2.1"@@ -38955,6 +39011,20 @@ __metadata:languageName: nodelinkType: hard+"happy-dom@npm:^20.1.0":+ version: 20.8.3+ resolution: "happy-dom@npm:20.8.3"+ dependencies:+ "@types/node": "npm:>=20.0.0"+ "@types/whatwg-mimetype": "npm:^3.0.2"+ "@types/ws": "npm:^8.18.1"+ entities: "npm:^7.0.1"+ whatwg-mimetype: "npm:^3.0.0"+ ws: "npm:^8.18.3"+ checksum: 10c0/79a2b6d32e2f778b015511c9d2de7f7859954cbd27a30720736e60552a88e0345ffc8b2c5e77140c5f2f7fef95c563aea7ab0b2edba5d8c7edd5676b43ecef55+ languageName: node+ linkType: hard+"har-schema@npm:^2.0.0":version: 2.0.0resolution: "har-schema@npm:2.0.0"@@ -47194,6 +47264,17 @@ __metadata:languageName: nodelinkType: hard+"next-with-linaria@npm:^1.3.0":+ version: 1.3.0+ resolution: "next-with-linaria@npm:1.3.0"+ peerDependencies:+ "@babel/runtime": 7.x+ "@wyw-in-js/babel-preset": 0.x+ "@wyw-in-js/transform": 0.x+ checksum: 10c0/62eb163bb1d94a5d1a64e7c76991f2b2981a54bb198c1f98d8301c058d0ffb4cee7a319010c69c1e152b9826c8f98f9c1ce58ea37c8361afac80b08aadeb5acd+ languageName: node+ linkType: hard+"next@npm:16.0.10":version: 16.0.10resolution: "next@npm:16.0.10"@@ -57839,6 +57920,7 @@ __metadata:dependencies:"@chakra-ui/react": "npm:^3.33.0""@emotion/react": "npm:^11.14.0"+ "@emotion/styled": "npm:^11.14.0""@genql/cli": "npm:^3.0.3""@genql/runtime": "npm:^2.10.0""@mui/material": "npm:^7.3.8"@@ -58237,8 +58319,6 @@ __metadata:"@babel/preset-react": "npm:^7.14.5""@babel/preset-typescript": "npm:^7.24.6""@chromatic-com/storybook": "npm:^4.1.3"- "@emotion/react": "npm:^11.11.1"- "@emotion/styled": "npm:^11.11.0""@floating-ui/react": "npm:^0.24.3""@graphql-codegen/cli": "npm:^3.3.1""@graphql-codegen/client-preset": "npm:^4.1.0"@@ -58318,6 +58398,7 @@ __metadata:"@vitest/browser-playwright": "npm:^4.0.18""@vitest/coverage-istanbul": "npm:^4.0.18""@vitest/coverage-v8": "npm:^4.0.18"+ "@wyw-in-js/babel-preset": "npm:^1.0.6""@wyw-in-js/vite": "npm:^0.7.0""@yarnpkg/types": "npm:^4.0.0"archiver: "npm:^7.0.1"@@ -58379,6 +58460,7 @@ __metadata:microdiff: "npm:^1.3.2"msw: "npm:^2.12.7"msw-storybook-addon: "npm:^2.0.6"+ next-with-linaria: "npm:^1.3.0"nx: "npm:22.3.3"planer: "npm:^1.2.0"pluralize: "npm:^8.0.0"