@100mslive/roomkit-react 0.1.0 → 0.1.2-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. package/README.md +18 -0
  2. package/dist/Accordion/Accordion.d.ts +62 -138
  3. package/dist/Accordion/index.d.ts +62 -138
  4. package/dist/{ActiveSpeakerView-H3VYXANB.js → ActiveSpeakerView-4XPIRZOK.js} +6 -6
  5. package/dist/{HLSView-6BVBCQM7.css → ActiveSpeakerView-ADEYHQMU.css} +2 -2
  6. package/dist/{PinnedTrackView-QQ5FDXJX.css.map → ActiveSpeakerView-ADEYHQMU.css.map} +2 -2
  7. package/dist/Avatar/Avatar.d.ts +31 -69
  8. package/dist/Button/Button.d.ts +31 -69
  9. package/dist/Checkbox/Checkbox.d.ts +62 -138
  10. package/dist/Collapsible/Collapsible.d.ts +93 -207
  11. package/dist/Divider/Divider.d.ts +62 -138
  12. package/dist/Dropdown/Dropdown.d.ts +372 -828
  13. package/dist/Fieldset/Fieldset.d.ts +31 -69
  14. package/dist/Footer/Footer.d.ts +248 -552
  15. package/dist/{conference-KN6OKGDU.css → HLSView-DWEEMZ6Z.css} +2 -2
  16. package/dist/{HLSView-6BVBCQM7.css.map → HLSView-DWEEMZ6Z.css.map} +2 -2
  17. package/dist/{HLSView-3RDXRV7Y.js → HLSView-I26CVF5U.js} +16 -16
  18. package/dist/HLSView-I26CVF5U.js.map +7 -0
  19. package/dist/IconButton/IconButton.d.ts +31 -69
  20. package/dist/Input/Input.d.ts +189 -417
  21. package/dist/Label/Label.d.ts +31 -69
  22. package/dist/Layout/Box.d.ts +31 -69
  23. package/dist/Layout/Flex.d.ts +31 -69
  24. package/dist/Link/Link.d.ts +31 -69
  25. package/dist/Modal/Dialog.d.ts +248 -552
  26. package/dist/Modal/DialogContent.d.ts +217 -483
  27. package/dist/Pagination/StyledPagination.d.ts +124 -276
  28. package/dist/{PinnedTrackView-QQ5FDXJX.css → PinnedTrackView-5DPVVOZW.css} +2 -2
  29. package/dist/{conference-KN6OKGDU.css.map → PinnedTrackView-5DPVVOZW.css.map} +2 -2
  30. package/dist/{PinnedTrackView-453PELNU.js → PinnedTrackView-GGTCNH5V.js} +6 -6
  31. package/dist/Popover/index.d.ts +93 -207
  32. package/dist/Prebuilt/provider/roomLayoutProvider/constants/index.d.ts +2 -0
  33. package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.d.ts +9 -0
  34. package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +9 -0
  35. package/dist/Progress/index.d.ts +62 -138
  36. package/dist/RadioGroup/RadioGroup.d.ts +93 -207
  37. package/dist/ReactSelect/ReactSelect.d.ts +310 -690
  38. package/dist/Select/Select.d.ts +93 -207
  39. package/dist/Slider/Slider.d.ts +31 -69
  40. package/dist/Stats/StyledStats.d.ts +186 -414
  41. package/dist/Switch/Switch.d.ts +31 -69
  42. package/dist/Tabs/Tabs.d.ts +124 -276
  43. package/dist/Text/Text.d.ts +31 -69
  44. package/dist/Theme/ThemeProvider.d.ts +63 -140
  45. package/dist/Theme/base.config.d.ts +31 -53
  46. package/dist/Theme/index.d.ts +0 -1
  47. package/dist/Theme/stitches.config.d.ts +404 -915
  48. package/dist/TileMenu/StyledMenuTile.d.ts +217 -483
  49. package/dist/Toast/Toast.d.ts +187 -415
  50. package/dist/Video/Video.d.ts +31 -69
  51. package/dist/VideoList/StyledVideoList.d.ts +93 -207
  52. package/dist/VideoTile/StyledVideoTile.d.ts +279 -621
  53. package/dist/{VirtualBackground-LHYBWUT5.js → VirtualBackground-ZRRE4DUA.js} +4 -3
  54. package/dist/{VirtualBackground-LHYBWUT5.js.map → VirtualBackground-ZRRE4DUA.js.map} +2 -2
  55. package/dist/{chunk-KYYP6ZVK.js → chunk-4ISMCWQA.js} +49 -146
  56. package/dist/chunk-4ISMCWQA.js.map +7 -0
  57. package/dist/{chunk-7YUYZ64D.js → chunk-KKLZ7K2L.js} +577 -898
  58. package/dist/chunk-KKLZ7K2L.js.map +7 -0
  59. package/dist/{chunk-HCAGFNXW.js → chunk-LUND6FLY.js} +1490 -1134
  60. package/dist/chunk-LUND6FLY.js.map +7 -0
  61. package/dist/chunk-MYK3T45M.js +58 -0
  62. package/dist/chunk-MYK3T45M.js.map +7 -0
  63. package/dist/{chunk-XRJXE6UO.js → chunk-THORW2WT.js} +4 -4
  64. package/dist/{chunk-XRJXE6UO.js.map → chunk-THORW2WT.js.map} +1 -1
  65. package/dist/{conference-IDNRO4WK.js → conference-5TDUAQ6K.js} +593 -532
  66. package/dist/conference-5TDUAQ6K.js.map +7 -0
  67. package/dist/{ActiveSpeakerView-REZLWPPI.css → conference-BDCDGBIS.css} +2 -2
  68. package/dist/{ActiveSpeakerView-REZLWPPI.css.map → conference-BDCDGBIS.css.map} +2 -2
  69. package/dist/index.cjs.css +1 -1
  70. package/dist/index.cjs.css.map +2 -2
  71. package/dist/index.cjs.js +3450 -3418
  72. package/dist/index.cjs.js.map +4 -4
  73. package/dist/index.css +1 -1
  74. package/dist/index.css.map +2 -2
  75. package/dist/index.js +4 -8
  76. package/dist/meta.cjs.json +761 -490
  77. package/dist/meta.esbuild.json +857 -589
  78. package/dist/{transcription-BTSB7FZH.js → transcription-PYTSSAOB.js} +3 -3
  79. package/package.json +14 -9
  80. package/src/Accordion/Accordion.tsx +3 -3
  81. package/src/AudioLevel/AudioLevel.tsx +1 -1
  82. package/src/Avatar/Avatar.tsx +8 -3
  83. package/src/Button/Button.tsx +76 -20
  84. package/src/Checkbox/Checkbox.tsx +4 -4
  85. package/src/Collapsible/Collapsible.tsx +1 -1
  86. package/src/Divider/Divider.tsx +2 -2
  87. package/src/Divider/HorizontalDivider.stories.tsx +2 -2
  88. package/src/Divider/VerticalDivider.stories.tsx +1 -1
  89. package/src/Dropdown/Dropdown.stories.tsx +3 -3
  90. package/src/Dropdown/Dropdown.tsx +16 -14
  91. package/src/IconButton/IconButton.tsx +8 -7
  92. package/src/Input/Input.tsx +9 -8
  93. package/src/Input/PasswordInput.stories.tsx +2 -2
  94. package/src/Label/Label.tsx +1 -1
  95. package/src/Link/Link.tsx +4 -4
  96. package/src/Loading/Loading.tsx +7 -10
  97. package/src/Modal/Dialog.stories.tsx +2 -2
  98. package/src/Modal/DialogContent.tsx +3 -3
  99. package/src/Pagination/StyledPagination.tsx +4 -4
  100. package/src/Popover/Popover.stories.tsx +5 -5
  101. package/src/Popover/index.tsx +1 -1
  102. package/src/Prebuilt/App.jsx +101 -68
  103. package/src/Prebuilt/IconButton.jsx +2 -2
  104. package/src/Prebuilt/Prebuilt.stories.tsx +8 -2
  105. package/src/Prebuilt/common/constants.js +0 -1
  106. package/src/Prebuilt/common/utils.js +0 -6
  107. package/src/Prebuilt/components/AppData/AppData.jsx +7 -4
  108. package/src/Prebuilt/components/AppData/useUISettings.js +0 -4
  109. package/src/Prebuilt/components/AudioVideoToggle.jsx +73 -20
  110. package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.jsx +1 -1
  111. package/src/Prebuilt/components/Chat/Chat.jsx +6 -2
  112. package/src/Prebuilt/components/Chat/ChatBody.jsx +13 -11
  113. package/src/Prebuilt/components/Chat/ChatFooter.jsx +2 -2
  114. package/src/Prebuilt/components/Chat/ChatHeader.jsx +3 -3
  115. package/src/Prebuilt/components/Chat/ChatSelector.jsx +2 -2
  116. package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +6 -6
  117. package/src/Prebuilt/components/Chip.jsx +24 -0
  118. package/src/Prebuilt/components/Connection/ConnectionIndicator.jsx +6 -6
  119. package/src/Prebuilt/components/Connection/TileConnection.jsx +2 -2
  120. package/src/Prebuilt/components/Connection/connectionQualityUtils.js +4 -4
  121. package/src/Prebuilt/components/EmojiReaction.jsx +13 -10
  122. package/src/Prebuilt/components/ErrorBoundary.jsx +2 -2
  123. package/src/Prebuilt/components/FullPageProgress.jsx +5 -3
  124. package/src/Prebuilt/components/GoLiveButton.jsx +1 -4
  125. package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx +2 -2
  126. package/src/Prebuilt/components/HMSVideo/PlayButton.jsx +1 -1
  127. package/src/Prebuilt/components/HMSVideo/VideoProgress.jsx +3 -3
  128. package/src/Prebuilt/components/HMSVideo/VideoTime.jsx +3 -1
  129. package/src/Prebuilt/components/HMSVideo/VolumeControl.jsx +1 -1
  130. package/src/Prebuilt/components/Header/AdditionalRoomState.jsx +17 -17
  131. package/src/Prebuilt/components/Header/AmbientMusic.jsx +1 -1
  132. package/src/Prebuilt/components/Header/ConferencingHeader.jsx +4 -6
  133. package/src/Prebuilt/components/Header/HeaderComponents.jsx +10 -5
  134. package/src/Prebuilt/components/Header/ParticipantFilter.jsx +2 -2
  135. package/src/Prebuilt/components/Header/ParticipantList.jsx +2 -2
  136. package/src/Prebuilt/components/Header/StreamActions.jsx +9 -19
  137. package/src/Prebuilt/components/Header/StreamingHeader.jsx +5 -6
  138. package/src/Prebuilt/components/HlsStatsOverlay.jsx +2 -2
  139. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +102 -0
  140. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.stories.tsx +40 -0
  141. package/src/Prebuilt/components/LeaveRoom.jsx +11 -11
  142. package/src/Prebuilt/components/MetaActions.jsx +2 -2
  143. package/src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx +2 -2
  144. package/src/Prebuilt/components/MoreSettings/ChangeSelfRole.jsx +1 -1
  145. package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +1 -0
  146. package/src/Prebuilt/components/Notifications/HLSFailureModal.jsx +69 -0
  147. package/src/Prebuilt/components/Notifications/Notifications.jsx +1 -3
  148. package/src/Prebuilt/components/Notifications/PermissionErrorModal.jsx +108 -26
  149. package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +1 -1
  150. package/src/Prebuilt/components/PIP/pipUtils.js +2 -2
  151. package/src/Prebuilt/components/Playlist/Playlist.jsx +4 -4
  152. package/src/Prebuilt/components/Playlist/PlaylistControls.jsx +3 -3
  153. package/src/Prebuilt/components/Playlist/PlaylistItem.jsx +3 -3
  154. package/src/Prebuilt/components/Playlist/VideoPlayer.jsx +4 -4
  155. package/src/Prebuilt/components/PostLeave.jsx +4 -4
  156. package/src/Prebuilt/components/Preview/PreviewContainer.jsx +17 -6
  157. package/src/Prebuilt/components/Preview/PreviewForm.jsx +74 -0
  158. package/src/Prebuilt/components/Preview/PreviewJoin.jsx +100 -37
  159. package/src/Prebuilt/components/RoleChangeModal.jsx +3 -3
  160. package/src/Prebuilt/components/ScreenshareDisplay.jsx +2 -2
  161. package/src/Prebuilt/components/Settings/DeviceSettings.jsx +3 -9
  162. package/src/Prebuilt/components/Settings/SettingsModal.jsx +8 -32
  163. package/src/Prebuilt/components/Settings/StartRecording.jsx +4 -12
  164. package/src/Prebuilt/components/Settings/SwitchWithLabel.jsx +2 -3
  165. package/src/Prebuilt/components/Settings/common.js +26 -0
  166. package/src/Prebuilt/components/StatsForNerds.jsx +5 -5
  167. package/src/Prebuilt/components/Streaming/Common.jsx +11 -11
  168. package/src/Prebuilt/components/Streaming/HLSStreaming.jsx +6 -12
  169. package/src/Prebuilt/components/Streaming/RTMPStreaming.jsx +4 -6
  170. package/src/Prebuilt/components/Streaming/StreamingLanding.jsx +4 -4
  171. package/src/Prebuilt/components/TileMenu.jsx +7 -7
  172. package/src/Prebuilt/components/Toast/ToastConfig.jsx +12 -20
  173. package/src/Prebuilt/components/conference.jsx +9 -2
  174. package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +1 -4
  175. package/src/Prebuilt/components/pdfAnnotator/pdfErrorView.jsx +2 -2
  176. package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +1 -1
  177. package/src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx +1 -1
  178. package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +2 -2
  179. package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +12 -20
  180. package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +4 -4
  181. package/src/Prebuilt/images/Logo.svg +8 -0
  182. package/src/Prebuilt/images/first_person.png +0 -0
  183. package/src/Prebuilt/images/rtmp.png +0 -0
  184. package/src/Prebuilt/index.d.ts +6 -1
  185. package/src/Prebuilt/layouts/HLSView.jsx +1 -1
  186. package/src/Prebuilt/layouts/InsetView.jsx +0 -3
  187. package/src/Prebuilt/layouts/NonPublisherView.jsx +2 -2
  188. package/src/Prebuilt/layouts/SidePane.jsx +1 -1
  189. package/src/Prebuilt/layouts/WaitingView.jsx +2 -2
  190. package/src/Prebuilt/layouts/mainView.jsx +42 -5
  191. package/src/Prebuilt/plugins/FlyingEmoji.jsx +2 -2
  192. package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +1 -0
  193. package/src/Prebuilt/plugins/whiteboard/ToggleWhiteboard.jsx +1 -3
  194. package/src/Prebuilt/primitives/DialogContent.jsx +4 -4
  195. package/src/Prebuilt/primitives/DropdownTrigger.jsx +3 -3
  196. package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +33 -0
  197. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +57 -0
  198. package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +26 -0
  199. package/src/Progress/index.tsx +2 -2
  200. package/src/RadioGroup/RadioGroup.tsx +3 -3
  201. package/src/ReactSelect/ReactSelect.stories.tsx +7 -7
  202. package/src/ReactSelect/ReactSelect.tsx +8 -8
  203. package/src/Select/Select.tsx +6 -6
  204. package/src/Slider/Slider.tsx +5 -5
  205. package/src/Stats/Stats.tsx +12 -2
  206. package/src/Stats/StyledStats.tsx +3 -3
  207. package/src/Switch/Switch.tsx +5 -5
  208. package/src/Tabs/Tabs.stories.tsx +2 -2
  209. package/src/Tabs/Tabs.tsx +2 -2
  210. package/src/Text/Text.tsx +2 -2
  211. package/src/Theme/ThemeProvider.tsx +4 -7
  212. package/src/Theme/ThemeStory.jsx +17 -19
  213. package/src/Theme/base.config.ts +31 -59
  214. package/src/Theme/index.tsx +0 -1
  215. package/src/Theme/stitches.config.ts +2 -7
  216. package/src/TileMenu/StyledMenuTile.tsx +11 -8
  217. package/src/Toast/Toast.tsx +10 -9
  218. package/src/Tooltip/Tooltip.stories.tsx +1 -1
  219. package/src/Tooltip/Tooltip.tsx +4 -4
  220. package/src/Video/Video.tsx +1 -1
  221. package/src/VideoTile/StyledVideoTile.tsx +12 -12
  222. package/src/assets/android-perm-0.png +0 -0
  223. package/src/assets/android-perm-1.png +0 -0
  224. package/src/assets/ios-perm-0.png +0 -0
  225. package/src/fixtures/chats.ts +1 -1
  226. package/dist/HLSView-3RDXRV7Y.js.map +0 -7
  227. package/dist/Theme/themes.d.ts +0 -64
  228. package/dist/chunk-7YUYZ64D.js.map +0 -7
  229. package/dist/chunk-HCAGFNXW.js.map +0 -7
  230. package/dist/chunk-KYYP6ZVK.js.map +0 -7
  231. package/dist/chunk-ULXGBUSC.js +0 -65
  232. package/dist/chunk-ULXGBUSC.js.map +0 -7
  233. package/dist/conference-IDNRO4WK.js.map +0 -7
  234. package/src/Prebuilt/components/Preview/PreviewName.jsx +0 -37
  235. package/src/Prebuilt/components/Streaming/RTMPIcon.jsx +0 -24
  236. package/src/Prebuilt/hms.js +0 -7
  237. package/src/Prebuilt/plugins/confetti.jsx +0 -60
  238. package/src/Theme/themes.ts +0 -70
  239. /package/dist/{ActiveSpeakerView-H3VYXANB.js.map → ActiveSpeakerView-4XPIRZOK.js.map} +0 -0
  240. /package/dist/{PinnedTrackView-453PELNU.js.map → PinnedTrackView-GGTCNH5V.js.map} +0 -0
  241. /package/dist/{transcription-BTSB7FZH.js.map → transcription-PYTSSAOB.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Box,
3
3
  Text
4
- } from "./chunk-XRJXE6UO.js";
4
+ } from "./chunk-THORW2WT.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-KYYP6ZVK.js";
15
+ } from "./chunk-4ISMCWQA.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-BTSB7FZH.js.map
356
+ //# sourceMappingURL=transcription-PYTSSAOB.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
- "version": "0.1.0",
7
+ "keywords": [
8
+ "100mslive",
9
+ "react",
10
+ "prebuilt",
11
+ "roomkit"
12
+ ],
13
+ "version": "0.1.2-alpha.0",
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.10",
73
- "@100mslive/hms-virtual-background": "1.11.10",
74
- "@100mslive/react-icons": "0.8.10",
75
- "@100mslive/react-sdk": "0.8.10",
78
+ "@100mslive/hls-player": "0.1.11-alpha.0",
79
+ "@100mslive/hms-virtual-background": "1.11.11-alpha.0",
80
+ "@100mslive/react-icons": "0.8.11-alpha.0",
81
+ "@100mslive/react-sdk": "0.8.11-alpha.0",
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,8 +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
+ },
120
+ "gitHead": "523c0b38cdcac790c93b60d2747a4e3520d21dd2"
116
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: '$textHighEmp',
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: '$textMedEmp',
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: '$textPrimary',
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.brandDefault.value;
12
+ const color = theme.colors.primary_default.value;
13
13
  const getStyle = useCallback(
14
14
  (level: number) => {
15
15
  const style: Record<string, string> = {
@@ -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: '$white',
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, color } = getAvatarBg(name);
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
  };
@@ -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 = (base: string, hover: string, active: string, disabled: string) => {
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: '$textHighEmp',
24
+ border: `solid $space$px $colors${base}`,
25
+ c: text,
19
26
  '&[disabled]': {
20
- c: '$textAccentDisabled',
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 = (base: string, hover: string, active: string, disabled: string) => {
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: '$textAccentHigh',
57
+ c: text,
44
58
  '&[disabled]': {
45
- c: '$textAccentDisabled',
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: '$primaryDefault',
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$primaryDefault',
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('$secondaryDefault', '$secondaryLight', '$secondaryDark', '$secondaryDisabled'),
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('$errorDefault', '$errorLight', '$errorDark', '$errorDisabled'),
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('$primaryDefault', '$primaryLight', '$primaryDark', '$primaryDisabled'),
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('$secondaryDefault', '$secondaryLight', '$secondaryDark', '$secondaryDisabled'),
107
- danger: getButtonVariants('$errorDefault', '$errorLight', '$errorDark', '$errorDisabled'),
108
- primary: getButtonVariants('$primaryDefault', '$primaryLight', '$primaryDark', '$primaryDisabled'),
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 color="currentColor" />
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 $brandDefault',
7
- backgroundColor: '$white',
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: '$brandDefault',
22
+ backgroundColor: '$primary_default',
23
23
  },
24
24
  });
25
25
 
26
26
  const CheckboxIndicator = styled(CheckboxPrimitive.Indicator, {
27
- color: '$white',
27
+ color: '$on_primary_high',
28
28
  });
29
29
 
30
30
  export const Checkbox = {
@@ -11,7 +11,7 @@ const CollapsibleTrigger = styled(Trigger, {
11
11
  outline: 'none',
12
12
  },
13
13
  '&:focus-visible': {
14
- boxShadow: '0 0 0 3px $colors$primaryDefault',
14
+ boxShadow: '0 0 0 3px $colors$primary_default',
15
15
  },
16
16
  });
17
17
 
@@ -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: '$borderLight',
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: '$borderLight',
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: '$bgTertiary', p: '$8', r: '$4' }}>
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: '$textSecondary', width: '80px', ...css }} />
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: '$textPrimary', ...css }} />
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: '$textPrimary',
30
+ color: '$on_surface_high',
31
31
  borderRadius: '$1',
