diff --git a/apps/storybook/components/Examples.tsx b/apps/storybook/components/Examples.tsx index 0245d57c38..2f2b2cb406 100644 --- a/apps/storybook/components/Examples.tsx +++ b/apps/storybook/components/Examples.tsx @@ -1,4 +1,4 @@ -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; interface ExampleProps { children: React.ReactNode; diff --git a/apps/storybook/components/VariantsTable.tsx b/apps/storybook/components/VariantsTable.tsx index 1120d4b8ba..0186eb8bf4 100644 --- a/apps/storybook/components/VariantsTable.tsx +++ b/apps/storybook/components/VariantsTable.tsx @@ -1,7 +1,7 @@ import type { ReactElement, ReactNode } from "react"; import React from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; export function VariantsTable({ children, diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx index 15c3472443..a59dfdbe3b 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx @@ -10,7 +10,6 @@ import React, { useEffect, useState, useMemo } from "react"; import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; import type { OrganizationBranding } from "@calcom/features/ee/organizations/context/provider"; import Shell from "@calcom/features/shell/Shell"; -import { classNames } from "@calcom/lib"; import { HOSTED_CAL_FEATURES, IS_CALCOM, WEBAPP_URL } from "@calcom/lib/constants"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl"; @@ -21,6 +20,7 @@ import { IdentityProvider, MembershipRole, UserPermissionRole } from "@calcom/pr import { trpc } from "@calcom/trpc/react"; import type { VerticalTabItemProps } from "@calcom/ui"; import { Badge, Button, ErrorBoundary, Icon, Skeleton, VerticalTabItem } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; const getTabs = (orgBranding: OrganizationBranding | null) => { const tabs: VerticalTabItemProps[] = [ diff --git a/apps/web/components/apps/AppPage.tsx b/apps/web/components/apps/AppPage.tsx index 495376ca1c..dc25b785fc 100644 --- a/apps/web/components/apps/AppPage.tsx +++ b/apps/web/components/apps/AppPage.tsx @@ -9,13 +9,13 @@ import { doesAppSupportTeamInstall, isConferencing } from "@calcom/app-store/uti import DisconnectIntegration from "@calcom/features/apps/components/DisconnectIntegration"; import { AppOnboardingSteps } from "@calcom/lib/apps/appOnboardingSteps"; import { getAppOnboardingUrl } from "@calcom/lib/apps/getAppOnboardingUrl"; -import classNames from "@calcom/lib/classNames"; import { APP_NAME, COMPANY_NAME, SUPPORT_MAIL_ADDRESS, WEBAPP_URL } from "@calcom/lib/constants"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import type { App as AppType } from "@calcom/types/App"; import { Badge, Button, Icon, SkeletonButton, SkeletonText, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { InstallAppButtonChild } from "./InstallAppButtonChild"; import { MultiDisconnectIntegration } from "./MultiDisconnectIntegration"; diff --git a/apps/web/components/apps/installation/AccountsStepCard.tsx b/apps/web/components/apps/installation/AccountsStepCard.tsx index 314d4e931c..bbcc4622a0 100644 --- a/apps/web/components/apps/installation/AccountsStepCard.tsx +++ b/apps/web/components/apps/installation/AccountsStepCard.tsx @@ -1,12 +1,12 @@ import type { FC } from "react"; import React, { useState } from "react"; -import { classNames } from "@calcom/lib"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { User } from "@calcom/prisma/client"; import { StepCard } from "@calcom/ui"; import { Avatar } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { TTeams } from "~/apps/installation/[[...step]]/step-view"; diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index 9b7a2c4e02..c696d71bb2 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -9,7 +9,6 @@ import dayjs from "@calcom/dayjs"; // TODO: Use browser locale, implement Intl in Dayjs maybe? import "@calcom/dayjs/locales"; import ViewRecordingsDialog from "@calcom/features/ee/video/ViewRecordingsDialog"; -import classNames from "@calcom/lib/classNames"; import { formatTime } from "@calcom/lib/date-fns"; import { getPaymentAppData } from "@calcom/lib/getPaymentAppData"; import { useCopy } from "@calcom/lib/hooks/useCopy"; @@ -46,6 +45,7 @@ import { TextAreaField, Tooltip, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import assignmentReasonBadgeTitleMap from "@lib/booking/assignmentReasonBadgeTitleMap"; diff --git a/apps/web/components/dialog/ReassignDialog.tsx b/apps/web/components/dialog/ReassignDialog.tsx index 0b005c873e..8de68ab3eb 100644 --- a/apps/web/components/dialog/ReassignDialog.tsx +++ b/apps/web/components/dialog/ReassignDialog.tsx @@ -5,7 +5,6 @@ import { useMemo, useState } from "react"; import { useForm } from "react-hook-form"; import { z } from "zod"; -import { classNames } from "@calcom/lib"; import { ErrorCode } from "@calcom/lib/errorCodes"; import { useDebounce } from "@calcom/lib/hooks/useDebounce"; import { useInViewObserver } from "@calcom/lib/hooks/useInViewObserver"; @@ -26,6 +25,7 @@ import { RadioGroup as RadioArea, TextAreaField, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; enum ReassignType { ROUND_ROBIN = "round_robin", diff --git a/apps/web/components/getting-started/steps-views/ConnectCalendars.tsx b/apps/web/components/getting-started/steps-views/ConnectCalendars.tsx index 9aef535376..88e95a6b74 100644 --- a/apps/web/components/getting-started/steps-views/ConnectCalendars.tsx +++ b/apps/web/components/getting-started/steps-views/ConnectCalendars.tsx @@ -1,7 +1,7 @@ -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Icon, List } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { AppConnectionItem } from "../components/AppConnectionItem"; import { ConnectedCalendarItem } from "../components/ConnectedCalendarItem"; diff --git a/apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx b/apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx index 4edace7be5..51caedda58 100644 --- a/apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx +++ b/apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx @@ -1,9 +1,9 @@ -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { userMetadata } from "@calcom/prisma/zod-utils"; import { trpc } from "@calcom/trpc/react"; import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery"; import { Icon, List } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { AppConnectionItem } from "../components/AppConnectionItem"; import { StepConnectionLoader } from "../components/StepConnectionLoader"; diff --git a/apps/web/components/settings/platform/oauth-clients/OAuthClientCard.tsx b/apps/web/components/settings/platform/oauth-clients/OAuthClientCard.tsx index a961cd053f..3ec156d9df 100644 --- a/apps/web/components/settings/platform/oauth-clients/OAuthClientCard.tsx +++ b/apps/web/components/settings/platform/oauth-clients/OAuthClientCard.tsx @@ -1,11 +1,11 @@ import { useRouter } from "next/navigation"; import React from "react"; -import { classNames } from "@calcom/lib"; import type { PERMISSION_MAP } from "@calcom/platform-constants"; import { PERMISSIONS_GROUPED_MAP } from "@calcom/platform-constants"; import type { Avatar } from "@calcom/prisma/client"; import { Button, Icon, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type OAuthClientCardProps = { name: string; diff --git a/apps/web/components/setup/EnterpriseLicense.tsx b/apps/web/components/setup/EnterpriseLicense.tsx index cd049742af..24ba9eeb9b 100644 --- a/apps/web/components/setup/EnterpriseLicense.tsx +++ b/apps/web/components/setup/EnterpriseLicense.tsx @@ -5,13 +5,13 @@ import { useCallback, useState } from "react"; import { Controller, FormProvider, useForm, useFormState } from "react-hook-form"; import { z } from "zod"; -import { classNames } from "@calcom/lib"; import { CONSOLE_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { RouterInputs, RouterOutputs } from "@calcom/trpc/react"; import { trpc } from "@calcom/trpc/react"; import { Button, TextField } from "@calcom/ui"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type EnterpriseLicenseFormValues = { licenseKey: string; diff --git a/apps/web/components/ui/form/DatePicker.tsx b/apps/web/components/ui/form/DatePicker.tsx index 968996d5bc..ece13861a4 100644 --- a/apps/web/components/ui/form/DatePicker.tsx +++ b/apps/web/components/ui/form/DatePicker.tsx @@ -4,8 +4,7 @@ import "react-date-picker/dist/DatePicker.css"; import PrimitiveDatePicker from "react-date-picker/dist/entry.nostyle"; import { Icon } from "@calcom/ui"; - -import classNames from "@lib/classNames"; +import classNames from "@calcom/ui/classNames"; type Props = { date: Date; diff --git a/apps/web/lib/classNames.ts b/apps/web/lib/classNames.ts deleted file mode 100644 index 9878582171..0000000000 --- a/apps/web/lib/classNames.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TODO: Remove this file once every `classNames` is imported from `@calcom/lib` -export { default } from "@calcom/lib/classNames"; diff --git a/apps/web/modules/apps/apps-view.tsx b/apps/web/modules/apps/apps-view.tsx index b28ec76d7f..3aaadb7511 100644 --- a/apps/web/modules/apps/apps-view.tsx +++ b/apps/web/modules/apps/apps-view.tsx @@ -3,7 +3,6 @@ import type { ChangeEventHandler } from "react"; import { useState } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; import type { HorizontalTabItemProps } from "@calcom/ui"; @@ -16,6 +15,7 @@ import { RecentAppsSlider, } from "@calcom/ui"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { type getServerSideProps } from "@lib/apps/getServerSideProps"; diff --git a/apps/web/modules/auth/verify-view.tsx b/apps/web/modules/auth/verify-view.tsx index 7f368e90a3..e29e1e2359 100644 --- a/apps/web/modules/auth/verify-view.tsx +++ b/apps/web/modules/auth/verify-view.tsx @@ -6,13 +6,13 @@ import { usePathname, useRouter } from "next/navigation"; import { useEffect, useRef, useState } from "react"; import z from "zod"; -import { classNames } from "@calcom/lib"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery"; import { trpc } from "@calcom/trpc/react"; import { Button, showToast } from "@calcom/ui"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import Loader from "@components/Loader"; diff --git a/apps/web/modules/event-types/views/event-types-listing-view.tsx b/apps/web/modules/event-types/views/event-types-listing-view.tsx index 74a27bdc0c..32a7f67770 100644 --- a/apps/web/modules/event-types/views/event-types-listing-view.tsx +++ b/apps/web/modules/event-types/views/event-types-listing-view.tsx @@ -15,7 +15,7 @@ import CreateEventTypeDialog from "@calcom/features/eventtypes/components/Create import { DuplicateDialog } from "@calcom/features/eventtypes/components/DuplicateDialog"; import { InfiniteSkeletonLoader } from "@calcom/features/eventtypes/components/SkeletonLoader"; import { getTeamsFiltersFromQuery } from "@calcom/features/filters/lib/getTeamsFiltersFromQuery"; -import { classNames, parseEventTypeColor } from "@calcom/lib"; +import { parseEventTypeColor } from "@calcom/lib"; import { APP_NAME, WEBSITE_URL } from "@calcom/lib/constants"; import { useCopy } from "@calcom/lib/hooks/useCopy"; import { useDebounce } from "@calcom/lib/hooks/useDebounce"; @@ -56,6 +56,7 @@ import { ArrowButton, UserAvatarGroup, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import useMeQuery from "@lib/hooks/useMeQuery"; diff --git a/apps/web/modules/getting-started/[[...step]]/onboarding-view.tsx b/apps/web/modules/getting-started/[[...step]]/onboarding-view.tsx index 0254d6ceaf..e101727d7d 100644 --- a/apps/web/modules/getting-started/[[...step]]/onboarding-view.tsx +++ b/apps/web/modules/getting-started/[[...step]]/onboarding-view.tsx @@ -7,7 +7,6 @@ import { Suspense } from "react"; import { Toaster } from "sonner"; import { z } from "zod"; -import { classNames } from "@calcom/lib"; import { APP_NAME } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback"; @@ -15,6 +14,7 @@ import { trpc } from "@calcom/trpc"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; import { Button, StepCard, Steps } from "@calcom/ui"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { getServerSideProps } from "@lib/getting-started/[[...step]]/getServerSideProps"; diff --git a/apps/web/modules/settings/billing/billing-view.tsx b/apps/web/modules/settings/billing/billing-view.tsx index 900c699104..f8d4325ef9 100644 --- a/apps/web/modules/settings/billing/billing-view.tsx +++ b/apps/web/modules/settings/billing/billing-view.tsx @@ -2,10 +2,10 @@ import { usePathname } from "next/navigation"; -import { classNames } from "@calcom/lib"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface CtaRowProps { title: string; diff --git a/apps/web/modules/settings/my-account/general-view.tsx b/apps/web/modules/settings/my-account/general-view.tsx index 8482de931b..7bdbd2ce42 100644 --- a/apps/web/modules/settings/my-account/general-view.tsx +++ b/apps/web/modules/settings/my-account/general-view.tsx @@ -5,7 +5,6 @@ import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; -import { classNames } from "@calcom/lib"; import { formatLocalizedDateTime } from "@calcom/lib/date-fns"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { localeOptions } from "@calcom/lib/i18n"; @@ -24,6 +23,7 @@ import { TimezoneSelect, SettingsToggle, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import TravelScheduleModal from "@components/settings/TravelScheduleModal"; diff --git a/apps/web/modules/settings/security/password-view.tsx b/apps/web/modules/settings/security/password-view.tsx index 48106836e1..56975be804 100644 --- a/apps/web/modules/settings/security/password-view.tsx +++ b/apps/web/modules/settings/security/password-view.tsx @@ -6,7 +6,6 @@ import { useForm } from "react-hook-form"; import { identityProviderNameMap } from "@calcom/features/auth/lib/identityProviderNameMap"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { IdentityProvider } from "@calcom/prisma/enums"; import { userMetadata as userMetadataSchema } from "@calcom/prisma/zod-utils"; @@ -24,6 +23,7 @@ import { SkeletonContainer, SkeletonText, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type ChangePasswordSessionFormValues = { oldPassword: string; diff --git a/apps/web/modules/signup-view.tsx b/apps/web/modules/signup-view.tsx index 7c1b748e80..4863b1ad49 100644 --- a/apps/web/modules/signup-view.tsx +++ b/apps/web/modules/signup-view.tsx @@ -18,7 +18,6 @@ import getStripe from "@calcom/app-store/stripepayment/lib/client"; import { getPremiumPlanPriceValue } from "@calcom/app-store/stripepayment/lib/utils"; import { getOrgUsernameFromEmail } from "@calcom/features/auth/signup/utils/getOrgUsernameFromEmail"; import { getOrgFullOrigin } from "@calcom/features/ee/organizations/lib/orgDomains"; -import { classNames } from "@calcom/lib"; import { APP_NAME, URL_PROTOCOL_REGEX, @@ -40,6 +39,7 @@ import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calco import { signupSchema as apiSignupSchema } from "@calcom/prisma/zod-utils"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; import { Button, PasswordField, TextField, Form, Alert, CheckboxField, Icon, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { getServerSideProps } from "@lib/signup/getServerSideProps"; diff --git a/apps/web/modules/videos/views/videos-single-view.tsx b/apps/web/modules/videos/views/videos-single-view.tsx index 77ab60d693..f145ffd93f 100644 --- a/apps/web/modules/videos/views/videos-single-view.tsx +++ b/apps/web/modules/videos/views/videos-single-view.tsx @@ -6,7 +6,6 @@ import { DailyProvider } from "@daily-co/daily-react"; import { useState, useEffect, useRef } from "react"; import dayjs from "@calcom/dayjs"; -import classNames from "@calcom/lib/classNames"; import { WEBSITE_URL } from "@calcom/lib/constants"; import { TRANSCRIPTION_STOPPED_ICON, RECORDING_DEFAULT_ICON } from "@calcom/lib/constants"; import { formatToLocalizedDate, formatToLocalizedTime } from "@calcom/lib/date-fns"; @@ -14,6 +13,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML"; import type { inferSSRProps } from "@calcom/types/inferSSRProps"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { getServerSideProps } from "@lib/video/[uid]/getServerSideProps"; diff --git a/packages/app-store/_components/AppCard.tsx b/packages/app-store/_components/AppCard.tsx index f086b8bfaf..030c56d570 100644 --- a/packages/app-store/_components/AppCard.tsx +++ b/packages/app-store/_components/AppCard.tsx @@ -4,9 +4,9 @@ import { useTranslation } from "react-i18next"; import { useAppContextWithSchema } from "@calcom/app-store/EventTypeAppContext"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; -import { classNames } from "@calcom/lib"; import type { RouterOutputs } from "@calcom/trpc/react"; import { Switch, Badge, Avatar, Button, Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { CredentialOwner } from "../types"; import OmniInstallAppButton from "./OmniInstallAppButton"; diff --git a/packages/app-store/_components/AppCategoryNavigation.tsx b/packages/app-store/_components/AppCategoryNavigation.tsx index 39845f404e..0b5863b7a3 100644 --- a/packages/app-store/_components/AppCategoryNavigation.tsx +++ b/packages/app-store/_components/AppCategoryNavigation.tsx @@ -1,8 +1,8 @@ import { useAutoAnimate } from "@formkit/auto-animate/react"; import { useMemo } from "react"; -import { classNames as cs } from "@calcom/lib"; import { HorizontalTabs, VerticalTabs } from "@calcom/ui"; +import cs from "@calcom/ui/classNames"; import getAppCategories from "../_utils/getAppCategories"; diff --git a/packages/app-store/_components/OmniInstallAppButton.tsx b/packages/app-store/_components/OmniInstallAppButton.tsx index f772ed8683..6bb048c1f3 100644 --- a/packages/app-store/_components/OmniInstallAppButton.tsx +++ b/packages/app-store/_components/OmniInstallAppButton.tsx @@ -1,8 +1,8 @@ -import { classNames } from "@calcom/lib"; import useApp from "@calcom/lib/hooks/useApp"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Button, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import useAddAppMutation from "../_utils/useAddAppMutation"; import { InstallAppButton } from "../components"; diff --git a/packages/app-store/components.tsx b/packages/app-store/components.tsx index fa704b98e4..6cba4fb4ba 100644 --- a/packages/app-store/components.tsx +++ b/packages/app-store/components.tsx @@ -6,7 +6,6 @@ import { useEffect, useRef } from "react"; import type { UseAddAppMutationOptions } from "@calcom/app-store/_utils/useAddAppMutation"; import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation"; -import classNames from "@calcom/lib/classNames"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { deriveAppDictKeyFromType } from "@calcom/lib/deriveAppDictKeyFromType"; import { useHasTeamPlan } from "@calcom/lib/hooks/useHasPaidPlan"; @@ -15,6 +14,7 @@ import { trpc } from "@calcom/trpc/react"; import type { RouterOutputs } from "@calcom/trpc/react"; import type { App } from "@calcom/types/App"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { InstallAppButtonMap } from "./apps.browser.generated"; import type { InstallAppButtonProps } from "./types"; diff --git a/packages/app-store/giphy/components/SearchDialog.tsx b/packages/app-store/giphy/components/SearchDialog.tsx index 45a9689eb2..950e137ee3 100644 --- a/packages/app-store/giphy/components/SearchDialog.tsx +++ b/packages/app-store/giphy/components/SearchDialog.tsx @@ -1,10 +1,10 @@ import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { IconName } from "@calcom/ui"; import { Alert, Button, Dialog, DialogClose, DialogContent, DialogFooter, Icon, Input } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface ISearchDialog { isOpenDialog: boolean; diff --git a/packages/app-store/hitpay/components/KeyInput.tsx b/packages/app-store/hitpay/components/KeyInput.tsx index 16a80e4f5e..7bc2c5359b 100644 --- a/packages/app-store/hitpay/components/KeyInput.tsx +++ b/packages/app-store/hitpay/components/KeyInput.tsx @@ -3,9 +3,9 @@ import type { FormEvent } from "react"; import React, { forwardRef, useState, useEffect, useId, useCallback } from "react"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Input, Skeleton, Icon, Label } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { InputFieldProps } from "@calcom/ui/components/form/inputs/types"; type AddonProps = { diff --git a/packages/app-store/qr_code/components/EventTypeAppSettingsInterface.tsx b/packages/app-store/qr_code/components/EventTypeAppSettingsInterface.tsx index c88b3c2a8c..6813bc0a6d 100644 --- a/packages/app-store/qr_code/components/EventTypeAppSettingsInterface.tsx +++ b/packages/app-store/qr_code/components/EventTypeAppSettingsInterface.tsx @@ -1,9 +1,9 @@ import { useState } from "react"; import type { EventTypeAppSettingsComponent } from "@calcom/app-store/types"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { TextField, Tooltip } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; const EventTypeAppSettingsInterface: EventTypeAppSettingsComponent = ({ eventType, disabled }) => { const { t } = useLocale(); diff --git a/packages/app-store/routing-forms/components/FormActions.tsx b/packages/app-store/routing-forms/components/FormActions.tsx index 1e04b9cef8..03e5824f41 100644 --- a/packages/app-store/routing-forms/components/FormActions.tsx +++ b/packages/app-store/routing-forms/components/FormActions.tsx @@ -6,7 +6,6 @@ import { v4 as uuidv4 } from "uuid"; import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; import { RoutingFormEmbedButton, RoutingFormEmbedDialog } from "@calcom/features/embed/RoutingFormEmbed"; import { EmbedDialogProvider } from "@calcom/features/embed/lib/hooks/useEmbedDialogCtx"; -import { classNames } from "@calcom/lib"; import { WEBSITE_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; @@ -30,6 +29,7 @@ import { TextAreaField, TextField, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import getFieldIdentifier from "../lib/getFieldIdentifier"; diff --git a/packages/app-store/routing-forms/components/SingleForm.tsx b/packages/app-store/routing-forms/components/SingleForm.tsx index d4d7ccab58..310f33f8b9 100644 --- a/packages/app-store/routing-forms/components/SingleForm.tsx +++ b/packages/app-store/routing-forms/components/SingleForm.tsx @@ -7,7 +7,6 @@ import { Controller, useFormContext } from "react-hook-form"; import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; import AddMembersWithSwitch from "@calcom/features/eventtypes/components/AddMembersWithSwitch"; import { ShellMain } from "@calcom/features/shell/Shell"; -import cn from "@calcom/lib/classNames"; import { IS_CALCOM } from "@calcom/lib/constants"; import useApp from "@calcom/lib/hooks/useApp"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; @@ -35,6 +34,7 @@ import { Tooltip, VerticalDivider, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { getAbsoluteEventTypeRedirectUrl } from "../getEventTypeRedirectUrl"; import { RoutingPages } from "../lib/RoutingPages"; @@ -368,7 +368,7 @@ const TeamMembersMatchResult = ({
{t("chosen_route")}: {chosenRouteName}
-
+
{t("attribute_logic_matched")}: {renderMainLogicStatus()} {hasMainWarnings && (
+ className={classNames(hasFallbackWarnings && "text-error")}> {t("attribute_logic_fallback_matched")}:{" "} {renderFallbackLogicStatus()} {hasFallbackWarnings && ( @@ -591,7 +591,7 @@ export const TestForm = ({ { e.preventDefault(); diff --git a/packages/features/availability/components/SkeletonLoader.tsx b/packages/features/availability/components/SkeletonLoader.tsx index bccb4bbf6b..a2660e166e 100644 --- a/packages/features/availability/components/SkeletonLoader.tsx +++ b/packages/features/availability/components/SkeletonLoader.tsx @@ -1,5 +1,5 @@ -import classNames from "@calcom/lib/classNames"; import { Button, SkeletonText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; function SkeletonLoader() { return ( diff --git a/packages/features/bookings/Booker/Booker.tsx b/packages/features/bookings/Booker/Booker.tsx index e1f6f9ce43..8495b11a3c 100644 --- a/packages/features/bookings/Booker/Booker.tsx +++ b/packages/features/bookings/Booker/Booker.tsx @@ -11,11 +11,11 @@ import dayjs from "@calcom/dayjs"; import useSkipConfirmStep from "@calcom/features/bookings/Booker/components/hooks/useSkipConfirmStep"; import { getQueryParam } from "@calcom/features/bookings/Booker/utils/query-param"; import { useNonEmptyScheduleDays } from "@calcom/features/schedules"; -import classNames from "@calcom/lib/classNames"; import { PUBLIC_INVALIDATE_AVAILABLE_SLOTS_ON_BOOKING_FORM } from "@calcom/lib/constants"; import { CLOUDFLARE_SITE_ID, CLOUDFLARE_USE_TURNSTILE_IN_BOOKER } from "@calcom/lib/constants"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { BookerLayouts } from "@calcom/prisma/zod-utils"; +import classNames from "@calcom/ui/classNames"; import { VerifyCodeDialog } from "../components/VerifyCodeDialog"; import { AvailableTimeSlots } from "./components/AvailableTimeSlots"; diff --git a/packages/features/bookings/Booker/components/AvailableTimeSlots.tsx b/packages/features/bookings/Booker/components/AvailableTimeSlots.tsx index cd5d87a546..fa82497b9e 100644 --- a/packages/features/bookings/Booker/components/AvailableTimeSlots.tsx +++ b/packages/features/bookings/Booker/components/AvailableTimeSlots.tsx @@ -7,9 +7,9 @@ import type { BookerEvent } from "@calcom/features/bookings/types"; import { useNonEmptyScheduleDays } from "@calcom/features/schedules"; import type { Slot } from "@calcom/features/schedules"; import { useSlotsForAvailableDates } from "@calcom/features/schedules/lib/use-schedule/useSlotsForDate"; -import { classNames } from "@calcom/lib"; import { PUBLIC_INVALIDATE_AVAILABLE_SLOTS_ON_BOOKING_FORM } from "@calcom/lib/constants"; import { BookerLayouts } from "@calcom/prisma/zod-utils"; +import classNames from "@calcom/ui/classNames"; import { AvailableTimesHeader } from "../../components/AvailableTimesHeader"; import { useBookerStore } from "../store"; diff --git a/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx b/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx index c0a1ee7bd5..dc4d6ccd8b 100644 --- a/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx +++ b/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx @@ -1,11 +1,11 @@ import { Trans } from "next-i18next"; import { useRouter } from "next/navigation"; -import { classNames } from "@calcom/lib"; import type { IOutOfOfficeData } from "@calcom/lib/getUserAvailability"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface IOutOfOfficeInSlotsProps { date: string; diff --git a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx b/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx index 046394fc6e..0667e2a052 100644 --- a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx +++ b/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSettingsModal.tsx @@ -2,7 +2,6 @@ import Link from "next/link"; import { Fragment } from "react"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Alert, @@ -17,6 +16,7 @@ import { SkeletonText, Switch, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { UseCalendarsReturnType } from "../hooks/useCalendars"; diff --git a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSwitch.tsx b/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSwitch.tsx index ac6ac18fe9..c98600473c 100644 --- a/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSwitch.tsx +++ b/packages/features/bookings/Booker/components/OverlayCalendar/OverlayCalendarSwitch.tsx @@ -1,8 +1,8 @@ import { useEffect } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button, Switch } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { useBookerStore } from "../../store"; import { useOverlayCalendarStore } from "./store"; diff --git a/packages/features/bookings/Booker/components/Section.tsx b/packages/features/bookings/Booker/components/Section.tsx index b2450a3866..ed8f96c2c3 100644 --- a/packages/features/bookings/Booker/components/Section.tsx +++ b/packages/features/bookings/Booker/components/Section.tsx @@ -2,7 +2,7 @@ import type { MotionProps } from "framer-motion"; import { m } from "framer-motion"; import { forwardRef } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { useBookerStore } from "../store"; import type { BookerAreas, BookerLayout } from "../types"; diff --git a/packages/features/bookings/Booker/utils/getBookerWrapperClasses.ts b/packages/features/bookings/Booker/utils/getBookerWrapperClasses.ts index 43361e5dc6..36f21d1ba6 100644 --- a/packages/features/bookings/Booker/utils/getBookerWrapperClasses.ts +++ b/packages/features/bookings/Booker/utils/getBookerWrapperClasses.ts @@ -1,4 +1,4 @@ -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; export function getBookerWrapperClasses({ isEmbed }: { isEmbed: boolean }) { // We don't want any margins for Embed. Any margin needed should be added by Embed user. diff --git a/packages/features/bookings/components/AvailableTimes.tsx b/packages/features/bookings/components/AvailableTimes.tsx index ad2fda06b1..a85284b7fd 100644 --- a/packages/features/bookings/components/AvailableTimes.tsx +++ b/packages/features/bookings/components/AvailableTimes.tsx @@ -9,13 +9,13 @@ import { OutOfOfficeInSlots } from "@calcom/features/bookings/Booker/components/ import type { IUseBookingLoadingStates } from "@calcom/features/bookings/Booker/components/hooks/useBookings"; import type { BookerEvent } from "@calcom/features/bookings/types"; import type { Slot } from "@calcom/features/schedules"; -import { classNames } from "@calcom/lib"; import { getPaymentAppData } from "@calcom/lib/getPaymentAppData"; import type { IOutOfOfficeData } from "@calcom/lib/getUserAvailability"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { localStorage } from "@calcom/lib/webstorage"; import type { IGetAvailableSlots } from "@calcom/trpc/server/routers/viewer/slots/util"; import { Button, Icon, SkeletonText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { useBookerTime } from "../Booker/components/hooks/useBookerTime"; import { useBookerStore } from "../Booker/store"; diff --git a/packages/features/bookings/components/AvailableTimesHeader.tsx b/packages/features/bookings/components/AvailableTimesHeader.tsx index f3525fdaef..74e11494ec 100644 --- a/packages/features/bookings/components/AvailableTimesHeader.tsx +++ b/packages/features/bookings/components/AvailableTimesHeader.tsx @@ -2,10 +2,10 @@ import { shallow } from "zustand/shallow"; import type { Dayjs } from "@calcom/dayjs"; import dayjs from "@calcom/dayjs"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { nameOfDay } from "@calcom/lib/weekday"; import { BookerLayouts } from "@calcom/prisma/zod-utils"; +import classNames from "@calcom/ui/classNames"; import { useBookerStore } from "../Booker/store"; import { TimeFormatToggle } from "./TimeFormatToggle"; diff --git a/packages/features/bookings/components/SeatsAvailabilityText.tsx b/packages/features/bookings/components/SeatsAvailabilityText.tsx index 3b33c22f2c..8390e29fbd 100644 --- a/packages/features/bookings/components/SeatsAvailabilityText.tsx +++ b/packages/features/bookings/components/SeatsAvailabilityText.tsx @@ -1,5 +1,5 @@ -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; type Props = { /** diff --git a/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx b/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx index 50e5881d84..7ff8f5dbc5 100644 --- a/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx +++ b/packages/features/bookings/components/event-meta/AvailableEventLocations.tsx @@ -5,10 +5,10 @@ import type { } from "@calcom/app-store/locations"; import { getEventLocationType, getTranslatedLocation } from "@calcom/app-store/locations"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import invertLogoOnDark from "@calcom/lib/invertLogoOnDark"; import { Icon, Tooltip } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; const excludeNullValues = (value: unknown) => !!value; diff --git a/packages/features/bookings/components/event-meta/Details.tsx b/packages/features/bookings/components/event-meta/Details.tsx index 3a77bd292a..cfe742e802 100644 --- a/packages/features/bookings/components/event-meta/Details.tsx +++ b/packages/features/bookings/components/event-meta/Details.tsx @@ -3,10 +3,10 @@ import React, { Fragment } from "react"; import { useBookerStore } from "@calcom/features/bookings/Booker/store"; import { PriceIcon } from "@calcom/features/bookings/components/event-meta/PriceIcon"; import type { BookerEvent } from "@calcom/features/bookings/types"; -import classNames from "@calcom/lib/classNames"; import { getPaymentAppData } from "@calcom/lib/getPaymentAppData"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Icon, type IconName } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { EventDetailBlocks } from "../../types"; import { AvailableEventLocations } from "./AvailableEventLocations"; diff --git a/packages/features/bookings/components/event-meta/Duration.tsx b/packages/features/bookings/components/event-meta/Duration.tsx index 6ee65edbc6..7d98f0e2c1 100644 --- a/packages/features/bookings/components/event-meta/Duration.tsx +++ b/packages/features/bookings/components/event-meta/Duration.tsx @@ -5,9 +5,9 @@ import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; import { useIsEmbed } from "@calcom/embed-core/embed-iframe"; import { useBookerStore } from "@calcom/features/bookings/Booker/store"; import type { BookerEvent } from "@calcom/features/bookings/types"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useShouldShowArrows, Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; /** Render X mins as X hours or X hours Y mins instead of in minutes once >= 60 minutes */ export const getDurationFormatted = (mins: number | undefined, t: TFunction) => { diff --git a/packages/features/bookings/components/event-meta/Locations.tsx b/packages/features/bookings/components/event-meta/Locations.tsx index c201ed3c38..72fe72960e 100644 --- a/packages/features/bookings/components/event-meta/Locations.tsx +++ b/packages/features/bookings/components/event-meta/Locations.tsx @@ -1,8 +1,8 @@ import { getEventLocationType, getTranslatedLocation } from "@calcom/app-store/locations"; import type { BookerEvent } from "@calcom/features/bookings/types"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Tooltip } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { EventMetaBlock } from "./Details"; diff --git a/packages/features/bookings/components/event-meta/Skeleton.tsx b/packages/features/bookings/components/event-meta/Skeleton.tsx index cc7f73d255..9740c76069 100644 --- a/packages/features/bookings/components/event-meta/Skeleton.tsx +++ b/packages/features/bookings/components/event-meta/Skeleton.tsx @@ -1,5 +1,5 @@ -import classNames from "@calcom/lib/classNames"; import { SkeletonText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export const EventMetaSkeleton = () => (
diff --git a/packages/features/bookings/components/event-meta/Title.tsx b/packages/features/bookings/components/event-meta/Title.tsx index 7046a0185a..f41db8f646 100644 --- a/packages/features/bookings/components/event-meta/Title.tsx +++ b/packages/features/bookings/components/event-meta/Title.tsx @@ -1,4 +1,4 @@ -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; interface EventTitleProps { children: React.ReactNode; diff --git a/packages/features/calendars/CalendarSwitch.tsx b/packages/features/calendars/CalendarSwitch.tsx index 5ba91e4554..ef8eefc916 100644 --- a/packages/features/calendars/CalendarSwitch.tsx +++ b/packages/features/calendars/CalendarSwitch.tsx @@ -3,10 +3,10 @@ import { useMutation } from "@tanstack/react-query"; import { useState } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Icon, showToast, Switch } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type ICalendarSwitchProps = { title: string; diff --git a/packages/features/calendars/DatePicker.tsx b/packages/features/calendars/DatePicker.tsx index 9aae86e897..1b450557ff 100644 --- a/packages/features/calendars/DatePicker.tsx +++ b/packages/features/calendars/DatePicker.tsx @@ -6,12 +6,12 @@ import dayjs from "@calcom/dayjs"; import { useEmbedStyles } from "@calcom/embed-core/embed-iframe"; import { useBookerStore } from "@calcom/features/bookings/Booker/store"; import { getAvailableDatesInMonth } from "@calcom/features/calendars/lib/getAvailableDatesInMonth"; -import classNames from "@calcom/lib/classNames"; import { daysInMonth, yyyymmdd } from "@calcom/lib/date-fns"; import type { IFromUser, IToUser } from "@calcom/lib/getUserAvailability"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { weekdayNames } from "@calcom/lib/weekday"; import { Button, SkeletonText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type DatePickerProps = { /** which day of the week to render the calendar. Usually Sunday (=0) or Monday (=1) - default: Sunday */ diff --git a/packages/features/calendars/weeklyview/components/Calendar.tsx b/packages/features/calendars/weeklyview/components/Calendar.tsx index dc79bff41c..878a82a0db 100644 --- a/packages/features/calendars/weeklyview/components/Calendar.tsx +++ b/packages/features/calendars/weeklyview/components/Calendar.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useMemo, useRef } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { useBookerTime } from "../../../bookings/Booker/components/hooks/useBookerTime"; import { useCalendarStore } from "../state/store"; diff --git a/packages/features/calendars/weeklyview/components/DateValues/index.tsx b/packages/features/calendars/weeklyview/components/DateValues/index.tsx index 1fefead3d1..8b1efaa46e 100644 --- a/packages/features/calendars/weeklyview/components/DateValues/index.tsx +++ b/packages/features/calendars/weeklyview/components/DateValues/index.tsx @@ -1,8 +1,8 @@ import React from "react"; import dayjs from "@calcom/dayjs"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; type Props = { days: dayjs.Dayjs[]; diff --git a/packages/features/calendars/weeklyview/components/blocking/BlockedTimeCell.tsx b/packages/features/calendars/weeklyview/components/blocking/BlockedTimeCell.tsx index c21fd67e6a..6dc6e70378 100644 --- a/packages/features/calendars/weeklyview/components/blocking/BlockedTimeCell.tsx +++ b/packages/features/calendars/weeklyview/components/blocking/BlockedTimeCell.tsx @@ -1,4 +1,4 @@ -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; export function BlockedTimeCell() { return ( diff --git a/packages/features/calendars/weeklyview/components/event/Empty.tsx b/packages/features/calendars/weeklyview/components/event/Empty.tsx index e121195fd9..913f09980c 100644 --- a/packages/features/calendars/weeklyview/components/event/Empty.tsx +++ b/packages/features/calendars/weeklyview/components/event/Empty.tsx @@ -3,7 +3,7 @@ import { shallow } from "zustand/shallow"; import type { Dayjs } from "@calcom/dayjs"; import dayjs from "@calcom/dayjs"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { OutOfOfficeInSlots } from "../../../../bookings/Booker/components/OutOfOfficeInSlots"; import { useBookerTime } from "../../../../bookings/Booker/components/hooks/useBookerTime"; diff --git a/packages/features/calendars/weeklyview/components/event/Event.tsx b/packages/features/calendars/weeklyview/components/event/Event.tsx index 1e508b733a..8213bc3ec7 100644 --- a/packages/features/calendars/weeklyview/components/event/Event.tsx +++ b/packages/features/calendars/weeklyview/components/event/Event.tsx @@ -1,8 +1,8 @@ import { cva } from "class-variance-authority"; import dayjs from "@calcom/dayjs"; -import classNames from "@calcom/lib/classNames"; import { Tooltip } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { CalendarEvent } from "../../types/events"; diff --git a/packages/features/calendars/weeklyview/components/spinner/Spinner.tsx b/packages/features/calendars/weeklyview/components/spinner/Spinner.tsx index 2d5dac0a57..138e10b8c3 100644 --- a/packages/features/calendars/weeklyview/components/spinner/Spinner.tsx +++ b/packages/features/calendars/weeklyview/components/spinner/Spinner.tsx @@ -1,4 +1,4 @@ -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; export const Spinner = ({ className }: { className?: string }) => (
= | { diff --git a/packages/features/data-table/components/DataTableToolbar.tsx b/packages/features/data-table/components/DataTableToolbar.tsx index af3ffd9197..79d7adcacc 100644 --- a/packages/features/data-table/components/DataTableToolbar.tsx +++ b/packages/features/data-table/components/DataTableToolbar.tsx @@ -4,11 +4,11 @@ import type { Table } from "@tanstack/react-table"; import { useEffect, useState, forwardRef } from "react"; import type { ComponentPropsWithoutRef } from "react"; -import { classNames } from "@calcom/lib"; import { useDebounce } from "@calcom/lib/hooks/useDebounce"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { ButtonProps } from "@calcom/ui"; import { Button, Input } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { useColumnFilters } from "../hooks"; diff --git a/packages/features/data-table/components/DataTableWrapper.tsx b/packages/features/data-table/components/DataTableWrapper.tsx index 35b19c4992..6c36ad6ddd 100644 --- a/packages/features/data-table/components/DataTableWrapper.tsx +++ b/packages/features/data-table/components/DataTableWrapper.tsx @@ -10,7 +10,7 @@ import { useDataTable, useColumnFilters, } from "@calcom/features/data-table"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; export type DataTableWrapperProps = { testId?: string; diff --git a/packages/features/data-table/components/filters/BaseSelectFilterOptions.tsx b/packages/features/data-table/components/filters/BaseSelectFilterOptions.tsx index 7b2af4c05b..212ea9fee2 100644 --- a/packages/features/data-table/components/filters/BaseSelectFilterOptions.tsx +++ b/packages/features/data-table/components/filters/BaseSelectFilterOptions.tsx @@ -2,7 +2,6 @@ import { useMemo } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Command, @@ -15,6 +14,7 @@ import { buttonClasses, Icon, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { useDataTable, useFilterValue } from "../../hooks"; import type { diff --git a/packages/features/data-table/components/filters/ColumnVisibilityButton.tsx b/packages/features/data-table/components/filters/ColumnVisibilityButton.tsx index 938db7f65b..de5976a148 100644 --- a/packages/features/data-table/components/filters/ColumnVisibilityButton.tsx +++ b/packages/features/data-table/components/filters/ColumnVisibilityButton.tsx @@ -4,7 +4,6 @@ import { type Table } from "@tanstack/react-table"; // eslint-disable-next-line no-restricted-imports import { forwardRef, useState } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { ButtonProps } from "@calcom/ui"; import { @@ -22,6 +21,7 @@ import { CommandSeparator, Icon, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export interface ColumnVisiblityProps { table: Table; diff --git a/packages/features/data-table/components/filters/DateRangeFilter.tsx b/packages/features/data-table/components/filters/DateRangeFilter.tsx index beffc2305d..edb3157965 100644 --- a/packages/features/data-table/components/filters/DateRangeFilter.tsx +++ b/packages/features/data-table/components/filters/DateRangeFilter.tsx @@ -3,7 +3,6 @@ import type { Dayjs } from "dayjs"; import { useState, useEffect, useCallback } from "react"; import dayjs from "@calcom/dayjs"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { DateRangePicker, @@ -19,6 +18,7 @@ import { CommandSeparator, buttonClasses, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { useDataTable, useFilterValue } from "../../hooks"; import { diff --git a/packages/features/ee/api-keys/components/ApiKeyListItem.tsx b/packages/features/ee/api-keys/components/ApiKeyListItem.tsx index ffa57fd08f..3a0fd9cabf 100644 --- a/packages/features/ee/api-keys/components/ApiKeyListItem.tsx +++ b/packages/features/ee/api-keys/components/ApiKeyListItem.tsx @@ -1,5 +1,4 @@ import dayjs from "@calcom/dayjs"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { RouterOutputs } from "@calcom/trpc/react"; import { trpc } from "@calcom/trpc/react"; @@ -13,6 +12,7 @@ import { DropdownMenuTrigger, showToast, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type TApiKeys = RouterOutputs["viewer"]["apiKeys"]["list"][number]; diff --git a/packages/features/ee/components/BrandColorsForm.tsx b/packages/features/ee/components/BrandColorsForm.tsx index a51f21e39d..613ce31e3f 100644 --- a/packages/features/ee/components/BrandColorsForm.tsx +++ b/packages/features/ee/components/BrandColorsForm.tsx @@ -2,11 +2,11 @@ import { useState } from "react"; import { Controller, useFormContext } from "react-hook-form"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; -import { classNames } from "@calcom/lib"; import { DEFAULT_LIGHT_BRAND_COLOR, DEFAULT_DARK_BRAND_COLOR } from "@calcom/lib/constants"; import { checkWCAGContrastColor } from "@calcom/lib/getBrandColours"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button, ColorPicker, SettingsToggle, Alert } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type BrandColorsFormValues = { brandColor: string; diff --git a/packages/features/ee/dsync/components/GroupNameCell.tsx b/packages/features/ee/dsync/components/GroupNameCell.tsx index 9953d15dbf..6802a9b5d7 100644 --- a/packages/features/ee/dsync/components/GroupNameCell.tsx +++ b/packages/features/ee/dsync/components/GroupNameCell.tsx @@ -1,9 +1,9 @@ import { useState } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Badge, Icon, showToast, TextField } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface GroupNameCellProps { groupNames: string[]; diff --git a/packages/features/ee/managed-event-types/hooks/useLockedFieldsManager.tsx b/packages/features/ee/managed-event-types/hooks/useLockedFieldsManager.tsx index b998d850d0..f47bc84c8e 100644 --- a/packages/features/ee/managed-event-types/hooks/useLockedFieldsManager.tsx +++ b/packages/features/ee/managed-event-types/hooks/useLockedFieldsManager.tsx @@ -7,11 +7,11 @@ import type { UseFormReturn } from "react-hook-form"; import type z from "zod"; import type { FormValues } from "@calcom/features/eventtypes/lib/types"; -import { classNames } from "@calcom/lib"; import type { Prisma } from "@calcom/prisma/client"; import { SchedulingType } from "@calcom/prisma/enums"; import type { _EventTypeModel } from "@calcom/prisma/zod/eventtype"; import { Badge, Icon, Switch, Tooltip } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export const LockedSwitch = ( isManagedEventType: boolean, diff --git a/packages/features/ee/organizations/components/AddNewTeamsForm.tsx b/packages/features/ee/organizations/components/AddNewTeamsForm.tsx index cfde9559b4..edb088ded1 100644 --- a/packages/features/ee/organizations/components/AddNewTeamsForm.tsx +++ b/packages/features/ee/organizations/components/AddNewTeamsForm.tsx @@ -6,7 +6,6 @@ import { useState } from "react"; import { Controller, useFieldArray, useForm } from "react-hook-form"; import { z } from "zod"; -import { classNames } from "@calcom/lib"; import { IS_TEAM_BILLING_ENABLED_CLIENT } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery"; @@ -14,6 +13,7 @@ import { CreationSource } from "@calcom/prisma/enums"; import { UserPermissionRole } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; import { Button, CheckboxField, Form, Icon, showToast, TextField } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; const querySchema = z.object({ id: z.string().transform((val) => parseInt(val)), diff --git a/packages/features/ee/organizations/components/CreateANewOrganizationForm.tsx b/packages/features/ee/organizations/components/CreateANewOrganizationForm.tsx index b01b9a15c0..a6286fedb7 100644 --- a/packages/features/ee/organizations/components/CreateANewOrganizationForm.tsx +++ b/packages/features/ee/organizations/components/CreateANewOrganizationForm.tsx @@ -7,7 +7,6 @@ import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains"; -import classNames from "@calcom/lib/classNames"; import { MINIMUM_NUMBER_OF_ORG_SEATS } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; @@ -17,6 +16,7 @@ import { CreationSource } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; import type { Ensure } from "@calcom/types/utils"; import { Alert, Button, Form, Label, RadioGroup as RadioArea, TextField, ToggleGroup } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; function extractDomainFromEmail(email: string) { let out = ""; diff --git a/packages/features/ee/organizations/components/TeamInviteFromOrg.tsx b/packages/features/ee/organizations/components/TeamInviteFromOrg.tsx index 5daab6af70..a9274ca0e2 100644 --- a/packages/features/ee/organizations/components/TeamInviteFromOrg.tsx +++ b/packages/features/ee/organizations/components/TeamInviteFromOrg.tsx @@ -1,9 +1,9 @@ import type { PropsWithChildren } from "react"; import { useState } from "react"; -import classNames from "@calcom/lib/classNames"; import type { RouterOutputs } from "@calcom/trpc"; import { Avatar, TextField } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type TeamInviteFromOrgProps = PropsWithChildren<{ selectedEmails?: string | string[]; diff --git a/packages/features/ee/organizations/pages/components/LockEventTypeSwitch.tsx b/packages/features/ee/organizations/pages/components/LockEventTypeSwitch.tsx index 0c91616dce..e2ff4df716 100644 --- a/packages/features/ee/organizations/pages/components/LockEventTypeSwitch.tsx +++ b/packages/features/ee/organizations/pages/components/LockEventTypeSwitch.tsx @@ -1,7 +1,6 @@ import { useState } from "react"; import { useForm } from "react-hook-form"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { RouterOutputs } from "@calcom/trpc"; import { trpc } from "@calcom/trpc"; @@ -17,6 +16,7 @@ import { Button, RadioGroup as RadioArea, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; enum CurrentEventTypeOptions { DELETE = "DELETE", diff --git a/packages/features/ee/organizations/pages/settings/general.tsx b/packages/features/ee/organizations/pages/settings/general.tsx index 4941e63ba4..01d2d176de 100644 --- a/packages/features/ee/organizations/pages/settings/general.tsx +++ b/packages/features/ee/organizations/pages/settings/general.tsx @@ -7,7 +7,6 @@ import { Controller, useForm } from "react-hook-form"; import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { nameOfDay } from "@calcom/lib/weekday"; import { MembershipRole } from "@calcom/prisma/enums"; @@ -24,6 +23,7 @@ import { SkeletonText, TimezoneSelect, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { LockEventTypeSwitch } from "../components/LockEventTypeSwitch"; import { NoSlotsNotificationSwitch } from "../components/NoSlotsNotificationSwitch"; diff --git a/packages/features/ee/teams/components/AddNewTeamMembers.tsx b/packages/features/ee/teams/components/AddNewTeamMembers.tsx index a682a25b8a..24a92af350 100644 --- a/packages/features/ee/teams/components/AddNewTeamMembers.tsx +++ b/packages/features/ee/teams/components/AddNewTeamMembers.tsx @@ -6,7 +6,6 @@ import { useEffect, useState, useMemo } from "react"; import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; import InviteLinkSettingsModal from "@calcom/features/ee/teams/components/InviteLinkSettingsModal"; import { MemberInvitationModalWithoutMembers } from "@calcom/features/ee/teams/components/MemberInvitationModal"; -import { classNames } from "@calcom/lib"; import { APP_NAME } from "@calcom/lib/constants"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -23,6 +22,7 @@ import { SkeletonText, UserAvatar, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type TeamMember = RouterOutputs["viewer"]["teams"]["listMembers"]["members"][number]; diff --git a/packages/features/ee/teams/components/EventTypesList.tsx b/packages/features/ee/teams/components/EventTypesList.tsx index a823e7dcc0..2aa63b3b31 100644 --- a/packages/features/ee/teams/components/EventTypesList.tsx +++ b/packages/features/ee/teams/components/EventTypesList.tsx @@ -3,7 +3,6 @@ import type { Dispatch, SetStateAction } from "react"; import { useState, Fragment } from "react"; import { DataTableSelectionBar } from "@calcom/features/data-table"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { SchedulingType } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc"; @@ -21,6 +20,7 @@ import { PopoverTrigger, Icon, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { User } from "./MemberList"; diff --git a/packages/features/ee/teams/components/InternalNotePresetsView.tsx b/packages/features/ee/teams/components/InternalNotePresetsView.tsx index 8ddc7a6dc7..c48740658c 100644 --- a/packages/features/ee/teams/components/InternalNotePresetsView.tsx +++ b/packages/features/ee/teams/components/InternalNotePresetsView.tsx @@ -5,12 +5,12 @@ import { useMemo } from "react"; import { useForm, useFieldArray, Controller } from "react-hook-form"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { MembershipRole } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; import type { RouterOutputs } from "@calcom/trpc/react"; import { Button, Form, SettingsToggle, showToast, Icon, Input } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface ProfileViewProps { team: RouterOutputs["viewer"]["teams"]["get"]; diff --git a/packages/features/ee/teams/components/MemberInvitationModal.tsx b/packages/features/ee/teams/components/MemberInvitationModal.tsx index 3e9ea74b7d..58f9199a69 100644 --- a/packages/features/ee/teams/components/MemberInvitationModal.tsx +++ b/packages/features/ee/teams/components/MemberInvitationModal.tsx @@ -5,7 +5,6 @@ import { useMemo, useRef, useState } from "react"; import { Controller, useForm } from "react-hook-form"; import TeamInviteFromOrg from "@calcom/ee/organizations/components/TeamInviteFromOrg"; -import { classNames } from "@calcom/lib"; import { IS_TEAM_BILLING_ENABLED_CLIENT, MAX_NB_INVITES } from "@calcom/lib/constants"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -28,6 +27,7 @@ import { TextField, ToggleGroup, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { PendingMember } from "../lib/types"; import { GoogleWorkspaceInviteButton } from "./GoogleWorkspaceInviteButton"; diff --git a/packages/features/ee/teams/components/TeamEventTypeForm.tsx b/packages/features/ee/teams/components/TeamEventTypeForm.tsx index a71e22525a..c8fcc089a0 100644 --- a/packages/features/ee/teams/components/TeamEventTypeForm.tsx +++ b/packages/features/ee/teams/components/TeamEventTypeForm.tsx @@ -2,13 +2,13 @@ import type { ReactNode } from "react"; import type { UseFormReturn } from "react-hook-form"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; -import { classNames } from "@calcom/lib"; import type { CreateEventTypeFormValues } from "@calcom/lib/hooks/useCreateEventType"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; import { SchedulingType } from "@calcom/prisma/enums"; import { Form, TextField, Tooltip } from "@calcom/ui"; import { Alert, RadioGroup as RadioArea } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type props = { isTeamAdminOrOwner: boolean; diff --git a/packages/features/ee/teams/components/TeamInviteListItem.tsx b/packages/features/ee/teams/components/TeamInviteListItem.tsx index 7ec579a7e2..2537fe4a82 100644 --- a/packages/features/ee/teams/components/TeamInviteListItem.tsx +++ b/packages/features/ee/teams/components/TeamInviteListItem.tsx @@ -1,4 +1,3 @@ -import classNames from "@calcom/lib/classNames"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { MembershipRole } from "@calcom/prisma/enums"; @@ -13,6 +12,7 @@ import { DropdownMenuTrigger, showToast, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface Props { team: { diff --git a/packages/features/ee/teams/components/TeamListItem.tsx b/packages/features/ee/teams/components/TeamListItem.tsx index 6dacdd1ff9..77607693a4 100644 --- a/packages/features/ee/teams/components/TeamListItem.tsx +++ b/packages/features/ee/teams/components/TeamListItem.tsx @@ -4,7 +4,6 @@ import { useState } from "react"; import InviteLinkSettingsModal from "@calcom/ee/teams/components/InviteLinkSettingsModal"; import { MemberInvitationModalWithoutMembers } from "@calcom/ee/teams/components/MemberInvitationModal"; -import classNames from "@calcom/lib/classNames"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { getTeamUrlSync } from "@calcom/lib/getBookerUrl/client"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; @@ -30,6 +29,7 @@ import { showToast, Tooltip, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { TeamRole } from "./TeamPill"; diff --git a/packages/features/ee/teams/pages/team-settings-view.tsx b/packages/features/ee/teams/pages/team-settings-view.tsx index 0a23d06ce6..655ca7d87a 100644 --- a/packages/features/ee/teams/pages/team-settings-view.tsx +++ b/packages/features/ee/teams/pages/team-settings-view.tsx @@ -7,7 +7,7 @@ import { useForm, Controller } from "react-hook-form"; import { AppearanceSkeletonLoader } from "@calcom/features/ee/components/CommonSkeletonLoaders"; import { IntervalLimitsManager } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab"; import SectionBottomActions from "@calcom/features/settings/SectionBottomActions"; -import { classNames, validateIntervalLimitOrder } from "@calcom/lib"; +import { validateIntervalLimitOrder } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback"; import { MembershipRole } from "@calcom/prisma/enums"; @@ -15,6 +15,7 @@ import { trpc } from "@calcom/trpc/react"; import type { RouterOutputs } from "@calcom/trpc/react"; import type { IntervalLimit } from "@calcom/types/Calendar"; import { Button, CheckboxField, Form, SettingsToggle, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { default as InternalNotePresetsView } from "../components/InternalNotePresetsView"; diff --git a/packages/features/ee/workflows/components/WorkflowListPage.tsx b/packages/features/ee/workflows/components/WorkflowListPage.tsx index 5ca5c1bf3e..1c2fbddb8d 100644 --- a/packages/features/ee/workflows/components/WorkflowListPage.tsx +++ b/packages/features/ee/workflows/components/WorkflowListPage.tsx @@ -4,7 +4,6 @@ import Link from "next/link"; import { useRouter } from "next/navigation"; import { useState } from "react"; -import classNames from "@calcom/lib/classNames"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; @@ -22,6 +21,7 @@ import { Icon, Tooltip, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { getActionIcon } from "../lib/getActionIcon"; import type { WorkflowStep } from "../lib/types"; diff --git a/packages/features/ee/workflows/components/WorkflowStepContainer.tsx b/packages/features/ee/workflows/components/WorkflowStepContainer.tsx index bfde3f9e63..00355f16e9 100644 --- a/packages/features/ee/workflows/components/WorkflowStepContainer.tsx +++ b/packages/features/ee/workflows/components/WorkflowStepContainer.tsx @@ -6,7 +6,6 @@ import type { UseFormReturn } from "react-hook-form"; import { Controller } from "react-hook-form"; import "react-phone-number-input/style.css"; -import { classNames } from "@calcom/lib"; import { SENDER_ID, SENDER_NAME } from "@calcom/lib/constants"; import { useHasActiveTeamPlan } from "@calcom/lib/hooks/useHasPaidPlan"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -41,6 +40,7 @@ import { TextField, Tooltip, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { getWhatsappTemplateForAction, diff --git a/packages/features/ee/workflows/lib/getActionIcon.tsx b/packages/features/ee/workflows/lib/getActionIcon.tsx index 930c3506d1..64a8cda3e6 100644 --- a/packages/features/ee/workflows/lib/getActionIcon.tsx +++ b/packages/features/ee/workflows/lib/getActionIcon.tsx @@ -1,6 +1,6 @@ import { isSMSOrWhatsappAction } from "@calcom/features/ee/workflows/lib/actionHelperFunctions"; -import { classNames } from "@calcom/lib"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { WorkflowStep } from "../lib/types"; diff --git a/packages/features/ee/workflows/pages/index.tsx b/packages/features/ee/workflows/pages/index.tsx index 6bd9d37b59..28fe9c5ed8 100644 --- a/packages/features/ee/workflows/pages/index.tsx +++ b/packages/features/ee/workflows/pages/index.tsx @@ -6,7 +6,6 @@ import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; import Shell, { ShellMain } from "@calcom/features/shell/Shell"; -import { classNames } from "@calcom/lib"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery"; @@ -14,6 +13,7 @@ import { HttpError } from "@calcom/lib/http-error"; import type { WorkflowRepository } from "@calcom/lib/server/repository/workflow"; import { trpc } from "@calcom/trpc/react"; import { AnimatedPopover, Avatar, CreateButtonWithTeamsList, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { FilterResults } from "../../../filters/components/FilterResults"; import { TeamsFilter } from "../../../filters/components/TeamsFilter"; diff --git a/packages/features/ee/workflows/pages/workflow.tsx b/packages/features/ee/workflows/pages/workflow.tsx index f44e50b95c..cf8e9eb193 100644 --- a/packages/features/ee/workflows/pages/workflow.tsx +++ b/packages/features/ee/workflows/pages/workflow.tsx @@ -7,7 +7,6 @@ import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import Shell, { ShellMain } from "@calcom/features/shell/Shell"; -import { classNames } from "@calcom/lib"; import { SENDER_ID } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { HttpError } from "@calcom/lib/http-error"; @@ -19,6 +18,7 @@ import { trpc } from "@calcom/trpc/react"; import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery"; import type { MultiSelectCheckboxesOptionType as Option } from "@calcom/ui"; import { Alert, Badge, Button, Form, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import LicenseRequired from "../../common/components/LicenseRequired"; import SkeletonLoader from "../components/SkeletonLoaderEdit"; diff --git a/packages/features/eventtypes/components/AssignAllTeamMembers.tsx b/packages/features/eventtypes/components/AssignAllTeamMembers.tsx index 62b45fde9c..b812cf44d4 100644 --- a/packages/features/eventtypes/components/AssignAllTeamMembers.tsx +++ b/packages/features/eventtypes/components/AssignAllTeamMembers.tsx @@ -2,9 +2,9 @@ import type { Dispatch, SetStateAction } from "react"; import { Controller, useFormContext } from "react-hook-form"; import type { FormValues, SettingsToggleClassNames } from "@calcom/features/eventtypes/lib/types"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { SettingsToggle } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; const AssignAllTeamMembers = ({ assignAllTeamMembers, diff --git a/packages/features/eventtypes/components/CheckedTeamSelect.tsx b/packages/features/eventtypes/components/CheckedTeamSelect.tsx index f1140b5140..675672b15b 100644 --- a/packages/features/eventtypes/components/CheckedTeamSelect.tsx +++ b/packages/features/eventtypes/components/CheckedTeamSelect.tsx @@ -6,9 +6,9 @@ import type { Props } from "react-select"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; import type { SelectClassNames } from "@calcom/features/eventtypes/lib/types"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Avatar, Button, Icon, Select, Tooltip } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { PriorityDialogCustomClassNames, WeightDialogCustomClassNames } from "./HostEditDialogs"; import { PriorityDialog, WeightDialog } from "./HostEditDialogs"; diff --git a/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx b/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx index 16c42fa902..1b409792ae 100644 --- a/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx +++ b/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx @@ -2,12 +2,12 @@ import { useAutoAnimate } from "@formkit/auto-animate/react"; import type { Props } from "react-select"; import type { SelectClassNames } from "@calcom/features/eventtypes/lib/types"; -import { classNames } from "@calcom/lib"; import { getBookerBaseUrlSync } from "@calcom/lib/getBookerUrl/client"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { MembershipRole } from "@calcom/prisma/enums"; import type { UserProfile } from "@calcom/types/UserProfile"; import { Avatar, Badge, Button, ButtonGroup, Select, Switch, Tooltip } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type ChildrenEventType = { value: string; diff --git a/packages/features/eventtypes/components/EventTypeDescription.tsx b/packages/features/eventtypes/components/EventTypeDescription.tsx index 810ee4c1c1..2e6ba8c84d 100644 --- a/packages/features/eventtypes/components/EventTypeDescription.tsx +++ b/packages/features/eventtypes/components/EventTypeDescription.tsx @@ -4,7 +4,7 @@ import type { z } from "zod"; import { Price } from "@calcom/features/bookings/components/event-meta/Price"; import { PriceIcon } from "@calcom/features/bookings/components/event-meta/PriceIcon"; -import { classNames, parseRecurringEvent } from "@calcom/lib"; +import { parseRecurringEvent } from "@calcom/lib"; import { getPaymentAppData } from "@calcom/lib/getPaymentAppData"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML"; @@ -13,6 +13,7 @@ import { SchedulingType } from "@calcom/prisma/enums"; import type { EventTypeModel } from "@calcom/prisma/zod"; import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils"; import { Badge } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type EventTypeDescriptionProps = { eventType: Pick< diff --git a/packages/features/eventtypes/components/EventTypeLayout.tsx b/packages/features/eventtypes/components/EventTypeLayout.tsx index e32e8c70b9..5af3ceb208 100644 --- a/packages/features/eventtypes/components/EventTypeLayout.tsx +++ b/packages/features/eventtypes/components/EventTypeLayout.tsx @@ -7,7 +7,6 @@ import { EventTypeEmbedButton, EventTypeEmbedDialog } from "@calcom/features/emb import type { FormValues } from "@calcom/features/eventtypes/lib/types"; import type { EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types"; import WebShell from "@calcom/features/shell/Shell"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { SchedulingType } from "@calcom/prisma/enums"; import type { VerticalTabItemProps } from "@calcom/ui"; @@ -30,6 +29,7 @@ import { VerticalDivider, VerticalTabs, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { DeleteDialog } from "./dialogs/DeleteDialog"; diff --git a/packages/features/eventtypes/components/HostEditDialogs.tsx b/packages/features/eventtypes/components/HostEditDialogs.tsx index f82c118122..07fd15b3b5 100644 --- a/packages/features/eventtypes/components/HostEditDialogs.tsx +++ b/packages/features/eventtypes/components/HostEditDialogs.tsx @@ -10,7 +10,6 @@ import type { InputClassNames, SelectClassNames, } from "@calcom/features/eventtypes/lib/types"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Dialog, @@ -22,6 +21,7 @@ import { Select, TextField, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { CheckedSelectOption } from "./CheckedTeamSelect"; diff --git a/packages/features/eventtypes/components/Locations.tsx b/packages/features/eventtypes/components/Locations.tsx index 6a735c759e..f77dc885ef 100644 --- a/packages/features/eventtypes/components/Locations.tsx +++ b/packages/features/eventtypes/components/Locations.tsx @@ -20,10 +20,10 @@ import type { SingleValueLocationOption, } from "@calcom/features/form/components/LocationSelect"; import LocationSelect from "@calcom/features/form/components/LocationSelect"; -import { classNames } from "@calcom/lib"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Icon, Input, PhoneInput, Button, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type TEventTypeLocation = Pick; export type TLocationOptions = Pick["locationOptions"]; diff --git a/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx b/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx index b41bfcf013..aa67e8f175 100644 --- a/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx +++ b/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx @@ -4,11 +4,11 @@ import { FormProvider } from "react-hook-form"; import { useForm, useFormContext } from "react-hook-form"; import type { InputClassNames } from "@calcom/features/eventtypes/lib/types"; -import { classNames } from "@calcom/lib"; import type { EventNameObjectType } from "@calcom/lib/event"; import { getEventName, validateCustomEventName } from "@calcom/lib/event"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button, Dialog, DialogClose, DialogFooter, DialogContent, TextField } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface FormValues { customEventName: string; diff --git a/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx b/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx index ccf2d82d80..a8504adb65 100644 --- a/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx +++ b/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx @@ -3,7 +3,6 @@ import { Trans } from "next-i18next"; import { useState } from "react"; import type { InputClassNames, SettingsToggleClassNames } from "@calcom/features/eventtypes/lib/types"; -import { classNames } from "@calcom/lib"; import { SettingsToggle, Dialog, @@ -13,6 +12,7 @@ import { DialogClose, Button, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type EmailNotificationToggleCustomClassNames = SettingsToggleClassNames & { confirmationDialog?: { diff --git a/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx b/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx index 9fb52d025c..edd97b1038 100644 --- a/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx +++ b/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx @@ -30,8 +30,6 @@ import { FormBuilder } from "@calcom/features/form-builder/FormBuilder"; import type { fieldSchema } from "@calcom/features/form-builder/schema"; import type { EditableSchema } from "@calcom/features/form-builder/schema"; import { BookerLayoutSelector } from "@calcom/features/settings/BookerLayoutSelector"; -import { classNames } from "@calcom/lib"; -import cx from "@calcom/lib/classNames"; import { DEFAULT_LIGHT_BRAND_COLOR, DEFAULT_DARK_BRAND_COLOR, APP_NAME } from "@calcom/lib/constants"; import type { EventNameObjectType } from "@calcom/lib/event"; import { getEventName } from "@calcom/lib/event"; @@ -54,6 +52,7 @@ import { TextField, ColorPicker, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { CustomEventTypeModalClassNames } from "./CustomEventTypeModal"; import CustomEventTypeModal from "./CustomEventTypeModal"; @@ -241,7 +240,7 @@ const destinationCalendarComponents = { {!useEventTypeDestinationCalendarEmail && verifiedSecondaryEmails.length > 0 && !isTeamEventType && ( -
+
; diff --git a/packages/features/filters/components/TeamsFilter.tsx b/packages/features/filters/components/TeamsFilter.tsx index c3714d6722..97342b8ef4 100644 --- a/packages/features/filters/components/TeamsFilter.tsx +++ b/packages/features/filters/components/TeamsFilter.tsx @@ -2,7 +2,6 @@ import { useSession } from "next-auth/react"; import type { InputHTMLAttributes, ReactNode } from "react"; import { forwardRef, useState } from "react"; -import { classNames } from "@calcom/lib"; import { getOrgOrTeamAvatar } from "@calcom/lib/defaultAvatarImage"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useTypedQuery } from "@calcom/lib/hooks/useTypedQuery"; @@ -16,6 +15,7 @@ import { Tooltip, VerticalDivider, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { filterQuerySchema } from "../lib/getTeamsFiltersFromQuery"; diff --git a/packages/features/form-builder/FormBuilder.tsx b/packages/features/form-builder/FormBuilder.tsx index ea46c023d9..5dc4b01f13 100644 --- a/packages/features/form-builder/FormBuilder.tsx +++ b/packages/features/form-builder/FormBuilder.tsx @@ -5,7 +5,6 @@ import { Controller, useFieldArray, useForm, useFormContext } from "react-hook-f import type { z } from "zod"; import { ZodError } from "zod"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { md } from "@calcom/lib/markdownIt"; import { markdownToSafeHTMLClient } from "@calcom/lib/markdownToSafeHTMLClient"; @@ -30,6 +29,7 @@ import { Editor, Switch, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { fieldTypesConfigMap } from "./fieldTypes"; import { fieldsThatSupportLabelAsSafeHtml } from "./fieldsThatSupportLabelAsSafeHtml"; diff --git a/packages/features/form-builder/FormBuilderField.tsx b/packages/features/form-builder/FormBuilderField.tsx index 5934a76c9f..74d256a310 100644 --- a/packages/features/form-builder/FormBuilderField.tsx +++ b/packages/features/form-builder/FormBuilderField.tsx @@ -3,9 +3,9 @@ import type { TFunction } from "next-i18next"; import { Controller, useFormContext } from "react-hook-form"; import type { z } from "zod"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Icon, InfoBadge, Label } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { Components, isValidValueProp } from "./Components"; import { fieldTypesConfigMap } from "./fieldTypes"; diff --git a/packages/features/form/components/CheckboxField.tsx b/packages/features/form/components/CheckboxField.tsx index 87decd4f2c..e06807330c 100644 --- a/packages/features/form/components/CheckboxField.tsx +++ b/packages/features/form/components/CheckboxField.tsx @@ -1,8 +1,8 @@ import type { InputHTMLAttributes } from "react"; import React, { forwardRef } from "react"; -import classNames from "@calcom/lib/classNames"; import { InfoBadge } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type Props = InputHTMLAttributes & { label?: React.ReactNode; diff --git a/packages/features/form/components/LocationSelect.tsx b/packages/features/form/components/LocationSelect.tsx index 696e1f92c0..b4e8b0115f 100644 --- a/packages/features/form/components/LocationSelect.tsx +++ b/packages/features/form/components/LocationSelect.tsx @@ -3,9 +3,9 @@ import { components } from "react-select"; import type { EventLocationType } from "@calcom/app-store/locations"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; -import { classNames } from "@calcom/lib"; import invertLogoOnDark from "@calcom/lib/invertLogoOnDark"; import { Select, Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type LocationSelectCustomClassNames = { optionIcon?: string; diff --git a/packages/features/form/components/Select.tsx b/packages/features/form/components/Select.tsx index 369118dd45..044f49740e 100644 --- a/packages/features/form/components/Select.tsx +++ b/packages/features/form/components/Select.tsx @@ -2,8 +2,8 @@ import React, { useCallback, useEffect, useState } from "react"; import type { GroupBase, Props, InputProps, SingleValue, MultiValue } from "react-select"; import ReactSelect, { components } from "react-select"; -import classNames from "@calcom/lib/classNames"; import { useGetTheme } from "@calcom/lib/hooks/useTheme"; +import classNames from "@calcom/ui/classNames"; export type SelectProps< Option, diff --git a/packages/features/insights/components/Card.tsx b/packages/features/insights/components/Card.tsx index b27cba0422..33b33fa9f1 100644 --- a/packages/features/insights/components/Card.tsx +++ b/packages/features/insights/components/Card.tsx @@ -1,6 +1,6 @@ import { Card } from "@tremor/react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; interface ICardProps { children: React.ReactNode; diff --git a/packages/features/insights/components/CellWithOverflowX.tsx b/packages/features/insights/components/CellWithOverflowX.tsx index a98b8ee996..ac269fb8c9 100644 --- a/packages/features/insights/components/CellWithOverflowX.tsx +++ b/packages/features/insights/components/CellWithOverflowX.tsx @@ -1,4 +1,4 @@ -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; export function CellWithOverflowX({ children, diff --git a/packages/features/insights/components/FailedBookingsByField.tsx b/packages/features/insights/components/FailedBookingsByField.tsx index 5280d218d8..07c4545d94 100644 --- a/packages/features/insights/components/FailedBookingsByField.tsx +++ b/packages/features/insights/components/FailedBookingsByField.tsx @@ -1,8 +1,8 @@ import { useState } from "react"; -import { classNames } from "@calcom/lib"; import { trpc } from "@calcom/trpc"; import { ToggleGroup } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { useInsightsParameters } from "../hooks/useInsightsParameters"; import { BarList } from "./tremor/BarList"; diff --git a/packages/features/insights/components/LoadingInsights.tsx b/packages/features/insights/components/LoadingInsights.tsx index b11d0f1dd5..2e67751128 100644 --- a/packages/features/insights/components/LoadingInsights.tsx +++ b/packages/features/insights/components/LoadingInsights.tsx @@ -1,5 +1,5 @@ -import { classNames } from "@calcom/lib"; import { SkeletonText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { CardInsights } from "./Card"; diff --git a/packages/features/insights/components/RoutedToPerPeriod.tsx b/packages/features/insights/components/RoutedToPerPeriod.tsx index ada306c130..42506b9831 100644 --- a/packages/features/insights/components/RoutedToPerPeriod.tsx +++ b/packages/features/insights/components/RoutedToPerPeriod.tsx @@ -3,7 +3,6 @@ import { useQueryState } from "nuqs"; import { type ReactNode, useMemo, useRef, useState } from "react"; import { DataTableSkeleton } from "@calcom/features/data-table"; -import classNames from "@calcom/lib/classNames"; import { downloadAsCsv } from "@calcom/lib/csvUtils"; import { useInViewObserver } from "@calcom/lib/hooks/useInViewObserver"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -19,6 +18,7 @@ import { Input, Button, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { Table, TableBody, diff --git a/packages/features/insights/components/tremor/BarList.tsx b/packages/features/insights/components/tremor/BarList.tsx index ba50273b8c..ea76ba61f4 100644 --- a/packages/features/insights/components/tremor/BarList.tsx +++ b/packages/features/insights/components/tremor/BarList.tsx @@ -1,7 +1,7 @@ // Tremor BarList [v0.1.1] import React from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; type Bar = T & { key?: string; diff --git a/packages/features/mintlify-chat/MintlifyChat.tsx b/packages/features/mintlify-chat/MintlifyChat.tsx index 956d589023..6aceea6589 100644 --- a/packages/features/mintlify-chat/MintlifyChat.tsx +++ b/packages/features/mintlify-chat/MintlifyChat.tsx @@ -2,10 +2,10 @@ import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML"; import { Icon, SkeletonContainer, SkeletonText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { getFormattedCitations, handleAiChat, optionallyAddBaseUrl } from "../mintlify-chat/util"; diff --git a/packages/features/schedules/components/DateOverrideInputDialog.tsx b/packages/features/schedules/components/DateOverrideInputDialog.tsx index eca6f5b566..1060fde0c4 100644 --- a/packages/features/schedules/components/DateOverrideInputDialog.tsx +++ b/packages/features/schedules/components/DateOverrideInputDialog.tsx @@ -3,7 +3,6 @@ import { useForm } from "react-hook-form"; import type { Dayjs } from "@calcom/dayjs"; import dayjs from "@calcom/dayjs"; -import { classNames as cs } from "@calcom/lib"; import { yyyymmdd } from "@calcom/lib/date-fns"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { WorkingHours } from "@calcom/types/schedule"; @@ -18,6 +17,7 @@ import { Form, Button, } from "@calcom/ui"; +import cs from "@calcom/ui/classNames"; import DatePicker from "../../calendars/DatePicker"; import type { TimeRange } from "./Schedule"; diff --git a/packages/features/schedules/components/Schedule.tsx b/packages/features/schedules/components/Schedule.tsx index ddf55313ab..942affa582 100644 --- a/packages/features/schedules/components/Schedule.tsx +++ b/packages/features/schedules/components/Schedule.tsx @@ -15,7 +15,6 @@ import type { GroupBase, Props } from "react-select"; import type { ConfigType } from "@calcom/dayjs"; import dayjs from "@calcom/dayjs"; import { defaultDayRange as DEFAULT_DAY_RANGE } from "@calcom/lib/availability"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { weekdayNames } from "@calcom/lib/weekday"; import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery"; @@ -30,6 +29,7 @@ import { SkeletonText, Switch, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export type { TimeRange }; diff --git a/packages/features/settings/BookerLayoutSelector.tsx b/packages/features/settings/BookerLayoutSelector.tsx index d4bfa2dceb..1373071b6c 100644 --- a/packages/features/settings/BookerLayoutSelector.tsx +++ b/packages/features/settings/BookerLayoutSelector.tsx @@ -4,12 +4,12 @@ import Link from "next/link"; import { useCallback, useState } from "react"; import { Controller, useFormContext } from "react-hook-form"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { BookerLayouts, defaultBookerLayoutSettings } from "@calcom/prisma/zod-utils"; import { bookerLayoutOptions, type BookerLayoutSettings } from "@calcom/prisma/zod-utils"; import type { RouterOutputs } from "@calcom/trpc/react"; import { Label, CheckboxField, Button } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import SectionBottomActions from "./SectionBottomActions"; diff --git a/packages/features/settings/SectionBottomActions.tsx b/packages/features/settings/SectionBottomActions.tsx index 12458dd912..e128ce235f 100644 --- a/packages/features/settings/SectionBottomActions.tsx +++ b/packages/features/settings/SectionBottomActions.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; const SectionBottomActions = ({ align = "start", diff --git a/packages/features/settings/appDir/SettingsHeader.tsx b/packages/features/settings/appDir/SettingsHeader.tsx index 8299b0d7fc..eca1df85a2 100644 --- a/packages/features/settings/appDir/SettingsHeader.tsx +++ b/packages/features/settings/appDir/SettingsHeader.tsx @@ -1,7 +1,7 @@ import React, { Suspense } from "react"; -import { classNames } from "@calcom/lib"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface HeaderProps { children: React.ReactNode; diff --git a/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx b/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx index 1c2797cce0..b814f36792 100644 --- a/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx +++ b/packages/features/settings/outOfOffice/CreateOrEditOutOfOfficeModal.tsx @@ -2,7 +2,6 @@ import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; import dayjs from "@calcom/dayjs"; -import { classNames } from "@calcom/lib"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useDebounce } from "@calcom/lib/hooks/useDebounce"; import { useHasTeamPlan } from "@calcom/lib/hooks/useHasPaidPlan"; @@ -25,6 +24,7 @@ import { Label, Input, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { OutOfOfficeTab } from "./OutOfOfficeToggleGroup"; diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx index aaeb379d56..734af9f2e2 100644 --- a/packages/features/shell/Shell.tsx +++ b/packages/features/shell/Shell.tsx @@ -10,12 +10,12 @@ import { useRedirectToLoginIfUnauthenticated } from "@calcom/features/auth/lib/h import { useRedirectToOnboardingIfNeeded } from "@calcom/features/auth/lib/hooks/useRedirectToOnboardingIfNeeded"; import { KBarContent, KBarRoot } from "@calcom/features/kbar/Kbar"; import TimezoneChangeDialog from "@calcom/features/settings/TimezoneChangeDialog"; -import classNames from "@calcom/lib/classNames"; import { APP_NAME } from "@calcom/lib/constants"; import { useFormbricks } from "@calcom/lib/formbricks-client"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useNotifications } from "@calcom/lib/hooks/useNotifications"; import { Button, ErrorBoundary, HeadSeo, SkeletonText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { SideBarContainer } from "./SideBar"; import { TopNavContainer } from "./TopNav"; diff --git a/packages/features/shell/SideBar.tsx b/packages/features/shell/SideBar.tsx index 329dfaa45a..f35865f01b 100644 --- a/packages/features/shell/SideBar.tsx +++ b/packages/features/shell/SideBar.tsx @@ -4,13 +4,13 @@ import dynamic from "next/dynamic"; import Link from "next/link"; import { usePathname } from "next/navigation"; -import { classNames } from "@calcom/lib"; import { IS_VISUAL_REGRESSION_TESTING, ENABLE_PROFILE_SWITCHER } from "@calcom/lib/constants"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { getBookerBaseUrlSync } from "@calcom/lib/getBookerUrl/client"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { UserPermissionRole } from "@calcom/prisma/enums"; import { Avatar, ButtonOrLink, Credits, Icon, SkeletonText, Tooltip, Logo } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { KBarTrigger } from "../kbar/Kbar"; import { Navigation } from "./navigation/Navigation"; diff --git a/packages/features/shell/navigation/Navigation.tsx b/packages/features/shell/navigation/Navigation.tsx index f5696f7ff6..f74bc81255 100644 --- a/packages/features/shell/navigation/Navigation.tsx +++ b/packages/features/shell/navigation/Navigation.tsx @@ -8,7 +8,7 @@ import { type OrganizationBranding, } from "@calcom/features/ee/organizations/context/provider"; import { KBarTrigger } from "@calcom/features/kbar/Kbar"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { TeamInviteBadge } from "../TeamInviteBadge"; import type { NavigationItemType } from "./NavigationItem"; diff --git a/packages/features/shell/navigation/NavigationItem.tsx b/packages/features/shell/navigation/NavigationItem.tsx index 0b0dd4d02f..5c7ad2a2d4 100644 --- a/packages/features/shell/navigation/NavigationItem.tsx +++ b/packages/features/shell/navigation/NavigationItem.tsx @@ -2,10 +2,10 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; import React, { Fragment } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Tooltip, Icon, SkeletonText } from "@calcom/ui"; import type { IconName } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { useShouldDisplayNavigationItem } from "./useShouldDisplayNavigationItem"; diff --git a/packages/features/shell/user-dropdown/ProfileDropdown.tsx b/packages/features/shell/user-dropdown/ProfileDropdown.tsx index f2798dfb0c..8d7e99e6fa 100644 --- a/packages/features/shell/user-dropdown/ProfileDropdown.tsx +++ b/packages/features/shell/user-dropdown/ProfileDropdown.tsx @@ -1,7 +1,6 @@ import { useSession } from "next-auth/react"; import { useState } from "react"; -import { classNames } from "@calcom/lib"; import { ENABLE_PROFILE_SWITCHER } from "@calcom/lib/constants"; import { useRefreshData } from "@calcom/lib/hooks/useRefreshData"; import { trpc } from "@calcom/trpc"; @@ -15,6 +14,7 @@ import { DropdownMenuTrigger, Icon, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export function ProfileDropdown() { const { update, data: sessionData } = useSession(); diff --git a/packages/features/shell/user-dropdown/UserDropdown.tsx b/packages/features/shell/user-dropdown/UserDropdown.tsx index 6932d5f0e2..876682ca21 100644 --- a/packages/features/shell/user-dropdown/UserDropdown.tsx +++ b/packages/features/shell/user-dropdown/UserDropdown.tsx @@ -2,7 +2,6 @@ import { signOut } from "next-auth/react"; import { usePathname } from "next/navigation"; import { useEffect, useState } from "react"; -import { classNames } from "@calcom/lib"; import { ROADMAP, DESKTOP_APP_LINK } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery"; @@ -17,6 +16,7 @@ import { DropdownMenuTrigger, Icon, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; // TODO (Platform): we shouldnt be importing from web here import { useGetUserAttributes } from "@calcom/web/components/settings/platform/hooks/useGetUserAttributes"; diff --git a/packages/features/timezone-buddy/components/TimeDial.tsx b/packages/features/timezone-buddy/components/TimeDial.tsx index 29d558a883..b8810522e9 100644 --- a/packages/features/timezone-buddy/components/TimeDial.tsx +++ b/packages/features/timezone-buddy/components/TimeDial.tsx @@ -4,8 +4,8 @@ import { useStore } from "zustand"; import type { Dayjs } from "@calcom/dayjs"; import dayjs from "@calcom/dayjs"; -import { classNames } from "@calcom/lib"; import type { DateRange } from "@calcom/lib/date-ranges"; +import classNames from "@calcom/ui/classNames"; import { DAY_CELL_WIDTH } from "../constants"; import { TBContext } from "../store"; diff --git a/packages/features/tips/UpgradeTip.tsx b/packages/features/tips/UpgradeTip.tsx index 73b0485e76..f345454621 100644 --- a/packages/features/tips/UpgradeTip.tsx +++ b/packages/features/tips/UpgradeTip.tsx @@ -1,10 +1,10 @@ import type { ReactNode } from "react"; -import { classNames } from "@calcom/lib"; import { useHasTeamPlan } from "@calcom/lib/hooks/useHasPaidPlan"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useGetTheme } from "@calcom/lib/hooks/useTheme"; import { trpc } from "@calcom/trpc"; +import classNames from "@calcom/ui/classNames"; export function UpgradeTip({ title, diff --git a/packages/features/troubleshooter/Troubleshooter.tsx b/packages/features/troubleshooter/Troubleshooter.tsx index be30ea9fde..029064d9d9 100644 --- a/packages/features/troubleshooter/Troubleshooter.tsx +++ b/packages/features/troubleshooter/Troubleshooter.tsx @@ -1,5 +1,5 @@ -import classNames from "@calcom/lib/classNames"; import useMediaQuery from "@calcom/lib/hooks/useMediaQuery"; +import classNames from "@calcom/ui/classNames"; import { LargeCalendar } from "./components/LargeCalendar"; import { TroubleshooterHeader } from "./components/TroubleshooterHeader"; diff --git a/packages/features/troubleshooter/components/TroubleshooterListItemContainer.tsx b/packages/features/troubleshooter/components/TroubleshooterListItemContainer.tsx index 0d5bb956a3..81a51c7328 100644 --- a/packages/features/troubleshooter/components/TroubleshooterListItemContainer.tsx +++ b/packages/features/troubleshooter/components/TroubleshooterListItemContainer.tsx @@ -1,6 +1,6 @@ import type { PropsWithChildren } from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; interface TroubleshooterListItemContainerProps { title: string; diff --git a/packages/features/users/components/UserTable/BulkActions/EventTypesList.tsx b/packages/features/users/components/UserTable/BulkActions/EventTypesList.tsx index cb02fb6c7b..95d1327096 100644 --- a/packages/features/users/components/UserTable/BulkActions/EventTypesList.tsx +++ b/packages/features/users/components/UserTable/BulkActions/EventTypesList.tsx @@ -3,7 +3,6 @@ import type { Dispatch, SetStateAction } from "react"; import { useState, Fragment } from "react"; import { DataTableSelectionBar } from "@calcom/features/data-table"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { SchedulingType } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc"; @@ -22,6 +21,7 @@ import { PopoverTrigger, Icon, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { UserTableUser } from "../types"; diff --git a/packages/features/users/components/UserTable/BulkActions/MassAssignAttributes.tsx b/packages/features/users/components/UserTable/BulkActions/MassAssignAttributes.tsx index d1c4acabe6..ff7abccabb 100644 --- a/packages/features/users/components/UserTable/BulkActions/MassAssignAttributes.tsx +++ b/packages/features/users/components/UserTable/BulkActions/MassAssignAttributes.tsx @@ -3,7 +3,6 @@ import { createContext, useContext, useState, useMemo, type PropsWithChildren } import type { Dispatch, SetStateAction } from "react"; import { DataTableSelectionBar, type ColumnFilter } from "@calcom/features/data-table"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; import type { Attribute as _Attribute, AttributeOption } from "@calcom/prisma/client"; @@ -24,6 +23,7 @@ import { PopoverTrigger, showToast, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { UserTableUser } from "../types"; diff --git a/packages/features/users/components/UserTable/BulkActions/TeamList.tsx b/packages/features/users/components/UserTable/BulkActions/TeamList.tsx index 7b73a5bfbc..2b3553cc21 100644 --- a/packages/features/users/components/UserTable/BulkActions/TeamList.tsx +++ b/packages/features/users/components/UserTable/BulkActions/TeamList.tsx @@ -3,7 +3,6 @@ import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; import { DataTableSelectionBar } from "@calcom/features/data-table"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc"; import { @@ -20,6 +19,7 @@ import { PopoverTrigger, showToast, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { UserTableUser } from "../types"; diff --git a/packages/features/users/components/UserTable/UserListTable.tsx b/packages/features/users/components/UserTable/UserListTable.tsx index cf66c7f910..69563cbb0a 100644 --- a/packages/features/users/components/UserTable/UserListTable.tsx +++ b/packages/features/users/components/UserTable/UserListTable.tsx @@ -23,7 +23,6 @@ import { convertFacetedValuesToMap, } from "@calcom/features/data-table"; import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider"; -import classNames from "@calcom/lib/classNames"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { downloadAsCsv, @@ -34,6 +33,7 @@ import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc"; import { Avatar, Badge, Checkbox, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { useGetUserAttributes } from "@calcom/web/components/settings/platform/hooks/useGetUserAttributes"; import { DeleteBulkUsers } from "./BulkActions/DeleteBulkUsers"; diff --git a/packages/features/users/components/UserTable/UserTableActions.tsx b/packages/features/users/components/UserTable/UserTableActions.tsx index 40ee9d9a58..b60ef235d8 100644 --- a/packages/features/users/components/UserTable/UserTableActions.tsx +++ b/packages/features/users/components/UserTable/UserTableActions.tsx @@ -1,6 +1,5 @@ import { useSession } from "next-auth/react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { @@ -16,6 +15,7 @@ import { DropdownMenuSeparator, showToast, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import type { UserTableUser, UserTableAction } from "./types"; diff --git a/packages/features/webhooks/components/EventTypeWebhookListItem.tsx b/packages/features/webhooks/components/EventTypeWebhookListItem.tsx index c34a6e90b3..b6a85c5c20 100644 --- a/packages/features/webhooks/components/EventTypeWebhookListItem.tsx +++ b/packages/features/webhooks/components/EventTypeWebhookListItem.tsx @@ -1,4 +1,3 @@ -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { WebhookTriggerEvents } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; @@ -15,6 +14,7 @@ import { Switch, Tooltip, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type WebhookProps = { id: string; diff --git a/packages/features/webhooks/components/WebhookListItem.tsx b/packages/features/webhooks/components/WebhookListItem.tsx index 6371899a1f..cce2a4d7a8 100644 --- a/packages/features/webhooks/components/WebhookListItem.tsx +++ b/packages/features/webhooks/components/WebhookListItem.tsx @@ -1,4 +1,3 @@ -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { WebhookTriggerEvents } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; @@ -15,6 +14,7 @@ import { Switch, Tooltip, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type WebhookProps = { id: string; diff --git a/packages/features/webhooks/pages/webhooks-view.tsx b/packages/features/webhooks/pages/webhooks-view.tsx index 2c6a41b978..e2ee9442a9 100644 --- a/packages/features/webhooks/pages/webhooks-view.tsx +++ b/packages/features/webhooks/pages/webhooks-view.tsx @@ -4,7 +4,6 @@ import { useSession } from "next-auth/react"; import { useRouter } from "next/navigation"; import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader"; -import classNames from "@calcom/lib/classNames"; import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants"; import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -12,6 +11,7 @@ import { UserPermissionRole } from "@calcom/prisma/enums"; import { trpc } from "@calcom/trpc/react"; import type { WebhooksByViewer } from "@calcom/trpc/server/routers/viewer/webhook/getByViewer.handler"; import { Avatar, EmptyScreen, SkeletonContainer, SkeletonText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { WebhookListItem, CreateNewWebhookButton } from "../components"; diff --git a/packages/lib/hooks/useLastUsed.tsx b/packages/lib/hooks/useLastUsed.tsx index e6ba6cc2b3..0ab3a23f0a 100644 --- a/packages/lib/hooks/useLastUsed.tsx +++ b/packages/lib/hooks/useLastUsed.tsx @@ -1,8 +1,8 @@ import { useState, useEffect } from "react"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { localStorage } from "@calcom/lib/webstorage"; +import classNames from "@calcom/ui/classNames"; type LoginType = "saml" | "google" | "credentials"; diff --git a/packages/lib/index.ts b/packages/lib/index.ts index 96f77226b6..bee6e6177b 100644 --- a/packages/lib/index.ts +++ b/packages/lib/index.ts @@ -1,4 +1,3 @@ -export { default as classNames } from "./classNames"; export { default as isPrismaObj, isPrismaObjOrUndefined } from "./isPrismaObj"; export * from "./isRecurringEvent"; export * from "./isBookingLimits"; diff --git a/packages/lib/package.json b/packages/lib/package.json index 81b1d83e27..34f32e5e80 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -28,7 +28,6 @@ "next-i18next": "^13.2.2", "rrule": "^2.7.1", "sonner": "^1.7.4", - "tailwind-merge": "^1.13.2", "tsdav": "2.0.3", "tslog": "^4.9.2", "uuid": "^8.3.2" diff --git a/packages/platform/atoms/availability/AvailabilitySettings.tsx b/packages/platform/atoms/availability/AvailabilitySettings.tsx index 888f1b6358..0dd0d44b7e 100644 --- a/packages/platform/atoms/availability/AvailabilitySettings.tsx +++ b/packages/platform/atoms/availability/AvailabilitySettings.tsx @@ -16,7 +16,6 @@ import WebSchedule, { } from "@calcom/features/schedules/components/Schedule"; import WebShell from "@calcom/features/shell/Shell"; import { availabilityAsString } from "@calcom/lib/availability"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { sortAvailabilityStrings } from "@calcom/lib/weekstart"; import type { RouterOutputs } from "@calcom/trpc/react"; @@ -38,6 +37,7 @@ import { VerticalDivider, } from "@calcom/ui"; import { Icon } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { Shell as PlatformShell } from "../src/components/ui/shell"; import { cn } from "../src/lib/utils"; diff --git a/packages/platform/atoms/destination-calendar/DestinationCalendarSelector.tsx b/packages/platform/atoms/destination-calendar/DestinationCalendarSelector.tsx index 4ab23e8a53..e1c299e194 100644 --- a/packages/platform/atoms/destination-calendar/DestinationCalendarSelector.tsx +++ b/packages/platform/atoms/destination-calendar/DestinationCalendarSelector.tsx @@ -4,10 +4,10 @@ import { useState, useEffect, useMemo } from "react"; import { SingleValueComponent } from "@calcom/features/calendars/DestinationCalendarSelector"; import { OptionComponent } from "@calcom/features/calendars/DestinationCalendarSelector"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { ConnectedDestinationCalendars } from "@calcom/platform-libraries"; import { Badge, Select } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { getPlaceholderContent } from "../lib/getPlaceholderContent"; diff --git a/packages/platform/atoms/src/components/atoms-wrapper.tsx b/packages/platform/atoms/src/components/atoms-wrapper.tsx index dd8548c935..d683bfdbd0 100644 --- a/packages/platform/atoms/src/components/atoms-wrapper.tsx +++ b/packages/platform/atoms/src/components/atoms-wrapper.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { useAtomsContext } from "../../hooks/useAtomsContext"; import { CALCOM_ATOMS_WRAPPER_CLASS } from "../constants/styles"; diff --git a/packages/lib/classNames.ts b/packages/ui/classNames.ts similarity index 100% rename from packages/lib/classNames.ts rename to packages/ui/classNames.ts diff --git a/packages/ui/components/app-list-card/AppListCard.tsx b/packages/ui/components/app-list-card/AppListCard.tsx index cf1988d141..a391a6d588 100644 --- a/packages/ui/components/app-list-card/AppListCard.tsx +++ b/packages/ui/components/app-list-card/AppListCard.tsx @@ -1,10 +1,10 @@ "use client"; import type { AppListCardProps } from "@calcom/features/apps/components/AppListCard"; -import classNames from "@calcom/lib/classNames"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Avatar, Badge, Icon, ListItemText } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export const AppListCard = (props: AppListCardProps & { highlight?: boolean }) => { const { t } = useLocale(); diff --git a/packages/ui/components/apps/AllApps.tsx b/packages/ui/components/apps/AllApps.tsx index 02264aec24..9b19b6a78c 100644 --- a/packages/ui/components/apps/AllApps.tsx +++ b/packages/ui/components/apps/AllApps.tsx @@ -5,11 +5,11 @@ import type { AppCategories } from "@prisma/client"; import type { UIEvent } from "react"; import { useEffect, useRef, useState } from "react"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { UserAdminTeams } from "@calcom/lib/server/repository/user"; import type { AppFrontendPayload as App } from "@calcom/types/App"; import type { CredentialFrontendPayload as Credential } from "@calcom/types/Credential"; +import classNames from "@calcom/ui/classNames"; import { EmptyScreen } from "../empty-screen"; import { Icon } from "../icon"; diff --git a/packages/ui/components/apps/AppCard.tsx b/packages/ui/components/apps/AppCard.tsx index 81d7243231..caa41347fd 100644 --- a/packages/ui/components/apps/AppCard.tsx +++ b/packages/ui/components/apps/AppCard.tsx @@ -8,7 +8,6 @@ import { InstallAppButton } from "@calcom/app-store/components"; import { doesAppSupportTeamInstall, isConferencing } from "@calcom/app-store/utils"; import { AppOnboardingSteps } from "@calcom/lib/apps/appOnboardingSteps"; import { getAppOnboardingUrl } from "@calcom/lib/apps/getAppOnboardingUrl"; -import classNames from "@calcom/lib/classNames"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { UserAdminTeams } from "@calcom/lib/server/repository/user"; @@ -16,6 +15,7 @@ import type { AppFrontendPayload as App } from "@calcom/types/App"; import type { CredentialFrontendPayload as Credential } from "@calcom/types/Credential"; import type { ButtonProps } from "@calcom/ui"; import { Badge, showToast } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; import { Button } from "../button"; diff --git a/packages/ui/components/avatar/Avatar.tsx b/packages/ui/components/avatar/Avatar.tsx index 2ffebce835..68fe60640d 100644 --- a/packages/ui/components/avatar/Avatar.tsx +++ b/packages/ui/components/avatar/Avatar.tsx @@ -3,8 +3,8 @@ import { Provider as TooltipPrimitiveProvider } from "@radix-ui/react-tooltip"; import { cva } from "class-variance-authority"; import Link from "next/link"; -import classNames from "@calcom/lib/classNames"; import { AVATAR_FALLBACK } from "@calcom/lib/constants"; +import classNames from "@calcom/ui/classNames"; import { Tooltip } from "../tooltip"; diff --git a/packages/ui/components/avatar/AvatarGroup.tsx b/packages/ui/components/avatar/AvatarGroup.tsx index 68a9018c1d..ae8c37f748 100644 --- a/packages/ui/components/avatar/AvatarGroup.tsx +++ b/packages/ui/components/avatar/AvatarGroup.tsx @@ -1,4 +1,4 @@ -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; import { Avatar } from "./Avatar"; diff --git a/packages/ui/components/avatar/UserAvatar.tsx b/packages/ui/components/avatar/UserAvatar.tsx index f209a097e6..811c963df5 100644 --- a/packages/ui/components/avatar/UserAvatar.tsx +++ b/packages/ui/components/avatar/UserAvatar.tsx @@ -1,9 +1,9 @@ -import { classNames } from "@calcom/lib"; import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage"; import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl"; import type { User } from "@calcom/prisma/client"; import type { UserProfile } from "@calcom/types/UserProfile"; import { Avatar } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; type Organization = { id: number; diff --git a/packages/ui/components/badge/Badge.tsx b/packages/ui/components/badge/Badge.tsx index 64c364fc6d..eba2054b83 100644 --- a/packages/ui/components/badge/Badge.tsx +++ b/packages/ui/components/badge/Badge.tsx @@ -2,7 +2,7 @@ import type { VariantProps } from "class-variance-authority"; import { cva } from "class-variance-authority"; import React from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; import { Icon } from "../icon"; import type { IconName } from "../icon"; diff --git a/packages/ui/components/button/Button.tsx b/packages/ui/components/button/Button.tsx index f9de090fa3..3add1deeaa 100644 --- a/packages/ui/components/button/Button.tsx +++ b/packages/ui/components/button/Button.tsx @@ -4,7 +4,7 @@ import type { LinkProps } from "next/link"; import Link from "next/link"; import React, { forwardRef } from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; import { Icon } from "../icon"; import type { IconName } from "../icon"; diff --git a/packages/ui/components/buttonGroup/ButtonGroup.tsx b/packages/ui/components/buttonGroup/ButtonGroup.tsx index 93f92b9436..d35e910f00 100644 --- a/packages/ui/components/buttonGroup/ButtonGroup.tsx +++ b/packages/ui/components/buttonGroup/ButtonGroup.tsx @@ -1,6 +1,6 @@ import React from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; type Props = { children: React.ReactNode; combined?: boolean; containerProps?: JSX.IntrinsicElements["div"] }; diff --git a/packages/ui/components/calendar-switch/CalendarSwitch.tsx b/packages/ui/components/calendar-switch/CalendarSwitch.tsx index d8b02de0b4..1dc616de1d 100644 --- a/packages/ui/components/calendar-switch/CalendarSwitch.tsx +++ b/packages/ui/components/calendar-switch/CalendarSwitch.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from "react"; import { type ICalendarSwitchProps } from "@calcom/features/calendars/CalendarSwitch"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { Icon } from "../icon"; diff --git a/packages/ui/components/card/Card.tsx b/packages/ui/components/card/Card.tsx index 62ea4b4206..b9d42dba88 100644 --- a/packages/ui/components/card/Card.tsx +++ b/packages/ui/components/card/Card.tsx @@ -5,7 +5,7 @@ import Link from "next/link"; import type { ReactNode } from "react"; import React from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; import { Button } from "../button"; diff --git a/packages/ui/components/card/FormCard.tsx b/packages/ui/components/card/FormCard.tsx index f31f605038..0a5cd57e21 100644 --- a/packages/ui/components/card/FormCard.tsx +++ b/packages/ui/components/card/FormCard.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; import { useState } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import type { BadgeProps } from "../badge"; import { Badge } from "../badge"; diff --git a/packages/ui/components/command/index.tsx b/packages/ui/components/command/index.tsx index 96442f31d0..802e83f563 100644 --- a/packages/ui/components/command/index.tsx +++ b/packages/ui/components/command/index.tsx @@ -2,7 +2,7 @@ import type { DialogProps } from "@radix-ui/react-dialog"; import { Command as CommandPrimitive } from "cmdk"; import * as React from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { Dialog, DialogContent } from "../dialog"; diff --git a/packages/ui/components/dialog/Dialog.tsx b/packages/ui/components/dialog/Dialog.tsx index f689333683..035731f270 100644 --- a/packages/ui/components/dialog/Dialog.tsx +++ b/packages/ui/components/dialog/Dialog.tsx @@ -8,9 +8,9 @@ import React, { useMemo, useState } from "react"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; import { Dialog as PlatformDialogPrimitives } from "@calcom/atoms/monorepo"; -import { classNames } from "@calcom/lib"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; import type { ButtonProps } from "../button"; import { Button } from "../button"; diff --git a/packages/ui/components/divider/Divider.tsx b/packages/ui/components/divider/Divider.tsx index 791126fc24..c568b9c4e0 100644 --- a/packages/ui/components/divider/Divider.tsx +++ b/packages/ui/components/divider/Divider.tsx @@ -1,4 +1,4 @@ -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; export function Divider({ className, ...props }: JSX.IntrinsicElements["hr"]) { className = classNames("border-subtle my-1", className); diff --git a/packages/ui/components/dropdown/Dropdown.tsx b/packages/ui/components/dropdown/Dropdown.tsx index cd7e873dad..259ef47333 100644 --- a/packages/ui/components/dropdown/Dropdown.tsx +++ b/packages/ui/components/dropdown/Dropdown.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; import type { ComponentProps } from "react"; import { forwardRef } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import type { ButtonColor } from "../button"; import { Icon } from "../icon"; diff --git a/packages/ui/components/editor/Editor.tsx b/packages/ui/components/editor/Editor.tsx index 1f9cc24a61..c7b1de53f2 100644 --- a/packages/ui/components/editor/Editor.tsx +++ b/packages/ui/components/editor/Editor.tsx @@ -14,7 +14,7 @@ import { HeadingNode, QuoteNode } from "@lexical/rich-text"; import { TableCellNode, TableNode, TableRowNode } from "@lexical/table"; import type { Dispatch, SetStateAction } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import ExampleTheme from "./ExampleTheme"; import { VariableNode } from "./nodes/VariableNode"; diff --git a/packages/ui/components/editor/plugins/AddVariablesPlugin.tsx b/packages/ui/components/editor/plugins/AddVariablesPlugin.tsx index 13959961a1..1d670edaae 100644 --- a/packages/ui/components/editor/plugins/AddVariablesPlugin.tsx +++ b/packages/ui/components/editor/plugins/AddVariablesPlugin.tsx @@ -11,8 +11,8 @@ import { TextNode } from "lexical"; import { useCallback, useEffect, useMemo, useState } from "react"; import { createPortal } from "react-dom"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; import { VariableNode, $createVariableNode } from "../nodes/VariableNode"; diff --git a/packages/ui/components/empty-screen/EmptyScreen.tsx b/packages/ui/components/empty-screen/EmptyScreen.tsx index e171a48804..5ef55d3596 100644 --- a/packages/ui/components/empty-screen/EmptyScreen.tsx +++ b/packages/ui/components/empty-screen/EmptyScreen.tsx @@ -1,7 +1,7 @@ import type { ReactNode } from "react"; import React from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { Button } from "../button"; import type { IconName } from "../icon"; diff --git a/packages/ui/components/filter-select/index.tsx b/packages/ui/components/filter-select/index.tsx index c8a07e078a..3b47d4a595 100644 --- a/packages/ui/components/filter-select/index.tsx +++ b/packages/ui/components/filter-select/index.tsx @@ -1,4 +1,3 @@ -import { classNames } from "@calcom/lib"; import type { IconName } from "@calcom/ui"; import { Button, @@ -15,6 +14,7 @@ import { Badge, Icon, } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; export interface FilterOption { value: string | number; diff --git a/packages/ui/components/form/checkbox/Checkbox.tsx b/packages/ui/components/form/checkbox/Checkbox.tsx index c63a5fe9cb..f45c194d59 100644 --- a/packages/ui/components/form/checkbox/Checkbox.tsx +++ b/packages/ui/components/form/checkbox/Checkbox.tsx @@ -3,8 +3,8 @@ import { useId } from "@radix-ui/react-id"; import type { InputHTMLAttributes } from "react"; import React, { forwardRef } from "react"; -import classNames from "@calcom/lib/classNames"; import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML"; +import classNames from "@calcom/ui/classNames"; import { Icon } from "../../icon"; diff --git a/packages/ui/components/form/checkbox/MultiSelectCheckboxes.tsx b/packages/ui/components/form/checkbox/MultiSelectCheckboxes.tsx index 8a684ab767..d421a01840 100644 --- a/packages/ui/components/form/checkbox/MultiSelectCheckboxes.tsx +++ b/packages/ui/components/form/checkbox/MultiSelectCheckboxes.tsx @@ -10,8 +10,8 @@ import type { import { components } from "react-select"; import type { Props } from "react-select"; -import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; import { Select } from "../select"; diff --git a/packages/ui/components/form/color-picker/colorpicker.tsx b/packages/ui/components/form/color-picker/colorpicker.tsx index d30482c98e..bd506ba6ad 100644 --- a/packages/ui/components/form/color-picker/colorpicker.tsx +++ b/packages/ui/components/form/color-picker/colorpicker.tsx @@ -4,9 +4,9 @@ import * as Popover from "@radix-ui/react-popover"; import { useState } from "react"; import { HexColorInput, HexColorPicker } from "react-colorful"; -import cx from "@calcom/lib/classNames"; import { fallBackHex, isValidHexCode } from "@calcom/lib/getBrandColours"; import { Button } from "@calcom/ui"; +import cx from "@calcom/ui/classNames"; export type ColorPickerProps = { defaultValue: string; diff --git a/packages/ui/components/form/date-range-picker/Calendar.tsx b/packages/ui/components/form/date-range-picker/Calendar.tsx index effc2c941a..fc71b535f7 100644 --- a/packages/ui/components/form/date-range-picker/Calendar.tsx +++ b/packages/ui/components/form/date-range-picker/Calendar.tsx @@ -4,7 +4,7 @@ import * as React from "react"; import { DayPicker } from "react-day-picker"; import dayjs from "@calcom/dayjs"; -import { classNames as cn } from "@calcom/lib"; +import cn from "@calcom/ui/classNames"; import { buttonClasses } from "../../button/Button"; import { Icon } from "../../icon"; diff --git a/packages/ui/components/form/date-range-picker/DateRangePicker.tsx b/packages/ui/components/form/date-range-picker/DateRangePicker.tsx index 2140697e8e..a8d371de52 100644 --- a/packages/ui/components/form/date-range-picker/DateRangePicker.tsx +++ b/packages/ui/components/form/date-range-picker/DateRangePicker.tsx @@ -4,7 +4,7 @@ import * as Popover from "@radix-ui/react-popover"; import { format } from "date-fns"; import * as React from "react"; -import { classNames as cn } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { Button } from "../../button"; import { Calendar } from "./Calendar"; @@ -61,14 +61,14 @@ export function DatePickerWithRange({ } return ( -
+
diff --git a/packages/ui/components/form/inputs/Input.tsx b/packages/ui/components/form/inputs/Input.tsx index 0f623ca6c9..18a182086b 100644 --- a/packages/ui/components/form/inputs/Input.tsx +++ b/packages/ui/components/form/inputs/Input.tsx @@ -4,8 +4,8 @@ import type { ReactNode } from "react"; import React, { forwardRef, useCallback, useId, useState } from "react"; import { useFormContext } from "react-hook-form"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; import { Alert } from "../../alert"; import { Icon } from "../../icon"; diff --git a/packages/ui/components/form/inputs/Label.tsx b/packages/ui/components/form/inputs/Label.tsx index eda371a89b..c451731805 100644 --- a/packages/ui/components/form/inputs/Label.tsx +++ b/packages/ui/components/form/inputs/Label.tsx @@ -1,4 +1,4 @@ -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; export function Label(props: JSX.IntrinsicElements["label"]) { const { className, ...restProps } = props; diff --git a/packages/ui/components/form/inputs/TextField.tsx b/packages/ui/components/form/inputs/TextField.tsx index f9da182278..ad01e84ebd 100644 --- a/packages/ui/components/form/inputs/TextField.tsx +++ b/packages/ui/components/form/inputs/TextField.tsx @@ -3,8 +3,8 @@ import { cva } from "class-variance-authority"; import React, { forwardRef, useId, useState } from "react"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; import { Icon } from "../../icon"; import { HintsOrErrors } from "./HintOrErrors"; diff --git a/packages/ui/components/form/select/Select.tsx b/packages/ui/components/form/select/Select.tsx index d26d54d32c..33eb270615 100644 --- a/packages/ui/components/form/select/Select.tsx +++ b/packages/ui/components/form/select/Select.tsx @@ -3,8 +3,8 @@ import * as React from "react"; import type { GroupBase, Props, SingleValue, MultiValue } from "react-select"; import ReactSelect from "react-select"; -import cx from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import cx from "@calcom/ui/classNames"; import { Label } from "../inputs/Label"; import { inputStyles } from "../inputs/TextField"; diff --git a/packages/ui/components/form/select/components.tsx b/packages/ui/components/form/select/components.tsx index c68d248c06..98431f2c2a 100644 --- a/packages/ui/components/form/select/components.tsx +++ b/packages/ui/components/form/select/components.tsx @@ -1,7 +1,7 @@ import type { GroupBase, InputProps, OptionProps, ControlProps } from "react-select"; import { components as reactSelectComponents } from "react-select"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { UpgradeTeamsBadge } from "../../badge"; import { Icon } from "../../icon"; diff --git a/packages/ui/components/form/slider/index.tsx b/packages/ui/components/form/slider/index.tsx index a837ba18c3..d89744bd25 100644 --- a/packages/ui/components/form/slider/index.tsx +++ b/packages/ui/components/form/slider/index.tsx @@ -3,7 +3,7 @@ import * as SliderPrimitive from "@radix-ui/react-slider"; import * as React from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; const Slider = React.forwardRef< React.ElementRef, diff --git a/packages/ui/components/form/step/FormStep.tsx b/packages/ui/components/form/step/FormStep.tsx index ead893f51a..9866880b9e 100644 --- a/packages/ui/components/form/step/FormStep.tsx +++ b/packages/ui/components/form/step/FormStep.tsx @@ -1,6 +1,6 @@ import React from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; type Props = { steps: number; diff --git a/packages/ui/components/form/step/Steps.tsx b/packages/ui/components/form/step/Steps.tsx index e1f62674cc..329842693e 100644 --- a/packages/ui/components/form/step/Steps.tsx +++ b/packages/ui/components/form/step/Steps.tsx @@ -1,4 +1,4 @@ -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; type StepWithNav = { maxSteps: number; diff --git a/packages/ui/components/form/switch/SettingsToggle.tsx b/packages/ui/components/form/switch/SettingsToggle.tsx index 77081183c9..a58ec94fe9 100644 --- a/packages/ui/components/form/switch/SettingsToggle.tsx +++ b/packages/ui/components/form/switch/SettingsToggle.tsx @@ -1,7 +1,7 @@ import { useAutoAnimate } from "@formkit/auto-animate/react"; import type { ReactNode } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { Label } from "../inputs/Label"; import Switch from "./Switch"; diff --git a/packages/ui/components/form/switch/Switch.tsx b/packages/ui/components/form/switch/Switch.tsx index 08d8d3c4ed..2c97b2313b 100644 --- a/packages/ui/components/form/switch/Switch.tsx +++ b/packages/ui/components/form/switch/Switch.tsx @@ -4,7 +4,7 @@ import * as PrimitiveSwitch from "@radix-ui/react-switch"; import type { ReactNode } from "react"; import React from "react"; -import cx from "@calcom/lib/classNames"; +import cx from "@calcom/ui/classNames"; import { Tooltip } from "../../tooltip"; diff --git a/packages/ui/components/form/timezone-select/TimezoneSelect.tsx b/packages/ui/components/form/timezone-select/TimezoneSelect.tsx index 835d7507b5..cbd9364604 100644 --- a/packages/ui/components/form/timezone-select/TimezoneSelect.tsx +++ b/packages/ui/components/form/timezone-select/TimezoneSelect.tsx @@ -4,11 +4,11 @@ import { useMemo, useState } from "react"; import type { ITimezoneOption, ITimezone, Props as SelectProps } from "react-timezone-select"; import BaseSelect from "react-timezone-select"; -import { classNames } from "@calcom/lib"; import { CALCOM_VERSION } from "@calcom/lib/constants"; import { filterBySearchText, addTimezonesToDropdown, handleOptionLabel } from "@calcom/lib/timezone"; import type { Timezones } from "@calcom/lib/timezone"; import { trpc } from "@calcom/trpc/react"; +import classNames from "@calcom/ui/classNames"; import { inputStyles } from "../inputs/TextField"; import { getReactSelectProps } from "../select"; diff --git a/packages/ui/components/form/toggleGroup/BooleanToggleGroup.tsx b/packages/ui/components/form/toggleGroup/BooleanToggleGroup.tsx index b2182f2a08..bfc62ecfe4 100644 --- a/packages/ui/components/form/toggleGroup/BooleanToggleGroup.tsx +++ b/packages/ui/components/form/toggleGroup/BooleanToggleGroup.tsx @@ -4,8 +4,8 @@ import { useId } from "@radix-ui/react-id"; import { Root as ToggleGroupPrimitive, Item as ToggleGroupItemPrimitive } from "@radix-ui/react-toggle-group"; import { useState } from "react"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; import { Label } from "../../../components/form/inputs/Label"; diff --git a/packages/ui/components/form/toggleGroup/ToggleGroup.tsx b/packages/ui/components/form/toggleGroup/ToggleGroup.tsx index 494cda9f71..0e080d9cee 100644 --- a/packages/ui/components/form/toggleGroup/ToggleGroup.tsx +++ b/packages/ui/components/form/toggleGroup/ToggleGroup.tsx @@ -1,8 +1,8 @@ import * as RadixToggleGroup from "@radix-ui/react-toggle-group"; import type { ReactNode } from "react"; -import { classNames } from "@calcom/lib"; import { Tooltip } from "@calcom/ui"; +import classNames from "@calcom/ui/classNames"; interface ToggleGroupProps extends Omit { options: { diff --git a/packages/ui/components/form/wizard/WizardForm.tsx b/packages/ui/components/form/wizard/WizardForm.tsx index 01595c5d73..434ae7e7a3 100644 --- a/packages/ui/components/form/wizard/WizardForm.tsx +++ b/packages/ui/components/form/wizard/WizardForm.tsx @@ -6,8 +6,8 @@ import { useRouter } from "next/navigation"; import type { Dispatch, SetStateAction } from "react"; import { useEffect, useState } from "react"; -import classNames from "@calcom/lib/classNames"; import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams"; +import classNames from "@calcom/ui/classNames"; import { Button } from "../../button"; import { Steps } from "../../form/step"; diff --git a/packages/ui/components/hover-card/index.tsx b/packages/ui/components/hover-card/index.tsx index 8af636396d..2765b8a6ed 100644 --- a/packages/ui/components/hover-card/index.tsx +++ b/packages/ui/components/hover-card/index.tsx @@ -3,7 +3,7 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card"; import * as React from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; const HoverCard = HoverCardPrimitive.Root; diff --git a/packages/ui/components/icon/Icon.tsx b/packages/ui/components/icon/Icon.tsx index ef1aa29681..14e0f519e9 100644 --- a/packages/ui/components/icon/Icon.tsx +++ b/packages/ui/components/icon/Icon.tsx @@ -1,6 +1,6 @@ import { type SVGProps } from "react"; -import cn from "@calcom/lib/classNames"; +import cn from "@calcom/ui/classNames"; import type { IconName } from "./icon-names"; diff --git a/packages/ui/components/layout/ShellSubHeading.tsx b/packages/ui/components/layout/ShellSubHeading.tsx index ba09fe9338..e70b5fe242 100644 --- a/packages/ui/components/layout/ShellSubHeading.tsx +++ b/packages/ui/components/layout/ShellSubHeading.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; export function ShellSubHeading(props: { title: ReactNode; diff --git a/packages/ui/components/list/List.tsx b/packages/ui/components/list/List.tsx index dffc037053..09dd61eb47 100644 --- a/packages/ui/components/list/List.tsx +++ b/packages/ui/components/list/List.tsx @@ -1,8 +1,8 @@ import Link from "next/link"; import { createElement } from "react"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; import { Badge } from "../badge"; diff --git a/packages/ui/components/logo/Logo.tsx b/packages/ui/components/logo/Logo.tsx index 1f8d301687..3abf13e73c 100644 --- a/packages/ui/components/logo/Logo.tsx +++ b/packages/ui/components/logo/Logo.tsx @@ -1,4 +1,4 @@ -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; export default function Logo({ small, diff --git a/packages/ui/components/navigation/NavigationItem.tsx b/packages/ui/components/navigation/NavigationItem.tsx index 7cf79d4482..021fbecba3 100644 --- a/packages/ui/components/navigation/NavigationItem.tsx +++ b/packages/ui/components/navigation/NavigationItem.tsx @@ -1,7 +1,7 @@ import { cva } from "class-variance-authority"; import { Fragment } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { ButtonOrLink } from "../dropdown"; import { Icon } from "../icon"; diff --git a/packages/ui/components/navigation/tabs/HorizontalTabItem.tsx b/packages/ui/components/navigation/tabs/HorizontalTabItem.tsx index 2cca8a64fa..c974de3ab9 100644 --- a/packages/ui/components/navigation/tabs/HorizontalTabItem.tsx +++ b/packages/ui/components/navigation/tabs/HorizontalTabItem.tsx @@ -1,7 +1,7 @@ import Link from "next/link"; -import classNames from "@calcom/lib/classNames"; import { useUrlMatchesCurrentUrl } from "@calcom/lib/hooks/useUrlMatchesCurrentUrl"; +import classNames from "@calcom/ui/classNames"; import { Avatar } from "../../avatar"; import { Icon } from "../../icon"; diff --git a/packages/ui/components/navigation/tabs/VerticalTabItem.tsx b/packages/ui/components/navigation/tabs/VerticalTabItem.tsx index a1d857794c..1663a44300 100644 --- a/packages/ui/components/navigation/tabs/VerticalTabItem.tsx +++ b/packages/ui/components/navigation/tabs/VerticalTabItem.tsx @@ -1,8 +1,8 @@ import Link from "next/link"; import { Fragment } from "react"; -import classNames from "@calcom/lib/classNames"; import { useUrlMatchesCurrentUrl } from "@calcom/lib/hooks/useUrlMatchesCurrentUrl"; +import classNames from "@calcom/ui/classNames"; import { Icon } from "../../icon"; import type { IconName } from "../../icon"; diff --git a/packages/ui/components/navigation/tabs/VerticalTabs.tsx b/packages/ui/components/navigation/tabs/VerticalTabs.tsx index 84a27a5ffd..15eea0c204 100644 --- a/packages/ui/components/navigation/tabs/VerticalTabs.tsx +++ b/packages/ui/components/navigation/tabs/VerticalTabs.tsx @@ -1,4 +1,4 @@ -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import type { VerticalTabItemProps } from "./VerticalTabItem"; import VerticalTabItem from "./VerticalTabItem"; diff --git a/packages/ui/components/organization-banner/OrgBanner.tsx b/packages/ui/components/organization-banner/OrgBanner.tsx index 41f0e7cc73..dd4b6e299f 100644 --- a/packages/ui/components/organization-banner/OrgBanner.tsx +++ b/packages/ui/components/organization-banner/OrgBanner.tsx @@ -1,6 +1,6 @@ import Image from "next/image"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; type Maybe = T | null | undefined; diff --git a/packages/ui/components/popover/AnimatedPopover.tsx b/packages/ui/components/popover/AnimatedPopover.tsx index f81778ba2b..5eaaa9c900 100644 --- a/packages/ui/components/popover/AnimatedPopover.tsx +++ b/packages/ui/components/popover/AnimatedPopover.tsx @@ -1,7 +1,7 @@ import * as Popover from "@radix-ui/react-popover"; import React from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; import { buttonClasses } from "../button"; import { Icon } from "../icon"; diff --git a/packages/ui/components/popover/Popover.tsx b/packages/ui/components/popover/Popover.tsx index 748915e780..53e1d10d2d 100644 --- a/packages/ui/components/popover/Popover.tsx +++ b/packages/ui/components/popover/Popover.tsx @@ -1,7 +1,7 @@ import * as PopoverPrimitive from "@radix-ui/react-popover"; import * as React from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; const Popover = PopoverPrimitive.Root; diff --git a/packages/ui/components/scrollable/ScrollableArea.tsx b/packages/ui/components/scrollable/ScrollableArea.tsx index 0b52dd2d21..e58c2e3f84 100644 --- a/packages/ui/components/scrollable/ScrollableArea.tsx +++ b/packages/ui/components/scrollable/ScrollableArea.tsx @@ -3,7 +3,7 @@ import type { PropsWithChildren } from "react"; import React, { useRef, useEffect, useState } from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; const ScrollableArea = ({ children, className }: PropsWithChildren<{ className?: string }>) => { const scrollableRef = useRef(null); diff --git a/packages/ui/components/sheet/Sheet.tsx b/packages/ui/components/sheet/Sheet.tsx index df6e35a455..f22aad421a 100644 --- a/packages/ui/components/sheet/Sheet.tsx +++ b/packages/ui/components/sheet/Sheet.tsx @@ -1,7 +1,7 @@ import * as SheetPrimitives from "@radix-ui/react-dialog"; import * as React from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; import { Button } from "../button"; diff --git a/packages/ui/components/skeleton/Skeleton.tsx b/packages/ui/components/skeleton/Skeleton.tsx index 5d21ebb8f9..49cfdcb7cd 100644 --- a/packages/ui/components/skeleton/Skeleton.tsx +++ b/packages/ui/components/skeleton/Skeleton.tsx @@ -1,7 +1,7 @@ import React from "react"; -import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; type SkeletonBaseProps = { className?: string; diff --git a/packages/ui/components/table/Table.tsx b/packages/ui/components/table/Table.tsx index de9174f999..333e98122d 100644 --- a/packages/ui/components/table/Table.tsx +++ b/packages/ui/components/table/Table.tsx @@ -1,4 +1,4 @@ -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; interface TableProps { children: React.ReactNode; diff --git a/packages/ui/components/table/TableNew.tsx b/packages/ui/components/table/TableNew.tsx index 3791a4d76b..9907fa350a 100644 --- a/packages/ui/components/table/TableNew.tsx +++ b/packages/ui/components/table/TableNew.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import { classNames } from "@calcom/lib"; +import classNames from "@calcom/ui/classNames"; const Table = React.forwardRef>( ({ className, ...props }, ref) => ( diff --git a/packages/ui/components/tooltip/Tooltip.tsx b/packages/ui/components/tooltip/Tooltip.tsx index 6354cbeef9..dd430ba6d0 100644 --- a/packages/ui/components/tooltip/Tooltip.tsx +++ b/packages/ui/components/tooltip/Tooltip.tsx @@ -4,7 +4,7 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip"; import React from "react"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; export function Tooltip({ children, diff --git a/packages/ui/form/AddressInput.tsx b/packages/ui/form/AddressInput.tsx index 78de4c58e4..35e5bb139f 100644 --- a/packages/ui/form/AddressInput.tsx +++ b/packages/ui/form/AddressInput.tsx @@ -1,4 +1,4 @@ -import cx from "@calcom/lib/classNames"; +import cx from "@calcom/ui/classNames"; import { Input } from "../components/form"; import { Icon } from "../components/icon"; diff --git a/packages/ui/form/PhoneInput.tsx b/packages/ui/form/PhoneInput.tsx index 8bf7e20abc..3b14c9199f 100644 --- a/packages/ui/form/PhoneInput.tsx +++ b/packages/ui/form/PhoneInput.tsx @@ -6,8 +6,8 @@ import PhoneInput from "react-phone-input-2"; import "react-phone-input-2/lib/style.css"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; -import { classNames } from "@calcom/lib"; import { trpc } from "@calcom/trpc/react"; +import classNames from "@calcom/ui/classNames"; export type PhoneInputProps = { value?: string; diff --git a/packages/ui/form/Select.tsx b/packages/ui/form/Select.tsx index a9cd7add68..917f42f8c0 100644 --- a/packages/ui/form/Select.tsx +++ b/packages/ui/form/Select.tsx @@ -1,7 +1,7 @@ import type { GroupBase, InputProps, Props } from "react-select"; import ReactSelect, { components } from "react-select"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; export type SelectProps< Option, diff --git a/packages/ui/form/fields.tsx b/packages/ui/form/fields.tsx index a11ea5a98f..0a2b1811e7 100644 --- a/packages/ui/form/fields.tsx +++ b/packages/ui/form/fields.tsx @@ -4,9 +4,9 @@ import React, { forwardRef } from "react"; import type { FieldValues, SubmitHandler, UseFormReturn } from "react-hook-form"; import { FormProvider, useFormContext } from "react-hook-form"; -import classNames from "@calcom/lib/classNames"; import { getErrorFromUnknown } from "@calcom/lib/errors"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import classNames from "@calcom/ui/classNames"; import { Alert } from "../components/alert"; import { showToast } from "../components/toast"; diff --git a/packages/ui/form/radio-area/Radio.tsx b/packages/ui/form/radio-area/Radio.tsx index 7fcc9df16d..cc1805b7ff 100644 --- a/packages/ui/form/radio-area/Radio.tsx +++ b/packages/ui/form/radio-area/Radio.tsx @@ -2,7 +2,7 @@ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; import type { ReactNode } from "react"; import React from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; export const Group = (props: RadioGroupPrimitive.RadioGroupProps & { children: ReactNode }) => ( {props.children} diff --git a/packages/ui/form/radio-area/RadioAreaGroup.tsx b/packages/ui/form/radio-area/RadioAreaGroup.tsx index 44e20671a6..ee0a789893 100644 --- a/packages/ui/form/radio-area/RadioAreaGroup.tsx +++ b/packages/ui/form/radio-area/RadioAreaGroup.tsx @@ -2,7 +2,7 @@ import { useId } from "@radix-ui/react-id"; import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; import type { ReactNode } from "react"; -import classNames from "@calcom/lib/classNames"; +import classNames from "@calcom/ui/classNames"; type RadioAreaProps = RadioGroupPrimitive.RadioGroupItemProps & { children: ReactNode; diff --git a/packages/ui/package.json b/packages/ui/package.json index 016dd6fc83..c10300e927 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -6,6 +6,7 @@ "main": "./index.ts", "exports": { ".": "./index.ts", + "./classNames": "./classNames.ts", "./alert": "./components/alert/index.ts", "./app-list-card": "./components/app-list-card/index.ts", "./apps": "./components/apps/index.ts", @@ -93,7 +94,8 @@ "react-day-picker": "^8.10.1", "react-hook-form": "^7.43.3", "react-inlinesvg": "^4.1.3", - "react-select": "^5.7.0" + "react-select": "^5.7.0", + "tailwind-merge": "^1.13.2" }, "devDependencies": { "@calcom/config": "*", diff --git a/yarn.lock b/yarn.lock index 1fb8b720c0..fa19e55dcd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4391,7 +4391,6 @@ __metadata: next-i18next: ^13.2.2 rrule: ^2.7.1 sonner: ^1.7.4 - tailwind-merge: ^1.13.2 tsdav: 2.0.3 tslog: ^4.9.2 typescript: ^4.9.4 @@ -5024,6 +5023,7 @@ __metadata: react-hook-form: ^7.43.3 react-inlinesvg: ^4.1.3 react-select: ^5.7.0 + tailwind-merge: ^1.13.2 typescript: ^4.9.4 languageName: unknown linkType: soft