'use client';
import { useState } from 'react';
import {
Button,
Card,
Badge,
StatusBadge,
Input,
Select,
Textarea,
Switch,
TagInput,
StatCard,
Loading,
BlockEditor,
} from '@zen/core/shared/components';
import { UserCircle02Icon } from '@zen/core/shared/icons';
import AdminHeader from '../components/AdminHeader.js';
const ROLE_OPTIONS = [
{ value: 'admin', label: 'Admin', color: '#6366f1' },
{ value: 'editor', label: 'Éditeur', color: '#f59e0b' },
{ value: 'viewer', label: 'Lecteur', color: '#10b981' },
{ value: 'support', label: 'Support', color: '#3b82f6' },
{ value: 'billing', label: 'Facturation', color: '#ec4899' },
];
function TagInputDemo({ label, description, error, renderTag }) {
const [value, setValue] = useState([]);
return (
);
}
function PreviewBlock({ title, children }) {
return (
);
}
export default function ComponentsPage() {
return (
);
}
function BlockEditorDemo() {
const [blocks, setBlocks] = useState([
{ id: 'demo-1', type: 'heading_1', content: [{ type: 'text', text: 'Bienvenue dans BlockEditor' }] },
{ id: 'demo-2', type: 'paragraph', content: [
{ type: 'text', text: "Tapez " },
{ type: 'text', text: "'/'", marks: [{ type: 'code' }] },
{ type: 'text', text: ' pour ouvrir le menu, ou ' },
{ type: 'text', text: 'sélectionnez', marks: [{ type: 'bold' }] },
{ type: 'text', text: ' pour ' },
{ type: 'text', text: 'mettre en forme', marks: [{ type: 'italic' }, { type: 'color', color: 'blue' }] },
{ type: 'text', text: '.' },
] },
{ id: 'demo-3', type: 'checklist', checked: true, content: [{ type: 'text', text: 'Format inline (gras, italique, couleur, lien)' }] },
{ id: 'demo-4', type: 'checklist', checked: false, content: [{ type: 'text', text: 'Bloc image (URL uniquement en Phase 2)' }] },
{ id: 'demo-5', type: 'bullet_item', content: [{ type: 'text', text: 'Glissez la poignée ⋮⋮ pour réordonner' }] },
{ id: 'demo-6', type: 'paragraph', content: [] },
]);
return (
Aperçu JSON
{JSON.stringify(blocks, null, 2)}
);
}