Skip to content

The open alternative to Salesforce, designed for AI.

Migrate to twenty-ui - feedback/loader (#7997)

gitstart-app[bot]4ceee4ab8f59
diff --git a/packages/twenty-chrome-extension/src/options/Loading.tsx b/packages/twenty-chrome-extension/src/options/Loading.tsx
index 1fde24f2b9e..a0543c9c6da 100644
--- a/packages/twenty-chrome-extension/src/options/Loading.tsx
+++ b/packages/twenty-chrome-extension/src/options/Loading.tsx
@@ -1,6 +1,5 @@
-import styled from '@emotion/styled';
-
import { Loader } from '@/ui/display/loader/components/Loader';
+import styled from '@emotion/styled';
const StyledContainer = styled.div`
align-items: center;
diff --git a/packages/twenty-front/src/modules/activities/emails/components/EmailLoader.tsx b/packages/twenty-front/src/modules/activities/emails/components/EmailLoader.tsx
index f301828ff4e..444685852b7 100644
--- a/packages/twenty-front/src/modules/activities/emails/components/EmailLoader.tsx
+++ b/packages/twenty-front/src/modules/activities/emails/components/EmailLoader.tsx
@@ -1,9 +1,9 @@
-import { Loader } from '@/ui/feedback/loader/components/Loader';
import {
AnimatedPlaceholder,
AnimatedPlaceholderEmptyContainer,
AnimatedPlaceholderEmptyTextContainer,
AnimatedPlaceholderEmptyTitle,
+ Loader,
} from 'twenty-ui';
export const EmailLoader = ({ loadingText }: { loadingText?: string }) => (
diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx
index 38856d33d56..bed04b2e808 100644
--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx
+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx
@@ -9,7 +9,6 @@ import { SignInUpStep } from '@/auth/states/signInUpStepState';
import { isRequestingCaptchaTokenState } from '@/captcha/states/isRequestingCaptchaTokenState';
import { authProvidersState } from '@/client-config/states/authProvidersState';
import { captchaProviderState } from '@/client-config/states/captchaProviderState';
-import { Loader } from '@/ui/feedback/loader/components/Loader';
import { TextInput } from '@/ui/input/components/TextInput';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
@@ -23,6 +22,7 @@ import {
IconGoogle,
IconKey,
IconMicrosoft,
+ Loader,
MainButton,
} from 'twenty-ui';
import { isDefined } from '~/utils/isDefined';
diff --git a/packages/twenty-front/src/modules/ui/display/status/components/Status.tsx b/packages/twenty-front/src/modules/ui/display/status/components/Status.tsx
index 7c52e0eaaa2..9a1bdaf1650 100644
--- a/packages/twenty-front/src/modules/ui/display/status/components/Status.tsx
+++ b/packages/twenty-front/src/modules/ui/display/status/components/Status.tsx
@@ -1,7 +1,5 @@
import styled from '@emotion/styled';
-import { ThemeColor, themeColorSchema } from 'twenty-ui';
-
-import { Loader } from '@/ui/feedback/loader/components/Loader';
+import { Loader, ThemeColor, themeColorSchema } from 'twenty-ui';
const StyledStatus = styled.h3<{
color: ThemeColor;
diff --git a/packages/twenty-front/src/pages/auth/Invite.tsx b/packages/twenty-front/src/pages/auth/Invite.tsx
index 737faa34426..d83e857901e 100644
--- a/packages/twenty-front/src/pages/auth/Invite.tsx
+++ b/packages/twenty-front/src/pages/auth/Invite.tsx
@@ -5,13 +5,12 @@ import { SignInUpForm } from '@/auth/sign-in-up/components/SignInUpForm';
import { useSignInUpForm } from '@/auth/sign-in-up/hooks/useSignInUpForm';
import { useWorkspaceFromInviteHash } from '@/auth/sign-in-up/hooks/useWorkspaceFromInviteHash';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
-import { Loader } from '@/ui/feedback/loader/components/Loader';
import { useWorkspaceSwitching } from '@/ui/navigation/navigation-drawer/hooks/useWorkspaceSwitching';
import styled from '@emotion/styled';
import { useMemo } from 'react';
import { useSearchParams } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
-import { AnimatedEaseIn, MainButton } from 'twenty-ui';
+import { AnimatedEaseIn, Loader, MainButton } from 'twenty-ui';
import {
useAddUserToWorkspaceByInviteTokenMutation,
useAddUserToWorkspaceMutation,
diff --git a/packages/twenty-front/src/pages/onboarding/ChooseYourPlan.tsx b/packages/twenty-front/src/pages/onboarding/ChooseYourPlan.tsx
index 19f1521e145..d40907bad7f 100644
--- a/packages/twenty-front/src/pages/onboarding/ChooseYourPlan.tsx
+++ b/packages/twenty-front/src/pages/onboarding/ChooseYourPlan.tsx
@@ -5,7 +5,6 @@ import { SubscriptionBenefit } from '@/billing/components/SubscriptionBenefit';
import { SubscriptionCard } from '@/billing/components/SubscriptionCard';
import { billingState } from '@/client-config/states/billingState';
import { AppPath } from '@/types/AppPath';
-import { Loader } from '@/ui/feedback/loader/components/Loader';
import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar';
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
import { CardPicker } from '@/ui/input/components/CardPicker';
@@ -13,7 +12,7 @@ import styled from '@emotion/styled';
import { isNonEmptyString, isNumber } from '@sniptt/guards';
import { useState } from 'react';
import { useRecoilValue } from 'recoil';
-import { ActionLink, CAL_LINK, MainButton } from 'twenty-ui';
+import { ActionLink, CAL_LINK, Loader, MainButton } from 'twenty-ui';
import {
ProductPriceEntity,
SubscriptionInterval,
diff --git a/packages/twenty-front/src/pages/onboarding/CreateWorkspace.tsx b/packages/twenty-front/src/pages/onboarding/CreateWorkspace.tsx
index bb8f7d1d497..a0c861683f9 100644
--- a/packages/twenty-front/src/pages/onboarding/CreateWorkspace.tsx
+++ b/packages/twenty-front/src/pages/onboarding/CreateWorkspace.tsx
@@ -4,7 +4,7 @@ import { useCallback } from 'react';
import { Controller, SubmitHandler, useForm } from 'react-hook-form';
import { useSetRecoilState } from 'recoil';
import { Key } from 'ts-key-enum';
-import { H2Title, MainButton } from 'twenty-ui';
+import { H2Title, Loader, MainButton } from 'twenty-ui';
import { z } from 'zod';
import { SubTitle } from '@/auth/components/SubTitle';
@@ -14,7 +14,6 @@ import { FIND_MANY_OBJECT_METADATA_ITEMS } from '@/object-metadata/graphql/queri
import { useApolloMetadataClient } from '@/object-metadata/hooks/useApolloMetadataClient';
import { useOnboardingStatus } from '@/onboarding/hooks/useOnboardingStatus';
import { WorkspaceLogoUploader } from '@/settings/workspace/components/WorkspaceLogoUploader';
-import { Loader } from '@/ui/feedback/loader/components/Loader';
import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar';
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
import { TextInputV2 } from '@/ui/input/components/TextInputV2';
diff --git a/packages/twenty-ui/src/feedback/index.ts b/packages/twenty-ui/src/feedback/index.ts
index dd4bb77393d..cabe6fa4464 100644
--- a/packages/twenty-ui/src/feedback/index.ts
+++ b/packages/twenty-ui/src/feedback/index.ts
@@ -1,3 +1,4 @@
+export * from './loader/components/Loader';
export * from './progress-bar/components/CircularProgressBar';
export * from './progress-bar/components/ProgressBar';
export * from './progress-bar/hooks/useProgressAnimation';
diff --git a/packages/twenty-front/src/modules/ui/feedback/loader/components/Loader.tsx b/packages/twenty-ui/src/feedback/loader/components/Loader.tsx
similarity index 96%
rename from packages/twenty-front/src/modules/ui/feedback/loader/components/Loader.tsx
rename to packages/twenty-ui/src/feedback/loader/components/Loader.tsx
index 1df850e0c55..0ada8423f79 100644
--- a/packages/twenty-front/src/modules/ui/feedback/loader/components/Loader.tsx
+++ b/packages/twenty-ui/src/feedback/loader/components/Loader.tsx
@@ -1,6 +1,6 @@
import styled from '@emotion/styled';
+import { ThemeColor } from '@ui/theme';
import { motion } from 'framer-motion';
-import { ThemeColor } from 'twenty-ui';
const StyledLoaderContainer = styled.div<{
color?: ThemeColor;
diff --git a/packages/twenty-ui/src/index.ts b/packages/twenty-ui/src/index.ts
index 58024c5a0da..aa5fc4e6530 100644
--- a/packages/twenty-ui/src/index.ts
+++ b/packages/twenty-ui/src/index.ts
@@ -1,6 +1,7 @@
export * from './accessibility';
export * from './components';
export * from './display';
+export * from './feedback';
export * from './input';
export * from './feedback';
export * from './layout';