@100mslive/roomkit-react 0.2.8-alpha.1 → 0.2.8-alpha.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/HLSView-FBEGJ3L7.js +1396 -0
- package/dist/HLSView-FBEGJ3L7.js.map +7 -0
- package/dist/Prebuilt/common/hooks.d.ts +3 -0
- package/dist/Prebuilt/components/Chat/MwebChatOption.d.ts +1 -1
- package/dist/Prebuilt/components/HMSVideo/FullscreenButton.d.ts +5 -0
- package/dist/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.d.ts +5 -0
- package/dist/Prebuilt/components/HMSVideo/HLSCaptionSelector.d.ts +1 -2
- package/dist/Prebuilt/components/HMSVideo/HLSQualitySelector.d.ts +13 -0
- package/dist/Prebuilt/components/HMSVideo/MwebHLSViewTitle.d.ts +2 -0
- package/dist/Prebuilt/components/HMSVideo/PlayButton.d.ts +6 -0
- package/dist/Prebuilt/components/HMSVideo/PlayPauseButton.d.ts +6 -0
- package/dist/Prebuilt/components/HMSVideo/PlayerContext.d.ts +8 -0
- package/dist/Prebuilt/components/HMSVideo/SeekControls.d.ts +7 -0
- package/dist/Prebuilt/components/HMSVideo/VideoProgress.d.ts +5 -0
- package/dist/Prebuilt/components/HMSVideo/VideoTime.d.ts +2 -0
- package/dist/Prebuilt/components/HMSVideo/VolumeControl.d.ts +2 -0
- package/dist/Prebuilt/components/HMSVideo/index.d.ts +26 -0
- package/dist/Prebuilt/components/HMSVideo/utils.d.ts +8 -0
- package/dist/Prebuilt/components/Leave/DesktopLeaveRoom.d.ts +2 -1
- package/dist/Prebuilt/components/Leave/LeaveRoom.d.ts +2 -1
- package/dist/Prebuilt/components/Leave/MwebLeaveRoom.d.ts +2 -3
- package/dist/Prebuilt/components/MwebLandscapePrompt.d.ts +1 -1
- package/dist/Prebuilt/components/RaiseHand.d.ts +5 -0
- package/dist/Prebuilt/components/SidePaneTabs.d.ts +1 -1
- package/dist/Sheet/Sheet.d.ts +1 -0
- package/dist/{chunk-ERIM35YN.js → chunk-R2JJJQR3.js} +1539 -1173
- package/dist/chunk-R2JJJQR3.js.map +7 -0
- package/dist/index.cjs.js +2709 -1898
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +777 -290
- package/dist/meta.esbuild.json +796 -298
- package/package.json +7 -6
- package/src/Button/Button.tsx +4 -4
- package/src/Fieldset/Fieldset.tsx +1 -1
- package/src/Input/PasswordInput.stories.tsx +1 -1
- package/src/Pagination/StyledPagination.stories.tsx +2 -2
- package/src/Prebuilt/IconButton.tsx +1 -1
- package/src/Prebuilt/common/hooks.ts +21 -0
- package/src/Prebuilt/components/AppData/useSidepane.js +34 -7
- package/src/Prebuilt/components/AuthToken.jsx +1 -1
- package/src/Prebuilt/components/Chat/Chat.tsx +41 -1
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +33 -13
- package/src/Prebuilt/components/Chat/MwebChatOption.tsx +1 -1
- package/src/Prebuilt/components/ConferenceScreen.tsx +48 -7
- package/src/Prebuilt/components/EmojiReaction.jsx +33 -23
- package/src/Prebuilt/components/Footer/Footer.tsx +0 -1
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +138 -125
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/FullscreenButton.tsx +13 -0
- package/src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.tsx +72 -0
- package/src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx +4 -2
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.tsx +248 -0
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +17 -7
- package/src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx +84 -0
- package/src/Prebuilt/components/HMSVideo/PlayButton.tsx +27 -0
- package/src/Prebuilt/components/HMSVideo/PlayPauseButton.tsx +27 -0
- package/src/Prebuilt/components/HMSVideo/PlayerContext.tsx +15 -0
- package/src/Prebuilt/components/HMSVideo/SeekControls.tsx +22 -0
- package/src/Prebuilt/components/HMSVideo/VideoProgress.tsx +95 -0
- package/src/Prebuilt/components/HMSVideo/VideoTime.tsx +43 -0
- package/src/Prebuilt/components/HMSVideo/{VolumeControl.jsx → VolumeControl.tsx} +6 -4
- package/src/Prebuilt/components/HMSVideo/{index.js → index.ts} +6 -2
- package/src/Prebuilt/components/HMSVideo/{HMSVIdeoUtils.js → utils.ts} +5 -5
- package/src/Prebuilt/components/Header/StreamActions.tsx +1 -1
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +1 -1
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +50 -46
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +15 -4
- package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +46 -27
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +3 -1
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +37 -31
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +12 -8
- package/src/Prebuilt/components/MwebLandscapePrompt.tsx +14 -3
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +5 -2
- package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +1 -1
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +19 -8
- package/src/Prebuilt/components/Polls/Voting/Voting.tsx +3 -2
- package/src/Prebuilt/components/Polls/common/OptionInputWithDelete.tsx +1 -1
- package/src/Prebuilt/components/Polls/common/utils.ts +2 -2
- package/src/Prebuilt/components/RaiseHand.tsx +24 -0
- package/src/Prebuilt/components/RoomDetails/RoomDetailsPane.tsx +41 -14
- package/src/Prebuilt/components/SidePaneTabs.tsx +56 -48
- package/src/Prebuilt/components/StatsForNerds.jsx +14 -6
- package/src/Prebuilt/components/Streaming/Common.jsx +1 -1
- package/src/Prebuilt/components/TileMenu/TileMenuContent.tsx +2 -2
- package/src/Prebuilt/components/Toast/ToastBatcher.js +8 -1
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +17 -0
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +2 -2
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +1 -1
- package/src/Prebuilt/layouts/HLSView.jsx +359 -178
- package/src/Prebuilt/layouts/SidePane.tsx +145 -59
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +22 -2
- package/src/Prebuilt/primitives/DialogContent.jsx +1 -1
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +1 -1
- package/src/Sheet/Sheet.tsx +7 -3
- package/dist/HLSView-SJCF34GE.js +0 -987
- package/dist/HLSView-SJCF34GE.js.map +0 -7
- package/dist/chunk-ERIM35YN.js.map +0 -7
- package/src/Prebuilt/components/HMSVideo/FullscreenButton.jsx +0 -18
- package/src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.jsx +0 -35
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +0 -127
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +0 -13
- package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +0 -76
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +0 -33
- package/src/Prebuilt/components/RaiseHand.jsx +0 -17
@@ -1,17 +1,16 @@
|
|
1
1
|
import React, { useEffect } from 'react';
|
2
2
|
import { useMedia } from 'react-use';
|
3
|
+
import { match } from 'ts-pattern';
|
3
4
|
import { selectAppData, selectVideoTrackByPeerID, useHMSStore } from '@100mslive/react-sdk';
|
4
5
|
import { Polls } from '../components/Polls/Polls';
|
5
6
|
import { RoomDetailsPane } from '../components/RoomDetails/RoomDetailsPane';
|
6
7
|
import { LayoutMode } from '../components/Settings/LayoutSettings';
|
7
8
|
import { SidePaneTabs } from '../components/SidePaneTabs';
|
8
9
|
import { TileCustomisationProps } from '../components/VideoLayouts/GridLayout';
|
9
|
-
// @ts-ignore: No implicit Any
|
10
10
|
import VideoTile from '../components/VideoTile';
|
11
|
-
// @ts-ignore: No implicit Any
|
12
11
|
import { VBPicker } from '../components/VirtualBackground/VBPicker';
|
13
|
-
import {
|
14
|
-
import { config as cssConfig } from '../../Theme';
|
12
|
+
import { Flex } from '../../Layout';
|
13
|
+
import { config as cssConfig, styled } from '../../Theme';
|
15
14
|
// @ts-ignore: No implicit Any
|
16
15
|
import { useSidepaneReset } from '../components/AppData/useSidepane';
|
17
16
|
// @ts-ignore: No implicit Any
|
@@ -20,9 +19,95 @@ import {
|
|
20
19
|
useRoomLayoutConferencingScreen,
|
21
20
|
useRoomLayoutPreviewScreen,
|
22
21
|
} from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
22
|
+
import { useLandscapeHLSStream, useMobileHLSStream } from '../common/hooks';
|
23
23
|
import { translateAcross } from '../../utils';
|
24
24
|
import { APP_DATA, SIDE_PANE_OPTIONS, UI_SETTINGS } from '../common/constants';
|
25
25
|
|
26
|
+
const Wrapper = styled('div', {
|
27
|
+
w: '$100',
|
28
|
+
h: '100%',
|
29
|
+
p: '$10',
|
30
|
+
flex: '1 1 0',
|
31
|
+
background: '$surface_dim',
|
32
|
+
r: '$1',
|
33
|
+
position: 'relative',
|
34
|
+
'@lg': {
|
35
|
+
w: '100%',
|
36
|
+
h: '100%',
|
37
|
+
ml: 0,
|
38
|
+
right: 0,
|
39
|
+
position: 'fixed',
|
40
|
+
bottom: 0,
|
41
|
+
borderRadius: 0,
|
42
|
+
zIndex: 10,
|
43
|
+
},
|
44
|
+
'@md': {
|
45
|
+
p: '$6 $8',
|
46
|
+
animation: `${translateAcross({ yFrom: '100%' })} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,
|
47
|
+
},
|
48
|
+
variants: {
|
49
|
+
landscapeStream: {
|
50
|
+
true: {
|
51
|
+
'@lg': {
|
52
|
+
position: 'unset',
|
53
|
+
minHeight: '100%',
|
54
|
+
},
|
55
|
+
},
|
56
|
+
},
|
57
|
+
mobileStream: {
|
58
|
+
true: {
|
59
|
+
'@md': {
|
60
|
+
position: 'unset',
|
61
|
+
},
|
62
|
+
},
|
63
|
+
},
|
64
|
+
overlayChat: {
|
65
|
+
true: {
|
66
|
+
'@lg': {
|
67
|
+
maxHeight: '300px',
|
68
|
+
background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 35.94%, rgba(0, 0, 0, 0.64) 100%)',
|
69
|
+
position: 'fixed',
|
70
|
+
zIndex: 12,
|
71
|
+
bottom: 0,
|
72
|
+
},
|
73
|
+
},
|
74
|
+
},
|
75
|
+
hideControls: {
|
76
|
+
true: {},
|
77
|
+
},
|
78
|
+
},
|
79
|
+
compoundVariants: [
|
80
|
+
{
|
81
|
+
landscapeStream: true,
|
82
|
+
overlayChat: true,
|
83
|
+
css: {
|
84
|
+
position: 'unset',
|
85
|
+
height: '100%',
|
86
|
+
maxHeight: 'unset',
|
87
|
+
'@md': {
|
88
|
+
pb: 0,
|
89
|
+
},
|
90
|
+
},
|
91
|
+
},
|
92
|
+
{
|
93
|
+
mobileStream: true,
|
94
|
+
overlayChat: true,
|
95
|
+
css: {
|
96
|
+
position: 'unset',
|
97
|
+
height: '100%',
|
98
|
+
maxHeight: 'unset',
|
99
|
+
},
|
100
|
+
},
|
101
|
+
{
|
102
|
+
hideControls: false,
|
103
|
+
overlayChat: true,
|
104
|
+
css: {
|
105
|
+
pb: '$17',
|
106
|
+
},
|
107
|
+
},
|
108
|
+
],
|
109
|
+
});
|
110
|
+
|
26
111
|
const SidePane = ({
|
27
112
|
tileProps,
|
28
113
|
hideControls = false,
|
@@ -38,24 +123,14 @@ const SidePane = ({
|
|
38
123
|
const { elements: preview_elements } = useRoomLayoutPreviewScreen();
|
39
124
|
const layoutMode = useUISettings(UI_SETTINGS.layoutMode);
|
40
125
|
|
126
|
+
const isLandscapeHLSStream = useLandscapeHLSStream();
|
127
|
+
const isMobileHLSStream = useMobileHLSStream();
|
128
|
+
|
41
129
|
const backgroundMedia = preview_elements?.virtual_background?.background_media?.length
|
42
130
|
? preview_elements?.virtual_background?.background_media
|
43
131
|
: elements?.virtual_background?.background_media || [];
|
44
132
|
|
45
133
|
const resetSidePane = useSidepaneReset();
|
46
|
-
let ViewComponent;
|
47
|
-
if (sidepane === SIDE_PANE_OPTIONS.POLLS) {
|
48
|
-
ViewComponent = <Polls />;
|
49
|
-
}
|
50
|
-
if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS || sidepane === SIDE_PANE_OPTIONS.CHAT) {
|
51
|
-
ViewComponent = <SidePaneTabs hideControls={hideControls} active={sidepane} />;
|
52
|
-
}
|
53
|
-
if (sidepane === SIDE_PANE_OPTIONS.VB) {
|
54
|
-
ViewComponent = <VBPicker backgroundMedia={backgroundMedia} />;
|
55
|
-
}
|
56
|
-
if (sidepane === SIDE_PANE_OPTIONS.ROOM_DETAILS) {
|
57
|
-
ViewComponent = <RoomDetailsPane />;
|
58
|
-
}
|
59
134
|
|
60
135
|
useEffect(() => {
|
61
136
|
return () => {
|
@@ -63,9 +138,6 @@ const SidePane = ({
|
|
63
138
|
};
|
64
139
|
}, [resetSidePane]);
|
65
140
|
|
66
|
-
if (!ViewComponent && (!trackId || layoutMode !== LayoutMode.GALLERY)) {
|
67
|
-
return null;
|
68
|
-
}
|
69
141
|
const tileLayout = {
|
70
142
|
hideParticipantNameOnTile: tileProps?.hide_participant_name_on_tile,
|
71
143
|
roundedVideoTile: tileProps?.rounded_video_tile,
|
@@ -73,20 +145,69 @@ const SidePane = ({
|
|
73
145
|
hideMetadataOnTile: tileProps?.hide_metadata_on_tile,
|
74
146
|
objectFit: tileProps?.video_object_fit,
|
75
147
|
};
|
76
|
-
const VB = sidepane === SIDE_PANE_OPTIONS.VB;
|
77
148
|
const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT && elements?.chat?.is_overlay;
|
149
|
+
const commonProps = {
|
150
|
+
landscapeStream: isLandscapeHLSStream,
|
151
|
+
mobileStream: isMobileHLSStream,
|
152
|
+
hideControls,
|
153
|
+
overlayChat: !!elements?.chat?.is_overlay,
|
154
|
+
};
|
155
|
+
|
156
|
+
const SidepaneComponent = match(sidepane)
|
157
|
+
.with(SIDE_PANE_OPTIONS.POLLS, () => (
|
158
|
+
<Wrapper
|
159
|
+
css={{
|
160
|
+
'@md': {
|
161
|
+
borderTopLeftRadius: '$2',
|
162
|
+
borderTopRightRadius: '$2',
|
163
|
+
},
|
164
|
+
}}
|
165
|
+
{...commonProps}
|
166
|
+
>
|
167
|
+
<Polls />
|
168
|
+
</Wrapper>
|
169
|
+
))
|
170
|
+
.with(SIDE_PANE_OPTIONS.VB, () => (
|
171
|
+
<Wrapper css={{ p: '$10 $6 $10 $10' }} {...commonProps}>
|
172
|
+
<VBPicker backgroundMedia={backgroundMedia} />
|
173
|
+
</Wrapper>
|
174
|
+
))
|
175
|
+
.with(SIDE_PANE_OPTIONS.CHAT, SIDE_PANE_OPTIONS.PARTICIPANTS, () => (
|
176
|
+
<Wrapper {...commonProps} overlayChat={mwebStreamingChat}>
|
177
|
+
<SidePaneTabs active={sidepane} hideTab={isMobileHLSStream || isLandscapeHLSStream} />
|
178
|
+
</Wrapper>
|
179
|
+
))
|
180
|
+
.with(SIDE_PANE_OPTIONS.ROOM_DETAILS, () => (
|
181
|
+
<Wrapper {...commonProps}>
|
182
|
+
<RoomDetailsPane />
|
183
|
+
</Wrapper>
|
184
|
+
))
|
185
|
+
.otherwise(() => {
|
186
|
+
return null;
|
187
|
+
});
|
188
|
+
|
189
|
+
if (!trackId && !SidepaneComponent) {
|
190
|
+
return null;
|
191
|
+
}
|
78
192
|
|
79
193
|
return (
|
80
194
|
<Flex
|
81
195
|
direction="column"
|
82
196
|
justify="center"
|
83
197
|
css={{
|
84
|
-
w:
|
198
|
+
w: match({ isMobileHLSStream, isLandscapeHLSStream })
|
199
|
+
.with({ isLandscapeHLSStream: true }, () => '340px')
|
200
|
+
.with({ isMobileHLSStream: true }, () => '100%')
|
201
|
+
.otherwise(() => '$100'),
|
85
202
|
h: '100%',
|
86
203
|
flexShrink: 0,
|
87
204
|
gap: '$4',
|
88
205
|
position: 'relative',
|
89
|
-
'
|
206
|
+
'&:empty': { display: 'none' },
|
207
|
+
'@md': {
|
208
|
+
position: 'absolute',
|
209
|
+
zIndex: 12,
|
210
|
+
},
|
90
211
|
}}
|
91
212
|
>
|
92
213
|
{trackId && layoutMode === LayoutMode.GALLERY && (
|
@@ -99,42 +220,7 @@ const SidePane = ({
|
|
99
220
|
{...tileLayout}
|
100
221
|
/>
|
101
222
|
)}
|
102
|
-
{
|
103
|
-
<Box
|
104
|
-
css={{
|
105
|
-
w: '$100',
|
106
|
-
h: mwebStreamingChat ? '0' : '100%',
|
107
|
-
p: VB ? '$10 $6 $10 $10' : '$10',
|
108
|
-
flex: '1 1 0',
|
109
|
-
minHeight: 0,
|
110
|
-
maxHeight: mwebStreamingChat ? '300px' : 'unset',
|
111
|
-
background: mwebStreamingChat
|
112
|
-
? 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 35.94%, rgba(0, 0, 0, 0.64) 100%)'
|
113
|
-
: '$surface_dim',
|
114
|
-
r: '$1',
|
115
|
-
position: 'relative',
|
116
|
-
'@lg': {
|
117
|
-
w: '100%',
|
118
|
-
h: '100%',
|
119
|
-
ml: 0,
|
120
|
-
right: 0,
|
121
|
-
position: 'fixed',
|
122
|
-
bottom: 0,
|
123
|
-
borderRadius: 0,
|
124
|
-
zIndex: 10,
|
125
|
-
},
|
126
|
-
'@md': {
|
127
|
-
p: '$6 $8',
|
128
|
-
pb: mwebStreamingChat ? '$20' : '$12',
|
129
|
-
borderTopLeftRadius: sidepane === SIDE_PANE_OPTIONS.POLLS ? '$2' : '0',
|
130
|
-
borderTopRightRadius: sidepane === SIDE_PANE_OPTIONS.POLLS ? '$2' : '0',
|
131
|
-
animation: `${translateAcross({ yFrom: '100%' })} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,
|
132
|
-
},
|
133
|
-
}}
|
134
|
-
>
|
135
|
-
{ViewComponent}
|
136
|
-
</Box>
|
137
|
-
)}
|
223
|
+
{SidepaneComponent}
|
138
224
|
</Flex>
|
139
225
|
);
|
140
226
|
};
|
@@ -4,6 +4,7 @@ import {
|
|
4
4
|
DefaultConferencingScreen_Elements,
|
5
5
|
HLSLiveStreamingScreen_Elements,
|
6
6
|
} from '@100mslive/types-prebuilt';
|
7
|
+
import { match } from 'ts-pattern';
|
7
8
|
import {
|
8
9
|
selectIsConnectedToRoom,
|
9
10
|
selectLocalPeerRoleName,
|
@@ -31,6 +32,7 @@ import {
|
|
31
32
|
// @ts-ignore: No implicit Any
|
32
33
|
} from '../components/AppData/useUISettings';
|
33
34
|
import { useCloseScreenshareWhiteboard } from '../components/hooks/useCloseScreenshareWhiteboard';
|
35
|
+
import { useLandscapeHLSStream, useMobileHLSStream } from '../common/hooks';
|
34
36
|
// @ts-ignore: No implicit Any
|
35
37
|
import { SESSION_STORE_KEY } from '../common/constants';
|
36
38
|
|
@@ -55,6 +57,8 @@ export const VideoStreamingSection = ({
|
|
55
57
|
const waitingViewerRole = useWaitingViewerRole();
|
56
58
|
const urlToIframe = useUrlToEmbed();
|
57
59
|
const pdfAnnotatorActive = usePDFConfig();
|
60
|
+
const isMobileHLSStream = useMobileHLSStream();
|
61
|
+
const isLandscapeHLSStream = useLandscapeHLSStream();
|
58
62
|
useCloseScreenshareWhiteboard();
|
59
63
|
|
60
64
|
useEffect(() => {
|
@@ -102,11 +106,27 @@ export const VideoStreamingSection = ({
|
|
102
106
|
css={{
|
103
107
|
size: '100%',
|
104
108
|
position: 'relative',
|
105
|
-
gap: '$4',
|
109
|
+
gap: isMobileHLSStream || isLandscapeHLSStream ? '0' : '$4',
|
106
110
|
}}
|
111
|
+
direction={match<Record<string, boolean>, 'row' | 'column'>({ isLandscapeHLSStream, isMobileHLSStream })
|
112
|
+
.with({ isLandscapeHLSStream: true }, () => 'row')
|
113
|
+
.with({ isMobileHLSStream: true }, () => 'column')
|
114
|
+
.otherwise(() => 'row')}
|
107
115
|
>
|
108
116
|
{ViewComponent}
|
109
|
-
<Box
|
117
|
+
<Box
|
118
|
+
css={{
|
119
|
+
flex: match({ isLandscapeHLSStream, isMobileHLSStream })
|
120
|
+
.with({ isLandscapeHLSStream: true }, () => '1 1 0')
|
121
|
+
.with({ isMobileHLSStream: true }, () => '2 1 0')
|
122
|
+
.otherwise(() => undefined),
|
123
|
+
position: 'relative',
|
124
|
+
height: !isMobileHLSStream ? '100%' : undefined,
|
125
|
+
maxHeight: '100%',
|
126
|
+
'&:empty': { display: 'none' },
|
127
|
+
overflowY: 'clip',
|
128
|
+
}}
|
129
|
+
>
|
110
130
|
<SidePane
|
111
131
|
screenType={screenType}
|
112
132
|
// @ts-ignore
|
@@ -21,7 +21,7 @@ export const RoomLayoutContext = React.createContext<
|
|
21
21
|
// The default merge in lodash merges the values of current layout and the changes.
|
22
22
|
// This behaviour makes changes in array based values inconsistent since a union happens.
|
23
23
|
// The customizer uses the new value provided if one of the values is an array
|
24
|
-
function customizer(objValue:
|
24
|
+
function customizer(objValue: unknown, srcValue: unknown) {
|
25
25
|
if (isArray(objValue) || isArray(srcValue)) {
|
26
26
|
return srcValue;
|
27
27
|
}
|
package/src/Sheet/Sheet.tsx
CHANGED
@@ -58,6 +58,10 @@ const StyledContent = styled(DialogPrimitive.Content, {
|
|
58
58
|
animation: `${sheetSlideOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,
|
59
59
|
},
|
60
60
|
},
|
61
|
+
'@ls': {
|
62
|
+
maxWidth: '50%',
|
63
|
+
margin: '0 auto',
|
64
|
+
},
|
61
65
|
|
62
66
|
variants: {
|
63
67
|
side: {
|
@@ -88,11 +92,11 @@ const StyledContent = styled(DialogPrimitive.Content, {
|
|
88
92
|
|
89
93
|
type SheetContentVariants = VariantProps<typeof StyledContent>;
|
90
94
|
type DialogContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;
|
91
|
-
type SheetContentProps = DialogContentPrimitiveProps & SheetContentVariants & { css?: CSS };
|
95
|
+
type SheetContentProps = DialogContentPrimitiveProps & SheetContentVariants & { css?: CSS; container?: HTMLElement };
|
92
96
|
|
93
97
|
const SheetContent = React.forwardRef<React.ElementRef<typeof StyledContent>, SheetContentProps>(
|
94
|
-
({ children, ...props }, forwardedRef) => (
|
95
|
-
<Dialog.Portal>
|
98
|
+
({ children, container, ...props }, forwardedRef) => (
|
99
|
+
<Dialog.Portal container={container}>
|
96
100
|
<StyledOverlay />
|
97
101
|
<StyledContent {...props} ref={forwardedRef}>
|
98
102
|
{children}
|