Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/auth-form/auth-forgot-password.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { cn } from "../../helpers";
import { cn } from "../utils";

export interface AuthForgotPasswordProps {
onForgotPassword?: () => void;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/auth-form/auth-form.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useMemo } from "react";
import { E_PASSWORD_STRENGTH } from "@plane/constants";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { Button } from "../button/button";
import { Spinner } from "../spinners/circular-spinner";
import { AuthConfirmPasswordInput } from "./auth-confirm-password-input";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/auth-form/auth-input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Eye, EyeOff } from "lucide-react";
import React, { useState } from "react";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { Input } from "../form-fields/input";

export interface AuthInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "autoComplete"> {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/avatar/avatar-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
// ui
import { Tooltip } from "../tooltip";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";
// types
import { TAvatarSize, getSizeInfo, isAValidNumber } from "./avatar";

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/avatar/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
// ui
import { Tooltip } from "../tooltip";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";

export type TAvatarSize = "sm" | "md" | "base" | "lg" | number;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/badge/badge.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
// helpers
import { getIconStyling, getBadgeStyling, TBadgeVariant, TBadgeSizes } from "./helper";
import { cn } from "../../helpers";
import { cn } from "../utils";

export interface BadgeProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: TBadgeVariant;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/breadcrumbs/breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChevronRight } from "lucide-react";
import * as React from "react";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { Tooltip } from "../tooltip";

type BreadcrumbsProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/breadcrumbs/navigation-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { CheckIcon } from "lucide-react";
import * as React from "react";
import { cn } from "../../helpers";
import { cn } from "../utils";
// ui
import { CustomMenu, TContextMenuItem } from "../dropdowns";
import { Tooltip } from "../tooltip";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/breadcrumbs/navigation-search-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import { useState } from "react";
import { ICustomSearchSelectOption } from "@plane/types";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { CustomSearchSelect } from "../dropdowns";
import { Tooltip } from "../tooltip";
import { Breadcrumbs } from "./breadcrumbs";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";

import { getIconStyling, getButtonStyling, TButtonVariant, TButtonSizes } from "./helper";
import { cn } from "../../helpers";
import { cn } from "../utils";

export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: TButtonVariant;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/button/toggle-switch.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import { Switch } from "@headlessui/react";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";

interface IToggleSwitchProps {
value: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ChevronLeft } from "lucide-react";
import * as React from "react";
import { DayPicker } from "react-day-picker";

import { cn } from "../helpers";
import { cn } from "./utils";

