@validol4ik/uikit 0.0.9 → 0.1.0

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.
@@ -0,0 +1,2 @@
1
+ export declare const icons_o: string[];
2
+ export declare const icons: string[];
@@ -0,0 +1,13 @@
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>>>, {}, {}>;
4
+ 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
+ };
@@ -0,0 +1,7 @@
1
+ import { Color } from '../types';
2
+
3
+ export interface AppIconProps {
4
+ name: string;
5
+ size?: string;
6
+ color?: Color;
7
+ }
@@ -0,0 +1,9 @@
1
+ export declare const BUTTON_SIZES: {
2
+ MD: "md" | "lg" | undefined;
3
+ LG: "md" | "lg" | undefined;
4
+ };
5
+ export declare const ICON_POSITIONS: {
6
+ LEFT: "left" | "right" | "middle" | undefined;
7
+ RIGHT: "left" | "right" | "middle" | undefined;
8
+ MIDDLE: "left" | "right" | "middle" | undefined;
9
+ };
@@ -0,0 +1,41 @@
1
+ import { AppButtonProps } from './types';
2
+
3
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<AppButtonProps>, {
4
+ size: "md" | "lg" | undefined;
5
+ color: string;
6
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ click: (...args: any[]) => void;
8
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<AppButtonProps>, {
9
+ size: "md" | "lg" | undefined;
10
+ color: string;
11
+ }>>> & {
12
+ onClick?: ((...args: any[]) => any) | undefined;
13
+ }, {
14
+ size: "md" | "lg";
15
+ color: string;
16
+ }, {}>, {
17
+ default?(_: {}): any;
18
+ }>;
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
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1,21 @@
1
+ import { QBtnProps } from 'quasar';
2
+ import { Color } from '../../types';
3
+
4
+ export interface AppButtonProps {
5
+ size?: "md" | "lg";
6
+ transparent?: boolean;
7
+ rounded?: boolean;
8
+ color?: Color;
9
+ iconPosition?: "left" | "right" | "middle";
10
+ disabled?: boolean;
11
+ loading?: QBtnProps["loading"];
12
+ to?: QBtnProps["to"];
13
+ href?: QBtnProps["href"];
14
+ target?: QBtnProps["target"];
15
+ submit?: boolean;
16
+ ariaLabel?: string;
17
+ }
18
+ export declare enum ButtonPaddings {
19
+ md = "5px 12px",
20
+ lg = "9px 20px"
21
+ }
@@ -0,0 +1,5 @@
1
+ export declare const COLORS: {
2
+ PRIMARY: string;
3
+ INFO: string;
4
+ NEGATIVE: string;
5
+ };
@@ -0,0 +1,4 @@
1
+ import { default as AppButton } from './buttons/AppButton/index.vue';
2
+ import { default as AppIcon } from './AppIcon/index.vue';
3
+
4
+ export { AppButton, AppIcon };
@@ -0,0 +1,3 @@
1
+ import { COLORS } from './constants.ts';
2
+
3
+ export type Color = typeof COLORS.PRIMARY | typeof COLORS.INFO | typeof COLORS.NEGATIVE;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ export * from './icons/index'
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+
2
+ export {};
package/dist/icons.css ADDED
@@ -0,0 +1 @@
1
+ i.icon-kl{font-family:kl!important;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-kl-book_o:before{content:""}.icon-kl-price-tag_o:before{content:""}.icon-kl-checklist:before{content:""}.icon-kl-quote_o:before{content:""}.icon-kl-play_o:before{content:""}.icon-kl-plus:before{content:""}.icon-kl-visibility-off:before{content:""}.icon-kl-visibility:before{content:""}.icon-kl-user-close_o:before{content:""}.icon-kl-user-plus_o:before{content:""}.icon-kl-user_o:before{content:""}.icon-kl-circle-question_o:before{content:""}.icon-kl-arrow-down:before{content:""}.icon-kl-arrow-left:before{content:""}.icon-kl-arrow-download:before{content:""}.icon-kl-arrow-export:before{content:""}.icon-kl-arrow-logout:before{content:""}.icon-kl-arrow-share:before{content:""}.icon-kl-bulleted-list:before{content:""}.icon-kl-menu:before{content:""}.icon-kl-text-right:before{content:""}.icon-kl-text-left:before{content:""}.icon-kl-check:before{content:""}.icon-kl-award_o:before{content:""}.icon-kl-medal_o:before{content:""}.icon-kl-bookmark_o:before{content:""}.icon-kl-calendar_o:before{content:""}.icon-kl-circle-check_o:before{content:""}.icon-kl-circle-info_o:before{content:""}.icon-kl-pie-chart_o:before{content:""}.icon-kl-edit_o:before{content:""}.icon-kl-trash_o:before{content:""}.icon-kl-copy_o:before{content:""}.icon-kl-copied_o:before{content:""}.icon-kl-folder_o:before{content:""}.icon-kl-folder-plus_o:before{content:""}.icon-kl-file-plus_o:before{content:""}.icon-kl-flag_o:before{content:""}.icon-kl-home_o:before{content:""}.icon-kl-timer_o:before{content:""}.icon-kl-unlock_o:before{content:""}.icon-kl-lock_o:before{content:""}.icon-kl-mail_o:before{content:""}.icon-kl-plus1:before{content:""}.icon-kl-book:before{content:""}.icon-kl-price-tag:before{content:""}.icon-kl-quote:before{content:""}.icon-kl-play:before{content:""}.icon-kl-award:before{content:""}.icon-kl-medal:before{content:""}.icon-kl-bookmark:before{content:""}.icon-kl-calendar:before{content:""}.icon-kl-circle-check:before{content:""}.icon-kl-circle-info:before{content:""}.icon-kl-pie-chart:before{content:""}.icon-kl-edit:before{content:""}.icon-kl-trash:before{content:""}.icon-kl-copy:before{content:""}.icon-kl-copied:before{content:""}.icon-kl-folder:before{content:""}.icon-kl-folder-plus:before{content:""}.icon-kl-file-plus:before{content:""}.icon-kl-flag:before{content:""}.icon-kl-home:before{content:""}.icon-kl-timer:before{content:""}.icon-kl-unlock:before{content:""}.icon-kl-lock:before{content:""}.icon-kl-mail:before{content:""}.icon-kl-user-close:before{content:""}.icon-kl-user-plus:before{content:""}.icon-kl-user:before{content:""}
package/dist/kl.woff ADDED
Binary file
package/dist/main.css ADDED
@@ -0,0 +1 @@
1
+ .app-btn[data-v-efc0cd34] .q-btn__content{font-family:OpenSans,sans-serif;font-weight:600}.app-btn_md[data-v-efc0cd34]{font-size:14px;border-radius:8px}.app-btn_md[data-v-efc0cd34] .q-btn__content{line-height:22px}.app-btn_md[data-v-efc0cd34] .icon-kl{font-size:22px}.app-btn_md.app-btn_icon-left[data-v-efc0cd34]{padding-left:9px!important}.app-btn_md.app-btn_icon-left[data-v-efc0cd34] .icon-kl{margin-right:4px}.app-btn_md.app-btn_icon-right[data-v-efc0cd34]{padding-right:9px!important}.app-btn_md.app-btn_icon-right[data-v-efc0cd34] .icon-kl{margin-left:4px}.app-btn_md.app-btn_icon-middle[data-v-efc0cd34]{padding:6px!important}.app-btn_lg[data-v-efc0cd34]{font-size:17px;border-radius:10px}.app-btn_lg[data-v-efc0cd34] .q-btn__content{line-height:26px}.app-btn_lg[data-v-efc0cd34] .icon-kl{font-size:26px}.app-btn_lg.app-btn_icon-left[data-v-efc0cd34]{padding-left:16px!important}.app-btn_lg.app-btn_icon-left[data-v-efc0cd34] .icon-kl{margin-right:6px}.app-btn_lg.app-btn_icon-right[data-v-efc0cd34]{padding-right:16px!important}.app-btn_lg.app-btn_icon-right[data-v-efc0cd34] .icon-kl{margin-left:6px}.app-btn_lg.app-btn_icon-middle[data-v-efc0cd34]{padding:11px!important}.app-btn_default.app-btn_primary[data-v-efc0cd34]{background-color:#1a5cff;color:#fdfffc}.app-btn_default.app-btn_info[data-v-efc0cd34]{background-color:#399;color:#fdfffc}.app-btn_default.app-btn_negative[data-v-efc0cd34]{background-color:#ff4757;color:#fdfffc}.app-btn_trans.app-btn_primary[data-v-efc0cd34]{background-color:#1a5cff26;color:#1a5cff}.app-btn_trans.app-btn_info[data-v-efc0cd34]{background-color:#3993;color:#2e757c}.app-btn_trans.app-btn_negative[data-v-efc0cd34]{background-color:#ff475733;color:#ff4757}.app-btn_rounded[data-v-efc0cd34]{border-radius:50px}.icon-kl[data-v-73419357]{font-size:24px}
package/dist/uikit.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),D={MD:"md",LG:"lg"};var ne=(e=>(e.md="5px 12px",e.lg="9px 20px",e))(ne||{});const de={PRIMARY:"primary",INFO:"info",NEGATIVE:"negative"},V={xs:18,sm:24,md:32,lg:38,xl:46},ae={size:String};function re(e,t=V){return n.computed(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function Q(e){return n.markRaw(n.defineComponent(e))}function fe(e){return n.markRaw(e)}function ve(e,t){return e!==void 0&&e()||t}function A(e,t){return e!==void 0?t.concat(e()):t}const U="0 0 24 24",Y=e=>e,N=e=>`ionicons ${e}`,oe={"mdi-":e=>`mdi ${e}`,"icon-":Y,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":N,"ion-ios":N,"ion-logo":N,"iconfont ":Y,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},ue={o_:"-outlined",r_:"-round",s_:"-sharp"},ie={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},me=new RegExp("^("+Object.keys(oe).join("|")+")"),ge=new RegExp("^("+Object.keys(ue).join("|")+")"),G=new RegExp("^("+Object.keys(ie).join("|")+")"),pe=/^[Mm]\s?[-+]?\.?\d/,he=/^img:/,be=/^svguse:/,ye=/^ion-/,ke=/^(fa-(sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,H=Q({name:"QIcon",props:{...ae,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:r}}=n.getCurrentInstance(),a=re(e),u=n.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),f=n.computed(()=>{let c,i=e.name;if(i==="none"||!i)return{none:!0};if(r.iconMapFn!==null){const s=r.iconMapFn(i);if(s!==void 0)if(s.icon!==void 0){if(i=s.icon,i==="none"||!i)return{none:!0}}else return{cls:s.cls,content:s.content!==void 0?s.content:" "}}if(pe.test(i)===!0){const[s,h=U]=i.split("|");return{svg:!0,viewBox:h,nodes:s.split("&&").map(l=>{const[b,g,y]=l.split("@@");return n.h("path",{style:g,d:b,transform:y})})}}if(he.test(i)===!0)return{img:!0,src:i.substring(4)};if(be.test(i)===!0){const[s,h=U]=i.split("|");return{svguse:!0,src:s.substring(7),viewBox:h}}let $=" ";const p=i.match(me);if(p!==null)c=oe[p[1]](i);else if(ke.test(i)===!0)c=i;else if(ye.test(i)===!0)c=`ionicons ion-${r.platform.is.ios===!0?"ios":"md"}${i.substring(3)}`;else if(G.test(i)===!0){c="notranslate material-symbols";const s=i.match(G);s!==null&&(i=i.substring(6),c+=ie[s[1]]),$=i}else{c="notranslate material-icons";const s=i.match(ge);s!==null&&(i=i.substring(2),c+=ue[s[1]]),$=i}return{cls:c,content:$}});return()=>{const c={class:u.value,style:a.value,"aria-hidden":"true",role:"presentation"};return f.value.none===!0?n.h(e.tag,c,ve(t.default)):f.value.img===!0?n.h(e.tag,c,A(t.default,[n.h("img",{src:f.value.src})])):f.value.svg===!0?n.h(e.tag,c,A(t.default,[n.h("svg",{viewBox:f.value.viewBox||"0 0 24 24"},f.value.nodes)])):f.value.svguse===!0?n.h(e.tag,c,A(t.default,[n.h("svg",{viewBox:f.value.viewBox},[n.h("use",{"xlink:href":f.value.src})])])):(f.value.cls!==void 0&&(c.class+=" "+f.value.cls),n.h(e.tag,c,A(t.default,[f.value.content])))}}}),$e={size:{type:[String,Number],default:"1em"},color:String};function qe(e){return{cSize:n.computed(()=>e.size in V?`${V[e.size]}px`:e.size),classes:n.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const _e=Q({name:"QSpinner",props:{...$e,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:r}=qe(e);return()=>n.h("svg",{class:r.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[n.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 a in t)r[a]=t[a]}const K={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(K,{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 xe(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 le(e){e.stopPropagation()}function Ce(e){e.cancelable!==!1&&e.preventDefault()}function R(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Se(e,t,r){const a=`__q_${t}_evt`;e[a]=e[a]!==void 0?e[a].concat(r):r,r.forEach(u=>{u[0].addEventListener(u[1],e[u[2]],K[u[3]])})}function we(e,t){const r=`__q_${t}_evt`;e[r]!==void 0&&(e[r].forEach(a=>{a[0].removeEventListener(a[1],e[a[2]],K[a[3]])}),e[r]=void 0)}function Be(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function F(e,t){return Be(e)===!0?!1:[].concat(t).includes(e.keyCode)}function Le(e,t=250){let r=!1,a;return function(){return r===!1&&(r=!0,setTimeout(()=>{r=!1},t),a=e.apply(this,arguments)),a}}function W(e,t,r,a){r.modifiers.stop===!0&&le(e);const u=r.modifiers.color;let f=r.modifiers.center;f=f===!0||a===!0;const c=document.createElement("span"),i=document.createElement("span"),$=xe(e),{left:p,top:s,width:h,height:l}=t.getBoundingClientRect(),b=Math.sqrt(h*h+l*l),g=b/2,y=`${(h-b)/2}px`,d=f?y:`${$.left-p-g}px`,k=`${(l-b)/2}px`,L=f?k:`${$.top-s-g}px`;i.className="q-ripple__inner",Ee(i,{height:`${b}px`,width:`${b}px`,transform:`translate3d(${d},${L},0) scale3d(.2,.2,1)`,opacity:0}),c.className=`q-ripple${u?" text-"+u:""}`,c.setAttribute("dir","ltr"),c.appendChild(i),t.appendChild(c);const w=()=>{c.remove(),clearTimeout(B)};r.abort.push(w);let B=setTimeout(()=>{i.classList.add("q-ripple__inner--enter"),i.style.transform=`translate3d(${y},${k},0) scale3d(1,1,1)`,i.style.opacity=.2,B=setTimeout(()=>{i.classList.remove("q-ripple__inner--enter"),i.classList.add("q-ripple__inner--leave"),i.style.opacity=0,B=setTimeout(()=>{c.remove(),r.abort.splice(r.abort.indexOf(w),1)},275)},250)},50)}function X(e,{modifiers:t,value:r,arg:a}){const u=Object.assign({},e.cfg.ripple,t,r);e.modifiers={early:u.early===!0,stop:u.stop===!0,center:u.center===!0,color:u.color||a,keyCodes:[].concat(u.keyCodes||13)}}const Re=fe({name:"ripple",beforeMount(e,t){const r=t.instance.$.appContext.config.globalProperties.$q.config||{};if(r.ripple===!1)return;const a={cfg:r,enabled:t.value!==!1,modifiers:{},abort:[],start(u){a.enabled===!0&&u.qSkipRipple!==!0&&u.type===(a.modifiers.early===!0?"pointerdown":"click")&&W(u,e,a,u.qKeyEvent===!0)},keystart:Le(u=>{a.enabled===!0&&u.qSkipRipple!==!0&&F(u,a.modifiers.keyCodes)===!0&&u.type===`key${a.modifiers.early===!0?"down":"up"}`&&W(u,e,a,!0)},300)};X(a,t),e.__qripple=a,Se(a,"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()}),we(t,"main"),delete e._qripple)}}),se={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Pe=Object.keys(se),Te={align:{type:String,validator:e=>Pe.includes(e)}};function Oe(e){return n.computed(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${se[t]}`})}function Me(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 a=t[r],u=e[r];if(typeof a=="string"){if(a!==u)return!1}else if(Array.isArray(u)===!1||u.length!==a.length||a.some((f,c)=>f!==u[c]))return!1}return!0}function ee(e,t){return Array.isArray(t)===!0?e.length===t.length&&e.every((r,a)=>r===t[a]):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 De({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const r=n.getCurrentInstance(),{props:a,proxy:u,emit:f}=r,c=Me(r),i=n.computed(()=>a.disable!==!0&&a.href!==void 0),$=t===!0?n.computed(()=>c===!0&&a.disable!==!0&&i.value!==!0&&a.to!==void 0&&a.to!==null&&a.to!==""):n.computed(()=>c===!0&&i.value!==!0&&a.to!==void 0&&a.to!==null&&a.to!==""),p=n.computed(()=>$.value===!0?L(a.to):null),s=n.computed(()=>p.value!==null),h=n.computed(()=>i.value===!0||s.value===!0),l=n.computed(()=>a.type==="a"||h.value===!0?"a":a.tag||e||"div"),b=n.computed(()=>i.value===!0?{href:a.href,target:a.target}:s.value===!0?{href:p.value.href,target:a.target}:{}),g=n.computed(()=>{if(s.value===!1)return-1;const{matched:v}=p.value,{length:q}=v,E=v[q-1];if(E===void 0)return-1;const C=u.$route.matched;if(C.length===0)return-1;const S=C.findIndex(J.bind(null,E));if(S!==-1)return S;const j=Z(v[q-2]);return q>1&&Z(E)===j&&C[C.length-1].path!==j?C.findIndex(J.bind(null,v[q-2])):S}),y=n.computed(()=>s.value===!0&&g.value!==-1&&ze(u.$route.params,p.value.params)),d=n.computed(()=>y.value===!0&&g.value===u.$route.matched.length-1&&je(u.$route.params,p.value.params)),k=n.computed(()=>s.value===!0?d.value===!0?` ${a.exactActiveClass} ${a.activeClass}`:a.exact===!0?"":y.value===!0?` ${a.activeClass}`:"":"");function L(v){try{return u.$router.resolve(v)}catch{}return null}function w(v,{returnRouterError:q,to:E=a.to,replace:C=a.replace}={}){if(a.disable===!0)return v.preventDefault(),Promise.resolve(!1);if(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey||v.button!==void 0&&v.button!==0||a.target==="_blank")return Promise.resolve(!1);v.preventDefault();const S=u.$router[C===!0?"replace":"push"](E);return q===!0?S:S.then(()=>{}).catch(()=>{})}function B(v){if(s.value===!0){const q=E=>w(v,E);f("click",v,q),v.defaultPrevented!==!0&&q()}else f("click",v)}return{hasRouterLink:s,hasHrefLink:i,hasLink:h,linkTag:l,resolvedLink:p,linkIsActive:y,linkIsExactActive:d,linkClass:k,linkAttrs:b,getLink:L,navigateToRouterLink:w,navigateOnClick:B}}const te={none:0,xs:4,sm:8,md:16,lg:24,xl:32},Ke={xs:8,sm:10,md:14,lg:20,xl:24},Ne=["button","submit","reset"],Ve=/[^\s]\/[^\s]/,Fe=["flat","outline","push","unelevated"];function Qe(e,t){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":t}const Ue={...ae,...Ie,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...Fe.reduce((e,t)=>(e[t]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...Te.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Ye={...Ue,round:Boolean};function Ge(e){const t=re(e,Ke),r=Oe(e),{hasRouterLink:a,hasLink:u,linkTag:f,linkAttrs:c,navigateOnClick:i}=De({fallbackTag:"button"}),$=n.computed(()=>{const d=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},d,{padding:e.padding.split(/\s+/).map(k=>k in te?te[k]+"px":k).join(" "),minWidth:"0",minHeight:"0"}):d}),p=n.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),s=n.computed(()=>e.disable!==!0&&e.loading!==!0),h=n.computed(()=>s.value===!0?e.tabindex||0:-1),l=n.computed(()=>Qe(e,"standard")),b=n.computed(()=>{const d={tabindex:h.value};return u.value===!0?Object.assign(d,c.value):Ne.includes(e.type)===!0&&(d.type=e.type),f.value==="a"?(e.disable===!0?d["aria-disabled"]="true":d.href===void 0&&(d.role="button"),a.value!==!0&&Ve.test(e.type)===!0&&(d.type=e.type)):e.disable===!0&&(d.disabled="",d["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(d,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),d}),g=n.computed(()=>{let d;e.color!==void 0?e.flat===!0||e.outline===!0?d=`text-${e.textColor||e.color}`:d=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(d=`text-${e.textColor}`);const k=e.round===!0?"round":`rectangle${p.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${l.value} q-btn--${k}`+(d!==void 0?" "+d:"")+(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=n.computed(()=>r.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:g,style:$,innerClasses:y,attributes:b,hasLink:u,linkTag:f,navigateOnClick:i,isActionable:s}}const{passiveCapture:_}=K;let P=null,T=null,O=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:a}=n.getCurrentInstance(),{classes:u,style:f,innerClasses:c,attributes:i,hasLink:$,linkTag:p,navigateOnClick:s,isActionable:h}=Ge(e),l=n.ref(null),b=n.ref(null);let g=null,y,d=null;const k=n.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),L=n.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:$.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),w=n.computed(()=>({center:e.round})),B=n.computed(()=>{const o=Math.max(0,Math.min(100,e.percentage));return o>0?{transition:"transform 0.6s",transform:`translateX(${o-100}%)`}:{}}),v=n.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:C,onMousedown:j};if(a.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";o[`onTouchstart${m}`]=S}return o}return{onClick:R}}),q=n.computed(()=>({ref:l,class:"q-btn q-btn-item non-selectable no-outline "+u.value,style:f.value,...i.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 I=()=>{document.removeEventListener("keydown",R,!0),document.removeEventListener("keyup",I,_),l.value!==null&&l.value.removeEventListener("blur",I,_)};document.addEventListener("keydown",R,!0),document.addEventListener("keyup",I,_),l.value.addEventListener("blur",I,_)}}s(o)}}function C(o){l.value!==null&&(r("keydown",o),F(o,[13,32])===!0&&T!==l.value&&(T!==null&&M(),o.defaultPrevented!==!0&&(l.value.focus(),T=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("keyup",x,!0),l.value.addEventListener("blur",x,_)),R(o)))}function S(o){l.value!==null&&(r("touchstart",o),o.defaultPrevented!==!0&&(P!==l.value&&(P!==null&&M(),P=l.value,g=o.target,g.addEventListener("touchcancel",x,_),g.addEventListener("touchend",x,_)),y=!0,d!==null&&clearTimeout(d),d=setTimeout(()=>{d=null,y=!1},200)))}function j(o){l.value!==null&&(o.qSkipRipple=y===!0,r("mousedown",o),o.defaultPrevented!==!0&&O!==l.value&&(O!==null&&M(),O=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("mouseup",x,_)))}function x(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&&Ce(m),o.cancelBubble===!0&&le(m),l.value.dispatchEvent(m),R(o),o.qKeyEvent=!0}r("keyup",o)}M()}}function M(o){const m=b.value;o!==!0&&(P===l.value||O===l.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex",-1),m.focus()),P===l.value&&(g!==null&&(g.removeEventListener("touchcancel",x,_),g.removeEventListener("touchend",x,_)),P=g=null),O===l.value&&(document.removeEventListener("mouseup",x,_),O=null),T===l.value&&(document.removeEventListener("keyup",x,!0),l.value!==null&&l.value.removeEventListener("blur",x,_),T=null),l.value!==null&&l.value.classList.remove("q-btn--active")}function z(o){R(o),o.qSkipRipple=!0}return n.onBeforeUnmount(()=>{M(!0)}),Object.assign(a,{click:o=>{h.value===!0&&E(o)}}),()=>{let o=[];e.icon!==void 0&&o.push(n.h(H,{name:e.icon,left:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"})),k.value===!0&&o.push(n.h("span",{class:"block"},[e.label])),o=A(t.default,o),e.iconRight!==void 0&&e.round===!1&&o.push(n.h(H,{name:e.iconRight,right:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"}));const m=[n.h("span",{class:"q-focus-helper",ref:b})];return e.loading===!0&&e.percentage!==void 0&&m.push(n.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[n.h("span",{class:"q-btn__progress-indicator fit block",style:B.value})])),m.push(n.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+c.value},o)),e.loading!==null&&m.push(n.h(n.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[n.h("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[n.h(_e)])]:null)),n.withDirectives(n.h(p.value,q.value,m),[[Re,L.value,void 0,w.value]])}}}),We=n.defineComponent({__name:"index",props:{size:{default:D.MD},transparent:{type:Boolean},rounded:{type:Boolean},color:{default:de.PRIMARY},iconPosition:{},disabled:{type:Boolean},loading:{type:[Boolean,null]},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{}},emits:["click"],setup(e){const t=e,r=n.computed(()=>["app-btn",{"app-btn_default":!t.transparent,"app-btn_trans":t.transparent,"app-btn_rounded":t.rounded,"app-btn_md":t.size===D.MD,"app-btn_lg":t.size===D.LG},`app-btn_${t.color}`,`app-btn_icon-${t.iconPosition}`]);return(a,u)=>(n.openBlock(),n.createBlock(n.unref(He),{"no-caps":"",unelevated:"",class:n.normalizeClass(r.value),padding:n.unref(ne)[t.size||n.unref(D).MD],loading:a.loading,disabled:a.disabled||void 0,to:a.to,href:a.href,target:a.target,type:a.submit?"submit":void 0,"aria-label":a.ariaLabel,onClick:u[0]||(u[0]=f=>a.$emit("click"))},{default:n.withCtx(()=>[n.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3},8,["class","padding","loading","disabled","to","href","target","type","aria-label"]))}}),ce=(e,t)=>{const r=e.__vccOpts||e;for(const[a,u]of t)r[a]=u;return r},Xe=ce(We,[["__scopeId","data-v-efc0cd34"]]),Ze=n.defineComponent({__name:"index",props:{name:{},size:{},color:{}},setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("i",{class:n.normalizeClass(["icon-kl",`icon-kl-${t.name}`,t.color?`text-${t.color}`:""]),style:n.normalizeStyle(t.size?`font-size: ${t.size}`:void 0)},null,6))}}),Je=ce(Ze,[["__scopeId","data-v-73419357"]]);exports.AppButton=Xe;exports.AppIcon=Je;
@@ -0,0 +1 @@
1
+ export * from './components/index'
@@ -0,0 +1,840 @@
1
+ import { computed as u, markRaw as oe, defineComponent as Y, getCurrentInstance as G, h as v, ref as W, onBeforeUnmount as ye, Transition as ke, withDirectives as $e, openBlock as ue, createBlock as _e, unref as V, normalizeClass as se, withCtx as qe, renderSlot as Ee, createElementBlock as xe, normalizeStyle as Ce } from "vue";
2
+ const K = {
3
+ MD: "md",
4
+ LG: "lg"
5
+ };
6
+ var ce = /* @__PURE__ */ ((e) => (e.md = "5px 12px", e.lg = "9px 20px", e))(ce || {});
7
+ const Le = {
8
+ PRIMARY: "primary",
9
+ INFO: "info",
10
+ NEGATIVE: "negative"
11
+ }, Q = {
12
+ xs: 18,
13
+ sm: 24,
14
+ md: 32,
15
+ lg: 38,
16
+ xl: 46
17
+ }, de = {
18
+ size: String
19
+ };
20
+ function fe(e, t = Q) {
21
+ return u(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
22
+ }
23
+ function H(e) {
24
+ return oe(Y(e));
25
+ }
26
+ function Se(e) {
27
+ return oe(e);
28
+ }
29
+ function we(e, t) {
30
+ return e !== void 0 && e() || t;
31
+ }
32
+ function j(e, t) {
33
+ return e !== void 0 ? t.concat(e()) : t;
34
+ }
35
+ const X = "0 0 24 24", Z = (e) => e, F = (e) => `ionicons ${e}`, ve = {
36
+ "mdi-": (e) => `mdi ${e}`,
37
+ "icon-": Z,
38
+ // fontawesome equiv
39
+ "bt-": (e) => `bt ${e}`,
40
+ "eva-": (e) => `eva ${e}`,
41
+ "ion-md": F,
42
+ "ion-ios": F,
43
+ "ion-logo": F,
44
+ "iconfont ": Z,
45
+ "ti-": (e) => `themify-icon ${e}`,
46
+ "bi-": (e) => `bootstrap-icons ${e}`
47
+ }, ge = {
48
+ o_: "-outlined",
49
+ r_: "-round",
50
+ s_: "-sharp"
51
+ }, me = {
52
+ sym_o_: "-outlined",
53
+ sym_r_: "-rounded",
54
+ sym_s_: "-sharp"
55
+ }, Be = new RegExp("^(" + Object.keys(ve).join("|") + ")"), Re = new RegExp("^(" + Object.keys(ge).join("|") + ")"), J = new RegExp("^(" + Object.keys(me).join("|") + ")"), Pe = /^[Mm]\s?[-+]?\.?\d/, Te = /^img:/, Oe = /^svguse:/, Me = /^ion-/, ze = /^(fa-(sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, ee = H({
56
+ name: "QIcon",
57
+ props: {
58
+ ...de,
59
+ tag: {
60
+ type: String,
61
+ default: "i"
62
+ },
63
+ name: String,
64
+ color: String,
65
+ left: Boolean,
66
+ right: Boolean
67
+ },
68
+ setup(e, { slots: t }) {
69
+ const { proxy: { $q: a } } = G(), n = fe(e), i = u(
70
+ () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
71
+ ), f = u(() => {
72
+ let c, l = e.name;
73
+ if (l === "none" || !l)
74
+ return { none: !0 };
75
+ if (a.iconMapFn !== null) {
76
+ const s = a.iconMapFn(l);
77
+ if (s !== void 0)
78
+ if (s.icon !== void 0) {
79
+ if (l = s.icon, l === "none" || !l)
80
+ return { none: !0 };
81
+ } else
82
+ return {
83
+ cls: s.cls,
84
+ content: s.content !== void 0 ? s.content : " "
85
+ };
86
+ }
87
+ if (Pe.test(l) === !0) {
88
+ const [s, p = X] = l.split("|");
89
+ return {
90
+ svg: !0,
91
+ viewBox: p,
92
+ nodes: s.split("&&").map((o) => {
93
+ const [y, b, k] = o.split("@@");
94
+ return v("path", { style: b, d: y, transform: k });
95
+ })
96
+ };
97
+ }
98
+ if (Te.test(l) === !0)
99
+ return {
100
+ img: !0,
101
+ src: l.substring(4)
102
+ };
103
+ if (Oe.test(l) === !0) {
104
+ const [s, p = X] = l.split("|");
105
+ return {
106
+ svguse: !0,
107
+ src: s.substring(7),
108
+ viewBox: p
109
+ };
110
+ }
111
+ let _ = " ";
112
+ const h = l.match(Be);
113
+ if (h !== null)
114
+ c = ve[h[1]](l);
115
+ else if (ze.test(l) === !0)
116
+ c = l;
117
+ else if (Me.test(l) === !0)
118
+ c = `ionicons ion-${a.platform.is.ios === !0 ? "ios" : "md"}${l.substring(3)}`;
119
+ else if (J.test(l) === !0) {
120
+ c = "notranslate material-symbols";
121
+ const s = l.match(J);
122
+ s !== null && (l = l.substring(6), c += me[s[1]]), _ = l;
123
+ } else {
124
+ c = "notranslate material-icons";
125
+ const s = l.match(Re);
126
+ s !== null && (l = l.substring(2), c += ge[s[1]]), _ = l;
127
+ }
128
+ return {
129
+ cls: c,
130
+ content: _
131
+ };
132
+ });
133
+ return () => {
134
+ const c = {
135
+ class: i.value,
136
+ style: n.value,
137
+ "aria-hidden": "true",
138
+ role: "presentation"
139
+ };
140
+ return f.value.none === !0 ? v(e.tag, c, we(t.default)) : f.value.img === !0 ? v(e.tag, c, j(t.default, [
141
+ v("img", { src: f.value.src })
142
+ ])) : f.value.svg === !0 ? v(e.tag, c, j(t.default, [
143
+ v("svg", {
144
+ viewBox: f.value.viewBox || "0 0 24 24"
145
+ }, f.value.nodes)
146
+ ])) : f.value.svguse === !0 ? v(e.tag, c, j(t.default, [
147
+ v("svg", {
148
+ viewBox: f.value.viewBox
149
+ }, [
150
+ v("use", { "xlink:href": f.value.src })
151
+ ])
152
+ ])) : (f.value.cls !== void 0 && (c.class += " " + f.value.cls), v(e.tag, c, j(t.default, [
153
+ f.value.content
154
+ ])));
155
+ };
156
+ }
157
+ }), Ae = {
158
+ size: {
159
+ type: [String, Number],
160
+ default: "1em"
161
+ },
162
+ color: String
163
+ };
164
+ function je(e) {
165
+ return {
166
+ cSize: u(() => e.size in Q ? `${Q[e.size]}px` : e.size),
167
+ classes: u(
168
+ () => "q-spinner" + (e.color ? ` text-${e.color}` : "")
169
+ )
170
+ };
171
+ }
172
+ const Ie = H({
173
+ name: "QSpinner",
174
+ props: {
175
+ ...Ae,
176
+ thickness: {
177
+ type: Number,
178
+ default: 5
179
+ }
180
+ },
181
+ setup(e) {
182
+ const { cSize: t, classes: a } = je(e);
183
+ return () => v("svg", {
184
+ class: a.value + " q-spinner-mat",
185
+ width: t.value,
186
+ height: t.value,
187
+ viewBox: "25 25 50 50"
188
+ }, [
189
+ v("circle", {
190
+ class: "path",
191
+ cx: "50",
192
+ cy: "50",
193
+ r: "20",
194
+ fill: "none",
195
+ stroke: "currentColor",
196
+ "stroke-width": e.thickness,
197
+ "stroke-miterlimit": "10"
198
+ })
199
+ ]);
200
+ }
201
+ });
202
+ function De(e, t) {
203
+ const a = e.style;
204
+ for (const n in t)
205
+ a[n] = t[n];
206
+ }
207
+ const N = {
208
+ hasPassive: !1,
209
+ passiveCapture: !0,
210
+ notPassiveCapture: !0
211
+ };
212
+ try {
213
+ const e = Object.defineProperty({}, "passive", {
214
+ get() {
215
+ Object.assign(N, {
216
+ hasPassive: !0,
217
+ passive: { passive: !0 },
218
+ notPassive: { passive: !1 },
219
+ passiveCapture: { passive: !0, capture: !0 },
220
+ notPassiveCapture: { passive: !1, capture: !0 }
221
+ });
222
+ }
223
+ });
224
+ window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
225
+ } catch {
226
+ }
227
+ function Ke(e) {
228
+ 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]), {
229
+ top: e.clientY,
230
+ left: e.clientX
231
+ };
232
+ }
233
+ function be(e) {
234
+ e.stopPropagation();
235
+ }
236
+ function Ne(e) {
237
+ e.cancelable !== !1 && e.preventDefault();
238
+ }
239
+ function P(e) {
240
+ e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
241
+ }
242
+ function Ve(e, t, a) {
243
+ const n = `__q_${t}_evt`;
244
+ e[n] = e[n] !== void 0 ? e[n].concat(a) : a, a.forEach((i) => {
245
+ i[0].addEventListener(i[1], e[i[2]], N[i[3]]);
246
+ });
247
+ }
248
+ function Fe(e, t) {
249
+ const a = `__q_${t}_evt`;
250
+ e[a] !== void 0 && (e[a].forEach((n) => {
251
+ n[0].removeEventListener(n[1], e[n[2]], N[n[3]]);
252
+ }), e[a] = void 0);
253
+ }
254
+ function Qe(e) {
255
+ return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
256
+ }
257
+ function U(e, t) {
258
+ return Qe(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
259
+ }
260
+ function Ue(e, t = 250) {
261
+ let a = !1, n;
262
+ return function() {
263
+ return a === !1 && (a = !0, setTimeout(() => {
264
+ a = !1;
265
+ }, t), n = e.apply(this, arguments)), n;
266
+ };
267
+ }
268
+ function te(e, t, a, n) {
269
+ a.modifiers.stop === !0 && be(e);
270
+ const i = a.modifiers.color;
271
+ let f = a.modifiers.center;
272
+ f = f === !0 || n === !0;
273
+ const c = document.createElement("span"), l = document.createElement("span"), _ = Ke(e), { left: h, top: s, width: p, height: o } = t.getBoundingClientRect(), y = Math.sqrt(p * p + o * o), b = y / 2, k = `${(p - y) / 2}px`, d = f ? k : `${_.left - h - b}px`, $ = `${(o - y) / 2}px`, R = f ? $ : `${_.top - s - b}px`;
274
+ l.className = "q-ripple__inner", De(l, {
275
+ height: `${y}px`,
276
+ width: `${y}px`,
277
+ transform: `translate3d(${d},${R},0) scale3d(.2,.2,1)`,
278
+ opacity: 0
279
+ }), c.className = `q-ripple${i ? " text-" + i : ""}`, c.setAttribute("dir", "ltr"), c.appendChild(l), t.appendChild(c);
280
+ const w = () => {
281
+ c.remove(), clearTimeout(B);
282
+ };
283
+ a.abort.push(w);
284
+ let B = setTimeout(() => {
285
+ l.classList.add("q-ripple__inner--enter"), l.style.transform = `translate3d(${k},${$},0) scale3d(1,1,1)`, l.style.opacity = 0.2, B = setTimeout(() => {
286
+ l.classList.remove("q-ripple__inner--enter"), l.classList.add("q-ripple__inner--leave"), l.style.opacity = 0, B = setTimeout(() => {
287
+ c.remove(), a.abort.splice(a.abort.indexOf(w), 1);
288
+ }, 275);
289
+ }, 250);
290
+ }, 50);
291
+ }
292
+ function ne(e, { modifiers: t, value: a, arg: n }) {
293
+ const i = Object.assign({}, e.cfg.ripple, t, a);
294
+ e.modifiers = {
295
+ early: i.early === !0,
296
+ stop: i.stop === !0,
297
+ center: i.center === !0,
298
+ color: i.color || n,
299
+ keyCodes: [].concat(i.keyCodes || 13)
300
+ };
301
+ }
302
+ const Ye = Se(
303
+ {
304
+ name: "ripple",
305
+ beforeMount(e, t) {
306
+ const a = t.instance.$.appContext.config.globalProperties.$q.config || {};
307
+ if (a.ripple === !1)
308
+ return;
309
+ const n = {
310
+ cfg: a,
311
+ enabled: t.value !== !1,
312
+ modifiers: {},
313
+ abort: [],
314
+ start(i) {
315
+ n.enabled === !0 && i.qSkipRipple !== !0 && i.type === (n.modifiers.early === !0 ? "pointerdown" : "click") && te(i, e, n, i.qKeyEvent === !0);
316
+ },
317
+ keystart: Ue((i) => {
318
+ n.enabled === !0 && i.qSkipRipple !== !0 && U(i, n.modifiers.keyCodes) === !0 && i.type === `key${n.modifiers.early === !0 ? "down" : "up"}` && te(i, e, n, !0);
319
+ }, 300)
320
+ };
321
+ ne(n, t), e.__qripple = n, Ve(n, "main", [
322
+ [e, "pointerdown", "start", "passive"],
323
+ [e, "click", "start", "passive"],
324
+ [e, "keydown", "keystart", "passive"],
325
+ [e, "keyup", "keystart", "passive"]
326
+ ]);
327
+ },
328
+ updated(e, t) {
329
+ if (t.oldValue !== t.value) {
330
+ const a = e.__qripple;
331
+ a !== void 0 && (a.enabled = t.value !== !1, a.enabled === !0 && Object(t.value) === t.value && ne(a, t));
332
+ }
333
+ },
334
+ beforeUnmount(e) {
335
+ const t = e.__qripple;
336
+ t !== void 0 && (t.abort.forEach((a) => {
337
+ a();
338
+ }), Fe(t, "main"), delete e._qripple);
339
+ }
340
+ }
341
+ ), he = {
342
+ left: "start",
343
+ center: "center",
344
+ right: "end",
345
+ between: "between",
346
+ around: "around",
347
+ evenly: "evenly",
348
+ stretch: "stretch"
349
+ }, Ge = Object.keys(he), He = {
350
+ align: {
351
+ type: String,
352
+ validator: (e) => Ge.includes(e)
353
+ }
354
+ };
355
+ function We(e) {
356
+ return u(() => {
357
+ const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
358
+ return `${e.vertical === !0 ? "items" : "justify"}-${he[t]}`;
359
+ });
360
+ }
361
+ function Xe(e) {
362
+ return e.appContext.config.globalProperties.$router !== void 0;
363
+ }
364
+ function ae(e) {
365
+ return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
366
+ }
367
+ function re(e, t) {
368
+ return (e.aliasOf || e) === (t.aliasOf || t);
369
+ }
370
+ function Ze(e, t) {
371
+ for (const a in t) {
372
+ const n = t[a], i = e[a];
373
+ if (typeof n == "string") {
374
+ if (n !== i)
375
+ return !1;
376
+ } else if (Array.isArray(i) === !1 || i.length !== n.length || n.some((f, c) => f !== i[c]))
377
+ return !1;
378
+ }
379
+ return !0;
380
+ }
381
+ function ie(e, t) {
382
+ return Array.isArray(t) === !0 ? e.length === t.length && e.every((a, n) => a === t[n]) : e.length === 1 && e[0] === t;
383
+ }
384
+ function Je(e, t) {
385
+ return Array.isArray(e) === !0 ? ie(e, t) : Array.isArray(t) === !0 ? ie(t, e) : e === t;
386
+ }
387
+ function et(e, t) {
388
+ if (Object.keys(e).length !== Object.keys(t).length)
389
+ return !1;
390
+ for (const a in e)
391
+ if (Je(e[a], t[a]) === !1)
392
+ return !1;
393
+ return !0;
394
+ }
395
+ const tt = {
396
+ // router-link
397
+ to: [String, Object],
398
+ replace: Boolean,
399
+ // regular <a> link
400
+ href: String,
401
+ target: String,
402
+ // state
403
+ disable: Boolean
404
+ };
405
+ function nt({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
406
+ const a = G(), { props: n, proxy: i, emit: f } = a, c = Xe(a), l = u(() => n.disable !== !0 && n.href !== void 0), _ = t === !0 ? u(
407
+ () => c === !0 && n.disable !== !0 && l.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
408
+ ) : u(
409
+ () => c === !0 && l.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
410
+ ), h = u(() => _.value === !0 ? R(n.to) : null), s = u(() => h.value !== null), p = u(() => l.value === !0 || s.value === !0), o = u(() => n.type === "a" || p.value === !0 ? "a" : n.tag || e || "div"), y = u(() => l.value === !0 ? {
411
+ href: n.href,
412
+ target: n.target
413
+ } : s.value === !0 ? {
414
+ href: h.value.href,
415
+ target: n.target
416
+ } : {}), b = u(() => {
417
+ if (s.value === !1)
418
+ return -1;
419
+ const { matched: g } = h.value, { length: q } = g, x = g[q - 1];
420
+ if (x === void 0)
421
+ return -1;
422
+ const L = i.$route.matched;
423
+ if (L.length === 0)
424
+ return -1;
425
+ const S = L.findIndex(
426
+ re.bind(null, x)
427
+ );
428
+ if (S !== -1)
429
+ return S;
430
+ const I = ae(g[q - 2]);
431
+ return (
432
+ // we are dealing with nested routes
433
+ q > 1 && ae(x) === I && L[L.length - 1].path !== I ? L.findIndex(
434
+ re.bind(null, g[q - 2])
435
+ ) : S
436
+ );
437
+ }), k = u(
438
+ () => s.value === !0 && b.value !== -1 && Ze(i.$route.params, h.value.params)
439
+ ), d = u(
440
+ () => k.value === !0 && b.value === i.$route.matched.length - 1 && et(i.$route.params, h.value.params)
441
+ ), $ = u(() => s.value === !0 ? d.value === !0 ? ` ${n.exactActiveClass} ${n.activeClass}` : n.exact === !0 ? "" : k.value === !0 ? ` ${n.activeClass}` : "" : "");
442
+ function R(g) {
443
+ try {
444
+ return i.$router.resolve(g);
445
+ } catch {
446
+ }
447
+ return null;
448
+ }
449
+ function w(g, { returnRouterError: q, to: x = n.to, replace: L = n.replace } = {}) {
450
+ if (n.disable === !0)
451
+ return g.preventDefault(), Promise.resolve(!1);
452
+ if (
453
+ // don't redirect with control keys;
454
+ // should match RouterLink from Vue Router
455
+ g.metaKey || g.altKey || g.ctrlKey || g.shiftKey || g.button !== void 0 && g.button !== 0 || n.target === "_blank"
456
+ )
457
+ return Promise.resolve(!1);
458
+ g.preventDefault();
459
+ const S = i.$router[L === !0 ? "replace" : "push"](x);
460
+ return q === !0 ? S : S.then(() => {
461
+ }).catch(() => {
462
+ });
463
+ }
464
+ function B(g) {
465
+ if (s.value === !0) {
466
+ const q = (x) => w(g, x);
467
+ f("click", g, q), g.defaultPrevented !== !0 && q();
468
+ } else
469
+ f("click", g);
470
+ }
471
+ return {
472
+ hasRouterLink: s,
473
+ hasHrefLink: l,
474
+ hasLink: p,
475
+ linkTag: o,
476
+ resolvedLink: h,
477
+ linkIsActive: k,
478
+ linkIsExactActive: d,
479
+ linkClass: $,
480
+ linkAttrs: y,
481
+ getLink: R,
482
+ navigateToRouterLink: w,
483
+ navigateOnClick: B
484
+ };
485
+ }
486
+ const le = {
487
+ none: 0,
488
+ xs: 4,
489
+ sm: 8,
490
+ md: 16,
491
+ lg: 24,
492
+ xl: 32
493
+ }, at = {
494
+ xs: 8,
495
+ sm: 10,
496
+ md: 14,
497
+ lg: 20,
498
+ xl: 24
499
+ }, rt = ["button", "submit", "reset"], it = /[^\s]\/[^\s]/, lt = ["flat", "outline", "push", "unelevated"];
500
+ function ot(e, t) {
501
+ return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
502
+ }
503
+ const ut = {
504
+ ...de,
505
+ ...tt,
506
+ type: {
507
+ type: String,
508
+ default: "button"
509
+ },
510
+ label: [Number, String],
511
+ icon: String,
512
+ iconRight: String,
513
+ ...lt.reduce(
514
+ (e, t) => (e[t] = Boolean) && e,
515
+ {}
516
+ ),
517
+ square: Boolean,
518
+ rounded: Boolean,
519
+ glossy: Boolean,
520
+ size: String,
521
+ fab: Boolean,
522
+ fabMini: Boolean,
523
+ padding: String,
524
+ color: String,
525
+ textColor: String,
526
+ noCaps: Boolean,
527
+ noWrap: Boolean,
528
+ dense: Boolean,
529
+ tabindex: [Number, String],
530
+ ripple: {
531
+ type: [Boolean, Object],
532
+ default: !0
533
+ },
534
+ align: {
535
+ ...He.align,
536
+ default: "center"
537
+ },
538
+ stack: Boolean,
539
+ stretch: Boolean,
540
+ loading: {
541
+ type: Boolean,
542
+ default: null
543
+ },
544
+ disable: Boolean
545
+ }, st = {
546
+ ...ut,
547
+ round: Boolean
548
+ };
549
+ function ct(e) {
550
+ const t = fe(e, at), a = We(e), { hasRouterLink: n, hasLink: i, linkTag: f, linkAttrs: c, navigateOnClick: l } = nt({
551
+ fallbackTag: "button"
552
+ }), _ = u(() => {
553
+ const d = e.fab === !1 && e.fabMini === !1 ? t.value : {};
554
+ return e.padding !== void 0 ? Object.assign({}, d, {
555
+ padding: e.padding.split(/\s+/).map(($) => $ in le ? le[$] + "px" : $).join(" "),
556
+ minWidth: "0",
557
+ minHeight: "0"
558
+ }) : d;
559
+ }), h = u(
560
+ () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
561
+ ), s = u(
562
+ () => e.disable !== !0 && e.loading !== !0
563
+ ), p = u(() => s.value === !0 ? e.tabindex || 0 : -1), o = u(() => ot(e, "standard")), y = u(() => {
564
+ const d = { tabindex: p.value };
565
+ return i.value === !0 ? Object.assign(d, c.value) : rt.includes(e.type) === !0 && (d.type = e.type), f.value === "a" ? (e.disable === !0 ? d["aria-disabled"] = "true" : d.href === void 0 && (d.role = "button"), n.value !== !0 && it.test(e.type) === !0 && (d.type = e.type)) : e.disable === !0 && (d.disabled = "", d["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(d, {
566
+ role: "progressbar",
567
+ "aria-valuemin": 0,
568
+ "aria-valuemax": 100,
569
+ "aria-valuenow": e.percentage
570
+ }), d;
571
+ }), b = u(() => {
572
+ let d;
573
+ e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? d = `text-${e.textColor || e.color}` : d = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (d = `text-${e.textColor}`);
574
+ const $ = e.round === !0 ? "round" : `rectangle${h.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
575
+ return `q-btn--${o.value} q-btn--${$}` + (d !== void 0 ? " " + d : "") + (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" : "");
576
+ }), k = u(
577
+ () => a.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
578
+ );
579
+ return {
580
+ classes: b,
581
+ style: _,
582
+ innerClasses: k,
583
+ attributes: y,
584
+ hasLink: i,
585
+ linkTag: f,
586
+ navigateOnClick: l,
587
+ isActionable: s
588
+ };
589
+ }
590
+ const { passiveCapture: E } = N;
591
+ let T = null, O = null, M = null;
592
+ const dt = H({
593
+ name: "QBtn",
594
+ props: {
595
+ ...st,
596
+ percentage: Number,
597
+ darkPercentage: Boolean,
598
+ onTouchstart: [Function, Array]
599
+ },
600
+ emits: ["click", "keydown", "mousedown", "keyup"],
601
+ setup(e, { slots: t, emit: a }) {
602
+ const { proxy: n } = G(), {
603
+ classes: i,
604
+ style: f,
605
+ innerClasses: c,
606
+ attributes: l,
607
+ hasLink: _,
608
+ linkTag: h,
609
+ navigateOnClick: s,
610
+ isActionable: p
611
+ } = ct(e), o = W(null), y = W(null);
612
+ let b = null, k, d = null;
613
+ const $ = u(
614
+ () => e.label !== void 0 && e.label !== null && e.label !== ""
615
+ ), R = u(() => e.disable === !0 || e.ripple === !1 ? !1 : {
616
+ keyCodes: _.value === !0 ? [13, 32] : [13],
617
+ ...e.ripple === !0 ? {} : e.ripple
618
+ }), w = u(() => ({ center: e.round })), B = u(() => {
619
+ const r = Math.max(0, Math.min(100, e.percentage));
620
+ return r > 0 ? { transition: "transform 0.6s", transform: `translateX(${r - 100}%)` } : {};
621
+ }), g = u(() => {
622
+ if (e.loading === !0)
623
+ return {
624
+ onMousedown: A,
625
+ onTouchstart: A,
626
+ onClick: A,
627
+ onKeydown: A,
628
+ onKeyup: A
629
+ };
630
+ if (p.value === !0) {
631
+ const r = {
632
+ onClick: x,
633
+ onKeydown: L,
634
+ onMousedown: I
635
+ };
636
+ if (n.$q.platform.has.touch === !0) {
637
+ const m = e.onTouchstart !== void 0 ? "" : "Passive";
638
+ r[`onTouchstart${m}`] = S;
639
+ }
640
+ return r;
641
+ }
642
+ return {
643
+ // needed; especially for disabled <a> tags
644
+ onClick: P
645
+ };
646
+ }), q = u(() => ({
647
+ ref: o,
648
+ class: "q-btn q-btn-item non-selectable no-outline " + i.value,
649
+ style: f.value,
650
+ ...l.value,
651
+ ...g.value
652
+ }));
653
+ function x(r) {
654
+ if (o.value !== null) {
655
+ if (r !== void 0) {
656
+ if (r.defaultPrevented === !0)
657
+ return;
658
+ const m = document.activeElement;
659
+ if (e.type === "submit" && m !== document.body && o.value.contains(m) === !1 && m.contains(o.value) === !1) {
660
+ o.value.focus();
661
+ const D = () => {
662
+ document.removeEventListener("keydown", P, !0), document.removeEventListener("keyup", D, E), o.value !== null && o.value.removeEventListener("blur", D, E);
663
+ };
664
+ document.addEventListener("keydown", P, !0), document.addEventListener("keyup", D, E), o.value.addEventListener("blur", D, E);
665
+ }
666
+ }
667
+ s(r);
668
+ }
669
+ }
670
+ function L(r) {
671
+ o.value !== null && (a("keydown", r), U(r, [13, 32]) === !0 && O !== o.value && (O !== null && z(), r.defaultPrevented !== !0 && (o.value.focus(), O = o.value, o.value.classList.add("q-btn--active"), document.addEventListener("keyup", C, !0), o.value.addEventListener("blur", C, E)), P(r)));
672
+ }
673
+ function S(r) {
674
+ o.value !== null && (a("touchstart", r), r.defaultPrevented !== !0 && (T !== o.value && (T !== null && z(), T = o.value, b = r.target, b.addEventListener("touchcancel", C, E), b.addEventListener("touchend", C, E)), k = !0, d !== null && clearTimeout(d), d = setTimeout(() => {
675
+ d = null, k = !1;
676
+ }, 200)));
677
+ }
678
+ function I(r) {
679
+ o.value !== null && (r.qSkipRipple = k === !0, a("mousedown", r), r.defaultPrevented !== !0 && M !== o.value && (M !== null && z(), M = o.value, o.value.classList.add("q-btn--active"), document.addEventListener("mouseup", C, E)));
680
+ }
681
+ function C(r) {
682
+ if (o.value !== null && !(r !== void 0 && r.type === "blur" && document.activeElement === o.value)) {
683
+ if (r !== void 0 && r.type === "keyup") {
684
+ if (O === o.value && U(r, [13, 32]) === !0) {
685
+ const m = new MouseEvent("click", r);
686
+ m.qKeyEvent = !0, r.defaultPrevented === !0 && Ne(m), r.cancelBubble === !0 && be(m), o.value.dispatchEvent(m), P(r), r.qKeyEvent = !0;
687
+ }
688
+ a("keyup", r);
689
+ }
690
+ z();
691
+ }
692
+ }
693
+ function z(r) {
694
+ const m = y.value;
695
+ r !== !0 && (T === o.value || M === o.value) && m !== null && m !== document.activeElement && (m.setAttribute("tabindex", -1), m.focus()), T === o.value && (b !== null && (b.removeEventListener("touchcancel", C, E), b.removeEventListener("touchend", C, E)), T = b = null), M === o.value && (document.removeEventListener("mouseup", C, E), M = null), O === o.value && (document.removeEventListener("keyup", C, !0), o.value !== null && o.value.removeEventListener("blur", C, E), O = null), o.value !== null && o.value.classList.remove("q-btn--active");
696
+ }
697
+ function A(r) {
698
+ P(r), r.qSkipRipple = !0;
699
+ }
700
+ return ye(() => {
701
+ z(!0);
702
+ }), Object.assign(n, {
703
+ click: (r) => {
704
+ p.value === !0 && x(r);
705
+ }
706
+ }), () => {
707
+ let r = [];
708
+ e.icon !== void 0 && r.push(
709
+ v(ee, {
710
+ name: e.icon,
711
+ left: e.stack !== !0 && $.value === !0,
712
+ role: "img",
713
+ "aria-hidden": "true"
714
+ })
715
+ ), $.value === !0 && r.push(
716
+ v("span", { class: "block" }, [e.label])
717
+ ), r = j(t.default, r), e.iconRight !== void 0 && e.round === !1 && r.push(
718
+ v(ee, {
719
+ name: e.iconRight,
720
+ right: e.stack !== !0 && $.value === !0,
721
+ role: "img",
722
+ "aria-hidden": "true"
723
+ })
724
+ );
725
+ const m = [
726
+ v("span", {
727
+ class: "q-focus-helper",
728
+ ref: y
729
+ })
730
+ ];
731
+ return e.loading === !0 && e.percentage !== void 0 && m.push(
732
+ v("span", {
733
+ class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
734
+ }, [
735
+ v("span", {
736
+ class: "q-btn__progress-indicator fit block",
737
+ style: B.value
738
+ })
739
+ ])
740
+ ), m.push(
741
+ v("span", {
742
+ class: "q-btn__content text-center col items-center q-anchor--skip " + c.value
743
+ }, r)
744
+ ), e.loading !== null && m.push(
745
+ v(ke, {
746
+ name: "q-transition--fade"
747
+ }, () => e.loading === !0 ? [
748
+ v("span", {
749
+ key: "loading",
750
+ class: "absolute-full flex flex-center"
751
+ }, t.loading !== void 0 ? t.loading() : [v(Ie)])
752
+ ] : null)
753
+ ), $e(
754
+ v(
755
+ h.value,
756
+ q.value,
757
+ m
758
+ ),
759
+ [[
760
+ Ye,
761
+ R.value,
762
+ void 0,
763
+ w.value
764
+ ]]
765
+ );
766
+ };
767
+ }
768
+ }), ft = /* @__PURE__ */ Y({
769
+ __name: "index",
770
+ props: {
771
+ size: { default: K.MD },
772
+ transparent: { type: Boolean },
773
+ rounded: { type: Boolean },
774
+ color: { default: Le.PRIMARY },
775
+ iconPosition: {},
776
+ disabled: { type: Boolean },
777
+ loading: { type: [Boolean, null] },
778
+ to: {},
779
+ href: {},
780
+ target: {},
781
+ submit: { type: Boolean },
782
+ ariaLabel: {}
783
+ },
784
+ emits: ["click"],
785
+ setup(e) {
786
+ const t = e, a = u(() => [
787
+ "app-btn",
788
+ {
789
+ "app-btn_default": !t.transparent,
790
+ "app-btn_trans": t.transparent,
791
+ "app-btn_rounded": t.rounded,
792
+ "app-btn_md": t.size === K.MD,
793
+ "app-btn_lg": t.size === K.LG
794
+ },
795
+ `app-btn_${t.color}`,
796
+ `app-btn_icon-${t.iconPosition}`
797
+ ]);
798
+ return (n, i) => (ue(), _e(V(dt), {
799
+ "no-caps": "",
800
+ unelevated: "",
801
+ class: se(a.value),
802
+ padding: V(ce)[t.size || V(K).MD],
803
+ loading: n.loading,
804
+ disabled: n.disabled || void 0,
805
+ to: n.to,
806
+ href: n.href,
807
+ target: n.target,
808
+ type: n.submit ? "submit" : void 0,
809
+ "aria-label": n.ariaLabel,
810
+ onClick: i[0] || (i[0] = (f) => n.$emit("click"))
811
+ }, {
812
+ default: qe(() => [
813
+ Ee(n.$slots, "default", {}, void 0, !0)
814
+ ]),
815
+ _: 3
816
+ }, 8, ["class", "padding", "loading", "disabled", "to", "href", "target", "type", "aria-label"]));
817
+ }
818
+ }), pe = (e, t) => {
819
+ const a = e.__vccOpts || e;
820
+ for (const [n, i] of t)
821
+ a[n] = i;
822
+ return a;
823
+ }, mt = /* @__PURE__ */ pe(ft, [["__scopeId", "data-v-efc0cd34"]]), vt = /* @__PURE__ */ Y({
824
+ __name: "index",
825
+ props: {
826
+ name: {},
827
+ size: {},
828
+ color: {}
829
+ },
830
+ setup(e) {
831
+ return (t, a) => (ue(), xe("i", {
832
+ class: se(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
833
+ style: Ce(t.size ? `font-size: ${t.size}` : void 0)
834
+ }, null, 6));
835
+ }
836
+ }), bt = /* @__PURE__ */ pe(vt, [["__scopeId", "data-v-73419357"]]);
837
+ export {
838
+ mt as AppButton,
839
+ bt as AppIcon
840
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@validol4ik/uikit",
3
- "version": "0.0.9",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "main": "./dist/uikit.cjs",
6
6
  "module": "./dist/uikit.es.js",