Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-4660] chore: replace jsx element with react node (#7567)

sriram veeraghantaa085c0ec620c
diff --git a/apps/admin/core/components/authentication/authentication-method-card.tsx b/apps/admin/core/components/authentication/authentication-method-card.tsx
index 897deb7c48..566551f48e 100644
--- a/apps/admin/core/components/authentication/authentication-method-card.tsx
+++ b/apps/admin/core/components/authentication/authentication-method-card.tsx
@@ -7,8 +7,8 @@ import { cn } from "@plane/utils";
type Props = {
name: string;
description: string;
- icon: JSX.Element;
- config: JSX.Element;
+ icon: React.ReactNode;
+ config: React.ReactNode;
disabled?: boolean;
withBorder?: boolean;
unavailable?: boolean;
diff --git a/apps/admin/core/components/common/controller-input.tsx b/apps/admin/core/components/common/controller-input.tsx
index ca8f301620..cbcbafb2d0 100644
--- a/apps/admin/core/components/common/controller-input.tsx
+++ b/apps/admin/core/components/common/controller-input.tsx
@@ -13,7 +13,7 @@ type Props = {
type: "text" | "password";
name: string;
label: string;
- description?: string | JSX.Element;
+ description?: string | React.ReactNode;
placeholder: string;
error: boolean;
required: boolean;
@@ -23,7 +23,7 @@ export type TControllerInputFormField = {
key: string;
type: "text" | "password";
label: string;
- description?: string | JSX.Element;
+ description?: string | React.ReactNode;
placeholder: string;
error: boolean;
required: boolean;
diff --git a/apps/admin/core/components/common/copy-field.tsx b/apps/admin/core/components/common/copy-field.tsx
index 6322356b44..cd8cfee53a 100644
--- a/apps/admin/core/components/common/copy-field.tsx
+++ b/apps/admin/core/components/common/copy-field.tsx
@@ -9,14 +9,14 @@ import { Button, TOAST_TYPE, setToast } from "@plane/ui";
type Props = {
label: string;
url: string;
- description: string | JSX.Element;
+ description: string | React.ReactNode;
};
export type TCopyField = {
key: string;
label: string;
url: string;
- description: string | JSX.Element;
+ description: string | React.ReactNode;
};
export const CopyField: React.FC<Props> = (props) => {
diff --git a/apps/space/core/components/issues/issue-layouts/issue-layout-HOC.tsx b/apps/space/core/components/issues/issue-layouts/issue-layout-HOC.tsx
index 193d7c5515..71cf085020 100644
--- a/apps/space/core/components/issues/issue-layouts/issue-layout-HOC.tsx
+++ b/apps/space/core/components/issues/issue-layouts/issue-layout-HOC.tsx
@@ -3,7 +3,7 @@ import { TLoader } from "@plane/types";
import { LogoSpinner } from "@/components/common";
interface Props {
- children: string | JSX.Element | JSX.Element[];
+ children: string | React.ReactNode | React.ReactNode[];
getGroupIssueCount: (
groupId: string | undefined,
subGroupId: string | undefined,
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/activity/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/activity/page.tsx
index f3b7199044..3ad14bd966 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/activity/page.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/activity/page.tsx
@@ -31,7 +31,7 @@ const ProfileActivityPage = observer(() => {
const handleLoadMore = () => setPageCount((prev) => prev + 1);
- const activityPages: JSX.Element[] = [];
+ const activityPages: React.ReactNode[] = [];
for (let i = 0; i < pageCount; i++)
activityPages.push(
<WorkspaceActivityListPage
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/mobile-header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/mobile-header.tsx
index 01e35f0dd8..25fa8fc802 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/mobile-header.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/mobile-header.tsx
@@ -6,7 +6,7 @@ import { useParams } from "next/navigation";
// icons
import { Calendar, ChevronDown, Kanban, List } from "lucide-react";
// plane imports
-import { EIssueFilterType, ISSUE_LAYOUTS, ISSUE_DISPLAY_FILTERS_BY_PAGE } from "@plane/constants";
+import { EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_PAGE } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import {
EIssuesStoreType,
@@ -15,7 +15,6 @@ import {
IIssueFilterOptions,
EIssueLayoutTypes,
} from "@plane/types";
-import { CustomMenu } from "@plane/ui";
import { isIssueFilterActive } from "@plane/utils";
// components
import { WorkItemsModal } from "@/components/analytics/work-items/modal";
@@ -23,7 +22,6 @@ import {
DisplayFiltersSelection,
FilterSelection,
FiltersDropdown,
- IssueLayoutIcon,
MobileLayoutSelection,
} from "@/components/issues/issue-layouts";
// helpers
diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/activity/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/activity/page.tsx
index 1676ec7e6b..fe64d6b223 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/activity/page.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/activity/page.tsx
@@ -34,7 +34,7 @@ const ProfileActivityPage = observer(() => {
const handleLoadMore = () => setPageCount((prev) => prev + 1);
- const activityPages: JSX.Element[] = [];
+ const activityPages: React.ReactNode[] = [];
for (let i = 0; i < pageCount; i++)
activityPages.push(
<ProfileActivityListPage
diff --git a/apps/web/app/(all)/profile/activity/page.tsx b/apps/web/app/(all)/profile/activity/page.tsx
index ca6c9511d0..ae27bf793f 100644
--- a/apps/web/app/(all)/profile/activity/page.tsx
+++ b/apps/web/app/(all)/profile/activity/page.tsx
@@ -37,7 +37,7 @@ const ProfileActivityPage = observer(() => {
const handleLoadMore = () => setPageCount((prev) => prev + 1);
- const activityPages: JSX.Element[] = [];
+ const activityPages: React.ReactNode[] = [];
for (let i = 0; i < pageCount; i++)
activityPages.push(
<ProfileActivityListPage
diff --git a/apps/web/ce/components/command-palette/helpers.tsx b/apps/web/ce/components/command-palette/helpers.tsx
index 3788e8f2b0..cd47f848de 100644
--- a/apps/web/ce/components/command-palette/helpers.tsx
+++ b/apps/web/ce/components/command-palette/helpers.tsx
@@ -18,7 +18,7 @@ import { IssueIdentifier } from "@/plane-web/components/issues";
export type TCommandGroups = {
[key: string]: {
- icon: JSX.Element | null;
+ icon: React.ReactNode | null;
itemName: (item: any) => React.ReactNode;
path: (item: any, projectId: string | undefined) => string;
title: string;
diff --git a/apps/web/ce/components/workflow/state-option.tsx b/apps/web/ce/components/workflow/state-option.tsx
index a49b50db64..d9d911a9cc 100644
--- a/apps/web/ce/components/workflow/state-option.tsx
+++ b/apps/web/ce/components/workflow/state-option.tsx
@@ -7,7 +7,7 @@ export type TStateOptionProps = {
option: {
value: string | undefined;
query: string;
- content: JSX.Element;
+ content: React.ReactNode;
};
selectedValue: string | null | undefined;
className?: string;
diff --git a/apps/web/core/components/analytics/select/select-x-axis.tsx b/apps/web/core/components/analytics/select/select-x-axis.tsx
index 1be296ff39..9fc846c30b 100644
--- a/apps/web/core/components/analytics/select/select-x-axis.tsx
+++ b/apps/web/core/components/analytics/select/select-x-axis.tsx
@@ -10,7 +10,7 @@ type Props = {
placeholder?: string;
hiddenOptions?: ChartXAxisProperty[];
allowNoValue?: boolean;
- label?: string | JSX.Element;
+ label?: string | React.ReactNode;
};
export const SelectXAxis: React.FC<Props> = (props) => {
diff --git a/apps/web/core/components/core/list/list-item.tsx b/apps/web/core/components/core/list/list-item.tsx
index 89c911680c..e8ae4fcb9e 100644
--- a/apps/web/core/components/core/list/list-item.tsx
+++ b/apps/web/core/components/core/list/list-item.tsx
@@ -12,9 +12,9 @@ interface IListItemProps {
title: string;
itemLink: string;
onItemClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
- prependTitleElement?: JSX.Element;
- appendTitleElement?: JSX.Element;
- actionableItems?: JSX.Element;
+ prependTitleElement?: React.ReactNode;
+ appendTitleElement?: React.ReactNode;
+ actionableItems?: React.ReactNode;
isMobile?: boolean;
parentRef: React.RefObject<HTMLDivElement>;
disableLink?: boolean;
@@ -22,7 +22,7 @@ interface IListItemProps {
itemClassName?: string;
actionItemContainerClassName?: string;
isSidebarOpen?: boolean;
- quickActionElement?: JSX.Element;
+ quickActionElement?: React.ReactNode;
preventDefaultProgress?: boolean;
leftElementClassName?: string;
rightElementClassName?: string;
diff --git a/apps/web/core/components/core/modals/gpt-assistant-popover.tsx b/apps/web/core/components/core/modals/gpt-assistant-popover.tsx
index 7f0ce82597..3c6eaa8092 100644
--- a/apps/web/core/components/core/modals/gpt-assistant-popover.tsx
+++ b/apps/web/core/components/core/modals/gpt-assistant-popover.tsx
@@ -22,7 +22,7 @@ type Props = {
onError?: (error: any) => void;
placement?: Placement;
prompt?: string;
- button: JSX.Element;
+ button: React.ReactNode;
className?: string;
workspaceId: string;
workspaceSlug: string;
diff --git a/apps/web/core/components/dropdowns/cycle/cycle-options.tsx b/apps/web/core/components/dropdowns/cycle/cycle-options.tsx
index 69baa558ca..aaf4b6940e 100644
--- a/apps/web/core/components/dropdowns/cycle/cycle-options.tsx
+++ b/apps/web/core/components/dropdowns/cycle/cycle-options.tsx
@@ -23,7 +23,7 @@ type DropdownOptions =
| {
value: string | null;
query: string;
- content: JSX.Element;
+ content: React.ReactNode;
}[]
| undefined;
diff --git a/apps/web/core/components/dropdowns/estimate.tsx b/apps/web/core/components/dropdowns/estimate.tsx
index 1fe850a772..2968ee5839 100644
--- a/apps/web/core/components/dropdowns/estimate.tsx
+++ b/apps/web/core/components/dropdowns/estimate.tsx
@@ -33,7 +33,7 @@ type DropdownOptions =
| {
value: string | null;
query: string;
- content: JSX.Element;
+ content: React.ReactNode;
}[]
| undefined;
diff --git a/apps/web/core/components/dropdowns/module/module-options.tsx b/apps/web/core/components/dropdowns/module/module-options.tsx
index 226b2c9f81..28f16839b6 100644
--- a/apps/web/core/components/dropdowns/module/module-options.tsx
+++ b/apps/web/core/components/dropdowns/module/module-options.tsx
@@ -18,7 +18,7 @@ type DropdownOptions =
| {
value: string | null;
query: string;
- content: JSX.Element;
+ content: React.ReactNode;
}[]
| undefined;
diff --git a/apps/web/core/components/gantt-chart/chart/main-content.tsx b/apps/web/core/components/gantt-chart/chart/main-content.tsx
index 278994b0b3..b2f3180b71 100644
--- a/apps/web/core/components/gantt-chart/chart/main-content.tsx
+++ b/apps/web/core/components/gantt-chart/chart/main-content.tsx
@@ -46,7 +46,7 @@ type Props = {
currentView: TGanttViews,
targetDate?: Date
) => ChartDataType | undefined;
- quickAdd?: React.JSX.Element | undefined;
+ quickAdd?: React.ReactNode | undefined;
isEpic?: boolean;
};
diff --git a/apps/web/core/components/gantt-chart/chart/root.tsx b/apps/web/core/components/gantt-chart/chart/root.tsx
index 11bc0ee546..7c22d56be9 100644
--- a/apps/web/core/components/gantt-chart/chart/root.tsx
+++ b/apps/web/core/components/gantt-chart/chart/root.tsx
@@ -43,7 +43,7 @@ type ChartViewRootProps = {
loadMoreBlocks?: () => void;
updateBlockDates?: (updates: IBlockUpdateDependencyData[]) => Promise<void>;
canLoadMoreBlocks?: boolean;
- quickAdd?: React.JSX.Element | undefined;
+ quickAdd?: React.ReactNode | undefined;
showToday: boolean;
isEpic?: boolean;
};
diff --git a/apps/web/core/components/gantt-chart/root.tsx b/apps/web/core/components/gantt-chart/root.tsx
index 67930aa58e..da25611a87 100644
--- a/apps/web/core/components/gantt-chart/root.tsx
+++ b/apps/web/core/components/gantt-chart/root.tsx
@@ -14,7 +14,7 @@ type GanttChartRootProps = {
blockUpdateHandler: (block: any, payload: IBlockUpdateData) => void;
blockToRender: (data: any) => React.ReactNode;
sidebarToRender: (props: any) => React.ReactNode;
- quickAdd?: React.JSX.Element | undefined;
+ quickAdd?: React.ReactNode | undefined;
canLoadMoreBlocks?: boolean;
loadMoreBlocks?: () => void;
updateBlockDates?: (updates: IBlockUpdateDependencyData[]) => Promise<void>;
diff --git a/apps/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx b/apps/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx
index 9f0ab59029..5f1a8f8b88 100644
--- a/apps/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx
+++ b/apps/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx
@@ -13,7 +13,7 @@ type Props = {
id: string;
isLastChild: boolean;
isDragEnabled: boolean;
- children: (isDragging: boolean) => JSX.Element;
+ children: (isDragging: boolean) => React.ReactNode;
onDrop: (draggingBlockId: string | undefined, droppedBlockId: string | undefined, dropAtEndOfList: boolean) => void;
};
diff --git a/apps/web/core/components/gantt-chart/sidebar/root.tsx b/apps/web/core/components/gantt-chart/sidebar/root.tsx
index fb5562b03a..c6a3b29bc3 100644
--- a/apps/web/core/components/gantt-chart/sidebar/root.tsx
+++ b/apps/web/core/components/gantt-chart/sidebar/root.tsx
@@ -22,7 +22,7 @@ type Props = {
enableSelection: boolean | ((blockId: string) => boolean);
sidebarToRender: (props: any) => React.ReactNode;
title: string;
- quickAdd?: React.JSX.Element | undefined;
+ quickAdd?: React.ReactNode | undefined;
selectionHelpers: TSelectionHelper;
isEpic?: boolean;
};
diff --git a/apps/web/core/components/integration/github/select-repository.tsx b/apps/web/core/components/integration/github/select-repository.tsx
index 05936cfa78..2d8042f2ac 100644
--- a/apps/web/core/components/integration/github/select-repository.tsx
+++ b/apps/web/core/components/integration/github/select-repository.tsx
@@ -15,7 +15,7 @@ import { ProjectService } from "@/services/project";
type Props = {
integration: IWorkspaceIntegration;
value: any;
- label: string | JSX.Element;
+ label: string | React.ReactNode;
onChange: (repo: any) => void;
characterLimit?: number;
};
diff --git a/apps/web/core/components/integration/github/single-user-select.tsx b/apps/web/core/components/integration/github/single-user-select.tsx
index 3b24338bce..1145355186 100644
--- a/apps/web/core/components/integration/github/single-user-select.tsx
+++ b/apps/web/core/components/integration/github/single-user-select.tsx
@@ -66,7 +66,7 @@ export const SingleUserSelect: React.FC<Props> = ({ collaborator, index, users,
| {
value: string;
query: string;
- content: JSX.Element;
+ content: React.ReactNode;
}[]
| undefined;
diff --git a/apps/web/core/components/integration/jira/import-users.tsx b/apps/web/core/components/integration/jira/import-users.tsx
index 7a35aa9d4e..2adaf3ba35 100644
--- a/apps/web/core/components/integration/jira/import-users.tsx
+++ b/apps/web/core/components/integration/jira/import-users.tsx
@@ -54,7 +54,7 @@ export const JiraImportUsers: FC = () => {
| {
value: string;
query: string;
- content: JSX.Element;
+ content: React.ReactNode;
}[]
| undefined;
diff --git a/apps/web/core/components/issues/issue-detail-widgets/widget-button.tsx b/apps/web/core/components/issues/issue-detail-widgets/widget-button.tsx
index b34846b87e..cded28d30d 100644
--- a/apps/web/core/components/issues/issue-detail-widgets/widget-button.tsx
+++ b/apps/web/core/components/issues/issue-detail-widgets/widget-button.tsx
@@ -4,7 +4,7 @@ import React, { FC } from "react";
import { cn } from "@plane/utils";
type Props = {
- icon: JSX.Element;
+ icon: React.ReactNode;
title: string;
disabled?: boolean;
};
diff --git a/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx b/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx
index 517e118282..ba26b3f0d2 100644
--- a/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx
+++ b/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx
@@ -31,7 +31,7 @@ const ActiveLoader = (props: { layout: EIssueLayoutTypes }) => {
};
interface Props {
- children: string | JSX.Element | JSX.Element[];
+ children: string | React.ReactNode | React.ReactNode[];
layout: EIssueLayoutTypes;
}
diff --git a/apps/web/core/components/issues/issue-layouts/quick-add/root.tsx b/apps/web/core/components/issues/issue-layouts/quick-add/root.tsx
index 066db20886..00ae3585dc 100644
--- a/apps/web/core/components/issues/issue-layouts/quick-add/root.tsx
+++ b/apps/web/core/components/issues/issue-layouts/quick-add/root.tsx
@@ -42,7 +42,7 @@ type TQuickAddIssueRoot = {
layout: EIssueLayoutTypes;
prePopulatedData?: Partial<TIssue>;
QuickAddButton?: FC<TQuickAddIssueButton>;
- customQuickAddButton?: JSX.Element;
+ customQuickAddButton?: React.ReactNode;
containerClassName?: string;
setIsQuickAddOpen?: (isOpen: boolean) => void;
quickAddCallback?: (projectId: string | null | undefined, data: TIssue) => Promise<TIssue | undefined>;
diff --git a/apps/web/core/components/issues/select/base.tsx b/apps/web/core/components/issues/select/base.tsx
index f81d8bbb6a..59e7901ffe 100644
--- a/apps/web/core/components/issues/select/base.tsx
+++ b/apps/web/core/components/issues/select/base.tsx
@@ -21,7 +21,7 @@ export type TWorkItemLabelSelectBaseProps = {
createLabelEnabled?: boolean;
disabled?: boolean;
getLabelById: (labelId: string) => IIssueLabel | null;
- label?: JSX.Element;
+ label?: React.ReactNode;
labelIds: string[];
onChange: (value: string[]) => void;
onDropdownOpen?: () => void;
diff --git a/apps/web/core/components/labels/label-drag-n-drop-HOC.tsx b/apps/web/core/components/labels/label-drag-n-drop-HOC.tsx
index 8cc87d4c6d..9ea93b70d2 100644
--- a/apps/web/core/components/labels/label-drag-n-drop-HOC.tsx
+++ b/apps/web/core/components/labels/label-drag-n-drop-HOC.tsx
@@ -42,7 +42,7 @@ type Props = {
isDragging: boolean,
isDroppingInLabel: boolean,
dragHandleRef: MutableRefObject<HTMLButtonElement | null>
- ) => JSX.Element;
+ ) => React.ReactNode;
onDrop: (
draggingLabelId: string,
droppedParentId: string | null,
diff --git a/apps/web/core/components/project/member-select.tsx b/apps/web/core/components/project/member-select.tsx
index 8a61883e23..c1597e0dd6 100644
--- a/apps/web/core/components/project/member-select.tsx
+++ b/apps/web/core/components/project/member-select.tsx
@@ -50,7 +50,7 @@ export const MemberSelect: React.FC<Props> = observer((props) => {
| {
value: string;
query: string;
- content: React.JSX.Element;
+ content: React.ReactNode;
}[]
| undefined;
const selectedOption = projectId ? getProjectMemberDetails(value, projectId.toString()) : null;
diff --git a/apps/web/core/components/project/send-project-invitation-modal.tsx b/apps/web/core/components/project/send-project-invitation-modal.tsx
index 561dcd6a83..9e28140c1d 100644
--- a/apps/web/core/components/project/send-project-invitation-modal.tsx
+++ b/apps/web/core/components/project/send-project-invitation-modal.tsx
@@ -163,7 +163,7 @@ export const SendProjectInvitationModal: React.FC<Props> = observer((props) => {
| {
value: string;
query: string;
- content: React.JSX.Element;
+ content: React.ReactNode;
}[]
| undefined;
diff --git a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx
index 59945c9b5a..7dec302b7c 100644
--- a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx
+++ b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx
@@ -9,7 +9,7 @@ import { usePlatformOS } from "@/hooks/use-platform-os";
type Props = {
href: string;
title: string;
- icon: JSX.Element;
+ icon: React.ReactNode;
};
export const FavoriteItemTitle: FC<Props> = observer((props) => {
diff --git a/packages/propel/src/charts/bar-chart/bar.tsx b/packages/propel/src/charts/bar-chart/bar.tsx
index a13e154b2d..49ccf3de79 100644
--- a/packages/propel/src/charts/bar-chart/bar.tsx
+++ b/packages/propel/src/charts/bar-chart/bar.tsx
@@ -158,7 +158,7 @@ const CustomBarLollipop = React.memo((props: TBarProps) => {
*/
const createShapeVariant =
(Component: React.ComponentType<TBarProps>, factoryProps?: Partial<TBarProps>) =>
- (shapeProps: TShapeProps, bar: TBarItem<string>, stackKeys: string[]): JSX.Element => {
+ (shapeProps: TShapeProps, bar: TBarItem<string>, stackKeys: string[]): React.ReactNode => {
const showTopBorderRadius = bar.showTopBorderRadius?.(shapeProps.dataKey, shapeProps.payload);
const showBottomBorderRadius = bar.showBottomBorderRadius?.(shapeProps.dataKey, shapeProps.payload);
@@ -178,7 +178,7 @@ const createShapeVariant =
export const barShapeVariants: Record<
TBarChartShapeVariant,
- (props: TShapeProps, bar: TBarItem<string>, stackKeys: string[]) => JSX.Element
+ (props: TShapeProps, bar: TBarItem<string>, stackKeys: string[]) => React.ReactNode
> = {
bar: createShapeVariant(CustomBar), // Standard bar with rounded corners
lollipop: createShapeVariant(CustomBarLollipop), // Line with circle at top
diff --git a/packages/propel/src/charts/bar-chart/root.tsx b/packages/propel/src/charts/bar-chart/root.tsx
index e662425247..96efff32c7 100644
--- a/packages/propel/src/charts/bar-chart/root.tsx
+++ b/packages/propel/src/charts/bar-chart/root.tsx
@@ -68,7 +68,8 @@ export const BarChart = React.memo(<K extends string, T extends string>(props: T
opacity={!!activeLegend && activeLegend !== bar.key ? 0.1 : 1}
shape={(shapeProps: any) => {
const shapeVariant = barShapeVariants[bar.shapeVariant ?? "bar"];
- return shapeVariant(shapeProps, bar, stackKeys);
+ const node = shapeVariant(shapeProps, bar, stackKeys);
+ return React.isValidElement(node) ? node : <>{node}</>;
}}
className="[&_path]:transition-opacity [&_path]:duration-200"
onMouseEnter={() => setActiveBar(bar.key)}
diff --git a/packages/types/package.json b/packages/types/package.json
index 2a6b18030a..cfc187011b 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -26,9 +26,15 @@
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
},
+ "peerDependencies": {
+ "react": "^18.0.0",
+ "react-dom": "^18.0.0"
+ },
"devDependencies": {
"@plane/eslint-config": "*",
"@plane/typescript-config": "*",
+ "@types/react": "18.3.11",
+ "@types/react-dom": "18.3.1",
"tsup": "8.4.0",
"typescript": "5.8.3"
}
diff --git a/packages/types/src/instance/auth.ts b/packages/types/src/instance/auth.ts
index 274c5a29cd..c3049bc451 100644
--- a/packages/types/src/instance/auth.ts
+++ b/packages/types/src/instance/auth.ts
@@ -2,8 +2,8 @@ export type TInstanceAuthenticationModes = {
key: string;
name: string;
description: string;
- icon: JSX.Element;
- config: JSX.Element;
+ icon: React.ReactNode;
+ config: React.ReactNode;
unavailable?: boolean;
};
diff --git a/packages/ui/src/breadcrumbs/navigation-search-dropdown.tsx b/packages/ui/src/breadcrumbs/navigation-search-dropdown.tsx
index 75cfff35a7..6ed3b26fe8 100644
--- a/packages/ui/src/breadcrumbs/navigation-search-dropdown.tsx
+++ b/packages/ui/src/breadcrumbs/navigation-search-dropdown.tsx
@@ -7,7 +7,7 @@ import { Tooltip } from "../tooltip";
import { Breadcrumbs } from "./breadcrumbs";
type TBreadcrumbNavigationSearchDropdownProps = {
- icon?: React.JSX.Element;
+ icon?: React.ReactNode;
title?: string;
selectedItem: string;
navigationItems: ICustomSearchSelectOption[];
diff --git a/packages/ui/src/dropdowns/helper.tsx b/packages/ui/src/dropdowns/helper.tsx
index ad6cb4fd5b..efff3165a7 100644
--- a/packages/ui/src/dropdowns/helper.tsx
+++ b/packages/ui/src/dropdowns/helper.tsx
@@ -7,10 +7,10 @@ export interface IDropdownProps {
customButtonTabIndex?: number;
buttonClassName?: string;
className?: string;
- customButton?: JSX.Element;
+ customButton?: React.ReactNode;
disabled?: boolean;
input?: boolean;
- label?: string | JSX.Element;
+ label?: string | React.ReactNode;
maxHeight?: "sm" | "rg" | "md" | "lg";
noChevron?: boolean;
chevronClassName?: string;
@@ -48,7 +48,7 @@ export interface ICustomSelectProps extends IDropdownProps {
}
interface CustomSearchSelectProps {
- footerOption?: JSX.Element;
+ footerOption?: React.ReactNode;
onChange: any;
onClose?: () => void;
noResultsMessage?: string;
diff --git a/packages/ui/src/tables/types.ts b/packages/ui/src/tables/types.ts
index 220e4d738b..9f7acf6ca7 100644
--- a/packages/ui/src/tables/types.ts
+++ b/packages/ui/src/tables/types.ts
@@ -1,8 +1,8 @@
export type TTableColumn<T> = {
key: string;
content: string;
- thRender?: () => JSX.Element;
- tdRender: (rowData: T) => JSX.Element;
+ thRender?: () => React.ReactNode;
+ tdRender: (rowData: T) => React.ReactNode;
};
export type TTableData<T> = {
diff --git a/packages/ui/src/toast/index.tsx b/packages/ui/src/toast/index.tsx
index 5ccbd775b9..38690b409c 100644
--- a/packages/ui/src/toast/index.tsx
+++ b/packages/ui/src/toast/index.tsx
@@ -29,7 +29,7 @@ type SetToastProps =
};
type PromiseToastCallback<ToastData> = (data: ToastData) => string;
-type ActionItemsPromiseToastCallback<ToastData> = (data: ToastData) => JSX.Element;
+type ActionItemsPromiseToastCallback<ToastData> = (data: ToastData) => React.ReactNode;
type PromiseToastData<ToastData> = {
title: string;
diff --git a/packages/ui/src/tooltip/tooltip.tsx b/packages/ui/src/tooltip/tooltip.tsx
index d013414cdb..1c931c66e5 100644
--- a/packages/ui/src/tooltip/tooltip.tsx
+++ b/packages/ui/src/tooltip/tooltip.tsx
@@ -24,7 +24,7 @@ interface ITooltipProps {
tooltipHeading?: string;
tooltipContent: string | React.ReactNode;
position?: TPosition;
- children: JSX.Element;
+ children: React.ReactElement;
disabled?: boolean;
className?: string;
openDelay?: number;
diff --git a/packages/utils/src/editor.ts b/packages/utils/src/editor.ts
index fb15edd078..69fb73b8bf 100644
--- a/packages/utils/src/editor.ts
+++ b/packages/utils/src/editor.ts
@@ -37,7 +37,7 @@ export const getEditorAssetDownloadSrc = (args: TEditorSrcArgs): string | undefi
return url;
};
-export const getTextContent = (jsx: JSX.Element | React.ReactNode | null | undefined): string => {
+export const getTextContent = (jsx: React.ReactNode | React.ReactNode | null | undefined): string => {
if (!jsx) return "";
const div = document.createElement("div");
diff --git a/yarn.lock b/yarn.lock
index 77baf7900a..8c1e7f19e9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2678,6 +2678,13 @@
dependencies:
"@types/react" "*"
+ version "18.3.1"
+ resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.1.tgz#1e4654c08a9cdcfb6594c780ac59b55aad42fe07"
+ integrity sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==
+ dependencies:
+ "@types/react" "*"
+
"@types/react-dom@^18.2.18":
version "18.3.7"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.7.tgz#b89ddf2cd83b4feafcc4e2ea41afdfb95a0d194f"
@@ -2703,6 +2710,14 @@
"@types/prop-types" "*"
csstype "^3.0.2"
+ version "18.3.11"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.11.tgz#9d530601ff843ee0d7030d4227ea4360236bd537"
+ integrity sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==
+ dependencies:
+ "@types/prop-types" "*"
+ csstype "^3.0.2"
+
"@types/react@^18.3.11":
version "18.3.23"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.23.tgz#86ae6f6b95a48c418fecdaccc8069e0fbb63696a"
@@ -9526,7 +9541,16 @@ streamx@^2.15.0, streamx@^2.21.0:
optionalDependencies:
bare-events "^2.2.0"
-"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
+"string-width-cjs@npm:string-width@^4.2.0":
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
+ dependencies:
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.1"
+
+string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -9619,7 +9643,14 @@ string_decoder@^1.1.1, string_decoder@^1.3.0:
dependencies:
safe-buffer "~5.2.0"
-"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
+"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
+ dependencies:
+ ansi-regex "^5.0.1"
+
+strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -10791,7 +10822,16 @@ word-wrap@^1.2.5:
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
-"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
+"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
+ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
+ dependencies:
+ ansi-styles "^4.0.0"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
+
+wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==