diff --git a/apps/meteor/.storybook/decorators.tsx b/apps/meteor/.storybook/decorators.tsx
index 822f524e5b7ad..75d24df1195a4 100644
--- a/apps/meteor/.storybook/decorators.tsx
+++ b/apps/meteor/.storybook/decorators.tsx
@@ -8,33 +8,18 @@ import TranslationContextMock from '../client/stories/contexts/TranslationContex
const MockedAppRoot = mockAppRoot().build();
-export const rocketChatDecorator: Decorator = (fn, { parameters }) => {
- const linkElement = document.getElementById('theme-styles') || document.createElement('link');
- if (linkElement.id !== 'theme-styles') {
- require('../app/theme/client/main.css');
- require('../app/theme/client/rocketchat.font.css');
- linkElement.setAttribute('id', 'theme-styles');
- linkElement.setAttribute('rel', 'stylesheet');
- linkElement.setAttribute('href', 'https://open.rocket.chat/theme.css');
- document.head.appendChild(linkElement);
- }
-
- return (
-
-
-
-
-
-
- {fn()}
-
-
-
-
-
- );
-};
+export const RocketChatDecorator: Decorator = (Story, { parameters }) => (
+
+
+
+
+
+
+
+
+
+
+
+
+
+);
diff --git a/apps/meteor/.storybook/logo.svg b/apps/meteor/.storybook/logo.svg
deleted file mode 100644
index 6ae18fa4b93eb..0000000000000
--- a/apps/meteor/.storybook/logo.svg
+++ /dev/null
@@ -1,47 +0,0 @@
-
diff --git a/apps/meteor/.storybook/logo.svg.d.ts b/apps/meteor/.storybook/logo.svg.d.ts
deleted file mode 100644
index 623caebae2b66..0000000000000
--- a/apps/meteor/.storybook/logo.svg.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare const path: string;
-export = path;
diff --git a/apps/meteor/.storybook/main.ts b/apps/meteor/.storybook/main.ts
index f3e6bb831c797..fb363e6de40b7 100644
--- a/apps/meteor/.storybook/main.ts
+++ b/apps/meteor/.storybook/main.ts
@@ -1,26 +1,15 @@
import { dirname, join, resolve } from 'path';
-import type { StorybookConfig } from '@storybook/react-webpack5';
+import baseConfig from '@rocket.chat/storybook-config/main';
import webpack from 'webpack';
-export default {
- stories: ['../client/**/*.stories.{js,tsx}', '../app/**/*.stories.{js,tsx}', '../ee/app/**/*.stories.{js,tsx}'],
-
- addons: [
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
- getAbsolutePath('@storybook/addon-webpack5-compiler-swc'),
- getAbsolutePath('@storybook/addon-styling-webpack'),
- getAbsolutePath('@storybook/addon-a11y'),
- ],
-
- typescript: {
- reactDocgen: 'react-docgen',
- },
+export default baseConfig({
+ stories: ['../client/**/*.stories.{js,tsx}'],
webpackFinal: async (config) => {
// Those aliases are needed because dependencies in the monorepo use another
// dependencies that are not hoisted on this workspace
+ const swiperRoot = dirname(require.resolve('swiper/package.json'));
config.resolve = {
...config.resolve,
alias: {
@@ -29,8 +18,16 @@ export default {
// 'react/jsx-runtime': require.resolve('../../../node_modules/react/jsx-runtime'),
'@tanstack/react-query': require.resolve('../../../node_modules/@tanstack/react-query'),
'@rocket.chat/fuselage$': require.resolve('../../../node_modules/@rocket.chat/fuselage'),
+ // Meteor's bundler ignores the `exports` field, so source code reaches
+ // into swiper's internals via deep file paths. Webpack honors `exports`
+ // and rejects them, so map each subpath to the actual file.
+ 'swiper/swiper-react.mjs$': join(swiperRoot, 'swiper-react.mjs'),
+ 'swiper/swiper-react$': join(swiperRoot, 'swiper-react.d.ts'),
+ 'swiper/modules/index.mjs$': join(swiperRoot, 'modules/index.mjs'),
+ 'swiper/swiper.css$': join(swiperRoot, 'swiper.css'),
+ 'swiper/modules/zoom.css$': join(swiperRoot, 'modules/zoom.css'),
},
- // This is only needed because of Fontello
+ // This is only needed because of Rocket.Chat's icon font.
roots: [...(config.resolve?.roots ?? []), resolve(__dirname, '../../../apps/meteor/public')],
};
@@ -54,15 +51,4 @@ export default {
return config;
},
-
- framework: {
- name: getAbsolutePath('@storybook/react-webpack5'),
- options: {},
- },
-
- docs: {},
-} satisfies StorybookConfig;
-
-function getAbsolutePath(value: any): string {
- return dirname(require.resolve(join(value, 'package.json')));
-}
+});
diff --git a/apps/meteor/.storybook/preview.ts b/apps/meteor/.storybook/preview.ts
index 379c1f4a34647..fdcb2aba28ad6 100644
--- a/apps/meteor/.storybook/preview.ts
+++ b/apps/meteor/.storybook/preview.ts
@@ -1,22 +1,17 @@
-import type { Decorator, Parameters } from '@storybook/react';
+import { parameters, decorators } from '@rocket.chat/storybook-config/preview';
+import type { Preview } from '@storybook/react';
-import { rocketChatDecorator } from './decorators';
+import { RocketChatDecorator } from './decorators';
-export const decorators: Decorator[] = [rocketChatDecorator];
+import '../app/theme/client/main.css';
+import 'highlight.js/styles/github.css';
-export const parameters: Parameters = {
- backgrounds: {
- grid: {
- cellSize: 4,
- cellAmount: 4,
- opacity: 0.5,
- },
- },
- options: {
- storySort: {
- method: 'alphabetical',
- order: ['Components', '*', 'Enterprise'],
- },
+const preview: Preview = {
+ parameters: {
+ ...parameters,
},
+ decorators: [...decorators, RocketChatDecorator],
+ tags: ['autodocs'],
};
-export const tags = ['autodocs'];
+
+export default preview;
diff --git a/apps/meteor/app/api/server/lib/getServerInfo.ts b/apps/meteor/app/api/server/lib/getServerInfo.ts
index 4c65847c86ae6..adaf6ec6998c5 100644
--- a/apps/meteor/app/api/server/lib/getServerInfo.ts
+++ b/apps/meteor/app/api/server/lib/getServerInfo.ts
@@ -1,4 +1,5 @@
import type { IWorkspaceInfo } from '@rocket.chat/core-typings';
+import { License } from '@rocket.chat/license';
import { getTrimmedServerVersion } from './getTrimmedServerVersion';
import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission';
@@ -15,6 +16,8 @@ export async function getServerInfo(userId?: string): Promise {
const cloudWorkspaceId = settings.get('Cloud_Workspace_Id');
return {
+ workspaceUrl: License.getWorkspaceUrl(),
+ hashedWorkspaceUrl: License.getHashedWorkspaceUrl(),
version: getTrimmedServerVersion(),
...(hasPermissionToViewStatistics && {
info: {
diff --git a/apps/meteor/client/components/ABAC/ABACUpsellModal/ABACUpsellModal.stories.tsx b/apps/meteor/client/components/ABAC/ABACUpsellModal/ABACUpsellModal.stories.tsx
index f82c261020522..40bdad068de7d 100644
--- a/apps/meteor/client/components/ABAC/ABACUpsellModal/ABACUpsellModal.stories.tsx
+++ b/apps/meteor/client/components/ABAC/ABACUpsellModal/ABACUpsellModal.stories.tsx
@@ -1,6 +1,6 @@
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
+import { action } from 'storybook/actions';
import ABACUpsellModal from './ABACUpsellModal';
diff --git a/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.stories.tsx b/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.stories.tsx
index e36828a4a48d9..2a0643f8627ac 100644
--- a/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.stories.tsx
+++ b/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import CreateDiscussion from './CreateDiscussion';
@@ -13,4 +13,4 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
+export const Default: StoryObj = {};
diff --git a/apps/meteor/client/components/GenericUpsellModal/GenericUpsellModal.stories.tsx b/apps/meteor/client/components/GenericUpsellModal/GenericUpsellModal.stories.tsx
index 0d26ce190b3d6..9697a73bd3c5e 100644
--- a/apps/meteor/client/components/GenericUpsellModal/GenericUpsellModal.stories.tsx
+++ b/apps/meteor/client/components/GenericUpsellModal/GenericUpsellModal.stories.tsx
@@ -1,5 +1,5 @@
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
+import { action } from 'storybook/actions';
import GenericUpsellModal from '.';
diff --git a/apps/meteor/client/components/ListItem.stories.tsx b/apps/meteor/client/components/ListItem.stories.tsx
index bbeb1d830f3e0..bd9e412995a9d 100644
--- a/apps/meteor/client/components/ListItem.stories.tsx
+++ b/apps/meteor/client/components/ListItem.stories.tsx
@@ -1,5 +1,5 @@
import { Tile, OptionTitle, Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta, StoryFn } from '@storybook/react';
import ListItem from './Sidebar/ListItem';
@@ -27,6 +27,7 @@ export const ListWithIcon: StoryFn = () => {
);
};
+
export const NoIcon: StoryFn = () => {
return (
@@ -41,44 +42,51 @@ export const NoIcon: StoryFn = () => {
);
};
-export const MixedWithGap: StoryFn = () => {
- return (
-
-
- Title
-
-
-
-
-
-
- );
-};
-MixedWithGap.parameters = {
- docs: {
- description: {
- story:
- " When using `ListItem`, you can also use the `gap` prop to add spacing to the left. If the list is mixed with items **with and without** icons, it's recommended to add the gap.",
+export const MixedWithGap: StoryObj = {
+ render: () => {
+ return (
+
+
+ Title
+
+
+
+
+
+
+ );
+ },
+
+ parameters: {
+ docs: {
+ description: {
+ story:
+ " When using `ListItem`, you can also use the `gap` prop to add spacing to the left. If the list is mixed with items **with and without** icons, it's recommended to add the gap.",
+ },
},
},
};
-export const MixedWithoutGap: StoryFn = () => {
- return (
-
-
- Title
-
-
-
-
-
-
- );
-};
-MixedWithoutGap.parameters = {
- docs: {
- description: {
- story: 'Not recommended. Prefer adding the `gap` prop to the items without icons.',
+
+export const MixedWithoutGap: StoryObj = {
+ render: () => {
+ return (
+
+
+ Title
+
+
+
+
+
+
+ );
+ },
+
+ parameters: {
+ docs: {
+ description: {
+ story: 'Not recommended. Prefer adding the `gap` prop to the items without icons.',
+ },
},
},
};
diff --git a/apps/meteor/client/components/SidebarToggler/SidebarTogglerButton.stories.tsx b/apps/meteor/client/components/SidebarToggler/SidebarTogglerButton.stories.tsx
index e77e938896f2e..3690f763a0b22 100644
--- a/apps/meteor/client/components/SidebarToggler/SidebarTogglerButton.stories.tsx
+++ b/apps/meteor/client/components/SidebarToggler/SidebarTogglerButton.stories.tsx
@@ -1,5 +1,5 @@
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
+import { action } from 'storybook/actions';
import SidebarTogglerButton from './SidebarTogglerButton';
@@ -13,11 +13,10 @@ export default {
} satisfies Meta;
export const Example: StoryFn = () => ;
+export const Default = {};
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-export const WithBadge = Template.bind({});
-WithBadge.args = {
- badge: 99,
+export const WithBadge = {
+ args: {
+ badge: 99,
+ },
};
diff --git a/apps/meteor/client/components/UserAutoCompleteMultiple/UserAvatarChip.stories.tsx b/apps/meteor/client/components/UserAutoCompleteMultiple/UserAvatarChip.stories.tsx
index 381df8031b048..6b02c60dd4d63 100644
--- a/apps/meteor/client/components/UserAutoCompleteMultiple/UserAvatarChip.stories.tsx
+++ b/apps/meteor/client/components/UserAutoCompleteMultiple/UserAvatarChip.stories.tsx
@@ -1,5 +1,5 @@
-import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
+import { action } from 'storybook/actions';
import UserAvatarChip from './UserAvatarChip';
diff --git a/apps/meteor/client/components/UserCard/UserCard.stories.tsx b/apps/meteor/client/components/UserCard/UserCard.stories.tsx
index 2e2aaf60d4467..d69a9eb65e3bb 100644
--- a/apps/meteor/client/components/UserCard/UserCard.stories.tsx
+++ b/apps/meteor/client/components/UserCard/UserCard.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import { UserCard, UserCardRole, UserCardAction } from '.';
@@ -32,73 +32,79 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
+export const Example = {};
-export const Example = Template.bind({});
-
-export const Nickname = Template.bind({});
-Nickname.args = {
- user: {
- ...user,
- nickname: 'nicknamenickname',
- },
-} as any;
+export const Nickname = {
+ args: {
+ user: {
+ ...user,
+ nickname: 'nicknamenickname',
+ },
+ } as any,
+};
-export const LargeName = Template.bind({});
-LargeName.args = {
- user: {
- ...user,
- customStatus: '🛴 currently working on User Card on User Card on User Card on User Card on User Card ',
- name: 'guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.',
- },
-} as any;
+export const LargeName = {
+ args: {
+ user: {
+ ...user,
+ customStatus: '🛴 currently working on User Card on User Card on User Card on User Card on User Card ',
+ name: 'guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.guilherme.gazzo.',
+ },
+ } as any,
+};
-export const NoRoles = Template.bind({});
-NoRoles.args = {
- user: {
- ...user,
- roles: undefined,
- },
-} as any;
+export const NoRoles = {
+ args: {
+ user: {
+ ...user,
+ roles: undefined,
+ },
+ } as any,
+};
-export const NoActions = Template.bind({});
-NoActions.args = {
- actions: undefined,
-} as any;
+export const NoActions = {
+ args: {
+ actions: undefined,
+ } as any,
+};
-export const NoLocalTime = Template.bind({});
-NoLocalTime.args = {
- user: {
- ...user,
- localTime: undefined,
- },
-} as any;
+export const NoLocalTime = {
+ args: {
+ user: {
+ ...user,
+ localTime: undefined,
+ },
+ } as any,
+};
-export const NoBio = Template.bind({});
-NoBio.args = {
- user: {
- ...user,
- bio: undefined,
- },
-} as any;
+export const NoBio = {
+ args: {
+ user: {
+ ...user,
+ bio: undefined,
+ },
+ } as any,
+};
-export const NoBioAndNoLocalTime = Template.bind({});
-NoBioAndNoLocalTime.args = {
- user: {
- ...user,
- bio: undefined,
- localTime: undefined,
- },
-} as any;
+export const NoBioAndNoLocalTime = {
+ args: {
+ user: {
+ ...user,
+ bio: undefined,
+ localTime: undefined,
+ },
+ } as any,
+};
-export const NoBioNoLocalTimeNoRoles = Template.bind({});
-NoBioNoLocalTimeNoRoles.args = {
- user: {
- ...user,
- bio: undefined,
- localTime: undefined,
- roles: undefined,
- },
-} as any;
+export const NoBioNoLocalTimeNoRoles = {
+ args: {
+ user: {
+ ...user,
+ bio: undefined,
+ localTime: undefined,
+ roles: undefined,
+ },
+ } as any,
+};
export const Loading = () => ;
diff --git a/apps/meteor/client/components/UserInfo/UserInfo.stories.tsx b/apps/meteor/client/components/UserInfo/UserInfo.stories.tsx
index 65b94ed0d4445..81487409ddbb3 100644
--- a/apps/meteor/client/components/UserInfo/UserInfo.stories.tsx
+++ b/apps/meteor/client/components/UserInfo/UserInfo.stories.tsx
@@ -33,28 +33,39 @@ const defaultArgs = {
const Template: StoryFn = (args) => ;
-export const Default = Template.bind({});
+export const Default = {
+ render: Template,
+};
+
+export const WithVoiceCallExtension = {
+ render: Template,
-export const WithVoiceCallExtension = Template.bind({});
-WithVoiceCallExtension.args = {
- freeSwitchExtension: '1234567890',
+ args: {
+ freeSwitchExtension: '1234567890',
+ },
};
-export const WithABACAttributes = Template.bind({});
-WithABACAttributes.args = {
- abacAttributes: [
- {
- key: 'Classified',
- values: ['Top Secret', 'Confidential'],
- },
- {
- key: 'Security_Clearance',
- values: ['Top Secret', 'Confidential'],
- },
- ],
+export const WithABACAttributes = {
+ render: Template,
+
+ args: {
+ abacAttributes: [
+ {
+ key: 'Classified',
+ values: ['Top Secret', 'Confidential'],
+ },
+ {
+ key: 'Security_Clearance',
+ values: ['Top Secret', 'Confidential'],
+ },
+ ],
+ },
};
-export const InvitedUser = Template.bind({});
-InvitedUser.args = {
- invitationDate: '2025-01-01T12:00:00Z',
+export const InvitedUser = {
+ render: Template,
+
+ args: {
+ invitationDate: '2025-01-01T12:00:00Z',
+ },
};
diff --git a/apps/meteor/client/components/connectionStatus/ConnectionStatusBar.stories.tsx b/apps/meteor/client/components/connectionStatus/ConnectionStatusBar.stories.tsx
index 780f081e1837a..012c9a63c8a19 100644
--- a/apps/meteor/client/components/connectionStatus/ConnectionStatusBar.stories.tsx
+++ b/apps/meteor/client/components/connectionStatus/ConnectionStatusBar.stories.tsx
@@ -1,7 +1,7 @@
import { mockAppRoot } from '@rocket.chat/mock-providers';
import type { ServerContextValue } from '@rocket.chat/ui-contexts';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
+import { action } from 'storybook/actions';
import ConnectionStatusBar from './ConnectionStatusBar';
@@ -23,47 +23,62 @@ const stateDecorator = (value: Partial) =>
const Template: StoryFn = () => ;
-export const Connected = Template.bind({});
-Connected.decorators = [
- stateDecorator({
- connected: true,
- status: 'connected',
- retryTime: undefined,
- }),
-];
+export const Connected = {
+ render: Template,
-export const Connecting = Template.bind({});
-Connecting.decorators = [
- stateDecorator({
- connected: false,
- status: 'connecting',
- retryTime: undefined,
- }),
-];
+ decorators: [
+ stateDecorator({
+ connected: true,
+ status: 'connected',
+ retryTime: undefined,
+ }),
+ ],
+};
-export const Failed = Template.bind({});
-Failed.decorators = [
- stateDecorator({
- connected: false,
- status: 'failed',
- retryTime: undefined,
- }),
-];
+export const Connecting = {
+ render: Template,
-export const Waiting = Template.bind({});
-Waiting.decorators = [
- stateDecorator({
- connected: false,
- status: 'waiting',
- retryTime: Date.now() + 300000,
- }),
-];
+ decorators: [
+ stateDecorator({
+ connected: false,
+ status: 'connecting',
+ retryTime: undefined,
+ }),
+ ],
+};
-export const Offline = Template.bind({});
-Offline.decorators = [
- stateDecorator({
- connected: false,
- status: 'offline',
- retryTime: undefined,
- }),
-];
+export const Failed = {
+ render: Template,
+
+ decorators: [
+ stateDecorator({
+ connected: false,
+ status: 'failed',
+ retryTime: undefined,
+ }),
+ ],
+};
+
+export const Waiting = {
+ render: Template,
+
+ decorators: [
+ stateDecorator({
+ connected: false,
+ status: 'waiting',
+ retryTime: Date.now() + 300000,
+ }),
+ ],
+};
+
+export const Offline = {
+ render: Template,
+
+ decorators: [
+ stateDecorator({
+ connected: false,
+ status: 'offline',
+ retryTime: undefined,
+ }),
+ ],
+};
diff --git a/apps/meteor/client/components/dataView/Counter.stories.tsx b/apps/meteor/client/components/dataView/Counter.stories.tsx
index da2b0ee343d1c..b260cbf543498 100644
--- a/apps/meteor/client/components/dataView/Counter.stories.tsx
+++ b/apps/meteor/client/components/dataView/Counter.stories.tsx
@@ -12,27 +12,29 @@ export default {
export const Example: StoryFn = () => ;
-const Template: StoryFn = (args) => ;
-
-export const WithoutVariation = Template.bind({});
-WithoutVariation.args = {
- count: 123,
+export const WithoutVariation = {
+ args: {
+ count: 123,
+ },
};
-export const WithPositiveVariation = Template.bind({});
-WithPositiveVariation.args = {
- count: 123,
- variation: 4,
+export const WithPositiveVariation = {
+ args: {
+ count: 123,
+ variation: 4,
+ },
};
-export const WithNegativeVariation = Template.bind({});
-WithNegativeVariation.args = {
- count: 123,
- variation: -4,
+export const WithNegativeVariation = {
+ args: {
+ count: 123,
+ variation: -4,
+ },
};
-export const WithDescription = Template.bind({});
-WithDescription.args = {
- count: 123,
- description: 'Description',
+export const WithDescription = {
+ args: {
+ count: 123,
+ description: 'Description',
+ },
};
diff --git a/apps/meteor/client/components/dataView/CounterSet.stories.tsx b/apps/meteor/client/components/dataView/CounterSet.stories.tsx
index ecfbe9bf9a0da..0b17d6a2e2193 100644
--- a/apps/meteor/client/components/dataView/CounterSet.stories.tsx
+++ b/apps/meteor/client/components/dataView/CounterSet.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import CounterSet from './CounterSet';
@@ -10,12 +10,14 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'CounterSet';
-Default.args = {
- counters: [
- { count: 123, variation: 0 },
- { count: 456, variation: 7 },
- { count: 789, variation: -1, description: 'Description' },
- ],
+export const Default: StoryObj = {
+ name: 'CounterSet',
+
+ args: {
+ counters: [
+ { count: 123, variation: 0 },
+ { count: 456, variation: 7 },
+ { count: 789, variation: -1, description: 'Description' },
+ ],
+ },
};
diff --git a/apps/meteor/client/components/dataView/NegativeGrowthSymbol.stories.tsx b/apps/meteor/client/components/dataView/NegativeGrowthSymbol.stories.tsx
index d01bc58f613a8..b49e9cbf5b5e4 100644
--- a/apps/meteor/client/components/dataView/NegativeGrowthSymbol.stories.tsx
+++ b/apps/meteor/client/components/dataView/NegativeGrowthSymbol.stories.tsx
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import NegativeGrowthSymbol from './NegativeGrowthSymbol';
import { useAutoSequence } from '../../stories/hooks/useAutoSequence';
@@ -19,7 +19,6 @@ export default {
],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.storyName = 'NegativeGrowthSymbol';
+export const Default = {
+ name: 'NegativeGrowthSymbol',
+};
diff --git a/apps/meteor/client/components/dataView/PositiveGrowthSymbol.stories.tsx b/apps/meteor/client/components/dataView/PositiveGrowthSymbol.stories.tsx
index b775d7bb068b7..4f6aad0e48368 100644
--- a/apps/meteor/client/components/dataView/PositiveGrowthSymbol.stories.tsx
+++ b/apps/meteor/client/components/dataView/PositiveGrowthSymbol.stories.tsx
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import PositiveGrowthSymbol from './PositiveGrowthSymbol';
import { useAutoSequence } from '../../stories/hooks/useAutoSequence';
@@ -19,7 +19,6 @@ export default {
],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.storyName = 'PositiveGrowthSymbol';
+export const Default = {
+ name: 'PositiveGrowthSymbol',
+};
diff --git a/apps/meteor/client/components/message/content/actions/MessageAction.stories.tsx b/apps/meteor/client/components/message/content/actions/MessageAction.stories.tsx
index 2f15e0912b551..d6e042b62ec4a 100644
--- a/apps/meteor/client/components/message/content/actions/MessageAction.stories.tsx
+++ b/apps/meteor/client/components/message/content/actions/MessageAction.stories.tsx
@@ -1,5 +1,5 @@
-import { action } from '@storybook/addon-actions';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
+import { action } from 'storybook/actions';
import MessageAction from './MessageAction';
@@ -10,9 +10,10 @@ export default {
},
} satisfies Meta;
-export const Example: StoryFn = (args) => ;
-Example.args = {
- icon: 'quote' as const,
- i18nLabel: 'Quote' as const,
- methodId: 'method-id',
+export const Example: StoryObj = {
+ args: {
+ icon: 'quote' as const,
+ i18nLabel: 'Quote' as const,
+ methodId: 'method-id',
+ },
};
diff --git a/apps/meteor/client/components/message/header/MessageRoles.stories.tsx b/apps/meteor/client/components/message/header/MessageRoles.stories.tsx
index 5b876d752cdbf..7129c916b953b 100644
--- a/apps/meteor/client/components/message/header/MessageRoles.stories.tsx
+++ b/apps/meteor/client/components/message/header/MessageRoles.stories.tsx
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import MessageRoles from './MessageRoles';
@@ -8,13 +8,15 @@ export default {
decorators: [(fn) => {fn()}], // TODO: workaround for missing Fuselage default stylesheet
} satisfies Meta;
-export const AdministratorExample: StoryFn = (args) => ;
-AdministratorExample.args = {
- roles: ['admin', 'user'],
+export const AdministratorExample: StoryObj = {
+ args: {
+ roles: ['admin', 'user'],
+ },
};
-export const BotExample: StoryFn = (args) => ;
-BotExample.args = {
- roles: ['user'],
- isBot: true,
+export const BotExample: StoryObj = {
+ args: {
+ roles: ['user'],
+ isBot: true,
+ },
};
diff --git a/apps/meteor/client/components/message/toolbar/items/actions/Timestamp/TimestampPicker/TimestampPicker.stories.tsx b/apps/meteor/client/components/message/toolbar/items/actions/Timestamp/TimestampPicker/TimestampPicker.stories.tsx
index ed751617f86dd..43eae9aa4bbf7 100644
--- a/apps/meteor/client/components/message/toolbar/items/actions/Timestamp/TimestampPicker/TimestampPicker.stories.tsx
+++ b/apps/meteor/client/components/message/toolbar/items/actions/Timestamp/TimestampPicker/TimestampPicker.stories.tsx
@@ -1,6 +1,6 @@
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
+import { action } from 'storybook/actions';
import DatePicker from './DatePicker';
import FormatSelector from './FormatSelector';
diff --git a/apps/meteor/client/components/message/variants/threadPreview/ThreadMessagePreviewBody.stories.tsx b/apps/meteor/client/components/message/variants/threadPreview/ThreadMessagePreviewBody.stories.tsx
index 8912538441c5a..151ac8b5cec5f 100644
--- a/apps/meteor/client/components/message/variants/threadPreview/ThreadMessagePreviewBody.stories.tsx
+++ b/apps/meteor/client/components/message/variants/threadPreview/ThreadMessagePreviewBody.stories.tsx
@@ -1,5 +1,5 @@
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import type { ComponentProps } from 'react';
import ThreadMessagePreviewBody from './ThreadMessagePreviewBody';
@@ -25,4 +25,4 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn> = (args) => ;
+export const Default: StoryObj> = {};
diff --git a/apps/meteor/client/sidebar/Item/Condensed.stories.tsx b/apps/meteor/client/sidebar/Item/Condensed.stories.tsx
index 9735b95bc8da9..ed9f9c1349110 100644
--- a/apps/meteor/client/sidebar/Item/Condensed.stories.tsx
+++ b/apps/meteor/client/sidebar/Item/Condensed.stories.tsx
@@ -1,7 +1,7 @@
import { Box, IconButton } from '@rocket.chat/fuselage';
import { UserAvatar } from '@rocket.chat/ui-avatar';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
+import { action } from 'storybook/actions';
import Condensed from './Condensed';
import * as Status from '../../components/UserStatus';
@@ -33,39 +33,50 @@ const Template: StoryFn = (args) => (
/>
);
-export const Normal = Template.bind({});
+export const Normal = {
+ render: Template,
+};
+
+export const Selected = {
+ render: Template,
-export const Selected = Template.bind({});
-Selected.args = {
- selected: true,
+ args: {
+ selected: true,
+ },
};
-export const Menu = Template.bind({});
-Menu.args = {
- menuOptions: {
- hide: {
- label: { label: 'Hide', icon: 'eye-off' },
- action: action('action'),
- },
- read: {
- label: { label: 'Mark_read', icon: 'flag' },
- action: action('action'),
- },
- favorite: {
- label: { label: 'Favorite', icon: 'star' },
- action: action('action'),
+export const Menu = {
+ render: Template,
+
+ args: {
+ menuOptions: {
+ hide: {
+ label: { label: 'Hide', icon: 'eye-off' },
+ action: action('action'),
+ },
+ read: {
+ label: { label: 'Mark_read', icon: 'flag' },
+ action: action('action'),
+ },
+ favorite: {
+ label: { label: 'Favorite', icon: 'star' },
+ action: action('action'),
+ },
},
},
};
-export const Actions = Template.bind({});
-Actions.args = {
- actions: (
- <>
-
-
-
-
- >
- ),
+export const Actions = {
+ render: Template,
+
+ args: {
+ actions: (
+ <>
+
+
+
+
+ >
+ ),
+ },
};
diff --git a/apps/meteor/client/sidebar/Item/Extended.stories.tsx b/apps/meteor/client/sidebar/Item/Extended.stories.tsx
index 2f8e13679e941..cd9ef1ba1bef6 100644
--- a/apps/meteor/client/sidebar/Item/Extended.stories.tsx
+++ b/apps/meteor/client/sidebar/Item/Extended.stories.tsx
@@ -1,7 +1,7 @@
import { Box, IconButton, Badge } from '@rocket.chat/fuselage';
import { UserAvatar } from '@rocket.chat/ui-avatar';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
+import { action } from 'storybook/actions';
import Extended from './Extended';
import * as Status from '../../components/UserStatus';
@@ -48,39 +48,50 @@ const Template: StoryFn = (args) => (
/>
);
-export const Normal = Template.bind({});
+export const Normal = {
+ render: Template,
+};
+
+export const Selected = {
+ render: Template,
-export const Selected = Template.bind({});
-Selected.args = {
- selected: true,
+ args: {
+ selected: true,
+ },
};
-export const Menu = Template.bind({});
-Menu.args = {
- menuOptions: {
- hide: {
- label: { label: 'Hide', icon: 'eye-off' },
- action: action('action'),
- },
- read: {
- label: { label: 'Mark_read', icon: 'flag' },
- action: action('action'),
- },
- favorite: {
- label: { label: 'Favorite', icon: 'star' },
- action: action('action'),
+export const Menu = {
+ render: Template,
+
+ args: {
+ menuOptions: {
+ hide: {
+ label: { label: 'Hide', icon: 'eye-off' },
+ action: action('action'),
+ },
+ read: {
+ label: { label: 'Mark_read', icon: 'flag' },
+ action: action('action'),
+ },
+ favorite: {
+ label: { label: 'Favorite', icon: 'star' },
+ action: action('action'),
+ },
},
},
};
-export const Actions = Template.bind({});
-Actions.args = {
- actions: (
- <>
-
-
-
-
- >
- ),
+export const Actions = {
+ render: Template,
+
+ args: {
+ actions: (
+ <>
+
+
+
+
+ >
+ ),
+ },
};
diff --git a/apps/meteor/client/sidebar/Item/Medium.stories.tsx b/apps/meteor/client/sidebar/Item/Medium.stories.tsx
index ef99afbab404d..be5e6698400f5 100644
--- a/apps/meteor/client/sidebar/Item/Medium.stories.tsx
+++ b/apps/meteor/client/sidebar/Item/Medium.stories.tsx
@@ -1,7 +1,7 @@
import { Box, IconButton } from '@rocket.chat/fuselage';
import { UserAvatar } from '@rocket.chat/ui-avatar';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
+import { action } from 'storybook/actions';
import Medium from './Medium';
import * as Status from '../../components/UserStatus';
@@ -32,39 +32,50 @@ const Template: StoryFn = (args) => (
/>
);
-export const Normal = Template.bind({});
+export const Normal = {
+ render: Template,
+};
+
+export const Selected = {
+ render: Template,
-export const Selected = Template.bind({});
-Selected.args = {
- selected: true,
+ args: {
+ selected: true,
+ },
};
-export const Menu = Template.bind({});
-Menu.args = {
- menuOptions: {
- hide: {
- label: { label: 'Hide', icon: 'eye-off' },
- action: action('action'),
- },
- read: {
- label: { label: 'Mark_read', icon: 'flag' },
- action: action('action'),
- },
- favorite: {
- label: { label: 'Favorite', icon: 'star' },
- action: action('action'),
+export const Menu = {
+ render: Template,
+
+ args: {
+ menuOptions: {
+ hide: {
+ label: { label: 'Hide', icon: 'eye-off' },
+ action: action('action'),
+ },
+ read: {
+ label: { label: 'Mark_read', icon: 'flag' },
+ action: action('action'),
+ },
+ favorite: {
+ label: { label: 'Favorite', icon: 'star' },
+ action: action('action'),
+ },
},
},
};
-export const Actions = Template.bind({});
-Actions.args = {
- actions: (
- <>
-
-
-
-
- >
- ),
+export const Actions = {
+ render: Template,
+
+ args: {
+ actions: (
+ <>
+
+
+
+
+ >
+ ),
+ },
};
diff --git a/apps/meteor/client/sidebar/Sidebar.stories.tsx b/apps/meteor/client/sidebar/Sidebar.stories.tsx
index b68c179155e4a..8d404efab60b2 100644
--- a/apps/meteor/client/sidebar/Sidebar.stories.tsx
+++ b/apps/meteor/client/sidebar/Sidebar.stories.tsx
@@ -1,7 +1,7 @@
import type { ISetting } from '@rocket.chat/core-typings';
import type { SubscriptionWithRoom } from '@rocket.chat/ui-contexts';
import { UserContext, SettingsContext } from '@rocket.chat/ui-contexts';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import type { ObjectId } from 'mongodb';
import type { ContextType } from 'react';
@@ -100,11 +100,14 @@ const userContextValue: ContextType = {
onLogout: () => () => undefined,
};
-export const SidebarStory: StoryFn = () => ;
-SidebarStory.decorators = [
- (fn) => (
-
- {fn()}
-
- ),
-];
+export const SidebarStory: StoryObj = {
+ render: () => ,
+
+ decorators: [
+ (fn) => (
+
+ {fn()}
+
+ ),
+ ],
+};
diff --git a/apps/meteor/client/stories/contexts/ModalContextMock.tsx b/apps/meteor/client/stories/contexts/ModalContextMock.tsx
index af58a5c5738b6..0692152d27a72 100644
--- a/apps/meteor/client/stories/contexts/ModalContextMock.tsx
+++ b/apps/meteor/client/stories/contexts/ModalContextMock.tsx
@@ -1,7 +1,7 @@
import { ModalContext } from '@rocket.chat/ui-contexts';
-import { action } from '@storybook/addon-actions';
import type { ContextType, ReactNode } from 'react';
import { useContext, useMemo } from 'react';
+import { action } from 'storybook/actions';
const logAction = action('ModalContext');
diff --git a/apps/meteor/client/stories/contexts/RouterContextMock.tsx b/apps/meteor/client/stories/contexts/RouterContextMock.tsx
index fd986b392e51e..d52b2e28616f4 100644
--- a/apps/meteor/client/stories/contexts/RouterContextMock.tsx
+++ b/apps/meteor/client/stories/contexts/RouterContextMock.tsx
@@ -1,7 +1,7 @@
import { RouterContext } from '@rocket.chat/ui-contexts';
-import { action } from '@storybook/addon-actions';
import type { ContextType, ReactNode } from 'react';
import { useContext, useMemo } from 'react';
+import { action } from 'storybook/actions';
const logAction = action('RouterContext');
diff --git a/apps/meteor/client/stories/contexts/ServerContextMock.tsx b/apps/meteor/client/stories/contexts/ServerContextMock.tsx
index 9602a21abe9d5..80d378b26075e 100644
--- a/apps/meteor/client/stories/contexts/ServerContextMock.tsx
+++ b/apps/meteor/client/stories/contexts/ServerContextMock.tsx
@@ -3,9 +3,9 @@ import type { ServerMethodName, ServerMethodParameters, ServerMethodReturn } fro
import type { Method, OperationParams, OperationResult, PathFor, PathPattern } from '@rocket.chat/rest-typings';
import type { UploadResult } from '@rocket.chat/ui-contexts';
import { ServerContext } from '@rocket.chat/ui-contexts';
-import { action } from '@storybook/addon-actions';
import type { ContextType, ReactNode } from 'react';
import { useContext, useMemo } from 'react';
+import { action } from 'storybook/actions';
const logAction = action('ServerContext');
diff --git a/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesForm.stories.tsx b/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesForm.stories.tsx
index 2b34b06af71e2..9976e5f989612 100644
--- a/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesForm.stories.tsx
+++ b/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesForm.stories.tsx
@@ -1,6 +1,6 @@
import { Contextualbar } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta, StoryObj } from '@storybook/react';
import { FormProvider, useForm } from 'react-hook-form';
import AttributesForm, { type AttributesFormFormData } from './AttributesForm';
@@ -27,53 +27,51 @@ export default {
],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const NewAttribute = Template.bind({});
+export const NewAttribute: StoryObj = {
+ decorators: [
+ (fn) => {
+ const methods = useForm({
+ defaultValues: {
+ name: '',
+ attributeValues: [{ value: '' }],
+ lockedAttributes: [],
+ },
+ mode: 'onChange',
+ });
-NewAttribute.decorators = [
- (fn) => {
- const methods = useForm({
- defaultValues: {
- name: '',
- attributeValues: [{ value: '' }],
- lockedAttributes: [],
- },
- mode: 'onChange',
- });
+ return (
+
+
+ {fn()}
+
+
+ );
+ },
+ ],
+};
- return (
-
-
- {fn()}
-
-
- );
+export const WithLockedAttributes: StoryObj = {
+ args: {
+ description: 'Attribute values cannot be edited, but can be added or deleted.',
},
-];
-export const WithLockedAttributes = Template.bind({});
+ decorators: [
+ (fn) => {
+ const methods = useForm({
+ defaultValues: {
+ name: 'Room Type',
+ lockedAttributes: [{ value: 'Locked Value 1' }, { value: 'Locked Value 2' }, { value: 'Locked Value 3' }],
+ },
+ mode: 'onChange',
+ });
-WithLockedAttributes.args = {
- description: 'Attribute values cannot be edited, but can be added or deleted.',
+ return (
+
+
+ {fn()}
+
+
+ );
+ },
+ ],
};
-
-WithLockedAttributes.decorators = [
- (fn) => {
- const methods = useForm({
- defaultValues: {
- name: 'Room Type',
- lockedAttributes: [{ value: 'Locked Value 1' }, { value: 'Locked Value 2' }, { value: 'Locked Value 3' }],
- },
- mode: 'onChange',
- });
-
- return (
-
-
- {fn()}
-
-
- );
- },
-];
diff --git a/apps/meteor/client/views/admin/ABAC/ABACRoomsTab/RoomFormAttributeField.stories.tsx b/apps/meteor/client/views/admin/ABAC/ABACRoomsTab/RoomFormAttributeField.stories.tsx
index 00f42f3232059..8ee807633343e 100644
--- a/apps/meteor/client/views/admin/ABAC/ABACRoomsTab/RoomFormAttributeField.stories.tsx
+++ b/apps/meteor/client/views/admin/ABAC/ABACRoomsTab/RoomFormAttributeField.stories.tsx
@@ -1,8 +1,8 @@
import { Field } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { FormProvider, useForm } from 'react-hook-form';
+import { action } from 'storybook/actions';
import type { RoomFormData } from './RoomForm';
import RoomFormAttributeField from './RoomFormAttributeField';
diff --git a/apps/meteor/client/views/admin/ABAC/ABACRoomsTab/RoomFormAutocomplete.stories.tsx b/apps/meteor/client/views/admin/ABAC/ABACRoomsTab/RoomFormAutocomplete.stories.tsx
index 4345892d3cb34..84a81f2739b80 100644
--- a/apps/meteor/client/views/admin/ABAC/ABACRoomsTab/RoomFormAutocomplete.stories.tsx
+++ b/apps/meteor/client/views/admin/ABAC/ABACRoomsTab/RoomFormAutocomplete.stories.tsx
@@ -1,6 +1,6 @@
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
+import { action } from 'storybook/actions';
import RoomFormAutocomplete from './RoomFormAutocomplete';
import { createFakeRoom } from '../../../../../tests/mocks/data';
diff --git a/apps/meteor/client/views/admin/customSounds/CustomSoundsTable/CustomSoundsTable.stories.tsx b/apps/meteor/client/views/admin/customSounds/CustomSoundsTable/CustomSoundsTable.stories.tsx
index ff6f215ba7de3..b8a293643ccaa 100644
--- a/apps/meteor/client/views/admin/customSounds/CustomSoundsTable/CustomSoundsTable.stories.tsx
+++ b/apps/meteor/client/views/admin/customSounds/CustomSoundsTable/CustomSoundsTable.stories.tsx
@@ -1,8 +1,8 @@
import { Margins } from '@rocket.chat/fuselage';
import { PageContent } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
import { useRef } from 'react';
+import { action } from 'storybook/actions';
import CustomSoundsTable from './CustomSoundsTable';
@@ -22,7 +22,10 @@ const Template: StoryFn = (args) => {
return ;
};
-export const Default = Template.bind({});
-Default.args = {
- onClick: () => action('clicked'),
+export const Default = {
+ render: Template,
+
+ args: {
+ onClick: () => action('clicked'),
+ },
};
diff --git a/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx
index 729befbfbc867..f26287aeacc4f 100644
--- a/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx
+++ b/apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardPage.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import EngagementDashboardPage from './EngagementDashboardPage';
@@ -7,5 +7,7 @@ export default {
decorators: [(fn) => {fn()}
],
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'EngagementDashboardPage';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'EngagementDashboardPage',
+};
diff --git a/apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx
index 2456c122aecd2..de7539befddc4 100644
--- a/apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx
+++ b/apps/meteor/client/views/admin/engagementDashboard/channels/ChannelsTab.stories.tsx
@@ -1,5 +1,5 @@
import { Margins } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import ChannelsTab from './ChannelsOverview';
@@ -8,5 +8,7 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'ChannelsTab';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'ChannelsTab',
+};
diff --git a/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx
index 5b57acaef630d..1ea3cdb66cd58 100644
--- a/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx
+++ b/apps/meteor/client/views/admin/engagementDashboard/messages/MessagesTab.stories.tsx
@@ -1,5 +1,5 @@
import { Margins } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import MessagesTab from './MessagesTab';
@@ -8,5 +8,7 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'MessagesTab';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'MessagesTab',
+};
diff --git a/apps/meteor/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx b/apps/meteor/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx
index f21f8e7e6ec86..d1505d8832664 100644
--- a/apps/meteor/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx
+++ b/apps/meteor/client/views/admin/engagementDashboard/users/UsersTab.stories.tsx
@@ -1,5 +1,5 @@
import { Margins } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import UsersTab from './UsersTab';
@@ -8,5 +8,7 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'UsersTab';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'UsersTab',
+};
diff --git a/apps/meteor/client/views/admin/import/ImportHistoryPage.stories.tsx b/apps/meteor/client/views/admin/import/ImportHistoryPage.stories.tsx
index c93e95d506c75..b6939f0c5ec30 100644
--- a/apps/meteor/client/views/admin/import/ImportHistoryPage.stories.tsx
+++ b/apps/meteor/client/views/admin/import/ImportHistoryPage.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import ImportHistoryPage from './ImportHistoryPage';
@@ -10,5 +10,7 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'ImportHistoryPage';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'ImportHistoryPage',
+};
diff --git a/apps/meteor/client/views/admin/import/ImportOperationSummary.stories.tsx b/apps/meteor/client/views/admin/import/ImportOperationSummary.stories.tsx
index f7f349899e65a..4952533fcc671 100644
--- a/apps/meteor/client/views/admin/import/ImportOperationSummary.stories.tsx
+++ b/apps/meteor/client/views/admin/import/ImportOperationSummary.stories.tsx
@@ -1,5 +1,5 @@
import { Table, TableBody } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import type { ComponentType } from 'react';
import ImportOperationSummary from './ImportOperationSummary';
@@ -22,6 +22,8 @@ export default {
],
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
+export const Default: StoryObj = {};
-export const Skeleton: StoryFn = (args) => ;
+export const Skeleton: StoryObj = {
+ render: (args) => ,
+};
diff --git a/apps/meteor/client/views/admin/import/NewImportPage.stories.tsx b/apps/meteor/client/views/admin/import/NewImportPage.stories.tsx
index f14db90c1bf2a..86c4c9af42f85 100644
--- a/apps/meteor/client/views/admin/import/NewImportPage.stories.tsx
+++ b/apps/meteor/client/views/admin/import/NewImportPage.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import NewImportPage from './NewImportPage';
@@ -10,5 +10,7 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'NewImportPage';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'NewImportPage',
+};
diff --git a/apps/meteor/client/views/admin/mailer/Mailer.stories.tsx b/apps/meteor/client/views/admin/mailer/Mailer.stories.tsx
index 8c1c487c36abf..7b581f8b003dd 100644
--- a/apps/meteor/client/views/admin/mailer/Mailer.stories.tsx
+++ b/apps/meteor/client/views/admin/mailer/Mailer.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import MailerPage from './MailerPage';
@@ -9,5 +9,7 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'Mailer';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'Mailer',
+};
diff --git a/apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTable.stories.tsx b/apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTable.stories.tsx
index 6edd0faaed95d..921b58fb0762a 100644
--- a/apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTable.stories.tsx
+++ b/apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTable.stories.tsx
@@ -1,7 +1,7 @@
import type { IPermission, IRole } from '@rocket.chat/core-typings';
import { Margins } from '@rocket.chat/fuselage';
import { PageContent } from '@rocket.chat/ui-client';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import PermissionsTable from './PermissionsTable';
import { createMockedPagination } from '../../../../../tests/mocks/data';
@@ -109,22 +109,22 @@ const permissions: IPermission[] = [
const paginationData = createMockedPagination(permissions.length, 10);
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- total: 10,
- permissions,
- roleList: roles,
- setFilter: () => undefined,
- paginationData,
+export const Default = {
+ args: {
+ total: 10,
+ permissions,
+ roleList: roles,
+ setFilter: () => undefined,
+ paginationData,
+ },
};
-export const Empty = Template.bind({});
-Empty.args = {
- total: 0,
- permissions: [],
- roleList: [],
- setFilter: () => undefined,
- paginationData,
+export const Empty = {
+ args: {
+ total: 0,
+ permissions: [],
+ roleList: [],
+ setFilter: () => undefined,
+ paginationData,
+ },
};
diff --git a/apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/UsersInRoleTable.stories.tsx b/apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/UsersInRoleTable.stories.tsx
index afb666649cba9..4ae4639b93d70 100644
--- a/apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/UsersInRoleTable.stories.tsx
+++ b/apps/meteor/client/views/admin/permissions/UsersInRole/UsersInRoleTable/UsersInRoleTable.stories.tsx
@@ -1,6 +1,6 @@
import { Margins } from '@rocket.chat/fuselage';
import { PageContent } from '@rocket.chat/ui-client';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import UsersInRoleTable from './UsersInRoleTable';
import { createMockedPagination } from '../../../../../../tests/mocks/data';
@@ -33,52 +33,54 @@ const mockedUsers = generateMockedUsers(5);
const paginationData = createMockedPagination(mockedUsers.length, 30);
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- total: 30,
- isLoading: false,
- isError: false,
- isSuccess: true,
- users: mockedUsers,
- onRemove: () => undefined,
- refetch: () => undefined,
- paginationData,
+export const Default = {
+ args: {
+ total: 30,
+ isLoading: false,
+ isError: false,
+ isSuccess: true,
+ users: mockedUsers,
+ onRemove: () => undefined,
+ refetch: () => undefined,
+ paginationData,
+ },
};
-export const withLoading = Template.bind({});
-withLoading.args = {
- total: 0,
- isLoading: true,
- isError: false,
- isSuccess: false,
- users: [],
- onRemove: () => undefined,
- refetch: () => undefined,
- paginationData,
+export const withLoading = {
+ args: {
+ total: 0,
+ isLoading: true,
+ isError: false,
+ isSuccess: false,
+ users: [],
+ onRemove: () => undefined,
+ refetch: () => undefined,
+ paginationData,
+ },
};
-export const withNoResults = Template.bind({});
-withNoResults.args = {
- total: 0,
- isLoading: false,
- isError: false,
- isSuccess: true,
- users: [],
- onRemove: () => undefined,
- refetch: () => undefined,
- paginationData,
+export const withNoResults = {
+ args: {
+ total: 0,
+ isLoading: false,
+ isError: false,
+ isSuccess: true,
+ users: [],
+ onRemove: () => undefined,
+ refetch: () => undefined,
+ paginationData,
+ },
};
-export const withError = Template.bind({});
-withError.args = {
- total: 0,
- isLoading: false,
- isError: true,
- isSuccess: false,
- users: [],
- onRemove: () => undefined,
- refetch: () => undefined,
- paginationData,
+export const withError = {
+ args: {
+ total: 0,
+ isLoading: false,
+ isError: true,
+ isSuccess: false,
+ users: [],
+ onRemove: () => undefined,
+ refetch: () => undefined,
+ paginationData,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/ResetSettingButton/ResetSettingButton.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/ResetSettingButton/ResetSettingButton.stories.tsx
index bb887e539ec52..cb8fcd1aa0e6b 100644
--- a/apps/meteor/client/views/admin/settings/Setting/ResetSettingButton/ResetSettingButton.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/ResetSettingButton/ResetSettingButton.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import ResetSettingButton from './ResetSettingButton';
@@ -9,5 +9,6 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'ResetSettingButton';
+export const Default: StoryObj = {
+ name: 'ResetSettingButton',
+};
diff --git a/apps/meteor/client/views/admin/settings/Setting/Setting.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/Setting.stories.tsx
index ce888d591b252..38d15003bd633 100644
--- a/apps/meteor/client/views/admin/settings/Setting/Setting.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/Setting.stories.tsx
@@ -1,5 +1,5 @@
import { FieldGroup } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import MemoizedSetting from './MemoizedSetting';
import Setting from './Setting';
@@ -15,21 +15,27 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.args = {
- _id: 'setting-id',
- label: 'Label',
- hint: 'Hint',
- type: 'string',
+export const Default: StoryObj = {
+ render: (args) => ,
+
+ args: {
+ _id: 'setting-id',
+ label: 'Label',
+ hint: 'Hint',
+ type: 'string',
+ },
};
-export const WithCallout: StoryFn = (args) => ;
-WithCallout.args = {
- _id: 'setting-id',
- label: 'Label',
- hint: 'Hint',
- callout: 'Callout text',
- type: 'string',
+export const WithCallout: StoryObj = {
+ render: (args) => ,
+
+ args: {
+ _id: 'setting-id',
+ label: 'Label',
+ hint: 'Hint',
+ callout: 'Callout text',
+ type: 'string',
+ },
};
export const types = () => (
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/ActionSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/ActionSettingInput.stories.tsx
index 54669af7fa5e7..fd19644a608a5 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/ActionSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/ActionSettingInput.stories.tsx
@@ -1,7 +1,7 @@
import type { ServerMethods } from '@rocket.chat/ddp-client';
import { Field } from '@rocket.chat/fuselage';
import type { TranslationKey } from '@rocket.chat/ui-contexts';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import ActionSettingInput from './ActionSettingInput';
@@ -10,27 +10,28 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- actionText: 'Action text' as TranslationKey,
- value: 'methodName' as keyof ServerMethods,
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ actionText: 'Action text' as TranslationKey,
+ value: 'methodName' as keyof ServerMethods,
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- actionText: 'Action text' as TranslationKey,
- value: 'methodName' as keyof ServerMethods,
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ actionText: 'Action text' as TranslationKey,
+ value: 'methodName' as keyof ServerMethods,
+ disabled: true,
+ },
};
-export const WithinChangedSection = Template.bind({});
-WithinChangedSection.args = {
- _id: 'setting_id',
- actionText: 'Action text' as TranslationKey,
- value: 'methodName' as keyof ServerMethods,
- sectionChanged: true,
+export const WithinChangedSection = {
+ args: {
+ _id: 'setting_id',
+ actionText: 'Action text' as TranslationKey,
+ value: 'methodName' as keyof ServerMethods,
+ sectionChanged: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.stories.tsx
index ee839b5c6fa0e..cacf469788675 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import AssetSettingInput from './AssetSettingInput';
@@ -16,24 +16,25 @@ export default {
],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- value: { url: 'https://rocket.chat/images/logo.svg' },
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: { url: 'https://rocket.chat/images/logo.svg' },
+ },
};
-export const WithFileConstraints = Template.bind({});
-WithFileConstraints.args = {
- _id: 'setting_id',
- label: 'Label',
- fileConstraints: { extensions: ['png', 'jpg', 'gif'] },
+export const WithFileConstraints = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ fileConstraints: { extensions: ['png', 'jpg', 'gif'] },
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/BooleanSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/BooleanSettingInput.stories.tsx
index d9e0ab80609b7..ffa84bd0ea966 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/BooleanSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/BooleanSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import BooleanSettingInput from './BooleanSettingInput';
@@ -13,31 +13,33 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ disabled: true,
+ },
};
-export const Checked = Template.bind({});
-Checked.args = {
- _id: 'setting_id',
- label: 'Label',
- value: true,
+export const Checked = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: true,
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/CodeSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/CodeSettingInput.stories.tsx
index 1a7dfb614a29e..9e88a2863efc5 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/CodeSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/CodeSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import CodeSettingInput from './CodeSettingInput';
@@ -19,47 +19,50 @@ export default {
],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- code: 'javascript',
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ code: 'javascript',
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- code: 'javascript',
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ code: 'javascript',
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- value: 'console.log("Hello World!");',
- placeholder: 'Placeholder',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: 'console.log("Hello World!");',
+ placeholder: 'Placeholder',
+ },
};
-export const WithDescription = Template.bind({});
-WithDescription.args = {
- _id: 'setting_id',
- label: 'Label',
- hint: 'Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
- value: 'console.log("Hello World!");',
- placeholder: 'Placeholder',
+export const WithDescription = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ hint: 'Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
+ value: 'console.log("Hello World!");',
+ placeholder: 'Placeholder',
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- value: 'console.log("Hello World!");',
- placeholder: 'Placeholder',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: 'console.log("Hello World!");',
+ placeholder: 'Placeholder',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/ColorSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/ColorSettingInput.stories.tsx
index 945ab1b6c0b8a..806e84cf32162 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/ColorSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/ColorSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import ColorSettingInput from './ColorSettingInput';
@@ -13,53 +13,56 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- editor: 'color',
- allowedTypes: ['color', 'expression'],
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ editor: 'color',
+ allowedTypes: ['color', 'expression'],
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- editor: 'color',
- allowedTypes: ['color', 'expression'],
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ editor: 'color',
+ allowedTypes: ['color', 'expression'],
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- editor: 'color',
- allowedTypes: ['color', 'expression'],
- value: '#db2323',
- placeholder: 'Placeholder',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ editor: 'color',
+ allowedTypes: ['color', 'expression'],
+ value: '#db2323',
+ placeholder: 'Placeholder',
+ },
};
-export const WithExpressionAsValue = Template.bind({});
-WithExpressionAsValue.args = {
- _id: 'setting_id',
- label: 'Label',
- editor: 'expression',
- allowedTypes: ['color', 'expression'],
- value: 'var(--rc-color-primary)',
- placeholder: 'Placeholder',
+export const WithExpressionAsValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ editor: 'expression',
+ allowedTypes: ['color', 'expression'],
+ value: 'var(--rc-color-primary)',
+ placeholder: 'Placeholder',
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- editor: 'color',
- allowedTypes: ['color', 'expression'],
- placeholder: 'Placeholder',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ editor: 'color',
+ allowedTypes: ['color', 'expression'],
+ placeholder: 'Placeholder',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/FontSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/FontSettingInput.stories.tsx
index 573cae7209878..a777fed2bcc6b 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/FontSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/FontSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import FontSettingInput from './FontSettingInput';
@@ -13,35 +13,37 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- value: 'Roboto',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ value: 'Roboto',
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/GenericSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/GenericSettingInput.stories.tsx
index be84ec59199ff..2153f6a232775 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/GenericSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/GenericSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import GenericSettingInput from './GenericSettingInput';
@@ -13,35 +13,37 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- value: 'Value',
- placeholder: 'Placeholder',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: 'Value',
+ placeholder: 'Placeholder',
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/IntSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/IntSettingInput.stories.tsx
index ea25cb68683ae..d07e427955b27 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/IntSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/IntSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import IntSettingInput from './IntSettingInput';
@@ -13,35 +13,37 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- value: '12345',
- placeholder: 'Placeholder',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: '12345',
+ placeholder: 'Placeholder',
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/LanguageSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/LanguageSettingInput.stories.tsx
index 0a8f890656388..0f15963b2f808 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/LanguageSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/LanguageSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import LanguageSettingInput from './LanguageSettingInput';
@@ -13,36 +13,38 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- value: 'en',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ value: 'en',
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- value: '1',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ value: '1',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/MultiSelectSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/MultiSelectSettingInput.stories.tsx
index 208c04484bc8a..291a30ac5eb8c 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/MultiSelectSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/MultiSelectSettingInput.stories.tsx
@@ -1,6 +1,6 @@
import { Field } from '@rocket.chat/fuselage';
import type { TranslationKey } from '@rocket.chat/ui-contexts';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import type { valuesOption } from './MultiSelectSettingInput';
import MultiSelectSettingInput from './MultiSelectSettingInput';
@@ -15,44 +15,46 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
const options: valuesOption[] = [
{ key: '1', i18nLabel: '1' as TranslationKey },
{ key: '2', i18nLabel: '2' as TranslationKey },
{ key: '3', i18nLabel: '3' as TranslationKey },
];
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- values: options,
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ values: options,
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- values: options,
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ values: options,
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- value: ['1', 'Lorem Ipsum'],
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ value: ['1', 'Lorem Ipsum'],
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- values: options,
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ values: options,
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/PasswordSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/PasswordSettingInput.stories.tsx
index 4d0328acf6eaa..7ffd0fcc78c39 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/PasswordSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/PasswordSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import PasswordSettingInput from './PasswordSettingInput';
@@ -13,35 +13,30 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- value: '5w0rdf15h',
- placeholder: 'Placeholder',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ hasResetButton: true,
+ },
};
-export const WithResetButton = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- hasResetButton: true,
-};
+export const WithResetButton = {};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/RangeSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/RangeSettingInput.stories.tsx
index 8346b19a8ca3b..2e14b9ebf03e2 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/RangeSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/RangeSettingInput.stories.tsx
@@ -17,26 +17,40 @@ const Template: StoryFn = (args) => (
);
-export const Default = Template.bind({});
+export const Default = {
+ render: Template,
+};
+
+export const Disabled = {
+ render: Template,
-export const Disabled = Template.bind({});
-Disabled.args = {
- disabled: true,
+ args: {
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- value: 50,
+export const WithValue = {
+ render: Template,
+
+ args: {
+ value: 50,
+ },
};
-export const WithHint = Template.bind({});
-WithHint.args = {
- value: 50,
- hint: 'This is a hint for the slider',
+export const WithHint = {
+ render: Template,
+
+ args: {
+ value: 50,
+ hint: 'This is a hint for the slider',
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- value: 50,
- hasResetButton: true,
+export const WithResetButton = {
+ render: Template,
+
+ args: {
+ value: 50,
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/RelativeUrlSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/RelativeUrlSettingInput.stories.tsx
index 23fd7ff5b9a10..e841048d948a1 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/RelativeUrlSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/RelativeUrlSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import RelativeUrlSettingInput from './RelativeUrlSettingInput';
@@ -13,35 +13,37 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- value: 'Value',
- placeholder: 'Placeholder',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: 'Value',
+ placeholder: 'Placeholder',
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/SelectSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/SelectSettingInput.stories.tsx
index a2a2de20b6554..8e4d00ddf496f 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/SelectSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/SelectSettingInput.stories.tsx
@@ -1,6 +1,6 @@
import { Field } from '@rocket.chat/fuselage';
import type { TranslationKey } from '@rocket.chat/ui-contexts';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import SelectSettingInput from './SelectSettingInput';
@@ -14,55 +14,57 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- values: [
- { key: '1', i18nLabel: '1' as TranslationKey },
- { key: '2', i18nLabel: '2' as TranslationKey },
- { key: '3', i18nLabel: '3' as TranslationKey },
- ],
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ values: [
+ { key: '1', i18nLabel: '1' as TranslationKey },
+ { key: '2', i18nLabel: '2' as TranslationKey },
+ { key: '3', i18nLabel: '3' as TranslationKey },
+ ],
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- values: [
- { key: '1', i18nLabel: '1' as TranslationKey },
- { key: '2', i18nLabel: '2' as TranslationKey },
- { key: '3', i18nLabel: '3' as TranslationKey },
- ],
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ values: [
+ { key: '1', i18nLabel: '1' as TranslationKey },
+ { key: '2', i18nLabel: '2' as TranslationKey },
+ { key: '3', i18nLabel: '3' as TranslationKey },
+ ],
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- value: '2',
- values: [
- { key: '1', i18nLabel: '1' as TranslationKey },
- { key: '2', i18nLabel: '2' as TranslationKey },
- { key: '3', i18nLabel: '3' as TranslationKey },
- ],
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ value: '2',
+ values: [
+ { key: '1', i18nLabel: '1' as TranslationKey },
+ { key: '2', i18nLabel: '2' as TranslationKey },
+ { key: '3', i18nLabel: '3' as TranslationKey },
+ ],
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- values: [
- { key: '1', i18nLabel: '1' as TranslationKey },
- { key: '2', i18nLabel: '2' as TranslationKey },
- { key: '3', i18nLabel: '3' as TranslationKey },
- ],
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ values: [
+ { key: '1', i18nLabel: '1' as TranslationKey },
+ { key: '2', i18nLabel: '2' as TranslationKey },
+ { key: '3', i18nLabel: '3' as TranslationKey },
+ ],
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/StringSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/StringSettingInput.stories.tsx
index c9975a19f8539..44ce7c65d6162 100644
--- a/apps/meteor/client/views/admin/settings/Setting/inputs/StringSettingInput.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/Setting/inputs/StringSettingInput.stories.tsx
@@ -1,5 +1,5 @@
import { Field } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import StringSettingInput from './StringSettingInput';
@@ -13,44 +13,47 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
+export const Default = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ },
};
-export const Disabled = Template.bind({});
-Disabled.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- disabled: true,
+export const Disabled = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ disabled: true,
+ },
};
-export const WithValue = Template.bind({});
-WithValue.args = {
- _id: 'setting_id',
- label: 'Label',
- value: 'Value',
- placeholder: 'Placeholder',
+export const WithValue = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: 'Value',
+ placeholder: 'Placeholder',
+ },
};
-export const Multiline = Template.bind({});
-Multiline.args = {
- _id: 'setting_id',
- label: 'Label',
- value: 'Value\n'.repeat(10),
- placeholder: 'Placeholder',
- multiline: true,
+export const Multiline = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ value: 'Value\n'.repeat(10),
+ placeholder: 'Placeholder',
+ multiline: true,
+ },
};
-export const WithResetButton = Template.bind({});
-WithResetButton.args = {
- _id: 'setting_id',
- label: 'Label',
- placeholder: 'Placeholder',
- hasResetButton: true,
+export const WithResetButton = {
+ args: {
+ _id: 'setting_id',
+ label: 'Label',
+ placeholder: 'Placeholder',
+ hasResetButton: true,
+ },
};
diff --git a/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.stories.tsx b/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.stories.tsx
index bf35a4aabf91c..0c5e29a91506a 100644
--- a/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta, StoryFn } from '@storybook/react';
import SettingsGroupPage from './SettingsGroupPage';
import SettingsGroupPageSkeleton from './SettingsGroupPageSkeleton';
@@ -11,12 +11,13 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
+export const Default: StoryObj = {};
-export const WithGroup: StoryFn = (args) => ;
-WithGroup.args = {
- _id: 'General',
- i18nLabel: 'General',
+export const WithGroup: StoryObj = {
+ args: {
+ _id: 'General',
+ i18nLabel: 'General',
+ },
};
export const Skeleton: StoryFn = () => ;
diff --git a/apps/meteor/client/views/admin/settings/SettingsGroupSelector/SettingsGroupSelector.stories.tsx b/apps/meteor/client/views/admin/settings/SettingsGroupSelector/SettingsGroupSelector.stories.tsx
index 2c7b4766dca0a..6fbcac01543d8 100644
--- a/apps/meteor/client/views/admin/settings/SettingsGroupSelector/SettingsGroupSelector.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/SettingsGroupSelector/SettingsGroupSelector.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import SettingsGroupSelector from './SettingsGroupSelector';
@@ -10,5 +10,6 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'GroupSelector';
+export const Default: StoryObj = {
+ name: 'GroupSelector',
+};
diff --git a/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.stories.tsx b/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.stories.tsx
index c1fd3ac6a5a0d..140aeb38f714c 100644
--- a/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.stories.tsx
+++ b/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta, StoryFn } from '@storybook/react';
import SettingsSection from './SettingsSection';
import SettingsSectionSkeleton from './SettingsSectionSkeleton';
@@ -11,9 +11,10 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.args = {
- groupId: 'General',
+export const Default: StoryObj = {
+ args: {
+ groupId: 'General',
+ },
};
export const Skeleton: StoryFn = () => ;
diff --git a/apps/meteor/client/views/admin/subscription/components/UsagePieGraph.stories.tsx b/apps/meteor/client/views/admin/subscription/components/UsagePieGraph.stories.tsx
index ceb9cabe51726..8146fe3ade582 100644
--- a/apps/meteor/client/views/admin/subscription/components/UsagePieGraph.stories.tsx
+++ b/apps/meteor/client/views/admin/subscription/components/UsagePieGraph.stories.tsx
@@ -1,5 +1,5 @@
import colorTokens from '@rocket.chat/fuselage-tokens/colors.json';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import type { ComponentProps } from 'react';
import UsagePieGraph from './UsagePieGraph';
@@ -12,57 +12,60 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Example = Template.bind({});
-Example.args = {
- total: 321,
- used: 123,
- size: 128,
- label: 'Example label',
- color: colorTokens.p500,
+export const Example = {
+ args: {
+ total: 321,
+ used: 123,
+ size: 128,
+ label: 'Example label',
+ color: colorTokens.p500,
+ },
};
-export const Unlimited = Template.bind({});
-Unlimited.args = {
- used: 123,
- size: 128,
- label: 'Example label',
- color: colorTokens.p500,
+export const Unlimited = {
+ args: {
+ used: 123,
+ size: 128,
+ label: 'Example label',
+ color: colorTokens.p500,
+ },
};
-export const Animated: StoryFn, 'size' | 'label'>> = (args) => {
- const props = useAutoSequence([
- {
- total: 100,
- used: 0,
- color: colorTokens.g500,
- },
- {
- total: 100,
- used: 25,
- color: colorTokens.b500,
- },
- {
- total: 100,
- used: 50,
- color: colorTokens.y500,
- },
- {
- total: 100,
- used: 75,
- color: colorTokens.o500,
- },
- {
- total: 100,
- used: 100,
- color: colorTokens.r500,
- },
- ]);
+export const Animated: StoryObj, 'size' | 'label'>> = {
+ render: (args) => {
+ const props = useAutoSequence([
+ {
+ total: 100,
+ used: 0,
+ color: colorTokens.g500,
+ },
+ {
+ total: 100,
+ used: 25,
+ color: colorTokens.b500,
+ },
+ {
+ total: 100,
+ used: 50,
+ color: colorTokens.y500,
+ },
+ {
+ total: 100,
+ used: 75,
+ color: colorTokens.o500,
+ },
+ {
+ total: 100,
+ used: 100,
+ color: colorTokens.r500,
+ },
+ ]);
- return ;
-};
-Animated.args = {
- size: 128,
- label: 'Example label',
+ return ;
+ },
+
+ args: {
+ size: 128,
+ label: 'Example label',
+ },
};
diff --git a/apps/meteor/client/views/admin/users/UsersTable/UsersTable.stories.tsx b/apps/meteor/client/views/admin/users/UsersTable/UsersTable.stories.tsx
index 8be522d6143b3..6f24c90a1176d 100644
--- a/apps/meteor/client/views/admin/users/UsersTable/UsersTable.stories.tsx
+++ b/apps/meteor/client/views/admin/users/UsersTable/UsersTable.stories.tsx
@@ -1,5 +1,5 @@
import { UserStatus } from '@rocket.chat/core-typings';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import UsersTable from './UsersTable';
import { createMockedPagination } from '../../../../../tests/mocks/data';
@@ -8,8 +8,6 @@ export default {
component: UsersTable,
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
const mockedUsers = [
{
_id: '1',
@@ -65,28 +63,31 @@ const mockedUsers = [
const paginationData = createMockedPagination(mockedUsers.length, 5);
-export const Default = Template.bind({});
-Default.args = {
- users: mockedUsers,
- total: 5,
- isLoading: false,
- isSuccess: true,
- tab: 'all',
- paginationData,
+export const Default = {
+ args: {
+ users: mockedUsers,
+ total: 5,
+ isLoading: false,
+ isSuccess: true,
+ tab: 'all',
+ paginationData,
+ },
};
-export const Loading = Template.bind({});
-Loading.args = {
- isLoading: true,
- paginationData,
+export const Loading = {
+ args: {
+ isLoading: true,
+ paginationData,
+ },
};
-export const NoResults = Template.bind({});
-NoResults.args = {
- users: [],
- total: 0,
- isLoading: false,
- isError: false,
- isSuccess: true,
- paginationData,
+export const NoResults = {
+ args: {
+ users: [],
+ total: 0,
+ isLoading: false,
+ isError: false,
+ isSuccess: true,
+ paginationData,
+ },
};
diff --git a/apps/meteor/client/views/admin/viewLogs/ViewLogsPage.stories.tsx b/apps/meteor/client/views/admin/viewLogs/ViewLogsPage.stories.tsx
index d3a4622b20e29..f686cf1ea6e0e 100644
--- a/apps/meteor/client/views/admin/viewLogs/ViewLogsPage.stories.tsx
+++ b/apps/meteor/client/views/admin/viewLogs/ViewLogsPage.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import ViewLogsPage from './ViewLogsPage';
@@ -11,5 +11,7 @@ export default {
decorators: [(fn) => {fn()}
],
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'ViewLogsPage';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'ViewLogsPage',
+};
diff --git a/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.stories.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.stories.tsx
index 7aad52c6cdecd..df0c2b233e4bd 100644
--- a/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.stories.tsx
+++ b/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.stories.tsx
@@ -1,5 +1,5 @@
import type { IStats } from '@rocket.chat/core-typings';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import DeploymentCard from './DeploymentCard';
@@ -52,7 +52,6 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Example = Template.bind({});
-Example.storyName = 'DeploymentCard';
+export const Example = {
+ name: 'DeploymentCard',
+};
diff --git a/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx
index d9398865d7778..4fb8b68496764 100644
--- a/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx
+++ b/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx
@@ -17,7 +17,11 @@ type DeploymentCardProps = {
statistics: IStats;
};
-const DeploymentCard = ({ serverInfo: { info, cloudWorkspaceId }, statistics, instances }: DeploymentCardProps) => {
+const DeploymentCard = ({
+ serverInfo: { info, cloudWorkspaceId, workspaceUrl, hashedWorkspaceUrl },
+ statistics,
+ instances,
+}: DeploymentCardProps) => {
const { t } = useTranslation();
const formatDateAndTime = useFormatDateAndTime();
const setModal = useSetModal();
@@ -39,6 +43,18 @@ const DeploymentCard = ({ serverInfo: { info, cloudWorkspaceId }, statistics, in
{statistics.version}
+ {workspaceUrl && (
+
+
+ {workspaceUrl}
+
+ )}
+ {hashedWorkspaceUrl && (
+
+
+ {hashedWorkspaceUrl}
+
+ )}
{statistics.uniqueId}
diff --git a/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.stories.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.stories.tsx
index d9bf64387a775..518f13f2dd8c6 100644
--- a/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.stories.tsx
+++ b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import DescriptionList from './DescriptionList';
import DescriptionListEntry from './DescriptionListEntry';
@@ -11,11 +11,14 @@ export default {
decorators: [(fn) => {fn()}
],
} satisfies Meta;
-export const Default: StoryFn = (args) => (
-
- Value
- Value
- Value
-
-);
-Default.storyName = 'DescriptionList';
+export const Default: StoryObj = {
+ render: (args) => (
+
+ Value
+ Value
+ Value
+
+ ),
+
+ name: 'DescriptionList',
+};
diff --git a/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.stories.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.stories.tsx
index 6c52749684d84..bd4b18c91dfa2 100644
--- a/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.stories.tsx
+++ b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import InstancesModal from './InstancesModal';
@@ -12,41 +12,41 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
+export const Default = {
+ name: 'InstancesModal',
-export const Default = Template.bind({});
-Default.storyName = 'InstancesModal';
-Default.args = {
- instances: [
- {
- address: 'http://localhost:3000',
- broadcastAuth: false,
- currentStatus: {
- connected: true,
- },
- instanceRecord: {
- _createdAt: new Date(),
- _id: 'instance-id',
- name: 'instance-name',
- pid: 123,
- extraInformation: {
- host: '127.0.0.1',
- nodeVersion: 'v14.18.2',
- port: '',
- tcpPort: 123,
- os: {
- type: 'macOSX',
- platform: '',
- arch: 'x64',
- release: '236',
- uptime: 10,
- loadavg: [123, 123],
- totalmem: 123,
- freemem: 123,
- cpus: 8,
+ args: {
+ instances: [
+ {
+ address: 'http://localhost:3000',
+ broadcastAuth: false,
+ currentStatus: {
+ connected: true,
+ },
+ instanceRecord: {
+ _createdAt: new Date(),
+ _id: 'instance-id',
+ name: 'instance-name',
+ pid: 123,
+ extraInformation: {
+ host: '127.0.0.1',
+ nodeVersion: 'v14.18.2',
+ port: '',
+ tcpPort: 123,
+ os: {
+ type: 'macOSX',
+ platform: '',
+ arch: 'x64',
+ release: '236',
+ uptime: 10,
+ loadavg: [123, 123],
+ totalmem: 123,
+ freemem: 123,
+ cpus: 8,
+ },
},
},
},
- },
- ],
+ ],
+ },
};
diff --git a/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.stories.tsx b/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.stories.tsx
index 3de222a485494..6604fc325c744 100644
--- a/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.stories.tsx
+++ b/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.stories.tsx
@@ -1,5 +1,5 @@
import type { IStats } from '@rocket.chat/core-typings';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import MessagesRoomsCard from './MessagesRoomsCard';
@@ -23,8 +23,5 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Example = Template.bind({});
-
-export const Vertical = Template.bind({});
+export const Example = {};
+export const Vertical = {};
diff --git a/apps/meteor/client/views/audit/components/AppInfoField.stories.tsx b/apps/meteor/client/views/audit/components/AppInfoField.stories.tsx
index 8383a7544b2aa..e0609732a1972 100644
--- a/apps/meteor/client/views/audit/components/AppInfoField.stories.tsx
+++ b/apps/meteor/client/views/audit/components/AppInfoField.stories.tsx
@@ -1,6 +1,6 @@
import type { AppSubscriptionStatus } from '@rocket.chat/core-typings';
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import { AppInfoField } from './AppInfoField';
@@ -81,8 +81,8 @@ export default {
],
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
+export const Default: StoryObj = {};
-export const NoAppInfo: StoryFn = (args) => ;
-
-NoAppInfo.decorators = [mockAppRoot().withTranslations('en', 'core', { App_id: 'App Id' }).buildStoryDecorator()];
+export const NoAppInfo: StoryObj = {
+ decorators: [mockAppRoot().withTranslations('en', 'core', { App_id: 'App Id' }).buildStoryDecorator()],
+};
diff --git a/apps/meteor/client/views/audit/components/SecurityLogDisplayModal.stories.tsx b/apps/meteor/client/views/audit/components/SecurityLogDisplayModal.stories.tsx
index 928d5f0b9ca28..5b803f307080c 100644
--- a/apps/meteor/client/views/audit/components/SecurityLogDisplayModal.stories.tsx
+++ b/apps/meteor/client/views/audit/components/SecurityLogDisplayModal.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import SecurityLogDisplayModal from './SecurityLogDisplayModal';
@@ -19,12 +19,12 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
+export const Default: StoryObj = {};
-export const system: StoryFn = (args) => (
-
-);
+export const system: StoryObj = {
+ render: (args) => ,
+};
-export const app: StoryFn = (args) => (
-
-);
+export const app: StoryObj = {
+ render: (args) => ,
+};
diff --git a/apps/meteor/client/views/e2e/EnterE2EPasswordModal/EnterE2EPasswordModal.stories.tsx b/apps/meteor/client/views/e2e/EnterE2EPasswordModal/EnterE2EPasswordModal.stories.tsx
index f5d560a47b7f2..7c97c3d7f7480 100644
--- a/apps/meteor/client/views/e2e/EnterE2EPasswordModal/EnterE2EPasswordModal.stories.tsx
+++ b/apps/meteor/client/views/e2e/EnterE2EPasswordModal/EnterE2EPasswordModal.stories.tsx
@@ -1,6 +1,6 @@
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
+import { action } from 'storybook/actions';
import EnterE2EPasswordModal from '.';
diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogsItem.stories.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogsItem.stories.tsx
index 4825b3f308347..62d2eae14899f 100644
--- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogsItem.stories.tsx
+++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogsItem.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import type { ComponentProps } from 'react';
import AppLogsItem from './AppLogsItem';
@@ -39,4 +39,4 @@ export default {
},
} satisfies Meta>;
-export const Simple: StoryFn> = (args) => ;
+export const Simple: StoryObj> = {};
diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Components/CollapsiblePanel.stories.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Components/CollapsiblePanel.stories.tsx
index 8bc7052c0c556..6db1bb09bca0d 100644
--- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Components/CollapsiblePanel.stories.tsx
+++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Components/CollapsiblePanel.stories.tsx
@@ -35,4 +35,6 @@ const Template: StoryFn = (args) => {
);
};
-export const Default = Template.bind({});
+export const Default = {
+ render: Template,
+};
diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilter.stories.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilter.stories.tsx
index bbd2ffac4944f..71b68a625d2f2 100644
--- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilter.stories.tsx
+++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilter.stories.tsx
@@ -1,8 +1,8 @@
import { Box } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
import { FormProvider } from 'react-hook-form';
+import { action } from 'storybook/actions';
import { AppLogsFilter } from './AppLogsFilter';
import { useAppLogsFilterForm } from '../useAppLogsFilterForm';
diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilterContextualBar.stories.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilterContextualBar.stories.tsx
index 4838833d8192e..7982d5e63b04e 100644
--- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilterContextualBar.stories.tsx
+++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/AppLogsFilterContextualBar.stories.tsx
@@ -1,8 +1,8 @@
import { mockAppRoot } from '@rocket.chat/mock-providers';
import { Contextualbar } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
import { FormProvider, useForm } from 'react-hook-form';
+import { action } from 'storybook/actions';
import { AppLogsFilterContextualBar } from './AppLogsFilterContextualBar';
diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/DateTimeModal.stories.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/DateTimeModal.stories.tsx
index 5d512cfb9f74b..97d14f60c7688 100644
--- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/DateTimeModal.stories.tsx
+++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/DateTimeModal.stories.tsx
@@ -1,9 +1,9 @@
import { Box } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryFn } from '@storybook/react';
import type { ComponentProps } from 'react';
import { FormProvider, useForm } from 'react-hook-form';
+import { action } from 'storybook/actions';
import { DateTimeModal } from './DateTimeModal';
diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/ExportLogsModal.stories.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/ExportLogsModal.stories.tsx
index 23447ac3dd5c9..b5942f7731970 100644
--- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/ExportLogsModal.stories.tsx
+++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/Filters/ExportLogsModal.stories.tsx
@@ -1,9 +1,9 @@
import { Box } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
-import { action } from '@storybook/addon-actions';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import type { ComponentProps } from 'react';
import { FormProvider, useForm } from 'react-hook-form';
+import { action } from 'storybook/actions';
import { ExportLogsModal } from './ExportLogsModal';
@@ -36,4 +36,4 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn> = (args) => ;
+export const Default: StoryObj> = {};
diff --git a/apps/meteor/client/views/marketplace/AppsPage/PrivateEmptyState.stories.tsx b/apps/meteor/client/views/marketplace/AppsPage/PrivateEmptyState.stories.tsx
index d681101ffd8b5..c423529e85622 100644
--- a/apps/meteor/client/views/marketplace/AppsPage/PrivateEmptyState.stories.tsx
+++ b/apps/meteor/client/views/marketplace/AppsPage/PrivateEmptyState.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import PrivateEmptyState from './PrivateEmptyState';
@@ -10,5 +10,7 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'PageEmptyPrivateApps';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'PageEmptyPrivateApps',
+};
diff --git a/apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.stories.tsx b/apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.stories.tsx
index 728825b08f787..48ed76d2d575e 100644
--- a/apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.stories.tsx
+++ b/apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import UnsupportedEmptyState from './UnsupportedEmptyState';
@@ -10,5 +10,7 @@ export default {
},
} as Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'UnsupportedEmptyState';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'UnsupportedEmptyState',
+};
diff --git a/apps/meteor/client/views/marketplace/components/AppInstallModal/AppInstallModal.stories.tsx b/apps/meteor/client/views/marketplace/components/AppInstallModal/AppInstallModal.stories.tsx
index aabec0af3e030..27c958f3948d2 100644
--- a/apps/meteor/client/views/marketplace/components/AppInstallModal/AppInstallModal.stories.tsx
+++ b/apps/meteor/client/views/marketplace/components/AppInstallModal/AppInstallModal.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import AppInstallModal from './AppInstallModal';
@@ -9,12 +9,12 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
+export const Default = {
+ name: 'AppInstallModal',
-export const Default = Template.bind({});
-Default.storyName = 'AppInstallModal';
-Default.args = {
- enabled: 1,
- limit: 3,
- appName: 'Example-app-name',
+ args: {
+ enabled: 1,
+ limit: 3,
+ appName: 'Example-app-name',
+ },
};
diff --git a/apps/meteor/client/views/marketplace/components/UninstallGrandfatheredAppModal/UninstallGrandfatheredAppModal.stories.tsx b/apps/meteor/client/views/marketplace/components/UninstallGrandfatheredAppModal/UninstallGrandfatheredAppModal.stories.tsx
index db1af5127aa32..171e3d414ebf5 100644
--- a/apps/meteor/client/views/marketplace/components/UninstallGrandfatheredAppModal/UninstallGrandfatheredAppModal.stories.tsx
+++ b/apps/meteor/client/views/marketplace/components/UninstallGrandfatheredAppModal/UninstallGrandfatheredAppModal.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import UninstallGrandfatheredAppModal from './UninstallGrandfatheredAppModal';
@@ -9,10 +9,10 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
+export const Default = {
+ name: 'UninstallGrandfatheredAppModal',
-export const Default = Template.bind({});
-Default.storyName = 'UninstallGrandfatheredAppModal';
-Default.args = {
- appName: 'Example-App-Name',
+ args: {
+ appName: 'Example-App-Name',
+ },
};
diff --git a/apps/meteor/client/views/notAuthorized/NotAuthorizedPage.stories.tsx b/apps/meteor/client/views/notAuthorized/NotAuthorizedPage.stories.tsx
index f9b551a7c7f98..9a02a9d6c00ad 100644
--- a/apps/meteor/client/views/notAuthorized/NotAuthorizedPage.stories.tsx
+++ b/apps/meteor/client/views/notAuthorized/NotAuthorizedPage.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import NotAuthorizedPage from './NotAuthorizedPage';
@@ -9,5 +9,7 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'NotAuthorizedPage';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'NotAuthorizedPage',
+};
diff --git a/apps/meteor/client/views/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx b/apps/meteor/client/views/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx
index 32c9e7a350774..c03dbab0ed819 100644
--- a/apps/meteor/client/views/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/additionalForms/BusinessHoursMultiple.stories.tsx
@@ -1,5 +1,5 @@
import { Box, Skeleton } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import BusinessHoursMultiple from './BusinessHoursMultiple';
@@ -17,12 +17,14 @@ export default {
],
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'BusinessHoursMultiple';
-Default.args = {
- departmentList: [
- [1, 'Support'],
- [2, 'Marketing'],
- [3, ],
- ],
-} as any;
+export const Default: StoryObj = {
+ name: 'BusinessHoursMultiple',
+
+ args: {
+ departmentList: [
+ [1, 'Support'],
+ [2, 'Marketing'],
+ [3, ],
+ ],
+ } as any,
+};
diff --git a/apps/meteor/client/views/omnichannel/analytics/AnalyticsPage.stories.tsx b/apps/meteor/client/views/omnichannel/analytics/AnalyticsPage.stories.tsx
index f882a8f8b5a9f..f29001308a3a2 100644
--- a/apps/meteor/client/views/omnichannel/analytics/AnalyticsPage.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/analytics/AnalyticsPage.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import AnalyticsPage from './AnalyticsPage';
@@ -10,5 +10,7 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'AnalyticsPage';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'AnalyticsPage',
+};
diff --git a/apps/meteor/client/views/omnichannel/analytics/DateRangePicker.stories.tsx b/apps/meteor/client/views/omnichannel/analytics/DateRangePicker.stories.tsx
index fc152ee4a6c3e..a17eb3bc8a609 100644
--- a/apps/meteor/client/views/omnichannel/analytics/DateRangePicker.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/analytics/DateRangePicker.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import DateRangePicker from './DateRangePicker';
@@ -11,5 +11,6 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'DateRangePicker';
+export const Default: StoryObj = {
+ name: 'DateRangePicker',
+};
diff --git a/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.stories.tsx b/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.stories.tsx
index ac86765a4d439..483b98e0801af 100644
--- a/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import AppearanceForm from './AppearanceForm';
@@ -6,5 +6,7 @@ export default {
component: AppearanceForm,
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'AppearanceForm';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'AppearanceForm',
+};
diff --git a/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursForm.stories.tsx b/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursForm.stories.tsx
index f01a366b108aa..f9368b0d0831c 100644
--- a/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursForm.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursForm.stories.tsx
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import BusinessHoursForm from './BusinessHoursForm';
@@ -14,5 +14,6 @@ export default {
],
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'BusinessHoursForm';
+export const Default: StoryObj = {
+ name: 'BusinessHoursForm',
+};
diff --git a/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursTable.stories.tsx b/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursTable.stories.tsx
index 4cecb86cf5bbe..65f29058e7bda 100644
--- a/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursTable.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/businessHours/BusinessHoursTable.stories.tsx
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import BusinessHoursTable from './BusinessHoursTable';
@@ -12,53 +12,57 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (_args) => ;
-Default.storyName = 'BusinessHoursTable';
-Default.args = {
- businessHours: [
- {
- name: '',
- timezone: { name: 'America/Sao_Paulo' },
- workHours: [
- { day: 'Monday', open: true },
- { day: 'Tuesday', open: true },
- { day: 'Wednesday', open: true },
- { day: 'Saturday', open: true },
- ],
- },
- {
- name: 'Extra',
- timezone: { name: 'America/Sao_Paulo' },
- workHours: [
- { day: 'Monday', open: true },
- { day: 'Tuesday', open: true },
- { day: 'Saturday', open: true },
- ],
- },
- {
- name: 'Extra2',
- timezone: { name: 'America/Sao_Paulo' },
- workHours: [
- { day: 'Saturday', open: true },
- { day: 'Sunday', open: true },
- { day: 'Monday', open: false },
- ],
- },
- {
- name: 'Extra3',
- timezone: { name: 'America/Sao_Paulo' },
- workHours: [
- { day: 'Monday', open: true },
- { day: 'Saturday', open: true },
- ],
- },
+export const Default: StoryObj = {
+ render: (_args) => ,
+ name: 'BusinessHoursTable',
+
+ args: {
+ businessHours: [
+ {
+ name: '',
+ timezone: { name: 'America/Sao_Paulo' },
+ workHours: [
+ { day: 'Monday', open: true },
+ { day: 'Tuesday', open: true },
+ { day: 'Wednesday', open: true },
+ { day: 'Saturday', open: true },
+ ],
+ },
+ {
+ name: 'Extra',
+ timezone: { name: 'America/Sao_Paulo' },
+ workHours: [
+ { day: 'Monday', open: true },
+ { day: 'Tuesday', open: true },
+ { day: 'Saturday', open: true },
+ ],
+ },
+ {
+ name: 'Extra2',
+ timezone: { name: 'America/Sao_Paulo' },
+ workHours: [
+ { day: 'Saturday', open: true },
+ { day: 'Sunday', open: true },
+ { day: 'Monday', open: false },
+ ],
+ },
+ {
+ name: 'Extra3',
+ timezone: { name: 'America/Sao_Paulo' },
+ workHours: [
+ { day: 'Monday', open: true },
+ { day: 'Saturday', open: true },
+ ],
+ },
+ ],
+ params: {},
+ },
+
+ decorators: [
+ (fn) => (
+
+ {fn()}
+
+ ),
],
- params: {},
};
-Default.decorators = [
- (fn) => (
-
- {fn()}
-
- ),
-];
diff --git a/apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx b/apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx
index be3b264f6c83d..af4eee8ab13d0 100644
--- a/apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import CannedResponsesComposer from './CannedResponsesComposer';
@@ -6,5 +6,6 @@ export default {
component: CannedResponsesComposer,
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'CannedResponsesComposer';
+export const Default: StoryObj = {
+ name: 'CannedResponsesComposer',
+};
diff --git a/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx b/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx
index 4175b17f49e8a..1ce7b50935211 100644
--- a/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponse.stories.tsx
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import CannedResponse from './CannedResponse';
@@ -12,23 +12,25 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'CannedResponse';
-Default.args = {
- allowEdit: true,
- data: {
- shortcut: 'test3 long long long long long long long long long',
- text: 'simple canned response test3 long long long long long long long long long long long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long long',
- scope: 'Customer Support long long long long long long long long long long',
- tags: ['sales', 'support', 'long', 'long', 'long', 'long', 'long', 'long', 'long', 'long'],
- departmentName: '',
+export const Default: StoryObj = {
+ name: 'CannedResponse',
+
+ args: {
+ allowEdit: true,
+ data: {
+ shortcut: 'test3 long long long long long long long long long',
+ text: 'simple canned response test3 long long long long long long long long long long long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long long',
+ scope: 'Customer Support long long long long long long long long long long',
+ tags: ['sales', 'support', 'long', 'long', 'long', 'long', 'long', 'long', 'long', 'long'],
+ departmentName: '',
+ },
},
-};
-Default.decorators = [
- (fn) => (
-
- {fn()}
-
- ),
-];
+ decorators: [
+ (fn) => (
+
+ {fn()}
+
+ ),
+ ],
+};
diff --git a/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx b/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx
index 538123afda88a..0579298a97bea 100644
--- a/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.stories.tsx
@@ -1,6 +1,6 @@
import { Contextualbar } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
+import { action } from 'storybook/actions';
import CannedResponseList from './CannedResponseList';
@@ -13,65 +13,68 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'CannedResponseList';
-Default.args = {
- options: [
- ['all', 'All'],
- ['global', 'Public'],
- ['user', 'Private'],
- ],
- cannedItems: [
- {
- shortcut: 'test',
- text: 'simple canned response test',
- scope: 'global',
- tags: ['sales', 'support'],
- _createdAt: new Date(),
- _id: 'test',
- _updatedAt: new Date(),
- createdBy: {
- _id: 'rocket.cat',
- username: 'rocket.cat',
+export const Default: StoryObj = {
+ name: 'CannedResponseList',
+
+ args: {
+ options: [
+ ['all', 'All'],
+ ['global', 'Public'],
+ ['user', 'Private'],
+ ],
+ cannedItems: [
+ {
+ shortcut: 'test',
+ text: 'simple canned response test',
+ scope: 'global',
+ tags: ['sales', 'support'],
+ _createdAt: new Date(),
+ _id: 'test',
+ _updatedAt: new Date(),
+ createdBy: {
+ _id: 'rocket.cat',
+ username: 'rocket.cat',
+ },
+ departmentName: '',
+ userId: 'rocket.cat',
+ departmentId: '',
},
- departmentName: '',
- userId: 'rocket.cat',
- departmentId: '',
- },
- {
- shortcut: 'test2',
- text: 'simple canned response test2',
- scope: 'Customer Support',
- tags: [],
- _createdAt: new Date(),
- _id: 'test',
- _updatedAt: new Date(),
- createdBy: {
- _id: 'rocket.cat',
- username: 'rocket.cat',
+ {
+ shortcut: 'test2',
+ text: 'simple canned response test2',
+ scope: 'Customer Support',
+ tags: [],
+ _createdAt: new Date(),
+ _id: 'test',
+ _updatedAt: new Date(),
+ createdBy: {
+ _id: 'rocket.cat',
+ username: 'rocket.cat',
+ },
+ departmentName: '',
+ userId: 'rocket.cat',
+ departmentId: '',
},
- departmentName: '',
- userId: 'rocket.cat',
- departmentId: '',
- },
- {
- shortcut: 'test3 long long long long long long long long long',
- text: 'simple canned response test3 long long long long long long long long long long long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long long',
- scope: 'Customer Support long long long long long long long long long long',
- tags: ['sales', 'support', 'long', 'long', 'long', 'long', 'long', 'long', 'long', 'long'],
- _createdAt: new Date(),
- _id: 'test',
- _updatedAt: new Date(),
- createdBy: {
- _id: 'rocket.cat',
- username: 'rocket.cat',
+ {
+ shortcut: 'test3 long long long long long long long long long',
+ text: 'simple canned response test3 long long long long long long long long long long long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long longlong long long long long long long',
+ scope: 'Customer Support long long long long long long long long long long',
+ tags: ['sales', 'support', 'long', 'long', 'long', 'long', 'long', 'long', 'long', 'long'],
+ _createdAt: new Date(),
+ _id: 'test',
+ _updatedAt: new Date(),
+ createdBy: {
+ _id: 'rocket.cat',
+ username: 'rocket.cat',
+ },
+ departmentName: '',
+ userId: 'rocket.cat',
+ departmentId: '',
},
- departmentName: '',
- userId: 'rocket.cat',
- departmentId: '',
- },
- ],
- itemCount: 3,
- loadMoreItems: action('loadMoreItems'),
+ ],
+ itemCount: 3,
+ loadMoreItems: action('loadMoreItems'),
+ },
+
+ decorators: [(fn) => {fn()}],
};
-Default.decorators = [(fn) => {fn()}];
diff --git a/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx b/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx
index e033cf5394512..148dc73fe039b 100644
--- a/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/Item.stories.tsx
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import Item from './Item';
@@ -12,24 +12,27 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'Item';
-Default.args = {
- data: {
- shortcut: 'test',
- text: 'simple canned response test',
- scope: 'global',
- tags: ['sales', 'support'],
- _createdAt: new Date(),
- _id: 'test',
- _updatedAt: new Date(),
- createdBy: {
- _id: 'rocket.cat',
- username: 'rocket.cat',
+export const Default: StoryObj = {
+ name: 'Item',
+
+ args: {
+ data: {
+ shortcut: 'test',
+ text: 'simple canned response test',
+ scope: 'global',
+ tags: ['sales', 'support'],
+ _createdAt: new Date(),
+ _id: 'test',
+ _updatedAt: new Date(),
+ createdBy: {
+ _id: 'rocket.cat',
+ username: 'rocket.cat',
+ },
+ departmentName: '',
+ userId: 'rocket.cat',
+ departmentId: '',
},
- departmentName: '',
- userId: 'rocket.cat',
- departmentId: '',
},
+
+ decorators: [(fn) => {fn()}],
};
-Default.decorators = [(fn) => {fn()}];
diff --git a/apps/meteor/client/views/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx b/apps/meteor/client/views/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx
index 9bc93c6084c70..4a8b310fecca9 100644
--- a/apps/meteor/client/views/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/cannedResponses/modals/CreateCannedResponse/CreateCannedResponseModal.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import CreateCannedResponseModal from './CreateCannedResponseModal';
@@ -11,6 +11,4 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
+export const Default = {};
diff --git a/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/OutboundMessageWizard.stories.tsx b/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/OutboundMessageWizard.stories.tsx
index 6e825d06ac357..92413eebc5568 100644
--- a/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/OutboundMessageWizard.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/OutboundMessageWizard.stories.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable @typescript-eslint/naming-convention */
import { faker } from '@faker-js/faker/locale/af_ZA';
import { Box } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
diff --git a/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/MessageStep.stories.tsx b/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/MessageStep.stories.tsx
index 4960d4ac70299..27ffa02c5215e 100644
--- a/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/MessageStep.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/MessageStep.stories.tsx
@@ -1,8 +1,7 @@
-/* eslint-disable @typescript-eslint/naming-convention */
import { Box } from '@rocket.chat/fuselage';
import { WizardContext, StepsLinkedList } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
+import { action } from 'storybook/actions';
import MessageStep from './MessageStep';
import { createFakeContact } from '../../../../../../../../tests/mocks/data';
diff --git a/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/RecipientStep.stories.tsx b/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/RecipientStep.stories.tsx
index 003bf14150b13..e73426335eba1 100644
--- a/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/RecipientStep.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/RecipientStep.stories.tsx
@@ -1,9 +1,8 @@
-/* eslint-disable @typescript-eslint/naming-convention */
import { Box } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
import { WizardContext, StepsLinkedList } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
+import { action } from 'storybook/actions';
import RecipientStep from './RecipientStep';
import { createFakeContact, createFakeContactChannel, createFakeContactWithManagerData } from '../../../../../../../../tests/mocks/data';
diff --git a/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/RepliesStep.stories.tsx b/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/RepliesStep.stories.tsx
index 391ef96567ec4..1b999f9bbbf24 100644
--- a/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/RepliesStep.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/components/outboundMessage/components/OutboundMessageWizard/steps/RepliesStep.stories.tsx
@@ -1,10 +1,9 @@
-/* eslint-disable @typescript-eslint/naming-convention */
import { faker } from '@faker-js/faker';
import { Box } from '@rocket.chat/fuselage';
import { mockAppRoot } from '@rocket.chat/mock-providers';
import { WizardContext, StepsLinkedList } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
+import { action } from 'storybook/actions';
import RepliesStep from './RepliesStep';
import { createFakeAgent, createFakeDepartment } from '../../../../../../../../tests/mocks/data';
diff --git a/apps/meteor/client/views/omnichannel/components/outboundMessage/modals/OutboundMessageUpsellModal/OutboundMessageUpsellModal.stories.tsx b/apps/meteor/client/views/omnichannel/components/outboundMessage/modals/OutboundMessageUpsellModal/OutboundMessageUpsellModal.stories.tsx
index 04a05602521df..29caa31529006 100644
--- a/apps/meteor/client/views/omnichannel/components/outboundMessage/modals/OutboundMessageUpsellModal/OutboundMessageUpsellModal.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/components/outboundMessage/modals/OutboundMessageUpsellModal/OutboundMessageUpsellModal.stories.tsx
@@ -1,5 +1,5 @@
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
+import { action } from 'storybook/actions';
import OutboundMessageUpsellModal from './OutboundMessageUpsellModal';
diff --git a/apps/meteor/client/views/omnichannel/customFields/CustomFieldsForm.stories.tsx b/apps/meteor/client/views/omnichannel/customFields/CustomFieldsForm.stories.tsx
index 0b4719244fda3..20ebc46771e13 100644
--- a/apps/meteor/client/views/omnichannel/customFields/CustomFieldsForm.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/customFields/CustomFieldsForm.stories.tsx
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import EditCustomFields from './EditCustomFields';
@@ -14,5 +14,6 @@ export default {
],
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'CustomFieldsForm';
+export const Default: StoryObj = {
+ name: 'CustomFieldsForm',
+};
diff --git a/apps/meteor/client/views/omnichannel/installation/Installation.stories.tsx b/apps/meteor/client/views/omnichannel/installation/Installation.stories.tsx
index b499d39ae1153..e473cc5412a0e 100644
--- a/apps/meteor/client/views/omnichannel/installation/Installation.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/installation/Installation.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import Installation from './Installation';
@@ -6,5 +6,7 @@ export default {
component: Installation,
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'Installation';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'Installation',
+};
diff --git a/apps/meteor/client/views/omnichannel/modals/ForwardChatModal.stories.tsx b/apps/meteor/client/views/omnichannel/modals/ForwardChatModal.stories.tsx
index eb7f5b070f07f..79aa570895c6c 100644
--- a/apps/meteor/client/views/omnichannel/modals/ForwardChatModal.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/modals/ForwardChatModal.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import ForwardChatModal from './ForwardChatModal';
import { createFakeOmnichannelRoom } from '../../../../tests/mocks/data';
@@ -16,4 +16,4 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
+export const Default: StoryObj = {};
diff --git a/apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.stories.tsx b/apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.stories.tsx
index 4d62542e92f20..9c12aa3584dcf 100644
--- a/apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/modals/ReturnChatQueueModal.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import ReturnChatQueueModal from './ReturnChatQueueModal';
@@ -14,4 +14,4 @@ export default {
},
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
+export const Default: StoryObj = {};
diff --git a/apps/meteor/client/views/omnichannel/realTimeMonitoring/counter/CounterContainer.stories.tsx b/apps/meteor/client/views/omnichannel/realTimeMonitoring/counter/CounterContainer.stories.tsx
index 86b394a701be2..9f06056871060 100644
--- a/apps/meteor/client/views/omnichannel/realTimeMonitoring/counter/CounterContainer.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/realTimeMonitoring/counter/CounterContainer.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import CounterContainer from './CounterContainer';
@@ -6,13 +6,15 @@ export default {
component: CounterContainer,
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'CounterContainer';
-Default.args = {
- totals: [
- { title: 'Total_conversations', value: 10 },
- { title: 'Open_conversations', value: 10 },
- { title: 'Total_messages', value: 10 },
- { title: 'Total_visitors', value: 0 },
- ],
+export const Default: StoryObj = {
+ name: 'CounterContainer',
+
+ args: {
+ totals: [
+ { title: 'Total_conversations', value: 10 },
+ { title: 'Open_conversations', value: 10 },
+ { title: 'Total_messages', value: 10 },
+ { title: 'Total_visitors', value: 0 },
+ ],
+ },
};
diff --git a/apps/meteor/client/views/omnichannel/triggers/TriggersForm.stories.tsx b/apps/meteor/client/views/omnichannel/triggers/TriggersForm.stories.tsx
index f5be7d8faff14..3d3ac46c90a0d 100644
--- a/apps/meteor/client/views/omnichannel/triggers/TriggersForm.stories.tsx
+++ b/apps/meteor/client/views/omnichannel/triggers/TriggersForm.stories.tsx
@@ -1,5 +1,5 @@
import { FieldGroup, Box } from '@rocket.chat/fuselage';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import EditTrigger from './EditTrigger';
@@ -14,4 +14,4 @@ export default {
],
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
+export const Default: StoryObj = {};
diff --git a/apps/meteor/client/views/room/RoomAnnouncement/RoomAnnouncement.stories.tsx b/apps/meteor/client/views/room/RoomAnnouncement/RoomAnnouncement.stories.tsx
index 5869da9ba0a2f..0753b45a29058 100644
--- a/apps/meteor/client/views/room/RoomAnnouncement/RoomAnnouncement.stories.tsx
+++ b/apps/meteor/client/views/room/RoomAnnouncement/RoomAnnouncement.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import RoomAnnouncement from '.';
@@ -6,7 +6,8 @@ export default {
component: RoomAnnouncement,
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.args = {
- announcement: 'Lorem Ipsum Indolor',
+export const Default: StoryObj = {
+ args: {
+ announcement: 'Lorem Ipsum Indolor',
+ },
};
diff --git a/apps/meteor/client/views/room/body/RoomInviteBody.stories.tsx b/apps/meteor/client/views/room/body/RoomInviteBody.stories.tsx
index 7e131a441f640..a5feeaafa1e15 100644
--- a/apps/meteor/client/views/room/body/RoomInviteBody.stories.tsx
+++ b/apps/meteor/client/views/room/body/RoomInviteBody.stories.tsx
@@ -1,5 +1,5 @@
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
+import { action } from 'storybook/actions';
import RoomInvite from './RoomInviteBody';
diff --git a/apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslate.stories.tsx b/apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslate.stories.tsx
index 2a11bc599fa83..83daacfa46e29 100644
--- a/apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslate.stories.tsx
+++ b/apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslate.stories.tsx
@@ -1,5 +1,5 @@
import { Contextualbar } from '@rocket.chat/ui-client';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import AutoTranslate from './AutoTranslate';
@@ -11,13 +11,15 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'AutoTranslate';
-Default.args = {
- language: 'en',
- languages: [
- ['en', 'English'],
- ['jp', 'Japanese'],
- ['pt', 'Portuguese'],
- ],
+export const Default: StoryObj = {
+ name: 'AutoTranslate',
+
+ args: {
+ language: 'en',
+ languages: [
+ ['en', 'English'],
+ ['jp', 'Japanese'],
+ ['pt', 'Portuguese'],
+ ],
+ },
};
diff --git a/apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsers.stories.tsx b/apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsers.stories.tsx
index b104003144c10..3eb6b377711fe 100644
--- a/apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsers.stories.tsx
+++ b/apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsers.stories.tsx
@@ -1,6 +1,6 @@
import { Contextualbar } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
+import { action } from 'storybook/actions';
import BannedUsers from './BannedUsers';
diff --git a/apps/meteor/client/views/room/contextualBar/Discussions/DiscussionsList.stories.tsx b/apps/meteor/client/views/room/contextualBar/Discussions/DiscussionsList.stories.tsx
index 30e64b52dc6d2..02595ea20c6be 100644
--- a/apps/meteor/client/views/room/contextualBar/Discussions/DiscussionsList.stories.tsx
+++ b/apps/meteor/client/views/room/contextualBar/Discussions/DiscussionsList.stories.tsx
@@ -1,7 +1,7 @@
import { Contextualbar } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import type { UseInfiniteQueryResult } from '@tanstack/react-query';
+import { action } from 'storybook/actions';
import DiscussionsList from './DiscussionsList';
@@ -24,8 +24,6 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) => ;
-
const fakeDiscussions = Array.from({ length: 10 }, (_, i) => ({
_id: String(i),
msg: `Discussion ${i}`,
@@ -42,21 +40,24 @@ const fakeDiscussions = Array.from({ length: 10 }, (_, i) => ({
},
}));
-export const Default = Template.bind({});
-Default.args = {
- isSuccess: true,
- discussions: fakeDiscussions,
- itemCount: fakeDiscussions.length,
+export const Default = {
+ args: {
+ isSuccess: true,
+ discussions: fakeDiscussions,
+ itemCount: fakeDiscussions.length,
+ },
};
-export const Loading = Template.bind({});
-Loading.args = {
- isPending: true,
+export const Loading = {
+ args: {
+ isPending: true,
+ },
};
-export const Empty = Template.bind({});
-Empty.args = {
- isSuccess: true,
- discussions: [],
- itemCount: 0,
+export const Empty = {
+ args: {
+ isSuccess: true,
+ discussions: [],
+ itemCount: 0,
+ },
};
diff --git a/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.stories.tsx b/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.stories.tsx
index b01754beccb21..a1158d7db0cc5 100644
--- a/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.stories.tsx
+++ b/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.stories.tsx
@@ -1,5 +1,5 @@
import { Contextualbar } from '@rocket.chat/ui-client';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
import ExportMessages from './index';
@@ -11,5 +11,7 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-export const Default: StoryFn = () => ;
-Default.storyName = 'ExportMessages';
+export const Default: StoryObj = {
+ render: () => ,
+ name: 'ExportMessages',
+};
diff --git a/apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx b/apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx
index a8c7a06e47719..848db81c7421b 100644
--- a/apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx
+++ b/apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx
@@ -1,7 +1,7 @@
import type { RoomType } from '@rocket.chat/core-typings';
import { mockAppRoot } from '@rocket.chat/mock-providers';
import { Contextualbar } from '@rocket.chat/ui-client';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta, StoryObj } from '@storybook/react';
import RoomInfo from './RoomInfo';
import FakeRoomProvider from '../../../../../../tests/mocks/client/FakeRoomProvider';
@@ -45,48 +45,51 @@ const roomArgs = {
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam mollis nisi vel arcu bibendum vehicula. Integer vitae suscipit libero',
};
-const Template: StoryFn = (args) => ;
-
-export const Default = Template.bind({});
-Default.args = {
- room: roomArgs,
+export const Default = {
+ args: {
+ room: roomArgs,
+ },
};
-export const Archived = Template.bind({});
-Archived.args = {
- ...Default.args,
- room: {
- ...roomArgs,
- archived: true,
+export const Archived = {
+ args: {
+ ...Default.args,
+ room: {
+ ...roomArgs,
+ archived: true,
+ },
},
};
-export const Broadcast = Template.bind({});
-Broadcast.args = {
- ...Default.args,
- room: {
- ...roomArgs,
- broadcast: true,
+export const Broadcast = {
+ args: {
+ ...Default.args,
+ room: {
+ ...roomArgs,
+ broadcast: true,
+ },
},
};
-export const ABAC = Template.bind({});
-ABAC.decorators = [
- mockAppRoot().withSetting('ABAC_Enabled', true).withSetting('ABAC_ShowAttributesInRooms', true).buildStoryDecorator(),
- (fn) => (
-
- {fn()}
-
- ),
-];
-ABAC.args = {
- ...Default.args,
- room: {
- ...roomArgs,
- abacAttributes: [
- { key: 'Chat-sensitivity', values: ['Classified', 'Top-Secret'] },
- { key: 'Country', values: ['US-only'] },
- { key: 'Project', values: ['Ruminator-2000'] },
- ],
+export const ABAC: StoryObj = {
+ decorators: [
+ mockAppRoot().withSetting('ABAC_Enabled', true).withSetting('ABAC_ShowAttributesInRooms', true).buildStoryDecorator(),
+ (fn) => (
+
+ {fn()}
+
+ ),
+ ],
+
+ args: {
+ ...Default.args,
+ room: {
+ ...roomArgs,
+ abacAttributes: [
+ { key: 'Chat-sensitivity', values: ['Classified', 'Top-Secret'] },
+ { key: 'Country', values: ['US-only'] },
+ { key: 'Project', values: ['Ruminator-2000'] },
+ ],
+ },
},
};
diff --git a/apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferences.stories.tsx b/apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferences.stories.tsx
index 07fc1f52eb956..487e463d61fe7 100644
--- a/apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferences.stories.tsx
+++ b/apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferences.stories.tsx
@@ -1,6 +1,6 @@
import { Contextualbar } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { StoryObj, Meta } from '@storybook/react';
+import { action } from 'storybook/actions';
import NotificationsPreferences from './NotificationPreferences';
@@ -12,18 +12,20 @@ export default {
decorators: [(fn) => {fn()}],
} satisfies Meta;
-export const Default: StoryFn = (args) => ;
-Default.storyName = 'NotificationsPreferences';
-Default.args = {
- handleClose: action('handleClose'),
- handleSave: action('handleSaveButton'),
- handlePlaySound: action('handlePlaySound'),
- notificationOptions: {
- alerts: [
- ['default', 'Default'],
- ['all', 'All_messages'],
- ['mentions', 'Mentions'],
- ['nothing', 'Nothing'],
- ],
+export const Default: StoryObj = {
+ name: 'NotificationsPreferences',
+
+ args: {
+ handleClose: action('handleClose'),
+ handleSave: action('handleSaveButton'),
+ handlePlaySound: action('handlePlaySound'),
+ notificationOptions: {
+ alerts: [
+ ['default', 'Default'],
+ ['all', 'All_messages'],
+ ['mentions', 'Mentions'],
+ ['nothing', 'Nothing'],
+ ],
+ },
},
};
diff --git a/apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessages.stories.tsx b/apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessages.stories.tsx
index fe83afc561191..4addf6128b86e 100644
--- a/apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessages.stories.tsx
+++ b/apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessages.stories.tsx
@@ -1,5 +1,5 @@
import { Contextualbar } from '@rocket.chat/ui-client';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
import { FormProvider, useForm } from 'react-hook-form';
import PruneMessages from './PruneMessages';
@@ -27,11 +27,10 @@ export default {
],
} satisfies Meta;
-const Template: StoryFn = (args) => ;
+export const Default = {};
-export const Default = Template.bind({});
-
-export const WithCallout = Template.bind({});
-WithCallout.args = {
- callOutText: 'This is a callout',
+export const WithCallout = {
+ args: {
+ callOutText: 'This is a callout',
+ },
};
diff --git a/apps/meteor/client/views/room/contextualBar/RoomFiles/RoomFiles.stories.tsx b/apps/meteor/client/views/room/contextualBar/RoomFiles/RoomFiles.stories.tsx
index 1d6e0977982b1..dc409378ee9f6 100644
--- a/apps/meteor/client/views/room/contextualBar/RoomFiles/RoomFiles.stories.tsx
+++ b/apps/meteor/client/views/room/contextualBar/RoomFiles/RoomFiles.stories.tsx
@@ -1,6 +1,6 @@
import { Contextualbar } from '@rocket.chat/ui-client';
-import { action } from '@storybook/addon-actions';
-import type { Meta, StoryFn } from '@storybook/react';
+import type { Meta } from '@storybook/react';
+import { action } from 'storybook/actions';
import RoomFiles from './RoomFiles';
@@ -20,8 +20,6 @@ export default {
},
} satisfies Meta;
-const Template: StoryFn = (args) =>