"use client"; import { useState } from "react"; import Tooltip from "../components/Tooltip"; import Alert from "../components/Alert"; import Button from "../components/Button"; import Stepper from "../components/Stepper"; import Progress from "../components/Progress"; import Create from "../components/Create"; import Input from "../components/Input"; import InputWithCounter from "../components/InputWithCounter"; import IconCard from "../components/IconCard"; import { getAssetPath } from "../../lib/assetUtils"; export default function ComponentsPreview() { const [alertVisible, setAlertVisible] = useState({ default: true, positive: true, warning: true, danger: true, banner: true, }); const [createOpen, setCreateOpen] = useState(false); const [createStep, setCreateStep] = useState(1); const [policyName, setPolicyName] = useState(""); return (

Component Preview

Temporary page for viewing and testing new components

{/* Tooltip Section */}

Tooltip Component

{/* Alert Section */}

Alert Component

{/* Toast Alerts */}

Toast Alerts

{alertVisible.default && ( setAlertVisible({ ...alertVisible, default: false }) } /> )} {alertVisible.positive && ( setAlertVisible({ ...alertVisible, positive: false }) } /> )} {alertVisible.warning && ( setAlertVisible({ ...alertVisible, warning: false }) } /> )} {alertVisible.danger && ( setAlertVisible({ ...alertVisible, danger: false }) } /> )}
{/* Banner Alerts */}

Banner Alerts

{alertVisible.banner && ( setAlertVisible({ ...alertVisible, banner: false }) } /> )}
{/* Stepper Section */}

Stepper Component

Step 1 of 5

Step 2 of 5

Step 3 of 5

Step 4 of 5

Step 5 of 5

{/* Progress Section */}

Progress Component

Progress: 1-0

Progress: 1-1

Progress: 1-2

Progress: 1-3

Progress: 1-4

Progress: 1-5

Progress: 2-0

Progress: 2-1

Progress: 2-2

Progress: 3-0

Progress: 3-1

Progress: 3-2

{/* Create Component Section */}

Create Component

Step {createStep} of 3

setCreateOpen(false)} title={ createStep === 1 ? "What do you call your group's new policy?" : createStep === 2 ? "How should conflicts be resolved?" : "Review your policy" } description="You can also combine or add new approaches to the list" showBackButton={true} showNextButton={true} onBack={() => setCreateStep((prev) => Math.max(1, prev - 1))} onNext={() => setCreateStep((prev) => Math.min(3, prev + 1))} backButtonText="Back" nextButtonText={createStep === 3 ? "Finish" : "Next"} nextButtonDisabled={createStep === 1 && !policyName.trim()} currentStep={createStep} totalSteps={3} >
{createStep === 1 && ( )} {createStep === 2 && (

Select how conflicts should be resolved in your group.

)} {createStep === 3 && (

Review your policy configuration before finalizing.

Policy details will appear here

)}
{/* IconCard Component Section */}

IconCard Component

} title="Worker's cooperatives" description="Employee-owned businesses often need to clarify how power is shared, decisions are made, and how processes operate within their organizations." onClick={() => console.log("IconCard clicked")} />
); }