@validol4ik/uikit 0.2.1 → 0.2.3

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,184 @@
1
+ import { ref as b, reactive as v, defineComponent as h, openBlock as x, createBlock as k, unref as y, mergeProps as g, withModifiers as O } from "vue";
2
+ import { C, A as P } from "./index-BS3pXsq7.js";
3
+ function M(o, i, t, r) {
4
+ return Object.defineProperty(o, i, {
5
+ get: t,
6
+ set: r,
7
+ enumerable: !0
8
+ }), o;
9
+ }
10
+ const s = b(
11
+ !1
12
+ );
13
+ let f;
14
+ function S(o, i) {
15
+ const t = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(o) || /(opr)[\/]([\w.]+)/.exec(o) || /(vivaldi)[\/]([\w.]+)/.exec(o) || /(chrome|crios)[\/]([\w.]+)/.exec(o) || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(o) || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(o) || /(firefox|fxios)[\/]([\w.]+)/.exec(o) || /(webkit)[\/]([\w.]+)/.exec(o) || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(o) || [];
16
+ return {
17
+ browser: t[5] || t[3] || t[1] || "",
18
+ version: t[4] || t[2] || "0",
19
+ platform: i[0] || ""
20
+ };
21
+ }
22
+ function _(o) {
23
+ return /(ipad)/.exec(o) || /(ipod)/.exec(o) || /(windows phone)/.exec(o) || /(iphone)/.exec(o) || /(kindle)/.exec(o) || /(silk)/.exec(o) || /(android)/.exec(o) || /(win)/.exec(o) || /(mac)/.exec(o) || /(linux)/.exec(o) || /(cros)/.exec(o) || /(playbook)/.exec(o) || /(bb)/.exec(o) || /(blackberry)/.exec(o) || [];
24
+ }
25
+ const w = "ontouchstart" in window || window.navigator.maxTouchPoints > 0;
26
+ function B(o) {
27
+ const i = o.toLowerCase(), t = _(i), r = S(i, t), e = {
28
+ mobile: !1,
29
+ desktop: !1,
30
+ cordova: !1,
31
+ capacitor: !1,
32
+ nativeMobile: !1,
33
+ // nativeMobileWrapper: void 0,
34
+ electron: !1,
35
+ bex: !1,
36
+ linux: !1,
37
+ mac: !1,
38
+ win: !1,
39
+ cros: !1,
40
+ chrome: !1,
41
+ firefox: !1,
42
+ opera: !1,
43
+ safari: !1,
44
+ vivaldi: !1,
45
+ edge: !1,
46
+ edgeChromium: !1,
47
+ ie: !1,
48
+ webkit: !1,
49
+ android: !1,
50
+ ios: !1,
51
+ ipad: !1,
52
+ iphone: !1,
53
+ ipod: !1,
54
+ kindle: !1,
55
+ winphone: !1,
56
+ blackberry: !1,
57
+ playbook: !1,
58
+ silk: !1
59
+ };
60
+ r.browser && (e[r.browser] = !0, e.version = r.version, e.versionNumber = parseInt(r.version, 10)), r.platform && (e[r.platform] = !0);
61
+ const n = e.android || e.ios || e.bb || e.blackberry || e.ipad || e.iphone || e.ipod || e.kindle || e.playbook || e.silk || e["windows phone"];
62
+ if (n === !0 || i.indexOf("mobile") !== -1 ? e.mobile = !0 : e.desktop = !0, e["windows phone"] && (e.winphone = !0, delete e["windows phone"]), e.edga || e.edgios || e.edg ? (e.edge = !0, r.browser = "edge") : e.crios ? (e.chrome = !0, r.browser = "chrome") : e.fxios && (e.firefox = !0, r.browser = "firefox"), (e.ipod || e.ipad || e.iphone) && (e.ios = !0), e.vivaldi && (r.browser = "vivaldi", e.vivaldi = !0), // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
63
+ (e.chrome || e.opr || e.safari || e.vivaldi || e.mobile === !0 && e.ios !== !0 && n !== !0) && (e.webkit = !0), e.opr && (r.browser = "opera", e.opera = !0), e.safari && (e.blackberry || e.bb ? (r.browser = "blackberry", e.blackberry = !0) : e.playbook ? (r.browser = "playbook", e.playbook = !0) : e.android ? (r.browser = "android", e.android = !0) : e.kindle ? (r.browser = "kindle", e.kindle = !0) : e.silk && (r.browser = "silk", e.silk = !0)), e.name = r.browser, e.platform = r.platform, i.indexOf("electron") !== -1)
64
+ e.electron = !0;
65
+ else if (document.location.href.indexOf("-extension://") !== -1)
66
+ e.bex = !0;
67
+ else {
68
+ if (window.Capacitor !== void 0 ? (e.capacitor = !0, e.nativeMobile = !0, e.nativeMobileWrapper = "capacitor") : (window._cordovaNative !== void 0 || window.cordova !== void 0) && (e.cordova = !0, e.nativeMobile = !0, e.nativeMobileWrapper = "cordova"), s.value === !0 && (f = { is: { ...e } }), w === !0 && e.mac === !0 && (e.desktop === !0 && e.safari === !0 || e.nativeMobile === !0 && e.android !== !0 && e.ios !== !0 && e.ipad !== !0)) {
69
+ delete e.mac, delete e.desktop;
70
+ const c = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone";
71
+ Object.assign(e, {
72
+ mobile: !0,
73
+ ios: !0,
74
+ platform: c,
75
+ [c]: !0
76
+ });
77
+ }
78
+ e.mobile !== !0 && window.navigator.userAgentData && window.navigator.userAgentData.mobile && (delete e.desktop, e.mobile = !0);
79
+ }
80
+ return e;
81
+ }
82
+ const u = navigator.userAgent || navigator.vendor || window.opera, j = {
83
+ has: {
84
+ touch: !1,
85
+ webStorage: !1
86
+ },
87
+ within: { iframe: !1 }
88
+ }, l = {
89
+ userAgent: u,
90
+ is: B(u),
91
+ has: {
92
+ touch: w
93
+ },
94
+ within: {
95
+ iframe: window.self !== window.top
96
+ }
97
+ }, p = {
98
+ install(o) {
99
+ const { $q: i } = o;
100
+ s.value === !0 ? (o.onSSRHydrated.push(() => {
101
+ Object.assign(i.platform, l), s.value = !1;
102
+ }), i.platform = v(this)) : i.platform = this;
103
+ }
104
+ };
105
+ {
106
+ let o;
107
+ M(l.has, "webStorage", () => {
108
+ if (o !== void 0)
109
+ return o;
110
+ try {
111
+ if (window.localStorage)
112
+ return o = !0, !0;
113
+ } catch {
114
+ }
115
+ return o = !1, !1;
116
+ }), Object.assign(p, l), s.value === !0 && (Object.assign(p, f, j), f = null);
117
+ }
118
+ const a = [];
119
+ function m(o) {
120
+ a[a.length - 1](o);
121
+ }
122
+ function E(o) {
123
+ l.is.desktop === !0 && (a.push(o), a.length === 1 && document.body.addEventListener("focusin", m));
124
+ }
125
+ function I(o) {
126
+ const i = a.indexOf(o);
127
+ i !== -1 && (a.splice(i, 1), a.length === 0 && document.body.removeEventListener("focusin", m));
128
+ }
129
+ function L(o) {
130
+ const i = document.createElement("textarea");
131
+ i.value = o, i.contentEditable = "true", i.style.position = "fixed";
132
+ const t = () => {
133
+ };
134
+ E(t), document.body.appendChild(i), i.focus(), i.select();
135
+ const r = document.execCommand("copy");
136
+ return i.remove(), I(t), r;
137
+ }
138
+ function T(o) {
139
+ return navigator.clipboard !== void 0 ? navigator.clipboard.writeText(o) : new Promise((i, t) => {
140
+ const r = L(o);
141
+ r ? i(!0) : t(r);
142
+ });
143
+ }
144
+ const d = {
145
+ COPY: "copy_o",
146
+ COPIED: "copied_o"
147
+ }, N = /* @__PURE__ */ h({
148
+ __name: "index",
149
+ props: {
150
+ text: {},
151
+ size: {},
152
+ transparent: { type: Boolean, default: !0 },
153
+ rounded: { type: Boolean },
154
+ color: { default: C.INFO },
155
+ iconLeft: {},
156
+ iconRight: {},
157
+ iconMiddle: {},
158
+ disabled: { type: Boolean },
159
+ loading: { type: [Boolean, null] },
160
+ to: {},
161
+ href: {},
162
+ target: {},
163
+ submit: { type: Boolean },
164
+ ariaLabel: {}
165
+ },
166
+ setup(o) {
167
+ const i = o, t = b(d.COPY), r = () => {
168
+ t.value = d.COPIED, setTimeout(() => {
169
+ t.value = d.COPY;
170
+ }, 2e3);
171
+ }, e = () => {
172
+ T(i.text).then(r).catch((n) => {
173
+ console.log(n);
174
+ });
175
+ };
176
+ return (n, c) => (x(), k(y(P), g(i, {
177
+ "icon-middle": t.value,
178
+ onClick: O(e, ["prevent"])
179
+ }), null, 16, ["icon-middle"]));
180
+ }
181
+ });
182
+ export {
183
+ N as default
184
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("vue"),z={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},re={size:String};function oe(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 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:{...re,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:r}}=n.getCurrentInstance(),a=oe(e),u=n.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),l=n.computed(()=>{let c,o=e.name;if(o==="none"||!o)return{none:!0};if(r.iconMapFn!==null){const d=r.iconMapFn(o);if(d!==void 0)if(d.icon!==void 0){if(o=d.icon,o==="none"||!o)return{none:!0}}else return{cls:d.cls,content:d.content!==void 0?d.content:" "}}if(ge.test(o)===!0){const[d,h=U]=o.split("|");return{svg:!0,viewBox:h,nodes:d.split("&&").map(s=>{const[b,p,y]=s.split("@@");return n.h("path",{style:p,d:b,transform:y})})}}if(he.test(o)===!0)return{img:!0,src:o.substring(4)};if(be.test(o)===!0){const[d,h=U]=o.split("|");return{svguse:!0,src:d.substring(7),viewBox:h}}let C=" ";const g=o.match(me);if(g!==null)c=ie[g[1]](o);else if(ke.test(o)===!0)c=o;else if(ye.test(o)===!0)c=`ionicons ion-${r.platform.is.ios===!0?"ios":"md"}${o.substring(3)}`;else if(G.test(o)===!0){c="notranslate material-symbols";const d=o.match(G);d!==null&&(o=o.substring(6),c+=le[d[1]]),C=o}else{c="notranslate material-icons";const d=o.match(pe);d!==null&&(o=o.substring(2),c+=ue[d[1]]),C=o}return{cls:c,content:C}});return()=>{const c={class:u.value,style:a.value,"aria-hidden":"true",role:"presentation"};return l.value.none===!0?n.h(e.tag,c,ve(t.default)):l.value.img===!0?n.h(e.tag,c,j(t.default,[n.h("img",{src:l.value.src})])):l.value.svg===!0?n.h(e.tag,c,j(t.default,[n.h("svg",{viewBox:l.value.viewBox||"0 0 24 24"},l.value.nodes)])):l.value.svguse===!0?n.h(e.tag,c,j(t.default,[n.h("svg",{viewBox:l.value.viewBox},[n.h("use",{"xlink:href":l.value.src})])])):(l.value.cls!==void 0&&(c.class+=" "+l.value.cls),n.h(e.tag,c,j(t.default,[l.value.content])))}}}),Ce={size:{type:[String,Number],default:"1em"},color:String};function Ee(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:{...Ce,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:r}=Ee(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 qe(e,t){const r=e.style;for(const a in t)r[a]=t[a]}const D={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(D,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch{}function _e(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function se(e){e.stopPropagation()}function Be(e){e.cancelable!==!1&&e.preventDefault()}function w(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Le(e,t,r){const 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]],D[u[3]])})}function xe(e,t){const r=`__q_${t}_evt`;e[r]!==void 0&&(e[r].forEach(a=>{a[0].removeEventListener(a[1],e[a[2]],D[a[3]])}),e[r]=void 0)}function Re(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function F(e,t){return Re(e)===!0?!1:[].concat(t).includes(e.keyCode)}function Se(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&&se(e);const u=r.modifiers.color;let l=r.modifiers.center;l=l===!0||a===!0;const c=document.createElement("span"),o=document.createElement("span"),C=_e(e),{left:g,top:d,width:h,height:s}=t.getBoundingClientRect(),b=Math.sqrt(h*h+s*s),p=b/2,y=`${(h-b)/2}px`,f=l?y:`${C.left-g-p}px`,k=`${(s-b)/2}px`,S=l?k:`${C.top-d-p}px`;o.className="q-ripple__inner",qe(o,{height:`${b}px`,width:`${b}px`,transform:`translate3d(${f},${S},0) scale3d(.2,.2,1)`,opacity:0}),c.className=`q-ripple${u?" text-"+u:""}`,c.setAttribute("dir","ltr"),c.appendChild(o),t.appendChild(c);const x=()=>{c.remove(),clearTimeout(R)};r.abort.push(x);let R=setTimeout(()=>{o.classList.add("q-ripple__inner--enter"),o.style.transform=`translate3d(${y},${k},0) scale3d(1,1,1)`,o.style.opacity=.2,R=setTimeout(()=>{o.classList.remove("q-ripple__inner--enter"),o.classList.add("q-ripple__inner--leave"),o.style.opacity=0,R=setTimeout(()=>{c.remove(),r.abort.splice(r.abort.indexOf(x),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 we=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:Se(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,Le(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()}),xe(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 n.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 Ae(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((l,c)=>l!==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 ze(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(ze(e[r],t[r])===!1)return!1;return!0}const Ie={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean};function Ne({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const r=n.getCurrentInstance(),{props:a,proxy:u,emit:l}=r,c=Oe(r),o=n.computed(()=>a.disable!==!0&&a.href!==void 0),C=t===!0?n.computed(()=>c===!0&&a.disable!==!0&&o.value!==!0&&a.to!==void 0&&a.to!==null&&a.to!==""):n.computed(()=>c===!0&&o.value!==!0&&a.to!==void 0&&a.to!==null&&a.to!==""),g=n.computed(()=>C.value===!0?S(a.to):null),d=n.computed(()=>g.value!==null),h=n.computed(()=>o.value===!0||d.value===!0),s=n.computed(()=>a.type==="a"||h.value===!0?"a":a.tag||e||"div"),b=n.computed(()=>o.value===!0?{href:a.href,target:a.target}:d.value===!0?{href:g.value.href,target:a.target}:{}),p=n.computed(()=>{if(d.value===!1)return-1;const{matched:v}=g.value,{length:E}=v,q=v[E-1];if(q===void 0)return-1;const B=u.$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=n.computed(()=>d.value===!0&&p.value!==-1&&Ae(u.$route.params,g.value.params)),f=n.computed(()=>y.value===!0&&p.value===u.$route.matched.length-1&&je(u.$route.params,g.value.params)),k=n.computed(()=>d.value===!0?f.value===!0?` ${a.exactActiveClass} ${a.activeClass}`:a.exact===!0?"":y.value===!0?` ${a.activeClass}`:"":"");function S(v){try{return u.$router.resolve(v)}catch{}return null}function x(v,{returnRouterError:E,to:q=a.to,replace:B=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 L=u.$router[B===!0?"replace":"push"](q);return E===!0?L:L.then(()=>{}).catch(()=>{})}function R(v){if(d.value===!0){const E=q=>x(v,q);l("click",v,E),v.defaultPrevented!==!0&&E()}else l("click",v)}return{hasRouterLink:d,hasHrefLink:o,hasLink:h,linkTag:s,resolvedLink:g,linkIsActive:y,linkIsExactActive:f,linkClass:k,linkAttrs:b,getLink:S,navigateToRouterLink:x,navigateOnClick:R}}const te={none:0,xs:4,sm:8,md:16,lg:24,xl:32},De={xs:8,sm:10,md:14,lg:20,xl:24},Ke=["button","submit","reset"],Ve=/[^\s]\/[^\s]/,Fe=["flat","outline","push","unelevated"];function Qe(e,t){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":t}const Ue={...re,...Ie,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...Fe.reduce((e,t)=>(e[t]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...Te.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Ye={...Ue,round:Boolean};function Ge(e){const t=oe(e,De),r=Me(e),{hasRouterLink:a,hasLink:u,linkTag:l,linkAttrs:c,navigateOnClick:o}=Ne({fallbackTag:"button"}),C=n.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=n.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),d=n.computed(()=>e.disable!==!0&&e.loading!==!0),h=n.computed(()=>d.value===!0?e.tabindex||0:-1),s=n.computed(()=>Qe(e,"standard")),b=n.computed(()=>{const f={tabindex:h.value};return u.value===!0?Object.assign(f,c.value):Ke.includes(e.type)===!0&&(f.type=e.type),l.value==="a"?(e.disable===!0?f["aria-disabled"]="true":f.href===void 0&&(f.role="button"),a.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=n.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--${s.value} q-btn--${k}`+(f!==void 0?" "+f:"")+(d.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),y=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:p,style:C,innerClasses:y,attributes:b,hasLink:u,linkTag:l,navigateOnClick:o,isActionable:d}}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:r}){const{proxy:a}=n.getCurrentInstance(),{classes:u,style:l,innerClasses:c,attributes:o,hasLink:C,linkTag:g,navigateOnClick:d,isActionable:h}=Ge(e),s=n.ref(null),b=n.ref(null);let p=null,y,f=null;const k=n.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),S=n.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:C.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),x=n.computed(()=>({center:e.round})),R=n.computed(()=>{const i=Math.max(0,Math.min(100,e.percentage));return i>0?{transition:"transform 0.6s",transform:`translateX(${i-100}%)`}:{}}),v=n.computed(()=>{if(e.loading===!0)return{onMousedown:A,onTouchstart:A,onClick:A,onKeydown:A,onKeyup:A};if(h.value===!0){const i={onClick:q,onKeydown:B,onMousedown:I};if(a.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";i[`onTouchstart${m}`]=L}return i}return{onClick:w}}),E=n.computed(()=>({ref:s,class:"q-btn q-btn-item non-selectable no-outline "+u.value,style:l.value,...o.value,...v.value}));function q(i){if(s.value!==null){if(i!==void 0){if(i.defaultPrevented===!0)return;const m=document.activeElement;if(e.type==="submit"&&m!==document.body&&s.value.contains(m)===!1&&m.contains(s.value)===!1){s.value.focus();const N=()=>{document.removeEventListener("keydown",w,!0),document.removeEventListener("keyup",N,$),s.value!==null&&s.value.removeEventListener("blur",N,$)};document.addEventListener("keydown",w,!0),document.addEventListener("keyup",N,$),s.value.addEventListener("blur",N,$)}}d(i)}}function B(i){s.value!==null&&(r("keydown",i),F(i,[13,32])===!0&&T!==s.value&&(T!==null&&O(),i.defaultPrevented!==!0&&(s.value.focus(),T=s.value,s.value.classList.add("q-btn--active"),document.addEventListener("keyup",_,!0),s.value.addEventListener("blur",_,$)),w(i)))}function L(i){s.value!==null&&(r("touchstart",i),i.defaultPrevented!==!0&&(P!==s.value&&(P!==null&&O(),P=s.value,p=i.target,p.addEventListener("touchcancel",_,$),p.addEventListener("touchend",_,$)),y=!0,f!==null&&clearTimeout(f),f=setTimeout(()=>{f=null,y=!1},200)))}function I(i){s.value!==null&&(i.qSkipRipple=y===!0,r("mousedown",i),i.defaultPrevented!==!0&&M!==s.value&&(M!==null&&O(),M=s.value,s.value.classList.add("q-btn--active"),document.addEventListener("mouseup",_,$)))}function _(i){if(s.value!==null&&!(i!==void 0&&i.type==="blur"&&document.activeElement===s.value)){if(i!==void 0&&i.type==="keyup"){if(T===s.value&&F(i,[13,32])===!0){const m=new MouseEvent("click",i);m.qKeyEvent=!0,i.defaultPrevented===!0&&Be(m),i.cancelBubble===!0&&se(m),s.value.dispatchEvent(m),w(i),i.qKeyEvent=!0}r("keyup",i)}O()}}function O(i){const m=b.value;i!==!0&&(P===s.value||M===s.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex",-1),m.focus()),P===s.value&&(p!==null&&(p.removeEventListener("touchcancel",_,$),p.removeEventListener("touchend",_,$)),P=p=null),M===s.value&&(document.removeEventListener("mouseup",_,$),M=null),T===s.value&&(document.removeEventListener("keyup",_,!0),s.value!==null&&s.value.removeEventListener("blur",_,$),T=null),s.value!==null&&s.value.classList.remove("q-btn--active")}function A(i){w(i),i.qSkipRipple=!0}return n.onBeforeUnmount(()=>{O(!0)}),Object.assign(a,{click:i=>{h.value===!0&&q(i)}}),()=>{let i=[];e.icon!==void 0&&i.push(n.h(H,{name:e.icon,left:e.stack!==!0&&k.value===!0,role:"img"})),k.value===!0&&i.push(n.h("span",{class:"block"},[e.label])),i=j(t.default,i),e.iconRight!==void 0&&e.round===!1&&i.push(n.h(H,{name:e.iconRight,right:e.stack!==!0&&k.value===!0,role:"img"}));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:R.value})])),m.push(n.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+c.value},i)),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(g.value,E.value,m),[[we,S.value,void 0,x.value]])}}}),We=n.defineComponent({__name:"index",props:{size:{},transparent:{type:Boolean},rounded:{type:Boolean},color:{},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:[Boolean,null]},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{}},emits:["click"],setup(e){const t=e,{size:r=z.MD,color:a=ae.PRIMARY}=t,u=n.computed(()=>["app-btn",{"app-btn_default":!t.transparent,"app-btn_trans":t.transparent,"app-btn_rounded":t.rounded,"app-btn_sm":r===z.SM,"app-btn_md":r===z.MD,"app-btn_lg":r===z.LG,"app-btn_icon-left":t.iconLeft,"app-btn_icon-right":t.iconRight,"app-btn_icon-middle":t.iconMiddle},`app-btn_${a}`]);return(l,c)=>(n.openBlock(),n.createBlock(n.unref(He),{"no-caps":"",unelevated:"",class:n.normalizeClass(u.value),padding:n.unref(ne)[n.unref(r)||n.unref(z).MD],loading:l.loading,disabled:l.disabled||void 0,to:l.to,href:l.href,target:l.target,type:l.submit?"submit":void 0,"aria-label":l.ariaLabel,onClick:c[0]||(c[0]=o=>l.$emit("click",o))},{default:n.withCtx(()=>[l.iconLeft||l.iconMiddle?(n.openBlock(),n.createElementBlock("i",{key:0,class:n.normalizeClass(["icon-kl",l.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${l.iconLeft||l.iconMiddle}`,l.transparent?`text-${n.unref(a)}`:"text-secondary"])},null,2)):n.createCommentVNode("",!0),n.renderSlot(l.$slots,"default",{},void 0,!0),l.iconRight?(n.openBlock(),n.createElementBlock("i",{key:1,class:n.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${l.iconRight}`,l.transparent?`text-${n.unref(a)}`:"text-secondary"])},null,2)):n.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disabled","to","href","target","type","aria-label"]))}}),de=(e,t)=>{const r=e.__vccOpts||e;for(const[a,u]of t)r[a]=u;return r},Xe=de(We,[["__scopeId","data-v-42f3b7cf"]]),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=de(Ze,[["__scopeId","data-v-73419357"]]),et=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BR4HAU8T.cjs")));exports.AppButton=Xe;exports.AppButtonCopy=et;exports.COLORS=ae;exports.index=Je;
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ .app-btn[data-v-42f3b7cf] .q-btn__content{font-family:OpenSans,sans-serif;font-weight:600}.app-btn_sm[data-v-42f3b7cf]{font-size:12px;border-radius:7px}.app-btn_sm[data-v-42f3b7cf] .q-btn__content{line-height:20px}.app-btn_sm .icon-kl[data-v-42f3b7cf]{font-size:18px}.app-btn_sm.app-btn_icon-left[data-v-42f3b7cf]{padding-left:5px!important}.app-btn_sm.app-btn_icon-left .icon-kl_left[data-v-42f3b7cf]{margin-right:2px}.app-btn_sm.app-btn_icon-right[data-v-42f3b7cf]{padding-right:5px!important}.app-btn_sm.app-btn_icon-right .icon-kl_right[data-v-42f3b7cf]{margin-left:2px}.app-btn_sm.app-btn_icon-middle[data-v-42f3b7cf]{padding:4px!important}.app-btn_md[data-v-42f3b7cf]{font-size:14px;border-radius:8px}.app-btn_md[data-v-42f3b7cf] .q-btn__content{line-height:22px}.app-btn_md .icon-kl[data-v-42f3b7cf]{font-size:22px}.app-btn_md.app-btn_icon-left[data-v-42f3b7cf]{padding-left:9px!important}.app-btn_md.app-btn_icon-left .icon-kl_left[data-v-42f3b7cf]{margin-right:4px}.app-btn_md.app-btn_icon-right[data-v-42f3b7cf]{padding-right:9px!important}.app-btn_md.app-btn_icon-right .icon-kl_right[data-v-42f3b7cf]{margin-left:4px}.app-btn_md.app-btn_icon-middle[data-v-42f3b7cf]{padding:5px!important}.app-btn_lg[data-v-42f3b7cf]{font-size:17px;border-radius:10px}.app-btn_lg[data-v-42f3b7cf] .q-btn__content{line-height:26px}.app-btn_lg .icon-kl[data-v-42f3b7cf]{font-size:26px}.app-btn_lg.app-btn_icon-left[data-v-42f3b7cf]{padding-left:16px!important}.app-btn_lg.app-btn_icon-left .icon-kl_left[data-v-42f3b7cf]{margin-right:6px}.app-btn_lg.app-btn_icon-right[data-v-42f3b7cf]{padding-right:16px!important}.app-btn_lg.app-btn_icon-right .icon-kl_right[data-v-42f3b7cf]{margin-left:6px}.app-btn_lg.app-btn_icon-middle[data-v-42f3b7cf]{padding:11px!important}.app-btn_default.app-btn_primary[data-v-42f3b7cf]{background-color:#1a5cff;color:#fdfffc}.app-btn_default.app-btn_info[data-v-42f3b7cf]{background-color:#399;color:#fdfffc}.app-btn_default.app-btn_negative[data-v-42f3b7cf]{background-color:#ff4757;color:#fdfffc}.app-btn_default.app-btn_positive[data-v-42f3b7cf]{background-color:#46c93a;color:#fdfffc}.app-btn_trans.app-btn_primary[data-v-42f3b7cf]{background-color:#1a5cff26;color:#1a5cff}.app-btn_trans.app-btn_info[data-v-42f3b7cf]{background-color:#33999926;color:#2e757c}.app-btn_trans.app-btn_negative[data-v-42f3b7cf]{background-color:#ff475726;color:#ff4757}.app-btn_trans.app-btn_positive[data-v-42f3b7cf]{background-color:#46c93a26;color:#46c93a}.app-btn_rounded[data-v-42f3b7cf]{border-radius:50px}.icon-kl[data-v-73419357]{font-size:24px}
package/dist/uikit.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),I={SM:"sm",MD:"md",LG:"lg"};var se=(e=>(e.sm="3px 9px",e.md="5px 12px",e.lg="9px 20px",e))(se||{});const ce={PRIMARY:"primary",INFO:"info",NEGATIVE:"negative",POSITIVE:"positive"},W={xs:18,sm:24,md:32,lg:38,xl:46},de={size:String};function fe(e,t=W){return r.computed(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function xe(e,t,i,o){return Object.defineProperty(e,t,{get:i,set:o,enumerable:!0}),e}function G(e){return r.markRaw(r.defineComponent(e))}function Ce(e){return r.markRaw(e)}function Ee(e,t){return e!==void 0&&e()||t}function N(e,t){return e!==void 0?t.concat(e()):t}const X="0 0 24 24",Z=e=>e,Y=e=>`ionicons ${e}`,ve={"mdi-":e=>`mdi ${e}`,"icon-":Z,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":Y,"ion-ios":Y,"ion-logo":Y,"iconfont ":Z,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},me={o_:"-outlined",r_:"-round",s_:"-sharp"},pe={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},_e=new RegExp("^("+Object.keys(ve).join("|")+")"),$e=new RegExp("^("+Object.keys(me).join("|")+")"),J=new RegExp("^("+Object.keys(pe).join("|")+")"),Se=/^[Mm]\s?[-+]?\.?\d/,qe=/^img:/,Be=/^svguse:/,Le=/^ion-/,Pe=/^(fa-(sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,ee=G({name:"QIcon",props:{...de,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:i}}=r.getCurrentInstance(),o=fe(e),n=r.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),s=r.computed(()=>{let c,l=e.name;if(l==="none"||!l)return{none:!0};if(i.iconMapFn!==null){const d=i.iconMapFn(l);if(d!==void 0)if(d.icon!==void 0){if(l=d.icon,l==="none"||!l)return{none:!0}}else return{cls:d.cls,content:d.content!==void 0?d.content:" "}}if(Se.test(l)===!0){const[d,h=X]=l.split("|");return{svg:!0,viewBox:h,nodes:d.split("&&").map(u=>{const[g,p,y]=u.split("@@");return r.h("path",{style:p,d:g,transform:y})})}}if(qe.test(l)===!0)return{img:!0,src:l.substring(4)};if(Be.test(l)===!0){const[d,h=X]=l.split("|");return{svguse:!0,src:d.substring(7),viewBox:h}}let w=" ";const b=l.match(_e);if(b!==null)c=ve[b[1]](l);else if(Pe.test(l)===!0)c=l;else if(Le.test(l)===!0)c=`ionicons ion-${i.platform.is.ios===!0?"ios":"md"}${l.substring(3)}`;else if(J.test(l)===!0){c="notranslate material-symbols";const d=l.match(J);d!==null&&(l=l.substring(6),c+=pe[d[1]]),w=l}else{c="notranslate material-icons";const d=l.match($e);d!==null&&(l=l.substring(2),c+=me[d[1]]),w=l}return{cls:c,content:w}});return()=>{const c={class:n.value,style:o.value,"aria-hidden":"true",role:"presentation"};return s.value.none===!0?r.h(e.tag,c,Ee(t.default)):s.value.img===!0?r.h(e.tag,c,N(t.default,[r.h("img",{src:s.value.src})])):s.value.svg===!0?r.h(e.tag,c,N(t.default,[r.h("svg",{viewBox:s.value.viewBox||"0 0 24 24"},s.value.nodes)])):s.value.svguse===!0?r.h(e.tag,c,N(t.default,[r.h("svg",{viewBox:s.value.viewBox},[r.h("use",{"xlink:href":s.value.src})])])):(s.value.cls!==void 0&&(c.class+=" "+s.value.cls),r.h(e.tag,c,N(t.default,[s.value.content])))}}}),Re={size:{type:[String,Number],default:"1em"},color:String};function Oe(e){return{cSize:r.computed(()=>e.size in W?`${W[e.size]}px`:e.size),classes:r.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const Me=G({name:"QSpinner",props:{...Re,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:i}=Oe(e);return()=>r.h("svg",{class:i.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[r.h("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function Te(e,t){const i=e.style;for(const o in t)i[o]=t[o]}const F={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(F,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch{}function ze(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function be(e){e.stopPropagation()}function je(e){e.cancelable!==!1&&e.preventDefault()}function R(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Ie(e,t,i){const o=`__q_${t}_evt`;e[o]=e[o]!==void 0?e[o].concat(i):i,i.forEach(n=>{n[0].addEventListener(n[1],e[n[2]],F[n[3]])})}function Ne(e,t){const i=`__q_${t}_evt`;e[i]!==void 0&&(e[i].forEach(o=>{o[0].removeEventListener(o[1],e[o[2]],F[o[3]])}),e[i]=void 0)}function De(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function Q(e,t){return De(e)===!0?!1:[].concat(t).includes(e.keyCode)}function Ae(e,t=250){let i=!1,o;return function(){return i===!1&&(i=!0,setTimeout(()=>{i=!1},t),o=e.apply(this,arguments)),o}}function te(e,t,i,o){i.modifiers.stop===!0&&be(e);const n=i.modifiers.color;let s=i.modifiers.center;s=s===!0||o===!0;const c=document.createElement("span"),l=document.createElement("span"),w=ze(e),{left:b,top:d,width:h,height:u}=t.getBoundingClientRect(),g=Math.sqrt(h*h+u*u),p=g/2,y=`${(h-g)/2}px`,f=s?y:`${w.left-b-p}px`,k=`${(u-g)/2}px`,P=s?k:`${w.top-d-p}px`;l.className="q-ripple__inner",Te(l,{height:`${g}px`,width:`${g}px`,transform:`translate3d(${f},${P},0) scale3d(.2,.2,1)`,opacity:0}),c.className=`q-ripple${n?" text-"+n:""}`,c.setAttribute("dir","ltr"),c.appendChild(l),t.appendChild(c);const q=()=>{c.remove(),clearTimeout(B)};i.abort.push(q);let B=setTimeout(()=>{l.classList.add("q-ripple__inner--enter"),l.style.transform=`translate3d(${y},${k},0) scale3d(1,1,1)`,l.style.opacity=.2,B=setTimeout(()=>{l.classList.remove("q-ripple__inner--enter"),l.classList.add("q-ripple__inner--leave"),l.style.opacity=0,B=setTimeout(()=>{c.remove(),i.abort.splice(i.abort.indexOf(q),1)},275)},250)},50)}function ne(e,{modifiers:t,value:i,arg:o}){const n=Object.assign({},e.cfg.ripple,t,i);e.modifiers={early:n.early===!0,stop:n.stop===!0,center:n.center===!0,color:n.color||o,keyCodes:[].concat(n.keyCodes||13)}}const Ke=Ce({name:"ripple",beforeMount(e,t){const i=t.instance.$.appContext.config.globalProperties.$q.config||{};if(i.ripple===!1)return;const o={cfg:i,enabled:t.value!==!1,modifiers:{},abort:[],start(n){o.enabled===!0&&n.qSkipRipple!==!0&&n.type===(o.modifiers.early===!0?"pointerdown":"click")&&te(n,e,o,n.qKeyEvent===!0)},keystart:Ae(n=>{o.enabled===!0&&n.qSkipRipple!==!0&&Q(n,o.modifiers.keyCodes)===!0&&n.type===`key${o.modifiers.early===!0?"down":"up"}`&&te(n,e,o,!0)},300)};ne(o,t),e.__qripple=o,Ie(o,"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 i=e.__qripple;i!==void 0&&(i.enabled=t.value!==!1,i.enabled===!0&&Object(t.value)===t.value&&ne(i,t))}},beforeUnmount(e){const t=e.__qripple;t!==void 0&&(t.abort.forEach(i=>{i()}),Ne(t,"main"),delete e._qripple)}}),he={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},Ve=Object.keys(he),Fe={align:{type:String,validator:e=>Ve.includes(e)}};function Ye(e){return r.computed(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${he[t]}`})}function He(e){return e.appContext.config.globalProperties.$router!==void 0}function oe(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function re(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function We(e,t){for(const i in t){const o=t[i],n=e[i];if(typeof o=="string"){if(o!==n)return!1}else if(Array.isArray(n)===!1||n.length!==o.length||o.some((s,c)=>s!==n[c]))return!1}return!0}function ie(e,t){return Array.isArray(t)===!0?e.length===t.length&&e.every((i,o)=>i===t[o]):e.length===1&&e[0]===t}function Qe(e,t){return Array.isArray(e)===!0?ie(e,t):Array.isArray(t)===!0?ie(t,e):e===t}function Ue(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(Qe(e[i],t[i])===!1)return!1;return!0}const Ge={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean};function Xe({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const i=r.getCurrentInstance(),{props:o,proxy:n,emit:s}=i,c=He(i),l=r.computed(()=>o.disable!==!0&&o.href!==void 0),w=t===!0?r.computed(()=>c===!0&&o.disable!==!0&&l.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""):r.computed(()=>c===!0&&l.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""),b=r.computed(()=>w.value===!0?P(o.to):null),d=r.computed(()=>b.value!==null),h=r.computed(()=>l.value===!0||d.value===!0),u=r.computed(()=>o.type==="a"||h.value===!0?"a":o.tag||e||"div"),g=r.computed(()=>l.value===!0?{href:o.href,target:o.target}:d.value===!0?{href:b.value.href,target:o.target}:{}),p=r.computed(()=>{if(d.value===!1)return-1;const{matched:v}=b.value,{length:x}=v,E=v[x-1];if(E===void 0)return-1;const $=n.$route.matched;if($.length===0)return-1;const S=$.findIndex(re.bind(null,E));if(S!==-1)return S;const D=oe(v[x-2]);return x>1&&oe(E)===D&&$[$.length-1].path!==D?$.findIndex(re.bind(null,v[x-2])):S}),y=r.computed(()=>d.value===!0&&p.value!==-1&&We(n.$route.params,b.value.params)),f=r.computed(()=>y.value===!0&&p.value===n.$route.matched.length-1&&Ue(n.$route.params,b.value.params)),k=r.computed(()=>d.value===!0?f.value===!0?` ${o.exactActiveClass} ${o.activeClass}`:o.exact===!0?"":y.value===!0?` ${o.activeClass}`:"":"");function P(v){try{return n.$router.resolve(v)}catch{}return null}function q(v,{returnRouterError:x,to:E=o.to,replace:$=o.replace}={}){if(o.disable===!0)return v.preventDefault(),Promise.resolve(!1);if(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey||v.button!==void 0&&v.button!==0||o.target==="_blank")return Promise.resolve(!1);v.preventDefault();const S=n.$router[$===!0?"replace":"push"](E);return x===!0?S:S.then(()=>{}).catch(()=>{})}function B(v){if(d.value===!0){const x=E=>q(v,E);s("click",v,x),v.defaultPrevented!==!0&&x()}else s("click",v)}return{hasRouterLink:d,hasHrefLink:l,hasLink:h,linkTag:u,resolvedLink:b,linkIsActive:y,linkIsExactActive:f,linkClass:k,linkAttrs:g,getLink:P,navigateToRouterLink:q,navigateOnClick:B}}const ae={none:0,xs:4,sm:8,md:16,lg:24,xl:32},Ze={xs:8,sm:10,md:14,lg:20,xl:24},Je=["button","submit","reset"],et=/[^\s]\/[^\s]/,tt=["flat","outline","push","unelevated"];function nt(e,t){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":t}const ot={...de,...Ge,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...tt.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:{...Fe.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},rt={...ot,round:Boolean};function it(e){const t=fe(e,Ze),i=Ye(e),{hasRouterLink:o,hasLink:n,linkTag:s,linkAttrs:c,navigateOnClick:l}=Xe({fallbackTag:"button"}),w=r.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 ae?ae[k]+"px":k).join(" "),minWidth:"0",minHeight:"0"}):f}),b=r.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),d=r.computed(()=>e.disable!==!0&&e.loading!==!0),h=r.computed(()=>d.value===!0?e.tabindex||0:-1),u=r.computed(()=>nt(e,"standard")),g=r.computed(()=>{const f={tabindex:h.value};return n.value===!0?Object.assign(f,c.value):Je.includes(e.type)===!0&&(f.type=e.type),s.value==="a"?(e.disable===!0?f["aria-disabled"]="true":f.href===void 0&&(f.role="button"),o.value!==!0&&et.test(e.type)===!0&&(f.type=e.type)):e.disable===!0&&(f.disabled="",f["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(f,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),f}),p=r.computed(()=>{let f;e.color!==void 0?e.flat===!0||e.outline===!0?f=`text-${e.textColor||e.color}`:f=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(f=`text-${e.textColor}`);const k=e.round===!0?"round":`rectangle${b.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${u.value} q-btn--${k}`+(f!==void 0?" "+f:"")+(d.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),y=r.computed(()=>i.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:p,style:w,innerClasses:y,attributes:g,hasLink:n,linkTag:s,navigateOnClick:l,isActionable:d}}const{passiveCapture:C}=F;let O=null,M=null,T=null;const at=G({name:"QBtn",props:{...rt,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:t,emit:i}){const{proxy:o}=r.getCurrentInstance(),{classes:n,style:s,innerClasses:c,attributes:l,hasLink:w,linkTag:b,navigateOnClick:d,isActionable:h}=it(e),u=r.ref(null),g=r.ref(null);let p=null,y,f=null;const k=r.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),P=r.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:w.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),q=r.computed(()=>({center:e.round})),B=r.computed(()=>{const a=Math.max(0,Math.min(100,e.percentage));return a>0?{transition:"transform 0.6s",transform:`translateX(${a-100}%)`}:{}}),v=r.computed(()=>{if(e.loading===!0)return{onMousedown:j,onTouchstart:j,onClick:j,onKeydown:j,onKeyup:j};if(h.value===!0){const a={onClick:E,onKeydown:$,onMousedown:D};if(o.$q.platform.has.touch===!0){const m=e.onTouchstart!==void 0?"":"Passive";a[`onTouchstart${m}`]=S}return a}return{onClick:R}}),x=r.computed(()=>({ref:u,class:"q-btn q-btn-item non-selectable no-outline "+n.value,style:s.value,...l.value,...v.value}));function E(a){if(u.value!==null){if(a!==void 0){if(a.defaultPrevented===!0)return;const m=document.activeElement;if(e.type==="submit"&&m!==document.body&&u.value.contains(m)===!1&&m.contains(u.value)===!1){u.value.focus();const A=()=>{document.removeEventListener("keydown",R,!0),document.removeEventListener("keyup",A,C),u.value!==null&&u.value.removeEventListener("blur",A,C)};document.addEventListener("keydown",R,!0),document.addEventListener("keyup",A,C),u.value.addEventListener("blur",A,C)}}d(a)}}function $(a){u.value!==null&&(i("keydown",a),Q(a,[13,32])===!0&&M!==u.value&&(M!==null&&z(),a.defaultPrevented!==!0&&(u.value.focus(),M=u.value,u.value.classList.add("q-btn--active"),document.addEventListener("keyup",_,!0),u.value.addEventListener("blur",_,C)),R(a)))}function S(a){u.value!==null&&(i("touchstart",a),a.defaultPrevented!==!0&&(O!==u.value&&(O!==null&&z(),O=u.value,p=a.target,p.addEventListener("touchcancel",_,C),p.addEventListener("touchend",_,C)),y=!0,f!==null&&clearTimeout(f),f=setTimeout(()=>{f=null,y=!1},200)))}function D(a){u.value!==null&&(a.qSkipRipple=y===!0,i("mousedown",a),a.defaultPrevented!==!0&&T!==u.value&&(T!==null&&z(),T=u.value,u.value.classList.add("q-btn--active"),document.addEventListener("mouseup",_,C)))}function _(a){if(u.value!==null&&!(a!==void 0&&a.type==="blur"&&document.activeElement===u.value)){if(a!==void 0&&a.type==="keyup"){if(M===u.value&&Q(a,[13,32])===!0){const m=new MouseEvent("click",a);m.qKeyEvent=!0,a.defaultPrevented===!0&&je(m),a.cancelBubble===!0&&be(m),u.value.dispatchEvent(m),R(a),a.qKeyEvent=!0}i("keyup",a)}z()}}function z(a){const m=g.value;a!==!0&&(O===u.value||T===u.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex",-1),m.focus()),O===u.value&&(p!==null&&(p.removeEventListener("touchcancel",_,C),p.removeEventListener("touchend",_,C)),O=p=null),T===u.value&&(document.removeEventListener("mouseup",_,C),T=null),M===u.value&&(document.removeEventListener("keyup",_,!0),u.value!==null&&u.value.removeEventListener("blur",_,C),M=null),u.value!==null&&u.value.classList.remove("q-btn--active")}function j(a){R(a),a.qSkipRipple=!0}return r.onBeforeUnmount(()=>{z(!0)}),Object.assign(o,{click:a=>{h.value===!0&&E(a)}}),()=>{let a=[];e.icon!==void 0&&a.push(r.h(ee,{name:e.icon,left:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"})),k.value===!0&&a.push(r.h("span",{class:"block"},[e.label])),a=N(t.default,a),e.iconRight!==void 0&&e.round===!1&&a.push(r.h(ee,{name:e.iconRight,right:e.stack!==!0&&k.value===!0,role:"img","aria-hidden":"true"}));const m=[r.h("span",{class:"q-focus-helper",ref:g})];return e.loading===!0&&e.percentage!==void 0&&m.push(r.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[r.h("span",{class:"q-btn__progress-indicator fit block",style:B.value})])),m.push(r.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+c.value},a)),e.loading!==null&&m.push(r.h(r.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[r.h("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[r.h(Me)])]:null)),r.withDirectives(r.h(b.value,x.value,m),[[Ke,P.value,void 0,q.value]])}}}),lt=r.defineComponent({__name:"index",props:{size:{default:I.MD},transparent:{type:Boolean},rounded:{type:Boolean},color:{default:ce.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,i=r.computed(()=>["app-btn",{"app-btn_default":!t.transparent,"app-btn_trans":t.transparent,"app-btn_rounded":t.rounded,"app-btn_sm":t.size===I.SM,"app-btn_md":t.size===I.MD,"app-btn_lg":t.size===I.LG,"app-btn_icon-left":t.iconLeft,"app-btn_icon-right":t.iconRight,"app-btn_icon-middle":t.iconMiddle},`app-btn_${t.color}`]);return(o,n)=>(r.openBlock(),r.createBlock(r.unref(at),{"no-caps":"",unelevated:"",class:r.normalizeClass(i.value),padding:r.unref(se)[t.size||r.unref(I).MD],loading:o.loading,disabled:o.disabled||void 0,to:o.to,href:o.href,target:o.target,type:o.submit?"submit":void 0,"aria-label":o.ariaLabel,onClick:n[0]||(n[0]=s=>o.$emit("click",s))},{default:r.withCtx(()=>[o.iconLeft||o.iconMiddle?(r.openBlock(),r.createElementBlock("i",{key:0,class:r.normalizeClass(["icon-kl",o.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${o.iconLeft||o.iconMiddle}`,o.transparent?`text-${o.color}`:"text-secondary"])},null,2)):r.createCommentVNode("",!0),r.renderSlot(o.$slots,"default",{},void 0,!0),o.iconRight?(r.openBlock(),r.createElementBlock("i",{key:1,class:r.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${o.iconRight}`,o.transparent?`text-${o.color}`:"text-secondary"])},null,2)):r.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disabled","to","href","target","type","aria-label"]))}}),ge=(e,t)=>{const i=e.__vccOpts||e;for(const[o,n]of t)i[o]=n;return i},ye=ge(lt,[["__scopeId","data-v-5b3b0602"]]),K=r.ref(!1);let U;function ut(e,t){const i=/(edg|edge|edga|edgios)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(vivaldi)[\/]([\w.]+)/.exec(e)||/(chrome|crios)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(firefox|fxios)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(e)||[];return{browser:i[5]||i[3]||i[1]||"",version:i[4]||i[2]||"0",platform:t[0]||""}}function st(e){return/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[]}const ke="ontouchstart"in window||window.navigator.maxTouchPoints>0;function ct(e){const t=e.toLowerCase(),i=st(t),o=ut(t,i),n={};o.browser&&(n[o.browser]=!0,n.version=o.version,n.versionNumber=parseInt(o.version,10)),o.platform&&(n[o.platform]=!0);const s=n.android||n.ios||n.bb||n.blackberry||n.ipad||n.iphone||n.ipod||n.kindle||n.playbook||n.silk||n["windows phone"];if(s===!0||t.indexOf("mobile")!==-1?n.mobile=!0:n.desktop=!0,n["windows phone"]&&(n.winphone=!0,delete n["windows phone"]),n.edga||n.edgios||n.edg?(n.edge=!0,o.browser="edge"):n.crios?(n.chrome=!0,o.browser="chrome"):n.fxios&&(n.firefox=!0,o.browser="firefox"),(n.ipod||n.ipad||n.iphone)&&(n.ios=!0),n.vivaldi&&(o.browser="vivaldi",n.vivaldi=!0),(n.chrome||n.opr||n.safari||n.vivaldi||n.mobile===!0&&n.ios!==!0&&s!==!0)&&(n.webkit=!0),n.opr&&(o.browser="opera",n.opera=!0),n.safari&&(n.blackberry||n.bb?(o.browser="blackberry",n.blackberry=!0):n.playbook?(o.browser="playbook",n.playbook=!0):n.android?(o.browser="android",n.android=!0):n.kindle?(o.browser="kindle",n.kindle=!0):n.silk&&(o.browser="silk",n.silk=!0)),n.name=o.browser,n.platform=o.platform,t.indexOf("electron")!==-1)n.electron=!0;else if(document.location.href.indexOf("-extension://")!==-1)n.bex=!0;else{if(window.Capacitor!==void 0?(n.capacitor=!0,n.nativeMobile=!0,n.nativeMobileWrapper="capacitor"):(window._cordovaNative!==void 0||window.cordova!==void 0)&&(n.cordova=!0,n.nativeMobile=!0,n.nativeMobileWrapper="cordova"),K.value===!0&&(U={is:{...n}}),ke===!0&&n.mac===!0&&(n.desktop===!0&&n.safari===!0||n.nativeMobile===!0&&n.android!==!0&&n.ios!==!0&&n.ipad!==!0)){delete n.mac,delete n.desktop;const c=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(n,{mobile:!0,ios:!0,platform:c,[c]:!0})}n.mobile!==!0&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete n.desktop,n.mobile=!0)}return n}const le=navigator.userAgent||navigator.vendor||window.opera,dt={has:{touch:!1,webStorage:!1},within:{iframe:!1}},V={userAgent:le,is:ct(le),has:{touch:ke},within:{iframe:window.self!==window.top}},ue={install(e){const{$q:t}=e;K.value===!0?(e.onSSRHydrated.push(()=>{Object.assign(t.platform,V),K.value=!1}),t.platform=r.reactive(this)):t.platform=this}};{let e;xe(V.has,"webStorage",()=>{if(e!==void 0)return e;try{if(window.localStorage)return e=!0,!0}catch{}return e=!1,!1}),Object.assign(ue,V),K.value===!0&&(Object.assign(ue,U,dt),U=null)}const L=[];function we(e){L[L.length-1](e)}function ft(e){V.is.desktop===!0&&(L.push(e),L.length===1&&document.body.addEventListener("focusin",we))}function vt(e){const t=L.indexOf(e);t!==-1&&(L.splice(t,1),L.length===0&&document.body.removeEventListener("focusin",we))}function mt(e){const t=document.createElement("textarea");t.value=e,t.contentEditable="true",t.style.position="fixed";const i=()=>{};ft(i),document.body.appendChild(t),t.focus(),t.select();const o=document.execCommand("copy");return t.remove(),vt(i),o}function pt(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((t,i)=>{const o=mt(e);o?t(!0):i(o)})}const H={COPY:"copy_o",COPIED:"copied_o"},bt=r.defineComponent({__name:"index",props:{text:{},size:{},transparent:{type:Boolean,default:!0},rounded:{type:Boolean},color:{default:ce.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:[Boolean,null]},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{}},setup(e){const t=e,i=r.ref(H.COPY),o=()=>{i.value=H.COPIED,setTimeout(()=>{i.value=H.COPY},2e3)},n=()=>{typeof window<"u"&&pt(t.text).then(o).catch(s=>{console.log(s)})};return(s,c)=>(r.openBlock(),r.createBlock(r.unref(ye),r.mergeProps(t,{"icon-middle":i.value,onClick:r.withModifiers(n,["prevent"])}),null,16,["icon-middle"]))}}),ht=r.defineComponent({__name:"index",props:{name:{},size:{},color:{}},setup(e){return(t,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass(["icon-kl",`icon-kl-${t.name}`,t.color?`text-${t.color}`:""]),style:r.normalizeStyle(t.size?`font-size: ${t.size}`:void 0)},null,6))}}),gt=ge(ht,[["__scopeId","data-v-73419357"]]);exports.AppButton=ye;exports.AppIcon=gt;exports.CopyButton=bt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const t=require("./index-T5AGm1HZ.cjs");exports.AppButton=t.AppButton;exports.AppButtonCopy=t.AppButtonCopy;exports.AppIcon=t.index;
package/dist/uikit.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './components/index'
2
+ export {}