Skip to content

Scheduling infrastructure for absolutely everyone.

fix: calcom UI circle dep (#19839)

sean-brydon7e2a0d1a1b54
diff --git a/packages/ui/components/editor/Editor.test.tsx b/packages/ui/components/editor/Editor.test.tsx
index c8a495749da..f3ca4629d0d 100644
--- a/packages/ui/components/editor/Editor.test.tsx
+++ b/packages/ui/components/editor/Editor.test.tsx
@@ -2,8 +2,8 @@ import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, it, expect, vi } from "vitest";
-import type { TextEditorProps } from "./Editor";
import { Editor } from "./Editor";
+import type { TextEditorProps } from "./types";
describe("Editor", () => {
const defaultProps: TextEditorProps = {
diff --git a/packages/ui/components/editor/Editor.tsx b/packages/ui/components/editor/Editor.tsx
index c7b1de53f26..474f3325b2b 100644
--- a/packages/ui/components/editor/Editor.tsx
+++ b/packages/ui/components/editor/Editor.tsx
@@ -12,7 +12,6 @@ import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPl
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
import { TableCellNode, TableNode, TableRowNode } from "@lexical/table";
-import type { Dispatch, SetStateAction } from "react";
import classNames from "@calcom/ui/classNames";
@@ -25,6 +24,7 @@ import PlainTextPlugin from "./plugins/PlainTextPlugin";
import ToolbarPlugin from "./plugins/ToolbarPlugin";
import CustomEnterKeyPlugin from "./plugins/customEnterKeyPlugin";
import "./stylesEditor.css";
+import type { TextEditorProps } from "./types";
/*
Default toolbar items:
@@ -33,22 +33,6 @@ import "./stylesEditor.css";
- italic
- link
*/
-export type TextEditorProps = {
- getText: () => string;
- setText: (text: string) => void;
- excludedToolbarItems?: string[];
- variables?: string[];
- addVariableButtonTop?: boolean;
- height?: string;
- maxHeight?: string;
- placeholder?: string;
- disableLists?: boolean;
- updateTemplate?: boolean;
- firstRender?: boolean;
- setFirstRender?: Dispatch<SetStateAction<boolean>>;
- editable?: boolean;
- plainText?: boolean;
-};
const editorConfig = {
theme: ExampleTheme,
diff --git a/packages/ui/components/editor/index.ts b/packages/ui/components/editor/index.ts
index 82463f3619b..1d21bf7224e 100644
--- a/packages/ui/components/editor/index.ts
+++ b/packages/ui/components/editor/index.ts
@@ -1,3 +1,3 @@
export { Editor } from "./Editor";
-export type { TextEditorProps } from "./Editor";
+export type { TextEditorProps } from "./types";
export { AddVariablesDropdown } from "./plugins/AddVariablesDropdown";
diff --git a/packages/ui/components/editor/plugins/ToolbarPlugin.tsx b/packages/ui/components/editor/plugins/ToolbarPlugin.tsx
index aafa5cf5957..037a02e2a9f 100644
--- a/packages/ui/components/editor/plugins/ToolbarPlugin.tsx
+++ b/packages/ui/components/editor/plugins/ToolbarPlugin.tsx
@@ -30,7 +30,7 @@ import { createPortal } from "react-dom";
import { Button } from "../../button";
import { Dropdown, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../dropdown";
import { Icon } from "../../icon";
-import type { TextEditorProps } from "../Editor";
+import type { TextEditorProps } from "../types";
import { AddVariablesDropdown } from "./AddVariablesDropdown";
const LowPriority = 1;
diff --git a/packages/ui/components/editor/types.ts b/packages/ui/components/editor/types.ts
new file mode 100644
index 00000000000..8c08c560a4a
--- /dev/null
+++ b/packages/ui/components/editor/types.ts
@@ -0,0 +1,18 @@
+import type { Dispatch, SetStateAction } from "react";
+
+export type TextEditorProps = {
+ getText: () => string;
+ setText: (text: string) => void;
+ excludedToolbarItems?: string[];
+ variables?: string[];
+ addVariableButtonTop?: boolean;
+ height?: string;
+ maxHeight?: string;
+ placeholder?: string;
+ disableLists?: boolean;
+ updateTemplate?: boolean;
+ firstRender?: boolean;
+ setFirstRender?: Dispatch<SetStateAction<boolean>>;
+ editable?: boolean;
+ plainText?: boolean;
+};
diff --git a/packages/ui/components/form/select/Select.tsx b/packages/ui/components/form/select/Select.tsx
index 33eb270615e..4fca78e38c9 100644
--- a/packages/ui/components/form/select/Select.tsx
+++ b/packages/ui/components/form/select/Select.tsx
@@ -1,6 +1,6 @@
import { useId } from "@radix-ui/react-id";
import * as React from "react";
-import type { GroupBase, Props, SingleValue, MultiValue } from "react-select";
+import type { GroupBase, SingleValue, MultiValue } from "react-select";
import ReactSelect from "react-select";
import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -9,17 +9,7 @@ import cx from "@calcom/ui/classNames";
import { Label } from "../inputs/Label";
import { inputStyles } from "../inputs/TextField";
import { getReactSelectProps } from "./selectTheme";
-
-export type SelectProps<
- Option,
- IsMulti extends boolean = false,
- Group extends GroupBase<Option> = GroupBase<Option>
-> = Props<Option, IsMulti, Group> & {
- variant?: "default" | "checkbox";
- "data-testid"?: string;
- size?: "sm" | "md";
- grow?: boolean;
-};
+import type { SelectProps } from "./types";
export const Select = <
Option,
diff --git a/packages/ui/components/form/select/components.tsx b/packages/ui/components/form/select/components.tsx
index 98431f2c2ab..267c384d564 100644
--- a/packages/ui/components/form/select/components.tsx
+++ b/packages/ui/components/form/select/components.tsx
@@ -5,7 +5,7 @@ import classNames from "@calcom/ui/classNames";
import { UpgradeTeamsBadge } from "../../badge";
import { Icon } from "../../icon";
-import type { SelectProps } from "./Select";
+import type { SelectProps } from "./types";
export const InputComponent = <
Option,
diff --git a/packages/ui/components/form/select/types.ts b/packages/ui/components/form/select/types.ts
new file mode 100644
index 00000000000..2e9e4974145
--- /dev/null
+++ b/packages/ui/components/form/select/types.ts
@@ -0,0 +1,12 @@
+import type { GroupBase, Props } from "react-select";
+
+export type SelectProps<
+ Option,
+ IsMulti extends boolean = false,
+ Group extends GroupBase<Option> = GroupBase<Option>
+> = Props<Option, IsMulti, Group> & {
+ variant?: "default" | "checkbox";
+ "data-testid"?: string;
+ size?: "sm" | "md";
+ grow?: boolean;
+};