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,7 +1,6 @@
import {storyStates} from "@/lib/models/Story";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faBookOpen, faKeyboard, faMagicWandSparkles, faPalette, faPenNib} from "@fortawesome/free-solid-svg-icons";
import {Dispatch, SetStateAction} from "react";
import {storyStates} from "@/lib/constants/story";
import {BookOpen, Keyboard, LucideIcon, Palette, PenLine, Wand2} from "lucide-react";
import React, {Dispatch, SetStateAction} from "react";
export interface RadioBoxValue {
label: string;
@@ -14,6 +13,8 @@ interface RadioBoxProps {
name: string;
}
const storyStateIcons: LucideIcon[] = [PenLine, Keyboard, Palette, BookOpen, Wand2];
export default function RadioBox(
{
selected,
@@ -22,41 +23,36 @@ export default function RadioBox(
}: RadioBoxProps) {
return (
<div className="flex flex-wrap gap-2">
{storyStates.map((option: RadioBoxValue) => (
<div key={option.value} className="flex items-center">
<input
type="radio"
id={option.label}
name={name}
value={option.value}
checked={selected === option.value}
onChange={() => setSelected(option.value)}
className="hidden"
/>
<label
htmlFor={option.label}
className={`px-3 lg:px-4 py-2 lg:py-2.5 text-xs lg:text-sm font-medium rounded-xl cursor-pointer transition-all duration-200 flex items-center gap-2 ${
selected === option.value
? 'bg-primary text-text-primary shadow-lg shadow-primary/30 scale-105 border border-primary-dark'
: 'bg-secondary/50 text-muted hover:bg-secondary hover:text-text-primary hover:scale-105 border border-secondary/50 hover:border-secondary'
}`}
>
<FontAwesomeIcon
icon={
[
faPenNib,
faKeyboard,
faPalette,
faBookOpen,
faMagicWandSparkles
][option.value]
}
className={selected === option.value ? "text-text-primary w-5 h-5" : "text-muted w-5 h-5"}
{storyStates.map((option: RadioBoxValue) => {
const Icon = storyStateIcons[option.value];
return (
<div key={option.value} className="flex items-center">
<input
type="radio"
id={option.label}
name={name}
value={option.value}
checked={selected === option.value}
onChange={() => setSelected(option.value)}
className="hidden"
/>
{option.label}
</label>
</div>
))}
<label
htmlFor={option.label}
className={`px-3 lg:px-4 py-2 lg:py-2.5 text-xs lg:text-sm font-medium rounded-xl cursor-pointer transition-colors duration-150 flex items-center gap-2 ${
selected === option.value
? 'bg-secondary text-primary border border-primary'
: 'bg-secondary text-text-secondary hover:text-text-primary border border-secondary'
}`}
>
<Icon
className={selected === option.value ? "text-text-primary w-5 h-5" : "text-muted w-5 h-5"}
strokeWidth={1.75}
/>
{option.label}
</label>
</div>
);
})}
</div>
)
}