π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
fix: move lucide related constants to ui package (#7226)
Prateek Shourya53e6a62a12ad
diff --git a/packages/constants/src/index.ts b/packages/constants/src/index.tsindex a7452ebe5e..d7ccebd319 100644--- a/packages/constants/src/index.ts+++ b/packages/constants/src/index.ts@@ -5,7 +5,6 @@ export * from "./endpoints";export * from "./file";export * from "./filter";export * from "./graph";-export * from "./icons";export * from "./instance";export * from "./issue";export * from "./metadata";diff --git a/packages/constants/src/icons.ts b/packages/ui/src/constants/icons.tssimilarity index 99%rename from packages/constants/src/icons.tsrename to packages/ui/src/constants/icons.tsindex ab9aa69b3f..634d91686b 100644--- a/packages/constants/src/icons.ts+++ b/packages/ui/src/constants/icons.ts@@ -152,6 +152,8 @@ import {CircleChevronDown,UsersRound,ToggleLeft,+ Search,+ User,} from "lucide-react";export const MATERIAL_ICONS_LIST = [@@ -912,6 +914,8 @@ export const LUCIDE_ICONS_LIST = [{ name: "Minus", element: Minus },{ name: "MinusCircle", element: MinusCircle },{ name: "MinusSquare", element: MinusSquare },+ { name: "Search", element: Search },{ name: "ToggleLeft", element: ToggleLeft },+ { name: "User", element: User },{ name: "UsersRound", element: UsersRound },];diff --git a/packages/ui/src/constants/index.ts b/packages/ui/src/constants/index.tsnew file mode 100644index 0000000000..6ef8d54d41--- /dev/null+++ b/packages/ui/src/constants/index.ts@@ -0,0 +1 @@+export * from "./icons";diff --git a/packages/ui/src/emoji/icons-list.tsx b/packages/ui/src/emoji/icons-list.tsxindex bae22ffb82..7c6d25ba5f 100644--- a/packages/ui/src/emoji/icons-list.tsx+++ b/packages/ui/src/emoji/icons-list.tsx@@ -2,7 +2,7 @@ import { Search } from "lucide-react";import React, { useEffect, useState } from "react";// iconsimport useFontFaceObserver from "use-font-face-observer";-import { MATERIAL_ICONS_LIST } from "@plane/constants";+import { MATERIAL_ICONS_LIST } from "..";import { cn } from "../../helpers";import { Input } from "../form-fields";import { InfoIcon } from "../icons";diff --git a/packages/ui/src/emoji/logo.tsx b/packages/ui/src/emoji/logo.tsxindex 0d598bac31..fd2727df69 100644--- a/packages/ui/src/emoji/logo.tsx+++ b/packages/ui/src/emoji/logo.tsx@@ -1,9 +1,8 @@import { Emoji } from "emoji-picker-react";import React, { FC } from "react";import useFontFaceObserver from "use-font-face-observer";-// plane imports-import { LUCIDE_ICONS_LIST } from "@plane/constants";// local imports+import { LUCIDE_ICONS_LIST } from "..";import { emojiCodeToUnicode } from "./helpers";export type TEmojiLogoProps = {diff --git a/packages/ui/src/emoji/lucide-icons-list.tsx b/packages/ui/src/emoji/lucide-icons-list.tsxindex d569feb267..ee5b2fc204 100644--- a/packages/ui/src/emoji/lucide-icons-list.tsx+++ b/packages/ui/src/emoji/lucide-icons-list.tsx@@ -1,8 +1,7 @@import { Search } from "lucide-react";import React, { useEffect, useState } from "react";-// plane imports-import { LUCIDE_ICONS_LIST } from "@plane/constants";// local imports+import { LUCIDE_ICONS_LIST } from "..";import { cn } from "../../helpers";import { Input } from "../form-fields";import { InfoIcon } from "../icons";diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.tsindex 29bf6f2488..a21979fa13 100644--- a/packages/ui/src/index.ts+++ b/packages/ui/src/index.ts@@ -2,34 +2,36 @@ export * from "./avatar";export * from "./badge";export * from "./breadcrumbs";export * from "./button";+export * from "./calendar";+export * from "./card";+export * from "./collapsible";+export * from "./color-picker";+export * from "./constants";+export * from "./content-wrapper";export * from "./control-link";+export * from "./drag-handle";+export * from "./drop-indicator";export * from "./dropdown";export * from "./dropdowns";export * from "./emoji";+export * from "./favorite-star";export * from "./form-fields";+export * from "./header";export * from "./hooks";export * from "./icons";+export * from "./link";+export * from "./loader";export * from "./modals";+export * from "./popovers";export * from "./progress";+export * from "./row";+export * from "./scroll-area";export * from "./sortable";export * from "./spinners";+export * from "./tables";+export * from "./tabs";+export * from "./tag";export * from "./toast";export * from "./tooltip";export * from "./typography";-export * from "./drag-handle";-export * from "./drop-indicator";-export * from "./favorite-star";-export * from "./loader";-export * from "./collapsible";-export * from "./popovers";-export * from "./tables";-export * from "./header";-export * from "./row";-export * from "./scroll-area";-export * from "./content-wrapper";-export * from "./card";-export * from "./tag";-export * from "./tabs";-export * from "./calendar";-export * from "./color-picker";-export * from "./link";+export * from "./utils";diff --git a/packages/ui/src/utils/icons.ts b/packages/ui/src/utils/icons.tsnew file mode 100644index 0000000000..de06cc7356--- /dev/null+++ b/packages/ui/src/utils/icons.ts@@ -0,0 +1,7 @@+import { LUCIDE_ICONS_LIST } from "..";++/**+ * Returns a random icon name from the LUCIDE_ICONS_LIST array+ */+export const getRandomIconName = (): string =>+ LUCIDE_ICONS_LIST[Math.floor(Math.random() * LUCIDE_ICONS_LIST.length)].name;diff --git a/packages/ui/src/utils/index.ts b/packages/ui/src/utils/index.tsnew file mode 100644index 0000000000..6ef8d54d41--- /dev/null+++ b/packages/ui/src/utils/index.ts@@ -0,0 +1 @@+export * from "./icons";diff --git a/packages/utils/src/emoji.ts b/packages/utils/src/emoji.tsindex 00272f41a4..2438cfeb72 100644--- a/packages/utils/src/emoji.ts+++ b/packages/utils/src/emoji.ts@@ -1,7 +1,7 @@"use client";// plane imports-import { LUCIDE_ICONS_LIST, RANDOM_EMOJI_CODES } from "@plane/constants";+import { RANDOM_EMOJI_CODES } from "@plane/constants";/*** Converts a hyphen-separated hexadecimal emoji code to its decimal representation@@ -83,9 +83,3 @@ export const groupReactions: (reactions: any[], key: string) => { [key: string]:* @returns {string} A random emoji code*/export const getRandomEmoji = (): string => RANDOM_EMOJI_CODES[Math.floor(Math.random() * RANDOM_EMOJI_CODES.length)];--/**- * Returns a random icon name from the LUCIDE_ICONS_LIST array- */-export const getRandomIconName = (): string =>- LUCIDE_ICONS_LIST[Math.floor(Math.random() * LUCIDE_ICONS_LIST.length)].name;diff --git a/web/core/components/common/logo.tsx b/web/core/components/common/logo.tsxindex f02fd28963..6e4ddb42c8 100644--- a/web/core/components/common/logo.tsx+++ b/web/core/components/common/logo.tsx@@ -7,8 +7,8 @@ import { Emoji } from "emoji-picker-react";// eslint-disable-next-line import/orderimport useFontFaceObserver from "use-font-face-observer";// plane imports-import { LUCIDE_ICONS_LIST } from "@plane/constants";import { TLogoProps } from "@plane/types";+import { LUCIDE_ICONS_LIST } from "@plane/ui";import { emojiCodeToUnicode } from "@plane/utils";type Props = {