@100mslive/roomkit-react 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/Accordion/Accordion.d.ts +964 -0
- package/dist/Accordion/index.d.ts +979 -0
- package/dist/ActiveSpeakerView-H3VYXANB.js +39 -0
- package/dist/ActiveSpeakerView-H3VYXANB.js.map +7 -0
- package/dist/ActiveSpeakerView-REZLWPPI.css +11 -0
- package/dist/ActiveSpeakerView-REZLWPPI.css.map +7 -0
- package/dist/AudioLevel/AudioLevel.d.ts +8 -0
- package/dist/AudioLevel/index.d.ts +1 -0
- package/dist/Avatar/Avatar.d.ts +487 -0
- package/dist/Avatar/getAvatarBg.d.ts +7 -0
- package/dist/Avatar/index.d.ts +1 -0
- package/dist/Button/Button.d.ts +488 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/Checkbox/Checkbox.d.ts +958 -0
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Collapsible/Collapsible.d.ts +1434 -0
- package/dist/Collapsible/index.d.ts +1 -0
- package/dist/Divider/Divider.d.ts +958 -0
- package/dist/Divider/index.d.ts +1 -0
- package/dist/Dropdown/Dropdown.d.ts +5728 -0
- package/dist/Dropdown/index.d.ts +1 -0
- package/dist/Fieldset/Fieldset.d.ts +477 -0
- package/dist/Fieldset/index.d.ts +1 -0
- package/dist/Footer/Footer.d.ts +3834 -0
- package/dist/Footer/index.d.ts +1 -0
- package/dist/HLSView-3RDXRV7Y.js +689 -0
- package/dist/HLSView-3RDXRV7Y.js.map +7 -0
- package/dist/HLSView-6BVBCQM7.css +11 -0
- package/dist/HLSView-6BVBCQM7.css.map +7 -0
- package/dist/IconButton/IconButton.d.ts +479 -0
- package/dist/IconButton/index.d.ts +1 -0
- package/dist/Input/Input.d.ts +2917 -0
- package/dist/Input/index.d.ts +1 -0
- package/dist/Label/Label.d.ts +479 -0
- package/dist/Label/index.d.ts +1 -0
- package/dist/Layout/Box.d.ts +477 -0
- package/dist/Layout/Flex.d.ts +482 -0
- package/dist/Layout/index.d.ts +2 -0
- package/dist/Link/Link.d.ts +489 -0
- package/dist/Link/index.d.ts +2 -0
- package/dist/Loading/Loading.d.ts +14 -0
- package/dist/Loading/index.d.ts +1 -0
- package/dist/Modal/Dialog.d.ts +3826 -0
- package/dist/Modal/DialogContent.d.ts +3343 -0
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Pagination/StyledPagination.d.ts +1918 -0
- package/dist/Pagination/index.d.ts +1 -0
- package/dist/PinnedTrackView-453PELNU.js +70 -0
- package/dist/PinnedTrackView-453PELNU.js.map +7 -0
- package/dist/PinnedTrackView-QQ5FDXJX.css +11 -0
- package/dist/PinnedTrackView-QQ5FDXJX.css.map +7 -0
- package/dist/Popover/index.d.ts +1436 -0
- package/dist/Progress/index.d.ts +957 -0
- package/dist/QRCode/QRCode.d.ts +3 -0
- package/dist/QRCode/index.d.ts +1 -0
- package/dist/RadioGroup/RadioGroup.d.ts +1435 -0
- package/dist/RadioGroup/index.d.ts +1 -0
- package/dist/ReactSelect/ReactSelect.d.ts +4778 -0
- package/dist/ReactSelect/index.d.ts +1 -0
- package/dist/Select/Select.d.ts +1437 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/Slider/Slider.d.ts +488 -0
- package/dist/Slider/index.d.ts +1 -0
- package/dist/Stats/Stats.d.ts +19 -0
- package/dist/Stats/StyledStats.d.ts +2872 -0
- package/dist/Stats/formatBytes.d.ts +1 -0
- package/dist/Stats/index.d.ts +1 -0
- package/dist/Switch/Switch.d.ts +482 -0
- package/dist/Switch/index.d.ts +1 -0
- package/dist/Tabs/Tabs.d.ts +1912 -0
- package/dist/Tabs/index.d.ts +1 -0
- package/dist/Text/Text.d.ts +605 -0
- package/dist/Text/index.d.ts +1 -0
- package/dist/Theme/ThemeProvider.d.ts +397 -0
- package/dist/Theme/base.config.d.ts +417 -0
- package/dist/Theme/index.d.ts +3 -0
- package/dist/Theme/stitches.config.d.ts +4702 -0
- package/dist/Theme/themes.d.ts +64 -0
- package/dist/Theme/useSSR.d.ts +6 -0
- package/dist/TileMenu/StyledMenuTile.d.ts +3351 -0
- package/dist/TileMenu/TileMenu.d.ts +6 -0
- package/dist/TileMenu/index.d.ts +1 -0
- package/dist/Toast/Toast.d.ts +2881 -0
- package/dist/Toast/index.d.ts +1 -0
- package/dist/Tooltip/Tooltip.d.ts +14 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/Video/Video.d.ts +499 -0
- package/dist/Video/index.d.ts +1 -0
- package/dist/VideoList/StyledVideoList.d.ts +1438 -0
- package/dist/VideoList/index.d.ts +2 -0
- package/dist/VideoList/videoListUtils.d.ts +1 -0
- package/dist/VideoTile/StyledVideoTile.d.ts +4309 -0
- package/dist/VideoTile/index.d.ts +1 -0
- package/dist/VirtualBackground-LHYBWUT5.js +158 -0
- package/dist/VirtualBackground-LHYBWUT5.js.map +7 -0
- package/dist/chunk-7YUYZ64D.js +6843 -0
- package/dist/chunk-7YUYZ64D.js.map +7 -0
- package/dist/chunk-HCAGFNXW.js +8270 -0
- package/dist/chunk-HCAGFNXW.js.map +7 -0
- package/dist/chunk-KYYP6ZVK.js +907 -0
- package/dist/chunk-KYYP6ZVK.js.map +7 -0
- package/dist/chunk-ULXGBUSC.js +65 -0
- package/dist/chunk-ULXGBUSC.js.map +7 -0
- package/dist/chunk-XRJXE6UO.js +243 -0
- package/dist/chunk-XRJXE6UO.js.map +7 -0
- package/dist/conference-IDNRO4WK.js +3812 -0
- package/dist/conference-IDNRO4WK.js.map +7 -0
- package/dist/conference-KN6OKGDU.css +11 -0
- package/dist/conference-KN6OKGDU.css.map +7 -0
- package/dist/fixtures/chats.d.ts +4 -0
- package/dist/fixtures/peers.d.ts +3 -0
- package/dist/fixtures/tracks.d.ts +2 -0
- package/dist/index.cjs.css +11 -0
- package/dist/index.cjs.css.map +7 -0
- package/dist/index.cjs.js +22987 -0
- package/dist/index.cjs.js.map +7 -0
- package/dist/index.css +11 -0
- package/dist/index.css.map +7 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +133 -0
- package/dist/index.js.map +7 -0
- package/dist/meta.cjs.json +13085 -0
- package/dist/meta.esbuild.json +13693 -0
- package/dist/transcription-BTSB7FZH.js +356 -0
- package/dist/transcription-BTSB7FZH.js.map +7 -0
- package/dist/utils/animations.d.ts +92 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/styles.d.ts +21 -0
- package/package.json +116 -0
- package/src/Accordion/Accordion.stories.tsx +50 -0
- package/src/Accordion/Accordion.tsx +88 -0
- package/src/Accordion/index.ts +8 -0
- package/src/AudioLevel/AudioLevel.tsx +34 -0
- package/src/AudioLevel/index.ts +1 -0
- package/src/Avatar/Avatar.stories.tsx +33 -0
- package/src/Avatar/Avatar.tsx +55 -0
- package/src/Avatar/getAvatarBg.ts +46 -0
- package/src/Avatar/index.ts +1 -0
- package/src/Button/Button.mdx +43 -0
- package/src/Button/Button.stories.tsx +52 -0
- package/src/Button/Button.tsx +144 -0
- package/src/Button/index.tsx +1 -0
- package/src/Chat/Chat.mdx +39 -0
- package/src/Chat/Chat.stories.tsx +39 -0
- package/src/Checkbox/Checkbox.stories.tsx +61 -0
- package/src/Checkbox/Checkbox.tsx +33 -0
- package/src/Checkbox/index.tsx +1 -0
- package/src/Collapsible/Collapsible.tsx +34 -0
- package/src/Collapsible/index.tsx +1 -0
- package/src/Divider/Divider.tsx +45 -0
- package/src/Divider/HorizontalDivider.stories.tsx +34 -0
- package/src/Divider/VerticalDivider.stories.tsx +40 -0
- package/src/Divider/index.ts +1 -0
- package/src/Dropdown/Dropdown.stories.tsx +94 -0
- package/src/Dropdown/Dropdown.tsx +142 -0
- package/src/Dropdown/index.tsx +1 -0
- package/src/Fieldset/Fieldset.stories.tsx +29 -0
- package/src/Fieldset/Fieldset.tsx +11 -0
- package/src/Fieldset/index.tsx +1 -0
- package/src/Footer/Footer.stories.tsx +61 -0
- package/src/Footer/Footer.tsx +47 -0
- package/src/Footer/index.tsx +1 -0
- package/src/IconButton/IconButton.tsx +45 -0
- package/src/IconButton/index.tsx +1 -0
- package/src/Icons/Icons.stories.mdx +10 -0
- package/src/Icons/IconsList.jsx +17 -0
- package/src/Input/Input.stories.tsx +25 -0
- package/src/Input/Input.tsx +105 -0
- package/src/Input/PasswordInput.stories.tsx +53 -0
- package/src/Input/index.tsx +1 -0
- package/src/Introduction/Integrating.stories.mdx +100 -0
- package/src/Introduction/Introduction.stories.mdx +9 -0
- package/src/Label/Label.tsx +8 -0
- package/src/Label/index.ts +1 -0
- package/src/Layout/Box.tsx +3 -0
- package/src/Layout/Flex.tsx +76 -0
- package/src/Layout/index.tsx +2 -0
- package/src/Link/Link.stories.tsx +18 -0
- package/src/Link/Link.tsx +54 -0
- package/src/Link/index.tsx +2 -0
- package/src/Loading/Loading.mdx +15 -0
- package/src/Loading/Loading.stories.tsx +37 -0
- package/src/Loading/Loading.tsx +33 -0
- package/src/Loading/index.ts +1 -0
- package/src/Modal/Dialog.mdx +19 -0
- package/src/Modal/Dialog.stories.tsx +68 -0
- package/src/Modal/Dialog.tsx +26 -0
- package/src/Modal/DialogContent.tsx +63 -0
- package/src/Modal/index.ts +1 -0
- package/src/Pagination/StyledPagination.stories.tsx +80 -0
- package/src/Pagination/StyledPagination.tsx +68 -0
- package/src/Pagination/index.tsx +1 -0
- package/src/Popover/Popover.mdx +9 -0
- package/src/Popover/Popover.stories.tsx +95 -0
- package/src/Popover/index.tsx +26 -0
- package/src/Prebuilt/App.jsx +273 -0
- package/src/Prebuilt/AppContext.jsx +21 -0
- package/src/Prebuilt/IconButton.jsx +19 -0
- package/src/Prebuilt/Prebuilt.stories.tsx +20 -0
- package/src/Prebuilt/common/PeersSorter.js +89 -0
- package/src/Prebuilt/common/constants.js +208 -0
- package/src/Prebuilt/common/hooks.js +47 -0
- package/src/Prebuilt/common/roles.js +4 -0
- package/src/Prebuilt/common/useSortedPeers.js +28 -0
- package/src/Prebuilt/common/utils.js +91 -0
- package/src/Prebuilt/components/AppData/AppData.jsx +189 -0
- package/src/Prebuilt/components/AppData/useAppConfig.js +7 -0
- package/src/Prebuilt/components/AppData/useAppLayout.js +6 -0
- package/src/Prebuilt/components/AppData/useChatState.js +18 -0
- package/src/Prebuilt/components/AppData/useSidepane.js +49 -0
- package/src/Prebuilt/components/AppData/useUISettings.js +164 -0
- package/src/Prebuilt/components/AudioLevel/BeamSpeakerLabelsLogging.jsx +16 -0
- package/src/Prebuilt/components/AudioVideoToggle.jsx +67 -0
- package/src/Prebuilt/components/AuthToken.jsx +133 -0
- package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.jsx +96 -0
- package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.stories.tsx +46 -0
- package/src/Prebuilt/components/Chat/Chat.jsx +155 -0
- package/src/Prebuilt/components/Chat/ChatBody.jsx +370 -0
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +150 -0
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +67 -0
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +162 -0
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +30 -0
- package/src/Prebuilt/components/Chat/useUnreadCount.js +17 -0
- package/src/Prebuilt/components/Connection/ConnectionIndicator.jsx +80 -0
- package/src/Prebuilt/components/Connection/TileConnection.jsx +40 -0
- package/src/Prebuilt/components/Connection/connectionQualityUtils.js +39 -0
- package/src/Prebuilt/components/EmojiReaction.jsx +138 -0
- package/src/Prebuilt/components/ErrorBoundary.jsx +105 -0
- package/src/Prebuilt/components/FirstPersonDisplay.jsx +50 -0
- package/src/Prebuilt/components/Footer/ChatToggle.jsx +27 -0
- package/src/Prebuilt/components/Footer/ConferencingFooter.jsx +104 -0
- package/src/Prebuilt/components/Footer/StreamingFooter.jsx +71 -0
- package/src/Prebuilt/components/Footer.jsx +8 -0
- package/src/Prebuilt/components/FullPageProgress.jsx +11 -0
- package/src/Prebuilt/components/GoLiveButton.jsx +45 -0
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +21 -0
- package/src/Prebuilt/components/HMSVideo/FullscreenButton.jsx +18 -0
- package/src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.jsx +35 -0
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +82 -0
- package/src/Prebuilt/components/HMSVideo/HMSVIdeoUtils.js +27 -0
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +11 -0
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +13 -0
- package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +77 -0
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +31 -0
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +39 -0
- package/src/Prebuilt/components/HMSVideo/index.js +19 -0
- package/src/Prebuilt/components/Header/AdditionalRoomState.jsx +217 -0
- package/src/Prebuilt/components/Header/AmbientMusic.jsx +88 -0
- package/src/Prebuilt/components/Header/ConferencingHeader.jsx +29 -0
- package/src/Prebuilt/components/Header/Header.jsx +8 -0
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +41 -0
- package/src/Prebuilt/components/Header/ParticipantFilter.jsx +91 -0
- package/src/Prebuilt/components/Header/ParticipantList.jsx +337 -0
- package/src/Prebuilt/components/Header/StreamActions.jsx +225 -0
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +55 -0
- package/src/Prebuilt/components/Header/index.jsx +1 -0
- package/src/Prebuilt/components/HlsStatsOverlay.jsx +101 -0
- package/src/Prebuilt/components/Image.jsx +7 -0
- package/src/Prebuilt/components/Input/KeyboardInputManager.js +107 -0
- package/src/Prebuilt/components/LeaveRoom.jsx +202 -0
- package/src/Prebuilt/components/MetaActions.jsx +45 -0
- package/src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx +139 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +92 -0
- package/src/Prebuilt/components/MoreSettings/ChangeSelfRole.jsx +67 -0
- package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +106 -0
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.jsx +29 -0
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +225 -0
- package/src/Prebuilt/components/MoreSettings/MuteAllModal.jsx +90 -0
- package/src/Prebuilt/components/Notifications/AutoplayBlockedModal.jsx +38 -0
- package/src/Prebuilt/components/Notifications/InitErrorModal.jsx +39 -0
- package/src/Prebuilt/components/Notifications/MessageNotifications.jsx +25 -0
- package/src/Prebuilt/components/Notifications/Notifications.jsx +151 -0
- package/src/Prebuilt/components/Notifications/PeerNotifications.jsx +45 -0
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +67 -0
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +69 -0
- package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.jsx +51 -0
- package/src/Prebuilt/components/Notifications/TrackNotifications.jsx +19 -0
- package/src/Prebuilt/components/Notifications/TrackUnmuteModal.jsx +49 -0
- package/src/Prebuilt/components/Notifications/index.jsx +1 -0
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +82 -0
- package/src/Prebuilt/components/PIP/PIPManager.js +296 -0
- package/src/Prebuilt/components/PIP/SetupMediaSession.js +60 -0
- package/src/Prebuilt/components/PIP/index.jsx +11 -0
- package/src/Prebuilt/components/PIP/pip.test.js +72 -0
- package/src/Prebuilt/components/PIP/pipUtils.js +183 -0
- package/src/Prebuilt/components/Pagination.jsx +29 -0
- package/src/Prebuilt/components/Playlist/Playlist.jsx +129 -0
- package/src/Prebuilt/components/Playlist/PlaylistControls.jsx +172 -0
- package/src/Prebuilt/components/Playlist/PlaylistItem.jsx +51 -0
- package/src/Prebuilt/components/Playlist/VideoPlayer.jsx +95 -0
- package/src/Prebuilt/components/PostLeave.jsx +76 -0
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +51 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +196 -0
- package/src/Prebuilt/components/Preview/PreviewName.jsx +37 -0
- package/src/Prebuilt/components/RoleChangeModal.jsx +185 -0
- package/src/Prebuilt/components/RoleChangeRequestModal.jsx +26 -0
- package/src/Prebuilt/components/ScreenShare.jsx +45 -0
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +45 -0
- package/src/Prebuilt/components/ScreenshareHintModal.jsx +37 -0
- package/src/Prebuilt/components/ScreenshareTile.jsx +91 -0
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +220 -0
- package/src/Prebuilt/components/Settings/LayoutSettings.jsx +91 -0
- package/src/Prebuilt/components/Settings/NotificationSettings.jsx +61 -0
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +171 -0
- package/src/Prebuilt/components/Settings/StartRecording.jsx +130 -0
- package/src/Prebuilt/components/Settings/SwitchWithLabel.jsx +40 -0
- package/src/Prebuilt/components/Settings/common.js +15 -0
- package/src/Prebuilt/components/ShareMenuIcon.jsx +26 -0
- package/src/Prebuilt/components/StatsForNerds.jsx +250 -0
- package/src/Prebuilt/components/Streaming/Common.jsx +132 -0
- package/src/Prebuilt/components/Streaming/HLSStreaming.jsx +226 -0
- package/src/Prebuilt/components/Streaming/RTMPIcon.jsx +24 -0
- package/src/Prebuilt/components/Streaming/RTMPStreaming.jsx +336 -0
- package/src/Prebuilt/components/Streaming/ResolutionInput.jsx +88 -0
- package/src/Prebuilt/components/Streaming/StreamingLanding.jsx +76 -0
- package/src/Prebuilt/components/TileMenu.jsx +275 -0
- package/src/Prebuilt/components/Toast/Toast.jsx +17 -0
- package/src/Prebuilt/components/Toast/ToastBatcher.js +57 -0
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +134 -0
- package/src/Prebuilt/components/Toast/ToastContainer.jsx +30 -0
- package/src/Prebuilt/components/Toast/ToastManager.js +44 -0
- package/src/Prebuilt/components/VideoList.jsx +101 -0
- package/src/Prebuilt/components/VideoTile.jsx +177 -0
- package/src/Prebuilt/components/conference.jsx +164 -0
- package/src/Prebuilt/components/gridView.jsx +85 -0
- package/src/Prebuilt/components/hooks/useDropdownList.jsx +23 -0
- package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +6 -0
- package/src/Prebuilt/components/hooks/useFeatures.js +22 -0
- package/src/Prebuilt/components/hooks/useFullscreen.js +43 -0
- package/src/Prebuilt/components/hooks/useMetadata.jsx +52 -0
- package/src/Prebuilt/components/hooks/useNavigation.js +19 -0
- package/src/Prebuilt/components/hooks/usePlaylist.js +25 -0
- package/src/Prebuilt/components/hooks/usePlaylistMusic.js +35 -0
- package/src/Prebuilt/components/hooks/useScreenshareAudio.js +28 -0
- package/src/Prebuilt/components/hooks/useSetPinnedMessage.js +38 -0
- package/src/Prebuilt/components/hooks/useSkipPreview.jsx +20 -0
- package/src/Prebuilt/components/hooks/useUserPreferences.jsx +25 -0
- package/src/Prebuilt/components/init/Init.jsx +58 -0
- package/src/Prebuilt/components/init/initUtils.js +90 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +29 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +108 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx +31 -0
- package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +32 -0
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +233 -0
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +89 -0
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +85 -0
- package/src/Prebuilt/components/peerTileUtils.jsx +27 -0
- package/src/Prebuilt/hms.js +7 -0
- package/src/Prebuilt/images/first_person.png +0 -0
- package/src/Prebuilt/index.d.ts +15 -0
- package/src/Prebuilt/index.js +2 -0
- package/src/Prebuilt/layouts/ActiveSpeakerView.jsx +34 -0
- package/src/Prebuilt/layouts/EmbedView.jsx +141 -0
- package/src/Prebuilt/layouts/HLSView.jsx +290 -0
- package/src/Prebuilt/layouts/InsetView.jsx +222 -0
- package/src/Prebuilt/layouts/NonPublisherView.jsx +51 -0
- package/src/Prebuilt/layouts/PDFView.jsx +122 -0
- package/src/Prebuilt/layouts/PinnedTrackView.jsx +59 -0
- package/src/Prebuilt/layouts/SidePane.jsx +51 -0
- package/src/Prebuilt/layouts/WaitingView.jsx +51 -0
- package/src/Prebuilt/layouts/WhiteboardView.jsx +66 -0
- package/src/Prebuilt/layouts/mainGridView.jsx +98 -0
- package/src/Prebuilt/layouts/mainView.jsx +113 -0
- package/src/Prebuilt/layouts/screenShareView.jsx +185 -0
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +132 -0
- package/src/Prebuilt/plugins/RemoteStopScreenshare.jsx +18 -0
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +90 -0
- package/src/Prebuilt/plugins/VirtualBackground/vbutils.js +66 -0
- package/src/Prebuilt/plugins/confetti.jsx +60 -0
- package/src/Prebuilt/plugins/transcription/Transcriber.js +216 -0
- package/src/Prebuilt/plugins/transcription/TranscriptionButton.jsx +138 -0
- package/src/Prebuilt/plugins/transcription/index.jsx +1 -0
- package/src/Prebuilt/plugins/whiteboard/PusherCommunicationProvider.js +110 -0
- package/src/Prebuilt/plugins/whiteboard/README.md +29 -0
- package/src/Prebuilt/plugins/whiteboard/ToggleWhiteboard.jsx +43 -0
- package/src/Prebuilt/plugins/whiteboard/Whiteboard.css +12 -0
- package/src/Prebuilt/plugins/whiteboard/Whiteboard.jsx +11 -0
- package/src/Prebuilt/plugins/whiteboard/WhiteboardEvents.js +8 -0
- package/src/Prebuilt/plugins/whiteboard/index.js +3 -0
- package/src/Prebuilt/plugins/whiteboard/useMultiplayerState.js +212 -0
- package/src/Prebuilt/plugins/whiteboard/useWhiteboardMetadata.js +47 -0
- package/src/Prebuilt/primitives/DialogContent.jsx +280 -0
- package/src/Prebuilt/primitives/DropdownTrigger.jsx +46 -0
- package/src/Prebuilt/services/FeatureFlags.jsx +47 -0
- package/src/Prebuilt/services/tokenService.js +49 -0
- package/src/Progress/index.tsx +17 -0
- package/src/QRCode/QRCode.mdx +9 -0
- package/src/QRCode/QRCode.stories.tsx +29 -0
- package/src/QRCode/QRCode.tsx +6 -0
- package/src/QRCode/index.tsx +1 -0
- package/src/RadioGroup/RadioGroup.stories.tsx +32 -0
- package/src/RadioGroup/RadioGroup.tsx +33 -0
- package/src/RadioGroup/index.tsx +1 -0
- package/src/ReactSelect/ReactSelect.stories.tsx +83 -0
- package/src/ReactSelect/ReactSelect.tsx +97 -0
- package/src/ReactSelect/index.ts +1 -0
- package/src/Select/Select.stories.tsx +33 -0
- package/src/Select/Select.tsx +63 -0
- package/src/Select/index.ts +1 -0
- package/src/Slider/Slider.stories.tsx +21 -0
- package/src/Slider/Slider.tsx +70 -0
- package/src/Slider/index.ts +1 -0
- package/src/Stats/Stats.tsx +211 -0
- package/src/Stats/StyledStats.tsx +57 -0
- package/src/Stats/formatBytes.ts +19 -0
- package/src/Stats/index.tsx +1 -0
- package/src/Switch/Switch.mdx +11 -0
- package/src/Switch/Switch.stories.tsx +46 -0
- package/src/Switch/Switch.tsx +52 -0
- package/src/Switch/index.ts +1 -0
- package/src/Tabs/Tabs.stories.tsx +77 -0
- package/src/Tabs/Tabs.tsx +41 -0
- package/src/Tabs/index.tsx +1 -0
- package/src/Text/Text.stories.tsx +21 -0
- package/src/Text/Text.tsx +149 -0
- package/src/Text/index.tsx +1 -0
- package/src/Theme/Theme.stories.mdx +8 -0
- package/src/Theme/ThemeProvider.tsx +104 -0
- package/src/Theme/ThemeStory.jsx +58 -0
- package/src/Theme/base.config.ts +264 -0
- package/src/Theme/index.tsx +3 -0
- package/src/Theme/stitches.config.ts +100 -0
- package/src/Theme/themes.ts +70 -0
- package/src/Theme/useSSR.tsx +24 -0
- package/src/TileMenu/StyledMenuTile.tsx +101 -0
- package/src/TileMenu/TileMenu.tsx +96 -0
- package/src/TileMenu/index.tsx +1 -0
- package/src/Toast/AppToast.stories.tsx +56 -0
- package/src/Toast/Toast.mdx +19 -0
- package/src/Toast/Toast.stories.tsx +57 -0
- package/src/Toast/Toast.tsx +168 -0
- package/src/Toast/index.tsx +1 -0
- package/src/Tooltip/Tooltip.stories.tsx +62 -0
- package/src/Tooltip/Tooltip.tsx +79 -0
- package/src/Tooltip/index.ts +1 -0
- package/src/Video/UseVideo.mdx +22 -0
- package/src/Video/UseVideo.stories.tsx +26 -0
- package/src/Video/Video.mdx +24 -0
- package/src/Video/Video.stories.tsx +27 -0
- package/src/Video/Video.tsx +61 -0
- package/src/Video/index.tsx +1 -0
- package/src/VideoList/StyledVideoList.tsx +39 -0
- package/src/VideoList/VideoList.stories.tsx +92 -0
- package/src/VideoList/index.tsx +2 -0
- package/src/VideoList/videoListUtils.tsx +20 -0
- package/src/VideoTile/StyledVideoTile.tsx +148 -0
- package/src/VideoTile/VideoTile.mdx +28 -0
- package/src/VideoTile/VideoTile.stories.tsx +32 -0
- package/src/VideoTile/index.tsx +1 -0
- package/src/fixtures/chats.ts +25 -0
- package/src/fixtures/peers.ts +24 -0
- package/src/fixtures/tracks.ts +11 -0
- package/src/index.ts +38 -0
- package/src/store/SetupFakeStore.ts +33 -0
- package/src/store/StorybookSDK.ts +229 -0
- package/src/utils/animations.ts +90 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/styles.ts +22 -0
@@ -0,0 +1,264 @@
|
|
1
|
+
import type * as Stitches from '@stitches/react';
|
2
|
+
import { defaultThemeMap as defaultStitchesThemeMap } from '@stitches/react';
|
3
|
+
|
4
|
+
export const baseConfig = {
|
5
|
+
theme: {
|
6
|
+
colors: {
|
7
|
+
white: '#FFFFFF',
|
8
|
+
black: '#000000',
|
9
|
+
transparent: '#00000000',
|
10
|
+
orange: '#F69133',
|
11
|
+
cyan: '#8FF5FB',
|
12
|
+
tamarind: '#F79133',
|
13
|
+
yellow: '#FAC919',
|
14
|
+
twinYellow: '#ECC502',
|
15
|
+
green: '#00AE63',
|
16
|
+
darkgreen: '37F28D',
|
17
|
+
purple: '#6554C0',
|
18
|
+
borderDefault: '#1B1F26',
|
19
|
+
borderLight: '#2D3440',
|
20
|
+
borderAccent: '#2471ED',
|
21
|
+
success: '#36B37E',
|
22
|
+
error: '#CC525F',
|
23
|
+
errorTint: '#ED4C5AE6',
|
24
|
+
warning: '#FFAB00',
|
25
|
+
brandLight: '#74AAFF',
|
26
|
+
brandDefault: '#2F80FF',
|
27
|
+
brandDark: '#0B326F',
|
28
|
+
brandDisabled: '#D8E7FF',
|
29
|
+
grayLight: '#B0C3DB',
|
30
|
+
grayDefault: '#657080',
|
31
|
+
grayDark: '#303740',
|
32
|
+
secondaryGray: '#242A33',
|
33
|
+
grayDisabled: '#DCE4EF',
|
34
|
+
menuBg: '$grayDark',
|
35
|
+
textHighEmp: '#F5F9FFF2',
|
36
|
+
textMedEmp: '#E0ECFFCC',
|
37
|
+
textDisabled: '#C3D0E580',
|
38
|
+
|
39
|
+
// text variants when bg is accent (blue)
|
40
|
+
// same for both themes
|
41
|
+
textAccentHigh: '#FFFFFFFA',
|
42
|
+
textAccentMedium: '#FFFFFFB8',
|
43
|
+
textAccentDisabled: '#FFFFFF7A',
|
44
|
+
|
45
|
+
surfaceDefault: '#14171C',
|
46
|
+
surfaceLight: '#1D2229',
|
47
|
+
surfaceLighter: '#272E38',
|
48
|
+
surfaceDark: '#0F1115',
|
49
|
+
|
50
|
+
backgroundDefault: '#0B0D0F',
|
51
|
+
backgroundDark: '#090B0D',
|
52
|
+
backgroundDarker: '#040405',
|
53
|
+
|
54
|
+
primaryLight: '#66A1FF',
|
55
|
+
primaryDefault: '#2471ED',
|
56
|
+
primaryDark: '#143466',
|
57
|
+
primaryDisabled: '#3666B2',
|
58
|
+
secondaryLight: '#6B7D99',
|
59
|
+
secondaryDefault: '#475366',
|
60
|
+
secondaryDark: '#2D3440',
|
61
|
+
secondaryDisabled: '#242A33',
|
62
|
+
errorDefault: '#CC525F',
|
63
|
+
errorLight: '#D87983',
|
64
|
+
errorDark: '#9D2F3B',
|
65
|
+
errorDisabled: '#621D24',
|
66
|
+
},
|
67
|
+
shadows: {
|
68
|
+
sm: '0 0 4px 0 #0000004D',
|
69
|
+
md: '0 0 8px 0 #0000004D',
|
70
|
+
},
|
71
|
+
fonts: {
|
72
|
+
sans: 'Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif',
|
73
|
+
},
|
74
|
+
fontSizes: {
|
75
|
+
h1: '6rem',
|
76
|
+
h2: '3.75rem',
|
77
|
+
h3: '3rem',
|
78
|
+
h4: '2.125rem',
|
79
|
+
h5: '1.5rem',
|
80
|
+
h6: '1.25rem',
|
81
|
+
tiny: '0.625rem',
|
82
|
+
xs: '0.75rem',
|
83
|
+
sm: '0.875rem',
|
84
|
+
md: '1rem',
|
85
|
+
lg: '1.125rem',
|
86
|
+
},
|
87
|
+
fontWeights: {
|
88
|
+
semiBold: 600,
|
89
|
+
medium: 500,
|
90
|
+
regular: 400,
|
91
|
+
},
|
92
|
+
lineHeights: {
|
93
|
+
h1: '5.75rem',
|
94
|
+
h2: '3.5rem',
|
95
|
+
h3: '3.25rem',
|
96
|
+
h4: '2.5rem',
|
97
|
+
h5: '2rem',
|
98
|
+
h6: '1.5rem',
|
99
|
+
tiny: '1rem',
|
100
|
+
xs: '1rem',
|
101
|
+
sm: '1.25rem',
|
102
|
+
md: '1.5rem',
|
103
|
+
},
|
104
|
+
radii: {
|
105
|
+
'0': '0.25rem',
|
106
|
+
'1': '0.5rem',
|
107
|
+
'2': '0.75rem',
|
108
|
+
'3': '1rem',
|
109
|
+
'4': '1.5rem',
|
110
|
+
round: '100rem',
|
111
|
+
},
|
112
|
+
space: {
|
113
|
+
0: '0rem',
|
114
|
+
xs: '0.5rem',
|
115
|
+
sm: '0.75rem',
|
116
|
+
md: '1rem',
|
117
|
+
lg: '1.25rem',
|
118
|
+
xl: '2.25rem',
|
119
|
+
px: '1px',
|
120
|
+
1: '0.125rem',
|
121
|
+
2: '0.25rem',
|
122
|
+
3: '0.375rem',
|
123
|
+
4: '0.5rem',
|
124
|
+
5: '0.625rem',
|
125
|
+
6: '0.75rem',
|
126
|
+
7: '0.875rem',
|
127
|
+
8: '1rem',
|
128
|
+
9: '1.25rem',
|
129
|
+
10: '1.5rem',
|
130
|
+
11: '1.75rem',
|
131
|
+
12: '2rem',
|
132
|
+
13: '2.25rem',
|
133
|
+
14: '2.5rem',
|
134
|
+
15: '2.75rem',
|
135
|
+
16: '3rem',
|
136
|
+
17: '3.5rem',
|
137
|
+
18: '4rem',
|
138
|
+
19: '4.25rem',
|
139
|
+
20: '5rem',
|
140
|
+
24: '6rem',
|
141
|
+
28: '7rem',
|
142
|
+
32: '8rem',
|
143
|
+
36: '9rem',
|
144
|
+
40: '10rem',
|
145
|
+
44: '11rem',
|
146
|
+
48: '12rem',
|
147
|
+
52: '13rem',
|
148
|
+
56: '14rem',
|
149
|
+
60: '15rem',
|
150
|
+
64: '16rem',
|
151
|
+
72: '18rem',
|
152
|
+
80: '20rem',
|
153
|
+
96: '24rem',
|
154
|
+
100: '27rem',
|
155
|
+
},
|
156
|
+
borderWidths: {
|
157
|
+
light: '1px',
|
158
|
+
normal: '2px',
|
159
|
+
bold: '3px',
|
160
|
+
extrabold: '4px',
|
161
|
+
black: '5px',
|
162
|
+
},
|
163
|
+
},
|
164
|
+
};
|
165
|
+
|
166
|
+
export const defaultUtils = {
|
167
|
+
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => ({
|
168
|
+
backgroundColor: value,
|
169
|
+
}),
|
170
|
+
c: (value: Stitches.PropertyValue<'color'>) => ({
|
171
|
+
color: value,
|
172
|
+
}),
|
173
|
+
r: (value: Stitches.ScaleValue<'radii'>) => ({
|
174
|
+
borderRadius: value,
|
175
|
+
}),
|
176
|
+
fs: (value: Stitches.PropertyValue<'fontSize'> | number | string) => ({
|
177
|
+
fontSize: value,
|
178
|
+
}),
|
179
|
+
size: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
180
|
+
height: value,
|
181
|
+
width: value,
|
182
|
+
}),
|
183
|
+
w: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
184
|
+
width: value,
|
185
|
+
}),
|
186
|
+
h: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
187
|
+
height: value,
|
188
|
+
}),
|
189
|
+
p: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
190
|
+
padding: value,
|
191
|
+
}),
|
192
|
+
pt: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
193
|
+
paddingTop: value,
|
194
|
+
}),
|
195
|
+
pr: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
196
|
+
paddingRight: value,
|
197
|
+
}),
|
198
|
+
pb: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
199
|
+
paddingBottom: value,
|
200
|
+
}),
|
201
|
+
pl: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
202
|
+
paddingLeft: value,
|
203
|
+
}),
|
204
|
+
px: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
205
|
+
paddingLeft: value,
|
206
|
+
paddingRight: value,
|
207
|
+
}),
|
208
|
+
py: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
209
|
+
paddingTop: value,
|
210
|
+
paddingBottom: value,
|
211
|
+
}),
|
212
|
+
m: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
213
|
+
margin: value,
|
214
|
+
}),
|
215
|
+
mt: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
216
|
+
marginTop: value,
|
217
|
+
}),
|
218
|
+
mr: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
219
|
+
marginRight: value,
|
220
|
+
}),
|
221
|
+
mb: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
222
|
+
marginBottom: value,
|
223
|
+
}),
|
224
|
+
ml: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
225
|
+
marginLeft: value,
|
226
|
+
}),
|
227
|
+
mx: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
228
|
+
marginLeft: value,
|
229
|
+
marginRight: value,
|
230
|
+
}),
|
231
|
+
my: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
232
|
+
marginTop: value,
|
233
|
+
marginBottom: value,
|
234
|
+
}),
|
235
|
+
};
|
236
|
+
|
237
|
+
export const defaultMedia = {
|
238
|
+
allowMotion: '(prefers-reduced-motion: no-preference)',
|
239
|
+
sm: '(max-width: 640px)',
|
240
|
+
md: '(max-width: 768px)',
|
241
|
+
lg: '(max-width: 1024px)',
|
242
|
+
xl: '(max-width: 1280px)',
|
243
|
+
'2xl': '(max-width: 1536px)',
|
244
|
+
ls: '(max-width: 1024px) and (orientation: landscape)',
|
245
|
+
};
|
246
|
+
|
247
|
+
export const defaultThemeMap = {
|
248
|
+
...defaultStitchesThemeMap,
|
249
|
+
width: 'space',
|
250
|
+
height: 'space',
|
251
|
+
minWidth: 'space',
|
252
|
+
maxWidth: 'space',
|
253
|
+
minHeight: 'space',
|
254
|
+
maxHeight: 'space',
|
255
|
+
flexBasis: 'space',
|
256
|
+
gridTemplateColumns: 'space',
|
257
|
+
gridTemplateRows: 'space',
|
258
|
+
blockSize: 'space',
|
259
|
+
minBlockSize: 'space',
|
260
|
+
maxBlockSize: 'space',
|
261
|
+
inlineSize: 'space',
|
262
|
+
minInlineSize: 'space',
|
263
|
+
maxInlineSize: 'space',
|
264
|
+
};
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import type * as Stitches from '@stitches/react';
|
2
|
+
import { createStitches } from '@stitches/react';
|
3
|
+
import merge from 'lodash.merge';
|
4
|
+
import { baseConfig, defaultMedia, defaultThemeMap, defaultUtils } from './base.config';
|
5
|
+
import { darkTheme, lightTheme } from './themes';
|
6
|
+
|
7
|
+
const HmsStitches = createStitches({
|
8
|
+
prefix: 'hms-ui',
|
9
|
+
theme: {
|
10
|
+
...baseConfig.theme,
|
11
|
+
colors: {
|
12
|
+
...baseConfig.theme.colors,
|
13
|
+
...darkTheme.colors,
|
14
|
+
},
|
15
|
+
},
|
16
|
+
media: defaultMedia,
|
17
|
+
utils: defaultUtils,
|
18
|
+
themeMap: defaultThemeMap,
|
19
|
+
});
|
20
|
+
|
21
|
+
export const {
|
22
|
+
theme,
|
23
|
+
createTheme: createThemeBase,
|
24
|
+
styled,
|
25
|
+
globalCss,
|
26
|
+
keyframes,
|
27
|
+
css,
|
28
|
+
getCssText,
|
29
|
+
config,
|
30
|
+
} = HmsStitches;
|
31
|
+
|
32
|
+
export const globalStyles = globalCss({
|
33
|
+
'*': {
|
34
|
+
fontFamily: '$sans',
|
35
|
+
boxSizing: 'border-box',
|
36
|
+
borderWidth: 0,
|
37
|
+
borderStyle: 'solid',
|
38
|
+
},
|
39
|
+
body: {
|
40
|
+
margin: 0,
|
41
|
+
},
|
42
|
+
'#root': {
|
43
|
+
height: '100%',
|
44
|
+
overscrollBehaviorY: 'none',
|
45
|
+
},
|
46
|
+
'::-webkit-scrollbar-track': {
|
47
|
+
WebkitBoxShadow: 'inset 0 0 6px rgba(0, 0, 0, 0.3)',
|
48
|
+
boxShadow: 'inset 0 0 6px rgba(0, 0, 0, 0.3)',
|
49
|
+
backgroundColor: 'transparent',
|
50
|
+
},
|
51
|
+
'::-webkit-scrollbar': {
|
52
|
+
width: '6px',
|
53
|
+
height: '6px',
|
54
|
+
backgroundColor: 'transparent',
|
55
|
+
},
|
56
|
+
'::-webkit-scrollbar-thumb': {
|
57
|
+
backgroundColor: '#657080',
|
58
|
+
borderRadius: '5px',
|
59
|
+
},
|
60
|
+
/**
|
61
|
+
* needed for safari. Safari
|
62
|
+
* adds background color on its own
|
63
|
+
* on hls-viewer on fullscreen
|
64
|
+
*/
|
65
|
+
'#hls-viewer-dark:fullscreen': {
|
66
|
+
backgroundColor: 'black !important',
|
67
|
+
},
|
68
|
+
|
69
|
+
'#hls-viewer-light:fullscreen': {
|
70
|
+
backgroundColor: 'white !important',
|
71
|
+
},
|
72
|
+
});
|
73
|
+
|
74
|
+
export type ThemeType = 'light' | 'dark';
|
75
|
+
export type Theme = typeof HmsStitches.theme;
|
76
|
+
|
77
|
+
/**
|
78
|
+
* This method will be used to create custom themes or update any theme values
|
79
|
+
* @param { type: ThemeType; className: string; theme: Theme }
|
80
|
+
* @returns
|
81
|
+
*/
|
82
|
+
export const createTheme = ({
|
83
|
+
themeType,
|
84
|
+
theme,
|
85
|
+
className,
|
86
|
+
}: {
|
87
|
+
themeType: ThemeType;
|
88
|
+
className?: string;
|
89
|
+
theme?: Partial<Theme>;
|
90
|
+
}) => {
|
91
|
+
if (!themeType) {
|
92
|
+
throw new Error('Theme type is required');
|
93
|
+
}
|
94
|
+
return createThemeBase(
|
95
|
+
className || `${themeType}-theme`,
|
96
|
+
merge(baseConfig.theme, themeType === 'dark' ? darkTheme : lightTheme, theme || {}),
|
97
|
+
);
|
98
|
+
};
|
99
|
+
|
100
|
+
export type CSS = Stitches.CSS<typeof HmsStitches>;
|
@@ -0,0 +1,70 @@
|
|
1
|
+
export const darkTheme = {
|
2
|
+
colors: {
|
3
|
+
bgPrimary: '#0B0F15',
|
4
|
+
bgSecondary: '#1D232B',
|
5
|
+
bgTertiary: '#303740',
|
6
|
+
surfaceLight: '#1E232A',
|
7
|
+
surfaceLighter: '#282F39',
|
8
|
+
textPrimary: '#FFFFFFE6',
|
9
|
+
textSecondary: '#FFFFFFB8',
|
10
|
+
textDisabled: '#FFFFFF61',
|
11
|
+
textInvert: 'rgba(0,0,0,0.9)',
|
12
|
+
textHighEmp: '#F5F9FFF2',
|
13
|
+
textMedEmp: 'rgba(224, 236, 255, 0.8)',
|
14
|
+
iconBtn: '$white',
|
15
|
+
iconHoverBg: 'rgba(255, 255, 255, 0.25)',
|
16
|
+
transparentBg: 'rgba(0, 0, 0, 0.22)',
|
17
|
+
mainBg: '$black',
|
18
|
+
tileBg: '#0F1115',
|
19
|
+
secondaryDisabled: '#242A33',
|
20
|
+
previewBg: '#111111',
|
21
|
+
statsBg: 'rgba(0,0,0,0.75)',
|
22
|
+
menuBg: '$grayDark',
|
23
|
+
inputBg: '$bgSecondary',
|
24
|
+
toastBg: '$menuBg',
|
25
|
+
borderDefault: '#1B1F26',
|
26
|
+
backgroundDefault: '#0B0D0F',
|
27
|
+
borderLighter: '#2D3440',
|
28
|
+
},
|
29
|
+
};
|
30
|
+
|
31
|
+
// TODO: Update light theme colors from design
|
32
|
+
export const lightTheme = {
|
33
|
+
colors: {
|
34
|
+
bgPrimary: '$white',
|
35
|
+
bgSecondary: '#F5F5F5',
|
36
|
+
bgTertiary: '#FFFFFF61',
|
37
|
+
twinYellow: '#ECC502',
|
38
|
+
textPrimary: 'rgba(0,0,0, 0.9)',
|
39
|
+
textSecondary: 'rgba(0,0,0, 0.72)',
|
40
|
+
textInvert: '#FFFFFFE6',
|
41
|
+
iconBtn: '#3b3b3b',
|
42
|
+
iconHoverBg: 'rgba(0, 0, 0, 0.22)',
|
43
|
+
transparentBg: '#FFFFFF38',
|
44
|
+
mainBg: '$white',
|
45
|
+
tileBg: '#F2F2F2',
|
46
|
+
previewBg: '#FAFAFA',
|
47
|
+
statsBg: '#FFFFFFBF',
|
48
|
+
menuBg: '#d9d9d9',
|
49
|
+
inputBg: '$tileBg',
|
50
|
+
toastBg: '$menuBg',
|
51
|
+
secondaryDisabled: '#F6F7F9',
|
52
|
+
// text variants
|
53
|
+
textHighEmp: '#000000F2',
|
54
|
+
textMedEmp: '#000000CC',
|
55
|
+
textDisabled: '#00000066',
|
56
|
+
|
57
|
+
borderDefault: '#DDE2E9',
|
58
|
+
borderLight: '#BCC4D2',
|
59
|
+
borderLighter: '#DFE4EC',
|
60
|
+
surfaceDefault: '#EDEFF3',
|
61
|
+
surfaceLight: '#F6F7F9',
|
62
|
+
surfaceLighter: '#FCFCFD',
|
63
|
+
surfaceDark: '$surfaceLight',
|
64
|
+
backgroundDefault: '#E0E4EB',
|
65
|
+
backgroundDark: '#DADFE7',
|
66
|
+
backgroundDarker: '#D4DAE2',
|
67
|
+
},
|
68
|
+
};
|
69
|
+
|
70
|
+
// Modals -> surface light/er
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { useEffect, useState } from 'react';
|
2
|
+
|
3
|
+
const isBrowser = (): boolean => {
|
4
|
+
return Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
|
5
|
+
};
|
6
|
+
|
7
|
+
export type SSRState = {
|
8
|
+
isBrowser: boolean;
|
9
|
+
isServer: boolean;
|
10
|
+
};
|
11
|
+
|
12
|
+
const useSSR = (): SSRState => {
|
13
|
+
const [browser, setBrowser] = useState<boolean>(false);
|
14
|
+
useEffect(() => {
|
15
|
+
setBrowser(isBrowser());
|
16
|
+
}, []);
|
17
|
+
|
18
|
+
return {
|
19
|
+
isBrowser: browser,
|
20
|
+
isServer: !browser,
|
21
|
+
};
|
22
|
+
};
|
23
|
+
|
24
|
+
export default useSSR;
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import * as Popover from '@radix-ui/react-popover';
|
2
|
+
import { styled } from '../Theme';
|
3
|
+
import { popoverAnimation } from '../utils/animations';
|
4
|
+
import { flexCenter } from '../utils/styles';
|
5
|
+
|
6
|
+
const Root = Popover.Root;
|
7
|
+
|
8
|
+
const StyledTrigger = styled(Popover.Trigger, {
|
9
|
+
position: 'absolute',
|
10
|
+
bottom: '$2',
|
11
|
+
right: '$2',
|
12
|
+
zIndex: 10,
|
13
|
+
width: '$13',
|
14
|
+
height: '$13',
|
15
|
+
color: '$textPrimary',
|
16
|
+
borderRadius: '$round',
|
17
|
+
backgroundColor: '$menuBg',
|
18
|
+
border: 'none',
|
19
|
+
...flexCenter,
|
20
|
+
'&:not([disabled]):focus': {
|
21
|
+
outline: 'none',
|
22
|
+
boxShadow: '0 0 0 3px $colors$brandLight',
|
23
|
+
},
|
24
|
+
});
|
25
|
+
|
26
|
+
const StyledContent = styled(Popover.Content, {
|
27
|
+
fontFamily: '$sans',
|
28
|
+
backgroundColor: '$menuBg',
|
29
|
+
padding: '$5 0',
|
30
|
+
display: 'flex',
|
31
|
+
flexDirection: 'column',
|
32
|
+
borderRadius: '$space$6',
|
33
|
+
zIndex: 11,
|
34
|
+
width: '$60',
|
35
|
+
...popoverAnimation,
|
36
|
+
});
|
37
|
+
|
38
|
+
const styledItem = {
|
39
|
+
fontSize: '$sm',
|
40
|
+
color: '$textPrimary',
|
41
|
+
display: 'flex',
|
42
|
+
alignItems: 'center',
|
43
|
+
padding: '$4 $6',
|
44
|
+
width: '100%',
|
45
|
+
};
|
46
|
+
|
47
|
+
const StyledItemButton = styled('button', {
|
48
|
+
...styledItem,
|
49
|
+
height: '$14',
|
50
|
+
'&:hover': {
|
51
|
+
backgroundColor: '$menuBg',
|
52
|
+
},
|
53
|
+
// TODO: default focus applied cause issues with this style
|
54
|
+
'&:focus': {
|
55
|
+
outline: 'none',
|
56
|
+
// backgroundColor: '$grey3',
|
57
|
+
},
|
58
|
+
'& > * + *': {
|
59
|
+
marginRight: '0',
|
60
|
+
marginLeft: '$4',
|
61
|
+
},
|
62
|
+
});
|
63
|
+
|
64
|
+
const StyledVolumeItem = styled('div', {
|
65
|
+
// TODO: maybe keep this as base comp and extend button variant
|
66
|
+
...styledItem,
|
67
|
+
alignItems: 'start',
|
68
|
+
flexDirection: 'column',
|
69
|
+
marginBottom: '0',
|
70
|
+
});
|
71
|
+
|
72
|
+
export const Flex = styled('div', {
|
73
|
+
display: 'flex',
|
74
|
+
'& > * + *': {
|
75
|
+
marginRight: '0',
|
76
|
+
marginLeft: '$4',
|
77
|
+
},
|
78
|
+
});
|
79
|
+
|
80
|
+
const RemoveMenuItem = styled(StyledItemButton, {
|
81
|
+
color: '$error',
|
82
|
+
borderTop: '1px solid $borderLight',
|
83
|
+
});
|
84
|
+
|
85
|
+
interface MenuTileType {
|
86
|
+
Root: typeof Root;
|
87
|
+
Trigger: typeof StyledTrigger;
|
88
|
+
Content: typeof StyledContent;
|
89
|
+
ItemButton: typeof StyledItemButton;
|
90
|
+
VolumeItem: typeof StyledVolumeItem;
|
91
|
+
RemoveItem: typeof RemoveMenuItem;
|
92
|
+
}
|
93
|
+
|
94
|
+
export const StyledMenuTile: MenuTileType = {
|
95
|
+
Root,
|
96
|
+
Trigger: StyledTrigger,
|
97
|
+
Content: StyledContent,
|
98
|
+
ItemButton: StyledItemButton,
|
99
|
+
VolumeItem: StyledVolumeItem,
|
100
|
+
RemoveItem: RemoveMenuItem,
|
101
|
+
};
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import {
|
3
|
+
HMSPeerID,
|
4
|
+
HMSTrack,
|
5
|
+
selectAudioTrackByPeerID,
|
6
|
+
selectAudioVolumeByPeerID,
|
7
|
+
selectPermissions,
|
8
|
+
selectVideoTrackByPeerID,
|
9
|
+
useHMSActions,
|
10
|
+
useHMSStore,
|
11
|
+
} from '@100mslive/react-sdk';
|
12
|
+
import {
|
13
|
+
HorizontalMenuIcon,
|
14
|
+
MicOffIcon,
|
15
|
+
MicOnIcon,
|
16
|
+
RemoveUserIcon,
|
17
|
+
SpeakerIcon,
|
18
|
+
VideoOffIcon,
|
19
|
+
VideoOnIcon,
|
20
|
+
} from '@100mslive/react-icons';
|
21
|
+
import { Slider } from '../Slider';
|
22
|
+
import { Flex, StyledMenuTile } from './StyledMenuTile';
|
23
|
+
|
24
|
+
export interface TileMenuProps {
|
25
|
+
peerId: HMSPeerID;
|
26
|
+
}
|
27
|
+
|
28
|
+
export const TileMenu: React.FC<TileMenuProps> = ({ peerId }) => {
|
29
|
+
const actions = useHMSActions();
|
30
|
+
const permissions = useHMSStore(selectPermissions);
|
31
|
+
// TODO: selectTrackByID vs selectVideoTrackByPeerID
|
32
|
+
const videoTrack = useHMSStore(selectVideoTrackByPeerID(peerId));
|
33
|
+
const audioTrack = useHMSStore(selectAudioTrackByPeerID(peerId));
|
34
|
+
const canMuteVideo = videoTrack?.enabled ? permissions?.mute : permissions?.unmute;
|
35
|
+
const canMuteAudio = audioTrack?.enabled ? permissions?.mute : permissions?.unmute;
|
36
|
+
const toggleTrackEnabled = async (track?: HMSTrack | null) => {
|
37
|
+
if (track) {
|
38
|
+
try {
|
39
|
+
await actions.setRemoteTrackEnabled(track.id, !track.enabled);
|
40
|
+
} catch (error) {
|
41
|
+
// TODO: add toast here
|
42
|
+
}
|
43
|
+
}
|
44
|
+
};
|
45
|
+
const trackVolume = useHMSStore(selectAudioVolumeByPeerID(peerId));
|
46
|
+
return (
|
47
|
+
<StyledMenuTile.Root>
|
48
|
+
<StyledMenuTile.Trigger>
|
49
|
+
<HorizontalMenuIcon />
|
50
|
+
</StyledMenuTile.Trigger>
|
51
|
+
<StyledMenuTile.Content side="left" align="start" sideOffset={10}>
|
52
|
+
{canMuteVideo ? (
|
53
|
+
<StyledMenuTile.ItemButton onClick={() => toggleTrackEnabled(videoTrack)}>
|
54
|
+
{videoTrack?.enabled ? <VideoOnIcon /> : <VideoOffIcon />}
|
55
|
+
<span>{`${videoTrack?.enabled ? 'Mute' : 'Unmute'} Video`}</span>
|
56
|
+
</StyledMenuTile.ItemButton>
|
57
|
+
) : null}
|
58
|
+
{canMuteAudio ? (
|
59
|
+
<StyledMenuTile.ItemButton onClick={() => toggleTrackEnabled(audioTrack)}>
|
60
|
+
{audioTrack?.enabled ? <MicOnIcon /> : <MicOffIcon />}
|
61
|
+
<span>{`${audioTrack?.enabled ? 'Mute' : 'Unmute'} Audio`}</span>
|
62
|
+
</StyledMenuTile.ItemButton>
|
63
|
+
) : null}
|
64
|
+
|
65
|
+
{audioTrack ? (
|
66
|
+
<StyledMenuTile.VolumeItem>
|
67
|
+
<Flex>
|
68
|
+
<SpeakerIcon /> <span>Volume ({trackVolume})</span>
|
69
|
+
</Flex>
|
70
|
+
<Slider
|
71
|
+
css={{ my: '0.5rem' }}
|
72
|
+
step={5}
|
73
|
+
value={[trackVolume || 0]}
|
74
|
+
onValueChange={e => actions.setVolume(e[0], audioTrack?.id)}
|
75
|
+
/>
|
76
|
+
</StyledMenuTile.VolumeItem>
|
77
|
+
) : null}
|
78
|
+
|
79
|
+
{permissions?.removeOthers ? (
|
80
|
+
<StyledMenuTile.RemoveItem
|
81
|
+
onClick={async () => {
|
82
|
+
try {
|
83
|
+
await actions.removePeer(peerId, '');
|
84
|
+
} catch (error) {
|
85
|
+
// TODO: Toast here
|
86
|
+
}
|
87
|
+
}}
|
88
|
+
>
|
89
|
+
<RemoveUserIcon />
|
90
|
+
<span>Remove Participant</span>
|
91
|
+
</StyledMenuTile.RemoveItem>
|
92
|
+
) : null}
|
93
|
+
</StyledMenuTile.Content>
|
94
|
+
</StyledMenuTile.Root>
|
95
|
+
);
|
96
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { StyledMenuTile } from './StyledMenuTile';
|