feat: Upgrade storybook to 9.1.6 (no-changelog) (#19550)

This commit is contained in:
Alex Grozav
2025-09-15 15:50:17 +01:00
committed by GitHub
parent 185fc41ca9
commit 7902ad6785
93 changed files with 748 additions and 2082 deletions

View File

@@ -1,17 +1,17 @@
import { setup } from '@storybook/vue3';
import { withThemeByDataAttribute } from '@storybook/addon-themes';
import './storybook.scss';
// import '../src/css/tailwind/index.css';
import { library } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { sharedTags } from '@n8n/storybook/main';
import { withThemeByDataAttribute } from '@storybook/addon-themes';
import { setup } from '@storybook/vue3';
import ElementPlus from 'element-plus';
// @ts-expect-error no types
import lang from 'element-plus/dist/locale/en.mjs';
import { N8nPlugin } from '../src/plugin';
import './storybook.scss';
// import '../src/css/tailwind/index.css';
setup((app) => {
library.add(fas);
@@ -19,7 +19,7 @@ setup((app) => {
locale: lang,
});
app.use(N8nPlugin);
app.use(N8nPlugin, {});
});
export const parameters = {
@@ -83,3 +83,5 @@ export const decorators = [
parentSelector: 'body',
}),
];
export const tags = sharedTags;

View File

@@ -1,9 +1,5 @@
@use './fonts.scss';
@use '../src/css/base.scss'; // @TODO CHECK IF NEEDED with (
// $font-path: 'element-ui/lib/theme-chalk/fonts'
//);
@use '../src/css/base.scss';
@use '../src/css/reset.scss';
@use '../src/css/index.scss';

View File

@@ -1,3 +1,5 @@
import storybook from 'eslint-plugin-storybook';
import { defineConfig } from 'eslint/config';
import { frontendConfig } from '@n8n/eslint-config/frontend';
@@ -49,4 +51,5 @@ export default defineConfig(
],
},
},
storybook.configs['flat/recommended'],
);

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import AssistantAvatar from './AssistantAvatar.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import AskAssistantButton from './AskAssistantButton.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import AskAssistantChat from './AskAssistantChat.vue';
import type { ChatUI } from '../../types/assistant';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import AssistantIcon from './AssistantIcon.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import AssistantLoadingMessage from './AssistantLoadingMessage.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import DemoComponent from './DemoComponent.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import AssistantText from './AssistantText.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import BetaTag from './BetaTag.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import BlinkingCursor from './BlinkingCursor.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import CodeDiff from './CodeDiff.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import InlineAskAssistantButton from './InlineAskAssistantButton.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nActionBox from './ActionBox.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nActionDropdown from './ActionDropdown.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nActionToggle from './ActionToggle.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nAlert from './Alert.vue';
import N8nIcon from '../N8nIcon';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nAvatar from './Avatar.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nBadge from './Badge.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nBlockUi from './BlockUi.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import type { IUser, UserAction } from '@n8n/design-system/types';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nButton from './Button.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nCallout from './Callout.vue';
import N8nLink from '../N8nLink';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nCard from './Card.vue';
import N8nButton from '../N8nButton/Button.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nCheckbox from './Checkbox.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nCircleLoader from './CircleLoader.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nColorPicker from './ColorPicker.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { rows, columns } from './__tests__/data';
import N8nDatatable from './Datatable.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nExternalLink from './ExternalLink.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nFormBox from './FormBox.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nFormInput from './FormInput.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nFormInputs from './FormInputs.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nHeading from './Heading.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nIcon from './Icon.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nIconButton from './IconButton.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nIconPicker from './IconPicker.vue';
import { type IconOrEmoji } from './types';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nInfoAccordion from './InfoAccordion.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nInfoTip from './InfoTip.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import InlineTextEdit from './InlineTextEdit.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nInput from './Input.vue';
import N8nIcon from '../N8nIcon';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nInputLabel from './InputLabel.vue';
import N8nInput from '../N8nInput';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nInputNumber from './InputNumber.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nKeyboardShorcut from './N8nKeyboardShortcut.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nLink from './Link.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nLoading from './Loading.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nMarkdown from './Markdown.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nMenu from './Menu.vue';
import N8nCallout from '../N8nCallout';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { ElMenu } from 'element-plus';
import N8nMenuItem from '.';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import NavigationDropdown from './NavigationDropdown.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nNodeCreatorNode from './NodeCreatorNode.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nNodeIcon from './NodeIcon.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nNotice from './Notice.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nPagination from './Pagination.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nPopover from './Popover.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { ref } from 'vue';
import N8nPopoverReka from './N8nPopoverReka.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nPulse from './Pulse.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nRadioButtons from './RadioButtons.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import type { ComponentInstance } from 'vue';
import N8nRecycleScroller from './RecycleScroller.vue';

View File

