@100mslive/roomkit-react 0.1.1 → 0.1.2-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +18 -0
- package/dist/Accordion/Accordion.d.ts +62 -138
- package/dist/Accordion/index.d.ts +62 -138
- package/dist/{ActiveSpeakerView-G32BDM5F.js → ActiveSpeakerView-4XPIRZOK.js} +6 -6
- package/dist/{ActiveSpeakerView-LW4WDBC6.css → ActiveSpeakerView-ADEYHQMU.css} +2 -2
- package/dist/{PinnedTrackView-OAA4HAID.css.map → ActiveSpeakerView-ADEYHQMU.css.map} +2 -2
- package/dist/Avatar/Avatar.d.ts +31 -69
- package/dist/Button/Button.d.ts +31 -69
- package/dist/Checkbox/Checkbox.d.ts +62 -138
- package/dist/Collapsible/Collapsible.d.ts +93 -207
- package/dist/Divider/Divider.d.ts +62 -138
- package/dist/Dropdown/Dropdown.d.ts +372 -828
- package/dist/Fieldset/Fieldset.d.ts +31 -69
- package/dist/Footer/Footer.d.ts +248 -552
- package/dist/{HLSView-DIQQF2PP.css → HLSView-DWEEMZ6Z.css} +2 -2
- package/dist/{HLSView-DIQQF2PP.css.map → HLSView-DWEEMZ6Z.css.map} +2 -2
- package/dist/{HLSView-ZYNT3HJD.js → HLSView-I26CVF5U.js} +16 -16
- package/dist/HLSView-I26CVF5U.js.map +7 -0
- package/dist/IconButton/IconButton.d.ts +31 -69
- package/dist/Input/Input.d.ts +189 -417
- package/dist/Label/Label.d.ts +31 -69
- package/dist/Layout/Box.d.ts +31 -69
- package/dist/Layout/Flex.d.ts +31 -69
- package/dist/Link/Link.d.ts +31 -69
- package/dist/Modal/Dialog.d.ts +248 -552
- package/dist/Modal/DialogContent.d.ts +217 -483
- package/dist/Pagination/StyledPagination.d.ts +124 -276
- package/dist/{PinnedTrackView-OAA4HAID.css → PinnedTrackView-5DPVVOZW.css} +2 -2
- package/dist/{conference-LE4T3ZNF.css.map → PinnedTrackView-5DPVVOZW.css.map} +2 -2
- package/dist/{PinnedTrackView-GTXL2UTS.js → PinnedTrackView-GGTCNH5V.js} +6 -6
- package/dist/Popover/index.d.ts +93 -207
- package/dist/Prebuilt/provider/roomLayoutProvider/constants/index.d.ts +2 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +9 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +9 -0
- package/dist/Progress/index.d.ts +62 -138
- package/dist/RadioGroup/RadioGroup.d.ts +93 -207
- package/dist/ReactSelect/ReactSelect.d.ts +310 -690
- package/dist/Select/Select.d.ts +93 -207
- package/dist/Slider/Slider.d.ts +31 -69
- package/dist/Stats/StyledStats.d.ts +186 -414
- package/dist/Switch/Switch.d.ts +31 -69
- package/dist/Tabs/Tabs.d.ts +124 -276
- package/dist/Text/Text.d.ts +31 -69
- package/dist/Theme/ThemeProvider.d.ts +63 -140
- package/dist/Theme/base.config.d.ts +31 -53
- package/dist/Theme/index.d.ts +0 -1
- package/dist/Theme/stitches.config.d.ts +404 -915
- package/dist/TileMenu/StyledMenuTile.d.ts +217 -483
- package/dist/Toast/Toast.d.ts +187 -415
- package/dist/Video/Video.d.ts +31 -69
- package/dist/VideoList/StyledVideoList.d.ts +93 -207
- package/dist/VideoTile/StyledVideoTile.d.ts +279 -621
- package/dist/{VirtualBackground-HWU22Q6S.js → VirtualBackground-ZRRE4DUA.js} +4 -3
- package/dist/{VirtualBackground-HWU22Q6S.js.map → VirtualBackground-ZRRE4DUA.js.map} +2 -2
- package/dist/{chunk-4VY5NUK7.js → chunk-4ISMCWQA.js} +49 -146
- package/dist/chunk-4ISMCWQA.js.map +7 -0
- package/dist/{chunk-TEHZYXCJ.js → chunk-KKLZ7K2L.js} +167 -164
- package/dist/chunk-KKLZ7K2L.js.map +7 -0
- package/dist/chunk-LUND6FLY.js +8626 -0
- package/dist/chunk-LUND6FLY.js.map +7 -0
- package/dist/chunk-MYK3T45M.js +58 -0
- package/dist/chunk-MYK3T45M.js.map +7 -0
- package/dist/{chunk-A2PNZIK7.js → chunk-THORW2WT.js} +4 -4
- package/dist/{chunk-A2PNZIK7.js.map → chunk-THORW2WT.js.map} +1 -1
- package/dist/{conference-YHO2J3Z6.js → conference-5TDUAQ6K.js} +593 -532
- package/dist/conference-5TDUAQ6K.js.map +7 -0
- package/dist/{conference-LE4T3ZNF.css → conference-BDCDGBIS.css} +2 -2
- package/dist/{ActiveSpeakerView-LW4WDBC6.css.map → conference-BDCDGBIS.css.map} +2 -2
- package/dist/index.cjs.css +1 -1
- package/dist/index.cjs.css.map +2 -2
- package/dist/index.cjs.js +2952 -2662
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +1 -1
- package/dist/index.css.map +2 -2
- package/dist/index.js +4 -8
- package/dist/meta.cjs.json +750 -484
- package/dist/meta.esbuild.json +844 -581
- package/dist/{transcription-L6VBK75V.js → transcription-PYTSSAOB.js} +3 -3
- package/package.json +13 -9
- package/src/Accordion/Accordion.tsx +3 -3
- package/src/AudioLevel/AudioLevel.tsx +1 -1
- package/src/Avatar/Avatar.tsx +8 -3
- package/src/Button/Button.tsx +76 -20
- package/src/Checkbox/Checkbox.tsx +4 -4
- package/src/Collapsible/Collapsible.tsx +1 -1
- package/src/Divider/Divider.tsx +2 -2
- package/src/Divider/HorizontalDivider.stories.tsx +2 -2
- package/src/Divider/VerticalDivider.stories.tsx +1 -1
- package/src/Dropdown/Dropdown.stories.tsx +3 -3
- package/src/Dropdown/Dropdown.tsx +16 -14
- package/src/IconButton/IconButton.tsx +8 -7
- package/src/Input/Input.tsx +9 -8
- package/src/Input/PasswordInput.stories.tsx +2 -2
- package/src/Label/Label.tsx +1 -1
- package/src/Link/Link.tsx +4 -4
- package/src/Loading/Loading.tsx +7 -10
- package/src/Modal/Dialog.stories.tsx +2 -2
- package/src/Modal/DialogContent.tsx +3 -3
- package/src/Pagination/StyledPagination.tsx +4 -4
- package/src/Popover/Popover.stories.tsx +5 -5
- package/src/Popover/index.tsx +1 -1
- package/src/Prebuilt/App.jsx +101 -68
- package/src/Prebuilt/IconButton.jsx +2 -2
- package/src/Prebuilt/Prebuilt.stories.tsx +8 -2
- package/src/Prebuilt/common/constants.js +0 -1
- package/src/Prebuilt/common/utils.js +0 -6
- package/src/Prebuilt/components/AppData/AppData.jsx +7 -4
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -4
- package/src/Prebuilt/components/AudioVideoToggle.jsx +73 -20
- package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.jsx +1 -1
- package/src/Prebuilt/components/Chat/Chat.jsx +6 -2
- package/src/Prebuilt/components/Chat/ChatBody.jsx +13 -11
- package/src/Prebuilt/components/Chat/ChatFooter.jsx +2 -2
- package/src/Prebuilt/components/Chat/ChatHeader.jsx +3 -3
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +2 -2
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +6 -6
- package/src/Prebuilt/components/Chip.jsx +24 -0
- package/src/Prebuilt/components/Connection/ConnectionIndicator.jsx +6 -6
- package/src/Prebuilt/components/Connection/TileConnection.jsx +2 -2
- package/src/Prebuilt/components/Connection/connectionQualityUtils.js +4 -4
- package/src/Prebuilt/components/EmojiReaction.jsx +13 -10
- package/src/Prebuilt/components/ErrorBoundary.jsx +2 -2
- package/src/Prebuilt/components/FullPageProgress.jsx +5 -3
- package/src/Prebuilt/components/GoLiveButton.jsx +1 -4
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +2 -2
- package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
- package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +3 -3
- package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -1
- package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +1 -1
- package/src/Prebuilt/components/Header/AdditionalRoomState.jsx +17 -17
- package/src/Prebuilt/components/Header/AmbientMusic.jsx +1 -1
- package/src/Prebuilt/components/Header/ConferencingHeader.jsx +4 -6
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +10 -5
- package/src/Prebuilt/components/Header/ParticipantFilter.jsx +2 -2
- package/src/Prebuilt/components/Header/ParticipantList.jsx +2 -2
- package/src/Prebuilt/components/Header/StreamActions.jsx +9 -19
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +5 -6
- package/src/Prebuilt/components/HlsStatsOverlay.jsx +2 -2
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +102 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.stories.tsx +40 -0
- package/src/Prebuilt/components/LeaveRoom.jsx +11 -11
- package/src/Prebuilt/components/MetaActions.jsx +2 -2
- package/src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx +2 -2
- package/src/Prebuilt/components/MoreSettings/ChangeSelfRole.jsx +1 -1
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +1 -0
- package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +69 -0
- package/src/Prebuilt/components/Notifications/Notifications.jsx +1 -3
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +108 -26
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +1 -1
- package/src/Prebuilt/components/PIP/pipUtils.js +2 -2
- package/src/Prebuilt/components/Playlist/Playlist.jsx +4 -4
- package/src/Prebuilt/components/Playlist/PlaylistControls.jsx +3 -3
- package/src/Prebuilt/components/Playlist/PlaylistItem.jsx +3 -3
- package/src/Prebuilt/components/Playlist/VideoPlayer.jsx +4 -4
- package/src/Prebuilt/components/PostLeave.jsx +4 -4
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +17 -6
- package/src/Prebuilt/components/Preview/PreviewForm.jsx +74 -0
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +100 -37
- package/src/Prebuilt/components/RoleChangeModal.jsx +3 -3
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +2 -2
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +3 -9
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +8 -32
- package/src/Prebuilt/components/Settings/StartRecording.jsx +4 -12
- package/src/Prebuilt/components/Settings/SwitchWithLabel.jsx +2 -3
- package/src/Prebuilt/components/Settings/common.js +26 -0
- package/src/Prebuilt/components/StatsForNerds.jsx +5 -5
- package/src/Prebuilt/components/Streaming/Common.jsx +11 -11
- package/src/Prebuilt/components/Streaming/HLSStreaming.jsx +6 -12
- package/src/Prebuilt/components/Streaming/RTMPStreaming.jsx +4 -6
- package/src/Prebuilt/components/Streaming/StreamingLanding.jsx +4 -4
- package/src/Prebuilt/components/TileMenu.jsx +7 -7
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +12 -20
- package/src/Prebuilt/components/conference.jsx +9 -2
- package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +1 -4
- package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +2 -2
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +1 -1
- package/src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx +1 -1
- package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +2 -2
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +12 -20
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +4 -4
- package/src/Prebuilt/images/Logo.svg +8 -0
- package/src/Prebuilt/images/first_person.png +0 -0
- package/src/Prebuilt/images/rtmp.png +0 -0
- package/src/Prebuilt/index.d.ts +6 -1
- package/src/Prebuilt/layouts/HLSView.jsx +1 -1
- package/src/Prebuilt/layouts/InsetView.jsx +0 -3
- package/src/Prebuilt/layouts/NonPublisherView.jsx +2 -2
- package/src/Prebuilt/layouts/SidePane.jsx +1 -1
- package/src/Prebuilt/layouts/WaitingView.jsx +2 -2
- package/src/Prebuilt/layouts/mainView.jsx +42 -5
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +2 -2
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -0
- package/src/Prebuilt/plugins/whiteboard/ToggleWhiteboard.jsx +1 -3
- package/src/Prebuilt/primitives/DialogContent.jsx +4 -4
- package/src/Prebuilt/primitives/DropdownTrigger.jsx +3 -3
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +33 -0
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +57 -0
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +26 -0
- package/src/Progress/index.tsx +2 -2
- package/src/RadioGroup/RadioGroup.tsx +3 -3
- package/src/ReactSelect/ReactSelect.stories.tsx +7 -7
- package/src/ReactSelect/ReactSelect.tsx +8 -8
- package/src/Select/Select.tsx +6 -6
- package/src/Slider/Slider.tsx +5 -5
- package/src/Stats/Stats.tsx +12 -2
- package/src/Stats/StyledStats.tsx +3 -3
- package/src/Switch/Switch.tsx +5 -5
- package/src/Tabs/Tabs.stories.tsx +2 -2
- package/src/Tabs/Tabs.tsx +2 -2
- package/src/Text/Text.tsx +2 -2
- package/src/Theme/ThemeProvider.tsx +4 -7
- package/src/Theme/ThemeStory.jsx +17 -19
- package/src/Theme/base.config.ts +31 -59
- package/src/Theme/index.tsx +0 -1
- package/src/Theme/stitches.config.ts +2 -7
- package/src/TileMenu/StyledMenuTile.tsx +9 -8
- package/src/Toast/Toast.tsx +10 -9
- package/src/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/Tooltip/Tooltip.tsx +4 -4
- package/src/Video/Video.tsx +1 -1
- package/src/VideoTile/StyledVideoTile.tsx +12 -12
- package/src/assets/android-perm-0.png +0 -0
- package/src/assets/android-perm-1.png +0 -0
- package/src/assets/ios-perm-0.png +0 -0
- package/src/fixtures/chats.ts +1 -1
- package/dist/HLSView-ZYNT3HJD.js.map +0 -7
- package/dist/Theme/themes.d.ts +0 -64
- package/dist/chunk-4VY5NUK7.js.map +0 -7
- package/dist/chunk-BSQIN5RC.js +0 -65
- package/dist/chunk-BSQIN5RC.js.map +0 -7
- package/dist/chunk-TEHZYXCJ.js.map +0 -7
- package/dist/chunk-ZET2HMGS.js +0 -8331
- package/dist/chunk-ZET2HMGS.js.map +0 -7
- package/dist/conference-YHO2J3Z6.js.map +0 -7
- package/src/Prebuilt/components/Preview/PreviewName.jsx +0 -37
- package/src/Prebuilt/components/Streaming/RTMPIcon.jsx +0 -69
- package/src/Prebuilt/hms.js +0 -7
- package/src/Prebuilt/plugins/confetti.jsx +0 -60
- package/src/Theme/themes.ts +0 -70
- /package/dist/{ActiveSpeakerView-G32BDM5F.js.map → ActiveSpeakerView-4XPIRZOK.js.map} +0 -0
- /package/dist/{PinnedTrackView-GTXL2UTS.js.map → PinnedTrackView-GGTCNH5V.js.map} +0 -0
- /package/dist/{transcription-L6VBK75V.js.map → transcription-PYTSSAOB.js.map} +0 -0
@@ -1,16 +1,20 @@
|
|
1
|
-
import React, { Suspense, useEffect } from 'react';
|
1
|
+
import React, { Suspense, useCallback, useEffect } from 'react';
|
2
|
+
import { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';
|
2
3
|
import {
|
3
4
|
selectIsConnectedToRoom,
|
4
5
|
selectLocalPeerRoleName,
|
5
6
|
selectPeerScreenSharing,
|
6
7
|
selectPeerSharingAudio,
|
7
8
|
selectPeerSharingVideoPlaylist,
|
9
|
+
selectPermissions,
|
8
10
|
selectTemplateAppData,
|
9
11
|
useHMSActions,
|
10
12
|
useHMSStore,
|
13
|
+
useRecordingStreaming,
|
11
14
|
} from '@100mslive/react-sdk';
|
12
15
|
import FullPageProgress from '../components/FullPageProgress';
|
13
16
|
import { Flex } from '../../Layout';
|
17
|
+
import { useRoomLayout } from '../provider/roomLayoutProvider';
|
14
18
|
import { EmbedView } from './EmbedView';
|
15
19
|
import { InsetView } from './InsetView';
|
16
20
|
import { MainGridView } from './mainGridView';
|
@@ -25,11 +29,12 @@ import {
|
|
25
29
|
useIsHeadless,
|
26
30
|
usePDFAnnotator,
|
27
31
|
usePinnedTrack,
|
32
|
+
useSetAppDataByKey,
|
28
33
|
useUISettings,
|
29
34
|
useUrlToEmbed,
|
30
35
|
useWaitingViewerRole,
|
31
36
|
} from '../components/AppData/useUISettings';
|
32
|
-
import { SESSION_STORE_KEY, UI_MODE_ACTIVE_SPEAKER } from '../common/constants';
|
37
|
+
import { APP_DATA, SESSION_STORE_KEY, UI_MODE_ACTIVE_SPEAKER } from '../common/constants';
|
33
38
|
|
34
39
|
// const WhiteboardView = React.lazy(() => import("./WhiteboardView"));
|
35
40
|
const HLSView = React.lazy(() => import('./HLSView'));
|
@@ -52,7 +57,30 @@ export const ConferenceMainView = () => {
|
|
52
57
|
const hlsViewerRole = useHLSViewerRole();
|
53
58
|
const waitingViewerRole = useWaitingViewerRole();
|
54
59
|
const urlToIframe = useUrlToEmbed();
|
55
|
-
const
|
60
|
+
const pdfAnnotatorActive = usePDFAnnotator();
|
61
|
+
|
62
|
+
const { isHLSRunning } = useRecordingStreaming();
|
63
|
+
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
64
|
+
const permissions = useHMSStore(selectPermissions);
|
65
|
+
const roomLayout = useRoomLayout();
|
66
|
+
const { join_form: joinForm = {} } = roomLayout?.screens?.preview?.default?.elements || {};
|
67
|
+
|
68
|
+
const startHLS = useCallback(async () => {
|
69
|
+
try {
|
70
|
+
if (isHLSStarted) {
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
setHLSStarted(true);
|
74
|
+
await hmsActions.startHLSStreaming({});
|
75
|
+
} catch (error) {
|
76
|
+
if (error.message.includes('invalid input')) {
|
77
|
+
await startHLS();
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
setHLSStarted(false);
|
81
|
+
}
|
82
|
+
}, [hmsActions, isHLSStarted, setHLSStarted]);
|
83
|
+
|
56
84
|
useEffect(() => {
|
57
85
|
if (!isConnected) {
|
58
86
|
return;
|
@@ -66,8 +94,17 @@ export const ConferenceMainView = () => {
|
|
66
94
|
hmsActions.audioPlaylist.setList(audioPlaylist);
|
67
95
|
}
|
68
96
|
|
97
|
+
// Is a streaming kit and broadcaster joins
|
98
|
+
if (
|
99
|
+
permissions?.hlsStreaming &&
|
100
|
+
!isHLSRunning &&
|
101
|
+
joinForm.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE
|
102
|
+
) {
|
103
|
+
startHLS();
|
104
|
+
}
|
105
|
+
|
69
106
|
hmsActions.sessionStore.observe([SESSION_STORE_KEY.PINNED_MESSAGE, SESSION_STORE_KEY.SPOTLIGHT]);
|
70
|
-
}, [isConnected, hmsActions]);
|
107
|
+
}, [isConnected, hmsActions, permissions, joinForm]);
|
71
108
|
|
72
109
|
if (!localPeerRole) {
|
73
110
|
// we don't know the role yet to decide how to render UI
|
@@ -79,7 +116,7 @@ export const ConferenceMainView = () => {
|
|
79
116
|
ViewComponent = HLSView;
|
80
117
|
} else if (localPeerRole === waitingViewerRole) {
|
81
118
|
ViewComponent = WaitingView;
|
82
|
-
} else if (
|
119
|
+
} else if (pdfAnnotatorActive) {
|
83
120
|
ViewComponent = PDFView;
|
84
121
|
} else if (urlToIframe) {
|
85
122
|
ViewComponent = EmbedView;
|
@@ -110,7 +110,7 @@ export function FlyingEmoji() {
|
|
110
110
|
css={{
|
111
111
|
width: 'fit-content',
|
112
112
|
padding: '$2 $4',
|
113
|
-
background: '$
|
113
|
+
background: '$surface_bright',
|
114
114
|
borderRadius: '$1',
|
115
115
|
}}
|
116
116
|
>
|
@@ -118,7 +118,7 @@ export function FlyingEmoji() {
|
|
118
118
|
css={{
|
119
119
|
fontSize: '$space$6',
|
120
120
|
lineHeight: '$xs',
|
121
|
-
color: '$
|
121
|
+
color: '$on_surface_high',
|
122
122
|
}}
|
123
123
|
>
|
124
124
|
{emoji.senderName}
|
@@ -25,9 +25,7 @@ export const ToggleWhiteboard = () => {
|
|
25
25
|
|
26
26
|
return (
|
27
27
|
<Tooltip
|
28
|
-
title={
|
29
|
-
whiteboardActive ? (amIWhiteboardOwner ? `Stop whiteboard` : `Can't stop whiteboard`) : 'Start whiteboard'
|
30
|
-
}`}
|
28
|
+
title={whiteboardActive ? (amIWhiteboardOwner ? `Stop whiteboard` : `Can't stop whiteboard`) : 'Start whiteboard'}
|
31
29
|
key="whiteboard"
|
32
30
|
>
|
33
31
|
<IconButton
|
@@ -21,7 +21,7 @@ export const DialogContent = ({ Icon, title, closeable = true, children, css, ic
|
|
21
21
|
<Flex justify="between">
|
22
22
|
<Flex align="center" css={{ mb: '$1' }}>
|
23
23
|
{Icon ? (
|
24
|
-
<Box css={{ mr: '$2', color: '$
|
24
|
+
<Box css={{ mr: '$2', color: '$on_primary_high', ...iconCSS }}>
|
25
25
|
<Icon />
|
26
26
|
</Box>
|
27
27
|
) : null}
|
@@ -49,7 +49,7 @@ export const ErrorDialog = ({ open = true, onOpenChange, title, children, ...pro
|
|
49
49
|
onEscapeKeyDown={e => e.preventDefault()}
|
50
50
|
onPointerDownOutside={e => e.preventDefault()}
|
51
51
|
closeable={false}
|
52
|
-
iconCSS={{ color: '$
|
52
|
+
iconCSS={{ color: '$alert_error_default' }}
|
53
53
|
{...props}
|
54
54
|
>
|
55
55
|
<Box css={{ mt: '$lg' }}>{children}</Box>
|
@@ -73,7 +73,7 @@ export const RequestDialog = ({ open = true, onOpenChange, title, body, actionTe
|
|
73
73
|
fontWeight: 400,
|
74
74
|
mt: '$4',
|
75
75
|
mb: '$10',
|
76
|
-
c: '$
|
76
|
+
c: '$on_surface_medium',
|
77
77
|
}}
|
78
78
|
>
|
79
79
|
{body}
|
@@ -195,7 +195,7 @@ export const DialogInputFile = ({ value, onChange, placeholder, disabled, type,
|
|
195
195
|
position: 'relative',
|
196
196
|
cursor: 'pointer',
|
197
197
|
py: '$12',
|
198
|
-
border: '1px dashed $
|
198
|
+
border: '1px dashed $border_bright',
|
199
199
|
r: '$1',
|
200
200
|
height: 'max(140px, 30%)',
|
201
201
|
alignItems: 'center',
|
@@ -8,8 +8,8 @@ const DialogDropdownTrigger = React.forwardRef(({ title, css, open, icon, titleC
|
|
8
8
|
asChild
|
9
9
|
data-testid={`${title}_selector`}
|
10
10
|
css={{
|
11
|
-
border: '1px solid $
|
12
|
-
bg: '$
|
11
|
+
border: '1px solid $border_bright',
|
12
|
+
bg: '$surface_bright',
|
13
13
|
r: '$1',
|
14
14
|
p: '$6 $9',
|
15
15
|
zIndex: 10,
|
@@ -21,7 +21,7 @@ const DialogDropdownTrigger = React.forwardRef(({ title, css, open, icon, titleC
|
|
21
21
|
css={{
|
22
22
|
display: 'flex',
|
23
23
|
justifyContent: 'space-between',
|
24
|
-
color: '$
|
24
|
+
color: '$on_surface_high',
|
25
25
|
w: '100%',
|
26
26
|
}}
|
27
27
|
>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import type { Layout } from '@100mslive/types-prebuilt';
|
2
|
+
import { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';
|
3
|
+
|
4
|
+
export const defaultLayout: Layout = {
|
5
|
+
id: '',
|
6
|
+
role_id: '',
|
7
|
+
template_id: '',
|
8
|
+
app_id: '',
|
9
|
+
typography: {
|
10
|
+
font_family: 'Inter',
|
11
|
+
},
|
12
|
+
themes: [],
|
13
|
+
options: {},
|
14
|
+
screens: {
|
15
|
+
preview: {
|
16
|
+
default: {
|
17
|
+
elements: {
|
18
|
+
preview_header: {
|
19
|
+
title: 'Get Started',
|
20
|
+
sub_title: 'Setup your audio and video before joining',
|
21
|
+
},
|
22
|
+
join_form: {
|
23
|
+
join_btn_type: JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE,
|
24
|
+
join_btn_label: 'Join Now',
|
25
|
+
go_live_btn_label: 'Go Live',
|
26
|
+
},
|
27
|
+
},
|
28
|
+
},
|
29
|
+
},
|
30
|
+
conferencing: {},
|
31
|
+
leave: {},
|
32
|
+
},
|
33
|
+
};
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
2
|
+
import type { GetResponse, Layout } from '@100mslive/types-prebuilt';
|
3
|
+
import { defaultLayout } from '../constants';
|
4
|
+
|
5
|
+
// TODO: remove this usage
|
6
|
+
const fetchWithRetry = async (url = '', options = {}) => {
|
7
|
+
const MAX_RETRIES = 4;
|
8
|
+
let error = Error('something went wrong');
|
9
|
+
for (let i = 0; i < MAX_RETRIES; i++) {
|
10
|
+
try {
|
11
|
+
return await fetch(url, options);
|
12
|
+
} catch (err) {
|
13
|
+
error = err as Error;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
console.error('Fetch failed after max retries', { url, options });
|
17
|
+
throw error;
|
18
|
+
};
|
19
|
+
|
20
|
+
// this should take endpoint and return
|
21
|
+
export type useFetchRoomLayoutProps = {
|
22
|
+
endpoint?: string;
|
23
|
+
authToken: string;
|
24
|
+
};
|
25
|
+
|
26
|
+
export type useFetchRoomLayoutResponse = {
|
27
|
+
layout: Layout | undefined;
|
28
|
+
};
|
29
|
+
|
30
|
+
export const useFetchRoomLayout = ({
|
31
|
+
endpoint = '',
|
32
|
+
authToken = '',
|
33
|
+
}: useFetchRoomLayoutProps): useFetchRoomLayoutResponse => {
|
34
|
+
const [layout, setLayout] = useState<Layout | undefined>(undefined);
|
35
|
+
const isFetchInProgress = useRef(false);
|
36
|
+
useEffect(() => {
|
37
|
+
(async () => {
|
38
|
+
if (isFetchInProgress.current || !authToken) {
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
if (!endpoint) {
|
42
|
+
setLayout(defaultLayout);
|
43
|
+
}
|
44
|
+
isFetchInProgress.current = true;
|
45
|
+
const resp = await fetchWithRetry(endpoint, {
|
46
|
+
headers: {
|
47
|
+
Authorization: `Bearer ${authToken}`,
|
48
|
+
},
|
49
|
+
});
|
50
|
+
const layoutResp: GetResponse = await resp.json();
|
51
|
+
setLayout(layoutResp.data[0]);
|
52
|
+
isFetchInProgress.current = false;
|
53
|
+
})();
|
54
|
+
}, [authToken, endpoint]);
|
55
|
+
|
56
|
+
return { layout };
|
57
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { Layout } from '@100mslive/types-prebuilt';
|
3
|
+
import merge from 'lodash.merge';
|
4
|
+
// @ts-ignore: fix types
|
5
|
+
import { useAuthToken } from '../../components/AppData/useUISettings';
|
6
|
+
import { useFetchRoomLayout } from './hooks/useFetchRoomLayout';
|
7
|
+
|
8
|
+
export type RoomLayoutProviderProps = {
|
9
|
+
roomLayoutEndpoint?: string;
|
10
|
+
overrideLayout?: Layout;
|
11
|
+
};
|
12
|
+
|
13
|
+
export const RoomLayoutContext = React.createContext<Layout | undefined>(undefined);
|
14
|
+
|
15
|
+
export const RoomLayoutProvider: React.FC<React.PropsWithChildren<RoomLayoutProviderProps>> = ({
|
16
|
+
children,
|
17
|
+
roomLayoutEndpoint,
|
18
|
+
overrideLayout,
|
19
|
+
}) => {
|
20
|
+
const authToken: string = useAuthToken();
|
21
|
+
let { layout } = useFetchRoomLayout({ authToken, endpoint: roomLayoutEndpoint });
|
22
|
+
layout = merge(layout, overrideLayout);
|
23
|
+
return <RoomLayoutContext.Provider value={layout}>{children}</RoomLayoutContext.Provider>;
|
24
|
+
};
|
25
|
+
|
26
|
+
export const useRoomLayout = (): Layout | undefined => React.useContext(RoomLayoutContext);
|
package/src/Progress/index.tsx
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { Indicator, Root } from '@radix-ui/react-progress';
|
2
2
|
import { styled } from '../Theme';
|
3
3
|
|
4
|
-
const StyledIndicator = styled(Indicator, { h: '$4', backgroundColor: '$
|
4
|
+
const StyledIndicator = styled(Indicator, { h: '$4', backgroundColor: '$primary_default' });
|
5
5
|
|
6
6
|
const StyledRoot = styled(Root, {
|
7
7
|
w: '100%',
|
8
8
|
h: '$4',
|
9
9
|
borderRadius: '$round',
|
10
|
-
backgroundColor: '$
|
10
|
+
backgroundColor: '$secondary_dim',
|
11
11
|
overflow: 'hidden',
|
12
12
|
});
|
13
13
|
|
@@ -7,10 +7,10 @@ const RadioGroupRoot = styled(RadioGroupPrimitive.Root, {
|
|
7
7
|
});
|
8
8
|
|
9
9
|
const RadioGroupItem = styled(RadioGroupPrimitive.Item, {
|
10
|
-
bg: '$
|
10
|
+
bg: '$on_primary_high',
|
11
11
|
width: '$8',
|
12
12
|
height: '$8',
|
13
|
-
border: '1px solid $
|
13
|
+
border: '1px solid $primary_default',
|
14
14
|
cursor: 'pointer',
|
15
15
|
borderRadius: '$round',
|
16
16
|
'&:focus': {
|
@@ -23,7 +23,7 @@ const RadioGroupItem = styled(RadioGroupPrimitive.Item, {
|
|
23
23
|
},
|
24
24
|
});
|
25
25
|
const RadioGroupIndicator = styled(RadioGroupPrimitive.Indicator, {
|
26
|
-
bg: '$
|
26
|
+
bg: '$primary_default',
|
27
27
|
});
|
28
28
|
|
29
29
|
export const RadioGroup = {
|
@@ -37,14 +37,14 @@ const data: {
|
|
37
37
|
const Template: ComponentStory<typeof Select.Root> = () => {
|
38
38
|
return (
|
39
39
|
<Select.Root defaultValue="blueberry">
|
40
|
-
<Select.Trigger css={{ bg: '$
|
40
|
+
<Select.Trigger css={{ bg: '$background_dim' }}>
|
41
41
|
<Select.Value />
|
42
|
-
<Flex css={{ color: '$
|
42
|
+
<Flex css={{ color: '$on_primary_high' }}>
|
43
43
|
<ChevronDownIcon />
|
44
44
|
</Flex>
|
45
45
|
</Select.Trigger>
|
46
46
|
<Select.Content>
|
47
|
-
<Select.ScrollUpButton css={{ color: '$
|
47
|
+
<Select.ScrollUpButton css={{ color: '$on_primary_high' }}>
|
48
48
|
<ChevronUpIcon />
|
49
49
|
</Select.ScrollUpButton>
|
50
50
|
<Select.Viewport>
|
@@ -52,7 +52,7 @@ const Template: ComponentStory<typeof Select.Root> = () => {
|
|
52
52
|
<>
|
53
53
|
<Select.Group>
|
54
54
|
<Select.Label>
|
55
|
-
<Text variant="xs" css={{ color: '$
|
55
|
+
<Text variant="xs" css={{ color: '$on_primary_medium' }}>
|
56
56
|
{item}
|
57
57
|
</Text>
|
58
58
|
</Select.Label>
|
@@ -61,17 +61,17 @@ const Template: ComponentStory<typeof Select.Root> = () => {
|
|
61
61
|
<Select.ItemText>
|
62
62
|
<Text variant="md">{type?.name}</Text>
|
63
63
|
</Select.ItemText>
|
64
|
-
<Select.ItemIndicator css={{ color: '$
|
64
|
+
<Select.ItemIndicator css={{ color: '$on_primary_high' }}>
|
65
65
|
<CheckIcon />
|
66
66
|
</Select.ItemIndicator>
|
67
67
|
</Select.Item>
|
68
68
|
))}
|
69
69
|
</Select.Group>
|
70
|
-
{index < Object.keys(data).length - 1 && <Select.Separator css={{ bg: '$
|
70
|
+
{index < Object.keys(data).length - 1 && <Select.Separator css={{ bg: '$border_default' }} />}
|
71
71
|
</>
|
72
72
|
))}
|
73
73
|
</Select.Viewport>
|
74
|
-
<Select.ScrollDownButton css={{ color: '$
|
74
|
+
<Select.ScrollDownButton css={{ color: '$on_primary_high' }}>
|
75
75
|
<ChevronDownIcon />
|
76
76
|
</Select.ScrollDownButton>
|
77
77
|
</Select.Content>
|
@@ -12,8 +12,8 @@ const StyledTrigger = styled(SelectPrimitive.SelectTrigger, {
|
|
12
12
|
padding: '$8',
|
13
13
|
lineHeight: '$px',
|
14
14
|
gap: '$8',
|
15
|
-
backgroundColor: '$
|
16
|
-
color: '$
|
15
|
+
backgroundColor: '$secondary_default',
|
16
|
+
color: '$on_primary_high',
|
17
17
|
fontSize: '$8',
|
18
18
|
cursor: 'pointer',
|
19
19
|
r: '$1',
|
@@ -21,7 +21,7 @@ const StyledTrigger = styled(SelectPrimitive.SelectTrigger, {
|
|
21
21
|
|
22
22
|
const StyledContent = styled(SelectPrimitive.Content, {
|
23
23
|
overflow: 'hidden',
|
24
|
-
backgroundColor: '$
|
24
|
+
backgroundColor: '$surface_bright',
|
25
25
|
r: '$1',
|
26
26
|
h: '$80',
|
27
27
|
});
|
@@ -45,12 +45,12 @@ const StyledItem = styled(SelectPrimitive.Item, {
|
|
45
45
|
const StyledLabel = styled(SelectPrimitive.Label, {
|
46
46
|
p: '$4 $8',
|
47
47
|
lineHeight: '$10',
|
48
|
-
color: '$
|
48
|
+
color: '$on_primary_high',
|
49
49
|
});
|
50
50
|
|
51
51
|
const StyledSeparator = styled(SelectPrimitive.Separator, {
|
52
52
|
height: '$px',
|
53
|
-
backgroundColor: '$
|
53
|
+
backgroundColor: '$on_primary_high',
|
54
54
|
margin: '$4',
|
55
55
|
opacity: 0.4,
|
56
56
|
});
|
@@ -62,7 +62,7 @@ const StyledItemIndicator = styled(SelectPrimitive.ItemIndicator, {
|
|
62
62
|
display: 'inline-flex',
|
63
63
|
alignItems: 'center',
|
64
64
|
justifyContent: 'center',
|
65
|
-
color: '$
|
65
|
+
color: '$on_primary_high',
|
66
66
|
});
|
67
67
|
|
68
68
|
const scrollButtonStyles = {
|
@@ -70,8 +70,8 @@ const scrollButtonStyles = {
|
|
70
70
|
alignItems: 'center',
|
71
71
|
justifyContent: 'center',
|
72
72
|
p: '$4',
|
73
|
-
backgroundColor: '$
|
74
|
-
color: '$
|
73
|
+
backgroundColor: '$surface_bright',
|
74
|
+
color: '$on_primary_high',
|
75
75
|
cursor: 'default',
|
76
76
|
};
|
77
77
|
|
package/src/Select/Select.tsx
CHANGED
@@ -3,13 +3,13 @@ import { ChevronDownIcon } from '@100mslive/react-icons';
|
|
3
3
|
import { styled } from '../Theme';
|
4
4
|
|
5
5
|
const Root = styled('div', {
|
6
|
-
color: '$
|
6
|
+
color: '$on_primary_high',
|
7
7
|
display: 'inline-flex',
|
8
8
|
position: 'relative',
|
9
9
|
outline: 'none',
|
10
10
|
overflow: 'hidden',
|
11
11
|
borderRadius: '$1',
|
12
|
-
backgroundColor: '$
|
12
|
+
backgroundColor: '$surface_default',
|
13
13
|
maxWidth: '100%',
|
14
14
|
});
|
15
15
|
|
@@ -21,15 +21,15 @@ const SelectRoot = styled('select', {
|
|
21
21
|
lineHeight: 'inherit',
|
22
22
|
textTransform: 'none',
|
23
23
|
appearance: 'none',
|
24
|
-
color: '$
|
24
|
+
color: '$on_secondary_high',
|
25
25
|
padding: '5px',
|
26
26
|
paddingLeft: '12px',
|
27
27
|
paddingRight: '30px',
|
28
28
|
border: 'none',
|
29
29
|
borderRadius: '8px',
|
30
|
-
backgroundColor: '$
|
30
|
+
backgroundColor: '$secondary_default',
|
31
31
|
'&:not([disabled]):focus-visible': {
|
32
|
-
boxShadow: '0 0 0 3px $colors$
|
32
|
+
boxShadow: '0 0 0 3px $colors$primary_default',
|
33
33
|
},
|
34
34
|
'&[disabled]': {
|
35
35
|
opacity: 0.5,
|
@@ -38,7 +38,7 @@ const SelectRoot = styled('select', {
|
|
38
38
|
});
|
39
39
|
|
40
40
|
const Arrow = styled('span', {
|
41
|
-
color: '$
|
41
|
+
color: '$on_secondary_high',
|
42
42
|
width: '30px',
|
43
43
|
height: '100%',
|
44
44
|
position: 'absolute',
|
package/src/Slider/Slider.tsx
CHANGED
@@ -17,7 +17,7 @@ const Root = styled(BaseSlider.Root, {
|
|
17
17
|
});
|
18
18
|
|
19
19
|
const Track = styled(BaseSlider.Track, {
|
20
|
-
backgroundColor: '$
|
20
|
+
backgroundColor: '$surface_bright',
|
21
21
|
position: 'relative',
|
22
22
|
flexGrow: 1,
|
23
23
|
borderRadius: '$round',
|
@@ -27,7 +27,7 @@ const Track = styled(BaseSlider.Track, {
|
|
27
27
|
|
28
28
|
const Range = styled(BaseSlider.Range, {
|
29
29
|
position: 'absolute',
|
30
|
-
backgroundColor: '$
|
30
|
+
backgroundColor: '$primary_default',
|
31
31
|
borderRadius: '$round',
|
32
32
|
height: '100%',
|
33
33
|
});
|
@@ -37,11 +37,11 @@ const Thumb = styled(BaseSlider.Thumb, {
|
|
37
37
|
display: 'block',
|
38
38
|
width: '$8',
|
39
39
|
height: '$8',
|
40
|
-
backgroundColor: '$
|
40
|
+
backgroundColor: '$primary_default',
|
41
41
|
cursor: 'pointer',
|
42
|
-
boxShadow: `0 2px 10px $colors$
|
42
|
+
boxShadow: `0 2px 10px $colors$surface_default`,
|
43
43
|
borderRadius: 10,
|
44
|
-
'&:hover': { backgroundColor: '$
|
44
|
+
'&:hover': { backgroundColor: '$primary_default' },
|
45
45
|
'&:focus': { boxShadow: 'none' },
|
46
46
|
});
|
47
47
|
|
package/src/Stats/Stats.tsx
CHANGED
@@ -120,7 +120,7 @@ export function VideoTileStats({ videoTrackID, audioTrackID, peerID, isLocal = f
|
|
120
120
|
value={formatBytes(audioTrackStats?.bitrate, 'b/s')}
|
121
121
|
/>
|
122
122
|
|
123
|
-
<StatsRow show={isNotNullish(downlinkScore)} label="Downlink" value={
|
123
|
+
<StatsRow show={isNotNullish(downlinkScore)} label="Downlink" value={downlinkScore} />
|
124
124
|
|
125
125
|
<StatsRow show={isNotNullish(videoTrackStats?.codec)} label="Codec(V)" value={videoTrackStats?.codec} />
|
126
126
|
|
@@ -174,7 +174,17 @@ const TrackPacketsLostRow = ({
|
|
174
174
|
);
|
175
175
|
};
|
176
176
|
|
177
|
-
const RawStatsRow = ({
|
177
|
+
const RawStatsRow = ({
|
178
|
+
label = '',
|
179
|
+
value = '',
|
180
|
+
tooltip = '',
|
181
|
+
show = true,
|
182
|
+
}: {
|
183
|
+
label: string;
|
184
|
+
value?: string | number;
|
185
|
+
show?: boolean;
|
186
|
+
tooltip?: string;
|
187
|
+
}) => {
|
178
188
|
const statsLabel = <Stats.Label css={{ fontWeight: !value ? '$semiBold' : '$regular' }}>{label}</Stats.Label>;
|
179
189
|
|
180
190
|
return (
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { styled } from '../Theme';
|
2
2
|
|
3
3
|
export const Root = styled('div', {
|
4
|
-
backgroundColor: '
|
4
|
+
backgroundColor: 'rgba(0,0,0,0.75)',
|
5
5
|
position: 'absolute',
|
6
6
|
top: '$3',
|
7
7
|
left: '$3',
|
@@ -26,12 +26,12 @@ export const Row = styled('tr', {
|
|
26
26
|
});
|
27
27
|
|
28
28
|
export const Label = styled('td', {
|
29
|
-
color: '$
|
29
|
+
color: '$on_primary_high',
|
30
30
|
fontWeight: '$regular',
|
31
31
|
});
|
32
32
|
|
33
33
|
export const Value = styled('td', {
|
34
|
-
color: '$
|
34
|
+
color: '$on_primary_high',
|
35
35
|
});
|
36
36
|
|
37
37
|
export const Gap = styled('tr', {
|
package/src/Switch/Switch.tsx
CHANGED
@@ -6,14 +6,14 @@ const SwitchRoot = styled(BaseSwitch.Root, {
|
|
6
6
|
all: 'unset',
|
7
7
|
width: '30px',
|
8
8
|
height: '14px',
|
9
|
-
border: 'solid $space$px $
|
9
|
+
border: 'solid $space$px $secondary_default',
|
10
10
|
borderRadius: '$3',
|
11
11
|
p: '$2',
|
12
12
|
position: 'relative',
|
13
13
|
cursor: 'pointer',
|
14
14
|
'&[data-state="checked"]': {
|
15
|
-
backgroundColor: '$
|
16
|
-
border: 'solid $space$px $
|
15
|
+
backgroundColor: '$primary_default',
|
16
|
+
border: 'solid $space$px $primary_default',
|
17
17
|
},
|
18
18
|
'&:focus': {
|
19
19
|
outline: 'none',
|
@@ -30,14 +30,14 @@ const SwitchThumb = styled(BaseSwitch.Thumb, {
|
|
30
30
|
position: 'absolute',
|
31
31
|
width: '$md',
|
32
32
|
height: '$md',
|
33
|
-
backgroundColor: '$
|
33
|
+
backgroundColor: '$secondary_default',
|
34
34
|
borderRadius: '$round',
|
35
35
|
transition: 'right 500ms ease-in',
|
36
36
|
left: '$2',
|
37
37
|
'&[data-state="checked"]': {
|
38
38
|
left: 'unset',
|
39
39
|
right: '$2',
|
40
|
-
backgroundColor: '$
|
40
|
+
backgroundColor: '$on_primary_high',
|
41
41
|
},
|
42
42
|
});
|
43
43
|
|
@@ -52,13 +52,13 @@ const Template: ComponentStory<typeof Tabs.Root> = ({
|
|
52
52
|
>
|
53
53
|
<Tabs.List
|
54
54
|
aria-label="tabs example"
|
55
|
-
css={{ bg: '$
|
55
|
+
css={{ bg: '$background_dim', r: '$1', '&[data-orientation="vertical"]': { flexDirection: 'column' } }}
|
56
56
|
>
|
57
57
|
<Tabs.Trigger value="tab1">One</Tabs.Trigger>
|
58
58
|
<Tabs.Trigger value="tab2">Two</Tabs.Trigger>
|
59
59
|
<Tabs.Trigger value="tab3">Three</Tabs.Trigger>
|
60
60
|
</Tabs.List>
|
61
|
-
<Box css={{ r: '$1', bg: '$
|
61
|
+
<Box css={{ r: '$1', bg: '$surface_brighter' }}>
|
62
62
|
<Tabs.Content value="tab1">
|
63
63
|
<Text>Tab one content</Text>
|
64
64
|
</Tabs.Content>
|
package/src/Tabs/Tabs.tsx
CHANGED
@@ -18,11 +18,11 @@ const StyledTrigger = styled(TabsPrimitive.Trigger, {
|
|
18
18
|
alignItems: 'center',
|
19
19
|
fontSize: '$sm',
|
20
20
|
lineHeight: '$sm',
|
21
|
-
color: '$
|
21
|
+
color: '$on_surface_high',
|
22
22
|
userSelect: 'none',
|
23
23
|
cursor: 'pointer',
|
24
24
|
'&[data-state="active"]': {
|
25
|
-
bg: '$
|
25
|
+
bg: '$surface_brighter',
|
26
26
|
r: '$1',
|
27
27
|
},
|
28
28
|
});
|
package/src/Text/Text.tsx
CHANGED
@@ -129,12 +129,12 @@ export const Text = styled('p', {
|
|
129
129
|
fontFamily: '$sans',
|
130
130
|
fontWeight: '$regular',
|
131
131
|
margin: 0,
|
132
|
-
color: '$
|
132
|
+
color: '$on_surface_high',
|
133
133
|
variants: {
|
134
134
|
variant: textVariants,
|
135
135
|
color: {
|
136
136
|
white: {
|
137
|
-
color: '$
|
137
|
+
color: '$on_surface_high',
|
138
138
|
},
|
139
139
|
},
|
140
140
|
inline: {
|