chore: format all files in monorepo (#3054)

* chore: format all files in the project

* fix: removing @types/react from dependencies

* fix: adding prettier and eslint config

* chore: format files

* fix: upgrading turbo version

* chore: ignoring warnings and adding todos

* fix: updated the type of bubble menu item in the document editor

* chore: format files

---------

Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
sriram veeraghanta 2023-12-10 15:48:10 +05:30 committed by GitHub
parent 5eba682128
commit 8d15b9e7de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
721 changed files with 3739 additions and 4660 deletions

View file

@ -21,7 +21,7 @@ export const DateSelect: React.FC<Props> = ({ value, onChange, label, minDate, m
<Popover className="relative flex items-center justify-center rounded-lg">
{({ close }) => (
<>
<Popover.Button className="flex items-center justify-center gap-1 w-full cursor-pointer rounded border-[0.5px] border-custom-border-300 text-custom-text-200 px-2 py-1 text-xs hover:bg-custom-background-80">
<Popover.Button className="flex w-full cursor-pointer items-center justify-center gap-1 rounded border-[0.5px] border-custom-border-300 px-2 py-1 text-xs text-custom-text-200 hover:bg-custom-background-80">
{value ? (
<>
<CalendarDays className="h-3 w-3 flex-shrink-0" />
@ -47,7 +47,7 @@ export const DateSelect: React.FC<Props> = ({ value, onChange, label, minDate, m
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1"
>
<Popover.Panel className="absolute top-10 -left-10 z-20 transform overflow-hidden">
<Popover.Panel className="absolute -left-10 top-10 z-20 transform overflow-hidden">
<DatePicker
selected={value ? new Date(value) : null}
onChange={(val) => {

View file

@ -55,8 +55,8 @@ export const CustomDatePicker: React.FC<Props> = ({
renderAs === "input"
? "block px-2 py-2 text-sm focus:outline-none"
: renderAs === "button"
? `px-2 py-1 text-xs shadow-sm ${disabled ? "" : "hover:bg-custom-background-80"} duration-300`
: ""
? `px-2 py-1 text-xs shadow-sm ${disabled ? "" : "hover:bg-custom-background-80"} duration-300`
: ""
} ${error ? "border-red-500 bg-red-100" : ""} ${disabled ? "cursor-not-allowed" : "cursor-pointer"} ${
noBorder ? "" : "border border-custom-border-200"
} w-full rounded-md caret-transparent outline-none ${className}`}

View file

@ -24,7 +24,7 @@ const EmptySpace: React.FC<EmptySpaceProps> = ({ title, description, children, I
<h2 className="text-lg font-medium text-custom-text-100">{title}</h2>
<div className="mt-1 text-sm text-custom-text-200">{description}</div>
<ul role="list" className="mt-6 divide-y divide-custom-border-200 border-t border-b border-custom-border-200">
<ul role="list" className="mt-6 divide-y divide-custom-border-200 border-b border-t border-custom-border-200">
{children}
</ul>
{link ? (

View file

@ -6,7 +6,7 @@ type Props = {
};
export const IntegrationAndImportExportBanner: React.FC<Props> = ({ bannerName, description }) => (
<div className="flex items-start gap-3 py-3.5 border-b border-custom-border-100">
<div className="flex items-start gap-3 border-b border-custom-border-100 py-3.5">
<h3 className="text-xl font-medium">{bannerName}</h3>
{description && (
<div className="flex items-center gap-3 rounded-[10px] border border-custom-primary/75 bg-custom-primary/5 p-4 text-sm text-custom-text-100">

View file

@ -17,7 +17,7 @@ export const IssueLabelsList: FC<IssueLabelsListProps> = (props) => {
{labels && (
<>
<Tooltip position="top" tooltipHeading="Labels" tooltipContent={labels.map((l) => l?.name).join(", ")}>
<div className="flex items-center gap-1 px-2 py-1 text-xs text-custom-text-200 rounded border-[0.5px] border-custom-border-300">
<div className="flex items-center gap-1 rounded border-[0.5px] border-custom-border-300 px-2 py-1 text-xs text-custom-text-200">
<span className="h-2 w-2 flex-shrink-0 rounded-full bg-custom-primary" />
{`${labels.length} Labels`}
</div>

View file

@ -44,11 +44,11 @@ const HeadingSecondary: CustomComponent = ({ children }) => (
const Paragraph: CustomComponent = ({ children }) => <p className="text-sm text-custom-text-200">{children}</p>;
const OrderedList: CustomComponent = ({ children }) => (
<ol className="ml-8 mb-4 list-decimal text-sm text-custom-text-200">{children}</ol>
<ol className="mb-4 ml-8 list-decimal text-sm text-custom-text-200">{children}</ol>
);
const UnorderedList: CustomComponent = ({ children }) => (
<ul className="ml-8 mb-4 list-disc text-sm text-custom-text-200">{children}</ul>
<ul className="mb-4 ml-8 list-disc text-sm text-custom-text-200">{children}</ul>
);
const Link: CustomComponent = ({ href, children }) => (

View file

@ -46,7 +46,7 @@ export const MultiLevelDropdown: React.FC<MultiLevelDropdownProps> = ({
<div>
<Menu.Button
onClick={() => setOpenChildFor(null)}
className={`group flex items-center justify-between gap-2 rounded-md border border-custom-border-200 px-3 py-1.5 text-xs shadow-sm duration-300 focus:outline-none hover:text-custom-text-100 hover:bg-custom-background-90 ${
className={`group flex items-center justify-between gap-2 rounded-md border border-custom-border-200 px-3 py-1.5 text-xs shadow-sm duration-300 hover:bg-custom-background-90 hover:text-custom-text-100 focus:outline-none ${
open ? "bg-custom-background-90 text-custom-text-100" : "text-custom-text-200"
}`}
>
@ -65,7 +65,7 @@ export const MultiLevelDropdown: React.FC<MultiLevelDropdownProps> = ({
>
<Menu.Items
static
className="absolute right-0 z-10 mt-1 w-36 origin-top-right select-none rounded-md bg-custom-background-90 border border-custom-border-300 text-xs shadow-lg focus:outline-none"
className="absolute right-0 z-10 mt-1 w-36 origin-top-right select-none rounded-md border border-custom-border-300 bg-custom-background-90 text-xs shadow-lg focus:outline-none"
>
{options.map((option) => (
<div className="relative p-1" key={option.id}>
@ -102,24 +102,24 @@ export const MultiLevelDropdown: React.FC<MultiLevelDropdownProps> = ({
</Menu.Item>
{option.hasChildren && option.id === openChildFor && (
<div
className={`absolute top-0 min-w-36 whitespace-nowrap origin-top-right select-none overflow-y-scroll rounded-md bg-custom-background-90 border border-custom-border-300 shadow-lg focus:outline-none ${
className={`min-w-36 absolute top-0 origin-top-right select-none overflow-y-scroll whitespace-nowrap rounded-md border border-custom-border-300 bg-custom-background-90 shadow-lg focus:outline-none ${
direction === "left" ? "right-full -translate-x-1" : "left-full translate-x-1"
} ${
height === "sm"
? "max-h-28"
: height === "md"
? "max-h-44"
: height === "rg"
? "max-h-56"
: height === "lg"
? "max-h-80"
: ""
? "max-h-44"
: height === "rg"
? "max-h-56"
: height === "lg"
? "max-h-80"
: ""
}`}
>
{option.children ? (
<div className="space-y-1 p-1">
{option.children.length === 0 ? (
<p className="text-custom-text-200 text-center px-1 py-1.5">No {option.label} found</p> //if no children found, show this message.
<p className="px-1 py-1.5 text-center text-custom-text-200">No {option.label} found</p> //if no children found, show this message.
) : (
option.children.map((child) => {
if (child.element) return child.element;
@ -143,7 +143,7 @@ export const MultiLevelDropdown: React.FC<MultiLevelDropdownProps> = ({
)}
</div>
) : (
<Loader className="p-1 space-y-2">
<Loader className="space-y-2 p-1">
<Loader.Item height="20px" />
<Loader.Item height="20px" />
<Loader.Item height="20px" />

View file

@ -121,8 +121,8 @@ export const MultiLevelSelect: React.FC<TMultipleSelectProps> = ({
<div
className={`absolute h-0 w-0 border-t-8 border-custom-border-200 ${
direction === "right"
? "top-0 left-0 -translate-x-2 border-r-8 border-b-8 border-b-transparent border-t-transparent border-l-transparent"
: "top-0 right-0 translate-x-2 border-l-8 border-b-8 border-b-transparent border-t-transparent border-r-transparent"
? "left-0 top-0 -translate-x-2 border-b-8 border-r-8 border-b-transparent border-l-transparent border-t-transparent"
: "right-0 top-0 translate-x-2 border-b-8 border-l-8 border-b-transparent border-r-transparent border-t-transparent"
}`}
/>
</div>

View file

@ -40,7 +40,7 @@ export const ProductUpdatesModal: React.FC<Props> = ({ isOpen, setIsOpen }) => {
</Transition.Child>
<div className="fixed inset-0 z-20 h-full w-full">
<div className="grid place-items-center h-full w-full p-4">
<div className="grid h-full w-full place-items-center p-4">
<Transition.Child
as={React.Fragment}
enter="ease-out duration-300"
@ -50,8 +50,8 @@ export const ProductUpdatesModal: React.FC<Props> = ({ isOpen, setIsOpen }) => {
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
>
<Dialog.Panel className="relative overflow-hidden rounded-lg bg-custom-background-100 border border-custom-border-100 shadow-custom-shadow-rg] min-w-[100%] sm:min-w-[50%] sm:max-w-[50%]">
<div className="flex flex-col p-4 max-h-[90vh] w-full">
<Dialog.Panel className="shadow-custom-shadow-rg] relative min-w-[100%] overflow-hidden rounded-lg border border-custom-border-100 bg-custom-background-100 sm:min-w-[50%] sm:max-w-[50%]">
<div className="flex max-h-[90vh] w-full flex-col p-4">
<Dialog.Title as="h3" className="flex items-center justify-between text-lg font-semibold">
<span>Product Updates</span>
<span>
@ -61,7 +61,7 @@ export const ProductUpdatesModal: React.FC<Props> = ({ isOpen, setIsOpen }) => {
</span>
</Dialog.Title>
{updates && updates.length > 0 ? (
<div className="h-full overflow-y-auto mt-4 space-y-4">
<div className="mt-4 h-full space-y-4 overflow-y-auto">
{updates.map((item, index) => (
<React.Fragment key={item.id}>
<div className="flex items-center gap-3 text-xs text-custom-text-200">
@ -80,8 +80,8 @@ export const ProductUpdatesModal: React.FC<Props> = ({ isOpen, setIsOpen }) => {
))}
</div>
) : (
<div className="grid place-items-center w-full mt-4">
<Loader className="space-y-6 w-full">
<div className="mt-4 grid w-full place-items-center">
<Loader className="w-full space-y-6">
<div className="space-y-3">
<Loader.Item height="30px" />
<Loader.Item height="20px" width="80%" />

View file

@ -9,12 +9,12 @@ type Props = {
};
export const ProfileEmptyState: React.FC<Props> = ({ title, description, image }) => (
<div className={`h-full w-full mx-auto grid place-items-center p-8 `}>
<div className="text-center flex flex-col items-center w-full">
<div className="flex items-center justify-center h-14 w-14 rounded-full bg-custom-background-90">
<div className={`mx-auto grid h-full w-full place-items-center p-8 `}>
<div className="flex w-full flex-col items-center text-center">
<div className="flex h-14 w-14 items-center justify-center rounded-full bg-custom-background-90">
<Image src={image} width={32} alt={title} />
</div>
<h6 className="text-base font-semibold mt-3.5 mb-3">{title}</h6>
<h6 className="mb-3 mt-3.5 text-base font-semibold">{title}</h6>
{description && <p className="text-sm text-custom-text-300">{description}</p>}
</div>
</div>

View file

@ -44,10 +44,10 @@ export const CustomRangeDatePicker: React.FC<Props> = ({
renderAs === "input"
? "block px-3 py-2 text-sm focus:outline-none"
: renderAs === "button"
? `px-3 py-1 text-xs shadow-sm ${
disabled ? "" : "hover:bg-custom-background-80"
} duration-300 focus:border-custom-primary focus:outline-none focus:ring-1 focus:ring-custom-primary`
: ""
? `px-3 py-1 text-xs shadow-sm ${
disabled ? "" : "hover:bg-custom-background-80"
} duration-300 focus:border-custom-primary focus:outline-none focus:ring-1 focus:ring-custom-primary`
: ""
} ${error ? "border-red-500 bg-red-100" : ""} ${
disabled ? "cursor-not-allowed" : "cursor-pointer"
} w-full rounded-md border border-custom-border-200 bg-transparent caret-transparent ${className}`}