[WEB-4661] fix: move helpers file into utils #7568
This commit is contained in:
parent
a085c0ec62
commit
047080a66f
59 changed files with 68 additions and 72 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export interface AuthForgotPasswordProps {
|
export interface AuthForgotPasswordProps {
|
||||||
onForgotPassword?: () => void;
|
onForgotPassword?: () => void;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useState, useMemo } from "react";
|
import React, { useState, useMemo } from "react";
|
||||||
import { E_PASSWORD_STRENGTH } from "@plane/constants";
|
import { E_PASSWORD_STRENGTH } from "@plane/constants";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { Button } from "../button/button";
|
import { Button } from "../button/button";
|
||||||
import { Spinner } from "../spinners/circular-spinner";
|
import { Spinner } from "../spinners/circular-spinner";
|
||||||
import { AuthConfirmPasswordInput } from "./auth-confirm-password-input";
|
import { AuthConfirmPasswordInput } from "./auth-confirm-password-input";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Eye, EyeOff } from "lucide-react";
|
import { Eye, EyeOff } from "lucide-react";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { Input } from "../form-fields/input";
|
import { Input } from "../form-fields/input";
|
||||||
|
|
||||||
export interface AuthInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "autoComplete"> {
|
export interface AuthInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "autoComplete"> {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React from "react";
|
||||||
// ui
|
// ui
|
||||||
import { Tooltip } from "../tooltip";
|
import { Tooltip } from "../tooltip";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// types
|
// types
|
||||||
import { TAvatarSize, getSizeInfo, isAValidNumber } from "./avatar";
|
import { TAvatarSize, getSizeInfo, isAValidNumber } from "./avatar";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React from "react";
|
||||||
// ui
|
// ui
|
||||||
import { Tooltip } from "../tooltip";
|
import { Tooltip } from "../tooltip";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export type TAvatarSize = "sm" | "md" | "base" | "lg" | number;
|
export type TAvatarSize = "sm" | "md" | "base" | "lg" | number;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { getIconStyling, getBadgeStyling, TBadgeVariant, TBadgeSizes } from "./helper";
|
import { getIconStyling, getBadgeStyling, TBadgeVariant, TBadgeSizes } from "./helper";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export interface BadgeProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
export interface BadgeProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||||
variant?: TBadgeVariant;
|
variant?: TBadgeVariant;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { ChevronRight } from "lucide-react";
|
import { ChevronRight } from "lucide-react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { Tooltip } from "../tooltip";
|
import { Tooltip } from "../tooltip";
|
||||||
|
|
||||||
type BreadcrumbsProps = {
|
type BreadcrumbsProps = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { CheckIcon } from "lucide-react";
|
import { CheckIcon } from "lucide-react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// ui
|
// ui
|
||||||
import { CustomMenu, TContextMenuItem } from "../dropdowns";
|
import { CustomMenu, TContextMenuItem } from "../dropdowns";
|
||||||
import { Tooltip } from "../tooltip";
|
import { Tooltip } from "../tooltip";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { ICustomSearchSelectOption } from "@plane/types";
|
import { ICustomSearchSelectOption } from "@plane/types";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { CustomSearchSelect } from "../dropdowns";
|
import { CustomSearchSelect } from "../dropdowns";
|
||||||
import { Tooltip } from "../tooltip";
|
import { Tooltip } from "../tooltip";
|
||||||
import { Breadcrumbs } from "./breadcrumbs";
|
import { Breadcrumbs } from "./breadcrumbs";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
|
||||||
import { getIconStyling, getButtonStyling, TButtonVariant, TButtonSizes } from "./helper";
|
import { getIconStyling, getButtonStyling, TButtonVariant, TButtonSizes } from "./helper";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||||
variant?: TButtonVariant;
|
variant?: TButtonVariant;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { Switch } from "@headlessui/react";
|
import { Switch } from "@headlessui/react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
interface IToggleSwitchProps {
|
interface IToggleSwitchProps {
|
||||||
value: boolean;
|
value: boolean;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { ChevronLeft } from "lucide-react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { DayPicker } from "react-day-picker";
|
import { DayPicker } from "react-day-picker";
|
||||||
|
|
||||||
import { cn } from "../helpers";
|
import { cn } from "./utils";
|
||||||
|
|
||||||
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import {
|
import {
|
||||||
ECardDirection,
|
ECardDirection,
|
||||||
ECardSpacing,
|
ECardSpacing,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { DropdownIcon, ISvgIcons } from "../icons";
|
import { DropdownIcon, ISvgIcons } from "../icons";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { Row } from "../row";
|
import { Row } from "../row";
|
||||||
import { ERowVariant, TRowVariant } from "../row/helper";
|
import { ERowVariant, TRowVariant } from "../row/helper";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { forwardRef } from "react";
|
|
||||||
import { MoreVertical } from "lucide-react";
|
import { MoreVertical } from "lucide-react";
|
||||||
|
import React, { forwardRef } from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../helpers";
|
import { cn } from "./utils";
|
||||||
|
|
||||||
interface IDragHandle {
|
interface IDragHandle {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { cn } from "../helpers";
|
import { cn } from "./utils";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isVisible: boolean;
|
isVisible: boolean;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import React, { Fragment } from "react";
|
|
||||||
// headless ui
|
|
||||||
import { Combobox } from "@headlessui/react";
|
import { Combobox } from "@headlessui/react";
|
||||||
|
import React, { Fragment } from "react";
|
||||||
// helper
|
// helper
|
||||||
import { cn } from "../../../helpers";
|
import { cn } from "../../utils";
|
||||||
import { IMultiSelectDropdownButton, ISingleSelectDropdownButton } from "../dropdown";
|
import { IMultiSelectDropdownButton, ISingleSelectDropdownButton } from "../dropdown";
|
||||||
|
|
||||||
export const DropdownButton: React.FC<IMultiSelectDropdownButton | ISingleSelectDropdownButton> = (props) => {
|
export const DropdownButton: React.FC<IMultiSelectDropdownButton | ISingleSelectDropdownButton> = (props) => {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
import React, { FC, useEffect, useRef } from "react";
|
|
||||||
// headless ui
|
|
||||||
import { Combobox } from "@headlessui/react";
|
import { Combobox } from "@headlessui/react";
|
||||||
// icons
|
|
||||||
import { Search } from "lucide-react";
|
import { Search } from "lucide-react";
|
||||||
|
import React, { FC, useEffect, useRef } from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../../helpers";
|
import { cn } from "../../utils";
|
||||||
|
|
||||||
interface IInputSearch {
|
interface IInputSearch {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|
@ -32,9 +30,11 @@ export const InputSearch: FC<IInputSearch> = (props) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isOpen && !isMobile) {
|
if (isOpen && !isMobile) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
inputRef.current && inputRef.current.focus();
|
inputRef.current && inputRef.current.focus();
|
||||||
}
|
}
|
||||||
}, [isOpen, isMobile]);
|
}, [isOpen, isMobile]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
import React from "react";
|
|
||||||
// headless ui
|
|
||||||
import { Combobox } from "@headlessui/react";
|
import { Combobox } from "@headlessui/react";
|
||||||
// icons
|
|
||||||
import { Check } from "lucide-react";
|
import { Check } from "lucide-react";
|
||||||
// components
|
import React from "react";
|
||||||
import { DropdownOptionsLoader, InputSearch } from ".";
|
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../../helpers";
|
import { cn } from "../../utils";
|
||||||
// types
|
// types
|
||||||
import { IMultiSelectDropdownOptions, ISingleSelectDropdownOptions } from "../dropdown";
|
import { IMultiSelectDropdownOptions, ISingleSelectDropdownOptions } from "../dropdown";
|
||||||
|
// components
|
||||||
|
import { DropdownOptionsLoader, InputSearch } from ".";
|
||||||
|
|
||||||
export const DropdownOptions: React.FC<IMultiSelectDropdownOptions | ISingleSelectDropdownOptions> = (props) => {
|
export const DropdownOptions: React.FC<IMultiSelectDropdownOptions | ISingleSelectDropdownOptions> = (props) => {
|
||||||
const {
|
const {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { usePopper } from "react-popper";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { useOutsideClickDetector } from "@plane/hooks";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// local imports
|
// local imports
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { useDropdownKeyPressed } from "../hooks/use-dropdown-key-pressed";
|
import { useDropdownKeyPressed } from "../hooks/use-dropdown-key-pressed";
|
||||||
import { DropdownButton } from "./common";
|
import { DropdownButton } from "./common";
|
||||||
import { DropdownOptions } from "./common/options";
|
import { DropdownOptions } from "./common/options";
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { usePopper } from "react-popper";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { useOutsideClickDetector } from "@plane/hooks";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// local imports
|
// local imports
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { useDropdownKeyPressed } from "../hooks/use-dropdown-key-pressed";
|
import { useDropdownKeyPressed } from "../hooks/use-dropdown-key-pressed";
|
||||||
import { DropdownButton } from "./common";
|
import { DropdownButton } from "./common";
|
||||||
import { DropdownOptions } from "./common/options";
|
import { DropdownOptions } from "./common/options";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { ChevronRight } from "lucide-react";
|
||||||
import React, { useState, useRef, useContext } from "react";
|
import React, { useState, useRef, useContext } from "react";
|
||||||
import { usePopper } from "react-popper";
|
import { usePopper } from "react-popper";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../../helpers";
|
import { cn } from "../../utils";
|
||||||
// types
|
// types
|
||||||
import { TContextMenuItem, ContextMenuContext, Portal } from "./root";
|
import { TContextMenuItem, ContextMenuContext, Portal } from "./root";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
// plane helpers
|
|
||||||
import { useOutsideClickDetector } from "@plane/hooks";
|
|
||||||
// helpers
|
|
||||||
import { cn } from "../../../helpers";
|
|
||||||
// hooks
|
// hooks
|
||||||
import { usePlatformOS } from "../../hooks/use-platform-os";
|
import { usePlatformOS } from "../../hooks/use-platform-os";
|
||||||
|
// helpers
|
||||||
|
import { cn } from "../../utils";
|
||||||
// components
|
// components
|
||||||
import { ContextMenuItem } from "./item";
|
import { ContextMenuItem } from "./item";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { usePopper } from "react-popper";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/hooks";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// hooks
|
// hooks
|
||||||
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
||||||
// types
|
// types
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { usePopper } from "react-popper";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { useOutsideClickDetector } from "@plane/hooks";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// local imports
|
// local imports
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
||||||
import { Tooltip } from "../tooltip";
|
import { Tooltip } from "../tooltip";
|
||||||
import { ICustomSearchSelectProps } from "./helper";
|
import { ICustomSearchSelectProps } from "./helper";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// hooks
|
// hooks
|
||||||
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// types
|
// types
|
||||||
import { ICustomSelectItemProps, ICustomSelectProps } from "./helper";
|
import { ICustomSelectItemProps, ICustomSelectProps } from "./helper";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import EmojiPicker from "emoji-picker-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/hooks";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// hooks
|
// hooks
|
||||||
import { LucideIconsList } from "./lucide-icons-list";
|
import { LucideIconsList } from "./lucide-icons-list";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import { IconsList } from "./icons-list";
|
import { IconsList } from "./icons-list";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// hooks
|
// hooks
|
||||||
import { EmojiIconPickerTypes, TABS_LIST, TCustomEmojiPicker } from "./emoji-icon-helper";
|
import { EmojiIconPickerTypes, TABS_LIST, TCustomEmojiPicker } from "./emoji-icon-helper";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import React, { useEffect, useState } from "react";
|
||||||
// icons
|
// icons
|
||||||
import useFontFaceObserver from "use-font-face-observer";
|
import useFontFaceObserver from "use-font-face-observer";
|
||||||
import { MATERIAL_ICONS_LIST } from "..";
|
import { MATERIAL_ICONS_LIST } from "..";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { Input } from "../form-fields";
|
import { Input } from "../form-fields";
|
||||||
import { InfoIcon } from "../icons";
|
import { InfoIcon } from "../icons";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { Search } from "lucide-react";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
// local imports
|
// local imports
|
||||||
import { LUCIDE_ICONS_LIST } from "..";
|
import { LUCIDE_ICONS_LIST } from "..";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { Input } from "../form-fields";
|
import { Input } from "../form-fields";
|
||||||
import { InfoIcon } from "../icons";
|
import { InfoIcon } from "../icons";
|
||||||
import { DEFAULT_COLORS, TIconsListProps, adjustColorForContrast } from "./emoji-icon-helper";
|
import { DEFAULT_COLORS, TIconsListProps, adjustColorForContrast } from "./emoji-icon-helper";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
|
||||||
import { Star } from "lucide-react";
|
import { Star } from "lucide-react";
|
||||||
|
import React from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../helpers";
|
import { cn } from "./utils";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
buttonClassName?: string;
|
buttonClassName?: string;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||||
containerClassName?: string;
|
containerClassName?: string;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import * as React from "react";
|
||||||
import { ColorResult, SketchPicker } from "react-color";
|
import { ColorResult, SketchPicker } from "react-color";
|
||||||
import { usePopper } from "react-popper";
|
import { usePopper } from "react-popper";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// components
|
// components
|
||||||
import { Button } from "../button";
|
import { Button } from "../button";
|
||||||
import { Input } from "./input";
|
import { Input } from "./input";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||||
mode?: "primary" | "transparent" | "true-transparent";
|
mode?: "primary" | "transparent" | "true-transparent";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useRef } from "react";
|
import React, { useRef } from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// hooks
|
// hooks
|
||||||
import { useAutoResizeTextArea } from "../hooks/use-auto-resize-textarea";
|
import { useAutoResizeTextArea } from "../hooks/use-auto-resize-textarea";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { EHeaderVariant, getHeaderStyle, THeaderVariant } from "./helper";
|
import { EHeaderVariant, getHeaderStyle, THeaderVariant } from "./helper";
|
||||||
import { ERowVariant, Row } from "../row";
|
import { ERowVariant, Row } from "../row";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { AlertCircle, Ban, SignalHigh, SignalLow, SignalMedium } from "lucide-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";
|
export type TIssuePriorities = "urgent" | "high" | "medium" | "low" | "none";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../helpers";
|
import { cn } from "./utils";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { ModalCore } from "./modal-core";
|
||||||
// constants
|
// constants
|
||||||
import { EModalPosition, EModalWidth } from "./constants";
|
import { EModalPosition, EModalWidth } from "./constants";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export type TModalVariant = "danger" | "primary";
|
export type TModalVariant = "danger" | "primary";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Dialog, Transition } from "@headlessui/react";
|
||||||
// constants
|
// constants
|
||||||
import { EModalPosition, EModalWidth } from "./constants";
|
import { EModalPosition, EModalWidth } from "./constants";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export interface OAuthButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
export interface OAuthButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||||
text: string;
|
text: string;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { OAuthButton } from "./oauth-button";
|
import { OAuthButton } from "./oauth-button";
|
||||||
|
|
||||||
export type TOAuthOption = {
|
export type TOAuthOption = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { Fragment } from "react";
|
||||||
// components
|
// components
|
||||||
import { Popover } from "./popover";
|
import { Popover } from "./popover";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// types
|
// types
|
||||||
import { TPopoverMenu } from "./types";
|
import { TPopoverMenu } from "./types";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { Fragment, Ref, useState } from "react";
|
||||||
import { usePopper } from "react-popper";
|
import { usePopper } from "react-popper";
|
||||||
import { Popover as HeadlessReactPopover, Transition } from "@headlessui/react";
|
import { Popover as HeadlessReactPopover, Transition } from "@headlessui/react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// types
|
// types
|
||||||
import { TPopover } from "./types";
|
import { TPopover } from "./types";
|
||||||
import { EllipsisVertical } from "lucide-react";
|
import { EllipsisVertical } from "lucide-react";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Tooltip } from "../tooltip";
|
import { Tooltip } from "../tooltip";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
data: any;
|
data: any;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { ERowVariant, rowStyle, TRowVariant } from "./helper";
|
import { ERowVariant, rowStyle, TRowVariant } from "./helper";
|
||||||
|
|
||||||
export interface RowProps extends React.HTMLAttributes<HTMLDivElement> {
|
export interface RowProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
import * as RadixScrollArea from "@radix-ui/react-scroll-area";
|
import * as RadixScrollArea from "@radix-ui/react-scroll-area";
|
||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
import { cn } from "../helpers";
|
import { cn } from "./utils";
|
||||||
|
|
||||||
type TScrollAreaProps = {
|
type TScrollAreaProps = {
|
||||||
type?: "auto" | "always" | "scroll" | "hover";
|
type?: "auto" | "always" | "scroll" | "hover";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useRef, useState } from "react";
|
||||||
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
||||||
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
||||||
import { isEqual } from "lodash";
|
import { isEqual } from "lodash";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
||||||
import { DropIndicator } from "../drop-indicator";
|
import { DropIndicator } from "../drop-indicator";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export interface ISpinner extends React.SVGAttributes<SVGElement> {
|
export interface ISpinner extends React.SVGAttributes<SVGElement> {
|
||||||
height?: string;
|
height?: string;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// types
|
// types
|
||||||
import { TTableData } from "./types";
|
import { TTableData } from "./types";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { Tab } from "@headlessui/react";
|
||||||
import { LucideProps } from "lucide-react";
|
import { LucideProps } from "lucide-react";
|
||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export type TabListItem = {
|
export type TabListItem = {
|
||||||
key: string;
|
key: string;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { Tab } from "@headlessui/react";
|
||||||
import React, { FC, Fragment, useEffect, useState } from "react";
|
import React, { FC, Fragment, useEffect, useState } from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { useLocalStorage } from "@plane/hooks";
|
import { useLocalStorage } from "@plane/hooks";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
// types
|
// types
|
||||||
import { TabList, TabListItem } from "./tab-list";
|
import { TabList, TabListItem } from "./tab-list";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
import { ETagSize, ETagVariant, getTagStyle, TTagSize, TTagVariant } from "./helper";
|
import { ETagSize, ETagVariant, getTagStyle, TTagSize, TTagVariant } from "./helper";
|
||||||
|
|
||||||
export interface TagProps extends React.ComponentProps<"div"> {
|
export interface TagProps extends React.ComponentProps<"div"> {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { AlertTriangle, CheckCircle2, X, XCircle } from "lucide-react";
|
||||||
// spinner
|
// spinner
|
||||||
import { CircularBarSpinner } from "../spinners";
|
import { CircularBarSpinner } from "../spinners";
|
||||||
// helper
|
// helper
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export enum TOAST_TYPE {
|
export enum TOAST_TYPE {
|
||||||
SUCCESS = "success",
|
SUCCESS = "success",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Tooltip2 } from "@blueprintjs/popover2";
|
import { Tooltip2 } from "@blueprintjs/popover2";
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
export type TPosition =
|
export type TPosition =
|
||||||
| "top"
|
| "top"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../utils";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
|
export * from "./classname";
|
||||||
export * from "./icons";
|
export * from "./icons";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue