diff --git a/.prettierrc.js b/.prettierrc.js index bd891544e4..a24db20059 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -9,4 +9,5 @@ module.exports = { arrowParens: "always", importOrder: ["^@ee/(.*)$", "^@lib/(.*)$", "^@components/(.*)$", "^@(server|trpc)/(.*)$", "^[./]"], importOrderSeparation: true, + plugins: [require("prettier-plugin-tailwindcss")], }; diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d95fa075db..e0b5078f4f 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,7 +5,6 @@ "esbenp.prettier-vscode", // prettier plugin "dbaeumer.vscode-eslint", // eslint plugin "bradlc.vscode-tailwindcss", // hinting / autocompletion for tailwind - "heybourn.headwind", // automatically sort tailwind classes in predictable order, kinda like "prettier for tailwind", "ban.spellright", // Spell check for docs "stripe.vscode-stripe" // stripe VSCode extension ] diff --git a/@types/@wojtekmaj:react-daterange-picker.d.ts b/@types/@wojtekmaj:react-daterange-picker.d.ts new file mode 100644 index 0000000000..8383940892 --- /dev/null +++ b/@types/@wojtekmaj:react-daterange-picker.d.ts @@ -0,0 +1,15 @@ +declare module "@wojtekmaj/react-daterange-picker/dist/entry.nostyle" { + import { CalendarProps } from "react-calendar"; + export type DateRangePickerCalendarProps = Omit< + CalendarProps, + "calendarClassName" | "onChange" | "value" + > & { + calendarClassName?: string; + onChange: (value: [Date, Date]) => void; + value: [Date, Date]; + clearIcon: JSX.Element | null; + calendarIcon: JSX.Element | null; + rangeDivider: JSX.Element | null; + }; + export default function DateRangePicker(props: DateRangePickerCalendarProps): JSX.Element; +} diff --git a/components/AddToHomescreen.tsx b/components/AddToHomescreen.tsx index defdb65e07..edfeef4175 100644 --- a/components/AddToHomescreen.tsx +++ b/components/AddToHomescreen.tsx @@ -14,13 +14,13 @@ export default function AddToHomescreen() { } return !closeBanner ? (
-
-
+
+
-
- +
+ @@ -34,13 +34,13 @@ export default function AddToHomescreen() {

-
+
diff --git a/components/DestinationCalendarSelector.tsx b/components/DestinationCalendarSelector.tsx index ef9dd1f740..93c6321318 100644 --- a/components/DestinationCalendarSelector.tsx +++ b/components/DestinationCalendarSelector.tsx @@ -56,8 +56,8 @@ const DestinationCalendarSelector = ({
{/* There's no easy way to customize the displayed value for a Select, so we fake it. */} {!hidePlaceholder && ( -
-
@@ -67,7 +67,7 @@ const DestinationCalendarSelector = ({ placeholder={!hidePlaceholder ? `${t("select_destination_calendar")}:` : undefined} options={options} isSearchable={false} - className="flex-1 block w-full min-w-0 mt-1 mb-2 border-gray-300 rounded-none focus:ring-primary-500 focus:border-primary-500 rounded-r-md sm:text-sm" + className="mt-1 mb-2 block w-full min-w-0 flex-1 rounded-none rounded-r-md border-gray-300 focus:border-primary-500 focus:ring-primary-500 sm:text-sm" onChange={(option) => { setSelectedOption(option); if (!option) { diff --git a/components/Dialog.tsx b/components/Dialog.tsx index 38639bb9c0..5d77c465e2 100644 --- a/components/Dialog.tsx +++ b/components/Dialog.tsx @@ -6,7 +6,7 @@ export function Dialog(props: DialogProps) { const { children, ...other } = props; return ( - + {children} ); @@ -17,7 +17,7 @@ export const DialogContent = React.forwardRef ( {children} @@ -32,7 +32,7 @@ type DialogHeaderProps = { export function DialogHeader(props: DialogHeaderProps) { return (
- {props.subtitle &&
{props.subtitle}
} @@ -43,7 +43,7 @@ export function DialogHeader(props: DialogHeaderProps) { export function DialogFooter(props: { children: ReactNode }) { return (
-
{props.children}
+
{props.children}
); } diff --git a/components/EmptyScreen.tsx b/components/EmptyScreen.tsx index feadb03632..a1ea0e3eb7 100644 --- a/components/EmptyScreen.tsx +++ b/components/EmptyScreen.tsx @@ -13,12 +13,12 @@ export default function EmptyScreen({ }) { return ( <> -
-
- +
+
+
-

{headline}

+

{headline}

{description}

diff --git a/components/ImageUploader.tsx b/components/ImageUploader.tsx index 111d0f2a68..e77c147649 100644 --- a/components/ImageUploader.tsx +++ b/components/ImageUploader.tsx @@ -38,8 +38,8 @@ function CropContainer({ }; return ( -
-
+
+
-
-
+
{!result && ( -
+
{!imageSrc && ( -

+

{t("no_target", { target })}

)} - {imageSrc && {target}} + {imageSrc && {target}}
)} {result && } -
-
+
diff --git a/components/List.tsx b/components/List.tsx index 0d7ae7a0ab..f9eb647ac4 100644 --- a/components/List.tsx +++ b/components/List.tsx @@ -5,7 +5,7 @@ import classNames from "@lib/classNames"; export function List(props: JSX.IntrinsicElements["ul"]) { return ( -