refactor: remove cn helper function from the editor package (#6217)

This commit is contained in:
Aaryan Khandelwal 2024-12-18 12:22:14 +05:30 committed by GitHub
parent ddd4b51b4e
commit 580c4b1930
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 123 additions and 131 deletions

View file

@ -1,6 +1,8 @@
import { LucideIcon } from "lucide-react";
import { cn } from "@plane/editor";
// plane ui
import { Tooltip } from "@plane/ui";
// plane utils
import { cn } from "@plane/utils";
type Props = {
onChange: (value: number) => void;

View file

@ -1,9 +1,10 @@
import { useCallback, useMemo } from "react";
import { observer } from "mobx-react";
import { Check } from "lucide-react";
// plane packages
import { cn } from "@plane/editor";
// plane ui
import { Dropdown } from "@plane/ui";
// plane utils
import { cn } from "@plane/utils";
// constants
import { EIssueLayoutTypes, ISSUE_LAYOUT_MAP } from "@/constants/issue";

View file

@ -3,8 +3,9 @@
import { observer } from "mobx-react";
import { LucideIcon, Users } from "lucide-react";
// plane ui
import { cn } from "@plane/editor";
import { Avatar, AvatarGroup } from "@plane/ui";
// plane utils
import { cn } from "@plane/utils";
// helpers
import { getFileURL } from "@/helpers/file.helper";
// hooks

View file

@ -1,7 +1,7 @@
import { FC } from "react";
import { observer } from "mobx-react";
// Plane
import { cn } from "@plane/editor";
// plane utils
import { cn } from "@plane/utils";
// hooks
import { useTimeLineChartStore } from "@/hooks/use-timeline-chart";
//

View file

@ -1,7 +1,7 @@
import { FC } from "react";
import { observer } from "mobx-react";
// Plane
import { cn } from "@plane/editor";
// plane utils
import { cn } from "@plane/utils";
// hooks
import { useTimeLineChartStore } from "@/hooks/use-timeline-chart";
//

View file

@ -1,7 +1,7 @@
import { useState } from "react";
import { observer } from "mobx-react";
// Plane
import { cn } from "@plane/editor";
// plane utils
import { cn } from "@plane/utils";
//helpers
import { renderFormattedDate } from "@/helpers/date-time.helper";
//hooks

View file

@ -1,7 +1,7 @@
import { useState } from "react";
import { observer } from "mobx-react";
// Plane
import { cn } from "@plane/editor";
// plane utils
import { cn } from "@plane/utils";
//helpers
import { renderFormattedDate } from "@/helpers/date-time.helper";
//hooks

View file

@ -1,8 +1,10 @@
import { FC } from "react";
import { ChevronDown, ListFilter } from "lucide-react";
// components
import { cn } from "@plane/editor";
// plane ui
import { getButtonStyling } from "@plane/ui";
// plane utils
import { cn } from "@plane/utils";
// components
import { InboxIssueFilterSelection, InboxIssueOrderByDropdown } from "@/components/inbox/inbox-filter";
import { FiltersDropdown } from "@/components/issues";
import useSize from "@/hooks/use-window-size";

View file

@ -4,8 +4,7 @@ import { MutableRefObject, useEffect, useRef, useState } from "react";
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
import { observer } from "mobx-react";
import { cn } from "@plane/editor";
// plane packages
// plane ui
import {
IGroupByColumn,
TIssueMap,
@ -16,6 +15,8 @@ import {
TIssueKanbanFilters,
} from "@plane/types";
import { Row, setToast, TOAST_TYPE } from "@plane/ui";
// plane utils
import { cn } from "@plane/utils";
// components
import { ListLoaderItemRow } from "@/components/ui";
// constants

View file

@ -3,10 +3,9 @@
import React, { FC, useCallback, useEffect, useRef, useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
// icons
import { ListFilter, Search, X } from "lucide-react";
// editor
import { cn } from "@plane/editor";
// plane utils
import { cn } from "@plane/utils";
// plane helpers
import { useOutsideClickDetector } from "@plane/hooks";
// types

View file

@ -1,9 +1,10 @@
import { ChangeEvent } from "react";
import { Controller, useFormContext, UseFormSetValue } from "react-hook-form";
import { Info } from "lucide-react";
import { cn } from "@plane/editor";
// ui
// plane ui
import { Input, TextArea, Tooltip } from "@plane/ui";
// plane utils
import { cn } from "@plane/utils";
// constants
import { ETabIndices } from "@/constants/tab-indices";
// helpers

View file

@ -2,9 +2,10 @@ import { useCallback } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
import { ListFilter } from "lucide-react";
// types
import { cn } from "@plane/editor";
// plane types
import { TProjectFilters } from "@plane/types";
// plane utils
import { cn } from "@plane/utils";
// components
import { FiltersDropdown } from "@/components/issues";
import { ProjectFiltersSelection, ProjectOrderByDropdown } from "@/components/project";

View file

@ -1,7 +1,9 @@
import { forwardRef } from "react";
import range from "lodash/range";
import { cn } from "@plane/editor";
// plane ui
import { ContentWrapper } from "@plane/ui";
// plane utils
import { cn } from "@plane/utils";
export const KanbanIssueBlockLoader = forwardRef<HTMLSpanElement, { cardHeight?: number; shouldAnimate?: boolean }>(
({ cardHeight = 100, shouldAnimate = true }, ref) => (

View file

@ -1,7 +1,9 @@
import { Fragment, forwardRef } from "react";
import range from "lodash/range";
import { cn } from "@plane/editor";
// plane ui
import { Row } from "@plane/ui";
// plane utils
import { cn } from "@plane/utils";
import { getRandomInt, getRandomLength } from "../utils";
export const ListLoaderItemRow = forwardRef<

View file

@ -1,5 +1,6 @@
// plane utils
import { cn } from "@plane/utils";
// helpers
import { cn } from "@plane/editor";
import { getFileURL } from "@/helpers/file.helper";
type Props = {