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:
1 parent
ca19aa00c1
commit
853f9bc436
548 files changed
+1860
-1502
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { vi } from "vitest";
|
||||
|
||||
vi.mock("../unpublished-entity/UnpublishedEntity", () => ({
|
||||
vi.mock("../unpublished-entity", () => ({
|
||||
UnpublishedEntity: () => <div data-testid="unpublished-entity">Mock Unpublished Entity</div>,
|
||||
}));
|
||||
@@ -1,7 +1,7 @@
|
||||
import cx from "@calcom/ui/classNames";
|
||||
|
||||
import { Input } from "../components/form";
|
||||
import { Icon } from "../components/icon";
|
||||
import { Input } from "../form";
|
||||
import { Icon } from "../icon";
|
||||
|
||||
export type AddressInputProps = {
|
||||
value: string;
|
||||
File renamed without changes.
@@ -1,9 +1,9 @@
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
import { Button } from "../components/button";
|
||||
import { EmailField } from "../components/form";
|
||||
import { Icon } from "../components/icon";
|
||||
import { Tooltip } from "../components/tooltip";
|
||||
import { Button } from "../button";
|
||||
import { EmailField } from "../form";
|
||||
import { Icon } from "../icon";
|
||||
import { Tooltip } from "../tooltip";
|
||||
|
||||
interface MultiEmailProps {
|
||||
value: string[];
|
||||
File renamed without changes.
File renamed without changes.
@@ -8,8 +8,8 @@ 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";
|
||||
import { Alert } from "../alert";
|
||||
import { showToast } from "../toast";
|
||||
|
||||
type InputProps = Omit<JSX.IntrinsicElements["input"], "name"> & { name: string };
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export { default as AddressInput } from "./AddressInputLazy";
|
||||
export { default as MultiEmail } from "./MultiEmailLazy";
|
||||
@@ -1 +1,2 @@
|
||||
export { AppListCard } from "./AppListCard";
|
||||
export type { AppListCardProps } from "./AppListCard";
|
||||
@@ -0,0 +1,11 @@
|
||||
export {
|
||||
Command,
|
||||
CommandDialog,
|
||||
CommandInput,
|
||||
CommandList,
|
||||
CommandEmpty,
|
||||
CommandGroup,
|
||||
CommandItem,
|
||||
CommandShortcut,
|
||||
CommandSeparator,
|
||||
} from "./Command";
|
||||
@@ -1,5 +1,5 @@
|
||||
export { Checkbox, MultiSelectCheckbox, CheckboxField } from "./checkbox";
|
||||
export type { Option } from "./checkbox";
|
||||
export type { Option as MultiSelectCheckboxesOptionType } from "./checkbox";
|
||||
export { HintsOrErrors } from "./inputs/HintOrErrors";
|
||||
export {
|
||||
EmailField,
|
||||
@@ -15,7 +15,7 @@ export {
|
||||
} from "./inputs/Input";
|
||||
|
||||
export { InputFieldWithSelect } from "./inputs/InputFieldWithSelect";
|
||||
|
||||
export type { InputFieldProps, InputProps } from "./inputs/types";
|
||||
export { InputField, Input, TextField, inputStyles } from "./inputs/TextField";
|
||||
export { InputError } from "./inputs/InputError";
|
||||
export { Form } from "./inputs/Form";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { forwardRef } from "react";
|
||||
|
||||
import { UnstyledSelect } from "../../../form/Select";
|
||||
import { UnstyledSelect } from "../../address/Select";
|
||||
import { InputField } from "./TextField";
|
||||
import type { InputFieldProps } from "./types";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { TooltipProvider } from "@radix-ui/react-tooltip";
|
||||
import { render, fireEvent } from "@testing-library/react";
|
||||
import { vi } from "vitest";
|
||||
|
||||
import type { UnstyledSelect } from "../../../form/Select";
|
||||
import type { UnstyledSelect } from "../../address/Select";
|
||||
import { EmailField, TextAreaField, PasswordField, NumberInput, FilterSearchField } from "./Input";
|
||||
import { InputFieldWithSelect } from "./InputFieldWithSelect";
|
||||
import { InputField } from "./TextField";
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { ReactNode } from "react";
|
||||
import classNames from "@calcom/ui/classNames";
|
||||
|
||||
import { Label } from "../inputs/Label";
|
||||
import Switch from "./Switch";
|
||||
import { Switch } from "./Switch";
|
||||
|
||||
type Props = {
|
||||
children?: ReactNode;
|
||||
@@ -26,7 +26,7 @@ type Props = {
|
||||
hideSwitch?: boolean;
|
||||
};
|
||||
|
||||
function SettingsToggle({
|
||||
export function SettingsToggle({
|
||||
checked,
|
||||
onCheckedChange,
|
||||
description,
|
||||
@@ -123,5 +123,3 @@ function SettingsToggle({
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default SettingsToggle;
|
||||
@@ -14,7 +14,7 @@ const Wrapper = ({ children, tooltip }: { tooltip?: string; children: React.Reac
|
||||
}
|
||||
return <Tooltip content={tooltip}>{children}</Tooltip>;
|
||||
};
|
||||
const Switch = (
|
||||
export const Switch = (
|
||||
props: React.ComponentProps<typeof PrimitiveSwitch.Root> & {
|
||||
label?: string | ReactNode;
|
||||
fitToHeight?: boolean;
|
||||
@@ -87,5 +87,3 @@ const Switch = (
|
||||
</Wrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default Switch;
|
||||
@@ -1,2 +1,2 @@
|
||||
export { default as SettingsToggle } from "./SettingsToggle";
|
||||
export { default as Switch } from "./Switch";
|
||||
export { SettingsToggle } from "./SettingsToggle";
|
||||
export { Switch } from "./Switch";
|
||||
@@ -1,3 +1,5 @@
|
||||
export { default as Icon } from "./Icon";
|
||||
export type { IconName } from "./icon-names";
|
||||
export { IconSprites } from "./IconSprites";
|
||||
export { Spinner } from "./Spinner";
|
||||
export { SatSymbol } from "./SatSymbol";
|
||||
+4
-4
@@ -9,10 +9,10 @@ import { Toaster } from "sonner";
|
||||
import { APP_NAME } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
import { Button } from "../components/button/Button";
|
||||
import { StepCard } from "../components/card/StepCard";
|
||||
import { Steps } from "../components/form/step/Steps";
|
||||
import { SkeletonText } from "../components/skeleton/Skeleton";
|
||||
import { Button } from "../../components/button/Button";
|
||||
import { StepCard } from "../../components/card/StepCard";
|
||||
import { Steps } from "../../components/form/step/Steps";
|
||||
import { SkeletonText } from "../../components/skeleton/Skeleton";
|
||||
|
||||
export function WizardLayout({
|
||||
children,
|
||||
@@ -1 +1,2 @@
|
||||
export { ShellSubHeading } from "./ShellSubHeading";
|
||||
export { WizardLayout } from "./WizardLayout";
|
||||
@@ -1,6 +1,6 @@
|
||||
import classNames from "@calcom/ui/classNames";
|
||||
|
||||
export default function Logo({
|
||||
export function Logo({
|
||||
small,
|
||||
icon,
|
||||
inline = true,
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { default as Logo } from "./Logo";
|
||||
export { Logo } from "./Logo";
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
export * as RadioAreaGroup from "./RadioAreaGroup";
|
||||
export {
|
||||
Group as RadioGroup,
|
||||
Indicator as RadioIndicator,
|
||||
Label as RadioLabel,
|
||||
Radio,
|
||||
RadioField,
|
||||
} from "./Radio";
|
||||
@@ -1,4 +1,6 @@
|
||||
export { Table } from "./Table";
|
||||
export { TableActions, DropdownActions } from "./TableActions";
|
||||
export type { ActionType } from "./TableActions";
|
||||
export {
|
||||
Table as TableNew,
|
||||
TableBody,
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
export * as RadioGroup from "./RadioAreaGroup";
|
||||
export { Group, Indicator, Label, Radio, RadioField } from "./Radio";
|
||||
+9
-10
@@ -106,24 +106,24 @@ export { AppListCard } from "./components/app-list-card/AppListCard";
|
||||
export { DisconnectIntegrationComponent } from "./components/disconnect-calendar-integration";
|
||||
export { CalendarSwitchComponent } from "./components/calendar-switch";
|
||||
export { showToast, ErrorToast, SuccessToast, WarningToast } from "./components/toast"; // We don't export the toast components as they are only used in local storybook file
|
||||
export { ShellSubHeading } from "./components/layout";
|
||||
export { ShellSubHeading, WizardLayout } from "./components/layout";
|
||||
|
||||
/** ⬇️ TODO - Move these to components */
|
||||
export { default as AddressInput } from "./form/AddressInputLazy";
|
||||
export { default as MultiEmail } from "./form/MultiEmailLazy";
|
||||
export { default as AddressInputNonLazy } from "./form/AddressInput";
|
||||
export { default as AddressInput } from "./components/address/AddressInputLazy";
|
||||
export { default as MultiEmail } from "./components/address/MultiEmailLazy";
|
||||
export { default as AddressInputNonLazy } from "./components/address/AddressInput";
|
||||
|
||||
export { UnstyledSelect } from "./form/Select";
|
||||
export { UnstyledSelect } from "./components/address/Select";
|
||||
|
||||
export {
|
||||
RadioGroup,
|
||||
/* TODO: solve this conflict -> Select, */
|
||||
RadioIndicator,
|
||||
RadioLabel,
|
||||
Radio,
|
||||
Group,
|
||||
RadioField,
|
||||
} from "./form/radio-area";
|
||||
RadioAreaGroup,
|
||||
} from "./components/radio";
|
||||
|
||||
export { default as MultiSelectCheckboxes } from "./components/form/checkbox/MultiSelectCheckboxes";
|
||||
export type { Option as MultiSelectCheckboxesOptionType } from "./components/form/checkbox/MultiSelectCheckboxes";
|
||||
export { default as ImageUploader } from "./components/image-uploader/ImageUploader";
|
||||
export { default as BannerUploader } from "./components/image-uploader/BannerUploader";
|
||||
@@ -132,7 +132,6 @@ export type { ButtonColor } from "./components/button/Button";
|
||||
|
||||
export { useCalcomTheme } from "./styles/useCalcomTheme";
|
||||
export { ScrollableArea } from "./components/scrollable";
|
||||
export { WizardLayout } from "./layouts/WizardLayout";
|
||||
export * from "./components/sheet";
|
||||
export * from "./components/table";
|
||||
export * from "./components/popover";
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./classNames": "./classNames.ts",
|
||||
"./styles": "./styles/index.ts",
|
||||
"./components/address": "./components/address/index.ts",
|
||||
"./components/alert": "./components/alert/index.ts",
|
||||
"./components/app-list-card": "./components/app-list-card/index.ts",
|
||||
"./components/apps": "./components/apps/index.ts",
|
||||
@@ -32,6 +34,7 @@
|
||||
"./components/form": "./components/form/index.ts",
|
||||
"./components/form/timezone-select": "./components/form/timezone-select/index.ts",
|
||||
"./components/head-seo": "./components/head-seo/index.ts",
|
||||
"./components/hover-card": "./components/hover-card/index.tsx",
|
||||
"./components/image-uploader": "./components/image-uploader/index.ts",
|
||||
"./components/layout": "./components/layout/index.ts",
|
||||
"./components/list": "./components/list/index.ts",
|
||||
@@ -39,7 +42,9 @@
|
||||
"./components/meta": "./components/meta/index.ts",
|
||||
"./components/navigation": "./components/navigation/index.ts",
|
||||
"./components/organization-banner": "./components/organization-banner/index.ts",
|
||||
"./components/pagination": "./components/pagination/index.ts",
|
||||
"./components/popover": "./components/popover/index.ts",
|
||||
"./components/radio": "./components/radio/index.ts",
|
||||
"./components/scrollable": "./components/scrollable/index.ts",
|
||||
"./components/sheet": "./components/sheet/index.ts",
|
||||
"./components/skeleton": "./components/skeleton/index.ts",
|
||||
@@ -49,9 +54,7 @@
|
||||
"./components/top-banner": "./components/top-banner/index.ts",
|
||||
"./components/filter-select": "./components/filter-select/index.ts",
|
||||
"./components/icon": "./components/icon/index.ts",
|
||||
"./components/icon/SatSymbol": "./components/icon/SatSymbol.tsx",
|
||||
"./components/icon/Spinner": "./components/icon/Spinner.tsx",
|
||||
"./components/unpublished-entity/UnpublishedEntity": "./components/unpublished-entity/index.ts",
|
||||
"./components/unpublished-entity": "./components/unpublished-entity/index.ts",
|
||||
"./components/table/TableNew": "./components/table/TableNew.tsx",
|
||||
"./components/app-list-card/AppListCard": "./components/app-list-card/AppListCard.tsx",
|
||||
"./__mocks__/ui": "./__mocks__/ui.tsx"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export { useCalcomTheme } from "./useCalcomTheme";
|
||||
Reference in new issue
Block a user