this.gui 0.0.0 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/babel.config.json +3 -0
- package/index.js +0 -0
- package/jsdoc.json +53 -0
- package/package.json +44 -23
- package/tsconfig.json +19 -0
- package/typedoc.json +13 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -38
- package/public/manifest.json +0 -15
- package/src/App.tsx +0 -22
- package/src/components/AvatarWithStatus.tsx +0 -26
- package/src/components/ChatBubble.tsx +0 -135
- package/src/components/ChatListItem.tsx +0 -87
- package/src/components/ChatsPane.tsx +0 -110
- package/src/components/ColorSchemeToggle.tsx +0 -61
- package/src/components/Header.tsx +0 -47
- package/src/components/MessageInput.tsx +0 -97
- package/src/components/MessagesPane.tsx +0 -87
- package/src/components/MessagesPaneHeader.tsx +0 -105
- package/src/components/MuiLogo.tsx +0 -34
- package/src/components/MyMessages.tsx +0 -49
- package/src/components/Sidebar.tsx +0 -320
- package/src/createServiceWorker.js +0 -52
- package/src/data.tsx +0 -272
- package/src/index.tsx +0 -12
- package/src/package.json +0 -22
- package/src/public/index.html +0 -22
- package/src/tsconfig.json +0 -25
- package/src/types.tsx +0 -25
- package/src/useScript.ts +0 -101
- package/src/utils.ts +0 -53
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import GlobalStyles from '@mui/joy/GlobalStyles';
|
|
3
|
-
import Avatar from '@mui/joy/Avatar';
|
|
4
|
-
import Box from '@mui/joy/Box';
|
|
5
|
-
import Button from '@mui/joy/Button';
|
|
6
|
-
import Card from '@mui/joy/Card';
|
|
7
|
-
import Chip from '@mui/joy/Chip';
|
|
8
|
-
import Divider from '@mui/joy/Divider';
|
|
9
|
-
import IconButton from '@mui/joy/IconButton';
|
|
10
|
-
import Input from '@mui/joy/Input';
|
|
11
|
-
import LinearProgress from '@mui/joy/LinearProgress';
|
|
12
|
-
import List from '@mui/joy/List';
|
|
13
|
-
import ListItem from '@mui/joy/ListItem';
|
|
14
|
-
import ListItemButton, { listItemButtonClasses } from '@mui/joy/ListItemButton';
|
|
15
|
-
import ListItemContent from '@mui/joy/ListItemContent';
|
|
16
|
-
import Typography from '@mui/joy/Typography';
|
|
17
|
-
import Sheet from '@mui/joy/Sheet';
|
|
18
|
-
import Stack from '@mui/joy/Stack';
|
|
19
|
-
import SearchRoundedIcon from '@mui/icons-material/SearchRounded';
|
|
20
|
-
import HomeRoundedIcon from '@mui/icons-material/HomeRounded';
|
|
21
|
-
import DashboardRoundedIcon from '@mui/icons-material/DashboardRounded';
|
|
22
|
-
import CollectionsBookmarkRoundedIcon from '@mui/icons-material/CollectionsBookmarkRounded';
|
|
23
|
-
import AssignmentRoundedIcon from '@mui/icons-material/AssignmentRounded';
|
|
24
|
-
import QuestionAnswerRoundedIcon from '@mui/icons-material/QuestionAnswerRounded';
|
|
25
|
-
import GroupRoundedIcon from '@mui/icons-material/GroupRounded';
|
|
26
|
-
import SupportRoundedIcon from '@mui/icons-material/SupportRounded';
|
|
27
|
-
import SettingsRoundedIcon from '@mui/icons-material/SettingsRounded';
|
|
28
|
-
import CloseRoundedIcon from '@mui/icons-material/CloseRounded';
|
|
29
|
-
import LogoutRoundedIcon from '@mui/icons-material/LogoutRounded';
|
|
30
|
-
import BadgeRoundedIcon from '@mui/icons-material/BadgeRounded';
|
|
31
|
-
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
32
|
-
|
|
33
|
-
import ColorSchemeToggle from './ColorSchemeToggle';
|
|
34
|
-
import { closeSidebar } from '../utils';
|
|
35
|
-
|
|
36
|
-
function Toggler({
|
|
37
|
-
defaultExpanded = false,
|
|
38
|
-
renderToggle,
|
|
39
|
-
children,
|
|
40
|
-
}: {
|
|
41
|
-
defaultExpanded?: boolean;
|
|
42
|
-
children: React.ReactNode;
|
|
43
|
-
renderToggle: (params: {
|
|
44
|
-
open: boolean;
|
|
45
|
-
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
46
|
-
}) => React.ReactNode;
|
|
47
|
-
}) {
|
|
48
|
-
const [open, setOpen] = React.useState(defaultExpanded);
|
|
49
|
-
return (
|
|
50
|
-
<React.Fragment>
|
|
51
|
-
{renderToggle({ open, setOpen })}
|
|
52
|
-
<Box
|
|
53
|
-
sx={{
|
|
54
|
-
display: 'grid',
|
|
55
|
-
gridTemplateRows: open ? '1fr' : '0fr',
|
|
56
|
-
transition: '0.2s ease',
|
|
57
|
-
'& > *': {
|
|
58
|
-
overflow: 'hidden',
|
|
59
|
-
},
|
|
60
|
-
}}
|
|
61
|
-
>
|
|
62
|
-
{children}
|
|
63
|
-
</Box>
|
|
64
|
-
</React.Fragment>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export default function Sidebar() {
|
|
69
|
-
return (
|
|
70
|
-
<Sheet
|
|
71
|
-
className="Sidebar"
|
|
72
|
-
sx={{
|
|
73
|
-
position: {
|
|
74
|
-
xs: 'fixed',
|
|
75
|
-
md: 'sticky',
|
|
76
|
-
},
|
|
77
|
-
transform: {
|
|
78
|
-
xs: 'translateX(calc(100% * (var(--SideNavigation-slideIn, 0) - 1)))',
|
|
79
|
-
md: 'none',
|
|
80
|
-
},
|
|
81
|
-
transition: 'transform 0.4s, width 0.4s',
|
|
82
|
-
zIndex: 10000,
|
|
83
|
-
height: '100dvh',
|
|
84
|
-
width: 'var(--Sidebar-width)',
|
|
85
|
-
top: 0,
|
|
86
|
-
p: 1.5,
|
|
87
|
-
py: 2,
|
|
88
|
-
flexShrink: 0,
|
|
89
|
-
display: 'flex',
|
|
90
|
-
flexDirection: 'column',
|
|
91
|
-
gap: 2,
|
|
92
|
-
borderRight: '1px solid',
|
|
93
|
-
borderColor: 'divider',
|
|
94
|
-
}}
|
|
95
|
-
>
|
|
96
|
-
<GlobalStyles
|
|
97
|
-
styles={(theme) => ({
|
|
98
|
-
':root': {
|
|
99
|
-
'--Sidebar-width': '220px',
|
|
100
|
-
[theme.breakpoints.up('lg')]: {
|
|
101
|
-
'--Sidebar-width': '240px',
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
})}
|
|
105
|
-
/>
|
|
106
|
-
<Box
|
|
107
|
-
className="Sidebar-overlay"
|
|
108
|
-
sx={{
|
|
109
|
-
position: 'fixed',
|
|
110
|
-
zIndex: 9998,
|
|
111
|
-
top: 0,
|
|
112
|
-
left: 0,
|
|
113
|
-
width: '100vw',
|
|
114
|
-
height: '100vh',
|
|
115
|
-
opacity: 'var(--SideNavigation-slideIn)',
|
|
116
|
-
backgroundColor: 'var(--joy-palette-background-backdrop)',
|
|
117
|
-
transition: 'opacity 0.4s',
|
|
118
|
-
transform: {
|
|
119
|
-
xs: 'translateX(calc(100% * (var(--SideNavigation-slideIn, 0) - 1) + var(--SideNavigation-slideIn, 0) * var(--Sidebar-width, 0px)))',
|
|
120
|
-
lg: 'translateX(-100%)',
|
|
121
|
-
},
|
|
122
|
-
}}
|
|
123
|
-
onClick={() => closeSidebar()}
|
|
124
|
-
/>
|
|
125
|
-
<Box sx={{ display: 'flex', gap: 1, alignItems: 'center' }}>
|
|
126
|
-
<IconButton variant="soft" color="primary" size="sm">
|
|
127
|
-
<BadgeRoundedIcon />
|
|
128
|
-
</IconButton>
|
|
129
|
-
<Typography level="title-lg">Profiles</Typography>
|
|
130
|
-
<ColorSchemeToggle sx={{ ml: 'auto' }} />
|
|
131
|
-
</Box>
|
|
132
|
-
<Input size="sm" startDecorator={<SearchRoundedIcon />} placeholder="Search" />
|
|
133
|
-
<Box
|
|
134
|
-
sx={{
|
|
135
|
-
minHeight: 0,
|
|
136
|
-
overflow: 'hidden auto',
|
|
137
|
-
flexGrow: 1,
|
|
138
|
-
display: 'flex',
|
|
139
|
-
flexDirection: 'column',
|
|
140
|
-
[`& .${listItemButtonClasses.root}`]: {
|
|
141
|
-
gap: 1.5,
|
|
142
|
-
},
|
|
143
|
-
}}
|
|
144
|
-
>
|
|
145
|
-
<List
|
|
146
|
-
size="sm"
|
|
147
|
-
sx={{
|
|
148
|
-
gap: 1,
|
|
149
|
-
'--List-nestedInsetStart': '30px',
|
|
150
|
-
'--ListItem-radius': (theme) => theme.vars.radius.sm,
|
|
151
|
-
}}
|
|
152
|
-
>
|
|
153
|
-
<ListItem>
|
|
154
|
-
<ListItemButton>
|
|
155
|
-
<HomeRoundedIcon />
|
|
156
|
-
<ListItemContent>
|
|
157
|
-
<Typography level="title-sm">Home</Typography>
|
|
158
|
-
</ListItemContent>
|
|
159
|
-
</ListItemButton>
|
|
160
|
-
</ListItem>
|
|
161
|
-
|
|
162
|
-
<ListItem>
|
|
163
|
-
<ListItemButton>
|
|
164
|
-
<DashboardRoundedIcon />
|
|
165
|
-
<ListItemContent>
|
|
166
|
-
<Typography level="title-sm">Dashboard</Typography>
|
|
167
|
-
</ListItemContent>
|
|
168
|
-
</ListItemButton>
|
|
169
|
-
</ListItem>
|
|
170
|
-
|
|
171
|
-
<ListItem>
|
|
172
|
-
<ListItemButton>
|
|
173
|
-
<CollectionsBookmarkRoundedIcon />
|
|
174
|
-
<ListItemContent>
|
|
175
|
-
<Typography level="title-sm">Projects</Typography>
|
|
176
|
-
</ListItemContent>
|
|
177
|
-
</ListItemButton>
|
|
178
|
-
</ListItem>
|
|
179
|
-
|
|
180
|
-
<ListItem nested>
|
|
181
|
-
<Toggler
|
|
182
|
-
renderToggle={({ open, setOpen }) => (
|
|
183
|
-
<ListItemButton onClick={() => setOpen(!open)}>
|
|
184
|
-
<AssignmentRoundedIcon />
|
|
185
|
-
<ListItemContent>
|
|
186
|
-
<Typography level="title-sm">Tasks</Typography>
|
|
187
|
-
</ListItemContent>
|
|
188
|
-
<KeyboardArrowDownIcon
|
|
189
|
-
sx={{ transform: open ? 'rotate(180deg)' : 'none' }}
|
|
190
|
-
/>
|
|
191
|
-
</ListItemButton>
|
|
192
|
-
)}
|
|
193
|
-
>
|
|
194
|
-
<List sx={{ gap: 0.5 }}>
|
|
195
|
-
<ListItem sx={{ mt: 0.5 }}>
|
|
196
|
-
<ListItemButton>All tasks</ListItemButton>
|
|
197
|
-
</ListItem>
|
|
198
|
-
<ListItem>
|
|
199
|
-
<ListItemButton>Backlog</ListItemButton>
|
|
200
|
-
</ListItem>
|
|
201
|
-
<ListItem>
|
|
202
|
-
<ListItemButton>In progress</ListItemButton>
|
|
203
|
-
</ListItem>
|
|
204
|
-
<ListItem>
|
|
205
|
-
<ListItemButton>Done</ListItemButton>
|
|
206
|
-
</ListItem>
|
|
207
|
-
</List>
|
|
208
|
-
</Toggler>
|
|
209
|
-
</ListItem>
|
|
210
|
-
|
|
211
|
-
<ListItem>
|
|
212
|
-
<ListItemButton selected>
|
|
213
|
-
<QuestionAnswerRoundedIcon />
|
|
214
|
-
<ListItemContent>
|
|
215
|
-
<Typography level="title-sm">Messages</Typography>
|
|
216
|
-
</ListItemContent>
|
|
217
|
-
<Chip size="sm" color="primary" variant="solid">
|
|
218
|
-
4
|
|
219
|
-
</Chip>
|
|
220
|
-
</ListItemButton>
|
|
221
|
-
</ListItem>
|
|
222
|
-
|
|
223
|
-
<ListItem nested>
|
|
224
|
-
<Toggler
|
|
225
|
-
renderToggle={({ open, setOpen }) => (
|
|
226
|
-
<ListItemButton onClick={() => setOpen(!open)}>
|
|
227
|
-
<GroupRoundedIcon />
|
|
228
|
-
<ListItemContent>
|
|
229
|
-
<Typography level="title-sm">Users</Typography>
|
|
230
|
-
</ListItemContent>
|
|
231
|
-
<KeyboardArrowDownIcon
|
|
232
|
-
sx={{ transform: open ? 'rotate(180deg)' : 'none' }}
|
|
233
|
-
/>
|
|
234
|
-
</ListItemButton>
|
|
235
|
-
)}
|
|
236
|
-
>
|
|
237
|
-
<List sx={{ gap: 0.5 }}>
|
|
238
|
-
<ListItem sx={{ mt: 0.5 }}>
|
|
239
|
-
<ListItemButton
|
|
240
|
-
role="menuitem"
|
|
241
|
-
component="a"
|
|
242
|
-
href="/joy-ui/getting-started/templates/profile-dashboard/"
|
|
243
|
-
>
|
|
244
|
-
My profile
|
|
245
|
-
</ListItemButton>
|
|
246
|
-
</ListItem>
|
|
247
|
-
<ListItem>
|
|
248
|
-
<ListItemButton>Create a new user</ListItemButton>
|
|
249
|
-
</ListItem>
|
|
250
|
-
<ListItem>
|
|
251
|
-
<ListItemButton>Roles & permission</ListItemButton>
|
|
252
|
-
</ListItem>
|
|
253
|
-
</List>
|
|
254
|
-
</Toggler>
|
|
255
|
-
</ListItem>
|
|
256
|
-
</List>
|
|
257
|
-
|
|
258
|
-
<List
|
|
259
|
-
size="sm"
|
|
260
|
-
sx={{
|
|
261
|
-
mt: 'auto',
|
|
262
|
-
flexGrow: 0,
|
|
263
|
-
'--ListItem-radius': (theme) => theme.vars.radius.sm,
|
|
264
|
-
'--List-gap': '8px',
|
|
265
|
-
mb: 2,
|
|
266
|
-
}}
|
|
267
|
-
>
|
|
268
|
-
<ListItem>
|
|
269
|
-
<ListItemButton>
|
|
270
|
-
<SupportRoundedIcon />
|
|
271
|
-
Support
|
|
272
|
-
</ListItemButton>
|
|
273
|
-
</ListItem>
|
|
274
|
-
<ListItem>
|
|
275
|
-
<ListItemButton>
|
|
276
|
-
<SettingsRoundedIcon />
|
|
277
|
-
Settings
|
|
278
|
-
</ListItemButton>
|
|
279
|
-
</ListItem>
|
|
280
|
-
</List>
|
|
281
|
-
<Card
|
|
282
|
-
invertedColors
|
|
283
|
-
variant="soft"
|
|
284
|
-
color="warning"
|
|
285
|
-
size="sm"
|
|
286
|
-
sx={{ boxShadow: 'none' }}
|
|
287
|
-
>
|
|
288
|
-
<Stack direction="row" justifyContent="space-between" alignItems="center">
|
|
289
|
-
<Typography level="title-sm">Used space</Typography>
|
|
290
|
-
<IconButton size="sm">
|
|
291
|
-
<CloseRoundedIcon />
|
|
292
|
-
</IconButton>
|
|
293
|
-
</Stack>
|
|
294
|
-
<Typography level="body-xs">
|
|
295
|
-
Your team has used 80% of your available space. Need more?
|
|
296
|
-
</Typography>
|
|
297
|
-
<LinearProgress variant="outlined" value={80} determinate sx={{ my: 1 }} />
|
|
298
|
-
<Button size="sm" variant="solid">
|
|
299
|
-
Upgrade plan
|
|
300
|
-
</Button>
|
|
301
|
-
</Card>
|
|
302
|
-
</Box>
|
|
303
|
-
<Divider />
|
|
304
|
-
<Box sx={{ display: 'flex', gap: 1, alignItems: 'center' }}>
|
|
305
|
-
<Avatar
|
|
306
|
-
variant="outlined"
|
|
307
|
-
size="sm"
|
|
308
|
-
src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=crop&w=286"
|
|
309
|
-
/>
|
|
310
|
-
<Box sx={{ minWidth: 0, flex: 1 }}>
|
|
311
|
-
<Typography level="title-sm">Siriwat K.</Typography>
|
|
312
|
-
<Typography level="body-xs">siriwatk@test.com</Typography>
|
|
313
|
-
</Box>
|
|
314
|
-
<IconButton size="sm" variant="plain" color="neutral">
|
|
315
|
-
<LogoutRoundedIcon />
|
|
316
|
-
</IconButton>
|
|
317
|
-
</Box>
|
|
318
|
-
</Sheet>
|
|
319
|
-
);
|
|
320
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// In production, we register a service worker to serve assets from local cache.
|
|
2
|
-
|
|
3
|
-
// This lets the app load faster on subsequent visits in production, and gives
|
|
4
|
-
// it offline capabilities. However, it also means that developers (and users)
|
|
5
|
-
// will only see deployed updates on the "N+1" visit to a page, since previously
|
|
6
|
-
// cached resources are updated in the background.
|
|
7
|
-
|
|
8
|
-
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
|
|
9
|
-
// This link also includes instructions on opting out of this behavior.
|
|
10
|
-
|
|
11
|
-
export default function register() {
|
|
12
|
-
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
|
13
|
-
window.addEventListener('load', () => {
|
|
14
|
-
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
|
15
|
-
navigator.serviceWorker
|
|
16
|
-
.register(swUrl)
|
|
17
|
-
.then(registration => {
|
|
18
|
-
// eslint-disable-next-line no-param-reassign
|
|
19
|
-
registration.onupdatefound = () => {
|
|
20
|
-
const installingWorker = registration.installing;
|
|
21
|
-
installingWorker.onstatechange = () => {
|
|
22
|
-
if (installingWorker.state === 'installed') {
|
|
23
|
-
if (navigator.serviceWorker.controller) {
|
|
24
|
-
// At this point, the old content will have been purged and
|
|
25
|
-
// the fresh content will have been added to the cache.
|
|
26
|
-
// It's the perfect time to display a "New content is
|
|
27
|
-
// available; please refresh." message in your web app.
|
|
28
|
-
console.log('New content is available; please refresh.'); // eslint-disable-line no-console
|
|
29
|
-
} else {
|
|
30
|
-
// At this point, everything has been precached.
|
|
31
|
-
// It's the perfect time to display a
|
|
32
|
-
// "Content is cached for offline use." message.
|
|
33
|
-
console.log('Content is cached for offline use.'); // eslint-disable-line no-console
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
})
|
|
39
|
-
.catch(error => {
|
|
40
|
-
console.error('Error during service worker registration:', error);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function unregister() {
|
|
47
|
-
if ('serviceWorker' in navigator) {
|
|
48
|
-
navigator.serviceWorker.ready.then(registration => {
|
|
49
|
-
registration.unregister();
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
package/src/data.tsx
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { ChatProps, UserProps } from './types';
|
|
2
|
-
|
|
3
|
-
export const users: UserProps[] = [
|
|
4
|
-
{
|
|
5
|
-
name: 'Steve E.',
|
|
6
|
-
username: '@steveEberger',
|
|
7
|
-
avatar: '/static/images/avatar/2.jpg',
|
|
8
|
-
online: true,
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: 'Katherine Moss',
|
|
12
|
-
username: '@kathy',
|
|
13
|
-
avatar: '/static/images/avatar/3.jpg',
|
|
14
|
-
online: false,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: 'Phoenix Baker',
|
|
18
|
-
username: '@phoenix',
|
|
19
|
-
avatar: '/static/images/avatar/1.jpg',
|
|
20
|
-
online: true,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Eleanor Pena',
|
|
24
|
-
username: '@eleanor',
|
|
25
|
-
avatar: '/static/images/avatar/4.jpg',
|
|
26
|
-
online: false,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'Kenny Peterson',
|
|
30
|
-
username: '@kenny',
|
|
31
|
-
avatar: '/static/images/avatar/5.jpg',
|
|
32
|
-
online: true,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'Al Sanders',
|
|
36
|
-
username: '@al',
|
|
37
|
-
avatar: '/static/images/avatar/6.jpg',
|
|
38
|
-
online: true,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'Melissa Van Der Berg',
|
|
42
|
-
username: '@melissa',
|
|
43
|
-
avatar: '/static/images/avatar/7.jpg',
|
|
44
|
-
online: false,
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
export const chats: ChatProps[] = [
|
|
49
|
-
{
|
|
50
|
-
id: '1',
|
|
51
|
-
sender: users[0],
|
|
52
|
-
messages: [
|
|
53
|
-
{
|
|
54
|
-
id: '1',
|
|
55
|
-
content: 'Hi Olivia, I am currently working on the project.',
|
|
56
|
-
timestamp: 'Wednesday 9:00am',
|
|
57
|
-
sender: users[0],
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: '2',
|
|
61
|
-
content: 'That sounds great, Mabel! Keep up the good work.',
|
|
62
|
-
timestamp: 'Wednesday 9:10am',
|
|
63
|
-
sender: 'You',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: '3',
|
|
67
|
-
timestamp: 'Wednesday 11:30am',
|
|
68
|
-
sender: users[0],
|
|
69
|
-
content: 'I will send the draft by end of the day.',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: '4',
|
|
73
|
-
timestamp: 'Wednesday 2:00pm',
|
|
74
|
-
sender: 'You',
|
|
75
|
-
content: 'Sure, I will be waiting for it.',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
id: '5',
|
|
79
|
-
timestamp: 'Wednesday 4:30pm',
|
|
80
|
-
sender: users[0],
|
|
81
|
-
content: 'Just a heads up, I am about to send the draft.',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
id: '6',
|
|
85
|
-
content:
|
|
86
|
-
'Thanks Olivia! Almost there. I’ll work on making those changes you suggested and will shoot it over.',
|
|
87
|
-
timestamp: 'Thursday 10:16am',
|
|
88
|
-
sender: users[0],
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
id: '7',
|
|
92
|
-
content:
|
|
93
|
-
'Hey Olivia, I’ve finished with the requirements doc! I made some notes in the gdoc as well for Phoenix to look over.',
|
|
94
|
-
timestamp: 'Thursday 11:40am',
|
|
95
|
-
sender: users[0],
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: '3',
|
|
99
|
-
timestamp: 'Thursday 11:40am',
|
|
100
|
-
sender: users[0],
|
|
101
|
-
content: 'Tech requirements.pdf',
|
|
102
|
-
attachment: {
|
|
103
|
-
fileName: 'Tech requirements.pdf',
|
|
104
|
-
type: 'pdf',
|
|
105
|
-
size: '1.2 MB',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
id: '8',
|
|
110
|
-
timestamp: 'Thursday 11:41am',
|
|
111
|
-
sender: 'You',
|
|
112
|
-
content: 'Awesome! Thanks. I’ll look at this today.',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
id: '9',
|
|
116
|
-
timestamp: 'Thursday 11:44am',
|
|
117
|
-
sender: users[0],
|
|
118
|
-
content: 'No rush though — we still have to wait for Lana’s designs.',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
id: '10',
|
|
122
|
-
timestamp: 'Today 2:20pm',
|
|
123
|
-
sender: users[0],
|
|
124
|
-
content: 'Hey Olivia, can you please review the latest design when you can?',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
id: '11',
|
|
128
|
-
timestamp: 'Just now',
|
|
129
|
-
sender: 'You',
|
|
130
|
-
content: 'Sure thing, I’ll have a look today. They’re looking great!',
|
|
131
|
-
},
|
|
132
|
-
],
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
id: '2',
|
|
136
|
-
sender: users[1],
|
|
137
|
-
messages: [
|
|
138
|
-
{
|
|
139
|
-
id: '1',
|
|
140
|
-
content: 'Hi Olivia, I am thinking about taking a vacation.',
|
|
141
|
-
timestamp: 'Wednesday 9:00am',
|
|
142
|
-
sender: users[1],
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: '2',
|
|
146
|
-
content:
|
|
147
|
-
'That sounds like a great idea, Katherine! Any idea where you want to go?',
|
|
148
|
-
timestamp: 'Wednesday 9:05am',
|
|
149
|
-
sender: 'You',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
id: '3',
|
|
153
|
-
content: 'I am considering a trip to the beach.',
|
|
154
|
-
timestamp: 'Wednesday 9:30am',
|
|
155
|
-
sender: users[1],
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
id: '4',
|
|
159
|
-
content: 'The beach sounds perfect this time of year!',
|
|
160
|
-
timestamp: 'Wednesday 9:35am',
|
|
161
|
-
sender: 'You',
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
id: '5',
|
|
165
|
-
content: 'Yes, I agree. It will be a much-needed break.',
|
|
166
|
-
timestamp: 'Wednesday 10:00am',
|
|
167
|
-
sender: users[1],
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
id: '6',
|
|
171
|
-
content: 'Make sure to take lots of pictures!',
|
|
172
|
-
timestamp: 'Wednesday 10:05am',
|
|
173
|
-
sender: 'You',
|
|
174
|
-
},
|
|
175
|
-
],
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
id: '3',
|
|
179
|
-
sender: users[2],
|
|
180
|
-
messages: [
|
|
181
|
-
{
|
|
182
|
-
id: '1',
|
|
183
|
-
content: 'Hey!',
|
|
184
|
-
timestamp: '5 mins ago',
|
|
185
|
-
sender: users[2],
|
|
186
|
-
unread: true,
|
|
187
|
-
},
|
|
188
|
-
],
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
id: '4',
|
|
192
|
-
sender: users[3],
|
|
193
|
-
messages: [
|
|
194
|
-
{
|
|
195
|
-
id: '1',
|
|
196
|
-
content:
|
|
197
|
-
'Hey Olivia, I was thinking about doing some home improvement work.',
|
|
198
|
-
timestamp: 'Wednesday 9:00am',
|
|
199
|
-
sender: users[3],
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
id: '2',
|
|
203
|
-
content:
|
|
204
|
-
'That sounds interesting! What kind of improvements are you considering?',
|
|
205
|
-
timestamp: 'Wednesday 9:05am',
|
|
206
|
-
sender: 'You',
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
id: '3',
|
|
210
|
-
content: 'I am planning to repaint the walls and replace the old furniture.',
|
|
211
|
-
timestamp: 'Wednesday 9:15am',
|
|
212
|
-
sender: users[3],
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
id: '4',
|
|
216
|
-
content:
|
|
217
|
-
'That will definitely give your house a fresh look. Do you need help with anything?',
|
|
218
|
-
timestamp: 'Wednesday 9:20am',
|
|
219
|
-
sender: 'You',
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
id: '5',
|
|
223
|
-
content:
|
|
224
|
-
'I might need some help with picking the right paint colors. Can we discuss this over the weekend?',
|
|
225
|
-
timestamp: 'Wednesday 9:30am',
|
|
226
|
-
sender: users[3],
|
|
227
|
-
},
|
|
228
|
-
],
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
id: '5',
|
|
233
|
-
sender: users[4],
|
|
234
|
-
messages: [
|
|
235
|
-
{
|
|
236
|
-
id: '1',
|
|
237
|
-
content: 'Sup',
|
|
238
|
-
timestamp: '5 mins ago',
|
|
239
|
-
sender: users[4],
|
|
240
|
-
unread: true,
|
|
241
|
-
},
|
|
242
|
-
],
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
id: '6',
|
|
246
|
-
sender: users[5],
|
|
247
|
-
messages: [
|
|
248
|
-
{
|
|
249
|
-
id: '1',
|
|
250
|
-
content: 'Heyo',
|
|
251
|
-
timestamp: '5 mins ago',
|
|
252
|
-
sender: 'You',
|
|
253
|
-
unread: true,
|
|
254
|
-
},
|
|
255
|
-
],
|
|
256
|
-
},
|
|
257
|
-
|
|
258
|
-
{
|
|
259
|
-
id: '7',
|
|
260
|
-
sender: users[6],
|
|
261
|
-
messages: [
|
|
262
|
-
{
|
|
263
|
-
id: '1',
|
|
264
|
-
content:
|
|
265
|
-
'Hey Olivia, I’ve finished with the requirements doc! I made some notes in the gdoc as well for Phoenix to look over.',
|
|
266
|
-
timestamp: '5 mins ago',
|
|
267
|
-
sender: users[6],
|
|
268
|
-
unread: true,
|
|
269
|
-
},
|
|
270
|
-
],
|
|
271
|
-
},
|
|
272
|
-
];
|
package/src/index.tsx
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as ReactDOM from 'react-dom/client';
|
|
3
|
-
import { StyledEngineProvider } from '@mui/joy/styles';
|
|
4
|
-
import App from './App';
|
|
5
|
-
|
|
6
|
-
ReactDOM.createRoot(document.querySelector("#root")!).render(
|
|
7
|
-
<React.StrictMode>
|
|
8
|
-
<StyledEngineProvider injectFirst>
|
|
9
|
-
<App />
|
|
10
|
-
</StyledEngineProvider>
|
|
11
|
-
</React.StrictMode>
|
|
12
|
-
);
|
package/src/package.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"dependencies": {
|
|
3
|
-
"@emotion/react": "latest",
|
|
4
|
-
"@emotion/styled": "latest",
|
|
5
|
-
"@mui/icons-material": "latest",
|
|
6
|
-
"@mui/joy": "latest",
|
|
7
|
-
"@mui/material": "latest",
|
|
8
|
-
"@types/react": "latest",
|
|
9
|
-
"@types/react-dom": "latest",
|
|
10
|
-
"react": "latest",
|
|
11
|
-
"react-dom": "latest",
|
|
12
|
-
"typescript": "latest"
|
|
13
|
-
},
|
|
14
|
-
"description": "https://github.com/mui/material-ui/blob/v5.14.10/docs/data/joy/templates/messages/App.tsx",
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"react-scripts": "latest"
|
|
17
|
-
},
|
|
18
|
-
"main": "index.tsx",
|
|
19
|
-
"scripts": {
|
|
20
|
-
"start": "react-scripts start"
|
|
21
|
-
}
|
|
22
|
-
}
|
package/src/public/index.html
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Messages Template - Joy UI</title>
|
|
5
|
-
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
|
6
|
-
<!-- Fonts to support Material Design -->
|
|
7
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
-
<link
|
|
10
|
-
rel="stylesheet"
|
|
11
|
-
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap"
|
|
12
|
-
/>
|
|
13
|
-
<!-- Icons to support Material Design -->
|
|
14
|
-
<link
|
|
15
|
-
rel="stylesheet"
|
|
16
|
-
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
|
17
|
-
/>
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<div id="root"></div>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|