perf: do not import from @calcom/ui barrel file (#20184)

* Icon and IconName

* Button and ButtonGroup

* UserAvatar

* AvatarGroup

* Avatar

* WizardLayout

* Dialogs

* EmptyScreen

* showToast and TextField

* Editor

* Skeleton

* Skeleton

* TopBanner and showToast

* Button again

* more

* perf: Remove app-store reference from @calcom/ui

* more

* Fixing types

* Icon

* Fixed casing

* dropdown

* more

* Select

* more

* Badge

* List

* more

* Divider

* more

* fix

* fix type check

* refactor

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix type check

* fix

* fix

* fix

* fix

* more

* more

* more

* more

* add index file to components/command

* fix

* fix

* fix

* fix imports

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix build errors

* fix build errors

* fix

---------

Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
Benny JooandKeith Williams authored and GitHub committed 2025-03-19 19:00:55 -03:00
1 parent ca19aa00c1
commit 853f9bc436
548 files changed
+1860 -1502

No files matched your search

@@ -21,23 +21,17 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { sortAvailabilityStrings } from "@calcom/lib/weekstart";
import type { RouterOutputs } from "@calcom/trpc/react";
import type { TimeRange, WorkingHours } from "@calcom/types/schedule";
import {
Button,
ConfirmationDialogContent,
EditableHeading,
Form,
SkeletonText,
Dialog,
DialogTrigger,
Label,
SelectSkeletonLoader,
Skeleton,
Switch,
Tooltip,
VerticalDivider,
} from "@calcom/ui";
import { Icon } from "@calcom/ui";
import classNames from "@calcom/ui/classNames";
import { Button } from "@calcom/ui/components/button";
import { Dialog, DialogTrigger, ConfirmationDialogContent } from "@calcom/ui/components/dialog";
import { VerticalDivider } from "@calcom/ui/components/divider";
import { EditableHeading } from "@calcom/ui/components/editable-heading";
import { Form } from "@calcom/ui/components/form";
import { Label } from "@calcom/ui/components/form";
import { Switch } from "@calcom/ui/components/form";
import { Icon } from "@calcom/ui/components/icon";
import { SkeletonText, SelectSkeletonLoader, Skeleton } from "@calcom/ui/components/skeleton";
import { Tooltip } from "@calcom/ui/components/tooltip";
import { Shell as PlatformShell } from "../src/components/ui/shell";
import { cn } from "../src/lib/utils";
@@ -4,7 +4,7 @@ import { useState } from "react";
import { useCallback } from "react";
import type { API_VERSIONS_ENUM } from "@calcom/platform-constants";
import { IconSprites } from "@calcom/ui";
import { IconSprites } from "@calcom/ui/components/icon";
import deTranslations from "@calcom/web/public/static/locales/de/common.json";
import enTranslations from "@calcom/web/public/static/locales/en/common.json";
import esTranslations from "@calcom/web/public/static/locales/es/common.json";
@@ -4,7 +4,7 @@ import type { ReactNode } from "react";
import type { FC } from "react";
import type { CALENDARS } from "@calcom/platform-constants";
import { Button } from "@calcom/ui";
import { Button } from "@calcom/ui/components/button";
import type { OnCheckErrorType, UseCheckProps } from "../hooks/connect/useCheck";
import { useCheck } from "../hooks/connect/useCheck";
@@ -13,7 +13,10 @@ import { useState } from "react";
import { useForm } from "react-hook-form";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Form, PasswordField, TextField } from "@calcom/ui";
import { Button } from "@calcom/ui/components/button";
import { Form } from "@calcom/ui/components/form";
import { PasswordField } from "@calcom/ui/components/form";
import { TextField } from "@calcom/ui/components/form";
import { SUCCESS_STATUS } from "../../../constants/api";
import { useCheck } from "../../hooks/connect/useCheck";
@@ -11,17 +11,16 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { GOOGLE_MEET, OFFICE_365_VIDEO, ZOOM } from "@calcom/platform-constants";
import { QueryCell } from "@calcom/trpc/components/QueryCell";
import type { App } from "@calcom/types/App";
import { Button } from "@calcom/ui/components/button";
import {
Button,
SkeletonContainer,
SkeletonText,
Dropdown,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownItem,
EmptyScreen,
} from "@calcom/ui";
} from "@calcom/ui/components/dropdown";
import { EmptyScreen } from "@calcom/ui/components/empty-screen";
import { SkeletonContainer, SkeletonText } from "@calcom/ui/components/skeleton";
import { AtomsWrapper } from "../../src/components/atoms-wrapper";
import { useToast } from "../../src/components/ui/use-toast";
@@ -7,7 +7,10 @@ import DisconnectIntegrationModal from "@calcom/features/apps/components/Disconn
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, EmptyScreen, showToast, SkeletonContainer, SkeletonText } from "@calcom/ui";
import { Button } from "@calcom/ui/components/button";
import { EmptyScreen } from "@calcom/ui/components/empty-screen";
import { SkeletonText, SkeletonContainer } from "@calcom/ui/components/skeleton";
import { showToast } from "@calcom/ui/components/toast";
type ConferencingAppsViewWebWrapperProps = {
title: string;
@@ -1,9 +1,9 @@
import type { FC } from "react";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button } from "@calcom/ui";
import type { IconName } from "@calcom/ui";
import type { ButtonColor } from "@calcom/ui";
import { Button } from "@calcom/ui/components/button";
import type { ButtonColor } from "@calcom/ui/components/button";
import type { IconName } from "@calcom/ui/components/icon";
import type { OnCheckErrorType, UseCheckProps } from "../../hooks/connect/useCheck";
import { useTeamCheck, useCheck } from "../../hooks/stripe/useCheck";
@@ -1,5 +1,5 @@
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Label } from "@calcom/ui";
import { Label } from "@calcom/ui/components/form";
import { cn } from "../src/lib/utils";
import type { DestinationCalendarProps } from "./DestinationCalendarSelector";
@@ -6,7 +6,8 @@ import { SingleValueComponent } from "@calcom/features/calendars/DestinationCale
import { OptionComponent } from "@calcom/features/calendars/DestinationCalendarSelector";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { ConnectedDestinationCalendars } from "@calcom/platform-libraries";
import { Badge, Select } from "@calcom/ui";
import { Badge } from "@calcom/ui/components/badge";
import { Select } from "@calcom/ui/components/form";
import classNames from "@calcom/ui/classNames";
import { getPlaceholderContent } from "../lib/getPlaceholderContent";
@@ -10,7 +10,7 @@ import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hook
import type { EventTypeSetupProps, FormValues } from "@calcom/features/eventtypes/lib/types";
import { getPaymentAppData } from "@calcom/lib/getPaymentAppData";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { VerticalTabItemProps } from "@calcom/ui";
import type { VerticalTabItemProps } from "@calcom/ui/components/navigation";
import type { PlatformTabs } from "../../event-types/wrappers/types";
@@ -16,7 +16,7 @@ import type {
import { getPaymentAppData } from "@calcom/lib/getPaymentAppData";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";
import type { VerticalTabItemProps } from "@calcom/ui";
import type { VerticalTabItemProps } from "@calcom/ui/components/navigation";
type Props = {
formMethods: UseFormReturn<FormValues>;
@@ -5,7 +5,7 @@ import CreateEventTypeForm from "@calcom/features/eventtypes/components/CreateEv
import { useCreateEventTypeForm } from "@calcom/lib/hooks/useCreateEventType";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { EventType } from "@calcom/prisma/client";
import { Button } from "@calcom/ui";
import { Button } from "@calcom/ui/components/button";
import { useCreateEventType } from "../../hooks/event-types/private/useCreateEventType";
import { useCreateTeamEventType } from "../../hooks/event-types/private/useCreateTeamEventType";
@@ -6,7 +6,7 @@ import type {
import type { EventTypeAppsList } from "@calcom/app-store/utils";
import type { EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types";
import useAppsData from "@calcom/lib/hooks/useAppsData";
import { EmptyScreen } from "@calcom/ui";
import { EmptyScreen } from "@calcom/ui/components/empty-screen";
import { StripeConnect } from "../../connect/stripe/StripeConnect";
import { useCheck, useTeamCheck } from "../../hooks/stripe/useCheck";
@@ -17,7 +17,7 @@ import { telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
import { SchedulingType } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
import { showToast } from "@calcom/ui";
import { showToast } from "@calcom/ui/components/toast";
import { TRPCClientError } from "@trpc/react-query";
@@ -10,7 +10,7 @@ import type { BookerEvent } from "@calcom/features/bookings/types";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { RoutingFormSearchParams } from "@calcom/platform-types";
import type { BookingCreateBody } from "@calcom/prisma/zod/custom/booking";
import { showToast } from "@calcom/ui";
import { showToast } from "@calcom/ui/components/toast";
import { getUtmTrackingParameters } from "../../lib/getUtmTrackingParameters";
import type { UseCreateBookingInput } from "./useCreateBooking";
@@ -4,19 +4,15 @@ import type { ICalendarSwitchProps } from "@calcom/features/calendars/CalendarSw
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { CALENDARS } from "@calcom/platform-constants";
import { QueryCell } from "@calcom/trpc/components/QueryCell";
import type { ButtonProps } from "@calcom/ui";
import {
CalendarSwitchComponent,
AppListCard,
List,
DisconnectIntegrationComponent,
Alert,
Button,
Dropdown,
DropdownMenuContent,
DropdownMenuTrigger,
Switch,
} from "@calcom/ui";
import { Alert } from "@calcom/ui/components/alert";
import { AppListCard } from "@calcom/ui/components/app-list-card";
import type { ButtonProps } from "@calcom/ui/components/button";
import { Button } from "@calcom/ui/components/button";
import { CalendarSwitchComponent } from "@calcom/ui/components/calendar-switch";
import { DisconnectIntegrationComponent } from "@calcom/ui/components/disconnect-calendar-integration";
import { Dropdown, DropdownMenuContent, DropdownMenuTrigger } from "@calcom/ui/components/dropdown";
import { Switch } from "@calcom/ui/components/form";
import { List } from "@calcom/ui/components/list";
import { AppleConnect } from "../../connect/apple/AppleConnect";
import { useAddSelectedCalendar } from "../../hooks/calendars/useAddSelectedCalendar";
@@ -7,7 +7,9 @@ import { CalendarSwitch } from "@calcom/features/calendars/CalendarSwitch";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import { Alert, Select, List } from "@calcom/ui";
import { Alert } from "@calcom/ui/components/alert";
import { Select } from "@calcom/ui/components/form";
import { List } from "@calcom/ui/components/list";
import AdditionalCalendarSelector from "@calcom/web/components/apps/AdditionalCalendarSelector";
import { SelectedCalendarsSettings } from "../SelectedCalendarsSettings";
@@ -2,7 +2,7 @@ import * as ToastPrimitives from "@radix-ui/react-toast";
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";
import { Icon } from "@calcom/ui";
import { Icon } from "@calcom/ui/components/icon";
import { cn } from "../../lib/utils";
@@ -5,7 +5,7 @@ import { useRouter } from "next/router";
import { useBooking, useCancelBooking } from "@calcom/atoms";
import dayjs from "@calcom/dayjs";
import { Icon } from "@calcom/ui";
import { Icon } from "@calcom/ui/components/icon";
const inter = Inter({ subsets: ["latin"] });