@validol4ik/uikit 0.1.94 → 0.1.95
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/main.css +1 -1
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +1 -1
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.app-btn[data-v-
|
|
1
|
+
.app-btn[data-v-4c2b51f2] .q-btn__content{font-family:OpenSans,sans-serif;font-weight:600}.app-btn_sm[data-v-4c2b51f2]{font-size:12px;border-radius:7px}.app-btn_sm[data-v-4c2b51f2] .q-btn__content{line-height:20px}.app-btn_sm .icon-kl[data-v-4c2b51f2]{font-size:18px}.app-btn_sm.app-btn_icon-left[data-v-4c2b51f2]{padding-left:5px!important}.app-btn_sm.app-btn_icon-left .icon-kl_left[data-v-4c2b51f2]{margin-right:2px}.app-btn_sm.app-btn_icon-right[data-v-4c2b51f2]{padding-right:5px!important}.app-btn_sm.app-btn_icon-right .icon-kl_right[data-v-4c2b51f2]{margin-left:2px}.app-btn_sm.app-btn_icon-middle[data-v-4c2b51f2]{padding:4px!important}.app-btn_md[data-v-4c2b51f2]{font-size:14px;border-radius:8px}.app-btn_md[data-v-4c2b51f2] .q-btn__content{line-height:22px}.app-btn_md .icon-kl[data-v-4c2b51f2]{font-size:22px}.app-btn_md.app-btn_icon-left[data-v-4c2b51f2]{padding-left:9px!important}.app-btn_md.app-btn_icon-left .icon-kl_left[data-v-4c2b51f2]{margin-right:4px}.app-btn_md.app-btn_icon-right[data-v-4c2b51f2]{padding-right:9px!important}.app-btn_md.app-btn_icon-right .icon-kl_right[data-v-4c2b51f2]{margin-left:4px}.app-btn_md.app-btn_icon-middle[data-v-4c2b51f2]{padding:5px!important}.app-btn_lg[data-v-4c2b51f2]{font-size:17px;border-radius:10px}.app-btn_lg[data-v-4c2b51f2] .q-btn__content{line-height:26px}.app-btn_lg .icon-kl[data-v-4c2b51f2]{font-size:26px}.app-btn_lg.app-btn_icon-left[data-v-4c2b51f2]{padding-left:16px!important}.app-btn_lg.app-btn_icon-left .icon-kl_left[data-v-4c2b51f2]{margin-right:6px}.app-btn_lg.app-btn_icon-right[data-v-4c2b51f2]{padding-right:16px!important}.app-btn_lg.app-btn_icon-right .icon-kl_right[data-v-4c2b51f2]{margin-left:6px}.app-btn_lg.app-btn_icon-middle[data-v-4c2b51f2]{padding:11px!important}.app-btn_default.app-btn_primary[data-v-4c2b51f2]{background-color:#1a5cff;color:#fdfffc}.app-btn_default.app-btn_info[data-v-4c2b51f2]{background-color:#399;color:#fdfffc}.app-btn_default.app-btn_negative[data-v-4c2b51f2]{background-color:#ff4757;color:#fdfffc}.app-btn_default.app-btn_positive[data-v-4c2b51f2]{background-color:#46c93a;color:#fdfffc}.app-btn_trans.app-btn_primary[data-v-4c2b51f2]{background-color:#1a5cff26;color:#1a5cff}.app-btn_trans.app-btn_info[data-v-4c2b51f2]{background-color:#3993;color:#2e757c}.app-btn_trans.app-btn_negative[data-v-4c2b51f2]{background-color:#ff475733;color:#ff4757}.app-btn_trans.app-btn_positive[data-v-4c2b51f2]{background-color:#46c93a33;color:#46c93a}.app-btn_rounded[data-v-4c2b51f2]{border-radius:50px}.icon-kl[data-v-73419357]{font-size:24px}
|
package/dist/uikit.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),A={SM:"sm",MD:"md",LG:"lg"};var ne=(e=>(e.sm="3px 9px",e.md="5px 12px",e.lg="9px 20px",e))(ne||{});const de={PRIMARY:"primary",INFO:"info",NEGATIVE:"negative",POSITIVE:"positive"},V={xs:18,sm:24,md:32,lg:38,xl:46},ae={size:String};function re(e,t=V){return a.computed(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function Q(e){return a.markRaw(a.defineComponent(e))}function fe(e){return a.markRaw(e)}function ve(e,t){return e!==void 0&&e()||t}function j(e,t){return e!==void 0?t.concat(e()):t}const U="0 0 24 24",Y=e=>e,K=e=>`ionicons ${e}`,oe={"mdi-":e=>`mdi ${e}`,"icon-":Y,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":K,"ion-ios":K,"ion-logo":K,"iconfont ":Y,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},ie={o_:"-outlined",r_:"-round",s_:"-sharp"},le={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},me=new RegExp("^("+Object.keys(oe).join("|")+")"),ge=new RegExp("^("+Object.keys(ie).join("|")+")"),G=new RegExp("^("+Object.keys(le).join("|")+")"),pe=/^[Mm]\s?[-+]?\.?\d/,he=/^img:/,be=/^svguse:/,ye=/^ion-/,ke=/^(fa-(sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,H=Q({name:"QIcon",props:{...ae,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:r}}=a.getCurrentInstance(),n=re(e),i=a.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),d=a.computed(()=>{let c,l=e.name;if(l==="none"||!l)return{none:!0};if(r.iconMapFn!==null){const s=r.iconMapFn(l);if(s!==void 0)if(s.icon!==void 0){if(l=s.icon,l==="none"||!l)return{none:!0}}else return{cls:s.cls,content:s.content!==void 0?s.content:" "}}if(pe.test(l)===!0){const[s,h=U]=l.split("|");return{svg:!0,viewBox:h,nodes:s.split("&&").map(u=>{const[b,g,y]=u.split("@@");return a.h("path",{style:g,d:b,transform:y})})}}if(he.test(l)===!0)return{img:!0,src:l.substring(4)};if(be.test(l)===!0){const[s,h=U]=l.split("|");return{svguse:!0,src:s.substring(7),viewBox:h}}let $=" ";const p=l.match(me);if(p!==null)c=oe[p[1]](l);else if(ke.test(l)===!0)c=l;else if(ye.test(l)===!0)c=`ionicons ion-${r.platform.is.ios===!0?"ios":"md"}${l.substring(3)}`;else if(G.test(l)===!0){c="notranslate material-symbols";const s=l.match(G);s!==null&&(l=l.substring(6),c+=le[s[1]]),$=l}else{c="notranslate material-icons";const s=l.match(ge);s!==null&&(l=l.substring(2),c+=ie[s[1]]),$=l}return{cls:c,content:$}});return()=>{const c={class:i.value,style:n.value,"aria-hidden":"true",role:"presentation"};return d.value.none===!0?a.h(e.tag,c,ve(t.default)):d.value.img===!0?a.h(e.tag,c,j(t.default,[a.h("img",{src:d.value.src})])):d.value.svg===!0?a.h(e.tag,c,j(t.default,[a.h("svg",{viewBox:d.value.viewBox||"0 0 24 24"},d.value.nodes)])):d.value.svguse===!0?a.h(e.tag,c,j(t.default,[a.h("svg",{viewBox:d.value.viewBox},[a.h("use",{"xlink:href":d.value.src})])])):(d.value.cls!==void 0&&(c.class+=" "+d.value.cls),a.h(e.tag,c,j(t.default,[d.value.content])))}}}),$e={size:{type:[String,Number],default:"1em"},color:String};function Ee(e){return{cSize:a.computed(()=>e.size in V?`${V[e.size]}px`:e.size),classes:a.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const qe=Q({name:"QSpinner",props:{...$e,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:r}=Ee(e);return()=>a.h("svg",{class:r.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[a.h("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function Ce(e,t){const r=e.style;for(const n in t)r[n]=t[n]}const D={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(D,{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 _e(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){e.stopPropagation()}function Le(e){e.cancelable!==!1&&e.preventDefault()}function w(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Se(e,t,r){const n=`__q_${t}_evt`;e[n]=e[n]!==void 0?e[n].concat(r):r,r.forEach(i=>{i[0].addEventListener(i[1],e[i[2]],D[i[3]])})}function Re(e,t){const r=`__q_${t}_evt`;e[r]!==void 0&&(e[r].forEach(n=>{n[0].removeEventListener(n[1],e[n[2]],D[n[3]])}),e[r]=void 0)}function xe(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function F(e,t){return xe(e)===!0?!1:[].concat(t).includes(e.keyCode)}function Be(e,t=250){let r=!1,n;return function(){return r===!1&&(r=!0,setTimeout(()=>{r=!1},t),n=e.apply(this,arguments)),n}}function W(e,t,r,n){r.modifiers.stop===!0&&ue(e);const i=r.modifiers.color;let d=r.modifiers.center;d=d===!0||n===!0;const c=document.createElement("span"),l=document.createElement("span"),$=_e(e),{left:p,top:s,width:h,height:u}=t.getBoundingClientRect(),b=Math.sqrt(h*h+u*u),g=b/2,y=`${(h-b)/2}px`,f=d?y:`${$.left-p-g}px`,k=`${(u-b)/2}px`,B=d?k:`${$.top-s-g}px`;l.className="q-ripple__inner",Ce(l,{height:`${b}px`,width:`${b}px`,transform:`translate3d(${f},${B},0) scale3d(.2,.2,1)`,opacity:0}),c.className=`q-ripple${i?" text-"+i:""}`,c.setAttribute("dir","ltr"),c.appendChild(l),t.appendChild(c);const R=()=>{c.remove(),clearTimeout(x)};r.abort.push(R);let x=setTimeout(()=>{l.classList.add("q-ripple__inner--enter"),l.style.transform=`translate3d(${y},${k},0) scale3d(1,1,1)`,l.style.opacity=.2,x=setTimeout(()=>{l.classList.remove("q-ripple__inner--enter"),l.classList.add("q-ripple__inner--leave"),l.style.opacity=0,x=setTimeout(()=>{c.remove(),r.abort.splice(r.abort.indexOf(R),1)},275)},250)},50)}function X(e,{modifiers:t,value:r,arg:n}){const i=Object.assign({},e.cfg.ripple,t,r);e.modifiers={early:i.early===!0,stop:i.stop===!0,center:i.center===!0,color:i.color||n,keyCodes:[].concat(i.keyCodes||13)}}const we=fe({name:"ripple",beforeMount(e,t){const r=t.instance.$.appContext.config.globalProperties.$q.config||{};if(r.ripple===!1)return;const n={cfg:r,enabled:t.value!==!1,modifiers:{},abort:[],start(i){n.enabled===!0&&i.qSkipRipple!==!0&&i.type===(n.modifiers.early===!0?"pointerdown":"click")&&W(i,e,n,i.qKeyEvent===!0)},keystart:Be(i=>{n.enabled===!0&&i.qSkipRipple!==!0&&F(i,n.modifiers.keyCodes)===!0&&i.type===`key${n.modifiers.early===!0?"down":"up"}`&&W(i,e,n,!0)},300)};X(n,t),e.__qripple=n,Se(n,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const r=e.__qripple;r!==void 0&&(r.enabled=t.value!==!1,r.enabled===!0&&Object(t.value)===t.value&&X(r,t))}},beforeUnmount(e){const t=e.__qripple;t!==void 0&&(t.abort.forEach(r=>{r()}),Re(t,"main"),delete e._qripple)}}),se={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Pe=Object.keys(se),Te={align:{type:String,validator:e=>Pe.includes(e)}};function Me(e){return a.computed(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${se[t]}`})}function Oe(e){return e.appContext.config.globalProperties.$router!==void 0}function Z(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function J(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ze(e,t){for(const r in t){const n=t[r],i=e[r];if(typeof n=="string"){if(n!==i)return!1}else if(Array.isArray(i)===!1||i.length!==n.length||n.some((d,c)=>d!==i[c]))return!1}return!0}function ee(e,t){return Array.isArray(t)===!0?e.length===t.length&&e.every((r,n)=>r===t[n]):e.length===1&&e[0]===t}function Ae(e,t){return Array.isArray(e)===!0?ee(e,t):Array.isArray(t)===!0?ee(t,e):e===t}function je(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(Ae(e[r],t[r])===!1)return!1;return!0}const Ie={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean};function Ne({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const r=a.getCurrentInstance(),{props:n,proxy:i,emit:d}=r,c=Oe(r),l=a.computed(()=>n.disable!==!0&&n.href!==void 0),$=t===!0?a.computed(()=>c===!0&&n.disable!==!0&&l.value!==!0&&n.to!==void 0&&n.to!==null&&n.to!==""):a.computed(()=>c===!0&&l.value!==!0&&n.to!==void 0&&n.to!==null&&n.to!==""),p=a.computed(()=>$.value===!0?B(n.to):null),s=a.computed(()=>p.value!==null),h=a.computed(()=>l.value===!0||s.value===!0),u=a.computed(()=>n.type==="a"||h.value===!0?"a":n.tag||e||"div"),b=a.computed(()=>l.value===!0?{href:n.href,target:n.target}:s.value===!0?{href:p.value.href,target:n.target}:{}),g=a.computed(()=>{if(s.value===!1)return-1;const{matched:v}=p.value,{length:E}=v,C=v[E-1];if(C===void 0)return-1;const L=i.$route.matched;if(L.length===0)return-1;const S=L.findIndex(J.bind(null,C));if(S!==-1)return S;const I=Z(v[E-2]);return E>1&&Z(C)===I&&L[L.length-1].path!==I?L.findIndex(J.bind(null,v[E-2])):S}),y=a.computed(()=>s.value===!0&&g.value!==-1&&ze(i.$route.params,p.value.params)),f=a.computed(()=>y.value===!0&&g.value===i.$route.matched.length-1&&je(i.$route.params,p.value.params)),k=a.computed(()=>s.value===!0?f.value===!0?` ${n.exactActiveClass} ${n.activeClass}`:n.exact===!0?"":y.value===!0?` ${n.activeClass}`:"":"");function B(v){try{return i.$router.resolve(v)}catch{}return null}function R(v,{returnRouterError:E,to:C=n.to,replace:L=n.replace}={}){if(n.disable===!0)return v.preventDefault(),Promise.resolve(!1);if(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey||v.button!==void 0&&v.button!==0||n.target==="_blank")return Promise.resolve(!1);v.preventDefault();const S=i.$router[L===!0?"replace":"push"](C);return E===!0?S:S.then(()=>{}).catch(()=>{})}function x(v){if(s.value===!0){const E=C=>R(v,C);d("click",v,E),v.defaultPrevented!==!0&&E()}else d("click",v)}return{hasRouterLink:s,hasHrefLink:l,hasLink:h,linkTag:u,resolvedLink:p,linkIsActive:y,linkIsExactActive:f,linkClass:k,linkAttrs:b,getLink:B,navigateToRouterLink:R,navigateOnClick:x}}const te={none:0,xs:4,sm:8,md:16,lg:24,xl:32},De={xs:8,sm:10,md:14,lg:20,xl:24},Ke=["button","submit","reset"],Ve=/[^\s]\/[^\s]/,Fe=["flat","outline","push","unelevated"];function Qe(e,t){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":t}const Ue={...ae,...Ie,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...Fe.reduce((e,t)=>(e[t]=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:{...Te.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Ye={...Ue,round:Boolean};function Ge(e){const t=re(e,De),r=Me(e),{hasRouterLink:n,hasLink:i,linkTag:d,linkAttrs:c,navigateOnClick:l}=Ne({fallbackTag:"button"}),$=a.computed(()=>{const f=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},f,{padding:e.padding.split(/\s+/).map(k=>k in te?te[k]+"px":k).join(" "),minWidth:"0",minHeight:"0"}):f}),p=a.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),s=a.computed(()=>e.disable!==!0&&e.loading!==!0),h=a.computed(()=>s.value===!0?e.tabindex||0:-1),u=a.computed(()=>Qe(e,"standard")),b=a.computed(()=>{const f={tabindex:h.value};return i.value===!0?Object.assign(f,c.value):Ke.includes(e.type)===!0&&(f.type=e.type),d.value==="a"?(e.disable===!0?f["aria-disabled"]="true":f.href===void 0&&(f.role="button"),n.value!==!0&&Ve.test(e.type)===!0&&(f.type=e.type)):e.disable===!0&&(f.disabled="",f["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(f,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),f}),g=a.computed(()=>{let f;e.color!==void 0?e.flat===!0||e.outline===!0?f=`text-${e.textColor||e.color}`:f=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(f=`text-${e.textColor}`);const k=e.round===!0?"round":`rectangle${p.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${u.value} q-btn--${k}`+(f!==void 0?" "+f:"")+(s.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":"")}),y=a.computed(()=>r.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:g,style:$,innerClasses:y,attributes:b,hasLink:i,linkTag:d,navigateOnClick:l,isActionable:s}}const{passiveCapture:q}=D;let P=null,T=null,M=null;const He=Q({name:"QBtn",props:{...Ye,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:t,emit:r}){const{proxy:n}=a.getCurrentInstance(),{classes:i,style:d,innerClasses:c,attributes:l,hasLink:$,linkTag:p,navigateOnClick:s,isActionable:h}=Ge(e),u=a.ref(null),b=a.ref(null);let g=null,y,f=null;const k=a.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),B=a.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:$.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),R=a.computed(()=>({center:e.round})),x=a.computed(()=>{const o=Math.max(0,Math.min(100,e.percentage));return o>0?{transition:"transform 0.6s",transform:`translateX(${o-100}%)`}:{}}),v=a.computed(()=>{if(e.loading===!0)return{onMousedown:z,onTouchstart:z,onClick:z,onKeydown:z,onKeyup:z};if(h.value===!0){const o={onClick:C,onKeydown:L,onMousedown:I};if(n.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";o[`onTouchstart${m}`]=S}return o}return{onClick:w}}),E=a.computed(()=>({ref:u,class:"q-btn q-btn-item non-selectable no-outline "+i.value,style:d.value,...l.value,...v.value}));function C(o){if(u.value!==null){if(o!==void 0){if(o.defaultPrevented===!0)return;const m=document.activeElement;if(e.type==="submit"&&m!==document.body&&u.value.contains(m)===!1&&m.contains(u.value)===!1){u.value.focus();const N=()=>{document.removeEventListener("keydown",w,!0),document.removeEventListener("keyup",N,q),u.value!==null&&u.value.removeEventListener("blur",N,q)};document.addEventListener("keydown",w,!0),document.addEventListener("keyup",N,q),u.value.addEventListener("blur",N,q)}}s(o)}}function L(o){u.value!==null&&(r("keydown",o),F(o,[13,32])===!0&&T!==u.value&&(T!==null&&O(),o.defaultPrevented!==!0&&(u.value.focus(),T=u.value,u.value.classList.add("q-btn--active"),document.addEventListener("keyup",_,!0),u.value.addEventListener("blur",_,q)),w(o)))}function S(o){u.value!==null&&(r("touchstart",o),o.defaultPrevented!==!0&&(P!==u.value&&(P!==null&&O(),P=u.value,g=o.target,g.addEventListener("touchcancel",_,q),g.addEventListener("touchend",_,q)),y=!0,f!==null&&clearTimeout(f),f=setTimeout(()=>{f=null,y=!1},200)))}function I(o){u.value!==null&&(o.qSkipRipple=y===!0,r("mousedown",o),o.defaultPrevented!==!0&&M!==u.value&&(M!==null&&O(),M=u.value,u.value.classList.add("q-btn--active"),document.addEventListener("mouseup",_,q)))}function _(o){if(u.value!==null&&!(o!==void 0&&o.type==="blur"&&document.activeElement===u.value)){if(o!==void 0&&o.type==="keyup"){if(T===u.value&&F(o,[13,32])===!0){const m=new MouseEvent("click",o);m.qKeyEvent=!0,o.defaultPrevented===!0&&Le(m),o.cancelBubble===!0&&ue(m),u.value.dispatchEvent(m),w(o),o.qKeyEvent=!0}r("keyup",o)}O()}}function O(o){const m=b.value;o!==!0&&(P===u.value||M===u.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex",-1),m.focus()),P===u.value&&(g!==null&&(g.removeEventListener("touchcancel",_,q),g.removeEventListener("touchend",_,q)),P=g=null),M===u.value&&(document.removeEventListener("mouseup",_,q),M=null),T===u.value&&(document.removeEventListener("keyup",_,!0),u.value!==null&&u.value.removeEventListener("blur",_,q),T=null),u.value!==null&&u.value.classList.remove("q-btn--active")}function z(o){w(o),o.qSkipRipple=!0}return a.onBeforeUnmount(()=>{O(!0)}),Object.assign(n,{click:o=>{h.value===!0&&C(o)}}),()=>{let o=[];e.icon!==void 0&&o.push(a.h(H,{name:e.icon,left:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"})),k.value===!0&&o.push(a.h("span",{class:"block"},[e.label])),o=j(t.default,o),e.iconRight!==void 0&&e.round===!1&&o.push(a.h(H,{name:e.iconRight,right:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"}));const m=[a.h("span",{class:"q-focus-helper",ref:b})];return e.loading===!0&&e.percentage!==void 0&&m.push(a.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[a.h("span",{class:"q-btn__progress-indicator fit block",style:x.value})])),m.push(a.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+c.value},o)),e.loading!==null&&m.push(a.h(a.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[a.h("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[a.h(qe)])]:null)),a.withDirectives(a.h(p.value,E.value,m),[[we,B.value,void 0,R.value]])}}}),We=a.defineComponent({__name:"index",props:{size:{default:A.MD},transparent:{type:Boolean},rounded:{type:Boolean},color:{default:de.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:[Boolean,null]},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{}},emits:["click"],setup(e){const t=e,r=a.computed(()=>["app-btn",{"app-btn_default":!t.transparent,"app-btn_trans":t.transparent,"app-btn_rounded":t.rounded,"app-btn_sm":t.size===A.SM,"app-btn_md":t.size===A.MD,"app-btn_lg":t.size===A.LG,"app-btn_icon-left":t.iconLeft,"app-btn_icon-right":t.iconRight,"app-btn_icon-middle":t.iconMiddle},`app-btn_${t.color}`]);return(n,i)=>(a.openBlock(),a.createBlock(a.unref(He),{"no-caps":"",unelevated:"",class:a.normalizeClass(r.value),padding:a.unref(ne)[t.size||a.unref(A).MD],loading:n.loading,disabled:n.disabled||void 0,to:n.to,href:n.href,target:n.target,type:n.submit?"submit":void 0,"aria-label":n.ariaLabel,onClick:i[0]||(i[0]=d=>n.$emit("click",d))},{default:a.withCtx(()=>[n.iconLeft||n.iconMiddle?(a.openBlock(),a.createElementBlock("i",{key:0,class:a.normalizeClass(["icon-kl",n.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${n.iconLeft||n.iconMiddle}`,n.transparent?`text-${n.color}`:"text-secondary"])},null,2)):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"default",{},void 0,!0),n.iconRight?(a.openBlock(),a.createElementBlock("i",{key:1,class:a.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${n.iconRight}`,n.transparent?`text-${n.color}`:"text-secondary"])},null,2)):a.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disabled","to","href","target","type","aria-label"]))}}),ce=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},Xe=ce(We,[["__scopeId","data-v-e1a8f029"]]),Ze=a.defineComponent({__name:"index",props:{name:{},size:{},color:{}},setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("i",{class:a.normalizeClass(["icon-kl",`icon-kl-${t.name}`,t.color?`text-${t.color}`:""]),style:a.normalizeStyle(t.size?`font-size: ${t.size}`:void 0)},null,6))}}),Je=ce(Ze,[["__scopeId","data-v-73419357"]]);exports.AppButton=Xe;exports.AppIcon=Je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),A={SM:"sm",MD:"md",LG:"lg"};var ne=(e=>(e.sm="3px 9px",e.md="5px 12px",e.lg="9px 20px",e))(ne||{});const de={PRIMARY:"primary",INFO:"info",NEGATIVE:"negative",POSITIVE:"positive"},V={xs:18,sm:24,md:32,lg:38,xl:46},ae={size:String};function re(e,t=V){return a.computed(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function Q(e){return a.markRaw(a.defineComponent(e))}function fe(e){return a.markRaw(e)}function ve(e,t){return e!==void 0&&e()||t}function j(e,t){return e!==void 0?t.concat(e()):t}const U="0 0 24 24",Y=e=>e,K=e=>`ionicons ${e}`,oe={"mdi-":e=>`mdi ${e}`,"icon-":Y,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":K,"ion-ios":K,"ion-logo":K,"iconfont ":Y,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},ie={o_:"-outlined",r_:"-round",s_:"-sharp"},le={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},me=new RegExp("^("+Object.keys(oe).join("|")+")"),ge=new RegExp("^("+Object.keys(ie).join("|")+")"),G=new RegExp("^("+Object.keys(le).join("|")+")"),pe=/^[Mm]\s?[-+]?\.?\d/,he=/^img:/,be=/^svguse:/,ye=/^ion-/,ke=/^(fa-(sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,H=Q({name:"QIcon",props:{...ae,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:r}}=a.getCurrentInstance(),n=re(e),i=a.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),d=a.computed(()=>{let c,l=e.name;if(l==="none"||!l)return{none:!0};if(r.iconMapFn!==null){const s=r.iconMapFn(l);if(s!==void 0)if(s.icon!==void 0){if(l=s.icon,l==="none"||!l)return{none:!0}}else return{cls:s.cls,content:s.content!==void 0?s.content:" "}}if(pe.test(l)===!0){const[s,h=U]=l.split("|");return{svg:!0,viewBox:h,nodes:s.split("&&").map(u=>{const[b,g,y]=u.split("@@");return a.h("path",{style:g,d:b,transform:y})})}}if(he.test(l)===!0)return{img:!0,src:l.substring(4)};if(be.test(l)===!0){const[s,h=U]=l.split("|");return{svguse:!0,src:s.substring(7),viewBox:h}}let $=" ";const p=l.match(me);if(p!==null)c=oe[p[1]](l);else if(ke.test(l)===!0)c=l;else if(ye.test(l)===!0)c=`ionicons ion-${r.platform.is.ios===!0?"ios":"md"}${l.substring(3)}`;else if(G.test(l)===!0){c="notranslate material-symbols";const s=l.match(G);s!==null&&(l=l.substring(6),c+=le[s[1]]),$=l}else{c="notranslate material-icons";const s=l.match(ge);s!==null&&(l=l.substring(2),c+=ie[s[1]]),$=l}return{cls:c,content:$}});return()=>{const c={class:i.value,style:n.value,"aria-hidden":"true",role:"presentation"};return d.value.none===!0?a.h(e.tag,c,ve(t.default)):d.value.img===!0?a.h(e.tag,c,j(t.default,[a.h("img",{src:d.value.src})])):d.value.svg===!0?a.h(e.tag,c,j(t.default,[a.h("svg",{viewBox:d.value.viewBox||"0 0 24 24"},d.value.nodes)])):d.value.svguse===!0?a.h(e.tag,c,j(t.default,[a.h("svg",{viewBox:d.value.viewBox},[a.h("use",{"xlink:href":d.value.src})])])):(d.value.cls!==void 0&&(c.class+=" "+d.value.cls),a.h(e.tag,c,j(t.default,[d.value.content])))}}}),$e={size:{type:[String,Number],default:"1em"},color:String};function Ee(e){return{cSize:a.computed(()=>e.size in V?`${V[e.size]}px`:e.size),classes:a.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const qe=Q({name:"QSpinner",props:{...$e,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:r}=Ee(e);return()=>a.h("svg",{class:r.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[a.h("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function Ce(e,t){const r=e.style;for(const n in t)r[n]=t[n]}const D={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(D,{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 _e(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){e.stopPropagation()}function Le(e){e.cancelable!==!1&&e.preventDefault()}function w(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Se(e,t,r){const n=`__q_${t}_evt`;e[n]=e[n]!==void 0?e[n].concat(r):r,r.forEach(i=>{i[0].addEventListener(i[1],e[i[2]],D[i[3]])})}function Re(e,t){const r=`__q_${t}_evt`;e[r]!==void 0&&(e[r].forEach(n=>{n[0].removeEventListener(n[1],e[n[2]],D[n[3]])}),e[r]=void 0)}function xe(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function F(e,t){return xe(e)===!0?!1:[].concat(t).includes(e.keyCode)}function Be(e,t=250){let r=!1,n;return function(){return r===!1&&(r=!0,setTimeout(()=>{r=!1},t),n=e.apply(this,arguments)),n}}function W(e,t,r,n){r.modifiers.stop===!0&&ue(e);const i=r.modifiers.color;let d=r.modifiers.center;d=d===!0||n===!0;const c=document.createElement("span"),l=document.createElement("span"),$=_e(e),{left:p,top:s,width:h,height:u}=t.getBoundingClientRect(),b=Math.sqrt(h*h+u*u),g=b/2,y=`${(h-b)/2}px`,f=d?y:`${$.left-p-g}px`,k=`${(u-b)/2}px`,B=d?k:`${$.top-s-g}px`;l.className="q-ripple__inner",Ce(l,{height:`${b}px`,width:`${b}px`,transform:`translate3d(${f},${B},0) scale3d(.2,.2,1)`,opacity:0}),c.className=`q-ripple${i?" text-"+i:""}`,c.setAttribute("dir","ltr"),c.appendChild(l),t.appendChild(c);const R=()=>{c.remove(),clearTimeout(x)};r.abort.push(R);let x=setTimeout(()=>{l.classList.add("q-ripple__inner--enter"),l.style.transform=`translate3d(${y},${k},0) scale3d(1,1,1)`,l.style.opacity=.2,x=setTimeout(()=>{l.classList.remove("q-ripple__inner--enter"),l.classList.add("q-ripple__inner--leave"),l.style.opacity=0,x=setTimeout(()=>{c.remove(),r.abort.splice(r.abort.indexOf(R),1)},275)},250)},50)}function X(e,{modifiers:t,value:r,arg:n}){const i=Object.assign({},e.cfg.ripple,t,r);e.modifiers={early:i.early===!0,stop:i.stop===!0,center:i.center===!0,color:i.color||n,keyCodes:[].concat(i.keyCodes||13)}}const we=fe({name:"ripple",beforeMount(e,t){const r=t.instance.$.appContext.config.globalProperties.$q.config||{};if(r.ripple===!1)return;const n={cfg:r,enabled:t.value!==!1,modifiers:{},abort:[],start(i){n.enabled===!0&&i.qSkipRipple!==!0&&i.type===(n.modifiers.early===!0?"pointerdown":"click")&&W(i,e,n,i.qKeyEvent===!0)},keystart:Be(i=>{n.enabled===!0&&i.qSkipRipple!==!0&&F(i,n.modifiers.keyCodes)===!0&&i.type===`key${n.modifiers.early===!0?"down":"up"}`&&W(i,e,n,!0)},300)};X(n,t),e.__qripple=n,Se(n,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const r=e.__qripple;r!==void 0&&(r.enabled=t.value!==!1,r.enabled===!0&&Object(t.value)===t.value&&X(r,t))}},beforeUnmount(e){const t=e.__qripple;t!==void 0&&(t.abort.forEach(r=>{r()}),Re(t,"main"),delete e._qripple)}}),se={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Pe=Object.keys(se),Te={align:{type:String,validator:e=>Pe.includes(e)}};function Me(e){return a.computed(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${se[t]}`})}function Oe(e){return e.appContext.config.globalProperties.$router!==void 0}function Z(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function J(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ze(e,t){for(const r in t){const n=t[r],i=e[r];if(typeof n=="string"){if(n!==i)return!1}else if(Array.isArray(i)===!1||i.length!==n.length||n.some((d,c)=>d!==i[c]))return!1}return!0}function ee(e,t){return Array.isArray(t)===!0?e.length===t.length&&e.every((r,n)=>r===t[n]):e.length===1&&e[0]===t}function Ae(e,t){return Array.isArray(e)===!0?ee(e,t):Array.isArray(t)===!0?ee(t,e):e===t}function je(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(Ae(e[r],t[r])===!1)return!1;return!0}const Ie={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean};function Ne({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const r=a.getCurrentInstance(),{props:n,proxy:i,emit:d}=r,c=Oe(r),l=a.computed(()=>n.disable!==!0&&n.href!==void 0),$=t===!0?a.computed(()=>c===!0&&n.disable!==!0&&l.value!==!0&&n.to!==void 0&&n.to!==null&&n.to!==""):a.computed(()=>c===!0&&l.value!==!0&&n.to!==void 0&&n.to!==null&&n.to!==""),p=a.computed(()=>$.value===!0?B(n.to):null),s=a.computed(()=>p.value!==null),h=a.computed(()=>l.value===!0||s.value===!0),u=a.computed(()=>n.type==="a"||h.value===!0?"a":n.tag||e||"div"),b=a.computed(()=>l.value===!0?{href:n.href,target:n.target}:s.value===!0?{href:p.value.href,target:n.target}:{}),g=a.computed(()=>{if(s.value===!1)return-1;const{matched:v}=p.value,{length:E}=v,C=v[E-1];if(C===void 0)return-1;const L=i.$route.matched;if(L.length===0)return-1;const S=L.findIndex(J.bind(null,C));if(S!==-1)return S;const I=Z(v[E-2]);return E>1&&Z(C)===I&&L[L.length-1].path!==I?L.findIndex(J.bind(null,v[E-2])):S}),y=a.computed(()=>s.value===!0&&g.value!==-1&&ze(i.$route.params,p.value.params)),f=a.computed(()=>y.value===!0&&g.value===i.$route.matched.length-1&&je(i.$route.params,p.value.params)),k=a.computed(()=>s.value===!0?f.value===!0?` ${n.exactActiveClass} ${n.activeClass}`:n.exact===!0?"":y.value===!0?` ${n.activeClass}`:"":"");function B(v){try{return i.$router.resolve(v)}catch{}return null}function R(v,{returnRouterError:E,to:C=n.to,replace:L=n.replace}={}){if(n.disable===!0)return v.preventDefault(),Promise.resolve(!1);if(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey||v.button!==void 0&&v.button!==0||n.target==="_blank")return Promise.resolve(!1);v.preventDefault();const S=i.$router[L===!0?"replace":"push"](C);return E===!0?S:S.then(()=>{}).catch(()=>{})}function x(v){if(s.value===!0){const E=C=>R(v,C);d("click",v,E),v.defaultPrevented!==!0&&E()}else d("click",v)}return{hasRouterLink:s,hasHrefLink:l,hasLink:h,linkTag:u,resolvedLink:p,linkIsActive:y,linkIsExactActive:f,linkClass:k,linkAttrs:b,getLink:B,navigateToRouterLink:R,navigateOnClick:x}}const te={none:0,xs:4,sm:8,md:16,lg:24,xl:32},De={xs:8,sm:10,md:14,lg:20,xl:24},Ke=["button","submit","reset"],Ve=/[^\s]\/[^\s]/,Fe=["flat","outline","push","unelevated"];function Qe(e,t){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":t}const Ue={...ae,...Ie,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...Fe.reduce((e,t)=>(e[t]=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:{...Te.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Ye={...Ue,round:Boolean};function Ge(e){const t=re(e,De),r=Me(e),{hasRouterLink:n,hasLink:i,linkTag:d,linkAttrs:c,navigateOnClick:l}=Ne({fallbackTag:"button"}),$=a.computed(()=>{const f=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},f,{padding:e.padding.split(/\s+/).map(k=>k in te?te[k]+"px":k).join(" "),minWidth:"0",minHeight:"0"}):f}),p=a.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),s=a.computed(()=>e.disable!==!0&&e.loading!==!0),h=a.computed(()=>s.value===!0?e.tabindex||0:-1),u=a.computed(()=>Qe(e,"standard")),b=a.computed(()=>{const f={tabindex:h.value};return i.value===!0?Object.assign(f,c.value):Ke.includes(e.type)===!0&&(f.type=e.type),d.value==="a"?(e.disable===!0?f["aria-disabled"]="true":f.href===void 0&&(f.role="button"),n.value!==!0&&Ve.test(e.type)===!0&&(f.type=e.type)):e.disable===!0&&(f.disabled="",f["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(f,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),f}),g=a.computed(()=>{let f;e.color!==void 0?e.flat===!0||e.outline===!0?f=`text-${e.textColor||e.color}`:f=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(f=`text-${e.textColor}`);const k=e.round===!0?"round":`rectangle${p.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${u.value} q-btn--${k}`+(f!==void 0?" "+f:"")+(s.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":"")}),y=a.computed(()=>r.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:g,style:$,innerClasses:y,attributes:b,hasLink:i,linkTag:d,navigateOnClick:l,isActionable:s}}const{passiveCapture:q}=D;let P=null,T=null,M=null;const He=Q({name:"QBtn",props:{...Ye,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:t,emit:r}){const{proxy:n}=a.getCurrentInstance(),{classes:i,style:d,innerClasses:c,attributes:l,hasLink:$,linkTag:p,navigateOnClick:s,isActionable:h}=Ge(e),u=a.ref(null),b=a.ref(null);let g=null,y,f=null;const k=a.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),B=a.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:$.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),R=a.computed(()=>({center:e.round})),x=a.computed(()=>{const o=Math.max(0,Math.min(100,e.percentage));return o>0?{transition:"transform 0.6s",transform:`translateX(${o-100}%)`}:{}}),v=a.computed(()=>{if(e.loading===!0)return{onMousedown:z,onTouchstart:z,onClick:z,onKeydown:z,onKeyup:z};if(h.value===!0){const o={onClick:C,onKeydown:L,onMousedown:I};if(n.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";o[`onTouchstart${m}`]=S}return o}return{onClick:w}}),E=a.computed(()=>({ref:u,class:"q-btn q-btn-item non-selectable no-outline "+i.value,style:d.value,...l.value,...v.value}));function C(o){if(u.value!==null){if(o!==void 0){if(o.defaultPrevented===!0)return;const m=document.activeElement;if(e.type==="submit"&&m!==document.body&&u.value.contains(m)===!1&&m.contains(u.value)===!1){u.value.focus();const N=()=>{document.removeEventListener("keydown",w,!0),document.removeEventListener("keyup",N,q),u.value!==null&&u.value.removeEventListener("blur",N,q)};document.addEventListener("keydown",w,!0),document.addEventListener("keyup",N,q),u.value.addEventListener("blur",N,q)}}s(o)}}function L(o){u.value!==null&&(r("keydown",o),F(o,[13,32])===!0&&T!==u.value&&(T!==null&&O(),o.defaultPrevented!==!0&&(u.value.focus(),T=u.value,u.value.classList.add("q-btn--active"),document.addEventListener("keyup",_,!0),u.value.addEventListener("blur",_,q)),w(o)))}function S(o){u.value!==null&&(r("touchstart",o),o.defaultPrevented!==!0&&(P!==u.value&&(P!==null&&O(),P=u.value,g=o.target,g.addEventListener("touchcancel",_,q),g.addEventListener("touchend",_,q)),y=!0,f!==null&&clearTimeout(f),f=setTimeout(()=>{f=null,y=!1},200)))}function I(o){u.value!==null&&(o.qSkipRipple=y===!0,r("mousedown",o),o.defaultPrevented!==!0&&M!==u.value&&(M!==null&&O(),M=u.value,u.value.classList.add("q-btn--active"),document.addEventListener("mouseup",_,q)))}function _(o){if(u.value!==null&&!(o!==void 0&&o.type==="blur"&&document.activeElement===u.value)){if(o!==void 0&&o.type==="keyup"){if(T===u.value&&F(o,[13,32])===!0){const m=new MouseEvent("click",o);m.qKeyEvent=!0,o.defaultPrevented===!0&&Le(m),o.cancelBubble===!0&&ue(m),u.value.dispatchEvent(m),w(o),o.qKeyEvent=!0}r("keyup",o)}O()}}function O(o){const m=b.value;o!==!0&&(P===u.value||M===u.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex",-1),m.focus()),P===u.value&&(g!==null&&(g.removeEventListener("touchcancel",_,q),g.removeEventListener("touchend",_,q)),P=g=null),M===u.value&&(document.removeEventListener("mouseup",_,q),M=null),T===u.value&&(document.removeEventListener("keyup",_,!0),u.value!==null&&u.value.removeEventListener("blur",_,q),T=null),u.value!==null&&u.value.classList.remove("q-btn--active")}function z(o){w(o),o.qSkipRipple=!0}return a.onBeforeUnmount(()=>{O(!0)}),Object.assign(n,{click:o=>{h.value===!0&&C(o)}}),()=>{let o=[];e.icon!==void 0&&o.push(a.h(H,{name:e.icon,left:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"})),k.value===!0&&o.push(a.h("span",{class:"block"},[e.label])),o=j(t.default,o),e.iconRight!==void 0&&e.round===!1&&o.push(a.h(H,{name:e.iconRight,right:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"}));const m=[a.h("span",{class:"q-focus-helper",ref:b})];return e.loading===!0&&e.percentage!==void 0&&m.push(a.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[a.h("span",{class:"q-btn__progress-indicator fit block",style:x.value})])),m.push(a.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+c.value},o)),e.loading!==null&&m.push(a.h(a.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[a.h("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[a.h(qe)])]:null)),a.withDirectives(a.h(p.value,E.value,m),[[we,B.value,void 0,R.value]])}}}),We=a.defineComponent({__name:"index",props:{size:{default:A.MD},transparent:{type:Boolean},rounded:{type:Boolean},color:{default:de.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:[Boolean,null]},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{}},emits:["click"],setup(e){const t=e,r=a.computed(()=>["app-btn",{"app-btn_default":!t.transparent,"app-btn_trans":t.transparent,"app-btn_rounded":t.rounded,"app-btn_sm":t.size===A.SM,"app-btn_md":t.size===A.MD,"app-btn_lg":t.size===A.LG,"app-btn_icon-left":t.iconLeft,"app-btn_icon-right":t.iconRight,"app-btn_icon-middle":t.iconMiddle},`app-btn_${t.color}`]);return(n,i)=>(a.openBlock(),a.createBlock(a.unref(He),{"no-caps":"",unelevated:"",class:a.normalizeClass(r.value),padding:a.unref(ne)[t.size||a.unref(A).MD],loading:n.loading,disabled:n.disabled||void 0,to:n.to,href:n.href,target:n.target,type:n.submit?"submit":void 0,"aria-label":n.ariaLabel,onClick:i[0]||(i[0]=d=>n.$emit("click",d))},{default:a.withCtx(()=>[n.iconLeft||n.iconMiddle?(a.openBlock(),a.createElementBlock("i",{key:0,class:a.normalizeClass(["icon-kl",n.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${n.iconLeft||n.iconMiddle}`,n.transparent?`text-${n.color}`:"text-secondary"])},null,2)):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"default",{},void 0,!0),n.iconRight?(a.openBlock(),a.createElementBlock("i",{key:1,class:a.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${n.iconRight}`,n.transparent?`text-${n.color}`:"text-secondary"])},null,2)):a.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disabled","to","href","target","type","aria-label"]))}}),ce=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},Xe=ce(We,[["__scopeId","data-v-4c2b51f2"]]),Ze=a.defineComponent({__name:"index",props:{name:{},size:{},color:{}},setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("i",{class:a.normalizeClass(["icon-kl",`icon-kl-${t.name}`,t.color?`text-${t.color}`:""]),style:a.normalizeStyle(t.size?`font-size: ${t.size}`:void 0)},null,6))}}),Je=ce(Ze,[["__scopeId","data-v-73419357"]]);exports.AppButton=Xe;exports.AppIcon=Je;
|
package/dist/uikit.es.js
CHANGED
|
@@ -845,7 +845,7 @@ const ft = Z({
|
|
|
845
845
|
for (const [n, i] of t)
|
|
846
846
|
a[n] = i;
|
|
847
847
|
return a;
|
|
848
|
-
}, pt = /* @__PURE__ */ ke(vt, [["__scopeId", "data-v-
|
|
848
|
+
}, pt = /* @__PURE__ */ ke(vt, [["__scopeId", "data-v-4c2b51f2"]]), gt = /* @__PURE__ */ W({
|
|
849
849
|
__name: "index",
|
|
850
850
|
props: {
|
|
851
851
|
name: {},
|