UNPKG

@bothub-chat/ui

Version:

Bothub UI Components

10 lines (9 loc) 4.29 kB
import{styled as e,css as t}from"styled-components";import{Typography as i}from"../../typography/index.js";import{Button as o}from"../../button/index.js";import{Skeleton as a}from"../../skeleton/index.js";const s=e.div.withConfig({displayName:"styled__MessageVideoControls",componentId:"sc-sakyfd-0"})(["transform:",";opacity:",";transition:all 300ms ease-out;position:absolute;left:0;bottom:0;display:flex;flex-direction:column;gap:8px;padding:8px;padding-top:16px;background:linear-gradient( 180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100% );width:100%;",""],({$isVisible:e})=>e?"translateY(0)":"translateY(100%)",({$isVisible:e})=>e?1:0,({$isFullScreen:e})=>e&&t` padding: 24px; gap: 24px; `),n=e.div.withConfig({displayName:"styled__MessageVideoContainer",componentId:"sc-sakyfd-1"})(["position:relative;display:flex;justify-content:center;overflow:hidden;border-radius:inherit;width:100%;max-width:640px;@media (max-width:","){max-width:none;}&:hover{","{opacity:1;transform:translateY(0);}}&:fullscreen,&:-webkit-full-screen{max-width:none;width:100%;height:100%;background:#000;border-radius:0;align-items:center;}"],({theme:e})=>e.mobile.maxWidth,s),d=e.video.withConfig({displayName:"styled__MessageVideoStyled",componentId:"sc-sakyfd-2"})(["width:100%;max-width:",";"," @media (max-width:","){max-width:none;}",":fullscreen &,",":-webkit-full-screen &{max-width:none;height:100%;object-fit:contain;}"],({$isFullScreen:e})=>e?"100%":"640px",({$isLoading:e})=>e&&t` position: absolute; inset: 0; opacity: 0; pointer-events: none; `,({theme:e})=>e.mobile.maxWidth,n,n),r=e.button.withConfig({displayName:"styled__MessageVideoControlsButton",componentId:"sc-sakyfd-3"})(["position:relative;cursor:pointer;flex-shrink:0;background:none;border:none;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;svg path{stroke:white;}&:disabled{opacity:0.5;}"]),l=e.div.withConfig({displayName:"styled__MessageVideoControlsButtons",componentId:"sc-sakyfd-4"})(["display:grid;grid-template-columns:auto auto 1fr auto auto;gap:8px;align-items:center;"]),p=e.div.withConfig({displayName:"styled__MessageVideoTimeLine",componentId:"sc-sakyfd-5"})(["position:relative;height:6px;border-radius:4px;width:100%;background:rgba(255,255,255,0.5);cursor:pointer;transition:all 100ms ease-out;&:hover{opacity:0.8;height:16px;}&:after{content:'';position:absolute;bottom:0;left:0;height:inherit;width:","%;right:0;bottom:0;background:",";}"],({$progress:e})=>e,({theme:e})=>e.colors.accent.primary),m=e(i).attrs({variant:"body-s-medium"}).withConfig({displayName:"styled__MessageVideoTimeText",componentId:"sc-sakyfd-6"})(["color:",";"],({theme:e})=>e.default.colors.base.white),h=e.div.withConfig({displayName:"styled__MessageVideoVolumeLine",componentId:"sc-sakyfd-7"})(["position:relative;height:4px;transition:all 300ms ease-out;border-radius:4px;width:0;max-width:100px;opacity:0;background:rgba(255,255,255,0.5);display:flex;cursor:pointer;align-items:center;&:after{content:'';position:absolute;cursor:pointer;bottom:0;left:0;border-radius:4px;height:4px;width:","%;right:0;bottom:0;background:",";}&:before{content:'';position:absolute;left:","%;width:12px;z-index:1;margin-left:-8px;cursor:pointer;height:12px;border-radius:50%;background:rgba(255,255,255,1);}"],({$volume:e})=>e,({theme:e})=>e.default.colors.base.white,({$volume:e})=>e),c=e.div.withConfig({displayName:"styled__MessageVideoVolumeContainer",componentId:"sc-sakyfd-8"})(["display:flex;width:100%;align-items:center;overflow:hidden;gap:8px;&:hover{padding-right:8px;","{width:75px;opacity:1;}}"],h),g=e(o).attrs({variant:"text"}).withConfig({displayName:"styled__MessageVideoDownload",componentId:"sc-sakyfd-9"})([""]),u=e(a).withConfig({displayName:"styled__MessageVideoSkeleton",componentId:"sc-sakyfd-10"})(["width:100%;aspect-ratio:",";height:",";"],({$isFullScreen:e})=>e?"auto":"16/9",({$isFullScreen:e})=>e?"100vh":"200px");export{n as MessageVideoContainer,s as MessageVideoControls,r as MessageVideoControlsButton,l as MessageVideoControlsButtons,g as MessageVideoDownload,u as MessageVideoSkeleton,d as MessageVideoStyled,p as MessageVideoTimeLine,m as MessageVideoTimeText,c as MessageVideoVolumeContainer,h as MessageVideoVolumeLine};