Retitle all 49 stories into a sidebar that makes the DDD seam visible: Foundations (curriculum) -> Design System (Atoms/Molecules/Organisms/ Templates/Devtools, everything in shared/ui + shared/layout) -> Domein (Registratie/Herregistratie/Auth/Brief, everything in a context's ui/). Pin the order via storySort. Add layers.mdx explaining the split and linking the enforcing eslint rules; document the story-title convention in CLAUDE.md. Fix a stale "status banner" reference in atomic-design.mdx left over from WP-13's upload-status-banner deletion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
import type { Preview } from '@storybook/angular';
|
|
import { componentWrapperDecorator } from '@storybook/angular';
|
|
import { setCompodocJson } from '@storybook/addon-docs/angular';
|
|
import docJson from '../documentation.json';
|
|
setCompodocJson(docJson);
|
|
|
|
// Activate CIBG's official palette in the story iframe. The override is `body.brand--cibg`,
|
|
// so it must sit on <body> (a wrapper <div> won't match) — mirrors index.html.
|
|
if (typeof document !== 'undefined') document.body.classList.add('brand--cibg');
|
|
|
|
const preview: Preview = {
|
|
// CIBG/Bootstrap styles bare elements — no theme wrapper class needed; just pad.
|
|
// The token bridge lives in styles.scss (loaded via the app build target).
|
|
decorators: [componentWrapperDecorator((story) => `<div style="padding:1.5rem">${story}</div>`)],
|
|
parameters: {
|
|
layout: 'padded',
|
|
// Accessibility (axe) via @storybook/addon-a11y. Runs WCAG 2.0/2.1 A+AA rule
|
|
// sets on every story; flag violations in the a11y panel.
|
|
a11y: {
|
|
config: { runOnly: { type: 'tag', values: ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'] } },
|
|
},
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/i,
|
|
},
|
|
},
|
|
// Sidebar tells the DDD seam: reusable design system, then domain contexts.
|
|
// See src/docs/layers.mdx.
|
|
options: {
|
|
storySort: {
|
|
order: [
|
|
'Foundations',
|
|
'Design System',
|
|
['Atoms', 'Molecules', 'Organisms', 'Templates', 'Devtools'],
|
|
'Domein',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default preview;
|