fix: move lucide related constants to ui package (#7226)
* fix: move lucide related constants to ui package * chore: update yarn.lock
This commit is contained in:
parent
75f89c4c12
commit
53e6a62a12
11 changed files with 37 additions and 31 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
];
|
||||
1
packages/ui/src/constants/index.ts
Normal file
1
packages/ui/src/constants/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./icons";
|
||||
|
|
@ -2,7 +2,7 @@ import { Search } from "lucide-react";
|
|||
import React, { useEffect, useState } from "react";
|
||||
// icons
|
||||
import 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";
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
7
packages/ui/src/utils/icons.ts
Normal file
7
packages/ui/src/utils/icons.ts
Normal file
|
|
@ -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;
|
||||
1
packages/ui/src/utils/index.ts
Normal file
1
packages/ui/src/utils/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./icons";
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import { Emoji } from "emoji-picker-react";
|
|||
// eslint-disable-next-line import/order
|
||||
import 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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue