На заливку

This commit is contained in:
iriska-gri committed 2023-12-07 14:45:23 +03:00
1 parent ef775b88b2
commit 965c153c56
45 files changed
+56 -52

No files matched your search

+1
View File
@@ -0,0 +1 @@
import{r as H,aO as Ke,p as se,a0 as ge,ah as Ze,a1 as Ve,a2 as $e,ai as el,aj as ll,a3 as al,a4 as tl,a5 as nl,bg as ol,a6 as ye,a9 as he,a7 as We,ag as il,a8 as sl,av as Ge,s as pe,ap as Re,c as z,ab as ve,al as ne,ac as _e,F as e,H as Z,bh as Be,z as Te,w as ie,Z as Q,at as rl,aa as De,aH as cl,d as ul,aK as dl,as as gl,b as ke,o as fl,bi as ml,bj as vl,bk as hl,b2 as pl,bl as yl,bm as _l,bn as kl,V as oe,ar as bl,G as b,bb as wl,bc as Cl,A as xl,_ as Xe,aN as Il,aP as Vl,aG as me,U as Al,W as Sl,C as k,D as te,E as n,L as i,S as F,Y as V,$ as ce,K as f,N as ze,O as Me,R as ue,I as xe,J as be,M as Ll,aq as T,ad as y,aE as Fe,af as de,bo as Ne,aF as B,ae as D,aQ as Pl,aR as Rl,aB as Bl,X as Tl}from"./index-c88a2b18.js";import{u as Ae,V as I,a as Dl}from"./VBtn-3e30d8f6.js";import{m as zl,g as Ml,u as Fl,V as Ee,d as Nl,b as Ce,a as Ue,h as He,c as Ie}from"./VList-1710ecfb.js";import{d as El}from"./VInput-b34b1163.js";import{m as Ul,V as Hl,f as Ol}from"./VSelectionControl-32b442ed.js";import{V as jl}from"./VChip-e811d273.js";import{V as ql}from"./VTextarea-86c6c8f9.js";import{V as Kl}from"./VSpacer-fbe6a467.js";import{V as Oe}from"./VAlert-e3223400.js";function Wl(){const o=H([]);Ke(()=>o.value=[]);function r(u,t){o.value[t]=u}return{refs:o,updateRef:r}}const Gl=se({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:o=>o.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:o=>o%1===0},totalVisible:[Number,String],firstIcon:{type:ge,default:"$first"},prevIcon:{type:ge,default:"$prev"},nextIcon:{type:ge,default:"$next"},lastIcon:{type:ge,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...Ze(),...Ve(),...$e(),...el(),...ll(),...al(),...tl({tag:"nav"}),...nl(),...ol({variant:"text"})},"VPagination"),Xl=ye()({name:"VPagination",props:Gl(),emits:{"update:modelValue":o=>!0,first:o=>!0,prev:o=>!0,next:o=>!0,last:o=>!0},setup(o,r){let{slots:u,emit:t}=r;const m=he(o,"modelValue"),{t:_,n:a}=We(),{isRtl:d}=il(),{themeClasses:l}=sl(o),{width:c}=Ge(),L=pe(-1);Re(void 0,{scoped:!0});const{resizeRef:x}=Ae(g=>{if(!g.length)return;const{target:h,contentRect:C}=g[0],M=h.querySelector(".v-pagination__list > *");if(!M)return;const E=C.width,G=M.offsetWidth+parseFloat(getComputedStyle(M).marginRight)*2;L.value=N(E,G)}),p=z(()=>parseInt(o.length,10)),w=z(()=>parseInt(o.start,10)),P=z(()=>o.totalVisible?parseInt(o.totalVisible,10):L.value>=0?L.value:N(c.value,58));function N(g,h){const C=o.showFirstLastPage?5:3;return Math.max(0,Math.floor(+((g-h*C)/h).toFixed(2)))}const $=z(()=>{if(p.value<=0||isNaN(p.value)||p.value>Number.MAX_SAFE_INTEGER)return[];if(P.value<=1)return[m.value];if(p.value<=P.value)return ve(p.value,w.value);const g=P.value%2===0,h=g?P.value/2:Math.floor(P.value/2),C=g?h:h+1,M=p.value-h;if(C-m.value>=0)return[...ve(Math.max(1,P.value-1),w.value),o.ellipsis,p.value];if(m.value-M>=(g?1:0)){const E=P.value-1,G=p.value-E+w.value;return[w.value,o.ellipsis,...ve(E,G)]}else{const E=Math.max(1,P.value-3),G=E===1?m.value:m.value-Math.ceil(E/2)+w.value;return[w.value,o.ellipsis,...ve(E,G),o.ellipsis,p.value]}});function j(g,h,C){g.preventDefault(),m.value=h,C&&t(C,h)}const{refs:ee,updateRef:le}=Wl();Re({VPaginationBtn:{color:ne(o,"color"),border:ne(o,"border"),density:ne(o,"density"),size:ne(o,"size"),variant:ne(o,"variant"),rounded:ne(o,"rounded"),elevation:ne(o,"elevation")}});const K=z(()=>$.value.map((g,h)=>{const C=M=>le(M,h);if(typeof g=="string")return{isActive:!1,key:`ellipsis-${h}`,page:g,props:{ref:C,ellipsis:!0,icon:!0,disabled:!0}};{const M=g===m.value;return{isActive:M,key:g,page:a(g),props:{ref:C,ellipsis:!1,icon:!0,disabled:!!o.disabled||+o.length<2,color:M?o.activeColor:o.color,ariaCurrent:M,ariaLabel:_(M?o.currentPageAriaLabel:o.pageAriaLabel,g),onClick:E=>j(E,g)}}}})),O=z(()=>{const g=!!o.disabled||m.value<=w.value,h=!!o.disabled||m.value>=w.value+p.value-1;return{first:o.showFirstLastPage?{icon:d.value?o.lastIcon:o.firstIcon,onClick:C=>j(C,w.value,"first"),disabled:g,ariaLabel:_(o.firstAriaLabel),ariaDisabled:g}:void 0,prev:{icon:d.value?o.nextIcon:o.prevIcon,onClick:C=>j(C,m.value-1,"prev"),disabled:g,ariaLabel:_(o.previousAriaLabel),ariaDisabled:g},next:{icon:d.value?o.prevIcon:o.nextIcon,onClick:C=>j(C,m.value+1,"next"),disabled:h,ariaLabel:_(o.nextAriaLabel),ariaDisabled:h},last:o.showFirstLastPage?{icon:d.value?o.firstIcon:o.lastIcon,onClick:C=>j(C,w.value+p.value-1,"last"),disabled:h,aLine truncated