export type CalendarProps = React.ComponentProps<typeof DayPicker>;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/card/card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { cn } from "../../helpers";
import { cn } from "../utils";
import {
ECardDirection,
ECardSpacing,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/collapsible/collapsible-button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from "react";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { DropdownIcon, ISvgIcons } from "../icons";

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/content-wrapper/content-wrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { Row } from "../row";
import { ERowVariant, TRowVariant } from "../row/helper";

Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/drag-handle.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { forwardRef } from "react";
import { MoreVertical } from "lucide-react";
import React, { forwardRef } from "react";
// helpers
import { cn } from "../helpers";
import { cn } from "./utils";

interface IDragHandle {
className?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/drop-indicator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { cn } from "../helpers";
import { cn } from "./utils";

type Props = {
isVisible: boolean;
Expand Down
5 changes: 2 additions & 3 deletions packages/ui/src/dropdown/common/button.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { Fragment } from "react";
// headless ui
import { Combobox } from "@headlessui/react";
import React, { Fragment } from "react";
// helper
import { cn } from "../../../helpers";
import { cn } from "../../utils";
import { IMultiSelectDropdownButton, ISingleSelectDropdownButton } from "../dropdown";

export const DropdownButton: React.FC<IMultiSelectDropdownButton | ISingleSelectDropdownButton> = (props) => {
Expand Down
8 changes: 4 additions & 4 deletions packages/ui/src/dropdown/common/input-search.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React, { FC, useEffect, useRef } from "react";
// headless ui
import { Combobox } from "@headlessui/react";
// icons
import { Search } from "lucide-react";
import React, { FC, useEffect, useRef } from "react";
// helpers
import { cn } from "../../../helpers";
import { cn } from "../../utils";

interface IInputSearch {
isOpen: boolean;
Expand Down Expand Up @@ -32,9 +30,11 @@ export const InputSearch: FC<IInputSearch> = (props) => {

useEffect(() => {
if (isOpen && !isMobile) {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
inputRef.current && inputRef.current.focus();
}
}, [isOpen, isMobile]);

return (
<div
className={cn(
Expand Down
10 changes: 4 additions & 6 deletions packages/ui/src/dropdown/common/options.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import React from "react";
// headless ui
import { Combobox } from "@headlessui/react";
// icons
import { Check } from "lucide-react";
// components
import { DropdownOptionsLoader, InputSearch } from ".";
import React from "react";
// helpers
import { cn } from "../../../helpers";
import { cn } from "../../utils";
// types
import { IMultiSelectDropdownOptions, ISingleSelectDropdownOptions } from "../dropdown";
// components
import { DropdownOptionsLoader, InputSearch } from ".";

export const DropdownOptions: React.FC<IMultiSelectDropdownOptions | ISingleSelectDropdownOptions> = (props) => {
const {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/dropdown/multi-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { usePopper } from "react-popper";
// plane imports
import { useOutsideClickDetector } from "@plane/hooks";
// local imports
import { cn } from "../../helpers";
import { cn } from "../utils";
import { useDropdownKeyPressed } from "../hooks/use-dropdown-key-pressed";
import { DropdownButton } from "./common";
import { DropdownOptions } from "./common/options";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/dropdown/single-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { usePopper } from "react-popper";
// plane imports
import { useOutsideClickDetector } from "@plane/hooks";
// local imports
import { cn } from "../../helpers";
import { cn } from "../utils";
import { useDropdownKeyPressed } from "../hooks/use-dropdown-key-pressed";
import { DropdownButton } from "./common";
import { DropdownOptions } from "./common/options";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/dropdowns/context-menu/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ChevronRight } from "lucide-react";
import React, { useState, useRef, useContext } from "react";
import { usePopper } from "react-popper";
// helpers
import { cn } from "../../../helpers";
import { cn } from "../../utils";
// types
import { TContextMenuItem, ContextMenuContext, Portal } from "./root";

Expand Down
6 changes: 2 additions & 4 deletions packages/ui/src/dropdowns/context-menu/root.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React, { useEffect, useRef, useState } from "react";
import ReactDOM from "react-dom";
// plane helpers
import { useOutsideClickDetector } from "@plane/hooks";
// helpers
import { cn } from "../../../helpers";
// hooks
import { usePlatformOS } from "../../hooks/use-platform-os";
// helpers
import { cn } from "../../utils";
// components
import { ContextMenuItem } from "./item";

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/dropdowns/custom-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { usePopper } from "react-popper";
// plane helpers
import { useOutsideClickDetector } from "@plane/hooks";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";
// hooks
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
// types
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/dropdowns/custom-search-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { usePopper } from "react-popper";
// plane imports
import { useOutsideClickDetector } from "@plane/hooks";
// local imports
import { cn } from "../../helpers";
import { cn } from "../utils";
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
import { Tooltip } from "../tooltip";
import { ICustomSearchSelectProps } from "./helper";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/dropdowns/custom-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useOutsideClickDetector } from "@plane/hooks";
// hooks
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";
// types
import { ICustomSelectItemProps, ICustomSelectProps } from "./helper";

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/emoji/emoji-icon-picker-new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import EmojiPicker from "emoji-picker-react";
// plane helpers
import { useOutsideClickDetector } from "@plane/hooks";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";
// hooks
import { LucideIconsList } from "./lucide-icons-list";
// helpers
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/emoji/emoji-icon-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useOutsideClickDetector } from "@plane/hooks";
// components
import { IconsList } from "./icons-list";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";
// hooks
import { EmojiIconPickerTypes, TABS_LIST, TCustomEmojiPicker } from "./emoji-icon-helper";

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/emoji/icons-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useEffect, useState } from "react";
// icons
import useFontFaceObserver from "use-font-face-observer";
import { MATERIAL_ICONS_LIST } from "..";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { Input } from "../form-fields";
import { InfoIcon } from "../icons";
// components
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/emoji/lucide-icons-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Search } from "lucide-react";
import React, { useEffect, useState } from "react";
// local imports
import { LUCIDE_ICONS_LIST } from "..";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { Input } from "../form-fields";
import { InfoIcon } from "../icons";
import { DEFAULT_COLORS, TIconsListProps, adjustColorForContrast } from "./emoji-icon-helper";
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/favorite-star.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Star } from "lucide-react";
import React from "react";
// helpers
import { cn } from "../helpers";
import { cn } from "./utils";

type Props = {
buttonClassName?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/form-fields/checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";

export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
containerClassName?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/form-fields/input-color-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from "react";
import { ColorResult, SketchPicker } from "react-color";
import { usePopper } from "react-popper";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";
// components
import { Button } from "../button";
import { Input } from "./input";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/form-fields/input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";

export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
mode?: "primary" | "transparent" | "true-transparent";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/form-fields/textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useRef } from "react";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";
// hooks
import { useAutoResizeTextArea } from "../hooks/use-auto-resize-textarea";

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/header/header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { cn } from "../../helpers";
import { cn } from "../utils";
import { EHeaderVariant, getHeaderStyle, THeaderVariant } from "./helper";
import { ERowVariant, Row } from "../row";

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/icons/priority-icon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import { AlertCircle, Ban, SignalHigh, SignalLow, SignalMedium } from "lucide-react";
import { cn } from "../../helpers";
import { cn } from "../utils";

export type TIssuePriorities = "urgent" | "high" | "medium" | "low" | "none";

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/loader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
// helpers
import { cn } from "../helpers";
import { cn } from "./utils";

type Props = {
children: React.ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/modals/alert-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ModalCore } from "./modal-core";
// constants
import { EModalPosition, EModalWidth } from "./constants";
// helpers
import { cn } from "../../helpers";
import { cn } from "../utils";

export type TModalVariant = "danger" | "primary";

Expand Down
Loading
Loading