@moises.ai/design-system 3.7.3 → 3.9.0
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/dist/index.js +3748 -3520
- package/package.json +1 -1
- package/src/components/EmptyState/EmptyState.jsx +88 -0
- package/src/components/EmptyState/EmptyState.module.css +91 -0
- package/src/components/EmptyState/EmptyState.stories.jsx +192 -0
- package/src/components/NumberPicker/NumberPicker.jsx +71 -0
- package/src/components/NumberPicker/NumberPicker.stories.jsx +63 -0
- package/src/components/ProjectsList/ProjectItem/ProjectItem.jsx +15 -5
- package/src/components/ProjectsList/ProjectItem/ProjectItem.module.css +12 -0
- package/src/components/ProjectsList/ProjectTrack/ProjectTrack.jsx +11 -3
- package/src/components/ProjectsList/ProjectTrack/ProjectTrack.module.css +7 -0
- package/src/components/ProjectsList/ProjectTrackVoice/ProjectTrackVoice.jsx +88 -0
- package/src/components/ProjectsList/ProjectTrackVoice/ProjectTrackVoice.module.css +60 -0
- package/src/components/ProjectsList/ProjectsList.jsx +3 -1
- package/src/components/ProjectsList/ProjectsList.stories.jsx +99 -49
- package/src/components/ProjectsList/utils-stories.js +93 -2
- package/src/components/SetlistList/SetlistList.jsx +2 -0
- package/src/index.jsx +2 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.itemTrack {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
border-radius: var(--radius-3);
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
|
|
6
|
+
.iconArrowLeft {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
background: var(--neutral-alpha-2);
|
|
12
|
+
box-shadow: 0 24px 24px -16px rgba(0, 0, 0, 0.40);
|
|
13
|
+
|
|
14
|
+
.iconArrowLeft {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.coverImage {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.trackTitle {
|
|
25
|
+
color: var(--neutral-alpha-12);
|
|
26
|
+
display: block;
|
|
27
|
+
width: 100%;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.cover {
|
|
35
|
+
width: 48px;
|
|
36
|
+
height: 48px;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
background: var(--neutral-alpha-2);
|
|
41
|
+
border-radius: var(--radius-3);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.coverImage {
|
|
45
|
+
width: 48px;
|
|
46
|
+
height: 48px;
|
|
47
|
+
border-radius: var(--radius-3);
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
color: var(--neutral-alpha-10);
|
|
53
|
+
|
|
54
|
+
img {
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
object-fit: cover;
|
|
58
|
+
pointer-events: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Flex } from '@radix-ui/themes'
|
|
2
2
|
import { useState } from 'react'
|
|
3
3
|
import { ProjectsListContext } from './context'
|
|
4
|
-
import ProjectTrack from './ProjectTrack/ProjectTrack'
|
|
5
4
|
import ProjectItem from './ProjectItem/ProjectItem'
|
|
5
|
+
import ProjectTrack from './ProjectTrack/ProjectTrack'
|
|
6
|
+
import ProjectTrackVoice from './ProjectTrackVoice/ProjectTrackVoice'
|
|
6
7
|
|
|
7
8
|
export const ProjectsList = ({
|
|
8
9
|
children,
|
|
@@ -36,3 +37,4 @@ export const ProjectsList = ({
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
ProjectsList.Track = ProjectTrack
|
|
40
|
+
ProjectsList.TrackVoice = ProjectTrackVoice
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Flex } from '@radix-ui/themes'
|
|
1
2
|
import { ProjectsList } from './ProjectsList'
|
|
2
|
-
import { projects } from './utils-stories'
|
|
3
|
+
import { projects, projectsVoiceStudio } from './utils-stories'
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Components/ProjectsList',
|
|
@@ -28,18 +29,20 @@ export const Default = {
|
|
|
28
29
|
},
|
|
29
30
|
render: (args) => {
|
|
30
31
|
return (
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
tracks
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
<Flex width="300px">
|
|
33
|
+
<ProjectsList
|
|
34
|
+
projects={args.projects}
|
|
35
|
+
onClickTrack={args.onClickTrack}
|
|
36
|
+
onInsertAllTracks={args.onInsertAllTracks}
|
|
37
|
+
onProjectClick={args.onProjectClick}
|
|
38
|
+
>
|
|
39
|
+
{(tracks) =>
|
|
40
|
+
tracks.map((track) => (
|
|
41
|
+
<ProjectsList.Track key={track.id} {...track} />
|
|
42
|
+
))
|
|
43
|
+
}
|
|
44
|
+
</ProjectsList>
|
|
45
|
+
</Flex>
|
|
43
46
|
)
|
|
44
47
|
},
|
|
45
48
|
}
|
|
@@ -74,18 +77,20 @@ export const WithEmptyProjects = {
|
|
|
74
77
|
},
|
|
75
78
|
render: (args) => {
|
|
76
79
|
return (
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
tracks
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
<Flex width="300px">
|
|
81
|
+
<ProjectsList
|
|
82
|
+
projects={args.projects}
|
|
83
|
+
onClickTrack={args.onClickTrack}
|
|
84
|
+
onInsertAllTracks={args.onInsertAllTracks}
|
|
85
|
+
onProjectClick={args.onProjectClick}
|
|
86
|
+
>
|
|
87
|
+
{(tracks) =>
|
|
88
|
+
tracks.map((track) => (
|
|
89
|
+
<ProjectsList.Track key={track.id} {...track} />
|
|
90
|
+
))
|
|
91
|
+
}
|
|
92
|
+
</ProjectsList>
|
|
93
|
+
</Flex>
|
|
89
94
|
)
|
|
90
95
|
},
|
|
91
96
|
}
|
|
@@ -121,18 +126,20 @@ export const WithProjectLoading = {
|
|
|
121
126
|
},
|
|
122
127
|
render: (args) => {
|
|
123
128
|
return (
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
tracks
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
<Flex width="300px">
|
|
130
|
+
<ProjectsList
|
|
131
|
+
projects={args.projects}
|
|
132
|
+
onClickTrack={args.onClickTrack}
|
|
133
|
+
onInsertAllTracks={args.onInsertAllTracks}
|
|
134
|
+
onProjectClick={args.onProjectClick}
|
|
135
|
+
>
|
|
136
|
+
{(tracks) =>
|
|
137
|
+
tracks.map((track) => (
|
|
138
|
+
<ProjectsList.Track key={track.id} {...track} />
|
|
139
|
+
))
|
|
140
|
+
}
|
|
141
|
+
</ProjectsList>
|
|
142
|
+
</Flex>
|
|
136
143
|
)
|
|
137
144
|
},
|
|
138
145
|
}
|
|
@@ -168,18 +175,61 @@ export const WithProjectFailed = {
|
|
|
168
175
|
},
|
|
169
176
|
render: (args) => {
|
|
170
177
|
return (
|
|
171
|
-
<
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
tracks
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
<Flex width="300px">
|
|
179
|
+
<ProjectsList
|
|
180
|
+
projects={args.projects}
|
|
181
|
+
onClickTrack={args.onClickTrack}
|
|
182
|
+
onInsertAllTracks={args.onInsertAllTracks}
|
|
183
|
+
onProjectClick={args.onProjectClick}
|
|
184
|
+
>
|
|
185
|
+
{(tracks) =>
|
|
186
|
+
tracks.map((track) => (
|
|
187
|
+
<ProjectsList.Track key={track.id} {...track} />
|
|
188
|
+
))
|
|
189
|
+
}
|
|
190
|
+
</ProjectsList>
|
|
191
|
+
</Flex>
|
|
192
|
+
)
|
|
193
|
+
},
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export const WithTrackVoice = {
|
|
197
|
+
args: {
|
|
198
|
+
projects: projectsVoiceStudio,
|
|
199
|
+
onProjectClick: (project, opened) => {
|
|
200
|
+
console.log('project', project)
|
|
201
|
+
console.log('opened', opened)
|
|
202
|
+
},
|
|
203
|
+
onClickTrack: (track) => {
|
|
204
|
+
console.log('track', track)
|
|
205
|
+
},
|
|
206
|
+
onInsertAllTracks: (tracks) => {
|
|
207
|
+
console.log('insert-all-tracks', tracks)
|
|
208
|
+
},
|
|
209
|
+
onChangeTransfer: (track) => {
|
|
210
|
+
console.log('change-transfer', track)
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
render: (args) => {
|
|
214
|
+
return (
|
|
215
|
+
<Flex width="300px">
|
|
216
|
+
<ProjectsList
|
|
217
|
+
projects={args.projects}
|
|
218
|
+
onClickTrack={args.onClickTrack}
|
|
219
|
+
onInsertAllTracks={args.onInsertAllTracks}
|
|
220
|
+
onProjectClick={args.onProjectClick}
|
|
221
|
+
>
|
|
222
|
+
{(tracks) =>
|
|
223
|
+
tracks.map((track) => (
|
|
224
|
+
<ProjectsList.TrackVoice
|
|
225
|
+
key={track.id}
|
|
226
|
+
{...track}
|
|
227
|
+
onChangeTransfer={args.onChangeTransfer}
|
|
228
|
+
/>
|
|
229
|
+
))
|
|
230
|
+
}
|
|
231
|
+
</ProjectsList>
|
|
232
|
+
</Flex>
|
|
183
233
|
)
|
|
184
234
|
},
|
|
185
235
|
}
|
|
@@ -19,7 +19,7 @@ export const projects = [
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"id": "b9470aco6y4a9dlef0c035",
|
|
22
|
-
"title": "blink 182 - adams song.mp3",
|
|
22
|
+
"title": "blink 182 - adams song - very long name.mp3",
|
|
23
23
|
"audioUrl": "https://storage.googleapis.com/moises-stage--tasks-us-east1/studio-tracks/3842c898-9e0c-41e8-8927-7d9f67c50bc6/15a1072d5d04c507eebf39b464329572b8b400c76d8f11197a5f83147a336de5.audio"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
@@ -191,7 +191,7 @@ export const projects = [
|
|
|
191
191
|
{
|
|
192
192
|
"id": "3612a6132234-b86c-408e-b23296-b9f0f22dbeb108",
|
|
193
193
|
"title": "Project without cover and type",
|
|
194
|
-
"artist":
|
|
194
|
+
"artist": "Artist Very Long Name With Very Long Name",
|
|
195
195
|
"cover": null,
|
|
196
196
|
"duration": 227.0215,
|
|
197
197
|
"tracks": [
|
|
@@ -208,3 +208,94 @@ export const projects = [
|
|
|
208
208
|
]
|
|
209
209
|
}
|
|
210
210
|
]
|
|
211
|
+
|
|
212
|
+
export const projectsVoiceStudio = [
|
|
213
|
+
{
|
|
214
|
+
"id": "3842c898-9e0c-41e8-8927-7d9f67c50bc6",
|
|
215
|
+
"title": "vocals - Billie Bossa Nova",
|
|
216
|
+
"artist": "Billie Bossa Nova",
|
|
217
|
+
"cover": null,
|
|
218
|
+
"duration": 30.72,
|
|
219
|
+
"type": "voice",
|
|
220
|
+
"tracks": [
|
|
221
|
+
{
|
|
222
|
+
"id": "q8pzli0h38ptcx21q09h2al-0",
|
|
223
|
+
"title": "Original",
|
|
224
|
+
"type": "voice",
|
|
225
|
+
"audioUrl": "https://d3-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/0b926e1f-52ce-4581-9f76-09545eed1c61/vocals.m4",
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "q8pzli0h38ptcxq09h2al-0",
|
|
229
|
+
"title": "Ana",
|
|
230
|
+
"type": "voice",
|
|
231
|
+
"cover": "https://picsum.photos/101/101",
|
|
232
|
+
"transfers": [
|
|
233
|
+
{
|
|
234
|
+
"id": "q8pzli0h38ptcxq09h2al",
|
|
235
|
+
"pitchShift": "-12",
|
|
236
|
+
"audioUrl": "https://d3-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/0b926e1f-52ce-4581-9f76-09545eed1c61/vocals.m4"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "q8pzli0h38ptcxq09h2al2",
|
|
240
|
+
"pitchShift": "-13",
|
|
241
|
+
"audioUrl": "https://d3-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/0a6c2a03-320e-49f2-9ea6-a5ad7bbb6141/vocals.m4a"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"id": "j1nvrdhrai85pftttb9bo",
|
|
247
|
+
"title": "Carrie",
|
|
248
|
+
"cover": "https://picsum.photos/110/110",
|
|
249
|
+
"type": "voice",
|
|
250
|
+
"transfers": [
|
|
251
|
+
{
|
|
252
|
+
"id": "j1nvrdhrai85pftttb9bo-0",
|
|
253
|
+
"pitchShift": "3",
|
|
254
|
+
"audioUrl": "https://d2-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/9b8df9e7-b35d-487f-a24c-a33e20597203/vocals.m4a"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"id": "j1nvrdhrai85pftttb9bo-1",
|
|
258
|
+
"pitchShift": "4",
|
|
259
|
+
"audioUrl": "https://d3-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/f38d1691-d0a5-4904-b6a9-2935881f1e75/vocals.m4a"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"id": "b9470aco6y4a9dlef0c035",
|
|
265
|
+
"title": "Amelia",
|
|
266
|
+
"cover": "https://picsum.photos/103/103",
|
|
267
|
+
"type": "voice",
|
|
268
|
+
"transfers": [
|
|
269
|
+
{
|
|
270
|
+
"id": "b9470aco6y4a9dlef0c035-0",
|
|
271
|
+
"pitchShift": "-10",
|
|
272
|
+
"audioUrl": "https://d3-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/0b926e1f-52ce-4581-9f76-09545eed1c61/vocals.m4"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"id": "b9470aco6y4a9dlef0c035-1",
|
|
276
|
+
"pitchShift": "-11",
|
|
277
|
+
"audioUrl": "https://d3-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/0a6c2a03-320e-49f2-9ea6-a5ad7bbb6141/vocals.m4a"
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"id": "b9470aco6y4a9dlef0c123035",
|
|
283
|
+
"title": "Lauren Very Long Name",
|
|
284
|
+
"cover": "https://picsum.photos/120/400",
|
|
285
|
+
"type": "voice",
|
|
286
|
+
"transfers": [
|
|
287
|
+
{
|
|
288
|
+
"id": "b9470aco6y4a9dleqqwqf0c035-0",
|
|
289
|
+
"pitchShift": "7",
|
|
290
|
+
"audioUrl": "https://d2-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/9b8df9e7-b35d-487f-a24c-a33e20597203/vocals.m4a"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "b9470aco6y4a9d1111111lef0c035-1",
|
|
294
|
+
"pitchShift": "8",
|
|
295
|
+
"audioUrl": "https://d3-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/f38d1691-d0a5-4904-b6a9-2935881f1e75/vocals.m4a"
|
|
296
|
+
}
|
|
297
|
+
],
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
]
|
package/src/index.jsx
CHANGED
|
@@ -140,3 +140,5 @@ export { TrackHeader } from './components/TrackHeader/TrackHeader'
|
|
|
140
140
|
export { useForm } from './components/useForm/useForm'
|
|
141
141
|
export { VoiceConversionForm } from './components/VoiceConversionForm/VoiceConversionForm'
|
|
142
142
|
export { Waveform } from './components/VoiceConversionForm/Waveform/Waveform'
|
|
143
|
+
|
|
144
|
+
export { EmptyState } from './components/EmptyState/EmptyState'
|