mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2025-10-22 02:03:10 +00:00
2 lines
2.4 KiB
JavaScript
2 lines
2.4 KiB
JavaScript
import{g as f,p as k,aa as x,u as y,b4 as S,b2 as C,ac as L,ao as w,aq as B,c as P,i as r,E as V,F as T,ak as A,b7 as _,f as E,e as F}from"./index-DFgkZgUi.js";const D={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 $(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return r("div",{class:F(["v-skeleton-loader__bone",`v-skeleton-loader__${e}`])},[a])}function l(e){const[a,t]=e.split("@");return Array.from({length:t}).map(()=>i(a))}function i(e){let a=[];if(!e)return a;const t=D[e];if(e!==t){if(e.includes(","))return d(e);if(e.includes("@"))return l(e);t.includes(",")?a=d(t):t.includes("@")?a=l(t):t&&a.push(i(t))}return[$(e,a)]}function d(e){return e.replace(/\s/g,"").split(",").map(i)}const j=k({boilerplate:Boolean,color:String,loading:Boolean,loadingText:{type:String,default:"$vuetify.loading"},type:{type:[String,Array],default:"ossein"},...E(),..._(),...A()},"VSkeletonLoader"),z=f()({name:"VSkeletonLoader",inheritAttrs:!1,props:j(),setup(e,a){let{attrs:t,slots:n}=a;const{backgroundColorClasses:c,backgroundColorStyles:u}=x(()=>e.color),{dimensionStyles:g}=y(e),{elevationClasses:m}=S(e),{themeClasses:v}=C(e),{t:b}=L(),p=w(()=>i(B(e.type).join(",")));return P(()=>{var s;const o=!n.default||e.loading,h=e.boilerplate||!o?{}:{ariaLive:"polite",ariaLabel:b(e.loadingText),role:"alert"};return r(T,null,[o?r("div",V({class:["v-skeleton-loader",{"v-skeleton-loader--boilerplate":e.boilerplate},v.value,c.value,m.value],style:[u.value,g.value]},h,t),[p.value]):(s=n.default)==null?void 0:s.call(n)])}),{}}});export{z as V};
|