@validol4ik/uikit 0.2.15 → 0.2.16
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/{index-CdLuzkL-.cjs → index-B9ZSbRrQ.cjs} +1 -1
- package/dist/{index-CP6XJzcc.js → index-BVIDc3Sg.js} +2 -2
- package/dist/{index-BNQAD-xn.js → index-CVoafFTm.js} +1 -1
- package/dist/{index-BjSdqqY9.cjs → index-CwmnOiuC.cjs} +1 -1
- package/dist/index.css +1 -1
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";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 ae={PRIMARY:"primary",INFO:"info",NEGATIVE:"negative",POSITIVE:"positive"},V={xs:18,sm:24,md:32,lg:38,xl:46},re={size:String};function oe(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}`,ie={"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}`},ue={o_:"-outlined",r_:"-round",s_:"-sharp"},le={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},me=new RegExp("^("+Object.keys(ie).join("|")+")"),pe=new RegExp("^("+Object.keys(ue).join("|")+")"),G=new RegExp("^("+Object.keys(le).join("|")+")"),ge=/^[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:{...re,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:r}}=a.getCurrentInstance(),n=oe(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,u=e.name;if(u==="none"||!u)return{none:!0};if(r.iconMapFn!==null){const s=r.iconMapFn(u);if(s!==void 0)if(s.icon!==void 0){if(u=s.icon,u==="none"||!u)return{none:!0}}else return{cls:s.cls,content:s.content!==void 0?s.content:" "}}if(ge.test(u)===!0){const[s,h=U]=u.split("|");return{svg:!0,viewBox:h,nodes:s.split("&&").map(l=>{const[b,p,y]=l.split("@@");return a.h("path",{style:p,d:b,transform:y})})}}if(he.test(u)===!0)return{img:!0,src:u.substring(4)};if(be.test(u)===!0){const[s,h=U]=u.split("|");return{svguse:!0,src:s.substring(7),viewBox:h}}let $=" ";const g=u.match(me);if(g!==null)c=ie[g[1]](u);else if(ke.test(u)===!0)c=u;else if(ye.test(u)===!0)c=`ionicons ion-${r.platform.is.ios===!0?"ios":"md"}${u.substring(3)}`;else if(G.test(u)===!0){c="notranslate material-symbols";const s=u.match(G);s!==null&&(u=u.substring(6),c+=le[s[1]]),$=u}else{c="notranslate material-icons";const s=u.match(pe);s!==null&&(u=u.substring(2),c+=ue[s[1]]),$=u}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 qe(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 Ce=Q({name:"QSpinner",props:{...$e,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:r}=qe(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 Ee(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 se(e){e.stopPropagation()}function Be(e){e.cancelable!==!1&&e.preventDefault()}function w(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Le(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 Se(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function F(e,t){return Se(e)===!0?!1:[].concat(t).includes(e.keyCode)}function xe(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&&se(e);const i=r.modifiers.color;let d=r.modifiers.center;d=d===!0||n===!0;const c=document.createElement("span"),u=document.createElement("span"),$=_e(e),{left:g,top:s,width:h,height:l}=t.getBoundingClientRect(),b=Math.sqrt(h*h+l*l),p=b/2,y=`${(h-b)/2}px`,f=d?y:`${$.left-g-p}px`,k=`${(l-b)/2}px`,x=d?k:`${$.top-s-p}px`;u.className="q-ripple__inner",Ee(u,{height:`${b}px`,width:`${b}px`,transform:`translate3d(${f},${x},0) scale3d(.2,.2,1)`,opacity:0}),c.className=`q-ripple${i?" text-"+i:""}`,c.setAttribute("dir","ltr"),c.appendChild(u),t.appendChild(c);const R=()=>{c.remove(),clearTimeout(S)};r.abort.push(R);let S=setTimeout(()=>{u.classList.add("q-ripple__inner--enter"),u.style.transform=`translate3d(${y},${k},0) scale3d(1,1,1)`,u.style.opacity=.2,S=setTimeout(()=>{u.classList.remove("q-ripple__inner--enter"),u.classList.add("q-ripple__inner--leave"),u.style.opacity=0,S=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:xe(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,Le(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)}}),ce={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Pe=Object.keys(ce),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"}-${ce[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),u=a.computed(()=>n.disable!==!0&&n.href!==void 0),$=t===!0?a.computed(()=>c===!0&&n.disable!==!0&&u.value!==!0&&n.to!==void 0&&n.to!==null&&n.to!==""):a.computed(()=>c===!0&&u.value!==!0&&n.to!==void 0&&n.to!==null&&n.to!==""),g=a.computed(()=>$.value===!0?x(n.to):null),s=a.computed(()=>g.value!==null),h=a.computed(()=>u.value===!0||s.value===!0),l=a.computed(()=>n.type==="a"||h.value===!0?"a":n.tag||e||"div"),b=a.computed(()=>u.value===!0?{href:n.href,target:n.target}:s.value===!0?{href:g.value.href,target:n.target}:{}),p=a.computed(()=>{if(s.value===!1)return-1;const{matched:v}=g.value,{length:q}=v,E=v[q-1];if(E===void 0)return-1;const B=i.$route.matched;if(B.length===0)return-1;const L=B.findIndex(J.bind(null,E));if(L!==-1)return L;const I=Z(v[q-2]);return q>1&&Z(E)===I&&B[B.length-1].path!==I?B.findIndex(J.bind(null,v[q-2])):L}),y=a.computed(()=>s.value===!0&&p.value!==-1&&ze(i.$route.params,g.value.params)),f=a.computed(()=>y.value===!0&&p.value===i.$route.matched.length-1&&je(i.$route.params,g.value.params)),k=a.computed(()=>s.value===!0?f.value===!0?` ${n.exactActiveClass} ${n.activeClass}`:n.exact===!0?"":y.value===!0?` ${n.activeClass}`:"":"");function x(v){try{return i.$router.resolve(v)}catch{}return null}function R(v,{returnRouterError:q,to:E=n.to,replace:B=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 L=i.$router[B===!0?"replace":"push"](E);return q===!0?L:L.then(()=>{}).catch(()=>{})}function S(v){if(s.value===!0){const q=E=>R(v,E);d("click",v,q),v.defaultPrevented!==!0&&q()}else d("click",v)}return{hasRouterLink:s,hasHrefLink:u,hasLink:h,linkTag:l,resolvedLink:g,linkIsActive:y,linkIsExactActive:f,linkClass:k,linkAttrs:b,getLink:x,navigateToRouterLink:R,navigateOnClick:S}}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={...re,...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=oe(e,De),r=Me(e),{hasRouterLink:n,hasLink:i,linkTag:d,linkAttrs:c,navigateOnClick:u}=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}),g=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),l=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}),p=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${g.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${l.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:p,style:$,innerClasses:y,attributes:b,hasLink:i,linkTag:d,navigateOnClick:u,isActionable:s}}const{passiveCapture:C}=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:u,hasLink:$,linkTag:g,navigateOnClick:s,isActionable:h}=Ge(e),l=a.ref(null),b=a.ref(null);let p=null,y,f=null;const k=a.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),x=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})),S=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:E,onKeydown:B,onMousedown:I};if(n.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";o[`onTouchstart${m}`]=L}return o}return{onClick:w}}),q=a.computed(()=>({ref:l,class:"q-btn q-btn-item non-selectable no-outline "+i.value,style:d.value,...u.value,...v.value}));function E(o){if(l.value!==null){if(o!==void 0){if(o.defaultPrevented===!0)return;const m=document.activeElement;if(e.type==="submit"&&m!==document.body&&l.value.contains(m)===!1&&m.contains(l.value)===!1){l.value.focus();const N=()=>{document.removeEventListener("keydown",w,!0),document.removeEventListener("keyup",N,C),l.value!==null&&l.value.removeEventListener("blur",N,C)};document.addEventListener("keydown",w,!0),document.addEventListener("keyup",N,C),l.value.addEventListener("blur",N,C)}}s(o)}}function B(o){l.value!==null&&(r("keydown",o),F(o,[13,32])===!0&&T!==l.value&&(T!==null&&O(),o.defaultPrevented!==!0&&(l.value.focus(),T=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("keyup",_,!0),l.value.addEventListener("blur",_,C)),w(o)))}function L(o){l.value!==null&&(r("touchstart",o),o.defaultPrevented!==!0&&(P!==l.value&&(P!==null&&O(),P=l.value,p=o.target,p.addEventListener("touchcancel",_,C),p.addEventListener("touchend",_,C)),y=!0,f!==null&&clearTimeout(f),f=setTimeout(()=>{f=null,y=!1},200)))}function I(o){l.value!==null&&(o.qSkipRipple=y===!0,r("mousedown",o),o.defaultPrevented!==!0&&M!==l.value&&(M!==null&&O(),M=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("mouseup",_,C)))}function _(o){if(l.value!==null&&!(o!==void 0&&o.type==="blur"&&document.activeElement===l.value)){if(o!==void 0&&o.type==="keyup"){if(T===l.value&&F(o,[13,32])===!0){const m=new MouseEvent("click",o);m.qKeyEvent=!0,o.defaultPrevented===!0&&Be(m),o.cancelBubble===!0&&se(m),l.value.dispatchEvent(m),w(o),o.qKeyEvent=!0}r("keyup",o)}O()}}function O(o){const m=b.value;o!==!0&&(P===l.value||M===l.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex",-1),m.focus()),P===l.value&&(p!==null&&(p.removeEventListener("touchcancel",_,C),p.removeEventListener("touchend",_,C)),P=p=null),M===l.value&&(document.removeEventListener("mouseup",_,C),M=null),T===l.value&&(document.removeEventListener("keyup",_,!0),l.value!==null&&l.value.removeEventListener("blur",_,C),T=null),l.value!==null&&l.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&&E(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:S.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(Ce)])]:null)),a.withDirectives(a.h(g.value,q.value,m),[[we,x.value,void 0,R.value]])}}}),We=a.defineComponent({__name:"index",props:{size:{default:A.MD},transparent:{type:Boolean},rounded:{type:Boolean},color:{default:ae.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"]))}}),de=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},Xe=de(We,[["__scopeId","data-v-5b3b0602"]]),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=de(Ze,[["__scopeId","data-v-73419357"]]),et=a.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BjSdqqY9.cjs")));exports.AppButton=Xe;exports.AppButtonCopy=et;exports.COLORS=ae;exports.index=Je;
|
|
1
|
+
"use strict";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 ae={PRIMARY:"primary",INFO:"info",NEGATIVE:"negative",POSITIVE:"positive"},V={xs:18,sm:24,md:32,lg:38,xl:46},re={size:String};function oe(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}`,ie={"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}`},ue={o_:"-outlined",r_:"-round",s_:"-sharp"},le={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},me=new RegExp("^("+Object.keys(ie).join("|")+")"),pe=new RegExp("^("+Object.keys(ue).join("|")+")"),G=new RegExp("^("+Object.keys(le).join("|")+")"),ge=/^[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:{...re,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:r}}=a.getCurrentInstance(),n=oe(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,u=e.name;if(u==="none"||!u)return{none:!0};if(r.iconMapFn!==null){const s=r.iconMapFn(u);if(s!==void 0)if(s.icon!==void 0){if(u=s.icon,u==="none"||!u)return{none:!0}}else return{cls:s.cls,content:s.content!==void 0?s.content:" "}}if(ge.test(u)===!0){const[s,h=U]=u.split("|");return{svg:!0,viewBox:h,nodes:s.split("&&").map(l=>{const[b,p,y]=l.split("@@");return a.h("path",{style:p,d:b,transform:y})})}}if(he.test(u)===!0)return{img:!0,src:u.substring(4)};if(be.test(u)===!0){const[s,h=U]=u.split("|");return{svguse:!0,src:s.substring(7),viewBox:h}}let $=" ";const g=u.match(me);if(g!==null)c=ie[g[1]](u);else if(ke.test(u)===!0)c=u;else if(ye.test(u)===!0)c=`ionicons ion-${r.platform.is.ios===!0?"ios":"md"}${u.substring(3)}`;else if(G.test(u)===!0){c="notranslate material-symbols";const s=u.match(G);s!==null&&(u=u.substring(6),c+=le[s[1]]),$=u}else{c="notranslate material-icons";const s=u.match(pe);s!==null&&(u=u.substring(2),c+=ue[s[1]]),$=u}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 qe(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 Ce=Q({name:"QSpinner",props:{...$e,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:r}=qe(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 Ee(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 se(e){e.stopPropagation()}function Be(e){e.cancelable!==!1&&e.preventDefault()}function w(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Le(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 Se(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function F(e,t){return Se(e)===!0?!1:[].concat(t).includes(e.keyCode)}function xe(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&&se(e);const i=r.modifiers.color;let d=r.modifiers.center;d=d===!0||n===!0;const c=document.createElement("span"),u=document.createElement("span"),$=_e(e),{left:g,top:s,width:h,height:l}=t.getBoundingClientRect(),b=Math.sqrt(h*h+l*l),p=b/2,y=`${(h-b)/2}px`,f=d?y:`${$.left-g-p}px`,k=`${(l-b)/2}px`,x=d?k:`${$.top-s-p}px`;u.className="q-ripple__inner",Ee(u,{height:`${b}px`,width:`${b}px`,transform:`translate3d(${f},${x},0) scale3d(.2,.2,1)`,opacity:0}),c.className=`q-ripple${i?" text-"+i:""}`,c.setAttribute("dir","ltr"),c.appendChild(u),t.appendChild(c);const R=()=>{c.remove(),clearTimeout(S)};r.abort.push(R);let S=setTimeout(()=>{u.classList.add("q-ripple__inner--enter"),u.style.transform=`translate3d(${y},${k},0) scale3d(1,1,1)`,u.style.opacity=.2,S=setTimeout(()=>{u.classList.remove("q-ripple__inner--enter"),u.classList.add("q-ripple__inner--leave"),u.style.opacity=0,S=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:xe(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,Le(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)}}),ce={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Pe=Object.keys(ce),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"}-${ce[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),u=a.computed(()=>n.disable!==!0&&n.href!==void 0),$=t===!0?a.computed(()=>c===!0&&n.disable!==!0&&u.value!==!0&&n.to!==void 0&&n.to!==null&&n.to!==""):a.computed(()=>c===!0&&u.value!==!0&&n.to!==void 0&&n.to!==null&&n.to!==""),g=a.computed(()=>$.value===!0?x(n.to):null),s=a.computed(()=>g.value!==null),h=a.computed(()=>u.value===!0||s.value===!0),l=a.computed(()=>n.type==="a"||h.value===!0?"a":n.tag||e||"div"),b=a.computed(()=>u.value===!0?{href:n.href,target:n.target}:s.value===!0?{href:g.value.href,target:n.target}:{}),p=a.computed(()=>{if(s.value===!1)return-1;const{matched:v}=g.value,{length:q}=v,E=v[q-1];if(E===void 0)return-1;const B=i.$route.matched;if(B.length===0)return-1;const L=B.findIndex(J.bind(null,E));if(L!==-1)return L;const I=Z(v[q-2]);return q>1&&Z(E)===I&&B[B.length-1].path!==I?B.findIndex(J.bind(null,v[q-2])):L}),y=a.computed(()=>s.value===!0&&p.value!==-1&&ze(i.$route.params,g.value.params)),f=a.computed(()=>y.value===!0&&p.value===i.$route.matched.length-1&&je(i.$route.params,g.value.params)),k=a.computed(()=>s.value===!0?f.value===!0?` ${n.exactActiveClass} ${n.activeClass}`:n.exact===!0?"":y.value===!0?` ${n.activeClass}`:"":"");function x(v){try{return i.$router.resolve(v)}catch{}return null}function R(v,{returnRouterError:q,to:E=n.to,replace:B=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 L=i.$router[B===!0?"replace":"push"](E);return q===!0?L:L.then(()=>{}).catch(()=>{})}function S(v){if(s.value===!0){const q=E=>R(v,E);d("click",v,q),v.defaultPrevented!==!0&&q()}else d("click",v)}return{hasRouterLink:s,hasHrefLink:u,hasLink:h,linkTag:l,resolvedLink:g,linkIsActive:y,linkIsExactActive:f,linkClass:k,linkAttrs:b,getLink:x,navigateToRouterLink:R,navigateOnClick:S}}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={...re,...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=oe(e,De),r=Me(e),{hasRouterLink:n,hasLink:i,linkTag:d,linkAttrs:c,navigateOnClick:u}=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}),g=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),l=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}),p=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${g.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${l.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:p,style:$,innerClasses:y,attributes:b,hasLink:i,linkTag:d,navigateOnClick:u,isActionable:s}}const{passiveCapture:C}=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:u,hasLink:$,linkTag:g,navigateOnClick:s,isActionable:h}=Ge(e),l=a.ref(null),b=a.ref(null);let p=null,y,f=null;const k=a.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),x=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})),S=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:E,onKeydown:B,onMousedown:I};if(n.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";o[`onTouchstart${m}`]=L}return o}return{onClick:w}}),q=a.computed(()=>({ref:l,class:"q-btn q-btn-item non-selectable no-outline "+i.value,style:d.value,...u.value,...v.value}));function E(o){if(l.value!==null){if(o!==void 0){if(o.defaultPrevented===!0)return;const m=document.activeElement;if(e.type==="submit"&&m!==document.body&&l.value.contains(m)===!1&&m.contains(l.value)===!1){l.value.focus();const N=()=>{document.removeEventListener("keydown",w,!0),document.removeEventListener("keyup",N,C),l.value!==null&&l.value.removeEventListener("blur",N,C)};document.addEventListener("keydown",w,!0),document.addEventListener("keyup",N,C),l.value.addEventListener("blur",N,C)}}s(o)}}function B(o){l.value!==null&&(r("keydown",o),F(o,[13,32])===!0&&T!==l.value&&(T!==null&&O(),o.defaultPrevented!==!0&&(l.value.focus(),T=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("keyup",_,!0),l.value.addEventListener("blur",_,C)),w(o)))}function L(o){l.value!==null&&(r("touchstart",o),o.defaultPrevented!==!0&&(P!==l.value&&(P!==null&&O(),P=l.value,p=o.target,p.addEventListener("touchcancel",_,C),p.addEventListener("touchend",_,C)),y=!0,f!==null&&clearTimeout(f),f=setTimeout(()=>{f=null,y=!1},200)))}function I(o){l.value!==null&&(o.qSkipRipple=y===!0,r("mousedown",o),o.defaultPrevented!==!0&&M!==l.value&&(M!==null&&O(),M=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("mouseup",_,C)))}function _(o){if(l.value!==null&&!(o!==void 0&&o.type==="blur"&&document.activeElement===l.value)){if(o!==void 0&&o.type==="keyup"){if(T===l.value&&F(o,[13,32])===!0){const m=new MouseEvent("click",o);m.qKeyEvent=!0,o.defaultPrevented===!0&&Be(m),o.cancelBubble===!0&&se(m),l.value.dispatchEvent(m),w(o),o.qKeyEvent=!0}r("keyup",o)}O()}}function O(o){const m=b.value;o!==!0&&(P===l.value||M===l.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex",-1),m.focus()),P===l.value&&(p!==null&&(p.removeEventListener("touchcancel",_,C),p.removeEventListener("touchend",_,C)),P=p=null),M===l.value&&(document.removeEventListener("mouseup",_,C),M=null),T===l.value&&(document.removeEventListener("keyup",_,!0),l.value!==null&&l.value.removeEventListener("blur",_,C),T=null),l.value!==null&&l.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&&E(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:S.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(Ce)])]:null)),a.withDirectives(a.h(g.value,q.value,m),[[we,x.value,void 0,R.value]])}}}),We=a.defineComponent({__name:"index",props:{size:{default:A.MD},transparent:{type:Boolean},rounded:{type:Boolean},color:{default:ae.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"]))}}),de=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},Xe=de(We,[["__scopeId","data-v-16e02783"]]),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=de(Ze,[["__scopeId","data-v-73419357"]]),et=a.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CwmnOiuC.cjs")));exports.AppButton=Xe;exports.AppButtonCopy=et;exports.COLORS=ae;exports.index=Je;
|
|
@@ -845,7 +845,7 @@ const vt = Z({
|
|
|
845
845
|
for (const [n, i] of t)
|
|
846
846
|
a[n] = i;
|
|
847
847
|
return a;
|
|
848
|
-
}, ht = /* @__PURE__ */ ke(mt, [["__scopeId", "data-v-
|
|
848
|
+
}, ht = /* @__PURE__ */ ke(mt, [["__scopeId", "data-v-16e02783"]]), gt = /* @__PURE__ */ W({
|
|
849
849
|
__name: "index",
|
|
850
850
|
props: {
|
|
851
851
|
name: {},
|
|
@@ -859,7 +859,7 @@ const vt = Z({
|
|
|
859
859
|
}, null, 6));
|
|
860
860
|
}
|
|
861
861
|
}), bt = /* @__PURE__ */ ke(gt, [["__scopeId", "data-v-73419357"]]), yt = Re(
|
|
862
|
-
() => import("./index-
|
|
862
|
+
() => import("./index-CVoafFTm.js")
|
|
863
863
|
);
|
|
864
864
|
export {
|
|
865
865
|
ht as A,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as w, reactive as v, defineComponent as h, openBlock as x, createBlock as k, unref as y, mergeProps as g, withModifiers as O } from "vue";
|
|
2
|
-
import { C, A as P } from "./index-
|
|
2
|
+
import { C, A as P } from "./index-BVIDc3Sg.js";
|
|
3
3
|
function M(o, i, r, t) {
|
|
4
4
|
return Object.defineProperty(o, i, {
|
|
5
5
|
get: r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),p=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),p=require("./index-B9ZSbRrQ.cjs");function h(o,i,r,t){return Object.defineProperty(o,i,{get:r,set:t,enumerable:!0}),o}const s=n.ref(!1);let f;function x(o,i){const r=/(edg|edge|edga|edgios)\/([\w.]+)/.exec(o)||/(opr)[\/]([\w.]+)/.exec(o)||/(vivaldi)[\/]([\w.]+)/.exec(o)||/(chrome|crios)[\/]([\w.]+)/.exec(o)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(o)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(o)||/(firefox|fxios)[\/]([\w.]+)/.exec(o)||/(webkit)[\/]([\w.]+)/.exec(o)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(o)||[];return{browser:r[5]||r[3]||r[1]||"",version:r[4]||r[2]||"0",platform:i[0]||""}}function k(o){return/(ipad)/.exec(o)||/(ipod)/.exec(o)||/(windows phone)/.exec(o)||/(iphone)/.exec(o)||/(kindle)/.exec(o)||/(silk)/.exec(o)||/(android)/.exec(o)||/(win)/.exec(o)||/(mac)/.exec(o)||/(linux)/.exec(o)||/(cros)/.exec(o)||/(playbook)/.exec(o)||/(bb)/.exec(o)||/(blackberry)/.exec(o)||[]}const m="ontouchstart"in window||window.navigator.maxTouchPoints>0;function y(o){const i=o.toLowerCase(),r=k(i),t=x(i,r),e={};t.browser&&(e[t.browser]=!0,e.version=t.version,e.versionNumber=parseInt(t.version,10)),t.platform&&(e[t.platform]=!0);const c=e.android||e.ios||e.bb||e.blackberry||e.ipad||e.iphone||e.ipod||e.kindle||e.playbook||e.silk||e["windows phone"];if(c===!0||i.indexOf("mobile")!==-1?e.mobile=!0:e.desktop=!0,e["windows phone"]&&(e.winphone=!0,delete e["windows phone"]),e.edga||e.edgios||e.edg?(e.edge=!0,t.browser="edge"):e.crios?(e.chrome=!0,t.browser="chrome"):e.fxios&&(e.firefox=!0,t.browser="firefox"),(e.ipod||e.ipad||e.iphone)&&(e.ios=!0),e.vivaldi&&(t.browser="vivaldi",e.vivaldi=!0),(e.chrome||e.opr||e.safari||e.vivaldi||e.mobile===!0&&e.ios!==!0&&c!==!0)&&(e.webkit=!0),e.opr&&(t.browser="opera",e.opera=!0),e.safari&&(e.blackberry||e.bb?(t.browser="blackberry",e.blackberry=!0):e.playbook?(t.browser="playbook",e.playbook=!0):e.android?(t.browser="android",e.android=!0):e.kindle?(t.browser="kindle",e.kindle=!0):e.silk&&(t.browser="silk",e.silk=!0)),e.name=t.browser,e.platform=t.platform,i.indexOf("electron")!==-1)e.electron=!0;else if(document.location.href.indexOf("-extension://")!==-1)e.bex=!0;else{if(window.Capacitor!==void 0?(e.capacitor=!0,e.nativeMobile=!0,e.nativeMobileWrapper="capacitor"):(window._cordovaNative!==void 0||window.cordova!==void 0)&&(e.cordova=!0,e.nativeMobile=!0,e.nativeMobileWrapper="cordova"),s.value===!0&&(f={is:{...e}}),m===!0&&e.mac===!0&&(e.desktop===!0&&e.safari===!0||e.nativeMobile===!0&&e.android!==!0&&e.ios!==!0&&e.ipad!==!0)){delete e.mac,delete e.desktop;const d=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(e,{mobile:!0,ios:!0,platform:d,[d]:!0})}e.mobile!==!0&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete e.desktop,e.mobile=!0)}return e}const w=navigator.userAgent||navigator.vendor||window.opera,g={has:{touch:!1,webStorage:!1},within:{iframe:!1}},l={userAgent:w,is:y(w),has:{touch:m},within:{iframe:window.self!==window.top}},b={install(o){const{$q:i}=o;s.value===!0?(o.onSSRHydrated.push(()=>{Object.assign(i.platform,l),s.value=!1}),i.platform=n.reactive(this)):i.platform=this}};{let o;h(l.has,"webStorage",()=>{if(o!==void 0)return o;try{if(window.localStorage)return o=!0,!0}catch{}return o=!1,!1}),Object.assign(b,l),s.value===!0&&(Object.assign(b,f,g),f=null)}const a=[];function v(o){a[a.length-1](o)}function O(o){l.is.desktop===!0&&(a.push(o),a.length===1&&document.body.addEventListener("focusin",v))}function C(o){const i=a.indexOf(o);i!==-1&&(a.splice(i,1),a.length===0&&document.body.removeEventListener("focusin",v))}function P(o){const i=document.createElement("textarea");i.value=o,i.contentEditable="true",i.style.position="fixed";const r=()=>{};O(r),document.body.appendChild(i),i.focus(),i.select();const t=document.execCommand("copy");return i.remove(),C(r),t}function M(o){return navigator.clipboard!==void 0?navigator.clipboard.writeText(o):new Promise((i,r)=>{const t=P(o);t?i(!0):r(t)})}const u={COPY:"copy_o",COPIED:"copied_o"},S=n.defineComponent({__name:"index",props:{text:{},size:{},transparent:{type:Boolean,default:!0},rounded:{type:Boolean},color:{default:p.COLORS.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:[Boolean,null]},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{}},setup(o){const i=o,r=n.ref(u.COPY),t=()=>{r.value=u.COPIED,setTimeout(()=>{r.value=u.COPY},2e3)},e=()=>{M(i.text).then(t).catch(c=>{console.log(c)})};return(c,d)=>(n.openBlock(),n.createBlock(n.unref(p.AppButton),n.mergeProps(i,{"icon-middle":r.value,onClick:n.withModifiers(e,["prevent"])}),null,16,["icon-middle"]))}});exports.default=S;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.app-btn[data-v-
|
|
1
|
+
.app-btn[data-v-16e02783] .q-btn__content{font-family:OpenSans,sans-serif;font-weight:600}.app-btn_sm[data-v-16e02783]{font-size:12px;border-radius:7px}.app-btn_sm[data-v-16e02783] .q-btn__content{line-height:20px}.app-btn_sm .icon-kl[data-v-16e02783]{font-size:18px}.app-btn_sm.app-btn_icon-left[data-v-16e02783]{padding-left:5px!important}.app-btn_sm.app-btn_icon-left .icon-kl_left[data-v-16e02783]{margin-right:2px}.app-btn_sm.app-btn_icon-right[data-v-16e02783]{padding-right:5px!important}.app-btn_sm.app-btn_icon-right .icon-kl_right[data-v-16e02783]{margin-left:2px}.app-btn_sm.app-btn_icon-middle[data-v-16e02783]{padding:4px!important}.app-btn_md[data-v-16e02783]{font-size:14px;border-radius:8px}.app-btn_md[data-v-16e02783] .q-btn__content{line-height:22px}.app-btn_md .icon-kl[data-v-16e02783]{font-size:22px}.app-btn_md.app-btn_icon-left[data-v-16e02783]{padding-left:9px!important}.app-btn_md.app-btn_icon-left .icon-kl_left[data-v-16e02783]{margin-right:4px}.app-btn_md.app-btn_icon-right[data-v-16e02783]{padding-right:9px!important}.app-btn_md.app-btn_icon-right .icon-kl_right[data-v-16e02783]{margin-left:4px}.app-btn_md.app-btn_icon-middle[data-v-16e02783]{padding:5px!important}.app-btn_lg[data-v-16e02783]{font-size:17px;border-radius:10px}.app-btn_lg[data-v-16e02783] .q-btn__content{line-height:26px}.app-btn_lg .icon-kl[data-v-16e02783]{font-size:26px}.app-btn_lg.app-btn_icon-left[data-v-16e02783]{padding-left:16px!important}.app-btn_lg.app-btn_icon-left .icon-kl_left[data-v-16e02783]{margin-right:6px}.app-btn_lg.app-btn_icon-right[data-v-16e02783]{padding-right:16px!important}.app-btn_lg.app-btn_icon-right .icon-kl_right[data-v-16e02783]{margin-left:6px}.app-btn_lg.app-btn_icon-middle[data-v-16e02783]{padding:11px!important}.app-btn_default.app-btn_primary[data-v-16e02783]{background-color:#1a5cff;color:#fdfffc}.app-btn_default.app-btn_info[data-v-16e02783]{background-color:#399;color:#fdfffc}.app-btn_default.app-btn_negative[data-v-16e02783]{background-color:#ff4757;color:#fdfffc}.app-btn_default.app-btn_positive[data-v-16e02783]{background-color:#46c93a;color:#fdfffc}.app-btn_trans.app-btn_primary[data-v-16e02783]{background-color:#1a5cff26;color:#1a5cff}.app-btn_trans.app-btn_info[data-v-16e02783]{background-color:#33999926;color:#2e757c}.app-btn_trans.app-btn_negative[data-v-16e02783]{background-color:#ff475726;color:#ff4757}.app-btn_trans.app-btn_positive[data-v-16e02783]{background-color:#46c93a26;color:#46c93a}.app-btn_rounded[data-v-16e02783]{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"});require("vue");const t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const t=require("./index-B9ZSbRrQ.cjs");exports.AppButton=t.AppButton;exports.AppButtonCopy=t.AppButtonCopy;exports.AppIcon=t.index;
|
package/dist/uikit.es.js
CHANGED