Files
twenty/packages/twenty-ui/.storybook/vitest.setup.ts
T
Raphaël Bosi d596c26f46 Migrate twenty UI (#21407)
## Migrate all `twenty-ui-deprecated` components into `twenty-ui`

Ports all **192 components** and **70 stories** into the new `twenty-ui`
package with full public-API parity (export diff: 0 missing / 0 extra
across all 13 modules; story titles byte-identical for the Argos
cross-package diff).

- **Styling:** Linaria → SCSS Modules, `var(--t-*)` tokens, `data-*`
state. Canonical pattern in `Button.module.scss`.
- **Behavior:** Base UI where mapped (Checkbox, Radio, Modal→Dialog,
Tooltip drops `react-tooltip`, JSON tree→Collapsible); framer kept only
where animation is the public contract.
- **Fixed an inert axe gate** in `.storybook/vitest.setup.ts` (a11y
addon annotations were never registered). Now live; 119 stories carry
`a11y: 'todo'` overrides pending a fix pass.
2026-06-11 11:02:28 +02:00

16 lines
840 B
TypeScript

import * as a11yAddonAnnotations from '@storybook/addon-a11y/preview';
import { setProjectAnnotations } from '@storybook/react-vite';
import { MotionGlobalConfig } from 'framer-motion';
import * as projectAnnotations from './preview';
// Freeze framer-motion so Argos screenshots are deterministic. Playwright's
// `animations: "disabled"` only halts CSS animations/transitions, not
// framer-motion's main-thread (rAF) animations, so loaders/spinners were
// captured mid-frame and flagged as visual changes on every run.
MotionGlobalConfig.skipAnimations = true;
// Apply Storybook's preview configuration to Vitest runs.
// The a11y addon annotations register the axe afterEach hook so that
// parameters.a11y.test = 'error' (set in preview.tsx) actually gates tests.
setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]);