@validol4ik/uikit 0.2.0 → 0.2.2

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,13 +1,3 @@
1
1
  import { AppIconProps } from './types';
2
-
3
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<AppIconProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AppIconProps>>>, {}, {}>;
2
+ declare const _default: import('vue').DefineComponent<AppIconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AppIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
3
  export default _default;
5
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
6
- type __VLS_TypePropsToRuntimeProps<T> = {
7
- [K in keyof T]-?: {} extends Pick<T, K> ? {
8
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
9
- } : {
10
- type: import('vue').PropType<T[K]>;
11
- required: true;
12
- };
13
- };
@@ -1,6 +1,5 @@
1
1
  import { Color } from '../types';
2
2
  import { icons_o, icons } from './iconsList';
3
-
4
3
  export interface AppIconProps {
5
4
  name: string;
6
5
  size?: string;
@@ -1,39 +1,22 @@
1
1
  import { AppButtonProps } from './types';
2
-
3
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<AppButtonProps>, {
4
- size: "sm" | "md" | "lg" | undefined;
5
- color: string;
6
- }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
+ declare function __VLS_template(): {
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ attrs: Partial<{}>;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<AppButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
11
  click: (...args: any[]) => void;
8
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<AppButtonProps>, {
9
- size: "sm" | "md" | "lg" | undefined;
10
- color: string;
11
- }>>> & {
12
+ }, string, import('vue').PublicProps, Readonly<AppButtonProps> & Readonly<{
12
13
  onClick?: ((...args: any[]) => any) | undefined;
13
- }, {
14
+ }>, {
14
15
  size: "sm" | "md" | "lg";
15
- color: string;
16
- }, {}>, {
17
- default?(_: {}): any;
18
- }>;
16
+ color: import('../../types').Color;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
19
  export default _default;
20
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
21
- type __VLS_TypePropsToRuntimeProps<T> = {
22
- [K in keyof T]-?: {} extends Pick<T, K> ? {
23
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
24
- } : {
25
- type: import('vue').PropType<T[K]>;
26
- required: true;
27
- };
28
- };
29
- type __VLS_WithDefaults<P, D> = {
30
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
31
- default: D[K];
32
- }> : P[K];
33
- };
34
- type __VLS_Prettify<T> = {
35
- [K in keyof T]: T[K];
36
- } & {};
37
20
  type __VLS_WithTemplateSlots<T, S> = T & {
38
21
  new (): {
39
22
  $slots: S;
@@ -1,7 +1,6 @@
1
1
  import { QBtnProps } from 'quasar';
2
2
  import { Color } from '../../types';
3
3
  import { AppIconNames } from '../../AppIcon/types';
4
-
5
4
  export interface AppButtonProps {
6
5
  size?: "sm" | "md" | "lg";
7
6
  transparent?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { AppIconNames } from '../../AppIcon/types';
2
-
3
2
  declare const _default: {
4
3
  COPY: AppIconNames;
5
4
  COPIED: AppIconNames;
@@ -1,30 +1,6 @@
1
1
  import { default as CopyButtonProps } from './types';
2
-
3
- declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyButtonProps>, {
2
+ declare const _default: import('vue').DefineComponent<CopyButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CopyButtonProps> & Readonly<{}>, {
4
3
  transparent: boolean;
5
- color: string;
6
- }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyButtonProps>, {
7
- transparent: boolean;
8
- color: string;
9
- }>>>, {
10
- color: string;
11
- transparent: boolean;
12
- }, {}>;
4
+ color: import('../../types').Color;
5
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
6
  export default _default;
14
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
- type __VLS_TypePropsToRuntimeProps<T> = {
16
- [K in keyof T]-?: {} extends Pick<T, K> ? {
17
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
18
- } : {
19
- type: import('vue').PropType<T[K]>;
20
- required: true;
21
- };
22
- };
23
- type __VLS_WithDefaults<P, D> = {
24
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
25
- default: D[K];
26
- }> : P[K];
27
- };
28
- type __VLS_Prettify<T> = {
29
- [K in keyof T]: T[K];
30
- } & {};
@@ -1,5 +1,4 @@
1
1
  import { AppButtonProps } from '../AppButton/types';
2
-
3
2
  export default interface CopyButtonProps extends AppButtonProps {
4
3
  text: string;
5
4
  }
@@ -1,6 +1,7 @@
1
+ import { AppButtonProps } from './AppButton/types';
1
2
  declare const _default: {
2
- SM: "sm" | "md" | "lg" | undefined;
3
- MD: "sm" | "md" | "lg" | undefined;
4
- LG: "sm" | "md" | "lg" | undefined;
3
+ SM: AppButtonProps["size"];
4
+ MD: AppButtonProps["size"];
5
+ LG: AppButtonProps["size"];
5
6
  };
6
7
  export default _default;
@@ -1,6 +1,7 @@
1
1
  export declare const COLORS: {
2
2
  PRIMARY: string;
3
3
  INFO: string;
4
+ ACCENT: string;
4
5
  NEGATIVE: string;
5
6
  POSITIVE: string;
6
7
  };
@@ -1,5 +1,7 @@
1
1
  import { default as AppButton } from './buttons/AppButton/index.vue';
2
- import { default as CopyButton } from './buttons/CopyButton/index.vue';
3
2
  import { default as AppIcon } from './AppIcon/index.vue';
4
-
5
- export { AppButton, AppIcon, CopyButton };
3
+ declare const AppButtonCopy: import('vue').DefineComponent<import('./buttons/CopyButton/types').default, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./buttons/CopyButton/types').default> & Readonly<{}>, {
4
+ transparent: boolean;
5
+ color: import('./types').Color;
6
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ export { AppButton, AppIcon, AppButtonCopy };
@@ -1,3 +1,2 @@
1
1
  import { COLORS } from './constants.ts';
2
-
3
- export type Color = typeof COLORS.PRIMARY | typeof COLORS.INFO | typeof COLORS.NEGATIVE | typeof COLORS.POSITIVE;
2
+ export type Color = typeof COLORS.PRIMARY | typeof COLORS.INFO | typeof COLORS.ACCENT | typeof COLORS.NEGATIVE | typeof COLORS.POSITIVE;
@@ -1 +1 @@
1
- export * from './icons/index'
1
+ export {}
@@ -1,2 +1 @@
1
-
2
1
  export {};
@@ -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",ACCENT:"accent",NEGATIVE:"negative",POSITIVE:"positive"},V={xs:18,sm:24,md:32,lg:38,xl:46},oe={size:String};function re(e,t=V){return a.computed(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function Q(e){return a.markRaw(a.defineComponent(e))}function fe(e){return a.markRaw(e)}function ve(e,t){return e!==void 0&&e()||t}function j(e,t){return e!==void 0?t.concat(e()):t}const U="0 0 24 24",Y=e=>e,K=e=>`ionicons ${e}`,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-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,H=Q({name:"QIcon",props:{...oe,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:o}}=a.getCurrentInstance(),n=re(e),i=a.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),d=a.computed(()=>{let c,u=e.name;if(u==="none"||!u)return{none:!0};if(o.iconMapFn!==null){const s=o.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 C=" ";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-${o.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]]),C=u}else{c="notranslate material-icons";const s=u.match(pe);s!==null&&(u=u.substring(2),c+=ue[s[1]]),C=u}return{cls:c,content:C}});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])))}}}),Ce={size:{type:[String,Number],default:"1em"},color:String};function Ee(e){return{cSize:a.computed(()=>e.size in V?`${V[e.size]}px`:e.size),classes:a.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const $e=Q({name:"QSpinner",props:{...Ce,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:o}=Ee(e);return()=>a.h("svg",{class:o.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 qe(e,t){const o=e.style;for(const n in t)o[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,o){const n=`__q_${t}_evt`;e[n]=e[n]!==void 0?e[n].concat(o):o,o.forEach(i=>{i[0].addEventListener(i[1],e[i[2]],D[i[3]])})}function Re(e,t){const o=`__q_${t}_evt`;e[o]!==void 0&&(e[o].forEach(n=>{n[0].removeEventListener(n[1],e[n[2]],D[n[3]])}),e[o]=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 o=!1,n;return function(){return o===!1&&(o=!0,setTimeout(()=>{o=!1},t),n=e.apply(this,arguments)),n}}function W(e,t,o,n){o.modifiers.stop===!0&&se(e);const i=o.modifiers.color;let d=o.modifiers.center;d=d===!0||n===!0;const c=document.createElement("span"),u=document.createElement("span"),C=_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:`${C.left-g-p}px`,k=`${(l-b)/2}px`,x=d?k:`${C.top-s-p}px`;u.className="q-ripple__inner",qe(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)};o.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(),o.abort.splice(o.abort.indexOf(R),1)},275)},250)},50)}function X(e,{modifiers:t,value:o,arg:n}){const i=Object.assign({},e.cfg.ripple,t,o);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 o=t.instance.$.appContext.config.globalProperties.$q.config||{};if(o.ripple===!1)return;const n={cfg:o,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 o=e.__qripple;o!==void 0&&(o.enabled=t.value!==!1,o.enabled===!0&&Object(t.value)===t.value&&X(o,t))}},beforeUnmount(e){const t=e.__qripple;t!==void 0&&(t.abort.forEach(o=>{o()}),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 o in t){const n=t[o],i=e[o];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((o,n)=>o===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 o in e)if(Ae(e[o],t[o])===!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 o=a.getCurrentInstance(),{props:n,proxy:i,emit:d}=o,c=Oe(o),u=a.computed(()=>n.disable!==!0&&n.href!==void 0),C=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(()=>C.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:E}=v,q=v[E-1];if(q===void 0)return-1;const B=i.$route.matched;if(B.length===0)return-1;const L=B.findIndex(J.bind(null,q));if(L!==-1)return L;const I=Z(v[E-2]);return E>1&&Z(q)===I&&B[B.length-1].path!==I?B.findIndex(J.bind(null,v[E-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:E,to:q=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"](q);return E===!0?L:L.then(()=>{}).catch(()=>{})}function S(v){if(s.value===!0){const E=q=>R(v,q);d("click",v,E),v.defaultPrevented!==!0&&E()}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={...oe,...Ie,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...Fe.reduce((e,t)=>(e[t]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...Te.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Ye={...Ue,round:Boolean};function Ge(e){const t=re(e,De),o=Me(e),{hasRouterLink:n,hasLink:i,linkTag:d,linkAttrs:c,navigateOnClick:u}=Ne({fallbackTag:"button"}),C=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(()=>o.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:C,innerClasses:y,attributes:b,hasLink:i,linkTag:d,navigateOnClick:u,isActionable:s}}const{passiveCapture:$}=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:o}){const{proxy:n}=a.getCurrentInstance(),{classes:i,style:d,innerClasses:c,attributes:u,hasLink:C,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:C.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),R=a.computed(()=>({center:e.round})),S=a.computed(()=>{const r=Math.max(0,Math.min(100,e.percentage));return r>0?{transition:"transform 0.6s",transform:`translateX(${r-100}%)`}:{}}),v=a.computed(()=>{if(e.loading===!0)return{onMousedown:z,onTouchstart:z,onClick:z,onKeydown:z,onKeyup:z};if(h.value===!0){const r={onClick:q,onKeydown:B,onMousedown:I};if(n.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";r[`onTouchstart${m}`]=L}return r}return{onClick:w}}),E=a.computed(()=>({ref:l,class:"q-btn q-btn-item non-selectable no-outline "+i.value,style:d.value,...u.value,...v.value}));function q(r){if(l.value!==null){if(r!==void 0){if(r.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,$),l.value!==null&&l.value.removeEventListener("blur",N,$)};document.addEventListener("keydown",w,!0),document.addEventListener("keyup",N,$),l.value.addEventListener("blur",N,$)}}s(r)}}function B(r){l.value!==null&&(o("keydown",r),F(r,[13,32])===!0&&T!==l.value&&(T!==null&&O(),r.defaultPrevented!==!0&&(l.value.focus(),T=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("keyup",_,!0),l.value.addEventListener("blur",_,$)),w(r)))}function L(r){l.value!==null&&(o("touchstart",r),r.defaultPrevented!==!0&&(P!==l.value&&(P!==null&&O(),P=l.value,p=r.target,p.addEventListener("touchcancel",_,$),p.addEventListener("touchend",_,$)),y=!0,f!==null&&clearTimeout(f),f=setTimeout(()=>{f=null,y=!1},200)))}function I(r){l.value!==null&&(r.qSkipRipple=y===!0,o("mousedown",r),r.defaultPrevented!==!0&&M!==l.value&&(M!==null&&O(),M=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("mouseup",_,$)))}function _(r){if(l.value!==null&&!(r!==void 0&&r.type==="blur"&&document.activeElement===l.value)){if(r!==void 0&&r.type==="keyup"){if(T===l.value&&F(r,[13,32])===!0){const m=new MouseEvent("click",r);m.qKeyEvent=!0,r.defaultPrevented===!0&&Be(m),r.cancelBubble===!0&&se(m),l.value.dispatchEvent(m),w(r),r.qKeyEvent=!0}o("keyup",r)}O()}}function O(r){const m=b.value;r!==!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",_,$),p.removeEventListener("touchend",_,$)),P=p=null),M===l.value&&(document.removeEventListener("mouseup",_,$),M=null),T===l.value&&(document.removeEventListener("keyup",_,!0),l.value!==null&&l.value.removeEventListener("blur",_,$),T=null),l.value!==null&&l.value.classList.remove("q-btn--active")}function z(r){w(r),r.qSkipRipple=!0}return a.onBeforeUnmount(()=>{O(!0)}),Object.assign(n,{click:r=>{h.value===!0&&q(r)}}),()=>{let r=[];e.icon!==void 0&&r.push(a.h(H,{name:e.icon,left:e.stack!==!0&&k.value===!0,role:"img"})),k.value===!0&&r.push(a.h("span",{class:"block"},[e.label])),r=j(t.default,r),e.iconRight!==void 0&&e.round===!1&&r.push(a.h(H,{name:e.iconRight,right:e.stack!==!0&&k.value===!0,role:"img"}));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},r)),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($e)])]:null)),a.withDirectives(a.h(g.value,E.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,o=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(o.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 o=e.__vccOpts||e;for(const[n,i]of t)o[n]=i;return o},Xe=de(We,[["__scopeId","data-v-16e02783"]]),Ze=a.defineComponent({__name:"index",props:{name:{},size:{},color:{}},setup(e){return(t,o)=>(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-DGMHft9c.cjs")));exports.AppButton=Xe;exports.AppButtonCopy=et;exports.COLORS=ae;exports.index=Je;