chore: removed heroicons package (#2506)

This commit is contained in:
Aaryan Khandelwal 2023-10-20 17:51:01 +05:30 committed by GitHub
parent 9f1fd2327a
commit 4b03802d22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 63 additions and 93 deletions

View File

@ -1,14 +1,11 @@
import { useEffect, Fragment } from "react"; import { useEffect, Fragment } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
// react-hook-form
import { Controller, useForm } from "react-hook-form";
// mobx
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import { useMobxStore } from "lib/mobx/store-provider"; import { Controller, useForm } from "react-hook-form";
// headless ui
import { Listbox, Transition } from "@headlessui/react"; import { Listbox, Transition } from "@headlessui/react";
// icons import { Check, ChevronDown } from "lucide-react";
import { ChevronDownIcon, CheckIcon } from "@heroicons/react/20/solid"; // mobx store
import { useMobxStore } from "lib/mobx/store-provider";
// constants // constants
import { USER_ROLES } from "constants/workspace"; import { USER_ROLES } from "constants/workspace";
// hooks // hooks
@ -57,18 +54,15 @@ export const OnBoardingForm: React.FC<Props> = observer(({ user }) => {
const userService = new UserService(); const userService = new UserService();
await userService await userService.updateMe(payload).then((response) => {
.updateMe(payload) userStore.setCurrentUser(response);
.then((response) => { router.push(next_path?.toString() || "/");
userStore.setCurrentUser(response); setToastAlert({
router.push(next_path?.toString() || "/"); type: "success",
setToastAlert({ title: "Success!",
type: "success", message: "Details updated successfully.",
title: "Success!", });
message: "Details updated successfully.", });
});
})
.catch((err) => {});
}; };
useEffect(() => { useEffect(() => {
@ -132,7 +126,7 @@ export const OnBoardingForm: React.FC<Props> = observer(({ user }) => {
className={`flex items-center justify-between gap-1 w-full rounded-md border border-custom-border-300 shadow-sm duration-300 focus:outline-none px-3 py-2 text-sm`} className={`flex items-center justify-between gap-1 w-full rounded-md border border-custom-border-300 shadow-sm duration-300 focus:outline-none px-3 py-2 text-sm`}
> >
<span className={value ? "" : "text-custom-text-400"}>{value || "Select your role..."}</span> <span className={value ? "" : "text-custom-text-400"}>{value || "Select your role..."}</span>
<ChevronDownIcon className="h-3 w-3" aria-hidden="true" /> <ChevronDown className="h-3 w-3" aria-hidden="true" strokeWidth={2} />
</Listbox.Button> </Listbox.Button>
<Transition <Transition
@ -163,7 +157,7 @@ export const OnBoardingForm: React.FC<Props> = observer(({ user }) => {
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span>{role.label}</span> <span>{role.label}</span>
</div> </div>
{selected && <CheckIcon className="h-4 w-4 flex-shrink-0" />} {selected && <Check className="h-3 w-3 flex-shrink-0" strokeWidth={2} />}
</div> </div>
)} )}
</Listbox.Option> </Listbox.Option>

View File

@ -1,8 +1,7 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
// icons import { ChevronDown } from "lucide-react";
import { ChevronDownIcon } from "@heroicons/react/20/solid"; // mobx store
// mobx
import { useMobxStore } from "lib/mobx/store-provider"; import { useMobxStore } from "lib/mobx/store-provider";
import { RootStore } from "store/root"; import { RootStore } from "store/root";
// components // components
@ -45,7 +44,7 @@ export const NavbarIssueFilter = observer(() => {
button={ button={
<> <>
<span>Filters</span> <span>Filters</span>
<ChevronDownIcon className="h-3 w-3" aria-hidden="true" /> <ChevronDown className="h-3 w-3" aria-hidden="true" />
</> </>
} }
items={[ items={[

View File

@ -1,25 +1,20 @@
import React, { useState } from "react"; import React, { useState } from "react";
// mobx
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
// react-hook-form
import { Controller, useForm } from "react-hook-form"; import { Controller, useForm } from "react-hook-form";
// headless ui
import { Menu, Transition } from "@headlessui/react"; import { Menu, Transition } from "@headlessui/react";
// lib import { Check, MessageSquare, MoreVertical, X } from "lucide-react";
// mobx store
import { useMobxStore } from "lib/mobx/store-provider"; import { useMobxStore } from "lib/mobx/store-provider";
// components // components
import { LiteReadOnlyEditorWithRef, LiteTextEditorWithRef } from "@plane/lite-text-editor"; import { LiteReadOnlyEditorWithRef, LiteTextEditorWithRef } from "@plane/lite-text-editor";
import { CommentReactions } from "components/issues/peek-overview"; import { CommentReactions } from "components/issues/peek-overview";
// icons
import { ChatBubbleLeftEllipsisIcon, CheckIcon, XMarkIcon, EllipsisVerticalIcon } from "@heroicons/react/24/outline";
// helpers // helpers
import { timeAgo } from "helpers/date-time.helper"; import { timeAgo } from "helpers/date-time.helper";
// types // types
import { Comment } from "types/issue"; import { Comment } from "types/issue";
import fileService from "services/file.service";
// services // services
import fileService from "services/file.service";
type Props = { type Props = {
workspaceSlug: string; workspaceSlug: string;
@ -81,7 +76,7 @@ export const CommentCard: React.FC<Props> = observer((props) => {
)} )}
<span className="absolute -bottom-0.5 -right-1 rounded-tl bg-custom-background-80 px-0.5 py-px"> <span className="absolute -bottom-0.5 -right-1 rounded-tl bg-custom-background-80 px-0.5 py-px">
<ChatBubbleLeftEllipsisIcon className="h-3.5 w-3.5 text-custom-text-200" aria-hidden="true" /> <MessageSquare className="h-3 w-3 text-custom-text-200" aria-hidden="true" strokeWidth={2} />
</span> </span>
</div> </div>
<div className="min-w-0 flex-1"> <div className="min-w-0 flex-1">
@ -124,14 +119,14 @@ export const CommentCard: React.FC<Props> = observer((props) => {
disabled={isSubmitting} disabled={isSubmitting}
className="group rounded border border-green-500 bg-green-500/20 p-2 shadow-md duration-300 hover:bg-green-500" className="group rounded border border-green-500 bg-green-500/20 p-2 shadow-md duration-300 hover:bg-green-500"
> >
<CheckIcon className="h-3 w-3 text-green-500 duration-300 group-hover:text-white" /> <Check className="h-3 w-3 text-green-500 duration-300 group-hover:text-white" strokeWidth={2} />
</button> </button>
<button <button
type="button" type="button"
className="group rounded border border-red-500 bg-red-500/20 p-2 shadow-md duration-300 hover:bg-red-500" className="group rounded border border-red-500 bg-red-500/20 p-2 shadow-md duration-300 hover:bg-red-500"
onClick={() => setIsEditing(false)} onClick={() => setIsEditing(false)}
> >
<XMarkIcon className="h-3 w-3 text-red-500 duration-300 group-hover:text-white" /> <X className="h-3 w-3 text-red-500 duration-300 group-hover:text-white" strokeWidth={2} />
</button> </button>
</div> </div>
</form> </form>
@ -150,10 +145,10 @@ export const CommentCard: React.FC<Props> = observer((props) => {
<Menu as="div" className="relative w-min text-left"> <Menu as="div" className="relative w-min text-left">
<Menu.Button <Menu.Button
type="button" type="button"
onClick={() => { }} onClick={() => {}}
className="relative grid place-items-center rounded p-1 text-custom-text-200 hover:text-custom-text-100 outline-none cursor-pointer hover:bg-custom-background-80" className="relative grid place-items-center rounded p-1 text-custom-text-200 hover:text-custom-text-100 outline-none cursor-pointer hover:bg-custom-background-80"
> >
<EllipsisVerticalIcon className="h-5 w-5 text-custom-text-200 duration-300" /> <MoreVertical className="h-4 w-4 text-custom-text-200 duration-300" strokeWidth={2} />
</Menu.Button> </Menu.Button>
<Transition <Transition
@ -174,8 +169,9 @@ export const CommentCard: React.FC<Props> = observer((props) => {
onClick={() => { onClick={() => {
setIsEditing(true); setIsEditing(true);
}} }}
className={`w-full select-none truncate rounded px-1 py-1.5 text-left text-custom-text-200 hover:bg-custom-background-80 ${active ? "bg-custom-background-80" : "" className={`w-full select-none truncate rounded px-1 py-1.5 text-left text-custom-text-200 hover:bg-custom-background-80 ${
}`} active ? "bg-custom-background-80" : ""
}`}
> >
Edit Edit
</button> </button>
@ -188,8 +184,9 @@ export const CommentCard: React.FC<Props> = observer((props) => {
<button <button
type="button" type="button"
onClick={handleDelete} onClick={handleDelete}
className={`w-full select-none truncate rounded px-1 py-1.5 text-left text-custom-text-200 hover:bg-custom-background-80 ${active ? "bg-custom-background-80" : "" className={`w-full select-none truncate rounded px-1 py-1.5 text-left text-custom-text-200 hover:bg-custom-background-80 ${
}`} active ? "bg-custom-background-80" : ""
}`}
> >
Delete Delete
</button> </button>

View File

@ -1,16 +1,9 @@
"use client";
import { Fragment, useState, useRef } from "react"; import { Fragment, useState, useRef } from "react";
// next
import Link from "next/link"; import Link from "next/link";
// headless
import { Popover, Transition } from "@headlessui/react"; import { Popover, Transition } from "@headlessui/react";
import { ChevronLeftIcon, CheckIcon } from "@heroicons/react/20/solid";
// hooks // hooks
import useOutSideClick from "hooks/use-outside-click"; import useOutSideClick from "hooks/use-outside-click";
import { Check, ChevronLeft } from "lucide-react";
type ItemOptionType = { type ItemOptionType = {
display: React.ReactNode; display: React.ReactNode;
@ -94,10 +87,10 @@ const DropdownItem: React.FC<DropdownItemProps> = (props) => {
isSelected ? "bg-custom-background-80" : "" isSelected ? "bg-custom-background-80" : ""
}`} }`}
> >
{children && <ChevronLeftIcon className="h-5 w-5 transition-transform transform" />} {children && <ChevronLeft className="h-4 w-4 transition-transform transform" strokeWidth={2} />}
{!children && <span />} {!children && <span />}
<span className="truncate text-xs">{display}</span> <span className="truncate text-xs">{display}</span>
<CheckIcon className={`h-3.5 w-3.5 opacity-0 ${isSelected ? "opacity-100" : ""}`} /> <Check className={`h-3 w-3 opacity-0 ${isSelected ? "opacity-100" : ""}`} strokeWidth={2} />
</button> </button>
)} )}

View File

@ -1,12 +1,6 @@
import React from "react"; import React from "react";
import { AlertTriangle, CheckCircle, Info, X, XCircle } from "lucide-react";
// hooks // hooks
import {
CheckCircleIcon,
ExclamationTriangleIcon,
InformationCircleIcon,
XCircleIcon,
XMarkIcon,
} from "@heroicons/react/24/outline";
import useToast from "hooks/use-toast"; import useToast from "hooks/use-toast";
// icons // icons
@ -26,7 +20,7 @@ const ToastAlerts = () => {
onClick={() => removeAlert(alert.id)} onClick={() => removeAlert(alert.id)}
> >
<span className="sr-only">Dismiss</span> <span className="sr-only">Dismiss</span>
<XMarkIcon className="h-5 w-5" aria-hidden="true" /> <X className="h-5 w-5" aria-hidden="true" />
</button> </button>
</div> </div>
<div <div
@ -43,13 +37,13 @@ const ToastAlerts = () => {
<div className="flex items-center gap-x-3"> <div className="flex items-center gap-x-3">
<div className="flex-shrink-0"> <div className="flex-shrink-0">
{alert.type === "success" ? ( {alert.type === "success" ? (
<CheckCircleIcon className="h-8 w-8" aria-hidden="true" /> <CheckCircle className="h-8 w-8" aria-hidden="true" />
) : alert.type === "error" ? ( ) : alert.type === "error" ? (
<XCircleIcon className="h-8 w-8" /> <XCircle className="h-8 w-8" />
) : alert.type === "warning" ? ( ) : alert.type === "warning" ? (
<ExclamationTriangleIcon className="h-8 w-8" aria-hidden="true" /> <AlertTriangle className="h-8 w-8" aria-hidden="true" />
) : ( ) : (
<InformationCircleIcon className="h-8 w-8" /> <Info className="h-8 w-8" />
)} )}
</div> </div>
<div> <div>

View File

@ -15,9 +15,9 @@
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0", "@emotion/styled": "^11.11.0",
"@headlessui/react": "^1.7.13", "@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.12",
"@mui/icons-material": "^5.14.1", "@mui/icons-material": "^5.14.1",
"@mui/material": "^5.14.1", "@mui/material": "^5.14.1",
"@plane/rich-text-editor": "*",
"axios": "^1.3.4", "axios": "^1.3.4",
"clsx": "^2.0.0", "clsx": "^2.0.0",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
@ -35,8 +35,7 @@
"swr": "^2.2.2", "swr": "^2.2.2",
"tailwind-merge": "^1.14.0", "tailwind-merge": "^1.14.0",
"typescript": "4.9.5", "typescript": "4.9.5",
"uuid": "^9.0.0", "uuid": "^9.0.0"
"@plane/rich-text-editor": "*"
}, },
"devDependencies": { "devDependencies": {
"@types/js-cookie": "^3.0.3", "@types/js-cookie": "^3.0.3",
@ -49,7 +48,7 @@
"eslint": "8.34.0", "eslint": "8.34.0",
"eslint-config-custom": "*", "eslint-config-custom": "*",
"eslint-config-next": "13.2.1", "eslint-config-next": "13.2.1",
"tsconfig": "*", "tailwind-config-custom": "*",
"tailwind-config-custom": "*" "tsconfig": "*"
} }
} }

View File

@ -3,6 +3,19 @@ import { useRouter } from "next/router";
import useSWR, { mutate } from "swr"; import useSWR, { mutate } from "swr";
import { Command } from "cmdk"; import { Command } from "cmdk";
import { Dialog, Transition } from "@headlessui/react"; import { Dialog, Transition } from "@headlessui/react";
import {
FileText,
FolderPlus,
LinkIcon,
MessageSquare,
Rocket,
Search,
Settings,
Signal,
Trash2,
UserMinus2,
UserPlus2,
} from "lucide-react";
// services // services
import { WorkspaceService } from "services/workspace.service"; import { WorkspaceService } from "services/workspace.service";
import { IssueService } from "services/issue"; import { IssueService } from "services/issue";
@ -18,19 +31,6 @@ import {
ChangeIssueState, ChangeIssueState,
commandGroups, commandGroups,
} from "components/command-palette"; } from "components/command-palette";
// ui
import {
FileText,
FolderPlus,
LinkIcon,
MessageSquare,
Rocket,
Settings,
Signal,
Trash2,
UserMinus2,
UserPlus2,
} from "lucide-react";
import { import {
ContrastIcon, ContrastIcon,
DiceIcon, DiceIcon,
@ -44,7 +44,6 @@ import {
} from "@plane/ui"; } from "@plane/ui";
// icons // icons
import { DiscordIcon, GithubIcon, SettingIcon } from "components/icons"; import { DiscordIcon, GithubIcon, SettingIcon } from "components/icons";
import { MagnifyingGlassIcon } from "@heroicons/react/24/outline";
// helpers // helpers
import { copyTextToClipboard } from "helpers/string.helper"; import { copyTextToClipboard } from "helpers/string.helper";
// types // types
@ -306,9 +305,10 @@ export const CommandModal: React.FC<Props> = (props) => {
)} )}
</div> </div>
<div className="relative"> <div className="relative">
<MagnifyingGlassIcon <Search
className="pointer-events-none absolute top-3.5 left-4 h-5 w-5 text-custom-text-200" className="pointer-events-none absolute top-1/2 -translate-y-1/2 left-4 h-4 w-4 text-custom-text-200"
aria-hidden="true" aria-hidden="true"
strokeWidth={2}
/> />
<Command.Input <Command.Input
className="w-full border-0 border-b border-custom-border-200 bg-transparent p-4 pl-11 text-custom-text-100 placeholder:text-custom-text-400 outline-none focus:ring-0 text-sm" className="w-full border-0 border-b border-custom-border-200 bg-transparent p-4 pl-11 text-custom-text-100 placeholder:text-custom-text-400 outline-none focus:ring-0 text-sm"

View File

@ -16,7 +16,6 @@
"@emotion/styled": "^11.11.0", "@emotion/styled": "^11.11.0",
"@headlessui/react": "^1.7.3", "@headlessui/react": "^1.7.3",
"@hello-pangea/dnd": "^16.3.0", "@hello-pangea/dnd": "^16.3.0",
"@heroicons/react": "^2.0.12",
"@jitsu/nextjs": "^3.1.5", "@jitsu/nextjs": "^3.1.5",
"@mui/icons-material": "^5.14.1", "@mui/icons-material": "^5.14.1",
"@mui/material": "^5.14.1", "@mui/material": "^5.14.1",
@ -27,11 +26,11 @@
"@nivo/line": "0.80.0", "@nivo/line": "0.80.0",
"@nivo/pie": "0.80.0", "@nivo/pie": "0.80.0",
"@nivo/scatterplot": "0.80.0", "@nivo/scatterplot": "0.80.0",
"@plane/lite-text-editor": "*",
"@plane/rich-text-editor": "*",
"@plane/ui": "*", "@plane/ui": "*",
"@popperjs/core": "^2.11.8", "@popperjs/core": "^2.11.8",
"@sentry/nextjs": "^7.36.0", "@sentry/nextjs": "^7.36.0",
"@plane/lite-text-editor": "*",
"@plane/rich-text-editor": "*",
"@types/lodash.debounce": "^4.0.7", "@types/lodash.debounce": "^4.0.7",
"@types/react-datepicker": "^4.8.0", "@types/react-datepicker": "^4.8.0",
"axios": "^1.1.3", "axios": "^1.1.3",

View File

@ -1422,11 +1422,6 @@
redux "^4.2.1" redux "^4.2.1"
use-memo-one "^1.1.3" use-memo-one "^1.1.3"
"@heroicons/react@^2.0.12":
version "2.0.18"
resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-2.0.18.tgz#f80301907c243df03c7e9fd76c0286e95361f7c1"
integrity sha512-7TyMjRrZZMBPa+/5Y8lN0iyvUU/01PeMGX2+RE7cQWpEUIcb4QotzUObFkJDejj/HUH4qjP/eQ0gzzKs2f+6Yw==
"@humanwhocodes/config-array@^0.11.11", "@humanwhocodes/config-array@^0.11.8": "@humanwhocodes/config-array@^0.11.11", "@humanwhocodes/config-array@^0.11.8":
version "0.11.11" version "0.11.11"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844"