@validol4ik/uikit 0.2.12 → 0.2.14
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/components/index.d.ts +103 -2
- package/dist/index-BNQAD-xn.js +152 -0
- package/dist/index-BjSdqqY9.cjs +1 -0
- package/dist/index-CP6XJzcc.js +869 -0
- package/dist/index-CdLuzkL-.cjs +1 -0
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +5 -1046
- package/package.json +1 -1
- /package/dist/{main.css → index.css} +0 -0
|
@@ -0,0 +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;
|
package/dist/uikit.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),I={SM:"sm",MD:"md",LG:"lg"};var ce=(e=>(e.sm="3px 9px",e.md="5px 12px",e.lg="9px 20px",e))(ce||{});const de={PRIMARY:"primary",INFO:"info",NEGATIVE:"negative",POSITIVE:"positive"},W={xs:18,sm:24,md:32,lg:38,xl:46},fe={size:String};function ve(e,n=W){return r.computed(()=>e.size!==void 0?{fontSize:e.size in n?`${n[e.size]}px`:e.size}:null)}function Ce(e,n,i,o){return Object.defineProperty(e,n,{get:i,set:o,enumerable:!0}),e}function H(e){return r.markRaw(r.defineComponent(e))}function Ee(e){return r.markRaw(e)}function U(e,n){return e!==void 0&&e()||n}function N(e,n){return e!==void 0?n.concat(e()):n}const Z="0 0 24 24",J=e=>e,Q=e=>`ionicons ${e}`,me={"mdi-":e=>`mdi ${e}`,"icon-":J,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":Q,"ion-ios":Q,"ion-logo":Q,"iconfont ":J,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},pe={o_:"-outlined",r_:"-round",s_:"-sharp"},he={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},_e=new RegExp("^("+Object.keys(me).join("|")+")"),Se=new RegExp("^("+Object.keys(pe).join("|")+")"),ee=new RegExp("^("+Object.keys(he).join("|")+")"),$e=/^[Mm]\s?[-+]?\.?\d/,qe=/^img:/,Be=/^svguse:/,Le=/^ion-/,Pe=/^(fa-(sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,te=H({name:"QIcon",props:{...fe,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:n}){const{proxy:{$q:i}}=r.getCurrentInstance(),o=ve(e),t=r.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),s=r.computed(()=>{let c,l=e.name;if(l==="none"||!l)return{none:!0};if(i.iconMapFn!==null){const d=i.iconMapFn(l);if(d!==void 0)if(d.icon!==void 0){if(l=d.icon,l==="none"||!l)return{none:!0}}else return{cls:d.cls,content:d.content!==void 0?d.content:" "}}if($e.test(l)===!0){const[d,b=Z]=l.split("|");return{svg:!0,viewBox:b,nodes:d.split("&&").map(u=>{const[g,p,y]=u.split("@@");return r.h("path",{style:p,d:g,transform:y})})}}if(qe.test(l)===!0)return{img:!0,src:l.substring(4)};if(Be.test(l)===!0){const[d,b=Z]=l.split("|");return{svguse:!0,src:d.substring(7),viewBox:b}}let w=" ";const h=l.match(_e);if(h!==null)c=me[h[1]](l);else if(Pe.test(l)===!0)c=l;else if(Le.test(l)===!0)c=`ionicons ion-${i.platform.is.ios===!0?"ios":"md"}${l.substring(3)}`;else if(ee.test(l)===!0){c="notranslate material-symbols";const d=l.match(ee);d!==null&&(l=l.substring(6),c+=he[d[1]]),w=l}else{c="notranslate material-icons";const d=l.match(Se);d!==null&&(l=l.substring(2),c+=pe[d[1]]),w=l}return{cls:c,content:w}});return()=>{const c={class:t.value,style:o.value,"aria-hidden":"true",role:"presentation"};return s.value.none===!0?r.h(e.tag,c,U(n.default)):s.value.img===!0?r.h(e.tag,c,N(n.default,[r.h("img",{src:s.value.src})])):s.value.svg===!0?r.h(e.tag,c,N(n.default,[r.h("svg",{viewBox:s.value.viewBox||"0 0 24 24"},s.value.nodes)])):s.value.svguse===!0?r.h(e.tag,c,N(n.default,[r.h("svg",{viewBox:s.value.viewBox},[r.h("use",{"xlink:href":s.value.src})])])):(s.value.cls!==void 0&&(c.class+=" "+s.value.cls),r.h(e.tag,c,N(n.default,[s.value.content])))}}}),Re={size:{type:[String,Number],default:"1em"},color:String};function Oe(e){return{cSize:r.computed(()=>e.size in W?`${W[e.size]}px`:e.size),classes:r.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const Me=H({name:"QSpinner",props:{...Re,thickness:{type:Number,default:5}},setup(e){const{cSize:n,classes:i}=Oe(e);return()=>r.h("svg",{class:i.value+" q-spinner-mat",width:n.value,height:n.value,viewBox:"25 25 50 50"},[r.h("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function Te(e,n){const i=e.style;for(const o in n)i[o]=n[o]}const F={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(F,{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 ze(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 be(e){e.stopPropagation()}function je(e){e.cancelable!==!1&&e.preventDefault()}function R(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Ie(e,n,i){const o=`__q_${n}_evt`;e[o]=e[o]!==void 0?e[o].concat(i):i,i.forEach(t=>{t[0].addEventListener(t[1],e[t[2]],F[t[3]])})}function Ne(e,n){const i=`__q_${n}_evt`;e[i]!==void 0&&(e[i].forEach(o=>{o[0].removeEventListener(o[1],e[o[2]],F[o[3]])}),e[i]=void 0)}function De(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function G(e,n){return De(e)===!0?!1:[].concat(n).includes(e.keyCode)}function Ae(e,n=250){let i=!1,o;return function(){return i===!1&&(i=!0,setTimeout(()=>{i=!1},n),o=e.apply(this,arguments)),o}}function ne(e,n,i,o){i.modifiers.stop===!0&&be(e);const t=i.modifiers.color;let s=i.modifiers.center;s=s===!0||o===!0;const c=document.createElement("span"),l=document.createElement("span"),w=ze(e),{left:h,top:d,width:b,height:u}=n.getBoundingClientRect(),g=Math.sqrt(b*b+u*u),p=g/2,y=`${(b-g)/2}px`,f=s?y:`${w.left-h-p}px`,k=`${(u-g)/2}px`,P=s?k:`${w.top-d-p}px`;l.className="q-ripple__inner",Te(l,{height:`${g}px`,width:`${g}px`,transform:`translate3d(${f},${P},0) scale3d(.2,.2,1)`,opacity:0}),c.className=`q-ripple${t?" text-"+t:""}`,c.setAttribute("dir","ltr"),c.appendChild(l),n.appendChild(c);const q=()=>{c.remove(),clearTimeout(B)};i.abort.push(q);let B=setTimeout(()=>{l.classList.add("q-ripple__inner--enter"),l.style.transform=`translate3d(${y},${k},0) scale3d(1,1,1)`,l.style.opacity=.2,B=setTimeout(()=>{l.classList.remove("q-ripple__inner--enter"),l.classList.add("q-ripple__inner--leave"),l.style.opacity=0,B=setTimeout(()=>{c.remove(),i.abort.splice(i.abort.indexOf(q),1)},275)},250)},50)}function oe(e,{modifiers:n,value:i,arg:o}){const t=Object.assign({},e.cfg.ripple,n,i);e.modifiers={early:t.early===!0,stop:t.stop===!0,center:t.center===!0,color:t.color||o,keyCodes:[].concat(t.keyCodes||13)}}const Ke=Ee({name:"ripple",beforeMount(e,n){const i=n.instance.$.appContext.config.globalProperties.$q.config||{};if(i.ripple===!1)return;const o={cfg:i,enabled:n.value!==!1,modifiers:{},abort:[],start(t){o.enabled===!0&&t.qSkipRipple!==!0&&t.type===(o.modifiers.early===!0?"pointerdown":"click")&&ne(t,e,o,t.qKeyEvent===!0)},keystart:Ae(t=>{o.enabled===!0&&t.qSkipRipple!==!0&&G(t,o.modifiers.keyCodes)===!0&&t.type===`key${o.modifiers.early===!0?"down":"up"}`&&ne(t,e,o,!0)},300)};oe(o,n),e.__qripple=o,Ie(o,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,n){if(n.oldValue!==n.value){const i=e.__qripple;i!==void 0&&(i.enabled=n.value!==!1,i.enabled===!0&&Object(n.value)===n.value&&oe(i,n))}},beforeUnmount(e){const n=e.__qripple;n!==void 0&&(n.abort.forEach(i=>{i()}),Ne(n,"main"),delete e._qripple)}}),ge={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Ve=Object.keys(ge),He={align:{type:String,validator:e=>Ve.includes(e)}};function Fe(e){return r.computed(()=>{const n=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${ge[n]}`})}function Qe(e){return e.appContext.config.globalProperties.$router!==void 0}function re(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function ie(e,n){return(e.aliasOf||e)===(n.aliasOf||n)}function Ye(e,n){for(const i in n){const o=n[i],t=e[i];if(typeof o=="string"){if(o!==t)return!1}else if(Array.isArray(t)===!1||t.length!==o.length||o.some((s,c)=>s!==t[c]))return!1}return!0}function ae(e,n){return Array.isArray(n)===!0?e.length===n.length&&e.every((i,o)=>i===n[o]):e.length===1&&e[0]===n}function We(e,n){return Array.isArray(e)===!0?ae(e,n):Array.isArray(n)===!0?ae(n,e):e===n}function Ue(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const i in e)if(We(e[i],n[i])===!1)return!1;return!0}const Ge={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean};function Xe({fallbackTag:e,useDisableForRouterLinkProps:n=!0}={}){const i=r.getCurrentInstance(),{props:o,proxy:t,emit:s}=i,c=Qe(i),l=r.computed(()=>o.disable!==!0&&o.href!==void 0),w=n===!0?r.computed(()=>c===!0&&o.disable!==!0&&l.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""):r.computed(()=>c===!0&&l.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""),h=r.computed(()=>w.value===!0?P(o.to):null),d=r.computed(()=>h.value!==null),b=r.computed(()=>l.value===!0||d.value===!0),u=r.computed(()=>o.type==="a"||b.value===!0?"a":o.tag||e||"div"),g=r.computed(()=>l.value===!0?{href:o.href,target:o.target}:d.value===!0?{href:h.value.href,target:o.target}:{}),p=r.computed(()=>{if(d.value===!1)return-1;const{matched:v}=h.value,{length:x}=v,E=v[x-1];if(E===void 0)return-1;const S=t.$route.matched;if(S.length===0)return-1;const $=S.findIndex(ie.bind(null,E));if($!==-1)return $;const A=re(v[x-2]);return x>1&&re(E)===A&&S[S.length-1].path!==A?S.findIndex(ie.bind(null,v[x-2])):$}),y=r.computed(()=>d.value===!0&&p.value!==-1&&Ye(t.$route.params,h.value.params)),f=r.computed(()=>y.value===!0&&p.value===t.$route.matched.length-1&&Ue(t.$route.params,h.value.params)),k=r.computed(()=>d.value===!0?f.value===!0?` ${o.exactActiveClass} ${o.activeClass}`:o.exact===!0?"":y.value===!0?` ${o.activeClass}`:"":"");function P(v){try{return t.$router.resolve(v)}catch{}return null}function q(v,{returnRouterError:x,to:E=o.to,replace:S=o.replace}={}){if(o.disable===!0)return v.preventDefault(),Promise.resolve(!1);if(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey||v.button!==void 0&&v.button!==0||o.target==="_blank")return Promise.resolve(!1);v.preventDefault();const $=t.$router[S===!0?"replace":"push"](E);return x===!0?$:$.then(()=>{}).catch(()=>{})}function B(v){if(d.value===!0){const x=E=>q(v,E);s("click",v,x),v.defaultPrevented!==!0&&x()}else s("click",v)}return{hasRouterLink:d,hasHrefLink:l,hasLink:b,linkTag:u,resolvedLink:h,linkIsActive:y,linkIsExactActive:f,linkClass:k,linkAttrs:g,getLink:P,navigateToRouterLink:q,navigateOnClick:B}}const le={none:0,xs:4,sm:8,md:16,lg:24,xl:32},Ze={xs:8,sm:10,md:14,lg:20,xl:24},Je=["button","submit","reset"],et=/[^\s]\/[^\s]/,tt=["flat","outline","push","unelevated"];function nt(e,n){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":n}const ot={...fe,...Ge,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...tt.reduce((e,n)=>(e[n]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...He.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},rt={...ot,round:Boolean};function it(e){const n=ve(e,Ze),i=Fe(e),{hasRouterLink:o,hasLink:t,linkTag:s,linkAttrs:c,navigateOnClick:l}=Xe({fallbackTag:"button"}),w=r.computed(()=>{const f=e.fab===!1&&e.fabMini===!1?n.value:{};return e.padding!==void 0?Object.assign({},f,{padding:e.padding.split(/\s+/).map(k=>k in le?le[k]+"px":k).join(" "),minWidth:"0",minHeight:"0"}):f}),h=r.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),d=r.computed(()=>e.disable!==!0&&e.loading!==!0),b=r.computed(()=>d.value===!0?e.tabindex||0:-1),u=r.computed(()=>nt(e,"standard")),g=r.computed(()=>{const f={tabindex:b.value};return t.value===!0?Object.assign(f,c.value):Je.includes(e.type)===!0&&(f.type=e.type),s.value==="a"?(e.disable===!0?f["aria-disabled"]="true":f.href===void 0&&(f.role="button"),o.value!==!0&&et.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=r.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${h.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${u.value} q-btn--${k}`+(f!==void 0?" "+f:"")+(d.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=r.computed(()=>i.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:w,innerClasses:y,attributes:g,hasLink:t,linkTag:s,navigateOnClick:l,isActionable:d}}const{passiveCapture:C}=F;let O=null,M=null,T=null;const at=H({name:"QBtn",props:{...rt,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:n,emit:i}){const{proxy:o}=r.getCurrentInstance(),{classes:t,style:s,innerClasses:c,attributes:l,hasLink:w,linkTag:h,navigateOnClick:d,isActionable:b}=it(e),u=r.ref(null),g=r.ref(null);let p=null,y,f=null;const k=r.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),P=r.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:w.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),q=r.computed(()=>({center:e.round})),B=r.computed(()=>{const a=Math.max(0,Math.min(100,e.percentage));return a>0?{transition:"transform 0.6s",transform:`translateX(${a-100}%)`}:{}}),v=r.computed(()=>{if(e.loading===!0)return{onMousedown:j,onTouchstart:j,onClick:j,onKeydown:j,onKeyup:j};if(b.value===!0){const a={onClick:E,onKeydown:S,onMousedown:A};if(o.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";a[`onTouchstart${m}`]=$}return a}return{onClick:R}}),x=r.computed(()=>({ref:u,class:"q-btn q-btn-item non-selectable no-outline "+t.value,style:s.value,...l.value,...v.value}));function E(a){if(u.value!==null){if(a!==void 0){if(a.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 K=()=>{document.removeEventListener("keydown",R,!0),document.removeEventListener("keyup",K,C),u.value!==null&&u.value.removeEventListener("blur",K,C)};document.addEventListener("keydown",R,!0),document.addEventListener("keyup",K,C),u.value.addEventListener("blur",K,C)}}d(a)}}function S(a){u.value!==null&&(i("keydown",a),G(a,[13,32])===!0&&M!==u.value&&(M!==null&&z(),a.defaultPrevented!==!0&&(u.value.focus(),M=u.value,u.value.classList.add("q-btn--active"),document.addEventListener("keyup",_,!0),u.value.addEventListener("blur",_,C)),R(a)))}function $(a){u.value!==null&&(i("touchstart",a),a.defaultPrevented!==!0&&(O!==u.value&&(O!==null&&z(),O=u.value,p=a.target,p.addEventListener("touchcancel",_,C),p.addEventListener("touchend",_,C)),y=!0,f!==null&&clearTimeout(f),f=setTimeout(()=>{f=null,y=!1},200)))}function A(a){u.value!==null&&(a.qSkipRipple=y===!0,i("mousedown",a),a.defaultPrevented!==!0&&T!==u.value&&(T!==null&&z(),T=u.value,u.value.classList.add("q-btn--active"),document.addEventListener("mouseup",_,C)))}function _(a){if(u.value!==null&&!(a!==void 0&&a.type==="blur"&&document.activeElement===u.value)){if(a!==void 0&&a.type==="keyup"){if(M===u.value&&G(a,[13,32])===!0){const m=new MouseEvent("click",a);m.qKeyEvent=!0,a.defaultPrevented===!0&&je(m),a.cancelBubble===!0&&be(m),u.value.dispatchEvent(m),R(a),a.qKeyEvent=!0}i("keyup",a)}z()}}function z(a){const m=g.value;a!==!0&&(O===u.value||T===u.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex",-1),m.focus()),O===u.value&&(p!==null&&(p.removeEventListener("touchcancel",_,C),p.removeEventListener("touchend",_,C)),O=p=null),T===u.value&&(document.removeEventListener("mouseup",_,C),T=null),M===u.value&&(document.removeEventListener("keyup",_,!0),u.value!==null&&u.value.removeEventListener("blur",_,C),M=null),u.value!==null&&u.value.classList.remove("q-btn--active")}function j(a){R(a),a.qSkipRipple=!0}return r.onBeforeUnmount(()=>{z(!0)}),Object.assign(o,{click:a=>{b.value===!0&&E(a)}}),()=>{let a=[];e.icon!==void 0&&a.push(r.h(te,{name:e.icon,left:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"})),k.value===!0&&a.push(r.h("span",{class:"block"},[e.label])),a=N(n.default,a),e.iconRight!==void 0&&e.round===!1&&a.push(r.h(te,{name:e.iconRight,right:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"}));const m=[r.h("span",{class:"q-focus-helper",ref:g})];return e.loading===!0&&e.percentage!==void 0&&m.push(r.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[r.h("span",{class:"q-btn__progress-indicator fit block",style:B.value})])),m.push(r.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+c.value},a)),e.loading!==null&&m.push(r.h(r.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[r.h("span",{key:"loading",class:"absolute-full flex flex-center"},n.loading!==void 0?n.loading():[r.h(Me)])]:null)),r.withDirectives(r.h(h.value,x.value,m),[[Ke,P.value,void 0,q.value]])}}}),lt=r.defineComponent({__name:"index",props:{size:{default:I.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 n=e,i=r.computed(()=>["app-btn",{"app-btn_default":!n.transparent,"app-btn_trans":n.transparent,"app-btn_rounded":n.rounded,"app-btn_sm":n.size===I.SM,"app-btn_md":n.size===I.MD,"app-btn_lg":n.size===I.LG,"app-btn_icon-left":n.iconLeft,"app-btn_icon-right":n.iconRight,"app-btn_icon-middle":n.iconMiddle},`app-btn_${n.color}`]);return(o,t)=>(r.openBlock(),r.createBlock(r.unref(at),{"no-caps":"",unelevated:"",class:r.normalizeClass(i.value),padding:r.unref(ce)[n.size||r.unref(I).MD],loading:o.loading,disabled:o.disabled||void 0,to:o.to,href:o.href,target:o.target,type:o.submit?"submit":void 0,"aria-label":o.ariaLabel,onClick:t[0]||(t[0]=s=>o.$emit("click",s))},{default:r.withCtx(()=>[o.iconLeft||o.iconMiddle?(r.openBlock(),r.createElementBlock("i",{key:0,class:r.normalizeClass(["icon-kl",o.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${o.iconLeft||o.iconMiddle}`,o.transparent?`text-${o.color}`:"text-secondary"])},null,2)):r.createCommentVNode("",!0),r.renderSlot(o.$slots,"default",{},void 0,!0),o.iconRight?(r.openBlock(),r.createElementBlock("i",{key:1,class:r.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${o.iconRight}`,o.transparent?`text-${o.color}`:"text-secondary"])},null,2)):r.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disabled","to","href","target","type","aria-label"]))}}),ye=(e,n)=>{const i=e.__vccOpts||e;for(const[o,t]of n)i[o]=t;return i},ke=ye(lt,[["__scopeId","data-v-5b3b0602"]]),D=r.ref(!1);let X;function ut(e,n){const i=/(edg|edge|edga|edgios)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(vivaldi)[\/]([\w.]+)/.exec(e)||/(chrome|crios)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(firefox|fxios)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(e)||[];return{browser:i[5]||i[3]||i[1]||"",version:i[4]||i[2]||"0",platform:n[0]||""}}function st(e){return/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[]}const we="ontouchstart"in window||window.navigator.maxTouchPoints>0;function ct(e){const n=e.toLowerCase(),i=st(n),o=ut(n,i),t={};o.browser&&(t[o.browser]=!0,t.version=o.version,t.versionNumber=parseInt(o.version,10)),o.platform&&(t[o.platform]=!0);const s=t.android||t.ios||t.bb||t.blackberry||t.ipad||t.iphone||t.ipod||t.kindle||t.playbook||t.silk||t["windows phone"];if(s===!0||n.indexOf("mobile")!==-1?t.mobile=!0:t.desktop=!0,t["windows phone"]&&(t.winphone=!0,delete t["windows phone"]),t.edga||t.edgios||t.edg?(t.edge=!0,o.browser="edge"):t.crios?(t.chrome=!0,o.browser="chrome"):t.fxios&&(t.firefox=!0,o.browser="firefox"),(t.ipod||t.ipad||t.iphone)&&(t.ios=!0),t.vivaldi&&(o.browser="vivaldi",t.vivaldi=!0),(t.chrome||t.opr||t.safari||t.vivaldi||t.mobile===!0&&t.ios!==!0&&s!==!0)&&(t.webkit=!0),t.opr&&(o.browser="opera",t.opera=!0),t.safari&&(t.blackberry||t.bb?(o.browser="blackberry",t.blackberry=!0):t.playbook?(o.browser="playbook",t.playbook=!0):t.android?(o.browser="android",t.android=!0):t.kindle?(o.browser="kindle",t.kindle=!0):t.silk&&(o.browser="silk",t.silk=!0)),t.name=o.browser,t.platform=o.platform,n.indexOf("electron")!==-1)t.electron=!0;else if(document.location.href.indexOf("-extension://")!==-1)t.bex=!0;else{if(window.Capacitor!==void 0?(t.capacitor=!0,t.nativeMobile=!0,t.nativeMobileWrapper="capacitor"):(window._cordovaNative!==void 0||window.cordova!==void 0)&&(t.cordova=!0,t.nativeMobile=!0,t.nativeMobileWrapper="cordova"),D.value===!0&&(X={is:{...t}}),we===!0&&t.mac===!0&&(t.desktop===!0&&t.safari===!0||t.nativeMobile===!0&&t.android!==!0&&t.ios!==!0&&t.ipad!==!0)){delete t.mac,delete t.desktop;const c=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(t,{mobile:!0,ios:!0,platform:c,[c]:!0})}t.mobile!==!0&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete t.desktop,t.mobile=!0)}return t}const ue=navigator.userAgent||navigator.vendor||window.opera,dt={has:{touch:!1,webStorage:!1},within:{iframe:!1}},V={userAgent:ue,is:ct(ue),has:{touch:we},within:{iframe:window.self!==window.top}},se={install(e){const{$q:n}=e;D.value===!0?(e.onSSRHydrated.push(()=>{Object.assign(n.platform,V),D.value=!1}),n.platform=r.reactive(this)):n.platform=this}};{let e;Ce(V.has,"webStorage",()=>{if(e!==void 0)return e;try{if(window.localStorage)return e=!0,!0}catch{}return e=!1,!1}),Object.assign(se,V),D.value===!0&&(Object.assign(se,X,dt),X=null)}function ft(){const e=r.ref(!D.value);return e.value===!1&&r.onMounted(()=>{e.value=!0}),{isHydrated:e}}const vt=H({name:"QNoSsr",props:{tag:{type:String,default:"div"},placeholder:String},setup(e,{slots:n}){const{isHydrated:i}=ft();return()=>{if(i.value===!0){const s=U(n.default);return s===void 0?s:s.length>1?r.h(e.tag,{},s):s[0]}const o={class:"q-no-ssr-placeholder"},t=U(n.placeholder);if(t!==void 0)return t.length>1?r.h(e.tag,o,t):t[0];if(e.placeholder!==void 0)return r.h(e.tag,o,e.placeholder)}}}),L=[];function xe(e){L[L.length-1](e)}function mt(e){V.is.desktop===!0&&(L.push(e),L.length===1&&document.body.addEventListener("focusin",xe))}function pt(e){const n=L.indexOf(e);n!==-1&&(L.splice(n,1),L.length===0&&document.body.removeEventListener("focusin",xe))}function ht(e){const n=document.createElement("textarea");n.value=e,n.contentEditable="true",n.style.position="fixed";const i=()=>{};mt(i),document.body.appendChild(n),n.focus(),n.select();const o=document.execCommand("copy");return n.remove(),pt(i),o}function bt(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((n,i)=>{const o=ht(e);o?n(!0):i(o)})}const Y={COPY:"copy_o",COPIED:"copied_o"},gt=r.defineComponent({__name:"index",props:{text:{},size:{},transparent:{type:Boolean,default:!0},rounded:{type:Boolean},color:{default:de.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:[Boolean,null]},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{}},setup(e){const n=e,i=r.ref(Y.COPY),o=()=>{i.value=Y.COPIED,setTimeout(()=>{i.value=Y.COPY},2e3)},t=()=>{bt(n.text).then(o).catch(s=>{console.log(s)})};return(s,c)=>(r.openBlock(),r.createBlock(vt,null,{default:r.withCtx(()=>[r.createVNode(r.unref(ke),r.mergeProps(n,{"icon-middle":i.value,onClick:r.withModifiers(t,["prevent"])}),null,16,["icon-middle"])]),_:1}))}}),yt=r.defineComponent({__name:"index",props:{name:{},size:{},color:{}},setup(e){return(n,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass(["icon-kl",`icon-kl-${n.name}`,n.color?`text-${n.color}`:""]),style:r.normalizeStyle(n.size?`font-size: ${n.size}`:void 0)},null,6))}}),kt=ye(yt,[["__scopeId","data-v-73419357"]]);exports.AppButton=ke;exports.AppIcon=kt;exports.CopyButton=gt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const t=require("./index-CdLuzkL-.cjs");exports.AppButton=t.AppButton;exports.AppButtonCopy=t.AppButtonCopy;exports.AppIcon=t.index;
|