// Each exported component in the package should have its own stories file import type { StoryObj, Decorator } from '@storybook/react-vite'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import Typography from '@mui/material/Typography'; import { Link } from '@availity/mui-link'; import { visuallyHidden } from '@availity/mui-utils'; import { EmptyState, EmptyStateProps } from './EmptyState'; // eslint-disable-next-line @nx/enforce-module-boundaries import { SystemPropsList } from '../../../../data/MuiSystemProperties'; /** Remove 508 warning of Heading Level Jump while leaving Story heading levels realistic */ const HeadingLevelDecorator: Decorator = (Story, context) => ( <> {context.viewMode !== 'docs' ? ( <> Component: Empty State Story: {context.name} ) : null} ); const StoryBox = ({ children }: { children: React.ReactNode }) => ( {children} ); /** Built on top of the `Stack` component, `EmptyState` will add the desired spacing to every direct descendant. * * _Accessibility Note: Check the appropriate heading level needed for your usage to not create a heading jump._ */ export default { title: 'Components/EmptyState/EmptyState', component: EmptyState, tags: ['autodocs'], args: { variant: 'NoSearchFound', }, decorators: [HeadingLevelDecorator], parameters: { docs: { controls: { exclude: SystemPropsList, }, }, }, }; export const _EmptyState: StoryObj = { render: (args: EmptyStateProps) => ( Header This body explains the empty state. The illustration relates to the situation. Optional Link ), }; export const _ContentLoading: StoryObj = { render: (args: EmptyStateProps) => ( Content Loading Data is loading. ), args: { variant: 'ContentLoading', }, }; export const _Error: StoryObj = { render: (args: EmptyStateProps) => ( Error Oops! Something went wrong. Try your request again later. If the problem continues, contact Availity Client Services at 1.800.AVAILITY (282.4548). ), args: { variant: 'Error', }, }; export const _Instructional: StoryObj = { render: (args: EmptyStateProps) => ( Tasks need to be completed You have tasks to complete ), args: { variant: 'Instructional', }, }; export const _NoData: StoryObj = { render: (args: EmptyStateProps) => ( No data Sorry, but we cannot seem to find the data you are looking for. ), args: { variant: 'NoData', }, }; export const _NoFavorites: StoryObj = { render: (args: EmptyStateProps) => ( No favorites It's ok to have favorites. Select the heart icon next to an application to add it to the My Favorites menu for quick access. ), args: { variant: 'NoFavorites', }, }; export const _NoMessages: StoryObj = { render: (args: EmptyStateProps) => ( No messages You do not have any messages ), args: { variant: 'NoMessages', }, }; export const _NoNotifications: StoryObj = { render: (args: EmptyStateProps) => ( No notifications You do not have any notifications ), args: { variant: 'NoNotifications', }, }; export const _NoPatients: StoryObj = { render: (args: EmptyStateProps) => ( Patient(s) not found ), args: { variant: 'NoPatients', }, }; export const _NoSearchResults: StoryObj = { render: (args: EmptyStateProps) => ( No search results found -- Results not found for [variable]. Adjust your search or filter options for better results. Suggestions: Correctly spell all words in search criteria Use different keywords Use general keywords Use fewer keywords Clear filter ), args: { variant: 'NoSearchFound', }, }; export const _PageNotFound: StoryObj = { render: (args: EmptyStateProps) => ( Page not found The page you are looking is no longer available. ), args: { variant: 'PageNotFound', }, }; export const _SuccessConfirmation: StoryObj = { render: (args: EmptyStateProps) => ( Success! You have completed your task ), args: { variant: 'SuccessConfirmation', }, };