feat(v1): bloquants release v1 — tests, stories, visual regression, gouvernance, publishing
6 chantiers v1 sur 7 livrés (DataTable refonte reportée car nécessite 2-3j en propre — TanStack Table + virtualisation + filter builder). v1-A — Tests (4 → 22 fichiers) : - Avatar, AvatarGroup, UserCard, MetricCard, ProfileHeader, Tooltip, Sheet, Drawer, Slider, ToggleGroup, Tabs, Pagination, Accordion, Switch, Badge, ConfirmDialog, Popover, Menu, Text, PricingCard, FeatureCard, Toast — chacun avec render + clavier + axe-core. v1-B — Storybook (7 → 23 fichiers) : - Avatar, UserCard, ProfileHeader, MetricCard, PricingCard, FeatureCard, Sheet (4 sides), HoverCard, Slider, ToggleGroup, Menu+ContextMenu, Toast (avec démo "Empiler 5"), Tabs, Pagination, Accordion, Badge. v1-D — Visual regression Playwright : - playwright.config.ts (light + dark, threshold strict 0.2) - e2e/visual.spec.ts (20 stories critiques) - Step CI + upload report en cas de fail v1-E — Site doc Starlight rempli : - 11 pages composants détaillées (Button, Input, Tooltip, Dialog, Toast, Avatar, ThemePicker, MetricCard, PricingCard, ToggleGroup, Slider) avec API, anatomie, do/don't, A11y. v1-F — Publishing Verdaccio : - verdaccio/config.yaml, docker-compose.verdaccio.yml, .npmrc - README setup local + déploiement prod + backups + sécurité v1-G — Gouvernance : - LICENSE, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md - CODEOWNERS, PR template, 3 issue templates (bug/feature/rfc) Bug fix bonus : tooltip dark mode (text-primary comme bg + text-inverse comme texte → blanc-sur-blanc invisible). Remplacé par neutral-900/0 en light + bg-raised/text-primary en dark. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import { Avatar, AvatarGroup } from "@managemate/react";
|
||||
|
||||
const meta = {
|
||||
title: "Data display/Avatar",
|
||||
component: Avatar,
|
||||
tags: ["autodocs"],
|
||||
} satisfies Meta<typeof Avatar>;
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Initials: Story = { args: { initials: "MD", alt: "Marie Dupont" } };
|
||||
export const Image: Story = { args: { src: "https://i.pravatar.cc/96?u=md", alt: "Marie" } };
|
||||
export const Sizes: Story = {
|
||||
render: () => (
|
||||
<div style={{ display: "flex", gap: 12, alignItems: "flex-end" }}>
|
||||
<Avatar initials="XS" alt="x" size="xs" />
|
||||
<Avatar initials="SM" alt="x" size="sm" />
|
||||
<Avatar initials="MD" alt="x" size="md" />
|
||||
<Avatar initials="LG" alt="x" size="lg" />
|
||||
<Avatar initials="XL" alt="x" size="xl" />
|
||||
<Avatar initials="2X" alt="x" size="2xl" />
|
||||
</div>
|
||||
),
|
||||
};
|
||||
export const Status: Story = {
|
||||
render: () => (
|
||||
<div style={{ display: "flex", gap: 16 }}>
|
||||
<Avatar initials="MD" alt="online" status="online" size="lg" />
|
||||
<Avatar initials="JM" alt="away" status="away" size="lg" />
|
||||
<Avatar initials="SB" alt="busy" status="busy" size="lg" />
|
||||
<Avatar initials="TL" alt="offline" status="offline" size="lg" />
|
||||
</div>
|
||||
),
|
||||
};
|
||||
export const Square: Story = { args: { initials: "MD", alt: "x", shape: "square", size: "lg" } };
|
||||
|
||||
export const Group: Story = {
|
||||
render: () => (
|
||||
<AvatarGroup
|
||||
avatars={[
|
||||
{ initials: "MD", alt: "Marie" },
|
||||
{ initials: "JM", alt: "Jean" },
|
||||
{ initials: "SB", alt: "Sophie" },
|
||||
{ initials: "TL", alt: "Thomas" },
|
||||
{ initials: "ER", alt: "Emma" },
|
||||
]}
|
||||
max={4}
|
||||
/>
|
||||
),
|
||||
};
|
||||
Reference in New Issue
Block a user