Remove unused components and models for improved maintainability

- Deleted redundant components (`AddActionButton`, `AlertBox`, `AlertStack`, `BackButton`, `CancelButton`, and `CollapsableArea`) and related files.
- Removed unused models (`Book`, `BookSerie`, `BookTables`, `Character`, and `Chapter`) to reduce codebase clutter.
- Updated project structure and references to reflect these removals.
This commit is contained in:
natreex
2026-03-22 22:37:31 -04:00
parent e8aaef108b
commit 64ed90d993
229 changed files with 15091 additions and 21289 deletions

View File

@@ -1,11 +1,13 @@
import {SelectBoxProps} from "@/shared/interface";
import {ChangeEvent, Dispatch, SetStateAction} from "react";
import {SelectBoxProps} from "@/components/form/SelectBox";
import React, {ChangeEvent, Dispatch, SetStateAction} from "react";
import {LucideIcon} from "lucide-react";
import InputField from "@/components/form/InputField";
import TextInput from "@/components/form/TextInput";
import Badge from "@/components/ui/Badge";
interface SuggestFieldInputProps {
inputFieldName: string;
inputFieldIcon?: any;
inputFieldIcon?: LucideIcon;
searchTags: string;
tagued: string[];
handleTagSearch: (e: ChangeEvent<HTMLInputElement>) => void;
@@ -32,7 +34,7 @@ export default function SuggestFieldInput(
getTagLabel
}: SuggestFieldInputProps) {
return (
<div className="bg-secondary/20 rounded-xl p-5 shadow-inner border border-secondary/30">
<div>
<InputField fieldName={inputFieldName} icon={inputFieldIcon} input={
<div className="w-full mb-3 relative">
<TextInput value={searchTags} setValue={handleTagSearch}
@@ -40,11 +42,11 @@ export default function SuggestFieldInput(
placeholder="Rechercher et ajouter..."/>
{showTagSuggestions && filteredTags().length > 0 && (
<div
className="absolute top-full left-0 right-0 z-10 mt-2 bg-tertiary border border-secondary/50 rounded-xl shadow-2xl max-h-48 overflow-y-auto backdrop-blur-sm">
className="absolute top-full left-0 right-0 z-10 mt-2 bg-tertiary rounded-xl max-h-48 overflow-y-auto">
{filteredTags().map((character: SelectBoxProps) => (
<button
key={character.value}
className="w-full text-left px-4 py-2.5 hover:bg-secondary/70 text-text-primary transition-all hover:pl-5 first:rounded-t-xl last:rounded-b-xl font-medium"
className="w-full text-left px-4 py-2.5 hover:bg-secondary text-text-primary transition-colors duration-150 first:rounded-t-xl last:rounded-b-xl font-medium"
onClick={() => handleAddTag(character.value)}
>
{character.label}
@@ -59,18 +61,15 @@ export default function SuggestFieldInput(
<p className="text-text-secondary text-sm italic">Aucun élément ajouté</p>
) : (
tagued.map((tag: string) => (
<div
key={tag}
className="group bg-primary/90 text-white rounded-full px-4 py-1.5 text-sm font-medium flex items-center gap-2 shadow-md hover:shadow-lg hover:scale-105 transition-all border border-primary-dark"
>
<Badge key={tag} variant="primary" size="md" interactive>
<span>{getTagLabel(tag)}</span>
<button
onClick={() => handleRemoveTag(tag)}
className="w-5 h-5 flex items-center justify-center rounded-full hover:bg-white/20 transition-all group-hover:scale-110 text-base font-bold"
className="w-5 h-5 flex items-center justify-center rounded-full hover:bg-text-primary/20 transition-colors duration-150 text-base font-bold"
>
×
</button>
</div>
</Badge>
))
)}
</div>