@@ -1,5 +1,5 @@
import { type ActionOptions, action } from '@storybook/addon-actions';
import { type StoryFn } from '@storybook/vue3';
import { type StoryFn } from '@storybook/vue3-vite';
import { type ActionOptions, action } from 'storybook/actions';
import { ref } from 'vue';
import N8nResizeWrapper from './ResizeWrapper.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nResizeableSticky from './ResizeableSticky.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nScrollArea from './N8nScrollArea.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nSelect from './Select.vue';
import N8nIcon from '../N8nIcon';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nSelectableList from './SelectableList.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nSpinner from './Spinner.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nSticky from './Sticky.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { ref } from 'vue';
import type { SuggestedActionsProps } from './SuggestedActions.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nTabs from './Tabs.vue';
import type { TabOptions } from '../../types/tabs';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nTag from './Tag.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nTags from './Tags.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nText from './Text.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nTooltip from './Tooltip.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nTree from './Tree.vue';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import N8nUserInfo from './UserInfo.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import N8nUserSelect from './UserSelect.vue';

View File

@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/naming-convention */
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import UserStack from './UserStack.vue';

View File

@@ -1,5 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import type { IUser } from '@n8n/design-system/types';

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import { ref } from 'vue';
import TableHeaderControlsButton from './TableHeaderControlsButton.vue';

View File

@@ -1,4 +1,4 @@
import { type StoryFn } from '@storybook/vue3';
import { type StoryFn } from '@storybook/vue3-vite';
import VariableTable from './VariableTable.vue';

View File

@@ -1,4 +1,4 @@
import { type StoryFn } from '@storybook/vue3';
import { type StoryFn } from '@storybook/vue3-vite';
import ColorCircles from './ColorCircles.vue';

View File

@@ -1,4 +1,4 @@
import { type StoryFn } from '@storybook/vue3';
import { type StoryFn } from '@storybook/vue3-vite';
import ColorCircles from './ColorCircles.vue';

View File

@@ -1,4 +1,4 @@
import { type StoryFn } from '@storybook/vue3';
import { type StoryFn } from '@storybook/vue3-vite';
import Sizes from './Sizes.vue';
import VariableTable from './VariableTable.vue';

View File

@@ -1,4 +1,4 @@
import { type StoryFn } from '@storybook/vue3';
import { type StoryFn } from '@storybook/vue3-vite';
import Sizes from './Sizes.vue';

View File

@@ -1,4 +1,4 @@
import { type StoryFn } from '@storybook/vue3';
import { type StoryFn } from '@storybook/vue3-vite';
export default {
title: 'Utilities/Float',

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
export default {
title: 'Utilities/Lists',

View File

@@ -1,4 +1,4 @@
import type { StoryFn } from '@storybook/vue3';
import type { StoryFn } from '@storybook/vue3-vite';
import SpacingPreview from '../components/SpacingPreview.vue';

View File

@@ -17,5 +17,5 @@
"@n8n/utils*": ["../../../@n8n/utils/src*"]
}
},
"include": ["src/**/*.ts", "src/**/*.vue"]
"include": ["src/**/*.ts", "src/**/*.vue", ".storybook/**/*.ts"]
}

View File

@@ -0,0 +1,21 @@
import type { StorybookConfig } from '@storybook/vue3-vite';
export const sharedConfig: StorybookConfig = {
stories: ['../src/**/*.stories.ts'],
addons: [
'storybook-dark-mode',
'@storybook/addon-themes',
'@storybook/addon-links',
'@chromatic-com/storybook',
],
staticDirs: ['../public'],
framework: {
name: '@storybook/vue3-vite',
options: {},
},
core: {
disableTelemetry: true,
},
};
export const sharedTags: string[] = ['autodocs'];

View File

@@ -0,0 +1,19 @@
{
"name": "@n8n/storybook",
"private": true,
"version": "0.0.1",
"devDependencies": {
"@chromatic-com/storybook": "^3.2.5",
"@storybook/addon-a11y": "^9.1.6",
"@storybook/addon-actions": "^9.0.8",
"@storybook/addon-docs": "^9.1.6",
"@storybook/addon-links": "^9.1.6",
"@storybook/addon-themes": "^9.1.6",
"@storybook/vue3": "^9.1.6",
"@storybook/vue3-vite": "^9.1.6",
"chromatic": "^11.27.0",
"eslint-plugin-storybook": "9.1.6",
"storybook": "^9.1.6",
"storybook-dark-mode": "^4.0.2"
}
}

View File

@@ -114,6 +114,7 @@
"@n8n/typescript-config": "workspace:*",
"@n8n/vitest-config": "workspace:*",
"@pinia/testing": "^0.1.6",
"@storybook/types": "^8.6.14",
"@testing-library/vue": "catalog:frontend",
"@types/dateformat": "^3.0.0",
"@types/file-saver": "^2.0.1",

View File

@@ -5,6 +5,7 @@ import type { VNode, ComponentPublicInstance } from 'vue';
import type { PartialDeep } from 'type-fest';
import type { ExternalHooks } from '@/types/externalHooks';
import type { FrontendSettings } from '@n8n/api-types';
import type { Plugin as PrettierPlugin } from 'prettier';
export {};
@@ -39,3 +40,9 @@ declare global {
findLast(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T;
}
}
declare module 'prettier/plugins/estree' {
const plugin: PrettierPlugin;
export = plugin;
export default plugin;
}