@moises.ai/design-system 4.15.4 → 4.15.6
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/package.json
CHANGED
|
@@ -184,6 +184,10 @@ export const PreviewCard = forwardRef(function PreviewCard(
|
|
|
184
184
|
|
|
185
185
|
const handleInteraction = useCallback(
|
|
186
186
|
(ws, newTime) => {
|
|
187
|
+
if (!showSkeleton) {
|
|
188
|
+
onSelect?.()
|
|
189
|
+
}
|
|
190
|
+
|
|
187
191
|
if (!wavegroup) return
|
|
188
192
|
|
|
189
193
|
const previousActive = wavegroup.state.active
|
|
@@ -228,7 +232,7 @@ export const PreviewCard = forwardRef(function PreviewCard(
|
|
|
228
232
|
isPlaying: wasPlaying,
|
|
229
233
|
}))
|
|
230
234
|
},
|
|
231
|
-
[wavegroup, isSafari, progressColor],
|
|
235
|
+
[wavegroup, isSafari, progressColor, showSkeleton, onSelect],
|
|
232
236
|
)
|
|
233
237
|
|
|
234
238
|
const onFinish = useCallback(() => {
|
|
@@ -288,38 +292,18 @@ export const PreviewCard = forwardRef(function PreviewCard(
|
|
|
288
292
|
<button
|
|
289
293
|
type="button"
|
|
290
294
|
className={classNames(styles.leftButton, isPlaying && styles.isPlaying)}
|
|
291
|
-
onClick={
|
|
292
|
-
e.stopPropagation()
|
|
293
|
-
handleTogglePlay()
|
|
294
|
-
}}
|
|
295
|
+
onClick={handleTogglePlay}
|
|
295
296
|
disabled={showSkeleton}
|
|
296
297
|
aria-label={isPlaying ? 'Pause' : 'Play'}
|
|
297
298
|
>
|
|
298
|
-
|
|
299
|
-
<
|
|
300
|
-
|
|
301
|
-
<
|
|
302
|
-
|
|
303
|
-
<span className={styles.equalizerBar} />
|
|
304
|
-
</span>
|
|
305
|
-
<PauseIcon
|
|
306
|
-
width={18}
|
|
307
|
-
height={18}
|
|
308
|
-
className={styles.pauseOnHover}
|
|
309
|
-
aria-hidden="true"
|
|
310
|
-
/>
|
|
311
|
-
<PlayIcon
|
|
312
|
-
width={18}
|
|
313
|
-
height={18}
|
|
314
|
-
className={styles.playIcon}
|
|
315
|
-
aria-hidden="true"
|
|
316
|
-
/>
|
|
299
|
+
{isPlaying ? (
|
|
300
|
+
<PauseIcon width={18} height={18} aria-hidden="true" />
|
|
301
|
+
) : (
|
|
302
|
+
<PlayIcon width={18} height={18} aria-hidden="true" />
|
|
303
|
+
)}
|
|
317
304
|
</button>
|
|
318
305
|
|
|
319
|
-
<div
|
|
320
|
-
className={styles.waveformContainer}
|
|
321
|
-
onClick={(e) => e.stopPropagation()}
|
|
322
|
-
>
|
|
306
|
+
<div className={styles.waveformContainer}>
|
|
323
307
|
{audio && (
|
|
324
308
|
<WavesurferPlayer
|
|
325
309
|
url={audio}
|
|
@@ -327,7 +311,7 @@ export const PreviewCard = forwardRef(function PreviewCard(
|
|
|
327
311
|
progressColor={progressColor}
|
|
328
312
|
normalize
|
|
329
313
|
barWidth={2}
|
|
330
|
-
barHeight={
|
|
314
|
+
barHeight={1}
|
|
331
315
|
cursorWidth={0}
|
|
332
316
|
height={40}
|
|
333
317
|
onReady={onReady}
|
|
@@ -341,11 +325,7 @@ export const PreviewCard = forwardRef(function PreviewCard(
|
|
|
341
325
|
)}
|
|
342
326
|
</div>
|
|
343
327
|
|
|
344
|
-
{actions &&
|
|
345
|
-
<div className={styles.actions} onClick={(e) => e.stopPropagation()}>
|
|
346
|
-
{actions}
|
|
347
|
-
</div>
|
|
348
|
-
)}
|
|
328
|
+
{actions && <div className={styles.actions}>{actions}</div>}
|
|
349
329
|
</div>
|
|
350
330
|
)
|
|
351
331
|
})
|
|
@@ -10,56 +10,6 @@
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
@keyframes equalizerBar1 {
|
|
14
|
-
0%,
|
|
15
|
-
100% {
|
|
16
|
-
height: 17px;
|
|
17
|
-
}
|
|
18
|
-
50% {
|
|
19
|
-
height: 7px;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@keyframes equalizerBar2 {
|
|
24
|
-
0%,
|
|
25
|
-
100% {
|
|
26
|
-
height: 5px;
|
|
27
|
-
}
|
|
28
|
-
50% {
|
|
29
|
-
height: 17px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@keyframes equalizerBar3 {
|
|
34
|
-
0%,
|
|
35
|
-
100% {
|
|
36
|
-
height: 21px;
|
|
37
|
-
}
|
|
38
|
-
50% {
|
|
39
|
-
height: 9px;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@keyframes equalizerBar4 {
|
|
44
|
-
0%,
|
|
45
|
-
100% {
|
|
46
|
-
height: 17px;
|
|
47
|
-
}
|
|
48
|
-
50% {
|
|
49
|
-
height: 5px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@keyframes equalizerBar5 {
|
|
54
|
-
0%,
|
|
55
|
-
100% {
|
|
56
|
-
height: 7px;
|
|
57
|
-
}
|
|
58
|
-
50% {
|
|
59
|
-
height: 17px;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
13
|
.previewCard {
|
|
64
14
|
display: flex;
|
|
65
15
|
align-items: center;
|
|
@@ -137,72 +87,6 @@
|
|
|
137
87
|
opacity: 0;
|
|
138
88
|
}
|
|
139
89
|
|
|
140
|
-
.equalizer {
|
|
141
|
-
display: none;
|
|
142
|
-
align-items: center;
|
|
143
|
-
justify-content: center;
|
|
144
|
-
gap: 1.8px;
|
|
145
|
-
width: 19px;
|
|
146
|
-
height: 21px;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.equalizerBar {
|
|
150
|
-
display: block;
|
|
151
|
-
width: 2px;
|
|
152
|
-
border-radius: 4.8px;
|
|
153
|
-
background: var(--neutral-alpha-11);
|
|
154
|
-
flex-shrink: 0;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.equalizerBar:nth-child(1) {
|
|
158
|
-
height: 17px;
|
|
159
|
-
animation: equalizerBar1 0.8s ease-in-out infinite;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.equalizerBar:nth-child(2) {
|
|
163
|
-
height: 5px;
|
|
164
|
-
animation: equalizerBar2 0.8s ease-in-out infinite;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.equalizerBar:nth-child(3) {
|
|
168
|
-
height: 21px;
|
|
169
|
-
animation: equalizerBar3 0.8s ease-in-out infinite;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.equalizerBar:nth-child(4) {
|
|
173
|
-
height: 17px;
|
|
174
|
-
animation: equalizerBar4 0.8s ease-in-out infinite;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.equalizerBar:nth-child(5) {
|
|
178
|
-
height: 7px;
|
|
179
|
-
animation: equalizerBar5 0.8s ease-in-out infinite;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.pauseOnHover {
|
|
183
|
-
display: none;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.playIcon {
|
|
187
|
-
display: flex;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.leftButton.isPlaying .equalizer {
|
|
191
|
-
display: flex;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.leftButton.isPlaying .playIcon {
|
|
195
|
-
display: none !important;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.previewCard.playing:has(.leftButton:hover) .equalizer {
|
|
199
|
-
display: none;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.previewCard.playing:has(.leftButton:hover) .pauseOnHover {
|
|
203
|
-
display: flex;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
90
|
.waveformContainer {
|
|
207
91
|
position: relative;
|
|
208
92
|
flex: 1 1 0;
|
|
@@ -212,11 +96,12 @@
|
|
|
212
96
|
cursor: pointer;
|
|
213
97
|
}
|
|
214
98
|
|
|
215
|
-
.waveformContainer
|
|
216
|
-
|
|
99
|
+
.waveformContainer > div {
|
|
100
|
+
width: 100%;
|
|
101
|
+
height: 40px;
|
|
217
102
|
}
|
|
218
103
|
|
|
219
|
-
.skeleton .waveformContainer
|
|
104
|
+
.skeleton .waveformContainer > div {
|
|
220
105
|
visibility: hidden;
|
|
221
106
|
}
|
|
222
107
|
|
|
@@ -34,11 +34,12 @@ const ProjectTrackVoice = ({
|
|
|
34
34
|
const handleClickTrack = useCallback((e) => {
|
|
35
35
|
e.stopPropagation()
|
|
36
36
|
onClickTrack?.({
|
|
37
|
+
...props,
|
|
37
38
|
id,
|
|
38
39
|
title,
|
|
39
40
|
audioUrl: getAudioUrl(pitchShiftSelected),
|
|
40
41
|
})
|
|
41
|
-
}, [onClickTrack, id, title, getAudioUrl, pitchShiftSelected])
|
|
42
|
+
}, [onClickTrack, props, id, title, getAudioUrl, pitchShiftSelected])
|
|
42
43
|
|
|
43
44
|
return (
|
|
44
45
|
<Flex direction="column" gap="1">
|