mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2025-09-03 16:19:22 +00:00
2 lines
2.3 KiB
JavaScript
2 lines
2.3 KiB
JavaScript
import{g as h,p as f,N as k,u as x,a9 as y,a7 as S,J as C,K as L,U as w,c as B,i as l,E as P,ad as V,ah as T,f as _,e as A}from"./index-DmGr2YjE.js";const E={actions:"button@2",article:"heading, paragraph",avatar:"avatar",button:"button",card:"image, heading","card-avatar":"image, list-item-avatar",chip:"chip","date-picker":"list-item, heading, divider, date-picker-options, date-picker-days, actions","date-picker-options":"text, avatar@2","date-picker-days":"avatar@28",divider:"divider",heading:"heading",image:"image","list-item":"text","list-item-avatar":"avatar, text","list-item-two-line":"sentences","list-item-avatar-two-line":"avatar, sentences","list-item-three-line":"paragraph","list-item-avatar-three-line":"avatar, paragraph",ossein:"ossein",paragraph:"text@3",sentences:"text@2",subtitle:"text",table:"table-heading, table-thead, table-tbody, table-tfoot","table-heading":"chip, text","table-thead":"heading@6","table-tbody":"table-row-divider@6","table-row-divider":"table-row, divider","table-row":"text@6","table-tfoot":"text@2, avatar@2",text:"text"};function D(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return l("div",{class:A(["v-skeleton-loader__bone",`v-skeleton-loader__${e}`])},[t])}function o(e){const[t,a]=e.split("@");return Array.from({length:a}).map(()=>i(t))}function i(e){let t=[];if(!e)return t;const a=E[e];if(e!==a){if(e.includes(","))return s(e);if(e.includes("@"))return o(e);a.includes(",")?t=s(a):a.includes("@")?t=o(a):a&&t.push(i(a))}return[D(e,t)]}function s(e){return e.replace(/\s/g,"").split(",").map(i)}const N=f({boilerplate:Boolean,color:String,loading:Boolean,loadingText:{type:String,default:"$vuetify.loading"},type:{type:[String,Array],default:"ossein"},..._(),...T(),...V()},"VSkeletonLoader"),j=h()({name:"VSkeletonLoader",props:N(),setup(e,t){let{slots:a}=t;const{backgroundColorClasses:d,backgroundColorStyles:c}=k(()=>e.color),{dimensionStyles:u}=x(e),{elevationClasses:g}=y(e),{themeClasses:m}=S(e),{t:v}=C(),p=L(()=>i(w(e.type).join(",")));return B(()=>{var r;const n=!a.default||e.loading,b=e.boilerplate||!n?{}:{ariaLive:"polite",ariaLabel:v(e.loadingText),role:"alert"};return l("div",P({class:["v-skeleton-loader",{"v-skeleton-loader--boilerplate":e.boilerplate},m.value,d.value,g.value],style:[c.value,n?u.value:{}]},b),[n?p.value:(r=a.default)==null?void 0:r.call(a)])}),{}}});export{j as V};
|