Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 8766f26

Browse files
committed
Enhance search functionality and UI improvements
- Added styles for search highlights, including animations for current and other matches. - Refactored search handling in the FileReader component to improve performance and user experience. - Introduced a custom `useDebounce` hook for better search input handling. - Updated various components to utilize type imports for better clarity and consistency. - Improved accessibility and keyboard navigation in the PDFViewer and related components.
1 parent b649f43 commit 8766f26

33 files changed

Lines changed: 652 additions & 295 deletions

src/frontend/components/auth/AuthCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ReactNode } from "react";
1+
import type { ReactNode } from "react";
22
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../ui/card";
33
import { Separator } from "../ui/separator";
44
import { cn } from "@/lib/utils";

src/frontend/components/auth/AuthFormContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Button } from "@/components/ui/button";
22
import { FormContainer } from "@/components/form-fields/FormContainer";
3-
import { ReactNode } from "react";
4-
import { FieldValues, UseFormReturn } from "react-hook-form";
3+
import type { ReactNode } from "react";
4+
import type { FieldValues, UseFormReturn } from "react-hook-form";
55

66
interface AuthFormContainerProps<TFieldValues extends FieldValues> {
77
form: UseFormReturn<TFieldValues>;

src/frontend/components/auth/AuthPageLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ReactNode } from "react";
1+
import type { ReactNode } from "react";
22
import cloudsBackground from "../../assets/clouds3.jpg";
33

44
interface AuthPageLayoutProps {

src/frontend/components/form-fields/FormCheckbox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import React from "react";
1+
import type React from "react";
22
import { Checkbox } from "@/components/ui/checkbox";
33
import {
44
FormControl,
55
FormField,
66
FormItem,
77
FormMessage
88
} from "@/components/ui/form";
9-
import { UseFormReturn, FieldPath, FieldValues } from "react-hook-form";
9+
import type { UseFormReturn, FieldPath, FieldValues } from "react-hook-form";
1010
import { cn } from "@/lib/utils";
1111

1212
interface FormCheckboxProps<

src/frontend/components/form-fields/FormContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React, { ReactNode } from "react";
1+
import React, { type ReactNode } from "react";
22
import { Form } from "@/components/ui/form";
33
import UnsavedChangesModal from "@/components/modals/UnsavedChangesModal";
4-
import { FieldValues, UseFormReturn } from "react-hook-form";
4+
import type { FieldValues, UseFormReturn } from "react-hook-form";
55
import { useFormNavigation } from "@/lib/hooks/useFormNavigation";
66

77
interface FormContainerProps<TFieldValues extends FieldValues> {

src/frontend/components/form-fields/FormInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
FormLabel,
77
FormMessage
88
} from "@/components/ui/form";
9-
import { UseFormReturn, FieldPath, FieldValues } from "react-hook-form";
9+
import type { UseFormReturn, FieldPath, FieldValues } from "react-hook-form";
1010
import { cn } from "@/lib/utils";
1111

1212
interface FormInputProps<

src/frontend/components/form-fields/FormOTP.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import React, { useEffect, useRef, forwardRef, ForwardedRef, useState } from "react";
1+
import React, { useEffect, useRef, forwardRef, type ForwardedRef, useState } from "react";
22
import {
33
FormControl,
44
FormField,
55
FormItem,
66
FormLabel,
77
FormMessage
88
} from "@/components/ui/form";
9-
import { UseFormReturn } from "react-hook-form";
9+
import type { UseFormReturn } from "react-hook-form";
1010
import { cn } from "@/lib/utils";
1111
import {
1212
InputOTP,

src/frontend/components/form-fields/PasswordInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
FormLabel,
88
FormMessage
99
} from "@/components/ui/form";
10-
import { UseFormReturn, FieldPath, FieldValues } from "react-hook-form";
10+
import type { UseFormReturn, FieldPath, FieldValues } from "react-hook-form";
1111
import { Button } from "@/components/ui/button";
1212
import { EyeIcon, EyeOffIcon } from "lucide-react";
1313
import { cn } from "@/lib/utils";

src/frontend/components/layout/LeftSidebar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { useState, useEffect } from 'react';
1+
import type React from 'react';
2+
import { useState, useEffect } from 'react';
23
import {
34
HomeIcon,
45
BookmarkIcon,

src/frontend/components/layout/MainLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { ReactNode } from 'react';
1+
import type React from 'react';
2+
import type { ReactNode } from 'react';
23
import TopNavbar from './TopNavbar';
34
import LeftSidebar from './LeftSidebar';
45

0 commit comments

Comments
 (0)