Files
nademitex_user/dist/assets/PageSkeleton-CpZ7eT1v.js
T

1 line
4.1 KiB
JavaScript

import{Et as e,O as t,P as n,Q as r,R as i,X as a,j as o,n as s,wt as c,z as l}from"./BasicIcon-Bnxm-DKk.js";var u=s(l({__name:`SkeletonBlock`,props:{width:{default:`100%`},height:{default:`14px`},radius:{default:`8px`},circle:{type:Boolean,default:!1}},setup(t){return(r,i)=>(a(),n(`span`,{class:c([`sk`,{"sk--circle":t.circle}]),style:e({width:t.width,height:t.height,borderRadius:t.circle?`50%`:t.radius}),"aria-hidden":`true`},null,6))}}),[[`__scopeId`,`data-v-eee3758f`]]),d={class:`page-skeleton__hero`},f={class:`page-skeleton__quick`},p={class:`page-skeleton__level`},m={class:`page-skeleton__level-top`},h={class:`page-skeleton__level-text`},g={class:`page-skeleton__products`},_={class:`page-skeleton__section-head`},v={class:`page-skeleton__grid page-skeleton__product-grid`},y={class:`page-skeleton__profile-hero`},b={class:`page-skeleton__panel`},x={class:`page-skeleton__list`},S={class:`page-skeleton__row-text`},C={class:`page-skeleton__detail-body`},w={class:`page-skeleton__chips`},T={class:`page-skeleton__grid`},E={key:4,class:`page-skeleton__form`},D={key:5,class:`page-skeleton__list`},O={class:`page-skeleton__row-text`},k=s(l({__name:`PageSkeleton`,props:{variant:{default:`list`},rows:{default:4}},setup(e){return(s,l)=>(a(),n(`div`,{class:c([`page-skeleton`,{"page-skeleton--home":e.variant===`home`}]),role:`status`,"aria-live":`polite`,"aria-busy":`true`,"aria-label":`در حال بارگذاری`},[e.variant===`home`?(a(),n(t,{key:0},[o(`div`,d,[i(u,{class:`page-skeleton__hero-block`,height:`148px`,radius:`16px`})]),o(`div`,f,[(a(),n(t,null,r(4,e=>o(`div`,{key:`q-${e}`,class:`page-skeleton__quick-item`},[i(u,{circle:``,width:`48px`,height:`48px`}),i(u,{width:`72%`,height:`10px`})])),64))]),o(`div`,p,[o(`div`,m,[i(u,{circle:``,width:`48px`,height:`48px`}),o(`div`,h,[i(u,{width:`56px`,height:`10px`}),i(u,{width:`88px`,height:`16px`}),i(u,{width:`104px`,height:`10px`})])]),i(u,{height:`8px`,radius:`999px`}),i(u,{width:`62%`,height:`10px`})]),o(`div`,g,[o(`div`,_,[i(u,{width:`132px`,height:`16px`}),i(u,{width:`72px`,height:`12px`})]),o(`div`,v,[(a(),n(t,null,r(6,e=>o(`div`,{key:`g-${e}`,class:`page-skeleton__card`},[i(u,{class:`page-skeleton__product-image`,height:`110px`,radius:`12px`}),i(u,{width:`82%`,height:`12px`}),i(u,{width:`54%`,height:`10px`})])),64))])])],64)):e.variant===`profile`?(a(),n(t,{key:1},[o(`div`,y,[i(u,{circle:``,width:`72px`,height:`72px`}),i(u,{width:`45%`,height:`18px`}),i(u,{width:`30%`,height:`12px`})]),o(`div`,b,[(a(),n(t,null,r(4,e=>o(`div`,{key:`s-${e}`,class:`page-skeleton__stat`},[i(u,{width:`50%`,height:`10px`}),i(u,{width:`70%`,height:`18px`})])),64))]),o(`div`,x,[(a(),n(t,null,r(5,e=>o(`div`,{key:`m-${e}`,class:`page-skeleton__row`},[i(u,{circle:``,width:`36px`,height:`36px`}),o(`div`,S,[i(u,{width:`55%`,height:`12px`}),i(u,{width:`35%`,height:`10px`})])])),64))])],64)):e.variant===`detail`?(a(),n(t,{key:2},[i(u,{height:`220px`,radius:`0`}),o(`div`,C,[i(u,{width:`70%`,height:`20px`}),i(u,{width:`40%`,height:`12px`}),i(u,{height:`72px`,radius:`12px`}),i(u,{width:`100%`,height:`12px`}),i(u,{width:`92%`,height:`12px`}),i(u,{width:`85%`,height:`12px`}),i(u,{height:`48px`,radius:`12px`})])],64)):e.variant===`grid`||e.variant===`cards`?(a(),n(t,{key:3},[i(u,{width:`55%`,height:`16px`}),o(`div`,w,[(a(),n(t,null,r(4,e=>i(u,{key:`c-${e}`,width:`72px`,height:`32px`,radius:`999px`})),64))]),o(`div`,T,[(a(!0),n(t,null,r(e.rows,e=>(a(),n(`div`,{key:`card-${e}`,class:`page-skeleton__card`},[i(u,{height:`120px`,radius:`12px`}),i(u,{width:`85%`,height:`12px`}),i(u,{width:`55%`,height:`10px`})]))),128))])],64)):e.variant===`form`?(a(),n(`div`,E,[(a(!0),n(t,null,r(e.rows,e=>(a(),n(`div`,{key:`f-${e}`,class:`page-skeleton__field`},[i(u,{width:`30%`,height:`10px`}),i(u,{height:`44px`,radius:`10px`})]))),128)),i(u,{height:`48px`,radius:`12px`})])):(a(),n(`div`,D,[(a(!0),n(t,null,r(e.rows,e=>(a(),n(`div`,{key:`r-${e}`,class:`page-skeleton__row page-skeleton__row--card`},[i(u,{circle:``,width:`40px`,height:`40px`}),o(`div`,O,[i(u,{width:`62%`,height:`13px`}),i(u,{width:`42%`,height:`10px`}),i(u,{width:`28%`,height:`10px`})])]))),128))]))],2))}}),[[`__scopeId`,`data-v-d3e1c988`]]);export{k as t};