32
- border: '1px solid $textDisabled',
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: '$textMedEmp' }}>
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: '$surfaceLight',
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$primaryDefault',
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: '$textPrimary',
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: '$surfaceLighter',
42
+ bg: '$surface_brighter',
43
43
  },
44
44
  '&:focus-visible': {
45
- bg: '$surfaceLighter',
45
+ bg: '$surface_brighter',
46
+ outline: 'none',
46
47
  },
47
48
  });
48
49
 
49
50
  const DropdownItem = styled(Item, {
50
- color: '$textPrimary',
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: '$surfaceLighter',
59
+ bg: '$surface_bright',
58
60
  },
59
61
  '&:focus-visible': {
60
- bg: '$surfaceLighter',
62
+ bg: '$surface_bright',
61
63
  },
62
64
  });
63
65
 
64
66
  const DropdownItemSeparator = styled(Separator, {
65
67
  h: 1,
66
- backgroundColor: '$grayDefault',
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: '$surfaceLight',
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: '$surfaceLight',
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: '$textPrimary',
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: '$surfaceLighter',
115
+ bg: '$surface_brighter',
114
116
  },
115
117
  '&:focus-visible': {
116
- bg: '$surfaceLighter',
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: '$textPrimary',
13
+ color: '$on_surface_high',
13
14
  '&:not([disabled]):focus-visible': {
14
- boxShadow: '0 0 0 3px $colors$brandDefault',
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: '$iconHoverBg',
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: '$secondaryDark',
33
- color: '$textPrimary',
33
+ backgroundColor: '$secondary_dim',
34
+ color: '$on_primary_high',
34
35
  '&:not([disabled]):hover': {
35
- backgroundColor: '$secondaryDefault',
36
+ backgroundColor: '$secondary_default',
36
37
  },
37
38
  },
38
39
  true: {
39
40
  '&:not([disabled]):hover': {
40
- backgroundColor: '$iconHoverBg',
41
+ backgroundColor: '$on_surface_low',
41
42
  },
42
43
  },
43
44
  },
@@ -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: '$surfaceLight',
10
+ backgroundColor: '$surface_default',
11
11
  borderRadius: '8px',
12
12
  outline: 'none',
13
- border: '1px solid $borderLight',
13
+ border: '1px solid $border_default',
14
14
  padding: '0.5rem 0.75rem',
15
- color: '$textPrimary',
15
+ minHeight: '30px',
16
+ color: '$on_surface_high',
16
17
  fontSize: '$md',
17
18
  '&:focus': {
18
- boxShadow: '0 0 0 1px $colors$borderAccent',
19
+ boxShadow: '0 0 0 1px $colors$primary_default',
19
20
  border: '1px solid transparent',
20
21
  },
21
22
  '&::placeholder': {
22
- color: '$textDisabled',
23
+ color: '$on_surface_low',
23
24
  },
24
25
  variants: {
25
- error: {
26
+ alert_error_default: {
26
27
  true: {
27
28
  '&:focus': {
28
- boxShadow: '0 0 0 3px $colors$error',
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: '$surfaceLight',
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: '$textPrimary',
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: '$textPrimary',
43
+ color: '$on_primary_high',
44
44
  }}
45
45
  />
46
46
  </PasswordInput.Icons>
@@ -4,5 +4,5 @@ import { styled } from '../Theme';
4
4
  export const Label = styled(LabelPrimitive.Root, {
5
5
  fontFamily: '$sans',
6
6
  fontSize: '$md',
7
- color: '$textPrimary',
7
+ color: '$on_primary_high',
8
8
  });
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: '$textHighEmp',
15
+ color: '$on_surface_high',
16
16
  '&:hover': {
17
- color: '$textMedEmp',
17
+ color: '$on_surface_medium',
18
18
  },
19
19
  },
20
20
  primary: {
21
- color: '$primaryLight',
21
+ color: '$primary_default',
22
22
  '&:hover': {
23
- color: '$primaryDefault',
23
+ color: '$primary_bright',
24
24
  },
25
25
  },
26
26
  },