@@ -162,55 +162,61 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen | |||||
</div> | </div> | ||||
{enhanced && ( | {enhanced && ( | ||||
<div className="w-full flex-shrink-0 h-10 flex gap-4 items-center"> | <div className="w-full flex-shrink-0 h-10 flex gap-4 items-center"> | ||||
<button | |||||
className={clsx( | |||||
'w-10 h-full flex-shrink-0 text-primary flex items-center justify-center', | |||||
'focus:text-secondary focus:outline-0', | |||||
'active:text-tertiary', | |||||
'disabled:text-primary disabled:cursor-not-allowed disabled:opacity-50', | |||||
)} | |||||
type="submit" | |||||
name="action" | |||||
value="togglePlayback" | |||||
form={formId} | |||||
<div | |||||
className="py-1 w-14 h-full flex-shrink-0 text-primary flex items-center justify-center" | |||||
> | > | ||||
{ | |||||
isPlaying | |||||
? ( | |||||
<svg | |||||
aria-label="Pause" | |||||
viewBox="0 0 24 24" | |||||
className="w-6 h-6 fill-none stroke-current stroke-2" | |||||
strokeLinecap="round" | |||||
strokeLinejoin="round" | |||||
> | |||||
<rect | |||||
x="6" | |||||
y="4" | |||||
width="4" | |||||
height="16" | |||||
/> | |||||
<rect | |||||
x="14" | |||||
y="4" | |||||
width="4" | |||||
height="16" | |||||
/> | |||||
</svg> | |||||
) | |||||
: ( | |||||
<svg | |||||
aria-label="Play" | |||||
viewBox="0 0 24 24" | |||||
className="w-6 h-6 fill-none stroke-current stroke-2" | |||||
strokeLinecap="round" | |||||
strokeLinejoin="round" | |||||
> | |||||
<polygon points="5 3 19 12 5 21 5 3" /> | |||||
</svg> | |||||
<button | |||||
className={ | |||||
clsx( | |||||
'w-full h-full flex-shrink-0 text-primary flex items-center justify-center bg-primary/30 rounded', | |||||
'focus:text-secondary focus:outline-0 focus:bg-secondary/30', | |||||
'active:text-tertiary active:bg-tertiary/30', | |||||
'disabled:text-primary disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-primary/30', | |||||
) | ) | ||||
} | |||||
</button> | |||||
} | |||||
type="submit" | |||||
name="action" | |||||
value="togglePlayback" | |||||
form={formId} | |||||
> | |||||
{ | |||||
isPlaying | |||||
? ( | |||||
<svg | |||||
aria-label="Pause" | |||||
viewBox="0 0 24 24" | |||||
className="w-6 h-6 fill-none stroke-current stroke-2" | |||||
strokeLinecap="round" | |||||
strokeLinejoin="round" | |||||
> | |||||
<rect | |||||
x="6" | |||||
y="4" | |||||
width="4" | |||||
height="16" | |||||
/> | |||||
<rect | |||||
x="14" | |||||
y="4" | |||||
width="4" | |||||
height="16" | |||||
/> | |||||
</svg> | |||||
) | |||||
: ( | |||||
<svg | |||||
aria-label="Play" | |||||
viewBox="0 0 24 24" | |||||
className="w-6 h-6 fill-none stroke-current stroke-2" | |||||
strokeLinecap="round" | |||||
strokeLinejoin="round" | |||||
> | |||||
<polygon points="5 3 19 12 5 21 5 3" /> | |||||
</svg> | |||||
) | |||||
} | |||||
</button> | |||||
</div> | |||||
<div className="flex-auto w-full flex items-center gap-2 text-sm relative"> | <div className="flex-auto w-full flex items-center gap-2 text-sm relative"> | ||||
<button | <button | ||||
className="absolute overflow-hidden w-12 opacity-0 h-10 peer/seek" | className="absolute overflow-hidden w-12 opacity-0 h-10 peer/seek" | ||||
@@ -104,57 +104,61 @@ export const VideoFilePreview = React.forwardRef<VideoFilePreviewDerivedComponen | |||||
</div> | </div> | ||||
{enhanced && ( | {enhanced && ( | ||||
<div className="w-full flex-shrink-0 h-10 flex gap-4 items-center"> | <div className="w-full flex-shrink-0 h-10 flex gap-4 items-center"> | ||||
<button | |||||
className={ | |||||
clsx( | |||||
'w-10 h-full flex-shrink-0 text-primary flex items-center justify-center', | |||||
'focus:text-secondary focus:outline-0', | |||||
'active:text-tertiary', | |||||
'disabled:text-primary disabled:cursor-not-allowed disabled:opacity-50' | |||||
) | |||||
} | |||||
type="submit" | |||||
name="action" | |||||
value="togglePlayback" | |||||
form={formId} | |||||
<div | |||||
className="py-1 w-14 h-full flex-shrink-0 text-primary flex items-center justify-center" | |||||
> | > | ||||
{ | |||||
isPlaying | |||||
? ( | |||||
<svg | |||||
aria-label="Pause" | |||||
viewBox="0 0 24 24" | |||||
className="w-6 h-6 fill-none stroke-current stroke-2" | |||||
strokeLinecap="round" | |||||
strokeLinejoin="round" | |||||
> | |||||
<rect | |||||
x="6" | |||||
y="4" | |||||
width="4" | |||||
height="16" | |||||
/> | |||||
<rect | |||||
x="14" | |||||
y="4" | |||||
width="4" | |||||
height="16" | |||||
/> | |||||
</svg> | |||||
) | |||||
: ( | |||||
<svg | |||||
aria-label="Play" | |||||
viewBox="0 0 24 24" | |||||
className="w-6 h-6 fill-none stroke-current stroke-2" | |||||
strokeLinecap="round" | |||||
strokeLinejoin="round" | |||||
> | |||||
<polygon points="5 3 19 12 5 21 5 3" /> | |||||
</svg> | |||||
<button | |||||
className={ | |||||
clsx( | |||||
'w-full h-full flex-shrink-0 text-primary flex items-center justify-center bg-primary/30 rounded', | |||||
'focus:text-secondary focus:outline-0 focus:bg-secondary/30', | |||||
'active:text-tertiary active:bg-tertiary/30', | |||||
'disabled:text-primary disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-primary/30', | |||||
) | ) | ||||
} | |||||
</button> | |||||
} | |||||
type="submit" | |||||
name="action" | |||||
value="togglePlayback" | |||||
form={formId} | |||||
> | |||||
{ | |||||
isPlaying | |||||
? ( | |||||
<svg | |||||
aria-label="Pause" | |||||
viewBox="0 0 24 24" | |||||
className="w-6 h-6 fill-none stroke-current stroke-2" | |||||
strokeLinecap="round" | |||||
strokeLinejoin="round" | |||||
> | |||||
<rect | |||||
x="6" | |||||
y="4" | |||||
width="4" | |||||
height="16" | |||||
/> | |||||
<rect | |||||
x="14" | |||||
y="4" | |||||
width="4" | |||||
height="16" | |||||
/> | |||||
</svg> | |||||
) | |||||
: ( | |||||
<svg | |||||
aria-label="Play" | |||||
viewBox="0 0 24 24" | |||||
className="w-6 h-6 fill-none stroke-current stroke-2" | |||||
strokeLinecap="round" | |||||
strokeLinejoin="round" | |||||
> | |||||
<polygon points="5 3 19 12 5 21 5 3" /> | |||||
</svg> | |||||
) | |||||
} | |||||
</button> | |||||
</div> | |||||
<div className="flex-auto w-full flex items-center gap-2 text-sm relative"> | <div className="flex-auto w-full flex items-center gap-2 text-sm relative"> | ||||
<button | <button | ||||
className="absolute overflow-hidden w-12 opacity-0 h-10 peer/seek" | className="absolute overflow-hidden w-12 opacity-0 h-10 peer/seek" | ||||