UNPKG

communication-react-19

Version:

React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)

273 lines 19.5 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { mergeStyles } from '@fluentui/react'; /* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */ import { Stack } from '@fluentui/react'; import { ArrowClockwise16Regular, Backspace20Regular, Call20Filled, CallEnd20Filled, CallPause20Filled, CallPause20Regular, Checkmark20Regular, CheckmarkCircle16Regular, ChevronLeft20Regular, ChevronRight20Regular, Circle16Regular, ClosedCaption20Regular, ClosedCaptionOff20Regular, Delete20Regular, Dismiss16Regular, Dismiss20Regular, Edit20Regular, Emoji20Regular, ErrorCircle16Regular, Eye16Regular, HandRight20Regular, HandRightOff20Regular, Mic16Filled, Mic20Filled, Mic20Regular, MicOff16Filled, MicOff16Regular, MicOff20Filled, MicOff20Regular, MicProhibited16Filled, MoreHorizontal20Filled, MoreHorizontal20Regular, Open20Regular, People20Filled, People20Regular, PersonDelete20Regular, PersonVoice20Regular, Pin16Filled, Pin20Filled, Pin20Regular, PinOff20Regular, Play20Regular, Record16Regular, ScaleFill20Regular, ScaleFit20Regular, Send20Filled, Send20Regular, Settings20Filled, Settings20Regular, ShareScreenStart20Filled, ShareScreenStop20Filled, SlideTextEdit16Regular, Speaker220Regular, SpeakerMute16Filled, Star28Filled, Star28Regular, Translate20Regular, Video16Filled, Video20Filled, Video20Regular, VideoBackgroundEffect20Filled, VideoBackgroundEffect20Regular, VideoOff20Filled, VideoPersonStar20Filled, VideoPersonStarOff20Filled, VideoProhibited16Filled, Warning16Regular, WifiWarning20Filled } from '@fluentui/react-icons'; import { PeopleAudience20Regular } from '@fluentui/react-icons'; import { SlideTextCall20Regular, ArrowMaximize20Regular, ArrowMinimize20Regular } from '@fluentui/react-icons'; /* @conditional-compile-remove(rich-text-editor) */ import { TextBold20Regular, TextItalic20Regular, TextUnderlineCharacterU20Regular, TextBulletList20Regular, TextNumberListLtr20Regular, TextIndentDecrease20Regular, TextIndentIncrease20Regular, DividerTall24Regular, TextEditStyle20Regular, TextEditStyle20Filled, Table20Regular, Table20Filled, TableAdd20Regular, TableDismiss20Regular } from '@fluentui/react-icons'; /* @conditional-compile-remove(call-readiness) */ import { Important20Filled, Sparkle20Filled } from '@fluentui/react-icons'; import { VideoProhibited20Filled, MicProhibited20Filled } from '@fluentui/react-icons'; import { ConferenceRoom16Regular, DoorArrowLeft16Regular, DoorArrowRight16Regular } from '@fluentui/react-icons'; /* @conditional-compile-remove(file-sharing-acs) */ import { ArrowDownload20Regular } from '@fluentui/react-icons'; /* @conditional-compile-remove(data-loss-prevention) */ import { Prohibited16Regular } from '@fluentui/react-icons'; /* @conditional-compile-remove(unsupported-browser) */ import { Warning20Filled } from '@fluentui/react-icons'; import { _pxToRem } from "../../../acs-ui-common/src"; import React from 'react'; import { useTheme } from './FluentThemeProvider'; /* @conditional-compile-remove(call-readiness) */ import { sitePermissionIconBackgroundStyle, scaledIconStyles } from './icons.styles'; const WifiWarning16Filled = () => ( // All ErrorBar icons are 16px x 16px (when 1rem = 16 px). // There is no 16px version of this icon in the fluent icon package, so set height and width to 1rem. React.createElement(WifiWarning20Filled, { style: { height: '1rem', width: '1rem' } })); const MoreHorizontal18Regular = () => ( // MoreHorizontal icons are 16px x 16px or 20px x 20px so scaling to get desired size React.createElement("div", { className: mergeStyles({ transform: 'scale(0.9)' }) }, React.createElement(MoreHorizontal20Regular, null))); /* @conditional-compile-remove(call-readiness) */ const SitePermissionMic20Filled = () => { const theme = useTheme(); return (React.createElement(Stack, { horizontalAlign: 'center', styles: sitePermissionIconBackgroundStyle(theme) }, React.createElement("div", { className: mergeStyles(scaledIconStyles(theme)) }, React.createElement(Mic20Filled, null)))); }; /* @conditional-compile-remove(call-readiness) */ const SitePermissionCamera20Filled = () => { const theme = useTheme(); return (React.createElement(Stack, { horizontalAlign: 'center', styles: sitePermissionIconBackgroundStyle(theme) }, React.createElement("div", { className: mergeStyles(scaledIconStyles(theme)) }, React.createElement(Video20Filled, null)))); }; /* @conditional-compile-remove(call-readiness) */ const SitePermissionsMicDenied20Filled = () => { const theme = useTheme(); return (React.createElement(Stack, { horizontalAlign: 'center', styles: sitePermissionIconBackgroundStyle(theme) }, React.createElement("div", { className: mergeStyles(scaledIconStyles(theme)) }, React.createElement(MicProhibited20Filled, null)))); }; /* @conditional-compile-remove(call-readiness) */ const SitePermissionsCameraDenied20Filled = () => { const theme = useTheme(); return (React.createElement(Stack, { horizontalAlign: 'center', styles: sitePermissionIconBackgroundStyle(theme) }, React.createElement("div", { className: mergeStyles(scaledIconStyles(theme)) }, React.createElement(VideoProhibited20Filled, null)))); }; /* @conditional-compile-remove(call-readiness) */ const SitePermissionSparkle20Filled = () => (React.createElement("div", { className: mergeStyles({ transform: 'scale(2)' }) }, React.createElement(Sparkle20Filled, null))); /* @conditional-compile-remove(unsupported-browser) */ const UnsupportedEnvironmentWarning = () => { const theme = useTheme(); return (React.createElement(Stack, { horizontalAlign: 'center', styles: { root: { width: _pxToRem(84), borderRadius: '100%', background: theme.palette.themeLighterAlt, padding: '2rem', margin: 'auto' } } }, React.createElement("div", { className: mergeStyles(scaledIconStyles(theme)) }, React.createElement(Warning20Filled, null)))); }; /* @conditional-compile-remove(call-readiness) */ const BrowserPermissionDenied20Filled = () => { const theme = useTheme(); return (React.createElement(Stack, { horizontalAlign: 'center', styles: sitePermissionIconBackgroundStyle(theme) }, React.createElement("div", { className: mergeStyles(scaledIconStyles(theme)) }, React.createElement(Important20Filled, null)))); }; /* @conditional-compile-remove(data-loss-prevention) */ const DataLossPreventionProhibited16Regular = () => { return React.createElement(Prohibited16Regular, null); }; const GalleryLeftButton = () => { const rtl = useTheme().rtl; return rtl ? React.createElement(ChevronRight20Regular, null) : React.createElement(ChevronLeft20Regular, null); }; const GalleryRightButton = () => { const rtl = useTheme().rtl; return rtl ? React.createElement(ChevronLeft20Regular, null) : React.createElement(ChevronRight20Regular, null); }; const ControlButtonRaiseHandIcon = () => { return React.createElement(HandRight20Regular, null); }; const ControlButtonLowerHandIcon = () => { return React.createElement(HandRightOff20Regular, null); }; /** * The default set of icons that are available to use in the UI components. * * @remark Icons used only in the composites are available in {@link DEFAULT_COMPOSITE_ICONS}. * * @public */ export const DEFAULT_COMPONENT_ICONS = { ChatMessageOptions: React.createElement(MoreHorizontal18Regular, null), ControlButtonCameraOff: React.createElement(VideoOff20Filled, null), ControlButtonCameraOn: React.createElement(Video20Filled, null), ControlButtonEndCall: React.createElement(CallEnd20Filled, null), ControlButtonMicOff: React.createElement(MicOff20Filled, null), ControlButtonMicOn: React.createElement(Mic20Filled, null), ControlButtonOptions: React.createElement(Settings20Filled, null), ControlButtonParticipants: React.createElement(People20Filled, null), ControlButtonParticipantsContextualMenuItem: React.createElement(People20Regular, null), ControlButtonScreenShareStart: React.createElement(ShareScreenStart20Filled, null), ControlButtonScreenShareStop: React.createElement(ShareScreenStop20Filled, null), ControlButtonRaiseHand: React.createElement(ControlButtonRaiseHandIcon, null), ControlButtonLowerHand: React.createElement(ControlButtonLowerHandIcon, null), ControlButtonMicProhibited: React.createElement(MicProhibited20Filled, null), ControlButtonMicProhibitedSmall: React.createElement(MicProhibited16Filled, null), ControlButtonCameraProhibited: React.createElement(VideoProhibited20Filled, null), ControlButtonCameraProhibitedSmall: React.createElement(VideoProhibited16Filled, null), RaiseHandContextualMenuItem: React.createElement(HandRight20Regular, null), LowerHandContextualMenuItem: React.createElement(HandRightOff20Regular, null), ReactionButtonIcon: React.createElement(Emoji20Regular, null), /* @conditional-compile-remove(file-sharing-acs) */ CancelAttachmentUpload: React.createElement(Dismiss16Regular, null), /* @conditional-compile-remove(file-sharing-acs) */ DownloadAttachment: React.createElement(ArrowDownload20Regular, null), OpenAttachment: React.createElement(Open20Regular, null), /* @conditional-compile-remove(file-sharing-acs) */ AttachmentMoreMenu: React.createElement(MoreHorizontal20Filled, null), /* @conditional-compile-remove(data-loss-prevention) */ DataLossPreventionProhibited: React.createElement(DataLossPreventionProhibited16Regular, null), EditBoxCancel: React.createElement(Dismiss20Regular, null), EditBoxSubmit: React.createElement(Checkmark20Regular, null), ErrorBarCallCameraAccessDenied: React.createElement(VideoProhibited16Filled, null), ErrorBarCallCameraAlreadyInUse: React.createElement(VideoProhibited16Filled, null), ErrorBarCallLocalVideoFreeze: React.createElement(WifiWarning16Filled, null), ErrorBarCallMacOsCameraAccessDenied: React.createElement(VideoProhibited16Filled, null), ErrorBarCallMacOsMicrophoneAccessDenied: React.createElement(MicProhibited16Filled, null), ErrorBarCallMicrophoneAccessDenied: React.createElement(MicProhibited16Filled, null), ErrorBarCallMicrophoneMutedBySystem: React.createElement(MicOff16Regular, null), ErrorBarCallMicrophoneUnmutedBySystem: React.createElement(Mic16Filled, null), ErrorBarCallNetworkQualityLow: React.createElement(WifiWarning16Filled, null), ErrorBarCallNoMicrophoneFound: React.createElement(MicProhibited16Filled, null), ErrorBarCallNoSpeakerFound: React.createElement(SpeakerMute16Filled, null), ErrorBarClear: React.createElement(Dismiss16Regular, null), ErrorBarCallVideoRecoveredBySystem: React.createElement(Video16Filled, null), ErrorBarCallVideoStoppedBySystem: React.createElement(VideoProhibited16Filled, null), ErrorBarMutedByRemoteParticipant: React.createElement(MicOff16Regular, null), NotificationBarRecording: React.createElement(Record16Regular, null), NotificationBarBreakoutRoomOpened: React.createElement(DoorArrowRight16Regular, null), NotificationBarBreakoutRoomPromptJoin: React.createElement(DoorArrowRight16Regular, null), NotificationBarBreakoutRoomChanged: React.createElement(DoorArrowRight16Regular, null), NotificationBarBreakoutRoomJoined: React.createElement(ConferenceRoom16Regular, null), NotificationBarBreakoutRoomClosingSoon: React.createElement(DoorArrowLeft16Regular, null), NotificationBarBreakoutRoomClosed: React.createElement(DoorArrowLeft16Regular, null), NotificationBarTranscriptionError: React.createElement(Warning16Regular, null), NotificationBarTranscriptionStartedByYou: React.createElement(SlideTextEdit16Regular, null), HorizontalGalleryLeftButton: React.createElement(GalleryLeftButton, null), HorizontalGalleryRightButton: React.createElement(GalleryRightButton, null), MessageDelivered: React.createElement(CheckmarkCircle16Regular, null), MessageEdit: React.createElement(Edit20Regular, null), MessageFailed: React.createElement(ErrorCircle16Regular, null), MessageRemove: React.createElement(Delete20Regular, null), MessageResend: React.createElement(ArrowClockwise16Regular, null), MessageSeen: React.createElement(Eye16Regular, null), MessageSending: React.createElement(Circle16Regular, null), OptionsCamera: React.createElement(Video20Regular, null), OptionsMic: React.createElement(Mic20Regular, null), OptionsSpeaker: React.createElement(Speaker220Regular, null), ParticipantItemMicOff: React.createElement(MicOff20Regular, null), ParticipantItemOptions: React.createElement(React.Fragment, null), ParticipantItemOptionsHovered: React.createElement(MoreHorizontal20Filled, null), ParticipantItemScreenShareStart: React.createElement(ShareScreenStart20Filled, null), ParticipantItemSpotlighted: React.createElement(VideoPersonStar20Filled, null), HoldCallContextualMenuItem: React.createElement(CallPause20Regular, null), HoldCallButton: React.createElement(CallPause20Filled, null), ResumeCall: React.createElement(Play20Regular, null), SendBoxSend: React.createElement(Send20Regular, null), SendBoxSendHovered: React.createElement(Send20Filled, null), VideoTileMicOff: React.createElement(MicOff16Filled, null), VideoTileCameraOff: React.createElement(VideoProhibited16Filled, null), DialpadBackspace: React.createElement(Backspace20Regular, null), /* @conditional-compile-remove(call-readiness) */ SitePermissionsSparkle: React.createElement(SitePermissionSparkle20Filled, null), /* @conditional-compile-remove(call-readiness) */ SitePermissionCamera: React.createElement(SitePermissionCamera20Filled, null), /* @conditional-compile-remove(call-readiness) */ SitePermissionMic: React.createElement(SitePermissionMic20Filled, null), /* @conditional-compile-remove(call-readiness) */ SitePermissionCameraDenied: React.createElement(SitePermissionsCameraDenied20Filled, null), /* @conditional-compile-remove(call-readiness) */ SitePermissionMicDenied: React.createElement(SitePermissionsMicDenied20Filled, null), /* @conditional-compile-remove(unsupported-browser) */ UnsupportedEnvironmentWarning: React.createElement(UnsupportedEnvironmentWarning, null), /* @conditional-compile-remove(call-readiness) */ BrowserPermissionDeniedError: React.createElement(BrowserPermissionDenied20Filled, null), VideoTilePinned: React.createElement(Pin16Filled, null), ParticipantItemPinned: React.createElement(Pin20Filled, null), VideoTileMoreOptions: React.createElement(MoreHorizontal20Filled, null), VideoTileScaleFit: React.createElement(ScaleFit20Regular, null), VideoTileScaleFill: React.createElement(ScaleFill20Regular, null), PinParticipant: React.createElement(Pin20Regular, null), UnpinParticipant: React.createElement(PinOff20Regular, null), SplitButtonPrimaryActionCameraOn: React.createElement(Video20Filled, null), SplitButtonPrimaryActionCameraOff: React.createElement(VideoOff20Filled, null), SplitButtonPrimaryActionMicUnmuted: React.createElement(Mic20Filled, null), SplitButtonPrimaryActionMicMuted: React.createElement(MicOff20Filled, null), VerticalGalleryLeftButton: React.createElement(GalleryLeftButton, null), VerticalGalleryRightButton: React.createElement(GalleryRightButton, null), ControlButtonVideoEffectsOption: React.createElement(VideoBackgroundEffect20Regular, null), ConfigurationScreenVideoEffectsButton: React.createElement(VideoBackgroundEffect20Filled, null), CaptionsIcon: React.createElement(ClosedCaption20Regular, null), CaptionsOffIcon: React.createElement(ClosedCaptionOff20Regular, null), CaptionsSettingsIcon: React.createElement(Settings20Regular, null), ChangeSpokenLanguageIcon: React.createElement(PersonVoice20Regular, null), ChangeCaptionLanguageIcon: React.createElement(Translate20Regular, null), ContextMenuCameraIcon: React.createElement(Video20Regular, null), ContextMenuMicIcon: React.createElement(Mic20Regular, null), ContextMenuSpeakerIcon: React.createElement(Speaker220Regular, null), ContextMenuRemoveParticipant: React.createElement(PersonDelete20Regular, null), SurveyStarIcon: React.createElement(Star28Regular, null), SurveyStarIconFilled: React.createElement(Star28Filled, null), StartSpotlightContextualMenuItem: React.createElement(VideoPersonStar20Filled, null), StopSpotlightContextualMenuItem: React.createElement(VideoPersonStarOff20Filled, null), VideoTileSpotlighted: React.createElement(VideoPersonStar20Filled, { style: { height: '16px', width: '16px' } }), /* @conditional-compile-remove(rich-text-editor) */ RichTextBoldButtonIcon: React.createElement(TextBold20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextItalicButtonIcon: React.createElement(TextItalic20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextUnderlineButtonIcon: React.createElement(TextUnderlineCharacterU20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextBulletListButtonIcon: React.createElement(TextBulletList20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextNumberListButtonIcon: React.createElement(TextNumberListLtr20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextIndentDecreaseButtonIcon: React.createElement(TextIndentDecrease20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextIndentIncreaseButtonIcon: React.createElement(TextIndentIncrease20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextDividerIcon: React.createElement(DividerTall24Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextEditorButtonIcon: React.createElement(TextEditStyle20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextEditorButtonIconFilled: React.createElement(TextEditStyle20Filled, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextInsertTableRegularIcon: React.createElement(Table20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextInsertTableFilledIcon: React.createElement(Table20Filled, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextTableInsertMenuIcon: React.createElement(TableAdd20Regular, null), /* @conditional-compile-remove(rich-text-editor) */ RichTextTableDeleteMenuIcon: React.createElement(TableDismiss20Regular, null), ContextualMenuMicMutedIcon: React.createElement(MicOff20Regular, null), IncomingCallNotificationRejectIcon: React.createElement(CallEnd20Filled, null), IncomingCallNotificationAcceptIcon: React.createElement(Call20Filled, null), IncomingCallNotificationAcceptWithVideoIcon: React.createElement(Video20Filled, null), NotificationBarTogetherModeIcon: React.createElement(PeopleAudience20Regular, null), RealTimeTextIcon: React.createElement(SlideTextCall20Regular, null), ExpandIcon: React.createElement(ArrowMaximize20Regular, null), MinimizeIcon: React.createElement(ArrowMinimize20Regular, null) }; //# sourceMappingURL=icons.js.map