<commit_before>import React from 'react';
import { configure, addDecorator, addParameters } from '@storybook/react';
import { withA11y } from '@storybook/addon-a11y';
import { ThemeProvider } from '@talend/design-system';
import { locales as tuiLocales } from '@talend/locales-tui/locales';
import IconsProvider from '@talend/react-components/lib/IconsProvider';

import '@talend/bootstrap-theme/src/theme/theme.scss';

const languages = {};
Object.keys(tuiLocales).forEach(key => (languages[key] = key));

function withIconsProvider(story) {
	return (
		<>
			<IconsProvider bundles={['https://unpkg.com/@talend/icons/dist/svg-bundle/all.svg']} />
			<React.Suspense fallback={null}>{story()}</React.Suspense>
		</>
	);
}

const withFormLayout = (story, options) => {
	if (options.kind === 'Layout') {
		return story();
	}
	return (
		<div className="container-fluid">
			<div
				className="col-md-offset-1 col-md-10"
				style={{ marginTop: '20px', marginBottom: '20px' }}
			>
				{story()}
			</div>
		</div>
	);
};

addParameters({ layout: 'fullscreen' });

addDecorator(withIconsProvider);
addDecorator(withA11y);
addDecorator(withFormLayout);
addDecorator(storyFn => <ThemeProvider>{storyFn()}</ThemeProvider>);
configure(
	[
		require.context('../src', true, /\.stories\.js$/),
		require.context('../stories-core', false, /index\.js$/),
	],
	module,
);
<commit_msg>chore(forms): storybook layout related stories (#3420)<commit_after>import React from 'react';
import { configure, addDecorator, addParameters } from '@storybook/react';
import { withA11y } from '@storybook/addon-a11y';
import { ThemeProvider } from '@talend/design-system';
import { locales as tuiLocales } from '@talend/locales-tui/locales';
import IconsProvider from '@talend/react-components/lib/IconsProvider';

import '@talend/bootstrap-theme/src/theme/theme.scss';

const languages = {};
Object.keys(tuiLocales).forEach(key => (languages[key] = key));

function withIconsProvider(story) {
	return (
		<>
			<IconsProvider bundles={['https://unpkg.com/@talend/icons/dist/svg-bundle/all.svg']} />
			<React.Suspense fallback={null}>{story()}</React.Suspense>
		</>
	);
}

const withFormLayout = (story, options) => {
	if (options.kind.includes('Layout')) {
		return story();
	}
	return (
		<div className="container-fluid">
			<div
				className="col-md-offset-1 col-md-10"
				style={{ marginTop: '20px', marginBottom: '20px' }}
			>
				{story()}
			</div>
		</div>
	);
};

addParameters({ layout: 'fullscreen' });

addDecorator(withIconsProvider);
addDecorator(withA11y);
addDecorator(withFormLayout);
addDecorator(storyFn => <ThemeProvider>{storyFn()}</ThemeProvider>);
configure(
	[
		require.context('../src', true, /\.stories\.js$/),
		require.context('../stories-core', false, /index\.js$/),
	],
	module,
);

{'fraction_non_alphanumeric': 0.18819320214669052, 'fraction_numerical': 0.01073345259391771, 'mean_word_length': 4.861635220125786, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 31, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1669274', 'n_tokens_mistral': 1058, 'n_tokens_neox': 977, 'n_words': 166}