diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.stories.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.stories.tsx index 1fa7106243e0..fbb33dcea240 100644 --- a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.stories.tsx +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessage.stories.tsx @@ -5,6 +5,10 @@ import type { ReactElement } from 'react'; import '@rocket.chat/icons/dist/rocketchat.css'; import { VideoConfMessage, VideoConfMessageIcon, VideoConfMessageRow, VideoConfMessageText } from '.'; import VideoConfMessageSkeleton from './VideoConfMessageSkeleton'; +import VideoConfMessageFooter from './VideoConfMessageFooter'; +import VideoConfMessageUserStack from './VideoConfMessageUserStack'; +import VideoConfMessageAction from './VideoConfMessageAction'; +import VideoConfMessageFooterText from './VideoConfMessageFooterText'; export default { title: 'Components/VideoConfMessage', @@ -42,79 +46,64 @@ const avatarUrl = export const CallingDM: ComponentStory = () => ( - - Calling... - - - - Waiting for answer + + Calling... + + Join + Waiting for answer + ); export const CallEndedDM: ComponentStory = () => ( - - Call ended - - - - Call was not answered + + Call ended + + Call Back + Call was not answered + ); export const CallOngoing: ComponentStory = () => ( - - Call ongoing + + Call ongoing - - - + + Join + {Array(3) .fill('') .map((_, index) => ( - - - + ))} - - Joined - - - + + Joined + ); export const CallEnded: ComponentStory = () => ( - - Call ended + + Call ended - - + + {Array(3) .fill('') .map((_, index) => ( - - - + ))} - - Joined - - - + + ); diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageAction.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageAction.tsx new file mode 100644 index 000000000000..7deb5d7be56a --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageAction.tsx @@ -0,0 +1,11 @@ +import { Box, Button } from '@rocket.chat/fuselage'; +import type { ReactElement, ReactNode } from 'react'; + +const VideoConfMessageAction = ({ children, primary }: { children: ReactNode; primary?: boolean }): ReactElement => ( + + + +); +export default VideoConfMessageAction; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooter.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooter.tsx new file mode 100644 index 000000000000..1adfc10820b0 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooter.tsx @@ -0,0 +1,14 @@ +import { Box } from '@rocket.chat/fuselage'; +import type { ReactElement, ReactNode } from 'react'; + +import VideoConfMessageRow from './VideoConfMessageRow'; + +const VideoConfMessageFooter = ({ children, ...props }: { children: ReactNode }): ReactElement => ( + + + {children} + + +); + +export default VideoConfMessageFooter; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooterText.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooterText.tsx new file mode 100644 index 000000000000..7ed79fc45ca9 --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageFooterText.tsx @@ -0,0 +1,9 @@ +import { Box, Button } from '@rocket.chat/fuselage'; +import type { ReactElement, ReactNode } from 'react'; + +const VideoConfMessageFooterText = ({ children }: { children: ReactNode }): ReactElement => ( + + {children} + +); +export default VideoConfMessageFooterText; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageIcon.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageIcon.tsx index b62a5fc751b2..7cec0601e773 100644 --- a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageIcon.tsx +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageIcon.tsx @@ -2,12 +2,37 @@ import { Box, Icon } from '@rocket.chat/fuselage'; import type { ReactElement, ComponentProps } from 'react'; type VideoConfMessageIconProps = { - name: ComponentProps['name']; -} & ComponentProps; + variant?: keyof typeof styles; +}; -const VideoConfMessageIcon = ({ name, color, backgroundColor }: VideoConfMessageIconProps): ReactElement => ( - - +const styles = { + ended: { + icon: 'phone-off', + color: 'neutral-700', + backgroundColor: 'neutral-400', + }, + incoming: { + icon: 'phone-in', + color: 'primary-600', + backgroundColor: 'primary-200', + }, + outgoing: { + icon: 'phone', + color: 'success-800', + backgroundColor: 'success-200', + }, +} as const; + +const VideoConfMessageIcon = ({ variant = 'ended' }: VideoConfMessageIconProps): ReactElement => ( + + ); diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageSkeleton.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageSkeleton.tsx index ae82b87584e9..18134774eb5e 100644 --- a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageSkeleton.tsx +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageSkeleton.tsx @@ -7,10 +7,10 @@ import VideoConfMessageRow from './VideoConfMessageRow'; const VideoConfMessageSkeleton = (): ReactElement => ( - + - + ); diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageText.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageText.tsx index b73078df524a..d0cfc3eafced 100644 --- a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageText.tsx +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageText.tsx @@ -1,8 +1,6 @@ import { Box } from '@rocket.chat/fuselage'; import type { ReactElement, ComponentProps } from 'react'; -const VideoConfMessageText = ({ fontScale = 'c1', ...props }: ComponentProps): ReactElement => ( - -); +const VideoConfMessageText = ({ ...props }: ComponentProps): ReactElement => ; export default VideoConfMessageText; diff --git a/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageUserStack.tsx b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageUserStack.tsx new file mode 100644 index 000000000000..f925114e510c --- /dev/null +++ b/packages/ui-video-conf/src/VideoConfMessage/VideoConfMessageUserStack.tsx @@ -0,0 +1,16 @@ +import { Box } from '@rocket.chat/fuselage'; +import { Children, ReactElement } from 'react'; + +import VideoConfMessageRow from './VideoConfMessageRow'; + +const VideoConfMessageUserStack = ({ children }: { children: ReactElement | ReactElement[] }): ReactElement => ( + + + {Children.map(Children.toArray(children), (child) => ( + {child} + ))} + + +); + +export default VideoConfMessageUserStack;