@100mslive/roomkit-react 0.1.1 → 0.1.2-alpha.1
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-N7C6WL27.js} +6 -6
- package/dist/{ActiveSpeakerView-LW4WDBC6.css → ActiveSpeakerView-ZOCC7LQW.css} +2 -2
- package/dist/{PinnedTrackView-OAA4HAID.css.map → ActiveSpeakerView-ZOCC7LQW.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-ZYNT3HJD.js → HLSView-3ILTIGBT.js} +16 -16
- package/dist/HLSView-3ILTIGBT.js.map +7 -0
- package/dist/{HLSView-DIQQF2PP.css → HLSView-OVDMVJX5.css} +2 -2
- package/dist/{HLSView-DIQQF2PP.css.map → HLSView-OVDMVJX5.css.map} +2 -2
- 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-GTXL2UTS.js → PinnedTrackView-6N6N5WOF.js} +6 -6
- package/dist/{PinnedTrackView-OAA4HAID.css → PinnedTrackView-RIL5IW5A.css} +2 -2
- package/dist/{conference-LE4T3ZNF.css.map → PinnedTrackView-RIL5IW5A.css.map} +2 -2
- 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-R3JHARN5.js} +4 -3
- package/dist/{VirtualBackground-HWU22Q6S.js.map → VirtualBackground-R3JHARN5.js.map} +2 -2
- package/dist/chunk-DH3QSV4E.js +58 -0
- package/dist/chunk-DH3QSV4E.js.map +7 -0
- package/dist/{chunk-4VY5NUK7.js → chunk-DRKV2LAC.js} +49 -146
- package/dist/chunk-DRKV2LAC.js.map +7 -0
- package/dist/{chunk-TEHZYXCJ.js → chunk-G56Z3JA5.js} +167 -164
- package/dist/chunk-G56Z3JA5.js.map +7 -0
- package/dist/{chunk-A2PNZIK7.js → chunk-INRXWU7L.js} +4 -4
- package/dist/{chunk-A2PNZIK7.js.map → chunk-INRXWU7L.js.map} +1 -1
- package/dist/chunk-TZJCHZPD.js +8626 -0
- package/dist/chunk-TZJCHZPD.js.map +7 -0
- package/dist/{conference-LE4T3ZNF.css → conference-AIOOA5ON.css} +2 -2
- package/dist/{ActiveSpeakerView-LW4WDBC6.css.map → conference-AIOOA5ON.css.map} +2 -2
- package/dist/{conference-YHO2J3Z6.js → conference-IKSFGLVK.js} +514 -629
- package/dist/conference-IKSFGLVK.js.map +7 -0
- package/dist/index.cjs.css +1 -1
- package/dist/index.cjs.css.map +2 -2
- package/dist/index.cjs.js +3022 -2927
- 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 +736 -588
- package/dist/meta.esbuild.json +837 -692
- package/dist/{transcription-L6VBK75V.js → transcription-XYVVYRAS.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/AppContext.jsx +1 -1
- 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/Footer/ConferencingFooter.jsx +1 -4
- 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 +102 -39
- 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-N7C6WL27.js.map} +0 -0
- /package/dist/{PinnedTrackView-GTXL2UTS.js.map → PinnedTrackView-6N6N5WOF.js.map} +0 -0
- /package/dist/{transcription-L6VBK75V.js.map → transcription-XYVVYRAS.js.map} +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
Box,
|
3
3
|
Text
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-INRXWU7L.js";
|
5
5
|
import {
|
6
6
|
IconButton_default,
|
7
7
|
SESSION_STORE_KEY,
|
@@ -12,7 +12,7 @@ import {
|
|
12
12
|
__spreadValues,
|
13
13
|
define_process_env_default,
|
14
14
|
init_define_process_env
|
15
|
-
} from "./chunk-
|
15
|
+
} from "./chunk-DRKV2LAC.js";
|
16
16
|
|
17
17
|
// src/Prebuilt/plugins/transcription/index.jsx
|
18
18
|
init_define_process_env();
|
@@ -353,4 +353,4 @@ function TranscriptionButton() {
|
|
353
353
|
export {
|
354
354
|
TranscriptionButton as default
|
355
355
|
};
|
356
|
-
//# sourceMappingURL=transcription-
|
356
|
+
//# sourceMappingURL=transcription-XYVVYRAS.js.map
|
package/package.json
CHANGED
@@ -4,7 +4,13 @@
|
|
4
4
|
"main": "dist/index.cjs.js",
|
5
5
|
"module": "dist/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
7
|
-
"
|
7
|
+
"keywords": [
|
8
|
+
"100mslive",
|
9
|
+
"react",
|
10
|
+
"prebuilt",
|
11
|
+
"roomkit"
|
12
|
+
],
|
13
|
+
"version": "0.1.2-alpha.1",
|
8
14
|
"author": "100ms",
|
9
15
|
"license": "MIT",
|
10
16
|
"files": [
|
@@ -69,10 +75,11 @@
|
|
69
75
|
"react": ">=17.0.2 <19.0.0"
|
70
76
|
},
|
71
77
|
"dependencies": {
|
72
|
-
"@100mslive/hls-player": "0.1.
|
73
|
-
"@100mslive/hms-virtual-background": "1.11.
|
74
|
-
"@100mslive/react-icons": "0.8.
|
75
|
-
"@100mslive/react-sdk": "0.8.
|
78
|
+
"@100mslive/hls-player": "0.1.11-alpha.1",
|
79
|
+
"@100mslive/hms-virtual-background": "1.11.11-alpha.1",
|
80
|
+
"@100mslive/react-icons": "0.8.11-alpha.1",
|
81
|
+
"@100mslive/react-sdk": "0.8.11-alpha.1",
|
82
|
+
"@100mslive/types-prebuilt": "0.8.0",
|
76
83
|
"@emoji-mart/data": "^1.0.6",
|
77
84
|
"@emoji-mart/react": "^1.0.1",
|
78
85
|
"@radix-ui/react-accordion": "1.0.0",
|
@@ -95,9 +102,7 @@
|
|
95
102
|
"emoji-mart": "^5.2.2",
|
96
103
|
"eventemitter2": "^6.4.7",
|
97
104
|
"hls.js": "^1.3.0",
|
98
|
-
"js-confetti": "^0.10.2",
|
99
105
|
"lodash.merge": "^4.6.2",
|
100
|
-
"mobx": "^6.3.12",
|
101
106
|
"pusher-js": "^7.0.3",
|
102
107
|
"qrcode.react": "^3.1.0",
|
103
108
|
"react-draggable": "^4.4.5",
|
@@ -109,9 +114,8 @@
|
|
109
114
|
"recordrtc": "^5.6.2",
|
110
115
|
"screenfull": "^5.1.0",
|
111
116
|
"uuid": "^8.3.2",
|
112
|
-
"web-vitals": "^1.0.1",
|
113
117
|
"worker-timers": "^7.0.40",
|
114
118
|
"zipyai": "^1.3.24"
|
115
119
|
},
|
116
|
-
"gitHead": "
|
120
|
+
"gitHead": "77689c9a3c78a96eee185867899d4374b7852879"
|
117
121
|
}
|
@@ -37,14 +37,14 @@ const StyledTrigger = styled(BaseAccordion.Trigger, {
|
|
37
37
|
justifyContent: 'space-between',
|
38
38
|
fontSize: '$md',
|
39
39
|
lineHeight: '$md',
|
40
|
-
color: '$
|
40
|
+
color: '$on_surface_high',
|
41
41
|
});
|
42
42
|
|
43
43
|
const StyledContent = styled(BaseAccordion.Content, {
|
44
44
|
display: 'contents',
|
45
45
|
fontSize: '$md',
|
46
46
|
fontFamily: '$sans',
|
47
|
-
color: '$
|
47
|
+
color: '$on_surface_medium',
|
48
48
|
'&[data-state="open"]': {
|
49
49
|
animation: `${slideDown('--radix-accordion-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,
|
50
50
|
},
|
@@ -54,7 +54,7 @@ const StyledContent = styled(BaseAccordion.Content, {
|
|
54
54
|
});
|
55
55
|
|
56
56
|
const StyledChevron = styled(ChevronUpIcon, {
|
57
|
-
color: '$
|
57
|
+
color: '$on_primary_high',
|
58
58
|
transition: 'transform 300ms cubic-bezier(0.87, 0, 0.13, 1)',
|
59
59
|
'[data-state=closed] &': { transform: 'rotate(180deg)' },
|
60
60
|
});
|
@@ -9,7 +9,7 @@ import { useTheme } from '../Theme';
|
|
9
9
|
*/
|
10
10
|
export function useBorderAudioLevel(audioTrackId?: HMSTrackID) {
|
11
11
|
const { theme } = useTheme();
|
12
|
-
const color = theme.colors.
|
12
|
+
const color = theme.colors.primary_default.value;
|
13
13
|
const getStyle = useCallback(
|
14
14
|
(level: number) => {
|
15
15
|
const style: Record<string, string> = {
|
package/src/Avatar/Avatar.tsx
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from '@stitches/react';
|
3
|
+
import { PersonIcon } from '@100mslive/react-icons';
|
3
4
|
import { styled } from '../Theme';
|
4
5
|
import { getAvatarBg } from './getAvatarBg';
|
5
6
|
import { flexCenter } from '../utils/styles';
|
@@ -10,7 +11,7 @@ const getAvatarShape = (radii: string) => ({
|
|
10
11
|
|
11
12
|
export const StyledAvatar = styled('div', {
|
12
13
|
...flexCenter,
|
13
|
-
color: '$
|
14
|
+
color: '$colors$on_primary_high',
|
14
15
|
fontFamily: '$sans',
|
15
16
|
aspectRatio: 1,
|
16
17
|
fontWeight: 600,
|
@@ -46,10 +47,14 @@ type Props = VariantProps<typeof StyledAvatar> &
|
|
46
47
|
};
|
47
48
|
|
48
49
|
export const Avatar: React.FC<Props> = ({ name, css, ...props }) => {
|
49
|
-
const { initials
|
50
|
+
const { initials } = getAvatarBg(name);
|
51
|
+
let { color } = getAvatarBg(name);
|
52
|
+
if (!name) {
|
53
|
+
color = '#7E47EB';
|
54
|
+
}
|
50
55
|
return (
|
51
56
|
<StyledAvatar css={{ bg: color, ...css }} {...props}>
|
52
|
-
{initials}
|
57
|
+
{initials || <PersonIcon height={40} width={40} />}
|
53
58
|
</StyledAvatar>
|
54
59
|
);
|
55
60
|
};
|
package/src/Button/Button.tsx
CHANGED
@@ -11,38 +11,52 @@ import { flexCenter } from '../utils/styles';
|
|
11
11
|
* @returns CSS object based on the state
|
12
12
|
*/
|
13
13
|
|
14
|
-
const getOutlinedVariants = (
|
14
|
+
const getOutlinedVariants = (
|
15
|
+
base: string,
|
16
|
+
hover: string,
|
17
|
+
active: string,
|
18
|
+
disabled: string,
|
19
|
+
text: string,
|
20
|
+
textDisabled: string,
|
21
|
+
) => {
|
15
22
|
return {
|
16
23
|
bg: '$transparent',
|
17
|
-
border: `solid $space$px ${base}`,
|
18
|
-
c:
|
24
|
+
border: `solid $space$px $colors${base}`,
|
25
|
+
c: text,
|
19
26
|
'&[disabled]': {
|
20
|
-
c:
|
27
|
+
c: textDisabled,
|
21
28
|
bg: '$transparent',
|
22
|
-
border: `solid $space$px ${disabled}`,
|
29
|
+
border: `solid $space$px $colors${disabled}`,
|
23
30
|
cursor: 'not-allowed',
|
24
31
|
},
|
25
32
|
'&:not([disabled]):hover': {
|
26
|
-
border: `solid $space$px ${hover}`,
|
33
|
+
border: `solid $space$px $colors${hover}`,
|
27
34
|
bg: '$transparent',
|
28
35
|
},
|
29
36
|
'&:not([disabled]):active': {
|
30
|
-
border: `solid $space$px ${active}`,
|
37
|
+
border: `solid $space$px $colors${active}`,
|
31
38
|
bg: '$transparent',
|
32
39
|
},
|
33
40
|
'&:not([disabled]):focus-visible': {
|
34
|
-
boxShadow: `0 0 0 3px ${base}`,
|
41
|
+
boxShadow: `0 0 0 3px $colors${base}`,
|
35
42
|
},
|
36
43
|
};
|
37
44
|
};
|
38
45
|
|
39
|
-
const getButtonVariants = (
|
46
|
+
const getButtonVariants = (
|
47
|
+
base: string,
|
48
|
+
hover: string,
|
49
|
+
active: string,
|
50
|
+
disabled: string,
|
51
|
+
text: string,
|
52
|
+
textDisabled: string,
|
53
|
+
) => {
|
40
54
|
return {
|
41
55
|
bg: base,
|
42
56
|
border: `1px solid ${base}`,
|
43
|
-
c:
|
57
|
+
c: text,
|
44
58
|
'&[disabled]': {
|
45
|
-
c:
|
59
|
+
c: textDisabled,
|
46
60
|
cursor: 'not-allowed',
|
47
61
|
bg: disabled,
|
48
62
|
border: `1px solid ${disabled}`,
|
@@ -72,7 +86,7 @@ const StyledButton = styled('button', {
|
|
72
86
|
border: 'none',
|
73
87
|
fs: '$md',
|
74
88
|
r: '$1',
|
75
|
-
backgroundColor: '$
|
89
|
+
backgroundColor: '$primary_default',
|
76
90
|
fontWeight: '500',
|
77
91
|
whiteSpace: 'nowrap',
|
78
92
|
p: '$4 $8',
|
@@ -81,31 +95,73 @@ const StyledButton = styled('button', {
|
|
81
95
|
outline: 'none',
|
82
96
|
},
|
83
97
|
'&:not([disabled]):focus-visible': {
|
84
|
-
boxShadow: '0 0 0 3px $colors$
|
98
|
+
boxShadow: '0 0 0 3px $colors$primary_default',
|
85
99
|
},
|
86
100
|
transition: 'all 0.2s ease',
|
87
101
|
compoundVariants: [
|
88
102
|
{
|
89
103
|
variant: 'standard',
|
90
104
|
outlined: true,
|
91
|
-
css: getOutlinedVariants(
|
105
|
+
css: getOutlinedVariants(
|
106
|
+
'$secondary_default',
|
107
|
+
'$secondary_bright',
|
108
|
+
'$secondary_dim',
|
109
|
+
'$secondary_disabled',
|
110
|
+
'$on_secondary_high',
|
111
|
+
'$on_secondary_low',
|
112
|
+
),
|
92
113
|
},
|
93
114
|
{
|
94
115
|
variant: 'danger',
|
95
116
|
outlined: true,
|
96
|
-
css: getOutlinedVariants(
|
117
|
+
css: getOutlinedVariants(
|
118
|
+
'$alert_error_default',
|
119
|
+
'$alert_error_bright',
|
120
|
+
'$alert_error_dim',
|
121
|
+
'$alert_error_brighter',
|
122
|
+
'$on_surface_high',
|
123
|
+
'$on_surface_low',
|
124
|
+
),
|
97
125
|
},
|
98
126
|
{
|
99
127
|
variant: 'primary',
|
100
128
|
outlined: true,
|
101
|
-
css: getOutlinedVariants(
|
129
|
+
css: getOutlinedVariants(
|
130
|
+
'$primary_default',
|
131
|
+
'$primary_bright',
|
132
|
+
'$primary_dim',
|
133
|
+
'$primary_disabled',
|
134
|
+
'$on_primary_high',
|
135
|
+
'$on_primary_low',
|
136
|
+
),
|
102
137
|
},
|
103
138
|
],
|
104
139
|
variants: {
|
105
140
|
variant: {
|
106
|
-
standard: getButtonVariants(
|
107
|
-
|
108
|
-
|
141
|
+
standard: getButtonVariants(
|
142
|
+
'$secondary_default',
|
143
|
+
'$secondary_bright',
|
144
|
+
'$secondary_dim',
|
145
|
+
'$secondary_disabled',
|
146
|
+
'$on_secondary_high',
|
147
|
+
'$on_secondary_low',
|
148
|
+
),
|
149
|
+
danger: getButtonVariants(
|
150
|
+
'$alert_error_default',
|
151
|
+
'$alert_error_bright',
|
152
|
+
'$alert_error_dim',
|
153
|
+
'$alert_error_dim',
|
154
|
+
'$on_surface_high',
|
155
|
+
'$on_surface_low',
|
156
|
+
),
|
157
|
+
primary: getButtonVariants(
|
158
|
+
'$primary_default',
|
159
|
+
'$primary_bright',
|
160
|
+
'$primary_dim',
|
161
|
+
'$primary_disabled',
|
162
|
+
'$on_primary_high',
|
163
|
+
'$on_primary_low',
|
164
|
+
),
|
109
165
|
},
|
110
166
|
outlined: {
|
111
167
|
true: {},
|
@@ -128,7 +184,7 @@ export const Button = React.forwardRef<
|
|
128
184
|
<>
|
129
185
|
{loading && (
|
130
186
|
<Flex align="center" justify="center" css={{ w: '100%', position: 'absolute', left: '0' }}>
|
131
|
-
<Loading
|
187
|
+
<Loading />
|
132
188
|
</Flex>
|
133
189
|
)}
|
134
190
|
<Flex
|
@@ -3,8 +3,8 @@ import { styled } from '../Theme';
|
|
3
3
|
|
4
4
|
const CheckboxRoot = styled(CheckboxPrimitive.Root, {
|
5
5
|
all: 'unset',
|
6
|
-
border: '1px solid $
|
7
|
-
backgroundColor: '$
|
6
|
+
border: '1px solid $primary_default',
|
7
|
+
backgroundColor: '$on_primary_high',
|
8
8
|
width: '$8',
|
9
9
|
height: '$8',
|
10
10
|
borderRadius: '$0',
|
@@ -19,12 +19,12 @@ const CheckboxRoot = styled(CheckboxPrimitive.Root, {
|
|
19
19
|
outline: 'none',
|
20
20
|
},
|
21
21
|
'&[data-state="checked"]': {
|
22
|
-
backgroundColor: '$
|
22
|
+
backgroundColor: '$primary_default',
|
23
23
|
},
|
24
24
|
});
|
25
25
|
|
26
26
|
const CheckboxIndicator = styled(CheckboxPrimitive.Indicator, {
|
27
|
-
color: '$
|
27
|
+
color: '$on_primary_high',
|
28
28
|
});
|
29
29
|
|
30
30
|
export const Checkbox = {
|
package/src/Divider/Divider.tsx
CHANGED
@@ -12,7 +12,7 @@ const getHorizontalSpace = (space: string) => ({
|
|
12
12
|
export const VerticalDivider = styled('span', {
|
13
13
|
height: '25px',
|
14
14
|
width: '1px',
|
15
|
-
backgroundColor: '$
|
15
|
+
backgroundColor: '$border_bright',
|
16
16
|
variants: {
|
17
17
|
space: {
|
18
18
|
1: getVerticalSpace('$1'),
|
@@ -30,7 +30,7 @@ export const HorizontalDivider = styled('span', {
|
|
30
30
|
height: '1px',
|
31
31
|
width: '100%',
|
32
32
|
display: 'block',
|
33
|
-
backgroundColor: '$
|
33
|
+
backgroundColor: '$border_bright',
|
34
34
|
variants: {
|
35
35
|
space: {
|
36
36
|
1: getHorizontalSpace('$1'),
|
@@ -17,12 +17,12 @@ export default {
|
|
17
17
|
|
18
18
|
const HorizontalDividerComponent: ComponentStory<typeof HorizontalDivider> = ({ space, css }) => {
|
19
19
|
return (
|
20
|
-
<Flex align="center" direction="column" css={{ width: 'max-content', bg: '$
|
20
|
+
<Flex align="center" direction="column" css={{ width: 'max-content', bg: '$surface_bright', p: '$8', r: '$4' }}>
|
21
21
|
<ul style={{ listStyle: 'none', padding: '0px', margin: '0px', textAlign: 'center' }}>
|
22
22
|
<Text as="li">Item 1</Text>
|
23
23
|
<Text as="li">Item 2</Text>
|
24
24
|
<Text as="li">Item 3</Text>
|
25
|
-
<HorizontalDivider space={space} css={{ bg: '$
|
25
|
+
<HorizontalDivider space={space} css={{ bg: '$on_primary_medium', width: '80px', ...css }} />
|
26
26
|
<Text as="li">Item 4</Text>
|
27
27
|
<Text as="li">Item 5</Text>
|
28
28
|
<Text as="li">Item 6</Text>
|
@@ -26,7 +26,7 @@ const VerticalDividerComponent: ComponentStory<typeof VerticalDivider> = ({ spac
|
|
26
26
|
Add Stuff
|
27
27
|
</Text>
|
28
28
|
</Button>
|
29
|
-
<VerticalDivider space={space} css={{ bg: '$
|
29
|
+
<VerticalDivider space={space} css={{ bg: '$on_primary_high', ...css }} />
|
30
30
|
<Button icon variant="danger">
|
31
31
|
<AddIcon />
|
32
32
|
<Text as="span" variant="button" css={{ c: 'white' }}>
|
@@ -27,9 +27,9 @@ const Template: ComponentStory<typeof Dropdown.Content> = () => {
|
|
27
27
|
<Dropdown.Trigger asChild>
|
28
28
|
<Box
|
29
29
|
css={{
|
30
|
-
color: '$
|
30
|
+
color: '$on_surface_high',
|
31
31
|
borderRadius: '$1',
|
32
|
-
border: '1px solid $
|
32
|
+
border: '1px solid $border_default',
|
33
33
|
padding: '$4 $4',
|
34
34
|
width: '$80',
|
35
35
|
}}
|
@@ -76,7 +76,7 @@ const Template: ComponentStory<typeof Dropdown.Content> = () => {
|
|
76
76
|
<Text variant="md" css={{ ...textEllipsis(150), fontWeight: '$semiBold' }}>
|
77
77
|
{peer.name}
|
78
78
|
</Text>
|
79
|
-
<Text variant="sub2" css={{ color: '$
|
79
|
+
<Text variant="sub2" css={{ color: '$on_surface_medium' }}>
|
80
80
|
{peer.roleName}
|
81
81
|
</Text>
|
82
82
|
</Flex>
|
@@ -21,49 +21,51 @@ const DropdownTrigger = styled(Trigger, {
|
|
21
21
|
cursor: 'pointer',
|
22
22
|
appearance: 'none !important',
|
23
23
|
'&[data-state="open"]': {
|
24
|
-
backgroundColor: '$
|
24
|
+
backgroundColor: '$surface_bright',
|
25
25
|
},
|
26
26
|
'&:focus': {
|
27
27
|
outline: 'none',
|
28
28
|
},
|
29
29
|
'&:focus-visible': {
|
30
|
-
boxShadow: '0 0 0 3px $colors$
|
30
|
+
boxShadow: '0 0 0 3px $colors$primary_default',
|
31
31
|
},
|
32
32
|
});
|
33
33
|
|
34
34
|
const DropdownTriggerItem = styled(SubTrigger, {
|
35
35
|
w: '100%',
|
36
|
-
color: '$
|
36
|
+
color: '$on_surface_high',
|
37
37
|
p: '$8',
|
38
38
|
display: 'flex',
|
39
39
|
alignItems: 'center',
|
40
40
|
'&:hover': {
|
41
41
|
cursor: 'pointer',
|
42
|
-
bg: '$
|
42
|
+
bg: '$surface_brighter',
|
43
43
|
},
|
44
44
|
'&:focus-visible': {
|
45
|
-
bg: '$
|
45
|
+
bg: '$surface_brighter',
|
46
|
+
outline: 'none',
|
46
47
|
},
|
47
48
|
});
|
48
49
|
|
49
50
|
const DropdownItem = styled(Item, {
|
50
|
-
color: '$
|
51
|
+
color: '$on_surface_high',
|
51
52
|
p: '$8',
|
52
53
|
display: 'flex',
|
53
54
|
alignItems: 'center',
|
54
55
|
outline: 'none',
|
56
|
+
backgroundColor: '$surface_default',
|
55
57
|
'&:hover': {
|
56
58
|
cursor: 'pointer',
|
57
|
-
bg: '$
|
59
|
+
bg: '$surface_bright',
|
58
60
|
},
|
59
61
|
'&:focus-visible': {
|
60
|
-
bg: '$
|
62
|
+
bg: '$surface_bright',
|
61
63
|
},
|
62
64
|
});
|
63
65
|
|
64
66
|
const DropdownItemSeparator = styled(Separator, {
|
65
67
|
h: 1,
|
66
|
-
backgroundColor: '$
|
68
|
+
backgroundColor: '$border_bright',
|
67
69
|
m: '$4 $8',
|
68
70
|
});
|
69
71
|
|
@@ -72,7 +74,7 @@ const DropdownContent = styled(Content, {
|
|
72
74
|
maxHeight: '$64',
|
73
75
|
r: '$1',
|
74
76
|
py: '$4',
|
75
|
-
backgroundColor: '$
|
77
|
+
backgroundColor: '$surface_default',
|
76
78
|
overflowY: 'auto',
|
77
79
|
boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',
|
78
80
|
zIndex: 20,
|
@@ -96,24 +98,24 @@ const DropdownSubMenuContent = styled(SubContent, {
|
|
96
98
|
maxHeight: '$64',
|
97
99
|
r: '$1',
|
98
100
|
py: '$4',
|
99
|
-
backgroundColor: '$
|
101
|
+
backgroundColor: '$surface_bright',
|
100
102
|
overflowY: 'auto',
|
101
103
|
boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',
|
102
104
|
zIndex: 20,
|
103
105
|
});
|
104
106
|
|
105
107
|
const DropdownCheckboxItem = styled(CheckboxItem, {
|
106
|
-
color: '$
|
108
|
+
color: '$on_surface_high',
|
107
109
|
p: '$8',
|
108
110
|
display: 'flex',
|
109
111
|
alignItems: 'center',
|
110
112
|
outline: 'none',
|
111
113
|
'&:hover': {
|
112
114
|
cursor: 'pointer',
|
113
|
-
bg: '$
|
115
|
+
bg: '$surface_brighter',
|
114
116
|
},
|
115
117
|
'&:focus-visible': {
|
116
|
-
bg: '$
|
118
|
+
bg: '$surface_brighter',
|
117
119
|
},
|
118
120
|
gap: '$2',
|
119
121
|
});
|
@@ -3,21 +3,22 @@ import { flexCenter } from '../utils/styles';
|
|
3
3
|
|
4
4
|
export const IconButton = styled('button', {
|
5
5
|
...flexCenter,
|
6
|
+
alignItems: 'center',
|
6
7
|
outline: 'none',
|
7
8
|
border: 'none',
|
8
9
|
padding: '$2',
|
9
10
|
r: '$0',
|
10
11
|
cursor: 'pointer',
|
11
12
|
backgroundColor: 'transparent',
|
12
|
-
color: '$
|
13
|
+
color: '$on_surface_high',
|
13
14
|
'&:not([disabled]):focus-visible': {
|
14
|
-
boxShadow: '0 0 0 3px $colors$
|
15
|
+
boxShadow: '0 0 0 3px $colors$primary_default',
|
15
16
|
},
|
16
17
|
'&:not([disabled]):focus': {
|
17
18
|
outline: 'none',
|
18
19
|
},
|
19
20
|
'&:not([disabled]):hover': {
|
20
|
-
backgroundColor: '$
|
21
|
+
backgroundColor: '$on_surface_low',
|
21
22
|
},
|
22
23
|
'&[disabled]': {
|
23
24
|
opacity: 0.5,
|
@@ -29,15 +30,15 @@ export const IconButton = styled('button', {
|
|
29
30
|
variants: {
|
30
31
|
active: {
|
31
32
|
false: {
|
32
|
-
backgroundColor: '$
|
33
|
-
color: '$
|
33
|
+
backgroundColor: '$secondary_dim',
|
34
|
+
color: '$on_primary_high',
|
34
35
|
'&:not([disabled]):hover': {
|
35
|
-
backgroundColor: '$
|
36
|
+
backgroundColor: '$secondary_default',
|
36
37
|
},
|
37
38
|
},
|
38
39
|
true: {
|
39
40
|
'&:not([disabled]):hover': {
|
40
|
-
backgroundColor: '$
|
41
|
+
backgroundColor: '$on_surface_low',
|
41
42
|
},
|
42
43
|
},
|
43
44
|
},
|
package/src/Input/Input.tsx
CHANGED
@@ -7,25 +7,26 @@ import { styled } from '../Theme';
|
|
7
7
|
export const Input = styled('input', {
|
8
8
|
fontFamily: '$sans',
|
9
9
|
lineHeight: 'inherit',
|
10
|
-
backgroundColor: '$
|
10
|
+
backgroundColor: '$surface_default',
|
11
11
|
borderRadius: '8px',
|
12
12
|
outline: 'none',
|
13
|
-
border: '1px solid $
|
13
|
+
border: '1px solid $border_default',
|
14
14
|
padding: '0.5rem 0.75rem',
|
15
|
-
|
15
|
+
minHeight: '30px',
|
16
|
+
color: '$on_surface_high',
|
16
17
|
fontSize: '$md',
|
17
18
|
'&:focus': {
|
18
|
-
boxShadow: '0 0 0 1px $colors$
|
19
|
+
boxShadow: '0 0 0 1px $colors$primary_default',
|
19
20
|
border: '1px solid transparent',
|
20
21
|
},
|
21
22
|
'&::placeholder': {
|
22
|
-
color: '$
|
23
|
+
color: '$on_surface_low',
|
23
24
|
},
|
24
25
|
variants: {
|
25
|
-
|
26
|
+
alert_error_default: {
|
26
27
|
true: {
|
27
28
|
'&:focus': {
|
28
|
-
boxShadow: '0 0 0 3px $colors$
|
29
|
+
boxShadow: '0 0 0 3px $colors$alert_error_default',
|
29
30
|
},
|
30
31
|
},
|
31
32
|
},
|
@@ -68,7 +69,7 @@ const PasswordIcons = React.forwardRef<HTMLDivElement, PropsWithChildren<Compone
|
|
68
69
|
height: '100%',
|
69
70
|
zIndex: 10,
|
70
71
|
right: '$4',
|
71
|
-
bg: '$
|
72
|
+
bg: '$surface_bright',
|
72
73
|
alignItems: 'center',
|
73
74
|
...css,
|
74
75
|
}}
|
@@ -32,7 +32,7 @@ const Template: ComponentStory<typeof PasswordInput.Root> = args => {
|
|
32
32
|
setShowPassword(!showPassword);
|
33
33
|
}}
|
34
34
|
css={{
|
35
|
-
color: '$
|
35
|
+
color: '$on_primary_high',
|
36
36
|
}}
|
37
37
|
/>
|
38
38
|
<PasswordInput.CopyIcon
|
@@ -40,7 +40,7 @@ const Template: ComponentStory<typeof PasswordInput.Root> = args => {
|
|
40
40
|
navigator.clipboard.writeText(text);
|
41
41
|
}}
|
42
42
|
css={{
|
43
|
-
color: '$
|
43
|
+
color: '$on_primary_high',
|
44
44
|
}}
|
45
45
|
/>
|
46
46
|
</PasswordInput.Icons>
|
package/src/Label/Label.tsx
CHANGED
package/src/Link/Link.tsx
CHANGED
@@ -12,15 +12,15 @@ const LinkComponent = styled('a', {
|
|
12
12
|
variants: {
|
13
13
|
color: {
|
14
14
|
highEmp: {
|
15
|
-
color: '$
|
15
|
+
color: '$on_surface_high',
|
16
16
|
'&:hover': {
|
17
|
-
color: '$
|
17
|
+
color: '$on_surface_medium',
|
18
18
|
},
|
19
19
|
},
|
20
20
|
primary: {
|
21
|
-
color: '$
|
21
|
+
color: '$primary_default',
|
22
22
|
'&:hover': {
|
23
|
-
color: '$
|
23
|
+
color: '$primary_bright',
|
24
24
|
},
|
25
25
|
},
|
26
26
|
},
|