@validol4ik/uikit 0.3.23 → 0.3.24

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),a=require("./use-router-link-DiPB_4Ct.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={[a.SIZES.SM]:"3px 9px",[a.SIZES.MD]:"5px 12px",[a.SIZES.LG]:"9px 20px"},$={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},K=Object.keys($),V={align:{type:String,validator:e=>K.includes(e)}};function Q(e){return t.computed(()=>{const o=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${$[o]}`})}const w={none:0,xs:4,sm:8,md:16,lg:24,xl:32},W={xs:8,sm:10,md:14,lg:20,xl:24},F=["button","submit","reset"],G=/[^\s]\/[^\s]/,H=["flat","outline","push","unelevated"];function U(e,o){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":o}const X={...a.useSizeProps,...a.useRouterLinkNonMatchingProps,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...H.reduce((e,o)=>(e[o]=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:{...V.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Y={...X,round:Boolean};function J(e){const o=a.useSize(e,W),f=Q(e),{hasRouterLink:u,hasLink:b,linkTag:g,linkAttrs:C,navigateOnClick:P}=a.useRouterLink({fallbackTag:"button"}),M=t.computed(()=>{const i=e.fab===!1&&e.fabMini===!1?o.value:{};return e.padding!==void 0?Object.assign({},i,{padding:e.padding.split(/\s+/).map(v=>v in w?w[v]+"px":v).join(" "),minWidth:"0",minHeight:"0"}):i}),R=t.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),k=t.computed(()=>e.disable!==!0&&e.loading!==!0),E=t.computed(()=>k.value===!0?e.tabindex||0:-1),l=t.computed(()=>U(e,"standard")),q=t.computed(()=>{const i={tabindex:E.value};return b.value===!0?Object.assign(i,C.value):F.includes(e.type)===!0&&(i.type=e.type),g.value==="a"?(e.disable===!0?i["aria-disabled"]="true":i.href===void 0&&(i.role="button"),u.value!==!0&&G.test(e.type)===!0&&(i.type=e.type)):e.disable===!0&&(i.disabled="",i["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(i,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),i}),d=t.computed(()=>{let i;e.color!==void 0?e.flat===!0||e.outline===!0?i=`text-${e.textColor||e.color}`:i=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(i=`text-${e.textColor}`);const v=e.round===!0?"round":`rectangle${R.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${l.value} q-btn--${v}`+(i!==void 0?" "+i:"")+(k.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":"")}),p=t.computed(()=>f.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:d,style:M,innerClasses:p,attributes:q,hasLink:b,linkTag:g,navigateOnClick:P,isActionable:k}}const{passiveCapture:s}=a.listenOpts;let m=null,h=null,y=null;const ee=a.createComponent({name:"QBtn",props:{...Y,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:o,emit:f}){const{proxy:u}=t.getCurrentInstance(),{classes:b,style:g,innerClasses:C,attributes:P,hasLink:M,linkTag:R,navigateOnClick:k,isActionable:E}=J(e),l=t.ref(null),q=t.ref(null);let d=null,p,i=null;const v=t.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),x=t.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:M.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),A=t.computed(()=>({center:e.round})),I=t.computed(()=>{const n=Math.max(0,Math.min(100,e.percentage));return n>0?{transition:"transform 0.6s",transform:`translateX(${n-100}%)`}:{}}),z=t.computed(()=>{if(e.loading===!0)return{onMousedown:B,onTouchstart:B,onClick:B,onKeydown:B,onKeyup:B};if(E.value===!0){const n={onClick:T,onKeydown:_,onMousedown:D};if(u.$q.platform.has.touch===!0){const r=e.onTouchstart!==void 0?"":"Passive";n[`onTouchstart${r}`]=j}return n}return{onClick:a.stopAndPrevent}}),O=t.computed(()=>({ref:l,class:"q-btn q-btn-item non-selectable no-outline "+b.value,style:g.value,...P.value,...z.value}));function T(n){if(l.value!==null){if(n!==void 0){if(n.defaultPrevented===!0)return;const r=document.activeElement;if(e.type==="submit"&&r!==document.body&&l.value.contains(r)===!1&&r.contains(l.value)===!1){l.value.focus();const L=()=>{document.removeEventListener("keydown",a.stopAndPrevent,!0),document.removeEventListener("keyup",L,s),l.value!==null&&l.value.removeEventListener("blur",L,s)};document.addEventListener("keydown",a.stopAndPrevent,!0),document.addEventListener("keyup",L,s),l.value.addEventListener("blur",L,s)}}k(n)}}function _(n){l.value!==null&&(f("keydown",n),a.isKeyCode(n,[13,32])===!0&&h!==l.value&&(h!==null&&S(),n.defaultPrevented!==!0&&(l.value.focus(),h=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("keyup",c,!0),l.value.addEventListener("blur",c,s)),a.stopAndPrevent(n)))}function j(n){l.value!==null&&(f("touchstart",n),n.defaultPrevented!==!0&&(m!==l.value&&(m!==null&&S(),m=l.value,d=n.target,d.addEventListener("touchcancel",c,s),d.addEventListener("touchend",c,s)),p=!0,i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,p=!1},200)))}function D(n){l.value!==null&&(n.qSkipRipple=p===!0,f("mousedown",n),n.defaultPrevented!==!0&&y!==l.value&&(y!==null&&S(),y=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("mouseup",c,s)))}function c(n){if(l.value!==null&&!(n!==void 0&&n.type==="blur"&&document.activeElement===l.value)){if(n!==void 0&&n.type==="keyup"){if(h===l.value&&a.isKeyCode(n,[13,32])===!0){const r=new MouseEvent("click",n);r.qKeyEvent=!0,n.defaultPrevented===!0&&a.prevent(r),n.cancelBubble===!0&&a.stop(r),l.value.dispatchEvent(r),a.stopAndPrevent(n),n.qKeyEvent=!0}f("keyup",n)}S()}}function S(n){const r=q.value;n!==!0&&(m===l.value||y===l.value)&&r!==null&&r!==document.activeElement&&(r.setAttribute("tabindex",-1),r.focus()),m===l.value&&(d!==null&&(d.removeEventListener("touchcancel",c,s),d.removeEventListener("touchend",c,s)),m=d=null),y===l.value&&(document.removeEventListener("mouseup",c,s),y=null),h===l.value&&(document.removeEventListener("keyup",c,!0),l.value!==null&&l.value.removeEventListener("blur",c,s),h=null),l.value!==null&&l.value.classList.remove("q-btn--active")}function B(n){a.stopAndPrevent(n),n.qSkipRipple=!0}return t.onBeforeUnmount(()=>{S(!0)}),Object.assign(u,{click:n=>{E.value===!0&&T(n)}}),()=>{let n=[];e.icon!==void 0&&n.push(t.h(a.QIcon,{name:e.icon,left:e.stack!==!0&&v.value===!0,role:"img"})),v.value===!0&&n.push(t.h("span",{class:"block"},[e.label])),n=a.hMergeSlot(o.default,n),e.iconRight!==void 0&&e.round===!1&&n.push(t.h(a.QIcon,{name:e.iconRight,right:e.stack!==!0&&v.value===!0,role:"img"}));const r=[t.h("span",{class:"q-focus-helper",ref:q})];return e.loading===!0&&e.percentage!==void 0&&r.push(t.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[t.h("span",{class:"q-btn__progress-indicator fit block",style:I.value})])),r.push(t.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+C.value},n)),e.loading!==null&&r.push(t.h(t.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[t.h("span",{key:"loading",class:"absolute-full flex flex-center"},o.loading!==void 0?o.loading():[t.h(a.QSpinner)])]:null)),t.withDirectives(t.h(R.value,O.value,r),[[a.Ripple,x.value,void 0,A.value]])}}}),te=t.defineComponent({__name:"index",props:{size:{default:a.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:a.COLORS.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{}},emits:["click"],setup(e){const o=e,f=t.computed(()=>["app-btn",{"app-btn_default":!o.transparent&&!o.flat,"app-btn_trans":o.transparent,"app-btn_flat":o.flat,"app-btn_rounded":o.rounded,"app-btn_sm":o.size===a.SIZES.SM,"app-btn_md":o.size===a.SIZES.MD,"app-btn_lg":o.size===a.SIZES.LG,"app-btn_icon-left":o.iconLeft,"app-btn_icon-right":o.iconRight,"app-btn_icon-middle":o.iconMiddle},`app-btn_${o.color}`]);return(u,b)=>(t.openBlock(),t.createBlock(t.unref(ee),{"no-caps":"",unelevated:"",class:t.normalizeClass(f.value),padding:t.unref(Z)[u.size||t.unref(a.SIZES).MD],loading:u.loading,disable:u.disabled||void 0,to:u.to,href:u.href,target:u.target,type:u.submit?"submit":void 0,"aria-label":u.ariaLabel,onClick:b[0]||(b[0]=g=>u.$emit("click",g))},{default:t.withCtx(()=>[u.iconLeft||u.iconMiddle?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["icon-kl",u.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${u.iconLeft||u.iconMiddle}`,u.transparent||u.flat?`text-${u.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default",{},void 0,!0),u.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(u.label),1)],64)):t.createCommentVNode("",!0),u.iconRight?(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${u.iconRight}`,u.transparent?`text-${u.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disable","to","href","target","type","aria-label"]))}}),ne=N._export_sfc(te,[["__scopeId","data-v-59859915"]]);exports.default=ne;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),a=require("./use-router-link-DiPB_4Ct.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={[a.SIZES.SM]:"3px 9px",[a.SIZES.MD]:"5px 12px",[a.SIZES.LG]:"9px 20px"},$={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},K=Object.keys($),V={align:{type:String,validator:e=>K.includes(e)}};function Q(e){return t.computed(()=>{const o=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${$[o]}`})}const w={none:0,xs:4,sm:8,md:16,lg:24,xl:32},W={xs:8,sm:10,md:14,lg:20,xl:24},F=["button","submit","reset"],G=/[^\s]\/[^\s]/,H=["flat","outline","push","unelevated"];function U(e,o){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":o}const X={...a.useSizeProps,...a.useRouterLinkNonMatchingProps,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...H.reduce((e,o)=>(e[o]=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:{...V.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Y={...X,round:Boolean};function J(e){const o=a.useSize(e,W),f=Q(e),{hasRouterLink:u,hasLink:b,linkTag:g,linkAttrs:C,navigateOnClick:P}=a.useRouterLink({fallbackTag:"button"}),M=t.computed(()=>{const i=e.fab===!1&&e.fabMini===!1?o.value:{};return e.padding!==void 0?Object.assign({},i,{padding:e.padding.split(/\s+/).map(v=>v in w?w[v]+"px":v).join(" "),minWidth:"0",minHeight:"0"}):i}),R=t.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),k=t.computed(()=>e.disable!==!0&&e.loading!==!0),E=t.computed(()=>k.value===!0?e.tabindex||0:-1),l=t.computed(()=>U(e,"standard")),q=t.computed(()=>{const i={tabindex:E.value};return b.value===!0?Object.assign(i,C.value):F.includes(e.type)===!0&&(i.type=e.type),g.value==="a"?(e.disable===!0?i["aria-disabled"]="true":i.href===void 0&&(i.role="button"),u.value!==!0&&G.test(e.type)===!0&&(i.type=e.type)):e.disable===!0&&(i.disabled="",i["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(i,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),i}),d=t.computed(()=>{let i;e.color!==void 0?e.flat===!0||e.outline===!0?i=`text-${e.textColor||e.color}`:i=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(i=`text-${e.textColor}`);const v=e.round===!0?"round":`rectangle${R.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${l.value} q-btn--${v}`+(i!==void 0?" "+i:"")+(k.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":"")}),p=t.computed(()=>f.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:d,style:M,innerClasses:p,attributes:q,hasLink:b,linkTag:g,navigateOnClick:P,isActionable:k}}const{passiveCapture:s}=a.listenOpts;let m=null,h=null,y=null;const ee=a.createComponent({name:"QBtn",props:{...Y,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:o,emit:f}){const{proxy:u}=t.getCurrentInstance(),{classes:b,style:g,innerClasses:C,attributes:P,hasLink:M,linkTag:R,navigateOnClick:k,isActionable:E}=J(e),l=t.ref(null),q=t.ref(null);let d=null,p,i=null;const v=t.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),x=t.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:M.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),A=t.computed(()=>({center:e.round})),I=t.computed(()=>{const n=Math.max(0,Math.min(100,e.percentage));return n>0?{transition:"transform 0.6s",transform:`translateX(${n-100}%)`}:{}}),z=t.computed(()=>{if(e.loading===!0)return{onMousedown:B,onTouchstart:B,onClick:B,onKeydown:B,onKeyup:B};if(E.value===!0){const n={onClick:T,onKeydown:_,onMousedown:D};if(u.$q.platform.has.touch===!0){const r=e.onTouchstart!==void 0?"":"Passive";n[`onTouchstart${r}`]=j}return n}return{onClick:a.stopAndPrevent}}),O=t.computed(()=>({ref:l,class:"q-btn q-btn-item non-selectable no-outline "+b.value,style:g.value,...P.value,...z.value}));function T(n){if(l.value!==null){if(n!==void 0){if(n.defaultPrevented===!0)return;const r=document.activeElement;if(e.type==="submit"&&r!==document.body&&l.value.contains(r)===!1&&r.contains(l.value)===!1){l.value.focus();const L=()=>{document.removeEventListener("keydown",a.stopAndPrevent,!0),document.removeEventListener("keyup",L,s),l.value!==null&&l.value.removeEventListener("blur",L,s)};document.addEventListener("keydown",a.stopAndPrevent,!0),document.addEventListener("keyup",L,s),l.value.addEventListener("blur",L,s)}}k(n)}}function _(n){l.value!==null&&(f("keydown",n),a.isKeyCode(n,[13,32])===!0&&h!==l.value&&(h!==null&&S(),n.defaultPrevented!==!0&&(l.value.focus(),h=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("keyup",c,!0),l.value.addEventListener("blur",c,s)),a.stopAndPrevent(n)))}function j(n){l.value!==null&&(f("touchstart",n),n.defaultPrevented!==!0&&(m!==l.value&&(m!==null&&S(),m=l.value,d=n.target,d.addEventListener("touchcancel",c,s),d.addEventListener("touchend",c,s)),p=!0,i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,p=!1},200)))}function D(n){l.value!==null&&(n.qSkipRipple=p===!0,f("mousedown",n),n.defaultPrevented!==!0&&y!==l.value&&(y!==null&&S(),y=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("mouseup",c,s)))}function c(n){if(l.value!==null&&!(n!==void 0&&n.type==="blur"&&document.activeElement===l.value)){if(n!==void 0&&n.type==="keyup"){if(h===l.value&&a.isKeyCode(n,[13,32])===!0){const r=new MouseEvent("click",n);r.qKeyEvent=!0,n.defaultPrevented===!0&&a.prevent(r),n.cancelBubble===!0&&a.stop(r),l.value.dispatchEvent(r),a.stopAndPrevent(n),n.qKeyEvent=!0}f("keyup",n)}S()}}function S(n){const r=q.value;n!==!0&&(m===l.value||y===l.value)&&r!==null&&r!==document.activeElement&&(r.setAttribute("tabindex",-1),r.focus()),m===l.value&&(d!==null&&(d.removeEventListener("touchcancel",c,s),d.removeEventListener("touchend",c,s)),m=d=null),y===l.value&&(document.removeEventListener("mouseup",c,s),y=null),h===l.value&&(document.removeEventListener("keyup",c,!0),l.value!==null&&l.value.removeEventListener("blur",c,s),h=null),l.value!==null&&l.value.classList.remove("q-btn--active")}function B(n){a.stopAndPrevent(n),n.qSkipRipple=!0}return t.onBeforeUnmount(()=>{S(!0)}),Object.assign(u,{click:n=>{E.value===!0&&T(n)}}),()=>{let n=[];e.icon!==void 0&&n.push(t.h(a.QIcon,{name:e.icon,left:e.stack!==!0&&v.value===!0,role:"img"})),v.value===!0&&n.push(t.h("span",{class:"block"},[e.label])),n=a.hMergeSlot(o.default,n),e.iconRight!==void 0&&e.round===!1&&n.push(t.h(a.QIcon,{name:e.iconRight,right:e.stack!==!0&&v.value===!0,role:"img"}));const r=[t.h("span",{class:"q-focus-helper",ref:q})];return e.loading===!0&&e.percentage!==void 0&&r.push(t.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[t.h("span",{class:"q-btn__progress-indicator fit block",style:I.value})])),r.push(t.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+C.value},n)),e.loading!==null&&r.push(t.h(t.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[t.h("span",{key:"loading",class:"absolute-full flex flex-center"},o.loading!==void 0?o.loading():[t.h(a.QSpinner)])]:null)),t.withDirectives(t.h(R.value,O.value,r),[[a.Ripple,x.value,void 0,A.value]])}}}),te=t.defineComponent({__name:"AppButton",props:{size:{default:a.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:a.COLORS.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{}},emits:["click"],setup(e){const o=e,f=t.computed(()=>["app-btn",{"app-btn_default":!o.transparent&&!o.flat,"app-btn_trans":o.transparent,"app-btn_flat":o.flat,"app-btn_rounded":o.rounded,"app-btn_sm":o.size===a.SIZES.SM,"app-btn_md":o.size===a.SIZES.MD,"app-btn_lg":o.size===a.SIZES.LG,"app-btn_icon-left":o.iconLeft,"app-btn_icon-right":o.iconRight,"app-btn_icon-middle":o.iconMiddle},`app-btn_${o.color}`]);return(u,b)=>(t.openBlock(),t.createBlock(t.unref(ee),{"no-caps":"",unelevated:"",class:t.normalizeClass(f.value),padding:t.unref(Z)[u.size||t.unref(a.SIZES).MD],loading:u.loading,disable:u.disabled||void 0,to:u.to,href:u.href,target:u.target,type:u.submit?"submit":void 0,"aria-label":u.ariaLabel,onClick:b[0]||(b[0]=g=>u.$emit("click",g))},{default:t.withCtx(()=>[u.iconLeft||u.iconMiddle?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["icon-kl",u.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${u.iconLeft||u.iconMiddle}`,u.transparent||u.flat?`text-${u.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default",{},void 0,!0),u.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(u.label),1)],64)):t.createCommentVNode("",!0),u.iconRight?(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${u.iconRight}`,u.transparent?`text-${u.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disable","to","href","target","type","aria-label"]))}}),ne=N._export_sfc(te,[["__scopeId","data-v-64785508"]]);exports.default=ne;
@@ -1,7 +1,7 @@
1
1
  import { computed as o, getCurrentInstance as Y, ref as j, onBeforeUnmount as Z, h as s, Transition as J, withDirectives as ee, defineComponent as te, openBlock as R, createBlock as ne, unref as x, normalizeClass as O, withCtx as ae, createElementBlock as z, createCommentVNode as A, renderSlot as le, Fragment as ue, createTextVNode as ie, toDisplayString as oe } from "vue";
2
2
  import { S as b, u as re, a as se, b as ce, c as de, d as fe, s as h, i as D, p as ve, e as be, l as ge, Q as I, h as me, f as he, R as ye, C as ke } from "./use-router-link-BgNwCOFX.js";
3
- import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const qe = {
3
+ import { _ as Be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const Le = {
5
5
  [b.SM]: "3px 9px",
6
6
  [b.MD]: "5px 12px",
7
7
  [b.LG]: "9px 20px"
@@ -13,10 +13,10 @@ const qe = {
13
13
  around: "around",
14
14
  evenly: "evenly",
15
15
  stretch: "stretch"
16
- }, Be = Object.keys(N), pe = {
16
+ }, pe = Object.keys(N), qe = {
17
17
  align: {
18
18
  type: String,
19
- validator: (e) => Be.includes(e)
19
+ validator: (e) => pe.includes(e)
20
20
  }
21
21
  };
22
22
  function Ce(e) {
@@ -74,7 +74,7 @@ const we = {
74
74
  default: !0
75
75
  },
76
76
  align: {
77
- ...pe.align,
77
+ ...qe.align,
78
78
  default: "center"
79
79
  },
80
80
  stack: Boolean,
@@ -100,9 +100,9 @@ function $e(e) {
100
100
  }) : u;
101
101
  }), $ = o(
102
102
  () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
103
- ), q = o(
103
+ ), L = o(
104
104
  () => e.disable !== !0 && e.loading !== !0
105
- ), E = o(() => q.value === !0 ? e.tabindex || 0 : -1), n = o(() => Te(e, "standard")), S = o(() => {
105
+ ), E = o(() => L.value === !0 ? e.tabindex || 0 : -1), n = o(() => Te(e, "standard")), S = o(() => {
106
106
  const u = { tabindex: E.value };
107
107
  return g.value === !0 ? Object.assign(u, T.value) : Se.includes(e.type) === !0 && (u.type = e.type), m.value === "a" ? (e.disable === !0 ? u["aria-disabled"] = "true" : u.href === void 0 && (u.role = "button"), a.value !== !0 && Me.test(e.type) === !0 && (u.type = e.type)) : e.disable === !0 && (u.disabled = "", u["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(u, {
108
108
  role: "progressbar",
@@ -114,23 +114,23 @@ function $e(e) {
114
114
  let u;
115
115
  e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? u = `text-${e.textColor || e.color}` : u = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (u = `text-${e.textColor}`);
116
116
  const f = e.round === !0 ? "round" : `rectangle${$.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
117
- return `q-btn--${n.value} q-btn--${f}` + (u !== void 0 ? " " + u : "") + (q.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" : "");
118
- }), B = o(
117
+ return `q-btn--${n.value} q-btn--${f}` + (u !== void 0 ? " " + u : "") + (L.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" : "");
118
+ }), p = o(
119
119
  () => v.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
120
120
  );
121
121
  return {
122
122
  classes: d,
123
123
  style: P,
124
- innerClasses: B,
124
+ innerClasses: p,
125
125
  attributes: S,
126
126
  hasLink: g,
127
127
  linkTag: m,
128
128
  navigateOnClick: w,
129
- isActionable: q
129
+ isActionable: L
130
130
  };
131
131
  }
132
132
  const { passiveCapture: r } = ge;
133
- let y = null, k = null, L = null;
133
+ let y = null, k = null, B = null;
134
134
  const xe = fe({
135
135
  name: "QBtn",
136
136
  props: {
@@ -148,10 +148,10 @@ const xe = fe({
148
148
  attributes: w,
149
149
  hasLink: P,
150
150
  linkTag: $,
151
- navigateOnClick: q,
151
+ navigateOnClick: L,
152
152
  isActionable: E
153
153
  } = $e(e), n = j(null), S = j(null);
154
- let d = null, B, u = null;
154
+ let d = null, p, u = null;
155
155
  const f = o(
156
156
  () => e.label !== void 0 && e.label !== null && e.label !== ""
157
157
  ), Q = o(() => e.disable === !0 || e.ripple === !1 ? !1 : {
@@ -206,19 +206,19 @@ const xe = fe({
206
206
  document.addEventListener("keydown", h, !0), document.addEventListener("keyup", M, r), n.value.addEventListener("blur", M, r);
207
207
  }
208
208
  }
209
- q(t);
209
+ L(t);
210
210
  }
211
211
  }
212
212
  function H(t) {
213
- n.value !== null && (v("keydown", t), D(t, [13, 32]) === !0 && k !== n.value && (k !== null && p(), t.defaultPrevented !== !0 && (n.value.focus(), k = n.value, n.value.classList.add("q-btn--active"), document.addEventListener("keyup", c, !0), n.value.addEventListener("blur", c, r)), h(t)));
213
+ n.value !== null && (v("keydown", t), D(t, [13, 32]) === !0 && k !== n.value && (k !== null && q(), t.defaultPrevented !== !0 && (n.value.focus(), k = n.value, n.value.classList.add("q-btn--active"), document.addEventListener("keyup", c, !0), n.value.addEventListener("blur", c, r)), h(t)));
214
214
  }
215
215
  function U(t) {
216
- n.value !== null && (v("touchstart", t), t.defaultPrevented !== !0 && (y !== n.value && (y !== null && p(), y = n.value, d = t.target, d.addEventListener("touchcancel", c, r), d.addEventListener("touchend", c, r)), B = !0, u !== null && clearTimeout(u), u = setTimeout(() => {
217
- u = null, B = !1;
216
+ n.value !== null && (v("touchstart", t), t.defaultPrevented !== !0 && (y !== n.value && (y !== null && q(), y = n.value, d = t.target, d.addEventListener("touchcancel", c, r), d.addEventListener("touchend", c, r)), p = !0, u !== null && clearTimeout(u), u = setTimeout(() => {
217
+ u = null, p = !1;
218
218
  }, 200)));
219
219
  }
220
220
  function X(t) {
221
- n.value !== null && (t.qSkipRipple = B === !0, v("mousedown", t), t.defaultPrevented !== !0 && L !== n.value && (L !== null && p(), L = n.value, n.value.classList.add("q-btn--active"), document.addEventListener("mouseup", c, r)));
221
+ n.value !== null && (t.qSkipRipple = p === !0, v("mousedown", t), t.defaultPrevented !== !0 && B !== n.value && (B !== null && q(), B = n.value, n.value.classList.add("q-btn--active"), document.addEventListener("mouseup", c, r)));
222
222
  }
223
223
  function c(t) {
224
224
  if (n.value !== null && !(t !== void 0 && t.type === "blur" && document.activeElement === n.value)) {
@@ -229,18 +229,18 @@ const xe = fe({
229
229
  }
230
230
  v("keyup", t);
231
231
  }
232
- p();
232
+ q();
233
233
  }
234
234
  }
235
- function p(t) {
235
+ function q(t) {
236
236
  const i = S.value;
237
- t !== !0 && (y === n.value || L === n.value) && i !== null && i !== document.activeElement && (i.setAttribute("tabindex", -1), i.focus()), y === n.value && (d !== null && (d.removeEventListener("touchcancel", c, r), d.removeEventListener("touchend", c, r)), y = d = null), L === n.value && (document.removeEventListener("mouseup", c, r), L = null), k === n.value && (document.removeEventListener("keyup", c, !0), n.value !== null && n.value.removeEventListener("blur", c, r), k = null), n.value !== null && n.value.classList.remove("q-btn--active");
237
+ t !== !0 && (y === n.value || B === n.value) && i !== null && i !== document.activeElement && (i.setAttribute("tabindex", -1), i.focus()), y === n.value && (d !== null && (d.removeEventListener("touchcancel", c, r), d.removeEventListener("touchend", c, r)), y = d = null), B === n.value && (document.removeEventListener("mouseup", c, r), B = null), k === n.value && (document.removeEventListener("keyup", c, !0), n.value !== null && n.value.removeEventListener("blur", c, r), k = null), n.value !== null && n.value.classList.remove("q-btn--active");
238
238
  }
239
239
  function C(t) {
240
240
  h(t), t.qSkipRipple = !0;
241
241
  }
242
242
  return Z(() => {
243
- p(!0);
243
+ q(!0);
244
244
  }), Object.assign(a, {
245
245
  click: (t) => {
246
246
  E.value === !0 && _(t);
@@ -306,7 +306,7 @@ const xe = fe({
306
306
  };
307
307
  }
308
308
  }), Oe = /* @__PURE__ */ te({
309
- __name: "index",
309
+ __name: "AppButton",
310
310
  props: {
311
311
  size: { default: b.MD },
312
312
  transparent: { type: Boolean },
@@ -347,7 +347,7 @@ const xe = fe({
347
347
  "no-caps": "",
348
348
  unelevated: "",
349
349
  class: O(v.value),
350
- padding: x(qe)[a.size || x(b).MD],
350
+ padding: x(Le)[a.size || x(b).MD],
351
351
  loading: a.loading,
352
352
  disable: a.disabled || void 0,
353
353
  to: a.to,
@@ -384,7 +384,7 @@ const xe = fe({
384
384
  _: 3
385
385
  }, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label"]));
386
386
  }
387
- }), je = /* @__PURE__ */ Le(Oe, [["__scopeId", "data-v-59859915"]]);
387
+ }), je = /* @__PURE__ */ Be(Oe, [["__scopeId", "data-v-64785508"]]);
388
388
  export {
389
389
  je as default
390
390
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as i, ref as l, openBlock as s, createBlock as p, mergeProps as d, withModifiers as u } from "vue";
2
2
  import { r as m, a as f } from "./focusout-DjvPXP_b.js";
3
3
  import { C } from "./use-router-link-BgNwCOFX.js";
4
- import y from "./index-91CnFQLB.js";
4
+ import y from "./AppButton-DGne1Zdn.js";
5
5
  function b(t) {
6
6
  const e = document.createElement("textarea");
7
7
  e.value = t, e.contentEditable = "true", e.style.position = "fixed";
@@ -21,7 +21,7 @@ const a = {
21
21
  COPY: "copy_o",
22
22
  COPIED: "copied_o"
23
23
  }, P = /* @__PURE__ */ i({
24
- __name: "index",
24
+ __name: "AppButtonCopy",
25
25
  props: {
26
26
  text: {},
27
27
  size: {},
@@ -51,7 +51,7 @@ const a = {
51
51
  console.log(c);
52
52
  });
53
53
  };
54
- return (c, O) => (s(), p(y, d(e, {
54
+ return (c, B) => (s(), p(y, d(e, {
55
55
  "icon-middle": o.value,
56
56
  onClick: u(r, ["prevent"])
57
57
  }), null, 16, ["icon-middle"]));
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),i=require("./focusout-DzWGke-4.cjs"),u=require("./use-router-link-DiPB_4Ct.cjs"),s=require("./AppButton-Bz5mz9Mx.cjs");function d(t){const e=document.createElement("textarea");e.value=t,e.contentEditable="true",e.style.position="fixed";const o=()=>{};i.addFocusout(o),document.body.appendChild(e),e.focus(),e.select();const n=document.execCommand("copy");return e.remove(),i.removeFocusout(o),n}function p(t){return navigator.clipboard!==void 0?navigator.clipboard.writeText(t):new Promise((e,o)=>{const n=d(t);n?e(!0):o(n)})}const r={COPY:"copy_o",COPIED:"copied_o"},f=c.defineComponent({__name:"AppButtonCopy",props:{text:{},size:{},transparent:{type:Boolean,default:!0},flat:{type:Boolean},rounded:{type:Boolean},color:{default:u.COLORS.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{}},setup(t){const e=t,o=c.ref(r.COPY),n=()=>{o.value=r.COPIED,setTimeout(()=>{o.value=r.COPY},2e3)},l=()=>{p(e.text).then(n).catch(a=>{console.log(a)})};return(a,m)=>(c.openBlock(),c.createBlock(s.default,c.mergeProps(e,{"icon-middle":o.value,onClick:c.withModifiers(l,["prevent"])}),null,16,["icon-middle"]))}});exports.default=f;
@@ -0,0 +1,19 @@
1
+ import { defineComponent as e, openBlock as n, createElementBlock as s, normalizeStyle as r, normalizeClass as l } from "vue";
2
+ import { _ as a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const c = /* @__PURE__ */ e({
4
+ __name: "AppIcon",
5
+ props: {
6
+ name: {},
7
+ size: {},
8
+ color: {}
9
+ },
10
+ setup(p) {
11
+ return (o, t) => (n(), s("i", {
12
+ class: l(["icon-kl", `icon-kl-${o.name}`, o.color ? `text-${o.color}` : ""]),
13
+ style: r(o.size ? `font-size: ${o.size}` : void 0)
14
+ }, null, 6));
15
+ }
16
+ }), f = /* @__PURE__ */ a(c, [["__scopeId", "data-v-24fca0cf"]]);
17
+ export {
18
+ f as default
19
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=o.defineComponent({__name:"AppIcon",props:{name:{},size:{},color:{}},setup(s){return(e,t)=>(o.openBlock(),o.createElementBlock("i",{class:o.normalizeClass(["icon-kl",`icon-kl-${e.name}`,e.color?`text-${e.color}`:""]),style:o.normalizeStyle(e.size?`font-size: ${e.size}`:void 0)},null,6))}}),l=n._export_sfc(r,[["__scopeId","data-v-24fca0cf"]]);exports.default=l;