@validol4ik/uikit 0.6.6 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AppButtonCopy-CcsAzDik.js → AppButtonCopy-Cpoz6v02.js} +5 -5
- package/dist/{AppButtonCopy-4GxKBcWx.cjs → AppButtonCopy-UfvMMx3V.cjs} +1 -1
- package/dist/AppSelect-9OPvOErd.cjs +1 -0
- package/dist/{AppSelect-BtUUK2ea.js → AppSelect-JVVrifzF.js} +678 -685
- package/dist/DropdownButton-BK_sSxXA.cjs +1 -0
- package/dist/{DropdownButton-CZwBMGcA.js → DropdownButton-pcp6W_7i.js} +98 -88
- package/dist/QMenu-B07m1rKE.cjs +1 -0
- package/dist/{QMenu-P1hqLpnc.js → QMenu-TwM_-QHE.js} +104 -109
- package/dist/{index-CtoDgaeS.js → index-B0t4qh6b.js} +373 -372
- package/dist/index-BEJxpQtP.cjs +1 -0
- package/dist/types/components/AppIcon/AppIcon.vue.d.ts +1 -1
- package/dist/types/components/buttons/AppButton/AppButton.vue.d.ts +2 -1
- package/dist/types/components/buttons/AppButton/types.d.ts +4 -1
- package/dist/types/components/buttons/DropdownButton/DropdownButton.vue.d.ts +2 -1
- package/dist/types/components/buttons/DropdownButton/types.d.ts +4 -1
- package/dist/types/components/form/AppCodeInput/AppCodeInput.vue.d.ts +3 -1
- package/dist/types/components/form/AppSelect/AppSelect.vue.d.ts +1 -1
- package/dist/types/components/form/AppToggle/AppToggle.vue.d.ts +3 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +3 -3
- package/dist/AppSelect-Tg7_Uj55.cjs +0 -1
- package/dist/DropdownButton-DXQzSYcl.cjs +0 -1
- package/dist/QMenu-cWjMyOHy.cjs +0 -1
- package/dist/index-CNCrt1w6.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),Z={PRIMARY:"primary",INFO:"info"},b={SM:"sm",MD:"md",LG:"lg"},Pe={[b.SM]:"3px 9px",[b.MD]:"5px 12px",[b.LG]:"9px 20px"},X={xs:18,sm:24,md:32,lg:38,xl:46},U={size:String};function H(e,n=X){return t.computed(()=>e.size!==void 0?{fontSize:e.size in n?`${n[e.size]}px`:e.size}:null)}function N(e){return t.markRaw(t.defineComponent(e))}function Re(e){return t.markRaw(e)}function se(e,n){return e!==void 0&&e()||n}function Ae(e,n){if(e!==void 0){const a=e();if(a!=null)return a.slice()}return n}function z(e,n){return e!==void 0?n.concat(e()):n}function Me(e,n){return e===void 0?n:n!==void 0?n.concat(e()):e()}function ze(e,n,a,o,r,c){n.key=o+r;const l=t.h(e,n,a);return r===!0?t.withDirectives(l,c()):l}const ee="0 0 24 24",G=e=>e,Y=e=>`ionicons ${e}`,ce={"mdi-":e=>`mdi ${e}`,"icon-":G,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":Y,"ion-ios":Y,"ion-logo":Y,"iconfont ":G,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`,"i-":G},de={o_:"-outlined",r_:"-round",s_:"-sharp"},fe={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},De=new RegExp("^("+Object.keys(ce).join("|")+")"),Te=new RegExp("^("+Object.keys(de).join("|")+")"),te=new RegExp("^("+Object.keys(fe).join("|")+")"),Oe=/^[Mm]\s?[-+]?\.?\d/,Ie=/^img:/,xe=/^svguse:/,Ve=/^ion-/,Ne=/^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,W=N({name:"QIcon",props:{...U,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:n}){const{proxy:{$q:a}}=t.getCurrentInstance(),o=H(e),r=t.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),c=t.computed(()=>{let l,i=e.name;if(i==="none"||!i)return{none:!0};if(a.iconMapFn!==null){const f=a.iconMapFn(i);if(f!==void 0)if(f.icon!==void 0){if(i=f.icon,i==="none"||!i)return{none:!0}}else return{cls:f.cls,content:f.content!==void 0?f.content:" "}}if(Oe.test(i)===!0){const[f,k=ee]=i.split("|");return{svg:!0,viewBox:k,nodes:f.split("&&").map(d=>{const[$,s,v]=d.split("@@");return t.h("path",{style:s,d:$,transform:v})})}}if(Ie.test(i)===!0)return{img:!0,src:i.substring(4)};if(xe.test(i)===!0){const[f,k=ee]=i.split("|");return{svguse:!0,src:f.substring(7),viewBox:k}}let B=" ";const y=i.match(De);if(y!==null)l=ce[y[1]](i);else if(Ne.test(i)===!0)l=i;else if(Ve.test(i)===!0)l=`ionicons ion-${a.platform.is.ios===!0?"ios":"md"}${i.substring(3)}`;else if(te.test(i)===!0){l="notranslate material-symbols";const f=i.match(te);f!==null&&(i=i.substring(6),l+=fe[f[1]]),B=i}else{l="notranslate material-icons";const f=i.match(Te);f!==null&&(i=i.substring(2),l+=de[f[1]]),B=i}return{cls:l,content:B}});return()=>{const l={class:r.value,style:o.value,"aria-hidden":"true"};return c.value.none===!0?t.h(e.tag,l,se(n.default)):c.value.img===!0?t.h(e.tag,l,z(n.default,[t.h("img",{src:c.value.src})])):c.value.svg===!0?t.h(e.tag,l,z(n.default,[t.h("svg",{viewBox:c.value.viewBox||"0 0 24 24"},c.value.nodes)])):c.value.svguse===!0?t.h(e.tag,l,z(n.default,[t.h("svg",{viewBox:c.value.viewBox},[t.h("use",{"xlink:href":c.value.src})])])):(c.value.cls!==void 0&&(l.class+=" "+c.value.cls),t.h(e.tag,l,z(n.default,[c.value.content])))}}}),je={size:{type:[String,Number],default:"1em"},color:String};function Ke(e){return{cSize:t.computed(()=>e.size in X?`${X[e.size]}px`:e.size),classes:t.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const pe=N({name:"QSpinner",props:{...je,thickness:{type:Number,default:5}},setup(e){const{cSize:n,classes:a}=Ke(e);return()=>t.h("svg",{class:a.value+" q-spinner-mat",width:n.value,height:n.value,viewBox:"25 25 50 50"},[t.h("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function ve(e,n){const a=e.style;for(const o in n)a[o]=n[o]}function Fe(e){if(e==null)return;if(typeof e=="string")try{return document.querySelector(e)||void 0}catch{return}const n=t.unref(e);if(n)return n.$el||n}function Qe(e,n){if(e==null||e.contains(n)===!0)return!0;for(let a=e.nextElementSibling;a!==null;a=a.nextElementSibling)if(a.contains(n))return!0;return!1}const j={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(j,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch{}function Ue(){}function me(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function He(e){if(e.path)return e.path;if(e.composedPath)return e.composedPath();const n=[];let a=e.target;for(;a;){if(n.push(a),a.tagName==="HTML")return n.push(document),n.push(window),n;a=a.parentElement}}function J(e){e.stopPropagation()}function ge(e){e.cancelable!==!1&&e.preventDefault()}function M(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function he(e,n,a){const o=`__q_${n}_evt`;e[o]=e[o]!==void 0?e[o].concat(a):a,a.forEach(r=>{r[0].addEventListener(r[1],e[r[2]],j[r[3]])})}function be(e,n){const a=`__q_${n}_evt`;e[a]!==void 0&&(e[a].forEach(o=>{o[0].removeEventListener(o[1],e[o[2]],j[o[3]])}),e[a]=void 0)}function ye(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function Q(e,n){return ye(e)===!0?!1:[].concat(n).includes(e.keyCode)}function Ge(e,n=250){let a=!1,o;return function(){return a===!1&&(a=!0,setTimeout(()=>{a=!1},n),o=e.apply(this,arguments)),o}}function ne(e,n,a,o){a.modifiers.stop===!0&&J(e);const r=a.modifiers.color;let c=a.modifiers.center;c=c===!0||o===!0;const l=document.createElement("span"),i=document.createElement("span"),B=me(e),{left:y,top:f,width:k,height:d}=n.getBoundingClientRect(),$=Math.sqrt(k*k+d*d),s=$/2,v=`${(k-$)/2}px`,p=c?v:`${B.left-y-s}px`,m=`${(d-$)/2}px`,_=c?m:`${B.top-f-s}px`;i.className="q-ripple__inner",ve(i,{height:`${$}px`,width:`${$}px`,transform:`translate3d(${p},${_},0) scale3d(.2,.2,1)`,opacity:0}),l.className=`q-ripple${r?" text-"+r:""}`,l.setAttribute("dir","ltr"),l.appendChild(i),n.appendChild(l);const C=()=>{l.remove(),clearTimeout(S)};a.abort.push(C);let S=setTimeout(()=>{i.classList.add("q-ripple__inner--enter"),i.style.transform=`translate3d(${v},${m},0) scale3d(1,1,1)`,i.style.opacity=.2,S=setTimeout(()=>{i.classList.remove("q-ripple__inner--enter"),i.classList.add("q-ripple__inner--leave"),i.style.opacity=0,S=setTimeout(()=>{l.remove(),a.abort.splice(a.abort.indexOf(C),1)},275)},250)},50)}function oe(e,{modifiers:n,value:a,arg:o}){const r=Object.assign({},e.cfg.ripple,n,a);e.modifiers={early:r.early===!0,stop:r.stop===!0,center:r.center===!0,color:r.color||o,keyCodes:[].concat(r.keyCodes||13)}}const ke=Re({name:"ripple",beforeMount(e,n){const a=n.instance.$.appContext.config.globalProperties.$q.config||{};if(a.ripple===!1)return;const o={cfg:a,enabled:n.value!==!1,modifiers:{},abort:[],start(r){o.enabled===!0&&r.qSkipRipple!==!0&&r.type===(o.modifiers.early===!0?"pointerdown":"click")&&ne(r,e,o,r.qKeyEvent===!0)},keystart:Ge(r=>{o.enabled===!0&&r.qSkipRipple!==!0&&Q(r,o.modifiers.keyCodes)===!0&&r.type===`key${o.modifiers.early===!0?"down":"up"}`&&ne(r,e,o,!0)},300)};oe(o,n),e.__qripple=o,he(o,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,n){if(n.oldValue!==n.value){const a=e.__qripple;a!==void 0&&(a.enabled=n.value!==!1,a.enabled===!0&&Object(n.value)===n.value&&oe(a,n))}},beforeUnmount(e){const n=e.__qripple;n!==void 0&&(n.abort.forEach(a=>{a()}),be(n,"main"),delete e._qripple)}}),_e={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Ye=Object.keys(_e),Xe={align:{type:String,validator:e=>Ye.includes(e)}};function We(e){return t.computed(()=>{const n=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${_e[n]}`})}function Ze(e){if(Object(e.$parent)===e.$parent)return e.$parent;let{parent:n}=e.$;for(;Object(n)===n;){if(Object(n.proxy)===n.proxy)return n.proxy;n=n.parent}}function $e(e){return e.appContext.config.globalProperties.$router!==void 0}function Je(e){return e.isUnmounted===!0||e.isDeactivated===!0}function ae(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function le(e,n){return(e.aliasOf||e)===(n.aliasOf||n)}function et(e,n){for(const a in n){const o=n[a],r=e[a];if(typeof o=="string"){if(o!==r)return!1}else if(Array.isArray(r)===!1||r.length!==o.length||o.some((c,l)=>c!==r[l]))return!1}return!0}function re(e,n){return Array.isArray(n)===!0?e.length===n.length&&e.every((a,o)=>a===n[o]):e.length===1&&e[0]===n}function tt(e,n){return Array.isArray(e)===!0?re(e,n):Array.isArray(n)===!0?re(n,e):e===n}function nt(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const a in e)if(tt(e[a],n[a])===!1)return!1;return!0}const Be={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean},ot={...Be,exact:Boolean,activeClass:{type:String,default:"q-router-link--active"},exactActiveClass:{type:String,default:"q-router-link--exact-active"}};function Ce({fallbackTag:e,useDisableForRouterLinkProps:n=!0}={}){const a=t.getCurrentInstance(),{props:o,proxy:r,emit:c}=a,l=$e(a),i=t.computed(()=>o.disable!==!0&&o.href!==void 0),B=n===!0?t.computed(()=>l===!0&&o.disable!==!0&&i.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""):t.computed(()=>l===!0&&i.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""),y=t.computed(()=>B.value===!0?_(o.to):null),f=t.computed(()=>y.value!==null),k=t.computed(()=>i.value===!0||f.value===!0),d=t.computed(()=>o.type==="a"||k.value===!0?"a":o.tag||e||"div"),$=t.computed(()=>i.value===!0?{href:o.href,target:o.target}:f.value===!0?{href:y.value.href,target:o.target}:{}),s=t.computed(()=>{if(f.value===!1)return-1;const{matched:g}=y.value,{length:q}=g,w=g[q-1];if(w===void 0)return-1;const P=r.$route.matched;if(P.length===0)return-1;const R=P.findIndex(le.bind(null,w));if(R!==-1)return R;const F=ae(g[q-2]);return q>1&&ae(w)===F&&P[P.length-1].path!==F?P.findIndex(le.bind(null,g[q-2])):R}),v=t.computed(()=>f.value===!0&&s.value!==-1&&et(r.$route.params,y.value.params)),p=t.computed(()=>v.value===!0&&s.value===r.$route.matched.length-1&&nt(r.$route.params,y.value.params)),m=t.computed(()=>f.value===!0?p.value===!0?` ${o.exactActiveClass} ${o.activeClass}`:o.exact===!0?"":v.value===!0?` ${o.activeClass}`:"":"");function _(g){try{return r.$router.resolve(g)}catch{}return null}function C(g,{returnRouterError:q,to:w=o.to,replace:P=o.replace}={}){if(o.disable===!0)return g.preventDefault(),Promise.resolve(!1);if(g.metaKey||g.altKey||g.ctrlKey||g.shiftKey||g.button!==void 0&&g.button!==0||o.target==="_blank")return Promise.resolve(!1);g.preventDefault();const R=r.$router[P===!0?"replace":"push"](w);return q===!0?R:R.then(()=>{}).catch(()=>{})}function S(g){if(f.value===!0){const q=w=>C(g,w);c("click",g,q),g.defaultPrevented!==!0&&q()}else c("click",g)}return{hasRouterLink:f,hasHrefLink:i,hasLink:k,linkTag:d,resolvedLink:y,linkIsActive:v,linkIsExactActive:p,linkClass:m,linkAttrs:$,getLink:_,navigateToRouterLink:C,navigateOnClick:S}}const ie={none:0,xs:4,sm:8,md:16,lg:24,xl:32},at={xs:8,sm:10,md:14,lg:20,xl:24},lt=["button","submit","reset"],rt=/[^\s]\/[^\s]/,it=["flat","outline","push","unelevated"];function Se(e,n){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":n}function ut(e){const n=Se(e);return n!==void 0?{[n]:!0}:{}}const qe={...U,...Be,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...it.reduce((e,n)=>(e[n]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...Xe.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},st={...qe,round:Boolean};function ct(e){const n=H(e,at),a=We(e),{hasRouterLink:o,hasLink:r,linkTag:c,linkAttrs:l,navigateOnClick:i}=Ce({fallbackTag:"button"}),B=t.computed(()=>{const p=e.fab===!1&&e.fabMini===!1?n.value:{};return e.padding!==void 0?Object.assign({},p,{padding:e.padding.split(/\s+/).map(m=>m in ie?ie[m]+"px":m).join(" "),minWidth:"0",minHeight:"0"}):p}),y=t.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),f=t.computed(()=>e.disable!==!0&&e.loading!==!0),k=t.computed(()=>f.value===!0?e.tabindex||0:-1),d=t.computed(()=>Se(e,"standard")),$=t.computed(()=>{const p={tabindex:k.value};return r.value===!0?Object.assign(p,l.value):lt.includes(e.type)===!0&&(p.type=e.type),c.value==="a"?(e.disable===!0?p["aria-disabled"]="true":p.href===void 0&&(p.role="button"),o.value!==!0&&rt.test(e.type)===!0&&(p.type=e.type)):e.disable===!0&&(p.disabled="",p["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(p,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),p}),s=t.computed(()=>{let p;e.color!==void 0?e.flat===!0||e.outline===!0?p=`text-${e.textColor||e.color}`:p=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(p=`text-${e.textColor}`);const m=e.round===!0?"round":`rectangle${y.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${d.value} q-btn--${m}`+(p!==void 0?" "+p:"")+(f.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),v=t.computed(()=>a.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:s,style:B,innerClasses:v,attributes:$,hasLink:r,linkTag:c,navigateOnClick:i,isActionable:f}}const{passiveCapture:E}=j;let D=null,T=null,O=null;const Ee=N({name:"QBtn",props:{...st,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:n,emit:a}){const{proxy:o}=t.getCurrentInstance(),{classes:r,style:c,innerClasses:l,attributes:i,hasLink:B,linkTag:y,navigateOnClick:f,isActionable:k}=ct(e),d=t.ref(null),$=t.ref(null);let s=null,v,p=null;const m=t.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),_=t.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:B.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),C=t.computed(()=>({center:e.round})),S=t.computed(()=>{const u=Math.max(0,Math.min(100,e.percentage));return u>0?{transition:"transform 0.6s",transform:`translateX(${u-100}%)`}:{}}),g=t.computed(()=>{if(e.loading===!0)return{onMousedown:x,onTouchstart:x,onClick:x,onKeydown:x,onKeyup:x};if(k.value===!0){const u={onClick:w,onKeydown:P,onMousedown:F};if(o.$q.platform.has.touch===!0){const h=e.onTouchstart!==void 0?"":"Passive";u[`onTouchstart${h}`]=R}return u}return{onClick:M}}),q=t.computed(()=>({ref:d,class:"q-btn q-btn-item non-selectable no-outline "+r.value,style:c.value,...i.value,...g.value}));function w(u){if(d.value!==null){if(u!==void 0){if(u.defaultPrevented===!0)return;const h=document.activeElement;if(e.type==="submit"&&h!==document.body&&d.value.contains(h)===!1&&h.contains(d.value)===!1){u.qAvoidFocus!==!0&&d.value.focus();const A=()=>{var V;document.removeEventListener("keydown",M,!0),document.removeEventListener("keyup",A,E),(V=d.value)==null||V.removeEventListener("blur",A,E)};document.addEventListener("keydown",M,!0),document.addEventListener("keyup",A,E),d.value.addEventListener("blur",A,E)}}f(u)}}function P(u){d.value!==null&&(a("keydown",u),Q(u,[13,32])===!0&&T!==d.value&&(T!==null&&I(),u.defaultPrevented!==!0&&(u.qAvoidFocus!==!0&&d.value.focus(),T=d.value,d.value.classList.add("q-btn--active"),document.addEventListener("keyup",L,!0),d.value.addEventListener("blur",L,E)),M(u)))}function R(u){d.value!==null&&(a("touchstart",u),u.defaultPrevented!==!0&&(D!==d.value&&(D!==null&&I(),D=d.value,s=u.target,s.addEventListener("touchcancel",L,E),s.addEventListener("touchend",L,E)),v=!0,p!==null&&clearTimeout(p),p=setTimeout(()=>{p=null,v=!1},200)))}function F(u){d.value!==null&&(u.qSkipRipple=v===!0,a("mousedown",u),u.defaultPrevented!==!0&&O!==d.value&&(O!==null&&I(),O=d.value,d.value.classList.add("q-btn--active"),document.addEventListener("mouseup",L,E)))}function L(u){if(d.value!==null&&!((u==null?void 0:u.type)==="blur"&&document.activeElement===d.value)){if((u==null?void 0:u.type)==="keyup"){if(T===d.value&&Q(u,[13,32])===!0){const h=new MouseEvent("click",u);h.qKeyEvent=!0,u.defaultPrevented===!0&&ge(h),u.cancelBubble===!0&&J(h),d.value.dispatchEvent(h),M(u),u.qKeyEvent=!0}a("keyup",u)}I()}}function I(u){var A,V;const h=$.value;u!==!0&&(D===d.value||O===d.value)&&h!==null&&h!==document.activeElement&&(h.setAttribute("tabindex",-1),h.focus()),D===d.value&&(s!==null&&(s.removeEventListener("touchcancel",L,E),s.removeEventListener("touchend",L,E)),D=s=null),O===d.value&&(document.removeEventListener("mouseup",L,E),O=null),T===d.value&&(document.removeEventListener("keyup",L,!0),(A=d.value)==null||A.removeEventListener("blur",L,E),T=null),(V=d.value)==null||V.classList.remove("q-btn--active")}function x(u){M(u),u.qSkipRipple=!0}return t.onBeforeUnmount(()=>{I(!0)}),Object.assign(o,{click:u=>{k.value===!0&&w(u)}}),()=>{let u=[];e.icon!==void 0&&u.push(t.h(W,{name:e.icon,left:e.stack!==!0&&m.value===!0,role:"img"})),m.value===!0&&u.push(t.h("span",{class:"block"},[e.label])),u=z(n.default,u),e.iconRight!==void 0&&e.round===!1&&u.push(t.h(W,{name:e.iconRight,right:e.stack!==!0&&m.value===!0,role:"img"}));const h=[t.h("span",{class:"q-focus-helper",ref:$})];return e.loading===!0&&e.percentage!==void 0&&h.push(t.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[t.h("span",{class:"q-btn__progress-indicator fit block",style:S.value})])),h.push(t.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+l.value},u)),e.loading!==null&&h.push(t.h(t.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[t.h("span",{key:"loading",class:"absolute-full flex flex-center"},n.loading!==void 0?n.loading():[t.h(pe)])]:null)),t.withDirectives(t.h(y.value,q.value,h),[[ke,_.value,void 0,C.value]])}}}),dt=t.defineComponent({__name:"AppButton",props:{size:{default:b.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:Z.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{},download:{}},emits:["click"],setup(e){const n=e,a=t.computed(()=>["app-btn",{"app-btn_default":!n.transparent&&!n.flat,"app-btn_trans":n.transparent,"app-btn_flat":n.flat,"app-btn_rounded":n.rounded,"app-btn_sm":n.size===b.SM,"app-btn_md":n.size===b.MD,"app-btn_lg":n.size===b.LG,"app-btn_icon-left":n.iconLeft,"app-btn_icon-right":n.iconRight,"app-btn_icon-middle":n.iconMiddle},`app-btn_${n.color}`]);return(o,r)=>(t.openBlock(),t.createBlock(t.unref(Ee),{"no-caps":"",unelevated:"",class:t.normalizeClass(a.value),padding:t.unref(Pe)[o.size||t.unref(b).MD],loading:o.loading,disable:o.disabled||void 0,to:o.to,href:o.href,target:o.target,type:o.submit?"submit":void 0,"aria-label":o.ariaLabel,download:o.download,onClick:r[0]||(r[0]=c=>o.$emit("click",c))},{default:t.withCtx(()=>[o.iconLeft||o.iconMiddle?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["icon-kl",o.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${o.iconLeft||o.iconMiddle}`,o.transparent||o.flat?`text-${o.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0),t.renderSlot(o.$slots,"default",{},void 0,!0),o.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.label),1)],64)):t.createCommentVNode("",!0),o.iconRight?(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${o.iconRight}`,o.transparent?`text-${o.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disable","to","href","target","type","aria-label","download"]))}}),K=(e,n)=>{const a=e.__vccOpts||e;for(const[o,r]of n)a[o]=r;return a},ft=K(dt,[["__scopeId","data-v-99788ad1"]]),pt={key:0,class:"app-toggle__label app-toggle__label_left"},vt={class:"app-toggle__container"},mt=["checked","disabled"],gt={class:"app-toggle__thumb"},ht={key:1,class:"app-toggle__label"},bt=t.defineComponent({__name:"AppToggle",props:{modelValue:{type:Boolean},size:{default:b.MD},label:{},disabled:{type:Boolean},color:{default:Z.PRIMARY},iconColor:{},icon:{},iconActive:{},labelLeft:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:n}){const a=e,o=n,r=t.computed({get:()=>a.modelValue,set:l=>{o("update:modelValue",l)}}),c=t.computed(()=>["app-toggle",{"app-toggle_sm":a.size===b.SM,"app-toggle_md":a.size===b.MD,"app-toggle_lg":a.size===b.LG,"app-toggle_active":r.value,"app-toggle_disabled":a.disabled},`app-toggle_${a.color}`]);return(l,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(c.value)},[l.label&&l.labelLeft?(t.openBlock(),t.createElementBlock("span",pt,t.toDisplayString(l.label),1)):t.createCommentVNode("",!0),t.createElementVNode("label",vt,[t.createElementVNode("input",{type:"checkbox",checked:r.value,onChange:i[0]||(i[0]=B=>r.value=!r.value),disabled:l.disabled,class:"app-toggle__input"},null,40,mt),t.createElementVNode("span",{class:t.normalizeClass(["app-toggle__slider",r.value?`bg-${l.color}`:""])},[t.createElementVNode("span",gt,[l.icon&&!l.modelValue?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["icon-kl",`icon-kl-${l.icon}`,"app-toggle__icon"])},null,2)):t.createCommentVNode("",!0),l.modelValue&&(l.iconActive||l.icon)?(t.openBlock(),t.createElementBlock("i",{key:1,class:t.normalizeClass(["icon-kl",`icon-kl-${l.iconActive||l.icon}`,"app-toggle__icon",r.value?`text-${l.iconColor}`:""])},null,2)):t.createCommentVNode("",!0)])],2),t.renderSlot(l.$slots,"default",{},void 0,!0)]),l.label&&!l.labelLeft?(t.openBlock(),t.createElementBlock("span",ht,t.toDisplayString(l.label),1)):t.createCommentVNode("",!0)],2))}}),yt=K(bt,[["__scopeId","data-v-e0e56123"]]),kt=t.defineComponent({__name:"AppIcon",props:{name:{},size:{},color:{}},setup(e){return(n,a)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass(["icon-kl",`icon-kl-${n.name}`,n.color?`text-${n.color}`:""]),style:t.normalizeStyle(n.size?`font-size: ${n.size}`:void 0)},null,6))}}),_t=K(kt,[["__scopeId","data-v-941765ee"]]),we={dark:{type:Boolean,default:null}};function Le(e,n){return t.computed(()=>e.dark===null?n.dark.isActive:e.dark)}const $t={xs:2,sm:4,md:6,lg:10,xl:14};function ue(e,n,a){return{transform:n===!0?`translateX(${a.lang.rtl===!0?"-":""}100%) scale3d(${-e},1,1)`:`scale3d(${e},1,1)`}}const Bt=N({name:"QLinearProgress",props:{...we,...U,value:{type:Number,default:0},buffer:Number,color:String,trackColor:String,reverse:Boolean,stripe:Boolean,indeterminate:Boolean,query:Boolean,rounded:Boolean,animationSpeed:{type:[String,Number],default:2100},instantFeedback:Boolean},setup(e,{slots:n}){const{proxy:a}=t.getCurrentInstance(),o=Le(e,a.$q),r=H(e,$t),c=t.computed(()=>e.indeterminate===!0||e.query===!0),l=t.computed(()=>e.reverse!==e.query),i=t.computed(()=>({...r.value!==null?r.value:{},"--q-linear-progress-speed":`${e.animationSpeed}ms`})),B=t.computed(()=>"q-linear-progress"+(e.color!==void 0?` text-${e.color}`:"")+(e.reverse===!0||e.query===!0?" q-linear-progress--reverse":"")+(e.rounded===!0?" rounded-borders":"")),y=t.computed(()=>ue(e.buffer!==void 0?e.buffer:1,l.value,a.$q)),f=t.computed(()=>`with${e.instantFeedback===!0?"out":""}-transition`),k=t.computed(()=>`q-linear-progress__track absolute-full q-linear-progress__track--${f.value} q-linear-progress__track--${o.value===!0?"dark":"light"}`+(e.trackColor!==void 0?` bg-${e.trackColor}`:"")),d=t.computed(()=>ue(c.value===!0?1:e.value,l.value,a.$q)),$=t.computed(()=>`q-linear-progress__model absolute-full q-linear-progress__model--${f.value} q-linear-progress__model--${c.value===!0?"in":""}determinate`),s=t.computed(()=>({width:`${e.value*100}%`})),v=t.computed(()=>`q-linear-progress__stripe absolute-${e.reverse===!0?"right":"left"} q-linear-progress__stripe--${f.value}`);return()=>{const p=[t.h("div",{class:k.value,style:y.value}),t.h("div",{class:$.value,style:d.value})];return e.stripe===!0&&c.value===!1&&p.push(t.h("div",{class:v.value,style:s.value})),t.h("div",{class:B.value,style:i.value,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":e.indeterminate===!0?void 0:e.value},z(n.default,p))}}}),Ct={key:0,class:"code-field__label"},St={class:"code-field__inputs"},qt=["onUpdate:modelValue","disabled","onInput","onKeydown","onPaste"],Et=t.defineComponent({__name:"AppCodeInput",props:{length:{default:5},size:{default:b.MD},label:{},disabled:{type:Boolean},loading:{type:Boolean},autofocus:{type:Boolean},color:{}},emits:["update:modelValue","completed"],setup(e,{expose:n,emit:a}){const o=e,r=a,c=t.ref(Array(o.length).fill("")),l=t.ref([]),i=t.computed(()=>["code-field",{"code-field_sm":o.size===b.SM,"code-field_md":o.size===b.MD,"code-field_lg":o.size===b.LG,"code-field_disabled":o.disabled||o.loading},`code-field_${o.color}`]),B=t.computed(()=>{let s="";return o.size==b.SM&&(s+=`width: ${o.length*26+(o.length-1)*5}px`),o.size==b.MD&&(s+=`width: ${o.length*32+(o.length-1)*8}px`),o.size==b.LG&&(s+=`width: ${o.length*44+(o.length-1)*10}px`),s}),y=(s,v)=>{var _;const m=s.target.value;if(m.length===1)v<o.length-1&&l.value&&((_=l.value[v+1])==null||_.focus());else if(m.length>1){const C=m.slice(0,o.length-v).split("");C.forEach((S,g)=>{c.value[v+g]=S}),t.nextTick(()=>{var S;l.value&&((S=l.value[Math.min(v+C.length,o.length-1)])==null||S.focus())})}},f=s=>{var v;c.value[s]===""&&l.value&&s>0&&((v=l.value[s-1])==null||v.focus())},k=(s,v)=>{var _;s.preventDefault();const p=((_=s.clipboardData)==null?void 0:_.getData("text"))??"";if(!p)return;const m=p.slice(0,o.length-v).split("");m.forEach((C,S)=>{c.value[v+S]=C}),t.nextTick(()=>{var C;l.value&&((C=l.value[Math.min(v+m.length,o.length-1)])==null||C.focus())})};t.watch(c,s=>{const v=s.join("");d(v)},{deep:!0});const d=s=>{r("update:modelValue",s),s.length===o.length&&!s.includes(" ")&&r("completed",s)},$=s=>{s&&(c.value=s.split("").slice(0,o.length))};return t.onMounted(()=>{o.autofocus&&l.value&&l.value[0]&&l.value[0].focus()}),n({injectCode:$}),(s,v)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.value),style:t.normalizeStyle(B.value)},[s.label?(t.openBlock(),t.createElementBlock("label",Ct,t.toDisplayString(s.label),1)):t.createCommentVNode("",!0),t.createElementVNode("div",St,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.length,(p,m)=>t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:m,"onUpdate:modelValue":_=>c.value[m]=_,ref_for:!0,ref_key:"inputRefs",ref:l,type:"text",maxlength:"1",class:"code-field__input",disabled:s.disabled||s.loading,onInput:_=>y(_,m),onKeydown:t.withKeys(_=>f(m),["backspace"]),onPaste:_=>k(_,m)},null,40,qt)),[[t.vModelText,c.value[m]]])),128))]),s.loading?(t.openBlock(),t.createBlock(Bt,{key:1,indeterminate:"",rounded:"",color:s.color,class:"code-field__loading"},null,8,["color"])):t.createCommentVNode("",!0)],6))}}),wt=K(Et,[["__scopeId","data-v-44914130"]]),Lt=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./AppButtonCopy-UfvMMx3V.cjs"))),Pt=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./AppSelect-9OPvOErd.cjs"))),Rt=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DropdownButton-BK_sSxXA.cjs")));exports.AppButton=ft;exports.AppButtonCopy=Lt;exports.AppCodeInput=wt;exports.AppIcon=_t;exports.AppSelect=Pt;exports.AppToggle=yt;exports.COLORS=Z;exports.DropdownButton=Rt;exports.QBtn=Ee;exports.QIcon=W;exports.QSpinner=pe;exports.Ripple=ke;exports.SIZES=b;exports._export_sfc=K;exports.addEvt=he;exports.childHasFocus=Qe;exports.cleanEvt=be;exports.createComponent=N;exports.css=ve;exports.getBtnDesignAttr=ut;exports.getElement=Fe;exports.getEventPath=He;exports.getParentProxy=Ze;exports.hDir=ze;exports.hMergeSlot=z;exports.hMergeSlotSafely=Me;exports.hSlot=se;exports.hUniqueSlot=Ae;exports.isKeyCode=Q;exports.listenOpts=j;exports.nonRoundBtnProps=qe;exports.noop=Ue;exports.position=me;exports.prevent=ge;exports.shouldIgnoreKey=ye;exports.stop=J;exports.stopAndPrevent=M;exports.useDark=Le;exports.useDarkProps=we;exports.useRouterLink=Ce;exports.useRouterLinkProps=ot;exports.useSize=H;exports.useSizeProps=U;exports.vmHasRouter=$e;exports.vmIsDestroyed=Je;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AppIconProps } from './types';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<AppIconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AppIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
2
|
+
declare const _default: import('vue').DefineComponent<AppIconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AppIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
3
3
|
export default _default;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AppButtonProps } from './types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
3
4
|
slots: {
|
|
4
5
|
default?(_: {}): any;
|
|
5
6
|
};
|
|
6
7
|
refs: {};
|
|
7
|
-
|
|
8
|
+
rootEl: any;
|
|
8
9
|
};
|
|
9
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
11
|
declare const __VLS_component: import('vue').DefineComponent<AppButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { QBtnProps, NamedColor } from 'quasar';
|
|
2
2
|
import { Size } from '../../types';
|
|
3
3
|
import { AppIconNames } from '../../AppIcon/types';
|
|
4
|
+
import { SIZES } from '../../constants';
|
|
4
5
|
export interface AppButtonProps {
|
|
5
6
|
size?: Size;
|
|
6
7
|
transparent?: boolean;
|
|
@@ -21,5 +22,7 @@ export interface AppButtonProps {
|
|
|
21
22
|
download?: string;
|
|
22
23
|
}
|
|
23
24
|
export declare const ButtonPaddings: {
|
|
24
|
-
[
|
|
25
|
+
[SIZES.SM]: string;
|
|
26
|
+
[SIZES.MD]: string;
|
|
27
|
+
[SIZES.LG]: string;
|
|
25
28
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { DropdownButtonProps } from './types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
3
4
|
slots: {
|
|
4
5
|
default?(_: {}): any;
|
|
5
6
|
};
|
|
6
7
|
refs: {};
|
|
7
|
-
|
|
8
|
+
rootEl: any;
|
|
8
9
|
};
|
|
9
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
11
|
declare const __VLS_component: import('vue').DefineComponent<DropdownButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NamedColor, QBtnDropdownProps } from 'quasar';
|
|
2
2
|
import { Size } from '../../types';
|
|
3
3
|
import { AppIconNames } from '../../AppIcon/types';
|
|
4
|
+
import { SIZES } from '../../constants';
|
|
4
5
|
export interface DropdownButtonProps {
|
|
5
6
|
size?: Size;
|
|
6
7
|
transparent?: boolean;
|
|
@@ -20,5 +21,7 @@ export interface DropdownButtonProps {
|
|
|
20
21
|
menuSelf?: QBtnDropdownProps["menuSelf"];
|
|
21
22
|
}
|
|
22
23
|
export declare const ButtonPaddings: {
|
|
23
|
-
[
|
|
24
|
+
[SIZES.SM]: string;
|
|
25
|
+
[SIZES.MD]: string;
|
|
26
|
+
[SIZES.LG]: string;
|
|
24
27
|
};
|
|
@@ -10,5 +10,7 @@ declare const _default: import('vue').DefineComponent<AppCodeInputProps, {
|
|
|
10
10
|
}>, {
|
|
11
11
|
size: import('../../types.ts').Size;
|
|
12
12
|
length: number;
|
|
13
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
14
|
+
inputRefs: HTMLInputElement[];
|
|
15
|
+
}, HTMLDivElement>;
|
|
14
16
|
export default _default;
|
|
@@ -5,5 +5,5 @@ declare const _default: import('vue').DefineComponent<AppSelectProps, {}, {}, {}
|
|
|
5
5
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
6
6
|
}>, {
|
|
7
7
|
size: import('../../types').Size;
|
|
8
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
9
|
export default _default;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AppToggleProps } from './types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
3
4
|
slots: {
|
|
4
5
|
default?(_: {}): any;
|
|
5
6
|
};
|
|
6
7
|
refs: {};
|
|
7
|
-
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
8
9
|
};
|
|
9
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
11
|
declare const __VLS_component: import('vue').DefineComponent<AppToggleProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -14,7 +15,7 @@ declare const __VLS_component: import('vue').DefineComponent<AppToggleProps, {},
|
|
|
14
15
|
}>, {
|
|
15
16
|
size: import('../../types').Size;
|
|
16
17
|
color: import('quasar').NamedColor;
|
|
17
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
18
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
20
|
export default _default;
|
|
20
21
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare const AppSelect: import('vue').DefineComponent<import('./components/form
|
|
|
13
13
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
15
|
size: import('./components/types').Size;
|
|
16
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
17
|
declare const DropdownButton: {
|
|
18
18
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./components/buttons/DropdownButton/types').DropdownButtonProps> & Readonly<{
|
|
19
19
|
onMenuShown?: ((...args: any[]) => any) | undefined;
|
package/dist/uikit.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-BEJxpQtP.cjs");require("vue");exports.AppButton=p.AppButton;exports.AppButtonCopy=p.AppButtonCopy;exports.AppCodeInput=p.AppCodeInput;exports.AppIcon=p.AppIcon;exports.AppSelect=p.AppSelect;exports.AppToggle=p.AppToggle;exports.DropdownButton=p.DropdownButton;
|
package/dist/uikit.es.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@validol4ik/uikit",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/uikit.cjs",
|
|
6
6
|
"module": "./dist/uikit.es.js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@quasar/extras": "^1.16.13",
|
|
29
29
|
"quasar": "^2.17.2",
|
|
30
|
-
"vue": "
|
|
30
|
+
"vue": "3.5.20"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@chromatic-com/storybook": "^3.2.2",
|
|
34
|
-
"@quasar/app-vite": "1.
|
|
34
|
+
"@quasar/app-vite": "2.1.0",
|
|
35
35
|
"@quasar/quasar-app-extension-testing-unit-vitest": "^1.1.0",
|
|
36
36
|
"@quasar/vite-plugin": "^1.7.0",
|
|
37
37
|
"@storybook/addon-essentials": "^8.4.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),s=require("./index-CNCrt1w6.cjs"),U=require("./QMenu-cWjMyOHy.cjs"),ne=require("./focusout-DzWGke-4.cjs");function Gt(e,o){const l=t.ref(null),u=t.computed(()=>e.disable===!0?null:t.h("span",{ref:l,class:"no-outline",tabindex:-1}));function d(i){const r=o.value;i!==void 0&&i.type.indexOf("key")===0?r!==null&&document.activeElement!==r&&r.contains(document.activeElement)===!0&&r.focus():l.value!==null&&(i===void 0||r!==null&&r.contains(i.target)===!0)&&l.value.focus()}return{refocusTargetEl:u,refocusTarget:d}}const At={name:String};function el(e={}){return(o,l,u)=>{o[l](t.h("input",{class:"hidden"+(u||""),...e.value}))}}function tl(e){return t.computed(()=>e.name||e.for)}const ll={xs:30,sm:35,md:40,lg:50,xl:60},ol={...s.useDarkProps,...s.useSizeProps,...At,modelValue:{required:!0,default:null},val:{},trueValue:{default:!0},falseValue:{default:!1},indeterminateValue:{default:null},checkedIcon:String,uncheckedIcon:String,indeterminateIcon:String,toggleOrder:{type:String,validator:e=>e==="tf"||e==="ft"},toggleIndeterminate:Boolean,label:String,leftLabel:Boolean,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},nl=["update:modelValue"];function ul(e,o){const{props:l,slots:u,emit:d,proxy:i}=t.getCurrentInstance(),{$q:r}=i,g=s.useDark(l,r),b=t.ref(null),{refocusTargetEl:V,refocusTarget:f}=Gt(l,b),C=s.useSize(l,ll),k=t.computed(()=>l.val!==void 0&&Array.isArray(l.modelValue)),c=t.computed(()=>{const x=t.toRaw(l.val);return k.value===!0?l.modelValue.findIndex(W=>t.toRaw(W)===x):-1}),y=t.computed(()=>k.value===!0?c.value!==-1:t.toRaw(l.modelValue)===t.toRaw(l.trueValue)),q=t.computed(()=>k.value===!0?c.value===-1:t.toRaw(l.modelValue)===t.toRaw(l.falseValue)),S=t.computed(()=>y.value===!1&&q.value===!1),L=t.computed(()=>l.disable===!0?-1:l.tabindex||0),N=t.computed(()=>`q-${e} cursor-pointer no-outline row inline no-wrap items-center`+(l.disable===!0?" disabled":"")+(g.value===!0?` q-${e}--dark`:"")+(l.dense===!0?` q-${e}--dense`:"")+(l.leftLabel===!0?" reverse":"")),_=t.computed(()=>{const x=y.value===!0?"truthy":q.value===!0?"falsy":"indet",W=l.color!==void 0&&(l.keepColor===!0||q.value!==!0)?` text-${l.color}`:"";return`q-${e}__inner relative-position non-selectable q-${e}__inner--${x}${W}`}),T=t.computed(()=>{const x={type:"checkbox"};return l.name!==void 0&&Object.assign(x,{".checked":y.value,"^checked":y.value===!0?"checked":void 0,name:l.name,value:k.value===!0?l.val:l.trueValue}),x}),Y=el(T),B=t.computed(()=>{const x={tabindex:L.value,role:"checkbox","aria-label":l.label,"aria-checked":S.value===!0?"mixed":y.value===!0?"true":"false"};return l.disable===!0&&(x["aria-disabled"]="true"),x});function M(x){x!==void 0&&(s.stopAndPrevent(x),f(x)),l.disable!==!0&&d("update:modelValue",P(),x)}function P(){if(k.value===!0){if(y.value===!0){const x=l.modelValue.slice();return x.splice(c.value,1),x}return l.modelValue.concat([l.val])}if(y.value===!0){if(l.toggleOrder!=="ft"||l.toggleIndeterminate===!1)return l.falseValue}else if(q.value===!0){if(l.toggleOrder==="ft"||l.toggleIndeterminate===!1)return l.trueValue}else return l.toggleOrder!=="ft"?l.trueValue:l.falseValue;return l.indeterminateValue}function ee(x){(x.keyCode===13||x.keyCode===32)&&s.stopAndPrevent(x)}function Q(x){(x.keyCode===13||x.keyCode===32)&&M(x)}const te=o(y,S);return Object.assign(i,{toggle:M}),()=>{const x=te();l.disable!==!0&&Y(x,"unshift",` q-${e}__native absolute q-ma-none q-pa-none`);const W=[t.h("div",{class:_.value,style:C.value,"aria-hidden":"true"},x)];V.value!==null&&W.push(V.value);const le=l.label!==void 0?s.hMergeSlot(u.default,[l.label]):s.hSlot(u.default);return le!==void 0&&W.push(t.h("div",{class:`q-${e}__label q-anchor--skip`},le)),t.h("div",{ref:b,class:N.value,...B.value,onClick:M,onKeydown:ee,onKeyup:Q},W)}}const il=()=>t.h("div",{key:"svg",class:"q-checkbox__bg absolute"},[t.h("svg",{class:"q-checkbox__svg fit absolute-full",viewBox:"0 0 24 24"},[t.h("path",{class:"q-checkbox__truthy",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}),t.h("path",{class:"q-checkbox__indet",d:"M4,14H20V10H4"})])]),al=s.createComponent({name:"QCheckbox",props:ol,emits:nl,setup(e){const o=il();function l(u,d){const i=t.computed(()=>(u.value===!0?e.checkedIcon:d.value===!0?e.indeterminateIcon:e.uncheckedIcon)||null);return()=>i.value!==null?[t.h("div",{key:"icon",class:"q-checkbox__icon-container absolute-full flex flex-center no-wrap"},[t.h(s.QIcon,{class:"q-checkbox__icon",name:i.value})])]:[o]}return ul("checkbox",l)}}),Pe=s.createComponent({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:o}){const l=t.computed(()=>`q-item__section column q-item__section--${e.avatar===!0||e.side===!0||e.thumbnail===!0?"side":"main"}`+(e.top===!0?" q-item__section--top justify-start":" justify-center")+(e.avatar===!0?" q-item__section--avatar":"")+(e.thumbnail===!0?" q-item__section--thumbnail":"")+(e.noWrap===!0?" q-item__section--nowrap":""));return()=>t.h("div",{class:l.value},s.hSlot(o.default))}}),Et=s.createComponent({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:o}){const l=t.computed(()=>parseInt(e.lines,10)),u=t.computed(()=>"q-item__label"+(e.overline===!0?" q-item__label--overline text-overline":"")+(e.caption===!0?" q-item__label--caption text-caption":"")+(e.header===!0?" q-item__label--header":"")+(l.value===1?" ellipsis":"")),d=t.computed(()=>e.lines!==void 0&&l.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":l.value}:null);return()=>t.h("div",{style:d.value,class:u.value},s.hSlot(o.default))}}),It=s.createComponent({name:"QItem",props:{...s.useDarkProps,...s.useRouterLinkProps,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:o,emit:l}){const{proxy:{$q:u}}=t.getCurrentInstance(),d=s.useDark(e,u),{hasLink:i,linkAttrs:r,linkClass:g,linkTag:b,navigateOnClick:V}=s.useRouterLink(),f=t.ref(null),C=t.ref(null),k=t.computed(()=>e.clickable===!0||i.value===!0||e.tag==="label"),c=t.computed(()=>e.disable!==!0&&k.value===!0),y=t.computed(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(d.value===!0?" q-item--dark":"")+(i.value===!0&&e.active===null?g.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(c.value===!0?" q-item--clickable q-link cursor-pointer "+(e.manualFocus===!0?"q-manual-focusable":"q-focusable q-hoverable")+(e.focused===!0?" q-manual-focusable--focused":""):"")),q=t.computed(()=>e.insetLevel===void 0?null:{["padding"+(u.lang.rtl===!0?"Right":"Left")]:16+e.insetLevel*56+"px"});function S(_){c.value===!0&&(C.value!==null&&(_.qKeyEvent!==!0&&document.activeElement===f.value?C.value.focus():document.activeElement===C.value&&f.value.focus()),V(_))}function L(_){if(c.value===!0&&s.isKeyCode(_,[13,32])===!0){s.stopAndPrevent(_),_.qKeyEvent=!0;const T=new MouseEvent("click",_);T.qKeyEvent=!0,f.value.dispatchEvent(T)}l("keyup",_)}function N(){const _=s.hUniqueSlot(o.default,[]);return c.value===!0&&_.unshift(t.h("div",{class:"q-focus-helper",tabindex:-1,ref:C})),_}return()=>{const _={ref:f,class:y.value,style:q.value,role:"listitem",onClick:S,onKeyup:L};return c.value===!0?(_.tabindex=e.tabindex||"0",Object.assign(_,r.value)):k.value===!0&&(_["aria-disabled"]="true"),t.h(b.value,_,N())}}}),mt=e=>e?!0:"Обовʼязкове поле",pt=/^on[A-Z]/;function rl(){const{attrs:e,vnode:o}=t.getCurrentInstance(),l={listeners:t.ref({}),attributes:t.ref({})};function u(){const d={},i={};for(const r in e)r!=="class"&&r!=="style"&&pt.test(r)===!1&&(d[r]=e[r]);for(const r in o.props)pt.test(r)===!0&&(i[r]=o.props[r]);l.attributes.value=d,l.listeners.value=i}return t.onBeforeUpdate(u),u(),l}const sl="_q_fo_";function cl({validate:e,resetValidation:o,requiresQForm:l}){const u=t.inject(sl,!1);if(u!==!1){const{props:d,proxy:i}=t.getCurrentInstance();Object.assign(i,{validate:e,resetValidation:o}),t.watch(()=>d.disable,r=>{r===!0?(typeof o=="function"&&o(),u.unbindComponent(i)):u.bindComponent(i)}),t.onMounted(()=>{d.disable!==!0&&u.bindComponent(i)}),t.onBeforeUnmount(()=>{d.disable!==!0&&u.unbindComponent(i)})}else l===!0&&console.error("Parent QForm not found on useFormChild()!")}const ht=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,gt=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,bt=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,Fe=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,Oe=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,Ue={date:e=>/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),time:e=>/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),fulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),timeOrFulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),email:e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),hexColor:e=>ht.test(e),hexaColor:e=>gt.test(e),hexOrHexaColor:e=>bt.test(e),rgbColor:e=>Fe.test(e),rgbaColor:e=>Oe.test(e),rgbOrRgbaColor:e=>Fe.test(e)||Oe.test(e),hexOrRgbColor:e=>ht.test(e)||Fe.test(e),hexaOrRgbaColor:e=>gt.test(e)||Oe.test(e),anyColor:e=>bt.test(e)||Fe.test(e)||Oe.test(e)};function zt(e,o=250,l){let u=null;function d(){const i=arguments,r=()=>{u=null,l!==!0&&e.apply(this,i)};u!==null?clearTimeout(u):l===!0&&e.apply(this,i),u=setTimeout(r,o)}return d.cancel=()=>{u!==null&&clearTimeout(u)},d}const dl=[!0,!1,"ondemand"],fl={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>dl.includes(e)}};function vl(e,o){const{props:l,proxy:u}=t.getCurrentInstance(),d=t.ref(!1),i=t.ref(null),r=t.ref(!1);cl({validate:q,resetValidation:y});let g=0,b;const V=t.computed(()=>l.rules!==void 0&&l.rules!==null&&l.rules.length!==0),f=t.computed(()=>l.disable!==!0&&V.value===!0&&o.value===!1),C=t.computed(()=>l.error===!0||d.value===!0),k=t.computed(()=>typeof l.errorMessage=="string"&&l.errorMessage.length!==0?l.errorMessage:i.value);t.watch(()=>l.modelValue,()=>{r.value=!0,f.value===!0&&l.lazyRules===!1&&S()});function c(){l.lazyRules!=="ondemand"&&f.value===!0&&r.value===!0&&S()}t.watch(()=>l.reactiveRules,L=>{L===!0?b===void 0&&(b=t.watch(()=>l.rules,c,{immediate:!0,deep:!0})):b!==void 0&&(b(),b=void 0)},{immediate:!0}),t.watch(()=>l.lazyRules,c),t.watch(e,L=>{L===!0?r.value=!0:f.value===!0&&l.lazyRules!=="ondemand"&&S()});function y(){g++,o.value=!1,r.value=!1,d.value=!1,i.value=null,S.cancel()}function q(L=l.modelValue){if(l.disable===!0||V.value===!1)return!0;const N=++g,_=o.value!==!0?()=>{r.value=!0}:()=>{},T=(B,M)=>{B===!0&&_(),d.value=B,i.value=M||null,o.value=!1},Y=[];for(let B=0;B<l.rules.length;B++){const M=l.rules[B];let P;if(typeof M=="function"?P=M(L,Ue):typeof M=="string"&&Ue[M]!==void 0&&(P=Ue[M](L)),P===!1||typeof P=="string")return T(!0,P),!1;P!==!0&&P!==void 0&&Y.push(P)}return Y.length===0?(T(!1),!0):(o.value=!0,Promise.all(Y).then(B=>{if(B===void 0||Array.isArray(B)===!1||B.length===0)return N===g&&T(!1),!0;const M=B.find(P=>P===!1||typeof P=="string");return N===g&&T(M!==void 0,M),M===void 0},B=>(N===g&&(console.error(B),T(!0)),!1)))}const S=zt(q,0);return t.onBeforeUnmount(()=>{b!==void 0&&b(),S.cancel()}),Object.assign(u,{resetValidation:y,validate:q}),ne.injectProp(u,"hasError",()=>C.value),{isDirtyModel:r,hasRules:V,hasError:C,errorMessage:k,validate:q,resetValidation:y}}function Je(e){return e!=null&&(""+e).length!==0}const ml={...s.useDarkProps,...fl,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String},Ge={...ml,maxlength:[Number,String]},Rt=["update:modelValue","clear","focus","blur"];function Tt({requiredForAttr:e=!0,tagProp:o,changeEvent:l=!1}={}){const{props:u,proxy:d}=t.getCurrentInstance(),i=s.useDark(u,d.$q),r=U.useId({required:e,getValue:()=>u.for});return{requiredForAttr:e,changeEvent:l,tag:o===!0?t.computed(()=>u.tag):{value:"label"},isDark:i,editable:t.computed(()=>u.disable!==!0&&u.readonly!==!0),innerLoading:t.ref(!1),focused:t.ref(!1),hasPopupOpen:!1,splitAttrs:rl(),targetUid:r,rootRef:t.ref(null),targetRef:t.ref(null),controlRef:t.ref(null)}}function Ft(e){const{props:o,emit:l,slots:u,attrs:d,proxy:i}=t.getCurrentInstance(),{$q:r}=i;let g=null;e.hasValue===void 0&&(e.hasValue=t.computed(()=>Je(o.modelValue))),e.emitValue===void 0&&(e.emitValue=h=>{l("update:modelValue",h)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:ee,onFocusout:Q}),Object.assign(e,{clearValue:te,onControlFocusin:ee,onControlFocusout:Q,focus:M}),e.computedCounter===void 0&&(e.computedCounter=t.computed(()=>{if(o.counter!==!1){const h=typeof o.modelValue=="string"||typeof o.modelValue=="number"?(""+o.modelValue).length:Array.isArray(o.modelValue)===!0?o.modelValue.length:0,E=o.maxlength!==void 0?o.maxlength:o.maxValues;return h+(E!==void 0?" / "+E:"")}}));const{isDirtyModel:b,hasRules:V,hasError:f,errorMessage:C,resetValidation:k}=vl(e.focused,e.innerLoading),c=e.floatingLabel!==void 0?t.computed(()=>o.stackLabel===!0||e.focused.value===!0||e.floatingLabel.value===!0):t.computed(()=>o.stackLabel===!0||e.focused.value===!0||e.hasValue.value===!0),y=t.computed(()=>o.bottomSlots===!0||o.hint!==void 0||V.value===!0||o.counter===!0||o.error!==null),q=t.computed(()=>o.filled===!0?"filled":o.outlined===!0?"outlined":o.borderless===!0?"borderless":o.standout?"standout":"standard"),S=t.computed(()=>`q-field row no-wrap items-start q-field--${q.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(o.rounded===!0?" q-field--rounded":"")+(o.square===!0?" q-field--square":"")+(c.value===!0?" q-field--float":"")+(N.value===!0?" q-field--labeled":"")+(o.dense===!0?" q-field--dense":"")+(o.itemAligned===!0?" q-field--item-aligned q-item-type":"")+(e.isDark.value===!0?" q-field--dark":"")+(e.getControl===void 0?" q-field--auto-height":"")+(e.focused.value===!0?" q-field--focused":"")+(f.value===!0?" q-field--error":"")+(f.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(o.hideBottomSpace!==!0&&y.value===!0?" q-field--with-bottom":"")+(o.disable===!0?" q-field--disabled":o.readonly===!0?" q-field--readonly":"")),L=t.computed(()=>"q-field__control relative-position row no-wrap"+(o.bgColor!==void 0?` bg-${o.bgColor}`:"")+(f.value===!0?" text-negative":typeof o.standout=="string"&&o.standout.length!==0&&e.focused.value===!0?` ${o.standout}`:o.color!==void 0?` text-${o.color}`:"")),N=t.computed(()=>o.labelSlot===!0||o.label!==void 0),_=t.computed(()=>"q-field__label no-pointer-events absolute ellipsis"+(o.labelColor!==void 0&&f.value!==!0?` text-${o.labelColor}`:"")),T=t.computed(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:c.value,modelValue:o.modelValue,emitValue:e.emitValue})),Y=t.computed(()=>{const h={};return e.targetUid.value&&(h.for=e.targetUid.value),o.disable===!0&&(h["aria-disabled"]="true"),h});function B(){const h=document.activeElement;let E=e.targetRef!==void 0&&e.targetRef.value;E&&(h===null||h.id!==e.targetUid.value)&&(E.hasAttribute("tabindex")===!0||(E=E.querySelector("[tabindex]")),E&&E!==h&&E.focus({preventScroll:!0}))}function M(){U.addFocusFn(B)}function P(){U.removeFocusFn(B);const h=document.activeElement;h!==null&&e.rootRef.value.contains(h)&&h.blur()}function ee(h){g!==null&&(clearTimeout(g),g=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,l("focus",h))}function Q(h,E){g!==null&&clearTimeout(g),g=setTimeout(()=>{g=null,!(document.hasFocus()===!0&&(e.hasPopupOpen===!0||e.controlRef===void 0||e.controlRef.value===null||e.controlRef.value.contains(document.activeElement)!==!1))&&(e.focused.value===!0&&(e.focused.value=!1,l("blur",h)),E!==void 0&&E())})}function te(h){s.stopAndPrevent(h),r.platform.is.mobile!==!0?(e.targetRef!==void 0&&e.targetRef.value||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),o.type==="file"&&(e.inputRef.value.value=null),l("update:modelValue",null),e.changeEvent===!0&&l("change",null),l("clear",o.modelValue),t.nextTick(()=>{const E=b.value;k(),b.value=E})}function x(h){[13,32].includes(h.keyCode)&&te(h)}function W(){const h=[];return u.prepend!==void 0&&h.push(t.h("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:s.prevent},u.prepend())),h.push(t.h("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},le())),f.value===!0&&o.noErrorIcon===!1&&h.push(K("error",[t.h(s.QIcon,{name:r.iconSet.field.error,color:"negative"})])),o.loading===!0||e.innerLoading.value===!0?h.push(K("inner-loading-append",u.loading!==void 0?u.loading():[t.h(s.QSpinner,{color:o.color})])):o.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&h.push(K("inner-clearable-append",[t.h(s.QIcon,{class:"q-field__focusable-action",name:o.clearIcon||r.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":r.lang.label.clear,onKeyup:x,onClick:te})])),u.append!==void 0&&h.push(t.h("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:s.prevent},u.append())),e.getInnerAppend!==void 0&&h.push(K("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&h.push(e.getControlChild()),h}function le(){const h=[];return o.prefix!==void 0&&o.prefix!==null&&h.push(t.h("div",{class:"q-field__prefix no-pointer-events row items-center"},o.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&h.push(e.getShadowControl()),e.getControl!==void 0?h.push(e.getControl()):u.rawControl!==void 0?h.push(u.rawControl()):u.control!==void 0&&h.push(t.h("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":o.autofocus===!0||void 0},u.control(T.value))),N.value===!0&&h.push(t.h("div",{class:_.value},s.hSlot(u.label,o.label))),o.suffix!==void 0&&o.suffix!==null&&h.push(t.h("div",{class:"q-field__suffix no-pointer-events row items-center"},o.suffix)),h.concat(s.hSlot(u.default))}function Z(){let h,E;f.value===!0?C.value!==null?(h=[t.h("div",{role:"alert"},C.value)],E=`q--slot-error-${C.value}`):(h=s.hSlot(u.error),E="q--slot-error"):(o.hideHint!==!0||e.focused.value===!0)&&(o.hint!==void 0?(h=[t.h("div",o.hint)],E=`q--slot-hint-${o.hint}`):(h=s.hSlot(u.hint),E="q--slot-hint"));const ie=o.counter===!0||u.counter!==void 0;if(o.hideBottomSpace===!0&&ie===!1&&h===void 0)return;const a=t.h("div",{key:E,class:"q-field__messages col"},h);return t.h("div",{class:"q-field__bottom row items-start q-field__bottom--"+(o.hideBottomSpace!==!0?"animated":"stale"),onClick:s.prevent},[o.hideBottomSpace===!0?a:t.h(t.Transition,{name:"q-transition--field-message"},()=>a),ie===!0?t.h("div",{class:"q-field__counter"},u.counter!==void 0?u.counter():e.computedCounter.value):null])}function K(h,E){return E===null?null:t.h("div",{key:h,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},E)}let ue=!1;return t.onDeactivated(()=>{ue=!0}),t.onActivated(()=>{ue===!0&&o.autofocus===!0&&i.focus()}),o.autofocus===!0&&t.onMounted(()=>{i.focus()}),t.onBeforeUnmount(()=>{g!==null&&clearTimeout(g)}),Object.assign(i,{focus:M,blur:P}),function(){const E=e.getControl===void 0&&u.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":o.autofocus===!0||void 0,...Y.value}:Y.value;return t.h(e.tag.value,{ref:e.rootRef,class:[S.value,d.class],style:d.style,...E},[u.before!==void 0?t.h("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:s.prevent},u.before()):null,t.h("div",{class:"q-field__inner relative-position col self-stretch"},[t.h("div",{ref:e.controlRef,class:L.value,tabindex:-1,...e.controlEvents},W()),y.value===!0?Z():null]),u.after!==void 0?t.h("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:s.prevent},u.after()):null])}}const pl=s.createComponent({name:"QField",inheritAttrs:!1,props:{...Ge,tag:{type:String,default:"label"}},emits:Rt,setup(){return Ft(Tt({tagProp:!0}))}}),hl={xs:8,sm:10,md:14,lg:20,xl:24},gl=s.createComponent({name:"QChip",props:{...s.useDarkProps,...s.useSizeProps,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:["update:modelValue","update:selected","remove","click"],setup(e,{slots:o,emit:l}){const{proxy:{$q:u}}=t.getCurrentInstance(),d=s.useDark(e,u),i=s.useSize(e,hl),r=t.computed(()=>e.selected===!0||e.icon!==void 0),g=t.computed(()=>e.selected===!0?e.iconSelected||u.iconSet.chip.selected:e.icon),b=t.computed(()=>e.iconRemove||u.iconSet.chip.remove),V=t.computed(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),f=t.computed(()=>{const S=e.outline===!0&&e.color||e.textColor;return"q-chip row inline no-wrap items-center"+(e.outline===!1&&e.color!==void 0?` bg-${e.color}`:"")+(S?` text-${S} q-chip--colored`:"")+(e.disable===!0?" disabled":"")+(e.dense===!0?" q-chip--dense":"")+(e.outline===!0?" q-chip--outline":"")+(e.selected===!0?" q-chip--selected":"")+(V.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(d.value===!0?" q-chip--dark q-dark":"")}),C=t.computed(()=>{const S=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},L={...S,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||u.lang.label.remove};return{chip:S,remove:L}});function k(S){S.keyCode===13&&c(S)}function c(S){e.disable||(l("update:selected",!e.selected),l("click",S))}function y(S){(S.keyCode===void 0||S.keyCode===13)&&(s.stopAndPrevent(S),e.disable===!1&&(l("update:modelValue",!1),l("remove")))}function q(){const S=[];V.value===!0&&S.push(t.h("div",{class:"q-focus-helper"})),r.value===!0&&S.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--left",name:g.value}));const L=e.label!==void 0?[t.h("div",{class:"ellipsis"},[e.label])]:void 0;return S.push(t.h("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},s.hMergeSlotSafely(o.default,L))),e.iconRight&&S.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&S.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:b.value,...C.value.remove,onClick:y,onKeyup:y})),S}return()=>{if(e.modelValue===!1)return;const S={class:f.value,style:i.value};return V.value===!0&&Object.assign(S,C.value.chip,{onClick:c,onKeyup:k}),s.hDir("div",S,q(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[s.Ripple,e.ripple]])}}});function bl(e,o,l){function u(){}return t.onBeforeUnmount(()=>{e.value===!0&&void 0}),{removeFromHistory:u,addToHistory(){}}}let Ve=0,Qe,We,Be,Xe=!1,yt,St,wt,pe=null;function yl(e){Sl(e)&&s.stopAndPrevent(e)}function Sl(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const o=s.getEventPath(e),l=e.shiftKey&&!e.deltaX,u=!l&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),d=l||u?e.deltaY:e.deltaX;for(let i=0;i<o.length;i++){const r=o[i];if(U.hasScrollbar(r,u))return u?d<0&&r.scrollTop===0?!0:d>0&&r.scrollTop+r.clientHeight===r.scrollHeight:d<0&&r.scrollLeft===0?!0:d>0&&r.scrollLeft+r.clientWidth===r.scrollWidth}return!0}function Ct(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function Me(e){Xe!==!0&&(Xe=!0,requestAnimationFrame(()=>{Xe=!1;const{height:o}=e.target,{clientHeight:l,scrollTop:u}=document.scrollingElement;(Be===void 0||o!==window.innerHeight)&&(Be=l-o,document.scrollingElement.scrollTop=u),u>Be&&(document.scrollingElement.scrollTop-=Math.ceil((u-Be)/8))}))}function kt(e){const o=document.body,l=window.visualViewport!==void 0;if(e==="add"){const{overflowY:u,overflowX:d}=window.getComputedStyle(o);Qe=U.getHorizontalScrollPosition(window),We=U.getVerticalScrollPosition(window),yt=o.style.left,St=o.style.top,wt=window.location.href,o.style.left=`-${Qe}px`,o.style.top=`-${We}px`,d!=="hidden"&&(d==="scroll"||o.scrollWidth>window.innerWidth)&&o.classList.add("q-body--force-scrollbar-x"),u!=="hidden"&&(u==="scroll"||o.scrollHeight>window.innerHeight)&&o.classList.add("q-body--force-scrollbar-y"),o.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,ne.client.is.ios===!0&&(l===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",Me,s.listenOpts.passiveCapture),window.visualViewport.addEventListener("scroll",Me,s.listenOpts.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",Ct,s.listenOpts.passiveCapture))}ne.client.is.desktop===!0&&ne.client.is.mac===!0&&window[`${e}EventListener`]("wheel",yl,s.listenOpts.notPassive),e==="remove"&&(ne.client.is.ios===!0&&(l===!0?(window.visualViewport.removeEventListener("resize",Me,s.listenOpts.passiveCapture),window.visualViewport.removeEventListener("scroll",Me,s.listenOpts.passiveCapture)):window.removeEventListener("scroll",Ct,s.listenOpts.passiveCapture)),o.classList.remove("q-body--prevent-scroll"),o.classList.remove("q-body--force-scrollbar-x"),o.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,o.style.left=yt,o.style.top=St,window.location.href===wt&&window.scrollTo(Qe,We),Be=void 0)}function wl(e){let o="add";if(e===!0){if(Ve++,pe!==null){clearTimeout(pe),pe=null;return}if(Ve>1)return}else{if(Ve===0||(Ve--,Ve>0))return;if(o="remove",ne.client.is.ios===!0&&ne.client.is.nativeMobile===!0){pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{kt(o),pe=null},100);return}}kt(o)}function Cl(){let e;return{preventBodyScroll(o){o!==e&&(e!==void 0||o===!0)&&(e=o,wl(o))}}}let Le=0;const kl={standard:"fixed-full flex-center",top:"fixed-top justify-center",bottom:"fixed-bottom justify-center",right:"fixed-right items-center",left:"fixed-left items-center"},qt={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},ql=s.createComponent({name:"QDialog",inheritAttrs:!1,props:{...U.useModelToggleProps,...U.useTransitionProps,transitionShow:String,transitionHide:String,persistent:Boolean,autoClose:Boolean,allowFocusOutside:Boolean,noEscDismiss:Boolean,noBackdropDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,noShake:Boolean,seamless:Boolean,maximized:Boolean,fullWidth:Boolean,fullHeight:Boolean,square:Boolean,backdropFilter:String,position:{type:String,default:"standard",validator:e=>["standard","top","bottom","left","right"].includes(e)}},emits:[...U.useModelToggleEmits,"shake","click","escapeKey"],setup(e,{slots:o,emit:l,attrs:u}){const d=t.getCurrentInstance(),i=t.ref(null),r=t.ref(!1),g=t.ref(!1);let b=null,V=null,f,C;const k=t.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:c}=Cl(),{registerTimeout:y}=U.useTimeout(),{registerTick:q,removeTick:S}=U.useTick(),{transitionProps:L,transitionStyle:N}=U.useTransition(e,()=>qt[e.position][0],()=>qt[e.position][1]),_=t.computed(()=>N.value+(e.backdropFilter!==void 0?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:"")),{showPortal:T,hidePortal:Y,portalIsAccessible:B,renderPortal:M}=U.usePortal(d,i,I,"dialog"),{hide:P}=U.useModelToggle({showing:r,hideOnRouteChange:k,handleShow:W,handleHide:le,processOnMount:!0});bl(r);const ee=t.computed(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${kl[e.position]}`+(g.value===!0?" q-dialog__inner--animating":"")+(e.fullWidth===!0?" q-dialog__inner--fullwidth":"")+(e.fullHeight===!0?" q-dialog__inner--fullheight":"")+(e.square===!0?" q-dialog__inner--square":"")),Q=t.computed(()=>r.value===!0&&e.seamless!==!0),te=t.computed(()=>e.autoClose===!0?{onClick:ie}:{}),x=t.computed(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${Q.value===!0?"modal":"seamless"}`,u.class]);t.watch(()=>e.maximized,w=>{r.value===!0&&E(w)}),t.watch(Q,w=>{c(w),w===!0?(ne.addFocusout(v),U.addEscapeKey(ue)):(ne.removeFocusout(v),U.removeEscapeKey(ue))});function W(w){V=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,E(e.maximized),T(),g.value=!0,e.noFocus!==!0?(document.activeElement!==null&&document.activeElement.blur(),q(Z)):S(),y(()=>{if(d.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:F,bottom:A}=document.activeElement.getBoundingClientRect(),{innerHeight:z}=window,H=window.visualViewport!==void 0?window.visualViewport.height:z;F>0&&A>H/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-H,A>=z?1/0:Math.ceil(document.scrollingElement.scrollTop+A-H/2))),document.activeElement.scrollIntoView()}C=!0,i.value.click(),C=!1}T(!0),g.value=!1,l("show",w)},e.transitionDuration)}function le(w){S(),h(!0),g.value=!0,Y(),V!==null&&(((w&&w.type.indexOf("key")===0?V.closest('[tabindex]:not([tabindex^="-"])'):void 0)||V).focus(),V=null),y(()=>{Y(!0),g.value=!1,l("hide",w)},e.transitionDuration)}function Z(w){U.addFocusFn(()=>{let F=i.value;if(F!==null){if(w!==void 0){const A=F.querySelector(w);if(A!==null){A.focus({preventScroll:!0});return}}F.contains(document.activeElement)!==!0&&(F=F.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||F.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||F.querySelector("[autofocus], [data-autofocus]")||F,F.focus({preventScroll:!0}))}})}function K(w){w&&typeof w.focus=="function"?w.focus({preventScroll:!0}):Z(),l("shake");const F=i.value;F!==null&&(F.classList.remove("q-animate--scale"),F.classList.add("q-animate--scale"),b!==null&&clearTimeout(b),b=setTimeout(()=>{b=null,i.value!==null&&(F.classList.remove("q-animate--scale"),Z())},170))}function ue(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&K():(l("escapeKey"),P()))}function h(w){b!==null&&(clearTimeout(b),b=null),(w===!0||r.value===!0)&&(E(!1),e.seamless!==!0&&(c(!1),ne.removeFocusout(v),U.removeEscapeKey(ue))),w!==!0&&(V=null)}function E(w){w===!0?f!==!0&&(Le<1&&document.body.classList.add("q-body--dialog"),Le++,f=!0):f===!0&&(Le<2&&document.body.classList.remove("q-body--dialog"),Le--,f=!1)}function ie(w){C!==!0&&(P(w),l("click",w))}function a(w){e.persistent!==!0&&e.noBackdropDismiss!==!0?P(w):e.noShake!==!0&&K()}function v(w){e.allowFocusOutside!==!0&&B.value===!0&&s.childHasFocus(i.value,w.target)!==!0&&Z('[tabindex]:not([tabindex="-1"])')}Object.assign(d.proxy,{focus:Z,shake:K,__updateRefocusTarget(w){V=w||null}}),t.onBeforeUnmount(h);function I(){return t.h("div",{role:"dialog","aria-modal":Q.value===!0?"true":"false",...u,class:x.value},[t.h(t.Transition,{name:"q-transition--fade",appear:!0},()=>Q.value===!0?t.h("div",{class:"q-dialog__backdrop fixed-full",style:_.value,"aria-hidden":"true",tabindex:-1,onClick:a}):null),t.h(t.Transition,L.value,()=>r.value===!0?t.h("div",{ref:i,class:ee.value,style:N.value,tabindex:-1,...te.value},s.hSlot(o.default)):null)])}return M}});let $e=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const o=document.createElement("div");Object.assign(o.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(o),e.scrollLeft=-1e3,$e=e.scrollLeft>=0,e.remove()}const oe=1e3,xl=["start","center","end","start-force","center-force","end-force"],Ot=Array.prototype.filter,Vl=window.getComputedStyle(document.body).overflowAnchor===void 0?s.noop:function(e,o){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;const l=e.children||[];Ot.call(l,d=>d.dataset&&d.dataset.qVsAnchor!==void 0).forEach(d=>{delete d.dataset.qVsAnchor});const u=l[o];u&&u.dataset&&(u.dataset.qVsAnchor="")}))};function Ce(e,o){return e+o}function Ye(e,o,l,u,d,i,r,g){const b=e===window?document.scrollingElement||document.documentElement:e,V=d===!0?"offsetWidth":"offsetHeight",f={scrollStart:0,scrollViewSize:-r-g,scrollMaxSize:0,offsetStart:-r,offsetEnd:-g};if(d===!0?(e===window?(f.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,f.scrollViewSize+=document.documentElement.clientWidth):(f.scrollStart=b.scrollLeft,f.scrollViewSize+=b.clientWidth),f.scrollMaxSize=b.scrollWidth,i===!0&&(f.scrollStart=($e===!0?f.scrollMaxSize-f.scrollViewSize:0)-f.scrollStart)):(e===window?(f.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,f.scrollViewSize+=document.documentElement.clientHeight):(f.scrollStart=b.scrollTop,f.scrollViewSize+=b.clientHeight),f.scrollMaxSize=b.scrollHeight),l!==null)for(let C=l.previousElementSibling;C!==null;C=C.previousElementSibling)C.classList.contains("q-virtual-scroll--skip")===!1&&(f.offsetStart+=C[V]);if(u!==null)for(let C=u.nextElementSibling;C!==null;C=C.nextElementSibling)C.classList.contains("q-virtual-scroll--skip")===!1&&(f.offsetEnd+=C[V]);if(o!==e){const C=b.getBoundingClientRect(),k=o.getBoundingClientRect();d===!0?(f.offsetStart+=k.left-C.left,f.offsetEnd-=k.width):(f.offsetStart+=k.top-C.top,f.offsetEnd-=k.height),e!==window&&(f.offsetStart+=f.scrollStart),f.offsetEnd+=f.scrollMaxSize-f.offsetStart}return f}function xt(e,o,l,u){o==="end"&&(o=(e===window?document.body:e)[l===!0?"scrollWidth":"scrollHeight"]),e===window?l===!0?(u===!0&&(o=($e===!0?document.body.scrollWidth-document.documentElement.clientWidth:0)-o),window.scrollTo(o,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,o):l===!0?(u===!0&&(o=($e===!0?e.scrollWidth-e.offsetWidth:0)-o),e.scrollLeft=o):e.scrollTop=o}function _e(e,o,l,u){if(l>=u)return 0;const d=o.length,i=Math.floor(l/oe),r=Math.floor((u-1)/oe)+1;let g=e.slice(i,r).reduce(Ce,0);return l%oe!==0&&(g-=o.slice(i*oe,l).reduce(Ce,0)),u%oe!==0&&u!==d&&(g-=o.slice(u,r*oe).reduce(Ce,0)),g}const _l={virtualScrollSliceSize:{type:[Number,String],default:10},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]},Vt={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,..._l};function Bl({virtualScrollLength:e,getVirtualScrollTarget:o,getVirtualScrollEl:l,virtualScrollItemSizeComputed:u}){const d=t.getCurrentInstance(),{props:i,emit:r,proxy:g}=d,{$q:b}=g;let V,f,C,k=[],c;const y=t.ref(0),q=t.ref(0),S=t.ref({}),L=t.ref(null),N=t.ref(null),_=t.ref(null),T=t.ref({from:0,to:0}),Y=t.computed(()=>i.tableColspan!==void 0?i.tableColspan:100);u===void 0&&(u=t.computed(()=>i.virtualScrollItemSize));const B=t.computed(()=>u.value+";"+i.virtualScrollHorizontal),M=t.computed(()=>B.value+";"+i.virtualScrollSliceRatioBefore+";"+i.virtualScrollSliceRatioAfter);t.watch(M,()=>{K()}),t.watch(B,P);function P(){Z(f,!0)}function ee(a){Z(a===void 0?f:a)}function Q(a,v){const I=o();if(I==null||I.nodeType===8)return;const w=Ye(I,l(),L.value,N.value,i.virtualScrollHorizontal,b.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd);C!==w.scrollViewSize&&K(w.scrollViewSize),x(I,w,Math.min(e.value-1,Math.max(0,parseInt(a,10)||0)),0,xl.indexOf(v)!==-1?v:f!==-1&&a>f?"end":"start")}function te(){const a=o();if(a==null||a.nodeType===8)return;const v=Ye(a,l(),L.value,N.value,i.virtualScrollHorizontal,b.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd),I=e.value-1,w=v.scrollMaxSize-v.offsetStart-v.offsetEnd-q.value;if(V===v.scrollStart)return;if(v.scrollMaxSize<=0){x(a,v,0,0);return}C!==v.scrollViewSize&&K(v.scrollViewSize),W(T.value.from);const F=Math.floor(v.scrollMaxSize-Math.max(v.scrollViewSize,v.offsetEnd)-Math.min(c[I],v.scrollViewSize/2));if(F>0&&Math.ceil(v.scrollStart)>=F){x(a,v,I,v.scrollMaxSize-v.offsetEnd-k.reduce(Ce,0));return}let A=0,z=v.scrollStart-v.offsetStart,H=z;if(z<=w&&z+v.scrollViewSize>=y.value)z-=y.value,A=T.value.from,H=z;else for(let O=0;z>=k[O]&&A<I;O++)z-=k[O],A+=oe;for(;z>0&&A<I;)z-=c[A],z>-v.scrollViewSize?(A++,H=z):H=c[A]+z;x(a,v,A,H)}function x(a,v,I,w,F){const A=typeof F=="string"&&F.indexOf("-force")!==-1,z=A===!0?F.replace("-force",""):F,H=z!==void 0?z:"start";let O=Math.max(0,I-S.value[H]),J=O+S.value.total;J>e.value&&(J=e.value,O=Math.max(0,J-S.value.total)),V=v.scrollStart;const se=O!==T.value.from||J!==T.value.to;if(se===!1&&z===void 0){h(I);return}const{activeElement:Ae}=document,ae=_.value;se===!0&&ae!==null&&ae!==Ae&&ae.contains(Ae)===!0&&(ae.addEventListener("focusout",le),setTimeout(()=>{ae!==null&&ae.removeEventListener("focusout",le)})),Vl(ae,I-O);const Ee=z!==void 0?c.slice(O,I).reduce(Ce,0):0;if(se===!0){const de=J>=T.value.from&&O<=T.value.to?T.value.to:J;T.value={from:O,to:de},y.value=_e(k,c,0,O),q.value=_e(k,c,J,e.value),requestAnimationFrame(()=>{T.value.to!==J&&V===v.scrollStart&&(T.value={from:T.value.from,to:J},q.value=_e(k,c,J,e.value))})}requestAnimationFrame(()=>{if(V!==v.scrollStart)return;se===!0&&W(O);const de=c.slice(O,I).reduce(Ce,0),fe=de+v.offsetStart+y.value,Ie=fe+c[I];let ke=fe+w;if(z!==void 0){const De=de-Ee,qe=v.scrollStart+De;ke=A!==!0&&qe<fe&&Ie<qe+v.scrollViewSize?qe:z==="end"?Ie-v.scrollViewSize:fe-(z==="start"?0:Math.round((v.scrollViewSize-c[I])/2))}V=ke,xt(a,ke,i.virtualScrollHorizontal,b.lang.rtl),h(I)})}function W(a){const v=_.value;if(v){const I=Ot.call(v.children,O=>O.classList&&O.classList.contains("q-virtual-scroll--skip")===!1),w=I.length,F=i.virtualScrollHorizontal===!0?O=>O.getBoundingClientRect().width:O=>O.offsetHeight;let A=a,z,H;for(let O=0;O<w;){for(z=F(I[O]),O++;O<w&&I[O].classList.contains("q-virtual-scroll--with-prev")===!0;)z+=F(I[O]),O++;H=z-c[A],H!==0&&(c[A]+=H,k[Math.floor(A/oe)]+=H),A++}}}function le(){_.value!==null&&_.value!==void 0&&_.value.focus()}function Z(a,v){const I=1*u.value;(v===!0||Array.isArray(c)===!1)&&(c=[]);const w=c.length;c.length=e.value;for(let A=e.value-1;A>=w;A--)c[A]=I;const F=Math.floor((e.value-1)/oe);k=[];for(let A=0;A<=F;A++){let z=0;const H=Math.min((A+1)*oe,e.value);for(let O=A*oe;O<H;O++)z+=c[O];k.push(z)}f=-1,V=void 0,y.value=_e(k,c,0,T.value.from),q.value=_e(k,c,T.value.to,e.value),a>=0?(W(T.value.from),t.nextTick(()=>{Q(a)})):E()}function K(a){if(a===void 0&&typeof window<"u"){const z=o();z!=null&&z.nodeType!==8&&(a=Ye(z,l(),L.value,N.value,i.virtualScrollHorizontal,b.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd).scrollViewSize)}C=a;const v=parseFloat(i.virtualScrollSliceRatioBefore)||0,I=parseFloat(i.virtualScrollSliceRatioAfter)||0,w=1+v+I,F=a===void 0||a<=0?1:Math.ceil(a/u.value),A=Math.max(1,F,Math.ceil((i.virtualScrollSliceSize>0?i.virtualScrollSliceSize:10)/w));S.value={total:Math.ceil(A*w),start:Math.ceil(A*v),center:Math.ceil(A*(.5+v)),end:Math.ceil(A*(1+v)),view:F}}function ue(a,v){const I=i.virtualScrollHorizontal===!0?"width":"height",w={["--q-virtual-scroll-item-"+I]:u.value+"px"};return[a==="tbody"?t.h(a,{class:"q-virtual-scroll__padding",key:"before",ref:L},[t.h("tr",[t.h("td",{style:{[I]:`${y.value}px`,...w},colspan:Y.value})])]):t.h(a,{class:"q-virtual-scroll__padding",key:"before",ref:L,style:{[I]:`${y.value}px`,...w}}),t.h(a,{class:"q-virtual-scroll__content",key:"content",ref:_,tabindex:-1},v.flat()),a==="tbody"?t.h(a,{class:"q-virtual-scroll__padding",key:"after",ref:N},[t.h("tr",[t.h("td",{style:{[I]:`${q.value}px`,...w},colspan:Y.value})])]):t.h(a,{class:"q-virtual-scroll__padding",key:"after",ref:N,style:{[I]:`${q.value}px`,...w}})]}function h(a){f!==a&&(i.onVirtualScroll!==void 0&&r("virtualScroll",{index:a,from:T.value.from,to:T.value.to-1,direction:a<f?"decrease":"increase",ref:g}),f=a)}K();const E=zt(te,b.platform.is.ios===!0?120:35);t.onBeforeMount(()=>{K()});let ie=!1;return t.onDeactivated(()=>{ie=!0}),t.onActivated(()=>{if(ie!==!0)return;const a=o();V!==void 0&&a!==void 0&&a!==null&&a.nodeType!==8?xt(a,V,i.virtualScrollHorizontal,b.lang.rtl):Q(f)}),t.onBeforeUnmount(()=>{E.cancel()}),Object.assign(g,{scrollTo:Q,reset:P,refresh:ee}),{virtualScrollSliceRange:T,virtualScrollSliceSizeComputed:S,setVirtualScrollSize:K,onVirtualScrollEvt:E,localResetVirtualScroll:Z,padVirtualScroll:ue,scrollTo:Q,reset:P,refresh:ee}}const Al=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,El=/[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u,Il=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,zl=/[a-z0-9_ -]$/i;function Rl(e){return function(l){if(l.type==="compositionend"||l.type==="change"){if(l.target.qComposing!==!0)return;l.target.qComposing=!1,e(l)}else l.type==="compositionupdate"&&l.target.qComposing!==!0&&typeof l.data=="string"&&(ne.client.is.firefox===!0?zl.test(l.data)===!1:Al.test(l.data)===!0||El.test(l.data)===!0||Il.test(l.data)===!0)===!0&&(l.target.qComposing=!0)}}function ce(e,o){if(e===o)return!0;if(e!==null&&o!==null&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;let l,u;if(e.constructor===Array){if(l=e.length,l!==o.length)return!1;for(u=l;u--!==0;)if(ce(e[u],o[u])!==!0)return!1;return!0}if(e.constructor===Map){if(e.size!==o.size)return!1;let i=e.entries();for(u=i.next();u.done!==!0;){if(o.has(u.value[0])!==!0)return!1;u=i.next()}for(i=e.entries(),u=i.next();u.done!==!0;){if(ce(u.value[1],o.get(u.value[0]))!==!0)return!1;u=i.next()}return!0}if(e.constructor===Set){if(e.size!==o.size)return!1;const i=e.entries();for(u=i.next();u.done!==!0;){if(o.has(u.value[0])!==!0)return!1;u=i.next()}return!0}if(e.buffer!=null&&e.buffer.constructor===ArrayBuffer){if(l=e.length,l!==o.length)return!1;for(u=l;u--!==0;)if(e[u]!==o[u])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===o.toString();const d=Object.keys(e).filter(i=>e[i]!==void 0);if(l=d.length,l!==Object.keys(o).filter(i=>o[i]!==void 0).length)return!1;for(u=l;u--!==0;){const i=d[u];if(ce(e[i],o[i])!==!0)return!1}return!0}return e!==e&&o!==o}function _t(e,o,l){if(l<=o)return o;const u=l-o+1;let d=o+(e-o)%u;return d<o&&(d=u+d),d===0?0:d}const Bt=e=>["add","add-unique","toggle"].includes(e),Tl=".*+?^${}()|[]\\",Fl=Object.keys(Ge);function Ze(e,o){if(typeof e=="function")return e;const l=e!==void 0?e:o;return u=>u!==null&&typeof u=="object"&&l in u?u[l]:u}const Ol=s.createComponent({name:"QSelect",inheritAttrs:!1,props:{...Vt,...At,...Ge,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],popupNoRouteDismiss:Boolean,useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:Bt},mapOptions:Boolean,emitValue:Boolean,disableTabSelection:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:{},transitionHide:{},transitionDuration:{},behavior:{type:String,validator:e=>["default","menu","dialog"].includes(e),default:"default"},virtualScrollItemSize:Vt.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...Rt,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:o,emit:l}){const{proxy:u}=t.getCurrentInstance(),{$q:d}=u,i=t.ref(!1),r=t.ref(!1),g=t.ref(-1),b=t.ref(""),V=t.ref(!1),f=t.ref(!1);let C=null,k=null,c,y,q,S=null,L,N,_,T;const Y=t.ref(null),B=t.ref(null),M=t.ref(null),P=t.ref(null),ee=t.ref(null),Q=tl(e),te=Rl(st),x=t.computed(()=>Array.isArray(e.options)?e.options.length:0),W=t.computed(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:le,virtualScrollSliceSizeComputed:Z,localResetVirtualScroll:K,padVirtualScroll:ue,onVirtualScrollEvt:h,scrollTo:E,setVirtualScrollSize:ie}=Bl({virtualScrollLength:x,getVirtualScrollTarget:$t,getVirtualScrollEl:at,virtualScrollItemSizeComputed:W}),a=Tt(),v=t.computed(()=>{const n=e.mapOptions===!0&&e.multiple!==!0,m=e.modelValue!==void 0&&(e.modelValue!==null||n===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const p=e.mapOptions===!0&&c!==void 0?c:[],R=m.map(D=>Pt(D,p));return e.modelValue===null&&n===!0?R.filter(D=>D!==null):R}return m}),I=t.computed(()=>{const n={};return Fl.forEach(m=>{const p=e[m];p!==void 0&&(n[m]=p)}),n}),w=t.computed(()=>e.optionsDark===null?a.isDark.value:e.optionsDark),F=t.computed(()=>Je(v.value)),A=t.computed(()=>{let n="q-field__input q-placeholder col";return e.hideSelected===!0||v.value.length===0?[n,e.inputClass]:(n+=" q-field__input--padding",e.inputClass===void 0?n:[n,e.inputClass])}),z=t.computed(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),H=t.computed(()=>x.value===0),O=t.computed(()=>v.value.map(n=>G.value(n)).join(", ")),J=t.computed(()=>e.displayValue!==void 0?e.displayValue:O.value),se=t.computed(()=>e.optionsHtml===!0?()=>!0:n=>n!=null&&n.html===!0),Ae=t.computed(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||v.value.some(se.value))),ae=t.computed(()=>a.focused.value===!0?e.tabindex:-1),Ee=t.computed(()=>{const n={tabindex:e.tabindex,role:"combobox","aria-label":e.label,"aria-readonly":e.readonly===!0?"true":"false","aria-autocomplete":e.useInput===!0?"list":"none","aria-expanded":i.value===!0?"true":"false","aria-controls":`${a.targetUid.value}_lb`};return g.value>=0&&(n["aria-activedescendant"]=`${a.targetUid.value}_${g.value}`),n}),de=t.computed(()=>({id:`${a.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),fe=t.computed(()=>v.value.map((n,m)=>({index:m,opt:n,html:se.value(n),selected:!0,removeAtIndex:Lt,toggleOption:ve,tabindex:ae.value}))),Ie=t.computed(()=>{if(x.value===0)return[];const{from:n,to:m}=le.value;return e.options.slice(n,m).map((p,R)=>{const D=he.value(p)===!0,$=Ne(p)===!0,X=n+R,j={clickable:!0,active:$,activeClass:qe.value,manualFocus:!0,focused:!1,disable:D,tabindex:-1,dense:e.optionsDense,dark:w.value,role:"option","aria-selected":$===!0?"true":"false",id:`${a.targetUid.value}_${X}`,onClick:()=>{ve(p)}};return D!==!0&&(g.value===X&&(j.focused=!0),d.platform.is.desktop===!0&&(j.onMousemove=()=>{i.value===!0&&ge(X)})),{index:X,opt:p,html:se.value(p),label:G.value(p),selected:j.active,focused:j.focused,toggleOption:ve,setOptionIndex:ge,itemProps:j}})}),ke=t.computed(()=>e.dropdownIcon!==void 0?e.dropdownIcon:d.iconSet.arrow.dropdown),De=t.computed(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),qe=t.computed(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),re=t.computed(()=>Ze(e.optionValue,"value")),G=t.computed(()=>Ze(e.optionLabel,"label")),he=t.computed(()=>Ze(e.optionDisable,"disable")),ze=t.computed(()=>v.value.map(re.value)),Mt=t.computed(()=>{const n={onInput:st,onChange:te,onKeydown:it,onKeyup:nt,onKeypress:ut,onFocus:lt,onClick(m){y===!0&&s.stop(m)}};return n.onCompositionstart=n.onCompositionupdate=n.onCompositionend=te,n});t.watch(v,n=>{c=n,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&a.innerLoading.value!==!0&&(r.value!==!0&&i.value!==!0||F.value!==!0)&&(q!==!0&&we(),(r.value===!0||i.value===!0)&&be(""))},{immediate:!0}),t.watch(()=>e.fillInput,we),t.watch(i,je),t.watch(x,Jt);function et(n){return e.emitValue===!0?re.value(n):n}function He(n){if(n!==-1&&n<v.value.length)if(e.multiple===!0){const m=e.modelValue.slice();l("remove",{index:n,value:m.splice(n,1)[0]}),l("update:modelValue",m)}else l("update:modelValue",null)}function Lt(n){He(n),a.focus()}function tt(n,m){const p=et(n);if(e.multiple!==!0){e.fillInput===!0&&xe(G.value(n),!0,!0),l("update:modelValue",p);return}if(v.value.length===0){l("add",{index:0,value:p}),l("update:modelValue",e.multiple===!0?[p]:p);return}if(m===!0&&Ne(n)===!0||e.maxValues!==void 0&&e.modelValue.length>=e.maxValues)return;const R=e.modelValue.slice();l("add",{index:R.length,value:p}),R.push(p),l("update:modelValue",R)}function ve(n,m){if(a.editable.value!==!0||n===void 0||he.value(n)===!0)return;const p=re.value(n);if(e.multiple!==!0){m!==!0&&(xe(e.fillInput===!0?G.value(n):"",!0,!0),me()),B.value!==null&&B.value.focus(),(v.value.length===0||ce(re.value(v.value[0]),p)!==!0)&&l("update:modelValue",e.emitValue===!0?p:n);return}if((y!==!0||V.value===!0)&&a.focus(),lt(),v.value.length===0){const $=e.emitValue===!0?p:n;l("add",{index:0,value:$}),l("update:modelValue",e.multiple===!0?[$]:$);return}const R=e.modelValue.slice(),D=ze.value.findIndex($=>ce($,p));if(D!==-1)l("remove",{index:D,value:R.splice(D,1)[0]});else{if(e.maxValues!==void 0&&R.length>=e.maxValues)return;const $=e.emitValue===!0?p:n;l("add",{index:R.length,value:$}),R.push($)}l("update:modelValue",R)}function ge(n){if(d.platform.is.desktop!==!0)return;const m=n!==-1&&n<x.value?n:-1;g.value!==m&&(g.value=m)}function Re(n=1,m){if(i.value===!0){let p=g.value;do p=_t(p+n,-1,x.value-1);while(p!==-1&&p!==g.value&&he.value(e.options[p])===!0);g.value!==p&&(ge(p),E(p),m!==!0&&e.useInput===!0&&e.fillInput===!0&&Te(p>=0?G.value(e.options[p]):L,!0))}}function Pt(n,m){const p=R=>ce(re.value(R),n);return e.options.find(p)||m.find(p)||n}function Ne(n){const m=re.value(n);return ze.value.find(p=>ce(p,m))!==void 0}function lt(n){e.useInput===!0&&B.value!==null&&(n===void 0||B.value===n.target&&n.target.value===O.value)&&B.value.select()}function ot(n){s.isKeyCode(n,27)===!0&&i.value===!0&&(s.stop(n),me(),we()),l("keyup",n)}function nt(n){const{value:m}=n.target;if(n.keyCode!==void 0){ot(n);return}if(n.target.value="",C!==null&&(clearTimeout(C),C=null),k!==null&&(clearTimeout(k),k=null),we(),typeof m=="string"&&m.length!==0){const p=m.toLocaleLowerCase(),R=$=>{const X=e.options.find(j=>String($.value(j)).toLocaleLowerCase()===p);return X===void 0?!1:(v.value.indexOf(X)===-1?ve(X):me(),!0)},D=$=>{R(re)!==!0&&$!==!0&&R(G)!==!0&&be(m,!0,()=>D(!0))};D()}else a.clearValue(n)}function ut(n){l("keypress",n)}function it(n){if(l("keydown",n),s.shouldIgnoreKey(n)===!0)return;const m=b.value.length!==0&&(e.newValueMode!==void 0||e.onNewValue!==void 0),p=n.shiftKey!==!0&&e.disableTabSelection!==!0&&e.multiple!==!0&&(g.value!==-1||m===!0);if(n.keyCode===27){s.prevent(n);return}if(n.keyCode===9&&p===!1){ye();return}if(n.target===void 0||n.target.id!==a.targetUid.value||a.editable.value!==!0)return;if(n.keyCode===40&&a.innerLoading.value!==!0&&i.value===!1){s.stopAndPrevent(n),Se();return}if(n.keyCode===8&&(e.useChips===!0||e.clearable===!0)&&e.hideSelected!==!0&&b.value.length===0){e.multiple===!0&&Array.isArray(e.modelValue)===!0?He(e.modelValue.length-1):e.multiple!==!0&&e.modelValue!==null&&l("update:modelValue",null);return}(n.keyCode===35||n.keyCode===36)&&(typeof b.value!="string"||b.value.length===0)&&(s.stopAndPrevent(n),g.value=-1,Re(n.keyCode===36?1:-1,e.multiple)),(n.keyCode===33||n.keyCode===34)&&Z.value!==void 0&&(s.stopAndPrevent(n),g.value=Math.max(-1,Math.min(x.value,g.value+(n.keyCode===33?-1:1)*Z.value.view)),Re(n.keyCode===33?1:-1,e.multiple)),(n.keyCode===38||n.keyCode===40)&&(s.stopAndPrevent(n),Re(n.keyCode===38?-1:1,e.multiple));const R=x.value;if((_===void 0||T<Date.now())&&(_=""),R>0&&e.useInput!==!0&&n.key!==void 0&&n.key.length===1&&n.altKey===!1&&n.ctrlKey===!1&&n.metaKey===!1&&(n.keyCode!==32||_.length!==0)){i.value!==!0&&Se(n);const D=n.key.toLocaleLowerCase(),$=_.length===1&&_[0]===D;T=Date.now()+1500,$===!1&&(s.stopAndPrevent(n),_+=D);const X=new RegExp("^"+_.split("").map(Ke=>Tl.indexOf(Ke)!==-1?"\\"+Ke:Ke).join(".*"),"i");let j=g.value;if($===!0||j<0||X.test(G.value(e.options[j]))!==!0)do j=_t(j+1,-1,R-1);while(j!==g.value&&(he.value(e.options[j])===!0||X.test(G.value(e.options[j]))!==!0));g.value!==j&&t.nextTick(()=>{ge(j),E(j),j>=0&&e.useInput===!0&&e.fillInput===!0&&Te(G.value(e.options[j]),!0)});return}if(!(n.keyCode!==13&&(n.keyCode!==32||e.useInput===!0||_!=="")&&(n.keyCode!==9||p===!1))){if(n.keyCode!==9&&s.stopAndPrevent(n),g.value!==-1&&g.value<R){ve(e.options[g.value]);return}if(m===!0){const D=($,X)=>{if(X){if(Bt(X)!==!0)return}else X=e.newValueMode;if(xe("",e.multiple!==!0,!0),$==null)return;(X==="toggle"?ve:tt)($,X==="add-unique"),e.multiple!==!0&&(B.value!==null&&B.value.focus(),me())};if(e.onNewValue!==void 0?l("newValue",b.value,D):D(b.value),e.multiple!==!0)return}i.value===!0?ye():a.innerLoading.value!==!0&&Se()}}function at(){return y===!0?ee.value:M.value!==null&&M.value.contentEl!==null?M.value.contentEl:void 0}function $t(){return at()}function Dt(){return e.hideSelected===!0?[]:o["selected-item"]!==void 0?fe.value.map(n=>o["selected-item"](n)).slice():o.selected!==void 0?[].concat(o.selected()):e.useChips===!0?fe.value.map((n,m)=>t.h(gl,{key:"option-"+m,removable:a.editable.value===!0&&he.value(n.opt)!==!0,dense:!0,textColor:e.color,tabindex:ae.value,onRemove(){n.removeAtIndex(m)}},()=>t.h("span",{class:"ellipsis",[n.html===!0?"innerHTML":"textContent"]:G.value(n.opt)}))):[t.h("span",{[Ae.value===!0?"innerHTML":"textContent"]:J.value})]}function rt(){if(H.value===!0)return o["no-option"]!==void 0?o["no-option"]({inputValue:b.value}):void 0;const n=o.option!==void 0?o.option:p=>t.h(It,{key:p.index,...p.itemProps},()=>t.h(Pe,()=>t.h(Et,()=>t.h("span",{[p.html===!0?"innerHTML":"textContent"]:p.label}))));let m=ue("div",Ie.value.map(n));return o["before-options"]!==void 0&&(m=o["before-options"]().concat(m)),s.hMergeSlot(o["after-options"],m)}function Ht(n,m){const p=m===!0?{...Ee.value,...a.splitAttrs.attributes.value}:void 0,R={ref:m===!0?B:void 0,key:"i_t",class:A.value,style:e.inputStyle,value:b.value!==void 0?b.value:"",type:"search",...p,id:m===!0?a.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":n===!0||e.autofocus===!0||void 0,disabled:e.disable===!0,readonly:e.readonly===!0,...Mt.value};return n!==!0&&y===!0&&(Array.isArray(R.class)===!0?R.class=[...R.class,"no-pointer-events"]:R.class+=" no-pointer-events"),t.h("input",R)}function st(n){C!==null&&(clearTimeout(C),C=null),k!==null&&(clearTimeout(k),k=null),!(n&&n.target&&n.target.qComposing===!0)&&(Te(n.target.value||""),q=!0,L=b.value,a.focused.value!==!0&&(y!==!0||V.value===!0)&&a.focus(),e.onFilter!==void 0&&(C=setTimeout(()=>{C=null,be(b.value)},e.inputDebounce)))}function Te(n,m){b.value!==n&&(b.value=n,m===!0||e.inputDebounce===0||e.inputDebounce==="0"?l("inputValue",n):k=setTimeout(()=>{k=null,l("inputValue",n)},e.inputDebounce))}function xe(n,m,p){q=p!==!0,e.useInput===!0&&(Te(n,!0),(m===!0||p!==!0)&&(L=n),m!==!0&&be(n))}function be(n,m,p){if(e.onFilter===void 0||m!==!0&&a.focused.value!==!0)return;a.innerLoading.value===!0?l("filterAbort"):(a.innerLoading.value=!0,f.value=!0),n!==""&&e.multiple!==!0&&v.value.length!==0&&q!==!0&&n===G.value(v.value[0])&&(n="");const R=setTimeout(()=>{i.value===!0&&(i.value=!1)},10);S!==null&&clearTimeout(S),S=R,l("filter",n,(D,$)=>{(m===!0||a.focused.value===!0)&&S===R&&(clearTimeout(S),typeof D=="function"&&D(),f.value=!1,t.nextTick(()=>{a.innerLoading.value=!1,a.editable.value===!0&&(m===!0?i.value===!0&&me():i.value===!0?je(!0):i.value=!0),typeof $=="function"&&t.nextTick(()=>{$(u)}),typeof p=="function"&&t.nextTick(()=>{p(u)})}))},()=>{a.focused.value===!0&&S===R&&(clearTimeout(S),a.innerLoading.value=!1,f.value=!1),i.value===!0&&(i.value=!1)})}function Nt(){return t.h(U.QMenu,{ref:M,class:z.value,style:e.popupContentStyle,modelValue:i.value,fit:e.menuShrink!==!0,cover:e.optionsCover===!0&&H.value!==!0&&e.useInput!==!0,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:w.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:e.popupNoRouteDismiss,square:De.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...de.value,onScrollPassive:h,onBeforeShow:dt,onBeforeHide:jt,onShow:Kt},rt)}function jt(n){ft(n),ye()}function Kt(){ie()}function Ut(n){s.stop(n),B.value!==null&&B.value.focus(),V.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function Qt(n){s.stop(n),t.nextTick(()=>{V.value=!1})}function Wt(){const n=[t.h(pl,{class:`col-auto ${a.fieldClass.value}`,...I.value,for:a.targetUid.value,dark:w.value,square:!0,loading:f.value,itemAligned:!1,filled:!0,stackLabel:b.value.length!==0,...a.splitAttrs.listeners.value,onFocus:Ut,onBlur:Qt},{...o,rawControl:()=>a.getControl(!0),before:void 0,after:void 0})];return i.value===!0&&n.push(t.h("div",{ref:ee,class:z.value+" scroll",style:e.popupContentStyle,...de.value,onClick:s.prevent,onScrollPassive:h},rt())),t.h(ql,{ref:P,modelValue:r.value,position:e.useInput===!0?"top":void 0,transitionShow:N,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,noRouteDismiss:e.popupNoRouteDismiss,onBeforeShow:dt,onBeforeHide:Xt,onHide:Yt,onShow:Zt},()=>t.h("div",{class:"q-select__dialog"+(w.value===!0?" q-select__dialog--dark q-dark":"")+(V.value===!0?" q-select__dialog--focused":"")},n))}function Xt(n){ft(n),P.value!==null&&P.value.__updateRefocusTarget(a.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),a.focused.value=!1}function Yt(n){me(),a.focused.value===!1&&l("blur",n),we()}function Zt(){const n=document.activeElement;(n===null||n.id!==a.targetUid.value)&&B.value!==null&&B.value!==n&&B.value.focus(),ie()}function ye(){r.value!==!0&&(g.value=-1,i.value===!0&&(i.value=!1),a.focused.value===!1&&(S!==null&&(clearTimeout(S),S=null),a.innerLoading.value===!0&&(l("filterAbort"),a.innerLoading.value=!1,f.value=!1)))}function Se(n){a.editable.value===!0&&(y===!0?(a.onControlFocusin(n),r.value=!0,t.nextTick(()=>{a.focus()})):a.focus(),e.onFilter!==void 0?be(b.value):(H.value!==!0||o["no-option"]!==void 0)&&(i.value=!0))}function me(){r.value=!1,ye()}function we(){e.useInput===!0&&xe(e.multiple!==!0&&e.fillInput===!0&&v.value.length!==0&&G.value(v.value[0])||"",!0,!0)}function je(n){let m=-1;if(n===!0){if(v.value.length!==0){const p=re.value(v.value[0]);m=e.options.findIndex(R=>ce(re.value(R),p))}K(m)}ge(m)}function Jt(n,m){i.value===!0&&a.innerLoading.value===!1&&(K(-1,!0),t.nextTick(()=>{i.value===!0&&a.innerLoading.value===!1&&(n>m?K():je(!0))}))}function ct(){r.value===!1&&M.value!==null&&M.value.updatePosition()}function dt(n){n!==void 0&&s.stop(n),l("popupShow",n),a.hasPopupOpen=!0,a.onControlFocusin(n)}function ft(n){n!==void 0&&s.stop(n),l("popupHide",n),a.hasPopupOpen=!1,a.onControlFocusout(n)}function vt(){y=d.platform.is.mobile!==!0&&e.behavior!=="dialog"?!1:e.behavior!=="menu"&&(e.useInput===!0?o["no-option"]!==void 0||e.onFilter!==void 0||H.value===!1:!0),N=d.platform.is.ios===!0&&y===!0&&e.useInput===!0?"fade":e.transitionShow}return t.onBeforeUpdate(vt),t.onUpdated(ct),vt(),t.onBeforeUnmount(()=>{C!==null&&clearTimeout(C),k!==null&&clearTimeout(k)}),Object.assign(u,{showPopup:Se,hidePopup:me,removeAtIndex:He,add:tt,toggleOption:ve,getOptionIndex:()=>g.value,setOptionIndex:ge,moveOptionSelection:Re,filter:be,updateMenuPosition:ct,updateInputValue:xe,isOptionSelected:Ne,getEmittingOptionValue:et,isOptionDisabled:(...n)=>he.value.apply(null,n)===!0,getOptionValue:(...n)=>re.value.apply(null,n),getOptionLabel:(...n)=>G.value.apply(null,n)}),Object.assign(a,{innerValue:v,fieldClass:t.computed(()=>`q-select q-field--auto-height q-select--with${e.useInput!==!0?"out":""}-input q-select--with${e.useChips!==!0?"out":""}-chips q-select--${e.multiple===!0?"multiple":"single"}`),inputRef:Y,targetRef:B,hasValue:F,showPopup:Se,floatingLabel:t.computed(()=>e.hideSelected!==!0&&F.value===!0||typeof b.value=="number"||b.value.length!==0||Je(e.displayValue)),getControlChild:()=>{if(a.editable.value!==!1&&(r.value===!0||H.value!==!0||o["no-option"]!==void 0))return y===!0?Wt():Nt();a.hasPopupOpen===!0&&(a.hasPopupOpen=!1)},controlEvents:{onFocusin(n){a.onControlFocusin(n)},onFocusout(n){a.onControlFocusout(n,()=>{we(),ye()})},onClick(n){if(s.prevent(n),y!==!0&&i.value===!0){ye(),B.value!==null&&B.value.focus();return}Se(n)}},getControl:n=>{const m=Dt(),p=n===!0||r.value!==!0||y!==!0;if(e.useInput===!0)m.push(Ht(n,p));else if(a.editable.value===!0){const D=p===!0?Ee.value:void 0;m.push(t.h("input",{ref:p===!0?B:void 0,key:"d_t",class:"q-select__focus-target",id:p===!0?a.targetUid.value:void 0,value:J.value,readonly:!0,"data-autofocus":n===!0||e.autofocus===!0||void 0,...D,onKeydown:it,onKeyup:ot,onKeypress:ut})),p===!0&&typeof e.autocomplete=="string"&&e.autocomplete.length!==0&&m.push(t.h("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:nt}))}if(Q.value!==void 0&&e.disable!==!0&&ze.value.length!==0){const D=ze.value.map($=>t.h("option",{value:$,selected:!0}));m.push(t.h("select",{class:"hidden",name:Q.value,multiple:e.multiple},D))}const R=e.useInput===!0||p!==!0?void 0:a.splitAttrs.attributes.value;return t.h("div",{class:"q-field__native row items-center",...R,...a.splitAttrs.listeners.value},m)},getInnerAppend:()=>e.loading!==!0&&f.value!==!0&&e.hideDropdownIcon!==!0?[t.h(s.QIcon,{class:"q-select__dropdown-icon"+(i.value===!0?" rotate-180":""),name:ke.value})]:null}),Ft(a)}}),Ml={class:"app-select__amount"},Ll=t.defineComponent({__name:"AppSelect",props:{modelValue:{},size:{default:s.SIZES.MD},options:{},multiple:{type:Boolean},label:{},placeholder:{},required:{type:Boolean},clearable:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},filtering:{type:Boolean},autofocus:{type:Boolean},rules:{},lazyRules:{type:[Boolean,String]},menuClass:{}},emits:["update:modelValue"],setup(e,{emit:o}){const l=e,u=o,d=t.ref(!1),i=t.ref(""),r=t.computed({get(){if(l.modelValue){if(l.multiple&&Array.isArray(l.modelValue))return l.options.filter(c=>l.modelValue.includes(c.value));if(!Array.isArray(l.modelValue))return l.options.find(c=>c.value===l.modelValue)}},set(c){if(!c){u("update:modelValue",void 0);return}if(l.multiple&&Array.isArray(c)){const y=c.map(q=>q.value);u("update:modelValue",y)}else Array.isArray(c)||u("update:modelValue",c.value)}}),g=t.computed(()=>{var c;if(Array.isArray(r.value)){if(l.multiple&&r.value.length==0)return l.placeholder}else return((c=r.value)==null?void 0:c.label)||l.placeholder||"";return""}),b=t.computed(()=>!(!l.clearable||!l.modelValue||l.modelValue&&Array.isArray(l.modelValue)&&!l.modelValue.length)),V=t.computed(()=>i.value?l.options.filter(c=>c.label.toLowerCase().includes(i.value.toLowerCase())):l.options),f=t.computed(()=>{if(l.rules)return l.required?[...l.rules,mt]:l.rules;if(l.required)return[mt]}),C=()=>{r.value=void 0},k=(c,y)=>{y(()=>{i.value=c})};return(c,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-select",[{"app-select_opened":d.value},`app-select_${c.size}`]])},[c.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:t.normalizeClass(["app-select__label",{"app-select__label_bold":c.required}])},t.toDisplayString(c.required?`${c.label} *`:c.label),3)):t.createCommentVNode("",!0),t.createVNode(t.unref(Ol),{standout:"","hide-bottom-space":"","hide-dropdown-icon":"","no-error-icon":"",behavior:"menu","popup-no-route-dismiss":"","popup-content-class":`app-select-menu app-select-menu_${c.size} ${c.menuClass}`,placeholder:c.filtering&&"Почніть вводити","input-debounce":"50",modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=q=>r.value=q),options:V.value,multiple:c.multiple,"use-input":c.filtering&&(Array.isArray(r.value)||!r.value),rules:f.value,"lazy-rules":c.lazyRules,autofocus:c.autofocus,disable:c.disabled,loading:c.loading,onFilter:k,onPopupShow:y[1]||(y[1]=q=>d.value=!0),onPopupHide:y[2]||(y[2]=q=>d.value=!1)},{append:t.withCtx(()=>[b.value?(t.openBlock(),t.createElementBlock("i",{key:0,class:"icon-kl icon-kl-circle-close app-select__clear",onClick:t.withModifiers(C,["stop","prevent"])})):t.createCommentVNode("",!0),y[3]||(y[3]=t.createElementVNode("i",{class:"icon-kl icon-kl-arrow-down app-select__drop-icon"},null,-1))]),selected:t.withCtx(()=>{var q,S;return[Array.isArray(r.value)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[!c.filtering||r.value.length?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!((q=r.value)!=null&&q.length)&&c.placeholder}])},[(S=r.value)!=null&&S.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y[4]||(y[4]=t.createTextVNode(" Вибрано ")),t.createElementVNode("span",Ml,t.toDisplayString(r.value.length),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(l.placeholder),1)],64))],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[!c.filtering||r.value?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!r.value&&c.placeholder}])},t.toDisplayString(g.value),3)):t.createCommentVNode("",!0)],64))]}),option:t.withCtx(q=>[t.createVNode(It,t.mergeProps({class:["app-select__option",{"app-select__option_selected":q.selected}]},q.itemProps),{default:t.withCtx(()=>[l.multiple?(t.openBlock(),t.createBlock(Pe,{key:0,class:"option-multiple",avatar:""},{default:t.withCtx(()=>[t.createVNode(al,{size:"30px","model-value":q.selected,"onUpdate:modelValue":()=>q.toggleOption(q.opt)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)):t.createCommentVNode("",!0),q.opt.done?(t.openBlock(),t.createBlock(Pe,{key:1,class:"option-done",avatar:""},{default:t.withCtx(()=>y[5]||(y[5]=[t.createElementVNode("i",{class:"icon-kl icon-kl-check option-done__icon"},null,-1)])),_:1})):t.createCommentVNode("",!0),t.createVNode(Pe,null,{default:t.withCtx(()=>[t.createVNode(Et,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(q.opt.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1040,["class"])]),_:1},8,["popup-content-class","placeholder","modelValue","options","multiple","use-input","rules","lazy-rules","autofocus","disable","loading"])],2))}}),Pl=s._export_sfc(Ll,[["__scopeId","data-v-3977036d"]]);exports.default=Pl;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),l=require("./index-CNCrt1w6.cjs"),b=require("./QMenu-cWjMyOHy.cjs"),q=["ul","ol"],y=l.createComponent({name:"QList",props:{...l.useDarkProps,bordered:Boolean,dense:Boolean,separator:Boolean,padding:Boolean,tag:{type:String,default:"div"}},setup(e,{slots:d}){const o=n.getCurrentInstance(),u=l.useDark(e,o.proxy.$q),r=n.computed(()=>q.includes(e.tag)?null:"list"),s=n.computed(()=>"q-list"+(e.bordered===!0?" q-list--bordered":"")+(e.dense===!0?" q-list--dense":"")+(e.separator===!0?" q-list--separator":"")+(u.value===!0?" q-list--dark":"")+(e.padding===!0?" q-list--padding":""));return()=>n.h(e.tag,{class:s.value,role:r.value},l.hSlot(d.default))}}),D={[l.SIZES.SM]:"3px 9px",[l.SIZES.MD]:"5px 12px",[l.SIZES.LG]:"9px 20px"},M=l.createComponent({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:d}){const o=n.computed(()=>{const u=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(r=>e[r]===!0).map(r=>`q-btn-group--${r}`).join(" ");return`q-btn-group row no-wrap${u.length!==0?" "+u:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>n.h("div",{class:o.value},l.hSlot(d.default))}}),I=Object.keys(l.nonRoundBtnProps);function A(e){return I.reduce((d,o)=>{const u=e[o];return u!==void 0&&(d[o]=u),d},{})}const L=l.createComponent({name:"QBtnDropdown",props:{...l.nonRoundBtnProps,...b.useTransitionProps,modelValue:Boolean,split:Boolean,dropdownIcon:String,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],cover:Boolean,persistent:Boolean,noRouteDismiss:Boolean,autoClose:Boolean,menuAnchor:{type:String,default:"bottom end"},menuSelf:{type:String,default:"top end"},menuOffset:Array,disableMainBtn:Boolean,disableDropdown:Boolean,noIconAnimation:Boolean,toggleAriaLabel:String},emits:["update:modelValue","click","beforeShow","show","beforeHide","hide"],setup(e,{slots:d,emit:o}){const{proxy:u}=n.getCurrentInstance(),r=n.ref(e.modelValue),s=n.ref(null),i=b.useId(),c=n.computed(()=>{const t={"aria-expanded":r.value===!0?"true":"false","aria-haspopup":"true","aria-controls":i.value,"aria-label":e.toggleAriaLabel||u.$q.lang.label[r.value===!0?"collapse":"expand"](e.label)};return(e.disable===!0||e.split===!1&&e.disableMainBtn===!0||e.disableDropdown===!0)&&(t["aria-disabled"]="true"),t}),a=n.computed(()=>"q-btn-dropdown__arrow"+(r.value===!0&&e.noIconAnimation===!1?" rotate-180":"")+(e.split===!1?" q-btn-dropdown__arrow-container":"")),f=n.computed(()=>l.getBtnDesignAttr(e)),w=n.computed(()=>A(e));n.watch(()=>e.modelValue,t=>{s.value!==null&&s.value[t?"show":"hide"]()}),n.watch(()=>e.split,m);function B(t){r.value=!0,o("beforeShow",t)}function g(t){o("show",t),o("update:modelValue",!0)}function p(t){r.value=!1,o("beforeHide",t)}function S(t){o("hide",t),o("update:modelValue",!1)}function v(t){o("click",t)}function C(t){l.stop(t),m(),o("click",t)}function k(t){s.value!==null&&s.value.toggle(t)}function h(t){s.value!==null&&s.value.show(t)}function m(t){s.value!==null&&s.value.hide(t)}return Object.assign(u,{show:h,hide:m,toggle:k}),n.onMounted(()=>{e.modelValue===!0&&h()}),()=>{const t=[n.h(l.QIcon,{class:a.value,name:e.dropdownIcon||u.$q.iconSet.arrow.dropdown})];return e.disableDropdown!==!0&&t.push(n.h(b.QMenu,{ref:s,id:i.value,class:e.contentClass,style:e.contentStyle,cover:e.cover,fit:!0,persistent:e.persistent,noRouteDismiss:e.noRouteDismiss,autoClose:e.autoClose,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,separateClosePopup:!0,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:B,onShow:g,onBeforeHide:p,onHide:S},d.default)),e.split===!1?n.h(l.QBtn,{class:"q-btn-dropdown q-btn-dropdown--simple",...w.value,...c.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:v},{default:()=>l.hSlot(d.label,[]).concat(t),loading:d.loading}):n.h(M,{class:"q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item",rounded:e.rounded,square:e.square,...f.value,glossy:e.glossy,stretch:e.stretch},()=>[n.h(l.QBtn,{class:"q-btn-dropdown--current",...w.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:C},{default:d.label,loading:d.loading}),n.h(l.QBtn,{class:"q-btn-dropdown__arrow-container q-anchor--skip",...c.value,...f.value,disable:e.disable===!0||e.disableDropdown===!0,rounded:e.rounded,color:e.color,textColor:e.textColor,dense:e.dense,size:e.size,padding:e.padding,ripple:e.ripple},()=>t)])}}}),z=n.defineComponent({__name:"DropdownButton",props:{size:{default:l.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:l.COLORS.PRIMARY},iconLeft:{},iconMiddle:{},hideDropIcon:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},ariaLabel:{},label:{},menuClass:{},menuOffset:{},menuAnchor:{},menuSelf:{}},emits:["menuShown","menuHidden"],setup(e,{emit:d}){const o=e,u=d,r=n.ref(!1),s=n.computed(()=>["dropdown-btn",{"dropdown-btn_default":!o.transparent&&!o.flat,"dropdown-btn_trans":o.transparent,"dropdown-btn_flat":o.flat,"dropdown-btn_rounded":o.rounded,"dropdown-btn_sm":o.size===l.SIZES.SM,"dropdown-btn_md":o.size===l.SIZES.MD,"dropdown-btn_lg":o.size===l.SIZES.LG,"dropdown-btn_icon-left":o.iconLeft,"dropdown-btn_icon-middle":o.iconMiddle},`dropdown-btn_${o.color}`]),i=()=>{r.value=!0,u("menuShown")},c=()=>{r.value=!1,u("menuHidden")};return(a,f)=>(n.openBlock(),n.createBlock(n.unref(L),{"no-caps":"",unelevated:"",class:n.normalizeClass(s.value),padding:n.unref(D)[a.size||n.unref(l.SIZES).MD],loading:a.loading,disable:a.disabled||void 0,"aria-label":a.ariaLabel,"menu-offset":a.menuOffset,"menu-anchor":a.menuAnchor,"menu-self":a.menuSelf,onBeforeShow:i,onBeforeHide:c},{label:n.withCtx(()=>[a.iconLeft||a.iconMiddle?(n.openBlock(),n.createElementBlock("i",{key:0,class:n.normalizeClass(["icon-kl",a.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${a.iconLeft||a.iconMiddle}`,a.transparent||a.flat?`text-${a.color}`:"text-secondary"])},null,2)):n.createCommentVNode("",!0),a.label?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(a.label),1)],64)):n.createCommentVNode("",!0),a.hideDropIcon?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("i",{key:2,class:n.normalizeClass(["icon-kl","icon-kl-arrow-down",{"icon-kl-arrow-down_rotated":r.value},a.transparent?`text-${a.color}`:"text-secondary"])},null,2))]),default:n.withCtx(()=>[n.createVNode(y,{class:n.normalizeClass(["dropdown-btn-menu",`dropdown-btn-menu_${a.size} ${a.menuClass?a.menuClass:""}`])},{default:n.withCtx(()=>[n.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3},8,["class"])]),_:3},8,["class","padding","loading","disable","aria-label","menu-offset","menu-anchor","menu-self"]))}}),E=l._export_sfc(z,[["__scopeId","data-v-66c28b87"]]);exports.default=E;
|
package/dist/QMenu-cWjMyOHy.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("vue"),F=require("./focusout-DzWGke-4.cjs"),g=require("./index-CNCrt1w6.cjs");let _,R=0;const b=new Array(256);for(let e=0;e<256;e++)b[e]=(e+256).toString(16).substring(1);const De=(()=>{const e=typeof crypto<"u"?crypto:typeof window<"u"?window.crypto||window.msCrypto:void 0;if(e!==void 0){if(e.randomBytes!==void 0)return e.randomBytes;if(e.getRandomValues!==void 0)return t=>{const o=new Uint8Array(t);return e.getRandomValues(o),o}}return t=>{const o=[];for(let n=t;n>0;n--)o.push(Math.floor(Math.random()*256));return o}})(),le=4096;function j(){(_===void 0||R+16>le)&&(R=0,_=De(le));const e=Array.prototype.slice.call(_,R,R+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,b[e[0]]+b[e[1]]+b[e[2]]+b[e[3]]+"-"+b[e[4]]+b[e[5]]+"-"+b[e[6]]+b[e[7]]+"-"+b[e[8]]+b[e[9]]+"-"+b[e[10]]+b[e[11]]+b[e[12]]+b[e[13]]+b[e[14]]+b[e[15]]}function Re(e){return e??null}function ie(e,t){return e??(t===!0?`f_${j()}`:null)}function Ie({getValue:e,required:t=!0}={}){if(F.isRuntimeSsrPreHydration.value===!0){const o=e!==void 0?u.ref(Re(e())):u.ref(null);return t===!0&&o.value===null&&u.onMounted(()=>{o.value=`f_${j()}`}),e!==void 0&&u.watch(e,n=>{o.value=ie(n,t)}),o}return e!==void 0?u.computed(()=>ie(e(),t)):u.ref(`f_${j()}`)}let k=[],D=[];function he(e){D=D.filter(t=>t!==e)}function ze(e){he(e),D.push(e)}function ue(e){he(e),D.length===0&&k.length!==0&&(k[k.length-1](),k=[])}function ve(e){D.length===0?e():k.push(e)}function Oe(e){k=k.filter(t=>t!==e)}function Ve(){if(window.getSelection!==void 0){const e=window.getSelection();e.empty!==void 0?e.empty():e.removeAllRanges!==void 0&&(e.removeAllRanges(),F.Platform.is.mobile!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}const Ke={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},Qe={...Ke,contextMenu:Boolean};function Ue({showing:e,avoidEmit:t,configureAnchorEl:o}){const{props:n,proxy:l,emit:m}=u.getCurrentInstance(),i=u.ref(null);let a=null;function h(r){return i.value===null?!1:r===void 0||r.touches===void 0||r.touches.length<=1}const d={};o===void 0&&(Object.assign(d,{hide(r){l.hide(r)},toggle(r){l.toggle(r),r.qAnchorHandled=!0},toggleKey(r){g.isKeyCode(r,13)===!0&&d.toggle(r)},contextClick(r){l.hide(r),g.prevent(r),u.nextTick(()=>{l.show(r),r.qAnchorHandled=!0})},prevent:g.prevent,mobileTouch(r){if(d.mobileCleanup(r),h(r)!==!0)return;l.hide(r),i.value.classList.add("non-selectable");const f=r.target;g.addEvt(d,"anchor",[[f,"touchmove","mobileCleanup","passive"],[f,"touchend","mobileCleanup","passive"],[f,"touchcancel","mobileCleanup","passive"],[i.value,"contextmenu","prevent","notPassive"]]),a=setTimeout(()=>{a=null,l.show(r),r.qAnchorHandled=!0},300)},mobileCleanup(r){i.value.classList.remove("non-selectable"),a!==null&&(clearTimeout(a),a=null),e.value===!0&&r!==void 0&&Ve()}}),o=function(r=n.contextMenu){if(n.noParentEvent===!0||i.value===null)return;let f;r===!0?l.$q.platform.is.mobile===!0?f=[[i.value,"touchstart","mobileTouch","passive"]]:f=[[i.value,"mousedown","hide","passive"],[i.value,"contextmenu","contextClick","notPassive"]]:f=[[i.value,"click","toggle","passive"],[i.value,"keyup","toggleKey","passive"]],g.addEvt(d,"anchor",f)});function s(){g.cleanEvt(d,"anchor")}function w(r){for(i.value=r;i.value.classList.contains("q-anchor--skip");)i.value=i.value.parentNode;o()}function y(){if(n.target===!1||n.target===""||l.$el.parentNode===null)i.value=null;else if(n.target===!0)w(l.$el.parentNode);else{let r=n.target;if(typeof n.target=="string")try{r=document.querySelector(n.target)}catch{r=void 0}r!=null?(i.value=r.$el||r,o()):(i.value=null,console.error(`Anchor: target "${n.target}" not found`))}}return u.watch(()=>n.contextMenu,r=>{i.value!==null&&(s(),o(r))}),u.watch(()=>n.target,()=>{i.value!==null&&s(),y()}),u.watch(()=>n.noParentEvent,r=>{i.value!==null&&(r===!0?s():o())}),u.onMounted(()=>{y(),t!==!0&&n.modelValue===!0&&i.value===null&&m("update:modelValue",!1)}),u.onBeforeUnmount(()=>{a!==null&&clearTimeout(a),s()}),{anchorEl:i,canShow:h,anchorEvents:d}}function _e(e,t){const o=u.ref(null);let n;function l(a,h){const d=`${h!==void 0?"add":"remove"}EventListener`,s=h!==void 0?h:n;a!==window&&a[d]("scroll",s,g.listenOpts.passive),window[d]("scroll",s,g.listenOpts.passive),n=h}function m(){o.value!==null&&(l(o.value),o.value=null)}const i=u.watch(()=>e.noParentEvent,()=>{o.value!==null&&(m(),t())});return u.onBeforeUnmount(i),{localScrollTarget:o,unconfigureScrollTarget:m,changeScrollEvent:l}}const ge={modelValue:{type:Boolean,default:null},"onUpdate:modelValue":[Function,Array]},pe=["beforeShow","show","beforeHide","hide"];function we({showing:e,canShow:t,hideOnRouteChange:o,handleShow:n,handleHide:l,processOnMount:m}){const i=u.getCurrentInstance(),{props:a,emit:h,proxy:d}=i;let s;function w(v){e.value===!0?f(v):y(v)}function y(v){if(a.disable===!0||v!==void 0&&v.qAnchorHandled===!0||t!==void 0&&t(v)!==!0)return;const p=a["onUpdate:modelValue"]!==void 0;p===!0&&(h("update:modelValue",!0),s=v,u.nextTick(()=>{s===v&&(s=void 0)})),(a.modelValue===null||p===!1)&&r(v)}function r(v){e.value!==!0&&(e.value=!0,h("beforeShow",v),n!==void 0?n(v):h("show",v))}function f(v){if(a.disable===!0)return;const p=a["onUpdate:modelValue"]!==void 0;p===!0&&(h("update:modelValue",!1),s=v,u.nextTick(()=>{s===v&&(s=void 0)})),(a.modelValue===null||p===!1)&&H(v)}function H(v){e.value!==!1&&(e.value=!1,h("beforeHide",v),l!==void 0?l(v):h("hide",v))}function C(v){a.disable===!0&&v===!0?a["onUpdate:modelValue"]!==void 0&&h("update:modelValue",!1):v===!0!==e.value&&(v===!0?r:H)(s)}u.watch(()=>a.modelValue,C),o!==void 0&&g.vmHasRouter(i)===!0&&u.watch(()=>d.$route.fullPath,()=>{o.value===!0&&e.value===!0&&f()}),u.onMounted(()=>{C(a.modelValue)});const M={show:y,hide:f,toggle:w};return Object.assign(d,M),M}const re={};let Ne=1,je=document.body;function Ge(e,t){const o=document.createElement("div");if(o.id=t!==void 0?`q-portal--${t}--${Ne++}`:e,re.globalNodes!==void 0){const n=re.globalNodes.class;n!==void 0&&(o.className=n)}return je.appendChild(o),o}function Xe(e){e.remove()}const A=[];function Ye(e,t){do{if(e.$options.name==="QMenu"){if(e.hide(t),e.$props.separateClosePopup===!0)return g.getParentProxy(e)}else if(e.__qPortal===!0){const o=g.getParentProxy(e);return o!==void 0&&o.$options.name==="QPopupProxy"?(e.hide(t),o):e}e=g.getParentProxy(e)}while(e!=null)}const Ze=g.createComponent({name:"QPortal",setup(e,{slots:t}){return()=>t.default()}});function Je(e){for(e=e.parent;e!=null;){if(e.type.name==="QGlobalDialog")return!0;if(e.type.name==="QDialog"||e.type.name==="QMenu")return!1;e=e.parent}return!1}function ye(e,t,o,n){const l=u.ref(!1),m=u.ref(!1);let i=null;const a={},h=n==="dialog"&&Je(e);function d(w){if(w===!0){ue(a),m.value=!0;return}m.value=!1,l.value===!1&&(h===!1&&i===null&&(i=Ge(!1,n)),l.value=!0,A.push(e.proxy),ze(a))}function s(w){if(m.value=!1,w!==!0)return;ue(a),l.value=!1;const y=A.indexOf(e.proxy);y!==-1&&A.splice(y,1),i!==null&&(Xe(i),i=null)}return u.onUnmounted(()=>{s(!0)}),e.proxy.__qPortal=!0,F.injectProp(e.proxy,"contentEl",()=>t.value),{showPortal:d,hidePortal:s,portalIsActive:l,portalIsAccessible:m,renderPortal:()=>h===!0?o():l.value===!0?[u.h(u.Teleport,{to:i},u.h(Ze,o))]:void 0}}const xe={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function be(e,t=()=>{},o=()=>{}){return{transitionProps:u.computed(()=>{const n=`q-transition--${e.transitionShow||t()}`,l=`q-transition--${e.transitionHide||o()}`;return{appear:!0,enterFromClass:`${n}-enter-from`,enterActiveClass:`${n}-enter-active`,enterToClass:`${n}-enter-to`,leaveFromClass:`${l}-leave-from`,leaveActiveClass:`${l}-leave-active`,leaveToClass:`${l}-leave-to`}}),transitionStyle:u.computed(()=>`--q-transition-duration: ${e.transitionDuration}ms`)}}function Te(){let e;const t=u.getCurrentInstance();function o(){e=void 0}return u.onDeactivated(o),u.onBeforeUnmount(o),{removeTick:o,registerTick(n){e=n,u.nextTick(()=>{e===n&&(g.vmIsDestroyed(t)===!1&&e(),e=void 0)})}}}function Ee(){let e=null;const t=u.getCurrentInstance();function o(){e!==null&&(clearTimeout(e),e=null)}return u.onDeactivated(o),u.onBeforeUnmount(o),{removeTimeout:o,registerTimeout(n,l){o(),g.vmIsDestroyed(t)===!1&&(e=setTimeout(()=>{e=null,n()},l))}}}const et=[Element,String],tt=[null,document,document.body,document.scrollingElement,document.documentElement];function ot(e,t){let o=g.getElement(t);if(o===void 0){if(e==null)return window;o=e.closest(".scroll,.scroll-y,.overflow-auto")}return tt.includes(o)?window:o}function nt(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function lt(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}let I;function it(){if(I!==void 0)return I;const e=document.createElement("p"),t=document.createElement("div");g.css(e,{width:"100%",height:"200px"}),g.css(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);const o=e.offsetWidth;t.style.overflow="scroll";let n=e.offsetWidth;return o===n&&(n=t.clientWidth),t.remove(),I=o-n,I}function ut(e,t=!0){return!e||e.nodeType!==Node.ELEMENT_NODE?!1:t?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"]))}const W=[];let B;function rt(e){B=e.keyCode===27}function at(){B===!0&&(B=!1)}function st(e){B===!0&&(B=!1,g.isKeyCode(e,27)===!0&&W[W.length-1](e))}function Ce(e){window[e]("keydown",rt),window[e]("blur",at),window[e]("keyup",st),B=!1}function Pe(e){F.client.is.desktop===!0&&(W.push(e),W.length===1&&Ce("addEventListener"))}function G(e){const t=W.indexOf(e);t!==-1&&(W.splice(t,1),W.length===0&&Ce("removeEventListener"))}const{notPassiveCapture:z}=g.listenOpts,q=[];function O(e){const t=e.target;if(t===void 0||t.nodeType===8||t.classList.contains("no-pointer-events")===!0)return;let o=A.length-1;for(;o>=0;){const n=A[o].$;if(n.type.name==="QTooltip"){o--;continue}if(n.type.name!=="QDialog")break;if(n.props.seamless!==!0)return;o--}for(let n=q.length-1;n>=0;n--){const l=q[n];if((l.anchorEl.value===null||l.anchorEl.value.contains(t)===!1)&&(t===document.body||l.innerRef.value!==null&&l.innerRef.value.contains(t)===!1))e.qClickOutside=!0,l.onClickOutside(e);else return}}function ct(e){q.push(e),q.length===1&&(document.addEventListener("mousedown",O,z),document.addEventListener("touchstart",O,z))}function ae(e){const t=q.findIndex(o=>o===e);t!==-1&&(q.splice(t,1),q.length===0&&(document.removeEventListener("mousedown",O,z),document.removeEventListener("touchstart",O,z)))}let se,ce;function de(e){const t=e.split(" ");return t.length!==2?!1:["top","center","bottom"].includes(t[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(t[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function dt(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const X={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{X[`${e}#ltr`]=e,X[`${e}#rtl`]=e});function fe(e,t){const o=e.split(" ");return{vertical:o[0],horizontal:X[`${o[1]}#${t===!0?"rtl":"ltr"}`]}}function ft(e,t){let{top:o,left:n,right:l,bottom:m,width:i,height:a}=e.getBoundingClientRect();return t!==void 0&&(o-=t[1],n-=t[0],m+=t[1],l+=t[0],i+=t[0],a+=t[1]),{top:o,bottom:m,height:a,left:n,right:l,width:i,middle:n+(l-n)/2,center:o+(m-o)/2}}function mt(e,t,o){let{top:n,left:l}=e.getBoundingClientRect();return n+=t.top,l+=t.left,o!==void 0&&(n+=o[1],l+=o[0]),{top:n,bottom:n+1,height:1,left:l,right:l+1,width:1,middle:l,center:n}}function ht(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function me(e,t,o,n){return{top:e[o.vertical]-t[n.vertical],left:e[o.horizontal]-t[n.horizontal]}}function Se(e,t=0){if(e.targetEl===null||e.anchorEl===null||t>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{Se(e,t+1)},10);return}const{targetEl:o,offset:n,anchorEl:l,anchorOrigin:m,selfOrigin:i,absoluteOffset:a,fit:h,cover:d,maxHeight:s,maxWidth:w}=e;if(F.client.is.ios===!0&&window.visualViewport!==void 0){const $=document.body.style,{offsetLeft:T,offsetTop:E}=window.visualViewport;T!==se&&($.setProperty("--q-pe-left",T+"px"),se=T),E!==ce&&($.setProperty("--q-pe-top",E+"px"),ce=E)}const{scrollLeft:y,scrollTop:r}=o,f=a===void 0?ft(l,d===!0?[0,0]:n):mt(l,a,n);Object.assign(o.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:w,maxHeight:s,visibility:"visible"});const{offsetWidth:H,offsetHeight:C}=o,{elWidth:M,elHeight:v}=h===!0||d===!0?{elWidth:Math.max(f.width,H),elHeight:d===!0?Math.max(f.height,C):C}:{elWidth:H,elHeight:C};let p={maxWidth:w,maxHeight:s};(h===!0||d===!0)&&(p.minWidth=f.width+"px",d===!0&&(p.minHeight=f.height+"px")),Object.assign(o.style,p);const P=ht(M,v);let x=me(f,P,m,i);if(a===void 0||n===void 0)N(x,f,P,m,i);else{const{top:$,left:T}=x;N(x,f,P,m,i);let E=!1;if(x.top!==$){E=!0;const S=2*n[1];f.center=f.top-=S,f.bottom-=S+2}if(x.left!==T){E=!0;const S=2*n[0];f.middle=f.left-=S,f.right-=S+2}E===!0&&(x=me(f,P,m,i),N(x,f,P,m,i))}p={top:x.top+"px",left:x.left+"px"},x.maxHeight!==void 0&&(p.maxHeight=x.maxHeight+"px",f.height>x.maxHeight&&(p.minHeight=p.maxHeight)),x.maxWidth!==void 0&&(p.maxWidth=x.maxWidth+"px",f.width>x.maxWidth&&(p.minWidth=p.maxWidth)),Object.assign(o.style,p),o.scrollTop!==r&&(o.scrollTop=r),o.scrollLeft!==y&&(o.scrollLeft=y)}function N(e,t,o,n,l){const m=o.bottom,i=o.right,a=it(),h=window.innerHeight-a,d=document.body.clientWidth;if(e.top<0||e.top+m>h)if(l.vertical==="center")e.top=t[n.vertical]>h/2?Math.max(0,h-m):0,e.maxHeight=Math.min(m,h);else if(t[n.vertical]>h/2){const s=Math.min(h,n.vertical==="center"?t.center:n.vertical===l.vertical?t.bottom:t.top);e.maxHeight=Math.min(m,s),e.top=Math.max(0,s-m)}else e.top=Math.max(0,n.vertical==="center"?t.center:n.vertical===l.vertical?t.top:t.bottom),e.maxHeight=Math.min(m,h-e.top);if(e.left<0||e.left+i>d)if(e.maxWidth=Math.min(i,d),l.horizontal==="middle")e.left=t[n.horizontal]>d/2?Math.max(0,d-i):0;else if(t[n.horizontal]>d/2){const s=Math.min(d,n.horizontal==="middle"?t.middle:n.horizontal===l.horizontal?t.right:t.left);e.maxWidth=Math.min(i,s),e.left=Math.max(0,s-e.maxWidth)}else e.left=Math.max(0,n.horizontal==="middle"?t.middle:n.horizontal===l.horizontal?t.left:t.right),e.maxWidth=Math.min(i,d-e.left)}const vt=g.createComponent({name:"QMenu",inheritAttrs:!1,props:{...Qe,...ge,...g.useDarkProps,...xe,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:de},self:{type:String,validator:de},offset:{type:Array,validator:dt},scrollTarget:et,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...pe,"click","escapeKey"],setup(e,{slots:t,emit:o,attrs:n}){let l=null,m,i,a;const h=u.getCurrentInstance(),{proxy:d}=h,{$q:s}=d,w=u.ref(null),y=u.ref(!1),r=u.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0),f=g.useDark(e,s),{registerTick:H,removeTick:C}=Te(),{registerTimeout:M}=Ee(),{transitionProps:v,transitionStyle:p}=be(e),{localScrollTarget:P,changeScrollEvent:x,unconfigureScrollTarget:$}=_e(e,oe),{anchorEl:T,canShow:E}=Ue({showing:y}),{hide:S}=we({showing:y,canShow:E,handleShow:qe,handleHide:Fe,hideOnRouteChange:r,processOnMount:!0}),{showPortal:Y,hidePortal:Z,renderPortal:He}=ye(h,w,Be,"menu"),V={anchorEl:T,innerRef:w,onClickOutside(c){if(e.persistent!==!0&&y.value===!0)return S(c),(c.type==="touchstart"||c.target.classList.contains("q-dialog__backdrop"))&&g.stopAndPrevent(c),!0}},J=u.computed(()=>fe(e.anchor||(e.cover===!0?"center middle":"bottom start"),s.lang.rtl)),Me=u.computed(()=>e.cover===!0?J.value:fe(e.self||"top start",s.lang.rtl)),ke=u.computed(()=>(e.square===!0?" q-menu--square":"")+(f.value===!0?" q-menu--dark q-dark":"")),We=u.computed(()=>e.autoClose===!0?{onClick:$e}:{}),ee=u.computed(()=>y.value===!0&&e.persistent!==!0);u.watch(ee,c=>{c===!0?(Pe(Q),ct(V)):(G(Q),ae(V))});function K(){ve(()=>{let c=w.value;c&&c.contains(document.activeElement)!==!0&&(c=c.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||c.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||c.querySelector("[autofocus], [data-autofocus]")||c,c.focus({preventScroll:!0}))})}function qe(c){if(l=e.noRefocus===!1?document.activeElement:null,F.addFocusout(ne),Y(),oe(),m=void 0,c!==void 0&&(e.touchPosition||e.contextMenu)){const U=g.position(c);if(U.left!==void 0){const{top:Le,left:Ae}=T.value.getBoundingClientRect();m={left:U.left-Ae,top:U.top-Le}}}i===void 0&&(i=u.watch(()=>s.screen.width+"|"+s.screen.height+"|"+e.self+"|"+e.anchor+"|"+s.lang.rtl,L)),e.noFocus!==!0&&document.activeElement.blur(),H(()=>{L(),e.noFocus!==!0&&K()}),M(()=>{s.platform.is.ios===!0&&(a=e.autoClose,w.value.click()),L(),Y(!0),o("show",c)},e.transitionDuration)}function Fe(c){C(),Z(),te(!0),l!==null&&(c===void 0||c.qClickOutside!==!0)&&(((c&&c.type.indexOf("key")===0?l.closest('[tabindex]:not([tabindex^="-"])'):void 0)||l).focus(),l=null),M(()=>{Z(!0),o("hide",c)},e.transitionDuration)}function te(c){m=void 0,i!==void 0&&(i(),i=void 0),(c===!0||y.value===!0)&&(F.removeFocusout(ne),$(),ae(V),G(Q)),c!==!0&&(l=null)}function oe(){(T.value!==null||e.scrollTarget!==void 0)&&(P.value=ot(T.value,e.scrollTarget),x(P.value,L))}function $e(c){a!==!0?(Ye(d,c),o("click",c)):a=!1}function ne(c){ee.value===!0&&e.noFocus!==!0&&g.childHasFocus(w.value,c.target)!==!0&&K()}function Q(c){o("escapeKey"),S(c)}function L(){Se({targetEl:w.value,offset:e.offset,anchorEl:T.value,anchorOrigin:J.value,selfOrigin:Me.value,absoluteOffset:m,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function Be(){return u.h(u.Transition,v.value,()=>y.value===!0?u.h("div",{role:"menu",...n,ref:w,tabindex:-1,class:["q-menu q-position-engine scroll"+ke.value,n.class],style:[n.style,p.value],...We.value},g.hSlot(t.default)):null)}return u.onBeforeUnmount(te),Object.assign(d,{focus:K,updatePosition:L}),He}});exports.QMenu=vt;exports.addEscapeKey=Pe;exports.addFocusFn=ve;exports.getHorizontalScrollPosition=lt;exports.getVerticalScrollPosition=nt;exports.hasScrollbar=ut;exports.removeEscapeKey=G;exports.removeFocusFn=Oe;exports.useId=Ie;exports.useModelToggle=we;exports.useModelToggleEmits=pe;exports.useModelToggleProps=ge;exports.usePortal=ye;exports.useTick=Te;exports.useTimeout=Ee;exports.useTransition=be;exports.useTransitionProps=xe;
|
package/dist/index-CNCrt1w6.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),X={PRIMARY:"primary",INFO:"info"},b={SM:"sm",MD:"md",LG:"lg"},Le={[b.SM]:"3px 9px",[b.MD]:"5px 12px",[b.LG]:"9px 20px"},G={xs:18,sm:24,md:32,lg:38,xl:46},Q={size:String};function U(e,n=G){return t.computed(()=>e.size!==void 0?{fontSize:e.size in n?`${n[e.size]}px`:e.size}:null)}function x(e){return t.markRaw(t.defineComponent(e))}function Pe(e){return t.markRaw(e)}function ue(e,n){return e!==void 0&&e()||n}function Re(e,n){if(e!==void 0){const l=e();if(l!=null)return l.slice()}return n}function A(e,n){return e!==void 0?n.concat(e()):n}function Me(e,n){return e===void 0?n:n!==void 0?n.concat(e()):e()}function Ae(e,n,l,o,r,d){n.key=o+r;const a=t.h(e,n,l);return r===!0?t.withDirectives(a,d()):a}const Z="0 0 24 24",J=e=>e,H=e=>`ionicons ${e}`,se={"mdi-":e=>`mdi ${e}`,"icon-":J,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":H,"ion-ios":H,"ion-logo":H,"iconfont ":J,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},ce={o_:"-outlined",r_:"-round",s_:"-sharp"},de={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},ze=new RegExp("^("+Object.keys(se).join("|")+")"),De=new RegExp("^("+Object.keys(ce).join("|")+")"),ee=new RegExp("^("+Object.keys(de).join("|")+")"),Te=/^[Mm]\s?[-+]?\.?\d/,Oe=/^img:/,Ie=/^svguse:/,xe=/^ion-/,Ve=/^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,Y=x({name:"QIcon",props:{...Q,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:n}){const{proxy:{$q:l}}=t.getCurrentInstance(),o=U(e),r=t.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),d=t.computed(()=>{let a,i=e.name;if(i==="none"||!i)return{none:!0};if(l.iconMapFn!==null){const f=l.iconMapFn(i);if(f!==void 0)if(f.icon!==void 0){if(i=f.icon,i==="none"||!i)return{none:!0}}else return{cls:f.cls,content:f.content!==void 0?f.content:" "}}if(Te.test(i)===!0){const[f,k=Z]=i.split("|");return{svg:!0,viewBox:k,nodes:f.split("&&").map(s=>{const[$,u,v]=s.split("@@");return t.h("path",{style:u,d:$,transform:v})})}}if(Oe.test(i)===!0)return{img:!0,src:i.substring(4)};if(Ie.test(i)===!0){const[f,k=Z]=i.split("|");return{svguse:!0,src:f.substring(7),viewBox:k}}let B=" ";const y=i.match(ze);if(y!==null)a=se[y[1]](i);else if(Ve.test(i)===!0)a=i;else if(xe.test(i)===!0)a=`ionicons ion-${l.platform.is.ios===!0?"ios":"md"}${i.substring(3)}`;else if(ee.test(i)===!0){a="notranslate material-symbols";const f=i.match(ee);f!==null&&(i=i.substring(6),a+=de[f[1]]),B=i}else{a="notranslate material-icons";const f=i.match(De);f!==null&&(i=i.substring(2),a+=ce[f[1]]),B=i}return{cls:a,content:B}});return()=>{const a={class:r.value,style:o.value,"aria-hidden":"true",role:"presentation"};return d.value.none===!0?t.h(e.tag,a,ue(n.default)):d.value.img===!0?t.h(e.tag,a,A(n.default,[t.h("img",{src:d.value.src})])):d.value.svg===!0?t.h(e.tag,a,A(n.default,[t.h("svg",{viewBox:d.value.viewBox||"0 0 24 24"},d.value.nodes)])):d.value.svguse===!0?t.h(e.tag,a,A(n.default,[t.h("svg",{viewBox:d.value.viewBox},[t.h("use",{"xlink:href":d.value.src})])])):(d.value.cls!==void 0&&(a.class+=" "+d.value.cls),t.h(e.tag,a,A(n.default,[d.value.content])))}}}),Ne={size:{type:[String,Number],default:"1em"},color:String};function je(e){return{cSize:t.computed(()=>e.size in G?`${G[e.size]}px`:e.size),classes:t.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const fe=x({name:"QSpinner",props:{...Ne,thickness:{type:Number,default:5}},setup(e){const{cSize:n,classes:l}=je(e);return()=>t.h("svg",{class:l.value+" q-spinner-mat",width:n.value,height:n.value,viewBox:"25 25 50 50"},[t.h("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function pe(e,n){const l=e.style;for(const o in n)l[o]=n[o]}function Ke(e){if(e==null)return;if(typeof e=="string")try{return document.querySelector(e)||void 0}catch{return}const n=t.unref(e);if(n)return n.$el||n}function Fe(e,n){if(e==null||e.contains(n)===!0)return!0;for(let l=e.nextElementSibling;l!==null;l=l.nextElementSibling)if(l.contains(n))return!0;return!1}const V={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(V,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch{}function Qe(){}function ve(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function Ue(e){if(e.path)return e.path;if(e.composedPath)return e.composedPath();const n=[];let l=e.target;for(;l;){if(n.push(l),l.tagName==="HTML")return n.push(document),n.push(window),n;l=l.parentElement}}function W(e){e.stopPropagation()}function me(e){e.cancelable!==!1&&e.preventDefault()}function M(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function ge(e,n,l){const o=`__q_${n}_evt`;e[o]=e[o]!==void 0?e[o].concat(l):l,l.forEach(r=>{r[0].addEventListener(r[1],e[r[2]],V[r[3]])})}function he(e,n){const l=`__q_${n}_evt`;e[l]!==void 0&&(e[l].forEach(o=>{o[0].removeEventListener(o[1],e[o[2]],V[o[3]])}),e[l]=void 0)}function be(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function F(e,n){return be(e)===!0?!1:[].concat(n).includes(e.keyCode)}function He(e,n=250){let l=!1,o;return function(){return l===!1&&(l=!0,setTimeout(()=>{l=!1},n),o=e.apply(this,arguments)),o}}function te(e,n,l,o){l.modifiers.stop===!0&&W(e);const r=l.modifiers.color;let d=l.modifiers.center;d=d===!0||o===!0;const a=document.createElement("span"),i=document.createElement("span"),B=ve(e),{left:y,top:f,width:k,height:s}=n.getBoundingClientRect(),$=Math.sqrt(k*k+s*s),u=$/2,v=`${(k-$)/2}px`,p=d?v:`${B.left-y-u}px`,m=`${(s-$)/2}px`,_=d?m:`${B.top-f-u}px`;i.className="q-ripple__inner",pe(i,{height:`${$}px`,width:`${$}px`,transform:`translate3d(${p},${_},0) scale3d(.2,.2,1)`,opacity:0}),a.className=`q-ripple${r?" text-"+r:""}`,a.setAttribute("dir","ltr"),a.appendChild(i),n.appendChild(a);const C=()=>{a.remove(),clearTimeout(S)};l.abort.push(C);let S=setTimeout(()=>{i.classList.add("q-ripple__inner--enter"),i.style.transform=`translate3d(${v},${m},0) scale3d(1,1,1)`,i.style.opacity=.2,S=setTimeout(()=>{i.classList.remove("q-ripple__inner--enter"),i.classList.add("q-ripple__inner--leave"),i.style.opacity=0,S=setTimeout(()=>{a.remove(),l.abort.splice(l.abort.indexOf(C),1)},275)},250)},50)}function ne(e,{modifiers:n,value:l,arg:o}){const r=Object.assign({},e.cfg.ripple,n,l);e.modifiers={early:r.early===!0,stop:r.stop===!0,center:r.center===!0,color:r.color||o,keyCodes:[].concat(r.keyCodes||13)}}const ye=Pe({name:"ripple",beforeMount(e,n){const l=n.instance.$.appContext.config.globalProperties.$q.config||{};if(l.ripple===!1)return;const o={cfg:l,enabled:n.value!==!1,modifiers:{},abort:[],start(r){o.enabled===!0&&r.qSkipRipple!==!0&&r.type===(o.modifiers.early===!0?"pointerdown":"click")&&te(r,e,o,r.qKeyEvent===!0)},keystart:He(r=>{o.enabled===!0&&r.qSkipRipple!==!0&&F(r,o.modifiers.keyCodes)===!0&&r.type===`key${o.modifiers.early===!0?"down":"up"}`&&te(r,e,o,!0)},300)};ne(o,n),e.__qripple=o,ge(o,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,n){if(n.oldValue!==n.value){const l=e.__qripple;l!==void 0&&(l.enabled=n.value!==!1,l.enabled===!0&&Object(n.value)===n.value&&ne(l,n))}},beforeUnmount(e){const n=e.__qripple;n!==void 0&&(n.abort.forEach(l=>{l()}),he(n,"main"),delete e._qripple)}}),ke={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Ge=Object.keys(ke),Ye={align:{type:String,validator:e=>Ge.includes(e)}};function Xe(e){return t.computed(()=>{const n=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${ke[n]}`})}function We(e){if(Object(e.$parent)===e.$parent)return e.$parent;let{parent:n}=e.$;for(;Object(n)===n;){if(Object(n.proxy)===n.proxy)return n.proxy;n=n.parent}}function _e(e){return e.appContext.config.globalProperties.$router!==void 0}function Ze(e){return e.isUnmounted===!0||e.isDeactivated===!0}function oe(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function le(e,n){return(e.aliasOf||e)===(n.aliasOf||n)}function Je(e,n){for(const l in n){const o=n[l],r=e[l];if(typeof o=="string"){if(o!==r)return!1}else if(Array.isArray(r)===!1||r.length!==o.length||o.some((d,a)=>d!==r[a]))return!1}return!0}function ae(e,n){return Array.isArray(n)===!0?e.length===n.length&&e.every((l,o)=>l===n[o]):e.length===1&&e[0]===n}function et(e,n){return Array.isArray(e)===!0?ae(e,n):Array.isArray(n)===!0?ae(n,e):e===n}function tt(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const l in e)if(et(e[l],n[l])===!1)return!1;return!0}const $e={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean},nt={...$e,exact:Boolean,activeClass:{type:String,default:"q-router-link--active"},exactActiveClass:{type:String,default:"q-router-link--exact-active"}};function Be({fallbackTag:e,useDisableForRouterLinkProps:n=!0}={}){const l=t.getCurrentInstance(),{props:o,proxy:r,emit:d}=l,a=_e(l),i=t.computed(()=>o.disable!==!0&&o.href!==void 0),B=n===!0?t.computed(()=>a===!0&&o.disable!==!0&&i.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""):t.computed(()=>a===!0&&i.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""),y=t.computed(()=>B.value===!0?_(o.to):null),f=t.computed(()=>y.value!==null),k=t.computed(()=>i.value===!0||f.value===!0),s=t.computed(()=>o.type==="a"||k.value===!0?"a":o.tag||e||"div"),$=t.computed(()=>i.value===!0?{href:o.href,target:o.target}:f.value===!0?{href:y.value.href,target:o.target}:{}),u=t.computed(()=>{if(f.value===!1)return-1;const{matched:g}=y.value,{length:q}=g,w=g[q-1];if(w===void 0)return-1;const P=r.$route.matched;if(P.length===0)return-1;const R=P.findIndex(le.bind(null,w));if(R!==-1)return R;const j=oe(g[q-2]);return q>1&&oe(w)===j&&P[P.length-1].path!==j?P.findIndex(le.bind(null,g[q-2])):R}),v=t.computed(()=>f.value===!0&&u.value!==-1&&Je(r.$route.params,y.value.params)),p=t.computed(()=>v.value===!0&&u.value===r.$route.matched.length-1&&tt(r.$route.params,y.value.params)),m=t.computed(()=>f.value===!0?p.value===!0?` ${o.exactActiveClass} ${o.activeClass}`:o.exact===!0?"":v.value===!0?` ${o.activeClass}`:"":"");function _(g){try{return r.$router.resolve(g)}catch{}return null}function C(g,{returnRouterError:q,to:w=o.to,replace:P=o.replace}={}){if(o.disable===!0)return g.preventDefault(),Promise.resolve(!1);if(g.metaKey||g.altKey||g.ctrlKey||g.shiftKey||g.button!==void 0&&g.button!==0||o.target==="_blank")return Promise.resolve(!1);g.preventDefault();const R=r.$router[P===!0?"replace":"push"](w);return q===!0?R:R.then(()=>{}).catch(()=>{})}function S(g){if(f.value===!0){const q=w=>C(g,w);d("click",g,q),g.defaultPrevented!==!0&&q()}else d("click",g)}return{hasRouterLink:f,hasHrefLink:i,hasLink:k,linkTag:s,resolvedLink:y,linkIsActive:v,linkIsExactActive:p,linkClass:m,linkAttrs:$,getLink:_,navigateToRouterLink:C,navigateOnClick:S}}const re={none:0,xs:4,sm:8,md:16,lg:24,xl:32},ot={xs:8,sm:10,md:14,lg:20,xl:24},lt=["button","submit","reset"],at=/[^\s]\/[^\s]/,rt=["flat","outline","push","unelevated"];function Ce(e,n){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":n}function it(e){const n=Ce(e);return n!==void 0?{[n]:!0}:{}}const Se={...Q,...$e,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...rt.reduce((e,n)=>(e[n]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...Ye.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},ut={...Se,round:Boolean};function st(e){const n=U(e,ot),l=Xe(e),{hasRouterLink:o,hasLink:r,linkTag:d,linkAttrs:a,navigateOnClick:i}=Be({fallbackTag:"button"}),B=t.computed(()=>{const p=e.fab===!1&&e.fabMini===!1?n.value:{};return e.padding!==void 0?Object.assign({},p,{padding:e.padding.split(/\s+/).map(m=>m in re?re[m]+"px":m).join(" "),minWidth:"0",minHeight:"0"}):p}),y=t.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),f=t.computed(()=>e.disable!==!0&&e.loading!==!0),k=t.computed(()=>f.value===!0?e.tabindex||0:-1),s=t.computed(()=>Ce(e,"standard")),$=t.computed(()=>{const p={tabindex:k.value};return r.value===!0?Object.assign(p,a.value):lt.includes(e.type)===!0&&(p.type=e.type),d.value==="a"?(e.disable===!0?p["aria-disabled"]="true":p.href===void 0&&(p.role="button"),o.value!==!0&&at.test(e.type)===!0&&(p.type=e.type)):e.disable===!0&&(p.disabled="",p["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(p,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),p}),u=t.computed(()=>{let p;e.color!==void 0?e.flat===!0||e.outline===!0?p=`text-${e.textColor||e.color}`:p=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(p=`text-${e.textColor}`);const m=e.round===!0?"round":`rectangle${y.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${s.value} q-btn--${m}`+(p!==void 0?" "+p:"")+(f.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),v=t.computed(()=>l.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:u,style:B,innerClasses:v,attributes:$,hasLink:r,linkTag:d,navigateOnClick:i,isActionable:f}}const{passiveCapture:E}=V;let z=null,D=null,T=null;const qe=x({name:"QBtn",props:{...ut,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:n,emit:l}){const{proxy:o}=t.getCurrentInstance(),{classes:r,style:d,innerClasses:a,attributes:i,hasLink:B,linkTag:y,navigateOnClick:f,isActionable:k}=st(e),s=t.ref(null),$=t.ref(null);let u=null,v,p=null;const m=t.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),_=t.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:B.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),C=t.computed(()=>({center:e.round})),S=t.computed(()=>{const c=Math.max(0,Math.min(100,e.percentage));return c>0?{transition:"transform 0.6s",transform:`translateX(${c-100}%)`}:{}}),g=t.computed(()=>{if(e.loading===!0)return{onMousedown:I,onTouchstart:I,onClick:I,onKeydown:I,onKeyup:I};if(k.value===!0){const c={onClick:w,onKeydown:P,onMousedown:j};if(o.$q.platform.has.touch===!0){const h=e.onTouchstart!==void 0?"":"Passive";c[`onTouchstart${h}`]=R}return c}return{onClick:M}}),q=t.computed(()=>({ref:s,class:"q-btn q-btn-item non-selectable no-outline "+r.value,style:d.value,...i.value,...g.value}));function w(c){if(s.value!==null){if(c!==void 0){if(c.defaultPrevented===!0)return;const h=document.activeElement;if(e.type==="submit"&&h!==document.body&&s.value.contains(h)===!1&&h.contains(s.value)===!1){s.value.focus();const K=()=>{document.removeEventListener("keydown",M,!0),document.removeEventListener("keyup",K,E),s.value!==null&&s.value.removeEventListener("blur",K,E)};document.addEventListener("keydown",M,!0),document.addEventListener("keyup",K,E),s.value.addEventListener("blur",K,E)}}f(c)}}function P(c){s.value!==null&&(l("keydown",c),F(c,[13,32])===!0&&D!==s.value&&(D!==null&&O(),c.defaultPrevented!==!0&&(s.value.focus(),D=s.value,s.value.classList.add("q-btn--active"),document.addEventListener("keyup",L,!0),s.value.addEventListener("blur",L,E)),M(c)))}function R(c){s.value!==null&&(l("touchstart",c),c.defaultPrevented!==!0&&(z!==s.value&&(z!==null&&O(),z=s.value,u=c.target,u.addEventListener("touchcancel",L,E),u.addEventListener("touchend",L,E)),v=!0,p!==null&&clearTimeout(p),p=setTimeout(()=>{p=null,v=!1},200)))}function j(c){s.value!==null&&(c.qSkipRipple=v===!0,l("mousedown",c),c.defaultPrevented!==!0&&T!==s.value&&(T!==null&&O(),T=s.value,s.value.classList.add("q-btn--active"),document.addEventListener("mouseup",L,E)))}function L(c){if(s.value!==null&&!(c!==void 0&&c.type==="blur"&&document.activeElement===s.value)){if(c!==void 0&&c.type==="keyup"){if(D===s.value&&F(c,[13,32])===!0){const h=new MouseEvent("click",c);h.qKeyEvent=!0,c.defaultPrevented===!0&&me(h),c.cancelBubble===!0&&W(h),s.value.dispatchEvent(h),M(c),c.qKeyEvent=!0}l("keyup",c)}O()}}function O(c){const h=$.value;c!==!0&&(z===s.value||T===s.value)&&h!==null&&h!==document.activeElement&&(h.setAttribute("tabindex",-1),h.focus()),z===s.value&&(u!==null&&(u.removeEventListener("touchcancel",L,E),u.removeEventListener("touchend",L,E)),z=u=null),T===s.value&&(document.removeEventListener("mouseup",L,E),T=null),D===s.value&&(document.removeEventListener("keyup",L,!0),s.value!==null&&s.value.removeEventListener("blur",L,E),D=null),s.value!==null&&s.value.classList.remove("q-btn--active")}function I(c){M(c),c.qSkipRipple=!0}return t.onBeforeUnmount(()=>{O(!0)}),Object.assign(o,{click:c=>{k.value===!0&&w(c)}}),()=>{let c=[];e.icon!==void 0&&c.push(t.h(Y,{name:e.icon,left:e.stack!==!0&&m.value===!0,role:"img"})),m.value===!0&&c.push(t.h("span",{class:"block"},[e.label])),c=A(n.default,c),e.iconRight!==void 0&&e.round===!1&&c.push(t.h(Y,{name:e.iconRight,right:e.stack!==!0&&m.value===!0,role:"img"}));const h=[t.h("span",{class:"q-focus-helper",ref:$})];return e.loading===!0&&e.percentage!==void 0&&h.push(t.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[t.h("span",{class:"q-btn__progress-indicator fit block",style:S.value})])),h.push(t.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+a.value},c)),e.loading!==null&&h.push(t.h(t.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[t.h("span",{key:"loading",class:"absolute-full flex flex-center"},n.loading!==void 0?n.loading():[t.h(fe)])]:null)),t.withDirectives(t.h(y.value,q.value,h),[[ye,_.value,void 0,C.value]])}}}),ct=t.defineComponent({__name:"AppButton",props:{size:{default:b.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:X.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{},download:{}},emits:["click"],setup(e){const n=e,l=t.computed(()=>["app-btn",{"app-btn_default":!n.transparent&&!n.flat,"app-btn_trans":n.transparent,"app-btn_flat":n.flat,"app-btn_rounded":n.rounded,"app-btn_sm":n.size===b.SM,"app-btn_md":n.size===b.MD,"app-btn_lg":n.size===b.LG,"app-btn_icon-left":n.iconLeft,"app-btn_icon-right":n.iconRight,"app-btn_icon-middle":n.iconMiddle},`app-btn_${n.color}`]);return(o,r)=>(t.openBlock(),t.createBlock(t.unref(qe),{"no-caps":"",unelevated:"",class:t.normalizeClass(l.value),padding:t.unref(Le)[o.size||t.unref(b).MD],loading:o.loading,disable:o.disabled||void 0,to:o.to,href:o.href,target:o.target,type:o.submit?"submit":void 0,"aria-label":o.ariaLabel,download:o.download,onClick:r[0]||(r[0]=d=>o.$emit("click",d))},{default:t.withCtx(()=>[o.iconLeft||o.iconMiddle?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["icon-kl",o.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${o.iconLeft||o.iconMiddle}`,o.transparent||o.flat?`text-${o.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0),t.renderSlot(o.$slots,"default",{},void 0,!0),o.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.label),1)],64)):t.createCommentVNode("",!0),o.iconRight?(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${o.iconRight}`,o.transparent?`text-${o.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disable","to","href","target","type","aria-label","download"]))}}),N=(e,n)=>{const l=e.__vccOpts||e;for(const[o,r]of n)l[o]=r;return l},dt=N(ct,[["__scopeId","data-v-99788ad1"]]),ft={key:0,class:"app-toggle__label app-toggle__label_left"},pt={class:"app-toggle__container"},vt=["checked","disabled"],mt={class:"app-toggle__thumb"},gt={key:1,class:"app-toggle__label"},ht=t.defineComponent({__name:"AppToggle",props:{modelValue:{type:Boolean},size:{default:b.MD},label:{},disabled:{type:Boolean},color:{default:X.PRIMARY},iconColor:{},icon:{},iconActive:{},labelLeft:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,o=n,r=t.computed({get:()=>l.modelValue,set:a=>{o("update:modelValue",a)}}),d=t.computed(()=>["app-toggle",{"app-toggle_sm":l.size===b.SM,"app-toggle_md":l.size===b.MD,"app-toggle_lg":l.size===b.LG,"app-toggle_active":r.value,"app-toggle_disabled":l.disabled},`app-toggle_${l.color}`]);return(a,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(d.value)},[a.label&&a.labelLeft?(t.openBlock(),t.createElementBlock("span",ft,t.toDisplayString(a.label),1)):t.createCommentVNode("",!0),t.createElementVNode("label",pt,[t.createElementVNode("input",{type:"checkbox",checked:r.value,onChange:i[0]||(i[0]=B=>r.value=!r.value),disabled:a.disabled,class:"app-toggle__input"},null,40,vt),t.createElementVNode("span",{class:t.normalizeClass(["app-toggle__slider",r.value?`bg-${a.color}`:""])},[t.createElementVNode("span",mt,[a.icon&&!a.modelValue?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["icon-kl",`icon-kl-${a.icon}`,"app-toggle__icon"])},null,2)):t.createCommentVNode("",!0),a.modelValue&&(a.iconActive||a.icon)?(t.openBlock(),t.createElementBlock("i",{key:1,class:t.normalizeClass(["icon-kl",`icon-kl-${a.iconActive||a.icon}`,"app-toggle__icon",r.value?`text-${a.iconColor}`:""])},null,2)):t.createCommentVNode("",!0)])],2),t.renderSlot(a.$slots,"default",{},void 0,!0)]),a.label&&!a.labelLeft?(t.openBlock(),t.createElementBlock("span",gt,t.toDisplayString(a.label),1)):t.createCommentVNode("",!0)],2))}}),bt=N(ht,[["__scopeId","data-v-e0e56123"]]),yt=t.defineComponent({__name:"AppIcon",props:{name:{},size:{},color:{}},setup(e){return(n,l)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass(["icon-kl",`icon-kl-${n.name}`,n.color?`text-${n.color}`:""]),style:t.normalizeStyle(n.size?`font-size: ${n.size}`:void 0)},null,6))}}),kt=N(yt,[["__scopeId","data-v-941765ee"]]),Ee={dark:{type:Boolean,default:null}};function we(e,n){return t.computed(()=>e.dark===null?n.dark.isActive:e.dark)}const _t={xs:2,sm:4,md:6,lg:10,xl:14};function ie(e,n,l){return{transform:n===!0?`translateX(${l.lang.rtl===!0?"-":""}100%) scale3d(${-e},1,1)`:`scale3d(${e},1,1)`}}const $t=x({name:"QLinearProgress",props:{...Ee,...Q,value:{type:Number,default:0},buffer:Number,color:String,trackColor:String,reverse:Boolean,stripe:Boolean,indeterminate:Boolean,query:Boolean,rounded:Boolean,animationSpeed:{type:[String,Number],default:2100},instantFeedback:Boolean},setup(e,{slots:n}){const{proxy:l}=t.getCurrentInstance(),o=we(e,l.$q),r=U(e,_t),d=t.computed(()=>e.indeterminate===!0||e.query===!0),a=t.computed(()=>e.reverse!==e.query),i=t.computed(()=>({...r.value!==null?r.value:{},"--q-linear-progress-speed":`${e.animationSpeed}ms`})),B=t.computed(()=>"q-linear-progress"+(e.color!==void 0?` text-${e.color}`:"")+(e.reverse===!0||e.query===!0?" q-linear-progress--reverse":"")+(e.rounded===!0?" rounded-borders":"")),y=t.computed(()=>ie(e.buffer!==void 0?e.buffer:1,a.value,l.$q)),f=t.computed(()=>`with${e.instantFeedback===!0?"out":""}-transition`),k=t.computed(()=>`q-linear-progress__track absolute-full q-linear-progress__track--${f.value} q-linear-progress__track--${o.value===!0?"dark":"light"}`+(e.trackColor!==void 0?` bg-${e.trackColor}`:"")),s=t.computed(()=>ie(d.value===!0?1:e.value,a.value,l.$q)),$=t.computed(()=>`q-linear-progress__model absolute-full q-linear-progress__model--${f.value} q-linear-progress__model--${d.value===!0?"in":""}determinate`),u=t.computed(()=>({width:`${e.value*100}%`})),v=t.computed(()=>`q-linear-progress__stripe absolute-${e.reverse===!0?"right":"left"} q-linear-progress__stripe--${f.value}`);return()=>{const p=[t.h("div",{class:k.value,style:y.value}),t.h("div",{class:$.value,style:s.value})];return e.stripe===!0&&d.value===!1&&p.push(t.h("div",{class:v.value,style:u.value})),t.h("div",{class:B.value,style:i.value,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":e.indeterminate===!0?void 0:e.value},A(n.default,p))}}}),Bt={key:0,class:"code-field__label"},Ct={class:"code-field__inputs"},St=["onUpdate:modelValue","disabled","onInput","onKeydown","onPaste"],qt=t.defineComponent({__name:"AppCodeInput",props:{length:{default:5},size:{default:b.MD},label:{},disabled:{type:Boolean},loading:{type:Boolean},autofocus:{type:Boolean},color:{}},emits:["update:modelValue","completed"],setup(e,{expose:n,emit:l}){const o=e,r=l,d=t.ref(Array(o.length).fill("")),a=t.ref([]),i=t.computed(()=>["code-field",{"code-field_sm":o.size===b.SM,"code-field_md":o.size===b.MD,"code-field_lg":o.size===b.LG,"code-field_disabled":o.disabled||o.loading},`code-field_${o.color}`]),B=t.computed(()=>{let u="";return o.size==b.SM&&(u+=`width: ${o.length*26+(o.length-1)*5}px`),o.size==b.MD&&(u+=`width: ${o.length*32+(o.length-1)*8}px`),o.size==b.LG&&(u+=`width: ${o.length*44+(o.length-1)*10}px`),u}),y=(u,v)=>{var _;const m=u.target.value;if(m.length===1)v<o.length-1&&a.value&&((_=a.value[v+1])==null||_.focus());else if(m.length>1){const C=m.slice(0,o.length-v).split("");C.forEach((S,g)=>{d.value[v+g]=S}),t.nextTick(()=>{var S;a.value&&((S=a.value[Math.min(v+C.length,o.length-1)])==null||S.focus())})}},f=u=>{var v;d.value[u]===""&&a.value&&u>0&&((v=a.value[u-1])==null||v.focus())},k=(u,v)=>{var _;u.preventDefault();const p=((_=u.clipboardData)==null?void 0:_.getData("text"))??"";if(!p)return;const m=p.slice(0,o.length-v).split("");m.forEach((C,S)=>{d.value[v+S]=C}),t.nextTick(()=>{var C;a.value&&((C=a.value[Math.min(v+m.length,o.length-1)])==null||C.focus())})};t.watch(d,u=>{const v=u.join("");s(v)},{deep:!0});const s=u=>{r("update:modelValue",u),u.length===o.length&&!u.includes(" ")&&r("completed",u)},$=u=>{u&&(d.value=u.split("").slice(0,o.length))};return t.onMounted(()=>{o.autofocus&&a.value&&a.value[0]&&a.value[0].focus()}),n({injectCode:$}),(u,v)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.value),style:t.normalizeStyle(B.value)},[u.label?(t.openBlock(),t.createElementBlock("label",Bt,t.toDisplayString(u.label),1)):t.createCommentVNode("",!0),t.createElementVNode("div",Ct,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.length,(p,m)=>t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:m,"onUpdate:modelValue":_=>d.value[m]=_,ref_for:!0,ref_key:"inputRefs",ref:a,type:"text",maxlength:"1",class:"code-field__input",disabled:u.disabled||u.loading,onInput:_=>y(_,m),onKeydown:t.withKeys(_=>f(m),["backspace"]),onPaste:_=>k(_,m)},null,40,St)),[[t.vModelText,d.value[m]]])),128))]),u.loading?(t.openBlock(),t.createBlock($t,{key:1,indeterminate:"",rounded:"",color:u.color,class:"code-field__loading"},null,8,["color"])):t.createCommentVNode("",!0)],6))}}),Et=N(qt,[["__scopeId","data-v-44914130"]]),wt=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./AppButtonCopy-4GxKBcWx.cjs"))),Lt=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./AppSelect-Tg7_Uj55.cjs"))),Pt=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DropdownButton-DXQzSYcl.cjs")));exports.AppButton=dt;exports.AppButtonCopy=wt;exports.AppCodeInput=Et;exports.AppIcon=kt;exports.AppSelect=Lt;exports.AppToggle=bt;exports.COLORS=X;exports.DropdownButton=Pt;exports.QBtn=qe;exports.QIcon=Y;exports.QSpinner=fe;exports.Ripple=ye;exports.SIZES=b;exports._export_sfc=N;exports.addEvt=ge;exports.childHasFocus=Fe;exports.cleanEvt=he;exports.createComponent=x;exports.css=pe;exports.getBtnDesignAttr=it;exports.getElement=Ke;exports.getEventPath=Ue;exports.getParentProxy=We;exports.hDir=Ae;exports.hMergeSlot=A;exports.hMergeSlotSafely=Me;exports.hSlot=ue;exports.hUniqueSlot=Re;exports.isKeyCode=F;exports.listenOpts=V;exports.nonRoundBtnProps=Se;exports.noop=Qe;exports.position=ve;exports.prevent=me;exports.shouldIgnoreKey=be;exports.stop=W;exports.stopAndPrevent=M;exports.useDark=we;exports.useDarkProps=Ee;exports.useRouterLink=Be;exports.useRouterLinkProps=nt;exports.useSize=U;exports.useSizeProps=Q;exports.vmHasRouter=_e;exports.vmIsDestroyed=Ze;
|