@bothub-chat/ui
Version:
Bothub UI Components
2 lines (1 loc) • 6.33 kB
JavaScript
import{jsx as e}from"react/jsx-runtime";import{styled as t,css as i}from"styled-components";import{Avatar as n}from"../avatar/index.js";import{Typography as o}from"../typography/index.js";import{Badge as a}from"../badge/index.js";import{Backdrop as p}from"../backdrop/index.js";import{Image as d}from"../image/index.js";import{Button as l}from"../button/index.js";import{Container as r}from"../container/index.js";import{ArrowNarrowLeftIcon as s}from"../../icons/arrow-narrow-left/index.js";import{ArrowNarrowRightIcon as m}from"../../icons/arrow-narrow-right/index.js";import{adaptive as c}from"../../adaptive/index.js";import{ZoommableImage as g}from"./zoommable-image/index.js";const h=t.div.withConfig({displayName:"styled__ImageFullScreenStyled",componentId:"sc-n12p0f-0"})(["display:flex;justify-content:center;align-items:center;position:fixed;top:0px;bottom:0px;left:0px;right:0px;padding-top:34px;z-index:",";pointer-events:none;@media (max-height:600px){--bothub-scale:0.8;}@media (max-height:460px){--bothub-scale:0.6;}@media (max-height:440px){--bothub-scale:0.5;}"],({theme:e})=>e.zIndex.modal+1),x=t(p).withConfig({displayName:"styled__ImageFullScreenBackdrop",componentId:"sc-n12p0f-1"})(["pointer-events:auto;"]),f=t(r).withConfig({displayName:"styled__ImageFullScreenContainer",componentId:"sc-n12p0f-2"})(["height:100%;"]),y=t.div.withConfig({displayName:"styled__ImageFullScreenContent",componentId:"sc-n12p0f-3"})(["display:flex;align-items:center;flex-direction:column;position:relative;height:100%;z-index:",";"],({theme:e})=>e.zIndex.modal+1),u=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlock",componentId:"sc-n12p0f-4"})(["display:flex;flex-shrink:0;width:100%;background:",";border-bottom:1px solid ",";border-radius:17px;overflow:hidden;padding:16px 24px;pointer-events:auto;"],({theme:e})=>e.colors.grayScale.gray4,({theme:e})=>e.colors.grayScale.gray2),w=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlockContent",componentId:"sc-n12p0f-5"})(["display:flex;justify-content:space-between;width:100%;"]),v=t.div.withConfig({displayName:"styled__ImageFullScreenAuthor",componentId:"sc-n12p0f-6"})(["display:flex;align-items:center;gap:12px;"]),I=t(n).attrs({size:30}).withConfig({displayName:"styled__ImageFullScreenAuthorAvatar",componentId:"sc-n12p0f-7"})([""]),_=t(o).attrs({variant:"body-m-medium"}).withConfig({displayName:"styled__ImageFullScreenAuthorName",componentId:"sc-n12p0f-8"})(["cursor:default;"]),b=t(a).attrs({variant:"info"}).withConfig({displayName:"styled__ImageFullScreenAuthorTag",componentId:"sc-n12p0f-9"})([""]),C=t.div.withConfig({displayName:"styled__ImageFullScreenToolbar",componentId:"sc-n12p0f-10"})([""]),S=t.div.withConfig({displayName:"styled__ImageFullScreenMain",componentId:"sc-n12p0f-11"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;"]),N=t.div.withConfig({displayName:"styled__ImageFullScreenCarousel",componentId:"sc-n12p0f-12"})(["position:relative;width:100vw;overflow:hidden;"]),F=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselContainer",componentId:"sc-n12p0f-13"})(["display:flex;will-change:transform;touch-action:none;user-select:none;width:100%;height:100%;transition:transform 0.3s ease-in-out;"]),j=t.div.withConfig({displayName:"styled__ImageFullScreenSlide",componentId:"sc-n12p0f-14"})(["width:100vw;flex-shrink:0;pointer-events:none;display:flex;align-items:center;justify-content:center;& > *{pointer-events:all;}&:active{cursor:grabbing;}"]),k=t(g).withConfig({displayName:"styled__ImageFullScreenImage",componentId:"sc-n12p0f-15"})(["& > * > img{object-fit:cover;width:auto;height:auto;max-height:60vh;pointer-events:none;user-select:none;"," @media (max-height:600px){max-width:256px;max-height:256px;}}& > div > span{max-height:min(60vh,512px);"," @media (max-width:600px){max-width:256px;max-height:256px;}@media (max-height:600px){max-width:256px;max-height:256px;}}"],c({merge:!0,desktop:i(["max-width:80vw;"]),mobile:i(["max-width:256px;"])}),c({merge:!0,desktop:i(["max-width:512px;"]),mobile:i(["max-width:256px;"])})),z=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselButtons",componentId:"sc-n12p0f-16"})(["display:flex;justify-content:center;align-items:center;position:absolute;top:0px;bottom:0px;left:0px;right:0px;width:100vw;z-index:1;pointer-events:none;"," @media (max-height:600px){gap:calc(min(256px,","px) + 48px);}"],c(({$imageWidth:e})=>({merge:!0,desktop:i(["gap:calc(","px + 48px);"],e),mobile:i(["gap:calc(","px + 48px);"],e)})),({$imageWidth:e})=>e),B=t(l).attrs({children:e(s,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselPrevButton",componentId:"sc-n12p0f-17"})(["pointer-events:auto;"]),A=t(l).attrs({children:e(m,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselNextButton",componentId:"sc-n12p0f-18"})(["pointer-events:auto;"]),P=t.div.withConfig({displayName:"styled__ImageFullScreenPreview",componentId:"sc-n12p0f-19"})(["display:flex;flex-shrink:0;border-radius:14px;overflow:hidden;background:",";margin-top:20px;pointer-events:auto;",""],({theme:e})=>e.colors.grayScale.gray3,c({merge:!0,desktop:i(["padding:10px;"]),mobile:i(["padding:8px;"])})),T=t.div.withConfig({displayName:"styled__ImageFullScreenPreviewImages",componentId:"sc-n12p0f-20"})(["display:flex;gap:10px;"]),$=t(d).attrs({width:64,height:64,loading:"skeleton"}).withConfig({displayName:"styled__ImageFullScreenPreviewImage",componentId:"sc-n12p0f-21"})(["display:inline-flex;width:auto;border-radius:10px;cursor:pointer;opacity:",";transition:0.225s opacity;object-fit:cover;&:hover{opacity:1;}"],({$active:e})=>e?1:.6);export{v as ImageFullScreenAuthor,I as ImageFullScreenAuthorAvatar,_ as ImageFullScreenAuthorName,b as ImageFullScreenAuthorTag,x as ImageFullScreenBackdrop,N as ImageFullScreenCarousel,z as ImageFullScreenCarouselButtons,F as ImageFullScreenCarouselContainer,A as ImageFullScreenCarouselNextButton,B as ImageFullScreenCarouselPrevButton,f as ImageFullScreenContainer,y as ImageFullScreenContent,k as ImageFullScreenImage,S as ImageFullScreenMain,P as ImageFullScreenPreview,$ as ImageFullScreenPreviewImage,T as ImageFullScreenPreviewImages,j as ImageFullScreenSlide,h as ImageFullScreenStyled,C as ImageFullScreenToolbar,u as ImageFullScreenTopBlock,w as ImageFullScreenTopBlockContent};