-
Notifications
You must be signed in to change notification settings - Fork 398
/
ExampleThemesMusicApp.tsx
1710 lines (1607 loc) · 71.4 KB
/
ExampleThemesMusicApp.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import {
AspectRatio,
Avatar,
Blockquote,
Box,
Button,
Card,
Checkbox,
Flex,
Grid,
Heading,
HoverCard,
IconButton,
Inset,
Link,
Separator,
Slider,
Switch,
Text,
TextField,
} from '@radix-ui/themes';
import { Hover } from './Hover';
import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
import { allPeople } from './people';
import Head from 'next/head';
type ExampleLayoutProps = React.ComponentPropsWithoutRef<typeof Flex> & {
focusable?: boolean;
};
export const ExampleThemesMusicApp = ({ focusable = true, ...props }: ExampleLayoutProps) => {
// Interactive elements may be not focusable for homepage demo purposes
const tabIndex = focusable ? undefined : -1;
return (
<>
<Head>
{/* Add a custom color variable that changes between light and dark mode */}
<style>
{`
:root, .light, .light-theme {
--color-floating-panel: rgba(239, 247, 255, 0.615);
}
.dark, .dark-theme {
--color-floating-panel: rgba(0, 14, 24, 0.593);
}
`}
</style>
</Head>
<Flex align="center" gap="6" {...props}>
<Flex flexShrink="0" gap="6" direction="column" width="416px">
<Card size="3">
<Flex align="center" justify="between" mb="5">
<Heading as="h3" size="4" trim="both">
Queue
</Heading>
<Flex gap="4" my="-1">
<Button tabIndex={tabIndex} variant="ghost">
Clear
</Button>
<Button tabIndex={tabIndex} variant="ghost">
Repeat
</Button>
</Flex>
</Flex>
<Flex direction="column" gap="4">
{songsQueue.slice(0, 5).map((song) => (
<Flex align="center" gap="3" key={song.name}>
<Box asChild width="48px" height="48px">
<img
src={song.cover}
style={{ objectFit: 'cover', borderRadius: 'var(--radius-2)' }}
/>
</Box>
<Box flexGrow="1" width="0">
<Text as="div" size="2" truncate>
{song.name}
</Text>
<Text as="div" size="1" color="gray" truncate>
{song.artist} – {song.album}
</Text>
</Box>
<Box>
<Text as="div" size="2" color="gray">
{song.length}
</Text>
</Box>
</Flex>
))}
</Flex>
</Card>
<Card size="3">
<Flex align="center" justify="between" mb="5">
<Heading as="h3" size="4" trim="start">
Sound
</Heading>
<Flex gap="4">
<Text size="2" color="gray">
Yamaha THR
</Text>
</Flex>
</Flex>
<Flex gap="2" align="center" height="16px" mt="2" mb="5">
<VolumeNoneIcon color="var(--gray-a9)" />
<Box flexGrow="1">
<Slider tabIndex={tabIndex} defaultValue={[80]} />
</Box>
<VolumeMaxIcon color="var(--gray-a9)" />
</Flex>
<Grid columns="4" pt="2" pb="1">
<Flex direction="column" gap="2" align="center" asChild>
<Text as="label">
<IconButton tabIndex={tabIndex} radius="full" variant="solid">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 30 30"
width="16"
height="16"
fill="currentColor"
>
<path d="M 21 4 C 20.448 4 20 4.448 20 5 L 20 25 C 20 25.552 20.448 26 21 26 L 25 26 C 25.552 26 26 25.552 26 25 L 26 5 C 26 4.448 25.552 4 25 4 L 21 4 z M 13 10 C 12.448 10 12 10.448 12 11 L 12 25 C 12 25.552 12.448 26 13 26 L 17 26 C 17.552 26 18 25.552 18 25 L 18 11 C 18 10.448 17.552 10 17 10 L 13 10 z M 5 16 C 4.448 16 4 16.448 4 17 L 4 25 C 4 25.552 4.448 26 5 26 L 9 26 C 9.552 26 10 25.552 10 25 L 10 17 C 10 16.448 9.552 16 9 16 L 5 16 z" />
</svg>
</IconButton>
<Flex direction="column">
<Text align="center" weight="medium" size="2">
Normalize
</Text>
<Text align="center" color="gray" size="1">
On
</Text>
</Flex>
</Text>
</Flex>
<Flex direction="column" gap="2" align="center" asChild>
<Text as="label">
<IconButton tabIndex={tabIndex} radius="full" variant="solid">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 30 30"
width="16"
height="16"
fill="currentColor"
>
<path d="M 22 4 A 1.0001 1.0001 0 1 0 22 6 L 28 6 A 1.0001 1.0001 0 1 0 28 4 L 22 4 z M 2 8 A 1.0001 1.0001 0 1 0 2 10 L 8 10 A 1.0001 1.0001 0 1 0 8 8 L 2 8 z M 22 8 A 1.0001 1.0001 0 1 0 22 10 L 28 10 A 1.0001 1.0001 0 1 0 28 8 L 22 8 z M 2 12 A 1.0001 1.0001 0 1 0 2 14 L 8 14 A 1.0001 1.0001 0 1 0 8 12 L 2 12 z M 22 12 A 1.0001 1.0001 0 1 0 22 14 L 28 14 A 1.0001 1.0001 0 1 0 28 12 L 22 12 z M 2 16 A 1.0001 1.0001 0 1 0 2 18 L 8 18 A 1.0001 1.0001 0 1 0 8 16 L 2 16 z M 12 16 A 1.0001 1.0001 0 1 0 12 18 L 18 18 A 1.0001 1.0001 0 1 0 18 16 L 12 16 z M 22 16 A 1.0001 1.0001 0 1 0 22 18 L 28 18 A 1.0001 1.0001 0 1 0 28 16 L 22 16 z M 2 20 A 1.0001 1.0001 0 1 0 2 22 L 8 22 A 1.0001 1.0001 0 1 0 8 20 L 2 20 z M 12 20 A 1.0001 1.0001 0 1 0 12 22 L 18 22 A 1.0001 1.0001 0 1 0 18 20 L 12 20 z M 22 20 A 1.0001 1.0001 0 1 0 22 22 L 28 22 A 1.0001 1.0001 0 1 0 28 20 L 22 20 z M 2 24 A 1.0001 1.0001 0 1 0 2 26 L 8 26 A 1.0001 1.0001 0 1 0 8 24 L 2 24 z M 12 24 A 1.0001 1.0001 0 1 0 12 26 L 18 26 A 1.0001 1.0001 0 1 0 18 24 L 12 24 z M 22 24 A 1.0001 1.0001 0 1 0 22 26 L 28 26 A 1.0001 1.0001 0 1 0 28 24 L 22 24 z" />
</svg>
</IconButton>
<Flex direction="column">
<Text align="center" weight="medium" size="2">
Equalizer
</Text>
<Text align="center" color="gray" size="1">
On
</Text>
</Flex>
</Text>
</Flex>
<Flex direction="column" gap="2" align="center" asChild>
<Text as="label">
<IconButton tabIndex={tabIndex} radius="full" variant="soft" color="gray">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 30 30"
width="16"
height="16"
fill="currentColor"
>
<path d="M 15 3 C 14.501862 3 14.004329 3.1237904 13.554688 3.3710938 L 4.7773438 8.1992188 C 4.2990638 8.4622726 4 8.9690345 4 9.5136719 L 4 10.128906 L 4 20.048828 C 4 20.573313 4.2799803 21.064852 4.7265625 21.333984 A 1.0001 1.0001 0 0 0 4.7285156 21.335938 L 13.457031 26.572266 C 14.405619 27.141718 15.594381 27.141718 16.542969 26.572266 L 25.269531 21.337891 L 25.271484 21.335938 C 25.723679 21.065216 26 20.572371 26 20.048828 L 26 9.5136719 C 26 8.9690345 25.700936 8.4622727 25.222656 8.1992188 L 16.445312 3.3710938 C 15.99567 3.1237903 15.498138 3 15 3 z M 15 5 C 15.166032 5 15.332064 5.0423034 15.482422 5.125 L 23.166016 9.3496094 L 19.755859 11.179688 L 20.701172 12.941406 L 24 11.171875 L 24 19.765625 L 16 24.566406 L 16 21 L 14 21 L 14 24.566406 L 6 19.765625 L 6 11.171875 L 9.2988281 12.941406 L 10.244141 11.179688 L 6.8339844 9.3496094 L 14.517578 5.125 C 14.667936 5.0423034 14.833968 5 15 5 z M 15 11 A 4 4 0 0 0 15 19 A 4 4 0 0 0 15 11 z" />
</svg>
</IconButton>
<Flex direction="column">
<Text align="center" weight="medium" size="2">
3D Audio
</Text>
<Text align="center" color="gray" size="1">
Off
</Text>
</Flex>
</Text>
</Flex>
<Flex direction="column" gap="2" align="center" asChild>
<Text as="label">
<IconButton tabIndex={tabIndex} radius="full" variant="soft" color="gray">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 30 30"
width="16"
height="16"
fill="currentcolor"
>
<path d="M 8.984375 3.9863281 A 1.0001 1.0001 0 0 0 8 5 L 8 16 A 1.0001 1.0001 0 1 0 10 16 L 10 5 A 1.0001 1.0001 0 0 0 8.984375 3.9863281 z M 4.984375 6.9863281 A 1.0001 1.0001 0 0 0 4 8 L 4 16 A 1.0001 1.0001 0 1 0 6 16 L 6 8 A 1.0001 1.0001 0 0 0 4.984375 6.9863281 z M 12.984375 9.9863281 A 1.0001 1.0001 0 0 0 12 11 L 12 16 A 1.0001 1.0001 0 1 0 14 16 L 14 11 A 1.0001 1.0001 0 0 0 12.984375 9.9863281 z M 0.984375 11.986328 A 1.0001 1.0001 0 0 0 0 13 L 0 16 A 1.0001 1.0001 0 1 0 2 16 L 2 13 A 1.0001 1.0001 0 0 0 0.984375 11.986328 z M 16.984375 14.986328 A 1.0001 1.0001 0 0 0 16 16 L 16 21 A 1.0001 1.0001 0 1 0 18 21 L 18 16 A 1.0001 1.0001 0 0 0 16.984375 14.986328 z M 20.984375 14.986328 A 1.0001 1.0001 0 0 0 20 16 L 20 26 A 1.0001 1.0001 0 1 0 22 26 L 22 16 A 1.0001 1.0001 0 0 0 20.984375 14.986328 z M 24.984375 14.986328 A 1.0001 1.0001 0 0 0 24 16 L 24 23 A 1.0001 1.0001 0 1 0 26 23 L 26 16 A 1.0001 1.0001 0 0 0 24.984375 14.986328 z M 28.984375 14.986328 A 1.0001 1.0001 0 0 0 28 16 L 28 19 A 1.0001 1.0001 0 1 0 30 19 L 30 16 A 1.0001 1.0001 0 0 0 28.984375 14.986328 z" />
</svg>
</IconButton>
<Flex direction="column">
<Text align="center" weight="medium" size="2">
Cross-Fade
</Text>
<Text align="center" color="gray" size="1">
Off
</Text>
</Flex>
</Text>
</Flex>
</Grid>
</Card>
<Card size="3">
<Flex align="center" justify="between" mb="6">
<Text as="label" size="4" weight="bold" trim="start">
<Flex as="span" gap="2" my="-1">
Equalizer
<Switch
variant="classic"
tabIndex={tabIndex}
defaultChecked
size="1"
style={{ marginTop: 1 }}
/>
</Flex>
</Text>
<Flex my="-1" gap="4">
<Button tabIndex={tabIndex} size="2" variant="ghost">
Reset
</Button>
</Flex>
</Flex>
<Box position="relative" my="-1">
<Flex direction="column" gap="4" py="4" position="absolute" left="0" right="0">
<Box mt="-1px" style={{ borderTop: '1px dotted var(--gray-a5)' }} />
<Box mt="-1px" style={{ borderTop: '1px dotted var(--gray-a5)' }} />
<Box mt="-1px" style={{ borderTop: '1px dotted var(--gray-a5)' }} />
<Box mt="-1px" style={{ borderTop: '1px solid var(--gray-a5)' }} />
<Box mt="-1px" style={{ borderTop: '1px dotted var(--gray-a5)' }} />
<Box mt="-1px" style={{ borderTop: '1px dotted var(--gray-a5)' }} />
<Box mt="-1px" style={{ borderTop: '1px dotted var(--gray-a5)' }} />
</Flex>
<Flex flexShrink="0" flexGrow="1" justify="between" position="relative">
{[
{ frequency: '32', value: 75 },
{ frequency: '64', value: 73 },
{ frequency: '125', value: 70 },
{ frequency: '250', value: 65 },
{ frequency: '500', value: 52 },
{ frequency: '1K', value: 50 },
{ frequency: '2K', value: 56 },
{ frequency: '3K', value: 57 },
{ frequency: '4K', value: 60 },
{ frequency: '6K', value: 62 },
{ frequency: '8K', value: 65 },
{ frequency: '16K', value: 68 },
].map((slider) => (
<Flex
direction="column"
align="center"
gap="2"
width="24px"
height="152px"
key={slider.frequency}
>
<Slider
tabIndex={tabIndex}
size="1"
radius="small"
key={slider.frequency}
color="gray"
variant="soft"
defaultValue={[slider.value]}
orientation="vertical"
/>
<Text size="1">{slider.frequency}</Text>
</Flex>
))}
</Flex>
</Box>
</Card>
<Card size="3">
<Flex align="center" justify="between" mb="5">
<Heading as="h3" size="4" trim="both">
History
</Heading>
<Flex my="-1" gap="4">
<Button tabIndex={tabIndex} size="2" variant="ghost">
Clear
</Button>
</Flex>
</Flex>
<Flex direction="column" gap="4">
{songsHistory.map((song, i) => (
<Flex align="center" gap="3" key={song.name}>
<Box asChild width="48px" height="48px">
<img
src={song.cover}
style={{ objectFit: 'cover', borderRadius: 'var(--radius-2)' }}
/>
</Box>
<Box flexGrow="1" width="0">
<Text as="div" size="2" truncate>
{song.name}
</Text>
<Text as="div" size="1" color="gray" truncate>
{song.artist} – {song.album}
</Text>
</Box>
<Box>
<Text as="div" size="2" color="gray">
{song.length}
</Text>
</Box>
</Flex>
))}
</Flex>
</Card>
</Flex>
<Flex flexShrink="0" gap="6" direction="column" width="1312px">
<Card size="4" style={{ height: 896 }}>
<Flex
position="absolute"
align="center"
justify="between"
width="48px"
height="48px"
top="0"
left="0"
ml="4"
>
<Box
width="12px"
height="12px"
style={{
background: '#FF5F57',
boxShadow: 'inset 0 0 0 1px var(--gray-a5)',
borderRadius: '100%',
}}
/>
<Box
width="12px"
height="12px"
style={{
background: '#FDBB2E',
boxShadow: 'inset 0 0 0 1px var(--gray-a5)',
borderRadius: '100%',
}}
/>
<Box
width="12px"
height="12px"
style={{
background: '#27C840',
boxShadow: 'inset 0 0 0 1px var(--gray-a5)',
borderRadius: '100%',
}}
/>
</Flex>
<Flex
align="center"
justify="center"
position="absolute"
top="0"
left="0"
right="0"
height="64px"
>
<TextField.Root
color="gray"
radius="full"
variant="soft"
style={{ width: 400 }}
tabIndex={tabIndex}
placeholder="Search"
>
<TextField.Slot>
<MagnifyingGlassIcon />
</TextField.Slot>
</TextField.Root>
</Flex>
<Flex align="center" position="absolute" top="0" right="0" height="64px" mr="4" gap="4">
<IconButton tabIndex={tabIndex} size="2" variant="ghost" radius="full">
<HeartIcon />
</IconButton>
<IconButton tabIndex={tabIndex} size="2" variant="ghost" radius="full">
<CounterClockwiseClockIcon />
</IconButton>
<IconButton tabIndex={tabIndex} size="2" variant="ghost" radius="full">
<MixerHorizontalIcon />
</IconButton>
<IconButton tabIndex={tabIndex} size="1" variant="ghost" radius="full" color="gray">
<Avatar
size="2"
radius="full"
src={allPeople[23].image}
fallback={allPeople[23]?.name[0].toUpperCase()}
/>
</IconButton>
</Flex>
<Box height="40px" />
<Box mb="4">
<Flex align="baseline" justify="between">
<Heading as="h2" size="6">
Your favorites
</Heading>
<Link
href="#"
onClick={(e) => e.preventDefault()}
tabIndex={tabIndex}
size="2"
weight="medium"
>
Show all
</Link>
</Flex>
</Box>
<Grid columns="5" gap="5" mb="7">
{albumsFavorites.map((album) => (
<AlbumCard
focusable={focusable}
title={album.name}
caption={album.artist}
cover={album.cover}
color={album.color}
key={album.name}
/>
))}
</Grid>
<Box mb="4">
<Flex align="baseline" justify="between">
<Heading as="h2" size="6">
Made for you
</Heading>
<Link
href="#"
onClick={(e) => e.preventDefault()}
tabIndex={tabIndex}
size="2"
weight="medium"
>
Show all
</Link>
</Flex>
</Box>
<Grid columns="5" gap="5" mb="7">
{playlistsForYou.slice(0, 5).map((playlist) => (
<AlbumCard
title={playlist.title}
caption={playlist.caption}
cover={playlist.cover}
color={playlist.color}
key={playlist.title}
/>
))}
</Grid>
<Box mb="4">
<Flex align="baseline" justify="between">
<Heading as="h2" size="6">
Your friends listen
</Heading>
<Link
href="#"
onClick={(e) => e.preventDefault()}
tabIndex={tabIndex}
size="2"
weight="medium"
>
Show all
</Link>
</Flex>
</Box>
<Grid columns="5" gap="5">
{albumsFriendsListen.map((album) => (
<AlbumCard
title={album.name}
caption={album.artist}
cover={album.cover}
color={album.color}
key={album.name}
/>
))}
</Grid>
<Box
position="absolute"
left="0"
right="0"
bottom="0"
mb="5"
height="64px"
style={{
borderRadius: '100px',
boxShadow: 'var(--shadow-6)',
marginLeft: 200,
marginRight: 200,
}}
>
<Box
width="100%"
height="100%"
position="absolute"
overflow="hidden"
style={{
borderRadius: '100px',
backgroundColor: 'var(--color-floating-panel)',
filter: 'saturate(0.5) brightness(1.1)',
WebkitBackdropFilter: 'blur(24px)',
backdropFilter: 'blur(24px)',
}}
/>
<Flex height="100%" justify="between" position="relative">
<Flex gap="4" align="center" p="3">
<IconButton tabIndex={tabIndex} radius="full" size="3">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentcolor"
viewBox="0 0 30 30"
width="20"
height="20"
style={{ marginRight: -2 }}
>
<path d="M 6 3 A 1 1 0 0 0 5 4 A 1 1 0 0 0 5 4.0039062 L 5 15 L 5 25.996094 A 1 1 0 0 0 5 26 A 1 1 0 0 0 6 27 A 1 1 0 0 0 6.5800781 26.8125 L 6.5820312 26.814453 L 26.416016 15.908203 A 1 1 0 0 0 27 15 A 1 1 0 0 0 26.388672 14.078125 L 6.5820312 3.1855469 L 6.5800781 3.1855469 A 1 1 0 0 0 6 3 z" />
</svg>
</IconButton>
<Flex align="center" gap="4">
<IconButton
tabIndex={tabIndex}
color="gray"
variant="ghost"
radius="full"
size="2"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 30 30"
width="20"
height="20"
fill="currentcolor"
fillOpacity={0.7}
>
<path d="M 21 5 L 21 8 L 18.675781 8 C 16.670448 8 14.796256 9.00408 13.683594 10.671875 L 12 13.197266 L 10.316406 10.671875 C 9.2045791 9.0047337 7.329552 8 5.3242188 8 L 3 8 A 1.0001 1.0001 0 1 0 3 10 L 5.3242188 10 C 6.6628853 10 7.910171 10.668391 8.6523438 11.78125 L 10.798828 15 L 8.6523438 18.21875 C 7.910171 19.331609 6.6628854 20 5.3242188 20 L 3 20 A 1.0001 1.0001 0 1 0 3 22 L 5.3242188 22 C 7.3295521 22 9.2045792 20.995266 10.316406 19.328125 L 12 16.802734 L 13.683594 19.328125 C 14.796256 20.99592 16.670448 22 18.675781 22 L 21 22 L 21 25 L 27 21 L 21 17 L 21 20 L 18.675781 20 C 17.337115 20 16.090994 19.332955 15.347656 18.21875 L 13.201172 15 L 15.347656 11.78125 C 16.090994 10.667045 17.337115 10 18.675781 10 L 21 10 L 21 13 L 27 9 L 21 5 z" />
</svg>
</IconButton>
<IconButton
tabIndex={tabIndex}
color="gray"
variant="ghost"
radius="full"
size="2"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 30 30"
fill="currentcolor"
fillOpacity={0.7}
width="20"
height="20"
>
<path d="M 20 4 L 20 7 L 8 7 C 4.6983746 7 2 9.6983746 2 13 A 1.0001 1.0001 0 1 0 4 13 C 4 10.779625 5.7796254 9 8 9 L 20 9 L 20 12 L 27 8 L 20 4 z M 26.984375 15.986328 A 1.0001 1.0001 0 0 0 26 17 C 26 19.220375 24.220375 21 22 21 L 10 21 L 10 18 L 3 22 L 10 26 L 10 23 L 22 23 C 25.301625 23 28 20.301625 28 17 A 1.0001 1.0001 0 0 0 26.984375 15.986328 z" />
</svg>
</IconButton>
</Flex>
</Flex>
<Flex align="center" gap="3">
<IconButton
tabIndex={tabIndex}
color="gray"
variant="ghost"
radius="full"
size="2"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentcolor"
fillOpacity={0.7}
viewBox="0 0 30 30"
width="20"
height="20"
style={{ marginRight: 2 }}
>
<path d="M 14 6 A 1 1 0 0 0 13.408203 6.1953125 A 1 1 0 0 0 13.378906 6.2167969 L 2.4609375 14.15625 A 1 1 0 0 1 2.4589844 14.158203 L 2.4433594 14.169922 A 1 1 0 0 0 2 15 A 1 1 0 0 0 2.4492188 15.833984 L 13.40625 23.804688 A 1 1 0 0 0 14 24 A 1 1 0 0 0 15 23 A 1 1 0 0 0 15 22.996094 L 15 16.234375 L 25.40625 23.804688 A 1 1 0 0 0 26 24 A 1 1 0 0 0 27 23 A 1 1 0 0 0 27 22.996094 L 27 15 L 27 7.0039062 A 1 1 0 0 0 27 7 A 1 1 0 0 0 26 6 A 1 1 0 0 0 25.40625 6.1953125 A 1 1 0 0 0 25.378906 6.2167969 L 15 13.763672 L 15 7.0039062 A 1 1 0 0 0 15 7 A 1 1 0 0 0 14 6 z" />
</svg>
</IconButton>
<Flex align="center" gap="3">
<img
src={songsHistory[6].cover}
width="48"
height="48"
style={{ borderRadius: 'var(--radius-2)' }}
/>
<Box>
<Text size="1" as="div" weight="medium">
{songsHistory[6].name}
</Text>
<Text size="1" as="div" color="gray" mb="2">
{songsHistory[6].artist} – {songsHistory[6].album}
</Text>
<Box
position="relative"
height="4px"
width="320px"
style={{
backgroundColor: 'var(--gray-a5)',
borderRadius: 'var(--radius-1)',
}}
>
<Box
position="absolute"
height="4px"
width="64px"
style={{
borderRadius: 'var(--radius-1)',
backgroundColor: 'var(--gray-a9)',
}}
/>
<Box position="absolute" top="0" right="0" mt="-28px">
<Text size="1" color="gray">
0:58 / {songsHistory[6].length}
</Text>
</Box>
</Box>
</Box>
</Flex>
<IconButton
tabIndex={tabIndex}
color="gray"
variant="ghost"
radius="full"
size="2"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 30 30"
width="20"
height="20"
fill="currentcolor"
fillOpacity={0.7}
style={{ marginLeft: 2 }}
>
<path d="M 4 6 A 1 1 0 0 0 3 7 A 1 1 0 0 0 3 7.0039062 L 3 15 L 3 22.996094 A 1 1 0 0 0 3 23 A 1 1 0 0 0 4 24 A 1 1 0 0 0 4.5917969 23.804688 L 4.59375 23.804688 A 1 1 0 0 0 4.6210938 23.783203 L 15 16.236328 L 15 22.996094 A 1 1 0 0 0 15 23 A 1 1 0 0 0 16 24 A 1 1 0 0 0 16.591797 23.804688 L 16.59375 23.804688 A 1 1 0 0 0 16.621094 23.783203 L 27.541016 15.841797 A 1 1 0 0 0 28 15 A 1 1 0 0 0 27.556641 14.169922 L 16.59375 6.1953125 A 1 1 0 0 0 16 6 A 1 1 0 0 0 15 7 A 1 1 0 0 0 15 7.0039062 L 15 13.765625 L 4.59375 6.1953125 A 1 1 0 0 0 4 6 z" />
</svg>
</IconButton>
</Flex>
<Flex align="center" gap="2" p="5">
<VolumeNoneIcon color="var(--gray-a9)" />
<Slider
tabIndex={tabIndex}
defaultValue={[80]}
variant="soft"
color="gray"
radius="full"
size="2"
style={{ width: 80 }}
/>
<VolumeMaxIcon color="var(--gray-a9)" />
</Flex>
</Flex>
</Box>
</Card>
<Flex gap="6" flexShrink="0">
<Flex gap="6" flexShrink="0" direction="column" width="416px">
<Card size="3">
<Heading as="h3" size="4" trim="both" mb="5">
Settings
</Heading>
<Flex direction="column" gap="5">
<Text as="label">
<Flex as="span" justify="between" gap="5">
<Box as="span">
<Text as="div" size="2" weight="medium" mb="1">
Automatic downloads
</Text>
<Text as="div" color="gray" size="1">
Automatically download music when added to your library
</Text>
</Box>
<Switch size="3" variant="classic" tabIndex={tabIndex} mt="2" />
</Flex>
</Text>
<Text as="label">
<Flex as="span" justify="between" gap="5">
<Box as="span">
<Text as="div" size="2" weight="medium" mb="1">
Lossless audio
</Text>
<Text as="div" color="gray" size="1">
Preserve every detail of the original audio, but consume significantly
more data
</Text>
</Box>
<Switch size="3" variant="classic" tabIndex={tabIndex} mt="2" />
</Flex>
</Text>
<Text as="label">
<Flex as="span" justify="between" gap="5">
<Box as="span">
<Text as="div" size="2" weight="medium" mb="1">
Spatial audio
</Text>
<Text as="div" color="gray" size="1">
Enhancing the perception of audio in space
</Text>
</Box>
<Switch size="3" variant="classic" tabIndex={tabIndex} mt="2" />
</Flex>
</Text>
<Text as="label">
<Flex as="span" justify="between" gap="5">
<Box as="span">
<Text as="div" size="2" weight="medium" mb="1">
Normalize volume
</Text>
<Text as="div" color="gray" size="1">
Set the same volume level for all tracks
</Text>
</Box>
<Switch
size="3"
variant="classic"
tabIndex={tabIndex}
defaultChecked
mt="2"
/>
</Flex>
</Text>
<Box>
<Flex justify="between" gap="5">
<Box>
<Text as="div" size="2" weight="medium" mb="1">
Maximum volume
</Text>
<Text as="div" color="gray" size="1">
Limit the maximum volume to protect hearing
</Text>
</Box>
</Flex>
<Flex align="center" gap="2" mt="3">
<Box asChild width="24px">
<Text color="gray" size="1">
0%
</Text>
</Box>
<Box flexGrow="1">
<Slider tabIndex={tabIndex} radius="full" size="1" defaultValue={[80]} />
</Box>
<Box asChild width="32px">
<Text color="gray" size="1">
100%
</Text>
</Box>
</Flex>
</Box>
<Box>
<Flex justify="between" gap="5">
<Box>
<Text as="div" size="2" weight="medium" mb="1">
Crossfade
</Text>
<Text as="div" color="gray" size="1">
Smoothly fade out into the next song.
</Text>
</Box>
</Flex>
<Flex align="center" gap="2" mt="3">
<Box asChild width="24px">
<Text color="gray" size="1">
Off
</Text>
</Box>
<Box flexGrow="1">
<Slider tabIndex={tabIndex} radius="full" size="1" defaultValue={[0]} />
</Box>
<Box asChild width="32px">
<Text color="gray" size="1">
10s
</Text>
</Box>
</Flex>
</Box>
</Flex>
</Card>
<Card size="3">
<Flex align="center" justify="between" mb="5">
<Heading as="h3" size="4" trim="both">
Membership
</Heading>
<Flex my="-1" gap="4">
<Button tabIndex={tabIndex} size="2" variant="ghost">
Done
</Button>
</Flex>
</Flex>
<Flex direction="column" gap="4">
<Flex align="center" justify="between">
<Flex direction="column" gap="1">
<Text size="2" weight="medium">
Individual
</Text>
<Text size="1" color="gray">
Sign up with 1 account
</Text>
</Flex>
<Flex direction="column" width="64px">
<Button tabIndex={tabIndex} variant="soft">
$4.99
</Button>
</Flex>
</Flex>
<Flex align="center" justify="between">
<Flex direction="column" gap="1">
<Text size="2" weight="medium">
Duo
</Text>
<Text size="1" color="gray">
Sign up 2 accounts
</Text>
</Flex>
<Flex direction="column" width="64px">
<Button tabIndex={tabIndex}>$6.99</Button>
</Flex>
</Flex>
<Flex align="center" justify="between">
<Flex direction="column" gap="1">
<Text size="2" weight="medium">
Family
</Text>
<Text size="1" color="gray">
Sign up to 6 accounts
</Text>
</Flex>
<Flex direction="column" width="64px">
<Button tabIndex={tabIndex} variant="soft">
$12.99
</Button>
</Flex>
</Flex>
</Flex>
<Box my="5">
<Separator size="4" />
</Box>
<Box>
<Text size="2" as="p" my="3">
Your next payment is $6.99 on{' '}
{(() => {
let date = new Date();
date.setDate(date.getDate() + 20);
return date.toLocaleString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
});
})()}
</Text>
<Text size="2" as="p">
<Link href="#" onClick={(e) => e.preventDefault()} tabIndex={tabIndex}>
Cancel subscription
</Link>
</Text>
</Box>
</Card>
</Flex>
<Flex gap="6" flexShrink="0" direction="column" width="416px">
<Card size="3">
<Flex align="center" justify="between" mb="5">
<Heading as="h3" size="4" trim="both">
Your profile
</Heading>
<Flex my="-1" gap="4">
<Button tabIndex={tabIndex} size="2" variant="ghost">
Cancel
</Button>
<Button tabIndex={tabIndex} size="2" variant="ghost">
Save
</Button>
</Flex>
</Flex>
<Flex direction="column" gap="4">
<Flex asChild direction="column" gap="1">
<Text as="label" size="2" weight="medium">
<Text>Name</Text>
<TextField.Root
variant="classic"
tabIndex={tabIndex}
defaultValue="Vlad Moroz"
/>
</Text>
</Flex>
<Flex asChild direction="column" gap="1">
<Text as="label" size="2" weight="medium">
<Text>Username</Text>
<TextField.Root
variant="classic"
tabIndex={tabIndex}
defaultValue="@vladmoroz"
/>
</Text>
</Flex>
<Flex asChild direction="column" gap="1">
<Text as="label" size="2" weight="medium">
<Text>Email</Text>
<TextField.Root
variant="classic"
tabIndex={tabIndex}
defaultValue="hi@vladmoroz.com"
/>
</Text>
</Flex>
<Flex direction="column" gap="2">
<Text size="2" weight="medium">
Privacy
</Text>
<Flex align="start" direction="column" gap="2">
<Flex asChild gap="2">
<Text as="label" size="2">
<Checkbox tabIndex={tabIndex} defaultChecked />
<Text>Display my listening history</Text>
</Text>
</Flex>
<Flex asChild gap="2">
<Text as="label" size="2">
<Checkbox tabIndex={tabIndex} />
<Text>Everyone can follow my activity</Text>
</Text>
</Flex>
<Flex asChild gap="2">
<Text as="label" size="2">
<Checkbox tabIndex={tabIndex} defaultChecked />
<Text>Show my playlists in search</Text>
</Text>
</Flex>
</Flex>
</Flex>
<Flex direction="column" gap="2">
<Text size="2" weight="medium">
Danger zone
</Text>
<Flex align="start" direction="column" gap="2">
<Link
href="#"
onClick={(e) => e.preventDefault()}
tabIndex={tabIndex}