@validol4ik/uikit 0.3.21 → 0.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/components-7V5uuTz1.js +16 -0
- package/dist/components-BEHCFgSt.cjs +1 -0
- package/dist/focusout-DjvPXP_b.js +135 -0
- package/dist/focusout-DzWGke-4.cjs +1 -0
- package/dist/index-3coIHqW5.js +62 -0
- package/dist/index-91CnFQLB.js +390 -0
- package/dist/index-CK6Wk_S2.cjs +1 -0
- package/dist/index-CkDJagwx.cjs +1 -0
- package/dist/index-D-vCNV-C.js +3327 -0
- package/dist/index-DlTcPzc5.cjs +1 -0
- package/dist/index-DuYpalwR.cjs +1 -0
- package/dist/index-vr4EEUVJ.js +21 -0
- package/dist/plugin/plugin.cjs +1 -1
- package/dist/plugin/plugin.es.js +4 -4
- package/dist/style.css +1 -1
- package/dist/types/components/buttons/AppButton/index.vue.d.ts +2 -2
- package/dist/types/components/buttons/CopyButton/index.vue.d.ts +1 -1
- package/dist/types/components/components.d.ts +49 -5
- package/dist/types/components/form/AppSelect/index.vue.d.ts +1 -1
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/dist/use-router-link-BgNwCOFX.js +576 -0
- package/dist/use-router-link-DiPB_4Ct.cjs +1 -0
- package/package.json +1 -1
- package/dist/index-CAKyxAXF.js +0 -4445
- package/dist/index-D-GPCN1o.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=(t,o)=>{const c=t.__vccOpts||t;for(const[r,s]of o)c[r]=s;return c};exports._export_sfc=e;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineAsyncComponent as o } from "vue";
|
|
2
|
+
const t = o(
|
|
3
|
+
() => import("./index-vr4EEUVJ.js")
|
|
4
|
+
), n = o(
|
|
5
|
+
() => import("./index-91CnFQLB.js")
|
|
6
|
+
), s = o(
|
|
7
|
+
() => import("./index-3coIHqW5.js")
|
|
8
|
+
), c = o(
|
|
9
|
+
() => import("./index-D-vCNV-C.js")
|
|
10
|
+
);
|
|
11
|
+
export {
|
|
12
|
+
t as A,
|
|
13
|
+
n as a,
|
|
14
|
+
s as b,
|
|
15
|
+
c
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CK6Wk_S2.cjs"))),o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CkDJagwx.cjs"))),t=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DlTcPzc5.cjs"))),p=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DuYpalwR.cjs")));exports.AppButton=o;exports.AppButtonCopy=t;exports.AppIcon=n;exports.AppSelect=p;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { ref as p, reactive as v } from "vue";
|
|
2
|
+
function m(o, r, a, i) {
|
|
3
|
+
return Object.defineProperty(o, r, {
|
|
4
|
+
get: a,
|
|
5
|
+
set: i,
|
|
6
|
+
enumerable: !0
|
|
7
|
+
}), o;
|
|
8
|
+
}
|
|
9
|
+
const s = p(
|
|
10
|
+
!1
|
|
11
|
+
);
|
|
12
|
+
let l;
|
|
13
|
+
function h(o, r) {
|
|
14
|
+
const a = /(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) || [];
|
|
15
|
+
return {
|
|
16
|
+
browser: a[5] || a[3] || a[1] || "",
|
|
17
|
+
version: a[4] || a[2] || "0",
|
|
18
|
+
platform: r[0] || ""
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function x(o) {
|
|
22
|
+
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) || [];
|
|
23
|
+
}
|
|
24
|
+
const b = "ontouchstart" in window || window.navigator.maxTouchPoints > 0;
|
|
25
|
+
function k(o) {
|
|
26
|
+
const r = o.toLowerCase(), a = x(r), i = h(r, a), e = {
|
|
27
|
+
mobile: !1,
|
|
28
|
+
desktop: !1,
|
|
29
|
+
cordova: !1,
|
|
30
|
+
capacitor: !1,
|
|
31
|
+
nativeMobile: !1,
|
|
32
|
+
// nativeMobileWrapper: void 0,
|
|
33
|
+
electron: !1,
|
|
34
|
+
bex: !1,
|
|
35
|
+
linux: !1,
|
|
36
|
+
mac: !1,
|
|
37
|
+
win: !1,
|
|
38
|
+
cros: !1,
|
|
39
|
+
chrome: !1,
|
|
40
|
+
firefox: !1,
|
|
41
|
+
opera: !1,
|
|
42
|
+
safari: !1,
|
|
43
|
+
vivaldi: !1,
|
|
44
|
+
edge: !1,
|
|
45
|
+
edgeChromium: !1,
|
|
46
|
+
ie: !1,
|
|
47
|
+
webkit: !1,
|
|
48
|
+
android: !1,
|
|
49
|
+
ios: !1,
|
|
50
|
+
ipad: !1,
|
|
51
|
+
iphone: !1,
|
|
52
|
+
ipod: !1,
|
|
53
|
+
kindle: !1,
|
|
54
|
+
winphone: !1,
|
|
55
|
+
blackberry: !1,
|
|
56
|
+
playbook: !1,
|
|
57
|
+
silk: !1
|
|
58
|
+
};
|
|
59
|
+
i.browser && (e[i.browser] = !0, e.version = i.version, e.versionNumber = parseInt(i.version, 10)), i.platform && (e[i.platform] = !0);
|
|
60
|
+
const f = e.android || e.ios || e.bb || e.blackberry || e.ipad || e.iphone || e.ipod || e.kindle || e.playbook || e.silk || e["windows phone"];
|
|
61
|
+
if (f === !0 || r.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, i.browser = "edge") : e.crios ? (e.chrome = !0, i.browser = "chrome") : e.fxios && (e.firefox = !0, i.browser = "firefox"), (e.ipod || e.ipad || e.iphone) && (e.ios = !0), e.vivaldi && (i.browser = "vivaldi", e.vivaldi = !0), // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
|
|
62
|
+
(e.chrome || e.opr || e.safari || e.vivaldi || e.mobile === !0 && e.ios !== !0 && f !== !0) && (e.webkit = !0), e.opr && (i.browser = "opera", e.opera = !0), e.safari && (e.blackberry || e.bb ? (i.browser = "blackberry", e.blackberry = !0) : e.playbook ? (i.browser = "playbook", e.playbook = !0) : e.android ? (i.browser = "android", e.android = !0) : e.kindle ? (i.browser = "kindle", e.kindle = !0) : e.silk && (i.browser = "silk", e.silk = !0)), e.name = i.browser, e.platform = i.platform, r.indexOf("electron") !== -1)
|
|
63
|
+
e.electron = !0;
|
|
64
|
+
else if (document.location.href.indexOf("-extension://") !== -1)
|
|
65
|
+
e.bex = !0;
|
|
66
|
+
else {
|
|
67
|
+
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 && (l = { is: { ...e } }), b === !0 && e.mac === !0 && (e.desktop === !0 && e.safari === !0 || e.nativeMobile === !0 && e.android !== !0 && e.ios !== !0 && e.ipad !== !0)) {
|
|
68
|
+
delete e.mac, delete e.desktop;
|
|
69
|
+
const c = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone";
|
|
70
|
+
Object.assign(e, {
|
|
71
|
+
mobile: !0,
|
|
72
|
+
ios: !0,
|
|
73
|
+
platform: c,
|
|
74
|
+
[c]: !0
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
e.mobile !== !0 && window.navigator.userAgentData && window.navigator.userAgentData.mobile && (delete e.desktop, e.mobile = !0);
|
|
78
|
+
}
|
|
79
|
+
return e;
|
|
80
|
+
}
|
|
81
|
+
const d = navigator.userAgent || navigator.vendor || window.opera, y = {
|
|
82
|
+
has: {
|
|
83
|
+
touch: !1,
|
|
84
|
+
webStorage: !1
|
|
85
|
+
},
|
|
86
|
+
within: { iframe: !1 }
|
|
87
|
+
}, n = {
|
|
88
|
+
userAgent: d,
|
|
89
|
+
is: k(d),
|
|
90
|
+
has: {
|
|
91
|
+
touch: b
|
|
92
|
+
},
|
|
93
|
+
within: {
|
|
94
|
+
iframe: window.self !== window.top
|
|
95
|
+
}
|
|
96
|
+
}, w = {
|
|
97
|
+
install(o) {
|
|
98
|
+
const { $q: r } = o;
|
|
99
|
+
s.value === !0 ? (o.onSSRHydrated.push(() => {
|
|
100
|
+
Object.assign(r.platform, n), s.value = !1;
|
|
101
|
+
}), r.platform = v(this)) : r.platform = this;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
{
|
|
105
|
+
let o;
|
|
106
|
+
m(n.has, "webStorage", () => {
|
|
107
|
+
if (o !== void 0)
|
|
108
|
+
return o;
|
|
109
|
+
try {
|
|
110
|
+
if (window.localStorage)
|
|
111
|
+
return o = !0, !0;
|
|
112
|
+
} catch {
|
|
113
|
+
}
|
|
114
|
+
return o = !1, !1;
|
|
115
|
+
}), Object.assign(w, n), s.value === !0 && (Object.assign(w, l, y), l = null);
|
|
116
|
+
}
|
|
117
|
+
const t = [];
|
|
118
|
+
function u(o) {
|
|
119
|
+
t[t.length - 1](o);
|
|
120
|
+
}
|
|
121
|
+
function M(o) {
|
|
122
|
+
n.is.desktop === !0 && (t.push(o), t.length === 1 && document.body.addEventListener("focusin", u));
|
|
123
|
+
}
|
|
124
|
+
function O(o) {
|
|
125
|
+
const r = t.indexOf(o);
|
|
126
|
+
r !== -1 && (t.splice(r, 1), t.length === 0 && document.body.removeEventListener("focusin", u));
|
|
127
|
+
}
|
|
128
|
+
export {
|
|
129
|
+
w as P,
|
|
130
|
+
M as a,
|
|
131
|
+
m as b,
|
|
132
|
+
n as c,
|
|
133
|
+
s as i,
|
|
134
|
+
O as r
|
|
135
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const w=require("vue");function b(o,r,a,i){return Object.defineProperty(o,r,{get:a,set:i,enumerable:!0}),o}const s=w.ref(!1);let l;function m(o,r){const a=/(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)||[];return{browser:a[5]||a[3]||a[1]||"",version:a[4]||a[2]||"0",platform:r[0]||""}}function h(o){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)||[]}const p="ontouchstart"in window||window.navigator.maxTouchPoints>0;function x(o){const r=o.toLowerCase(),a=h(r),i=m(r,a),e={mobile:!1,desktop:!1,cordova:!1,capacitor:!1,nativeMobile:!1,electron:!1,bex:!1,linux:!1,mac:!1,win:!1,cros:!1,chrome:!1,firefox:!1,opera:!1,safari:!1,vivaldi:!1,edge:!1,edgeChromium:!1,ie:!1,webkit:!1,android:!1,ios:!1,ipad:!1,iphone:!1,ipod:!1,kindle:!1,winphone:!1,blackberry:!1,playbook:!1,silk:!1};i.browser&&(e[i.browser]=!0,e.version=i.version,e.versionNumber=parseInt(i.version,10)),i.platform&&(e[i.platform]=!0);const c=e.android||e.ios||e.bb||e.blackberry||e.ipad||e.iphone||e.ipod||e.kindle||e.playbook||e.silk||e["windows phone"];if(c===!0||r.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,i.browser="edge"):e.crios?(e.chrome=!0,i.browser="chrome"):e.fxios&&(e.firefox=!0,i.browser="firefox"),(e.ipod||e.ipad||e.iphone)&&(e.ios=!0),e.vivaldi&&(i.browser="vivaldi",e.vivaldi=!0),(e.chrome||e.opr||e.safari||e.vivaldi||e.mobile===!0&&e.ios!==!0&&c!==!0)&&(e.webkit=!0),e.opr&&(i.browser="opera",e.opera=!0),e.safari&&(e.blackberry||e.bb?(i.browser="blackberry",e.blackberry=!0):e.playbook?(i.browser="playbook",e.playbook=!0):e.android?(i.browser="android",e.android=!0):e.kindle?(i.browser="kindle",e.kindle=!0):e.silk&&(i.browser="silk",e.silk=!0)),e.name=i.browser,e.platform=i.platform,r.indexOf("electron")!==-1)e.electron=!0;else if(document.location.href.indexOf("-extension://")!==-1)e.bex=!0;else{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&&(l={is:{...e}}),p===!0&&e.mac===!0&&(e.desktop===!0&&e.safari===!0||e.nativeMobile===!0&&e.android!==!0&&e.ios!==!0&&e.ipad!==!0)){delete e.mac,delete e.desktop;const d=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(e,{mobile:!0,ios:!0,platform:d,[d]:!0})}e.mobile!==!0&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete e.desktop,e.mobile=!0)}return e}const u=navigator.userAgent||navigator.vendor||window.opera,k={has:{touch:!1,webStorage:!1},within:{iframe:!1}},n={userAgent:u,is:x(u),has:{touch:p},within:{iframe:window.self!==window.top}},f={install(o){const{$q:r}=o;s.value===!0?(o.onSSRHydrated.push(()=>{Object.assign(r.platform,n),s.value=!1}),r.platform=w.reactive(this)):r.platform=this}};{let o;b(n.has,"webStorage",()=>{if(o!==void 0)return o;try{if(window.localStorage)return o=!0,!0}catch{}return o=!1,!1}),Object.assign(f,n),s.value===!0&&(Object.assign(f,l,k),l=null)}const t=[];function v(o){t[t.length-1](o)}function y(o){n.is.desktop===!0&&(t.push(o),t.length===1&&document.body.addEventListener("focusin",v))}function g(o){const r=t.indexOf(o);r!==-1&&(t.splice(r,1),t.length===0&&document.body.removeEventListener("focusin",v))}exports.Platform=f;exports.addFocusout=y;exports.client=n;exports.injectProp=b;exports.isRuntimeSsrPreHydration=s;exports.removeFocusout=g;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent as i, ref as l, openBlock as s, createBlock as p, mergeProps as d, withModifiers as u } from "vue";
|
|
2
|
+
import { r as m, a as f } from "./focusout-DjvPXP_b.js";
|
|
3
|
+
import { C } from "./use-router-link-BgNwCOFX.js";
|
|
4
|
+
import y from "./index-91CnFQLB.js";
|
|
5
|
+
function b(t) {
|
|
6
|
+
const e = document.createElement("textarea");
|
|
7
|
+
e.value = t, e.contentEditable = "true", e.style.position = "fixed";
|
|
8
|
+
const o = () => {
|
|
9
|
+
};
|
|
10
|
+
f(o), document.body.appendChild(e), e.focus(), e.select();
|
|
11
|
+
const n = document.execCommand("copy");
|
|
12
|
+
return e.remove(), m(o), n;
|
|
13
|
+
}
|
|
14
|
+
function v(t) {
|
|
15
|
+
return navigator.clipboard !== void 0 ? navigator.clipboard.writeText(t) : new Promise((e, o) => {
|
|
16
|
+
const n = b(t);
|
|
17
|
+
n ? e(!0) : o(n);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const a = {
|
|
21
|
+
COPY: "copy_o",
|
|
22
|
+
COPIED: "copied_o"
|
|
23
|
+
}, P = /* @__PURE__ */ i({
|
|
24
|
+
__name: "index",
|
|
25
|
+
props: {
|
|
26
|
+
text: {},
|
|
27
|
+
size: {},
|
|
28
|
+
transparent: { type: Boolean, default: !0 },
|
|
29
|
+
flat: { type: Boolean },
|
|
30
|
+
rounded: { type: Boolean },
|
|
31
|
+
color: { default: C.INFO },
|
|
32
|
+
iconLeft: {},
|
|
33
|
+
iconRight: {},
|
|
34
|
+
iconMiddle: {},
|
|
35
|
+
disabled: { type: Boolean },
|
|
36
|
+
loading: { type: Boolean },
|
|
37
|
+
to: {},
|
|
38
|
+
href: {},
|
|
39
|
+
target: {},
|
|
40
|
+
submit: { type: Boolean },
|
|
41
|
+
ariaLabel: {},
|
|
42
|
+
label: {}
|
|
43
|
+
},
|
|
44
|
+
setup(t) {
|
|
45
|
+
const e = t, o = l(a.COPY), n = () => {
|
|
46
|
+
o.value = a.COPIED, setTimeout(() => {
|
|
47
|
+
o.value = a.COPY;
|
|
48
|
+
}, 2e3);
|
|
49
|
+
}, r = () => {
|
|
50
|
+
v(e.text).then(n).catch((c) => {
|
|
51
|
+
console.log(c);
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
return (c, O) => (s(), p(y, d(e, {
|
|
55
|
+
"icon-middle": o.value,
|
|
56
|
+
onClick: u(r, ["prevent"])
|
|
57
|
+
}), null, 16, ["icon-middle"]));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
P as default
|
|
62
|
+
};
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { computed as o, getCurrentInstance as Y, ref as j, onBeforeUnmount as Z, h as s, Transition as J, withDirectives as ee, defineComponent as te, openBlock as R, createBlock as ne, unref as x, normalizeClass as O, withCtx as ae, createElementBlock as z, createCommentVNode as A, renderSlot as le, Fragment as ue, createTextVNode as ie, toDisplayString as oe } from "vue";
|
|
2
|
+
import { S as b, u as re, a as se, b as ce, c as de, d as fe, s as h, i as D, p as ve, e as be, l as ge, Q as I, h as me, f as he, R as ye, C as ke } from "./use-router-link-BgNwCOFX.js";
|
|
3
|
+
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const qe = {
|
|
5
|
+
[b.SM]: "3px 9px",
|
|
6
|
+
[b.MD]: "5px 12px",
|
|
7
|
+
[b.LG]: "9px 20px"
|
|
8
|
+
}, N = {
|
|
9
|
+
left: "start",
|
|
10
|
+
center: "center",
|
|
11
|
+
right: "end",
|
|
12
|
+
between: "between",
|
|
13
|
+
around: "around",
|
|
14
|
+
evenly: "evenly",
|
|
15
|
+
stretch: "stretch"
|
|
16
|
+
}, Be = Object.keys(N), pe = {
|
|
17
|
+
align: {
|
|
18
|
+
type: String,
|
|
19
|
+
validator: (e) => Be.includes(e)
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
function Ce(e) {
|
|
23
|
+
return o(() => {
|
|
24
|
+
const l = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
|
|
25
|
+
return `${e.vertical === !0 ? "items" : "justify"}-${N[l]}`;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
const K = {
|
|
29
|
+
none: 0,
|
|
30
|
+
xs: 4,
|
|
31
|
+
sm: 8,
|
|
32
|
+
md: 16,
|
|
33
|
+
lg: 24,
|
|
34
|
+
xl: 32
|
|
35
|
+
}, Ee = {
|
|
36
|
+
xs: 8,
|
|
37
|
+
sm: 10,
|
|
38
|
+
md: 14,
|
|
39
|
+
lg: 20,
|
|
40
|
+
xl: 24
|
|
41
|
+
}, Se = ["button", "submit", "reset"], Me = /[^\s]\/[^\s]/, Re = ["flat", "outline", "push", "unelevated"];
|
|
42
|
+
function Te(e, l) {
|
|
43
|
+
return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : l;
|
|
44
|
+
}
|
|
45
|
+
const we = {
|
|
46
|
+
...de,
|
|
47
|
+
...ce,
|
|
48
|
+
type: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: "button"
|
|
51
|
+
},
|
|
52
|
+
label: [Number, String],
|
|
53
|
+
icon: String,
|
|
54
|
+
iconRight: String,
|
|
55
|
+
...Re.reduce(
|
|
56
|
+
(e, l) => (e[l] = Boolean) && e,
|
|
57
|
+
{}
|
|
58
|
+
),
|
|
59
|
+
square: Boolean,
|
|
60
|
+
rounded: Boolean,
|
|
61
|
+
glossy: Boolean,
|
|
62
|
+
size: String,
|
|
63
|
+
fab: Boolean,
|
|
64
|
+
fabMini: Boolean,
|
|
65
|
+
padding: String,
|
|
66
|
+
color: String,
|
|
67
|
+
textColor: String,
|
|
68
|
+
noCaps: Boolean,
|
|
69
|
+
noWrap: Boolean,
|
|
70
|
+
dense: Boolean,
|
|
71
|
+
tabindex: [Number, String],
|
|
72
|
+
ripple: {
|
|
73
|
+
type: [Boolean, Object],
|
|
74
|
+
default: !0
|
|
75
|
+
},
|
|
76
|
+
align: {
|
|
77
|
+
...pe.align,
|
|
78
|
+
default: "center"
|
|
79
|
+
},
|
|
80
|
+
stack: Boolean,
|
|
81
|
+
stretch: Boolean,
|
|
82
|
+
loading: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: null
|
|
85
|
+
},
|
|
86
|
+
disable: Boolean
|
|
87
|
+
}, Pe = {
|
|
88
|
+
...we,
|
|
89
|
+
round: Boolean
|
|
90
|
+
};
|
|
91
|
+
function $e(e) {
|
|
92
|
+
const l = re(e, Ee), v = Ce(e), { hasRouterLink: a, hasLink: g, linkTag: m, linkAttrs: T, navigateOnClick: w } = se({
|
|
93
|
+
fallbackTag: "button"
|
|
94
|
+
}), P = o(() => {
|
|
95
|
+
const u = e.fab === !1 && e.fabMini === !1 ? l.value : {};
|
|
96
|
+
return e.padding !== void 0 ? Object.assign({}, u, {
|
|
97
|
+
padding: e.padding.split(/\s+/).map((f) => f in K ? K[f] + "px" : f).join(" "),
|
|
98
|
+
minWidth: "0",
|
|
99
|
+
minHeight: "0"
|
|
100
|
+
}) : u;
|
|
101
|
+
}), $ = o(
|
|
102
|
+
() => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
|
|
103
|
+
), q = o(
|
|
104
|
+
() => e.disable !== !0 && e.loading !== !0
|
|
105
|
+
), E = o(() => q.value === !0 ? e.tabindex || 0 : -1), n = o(() => Te(e, "standard")), S = o(() => {
|
|
106
|
+
const u = { tabindex: E.value };
|
|
107
|
+
return g.value === !0 ? Object.assign(u, T.value) : Se.includes(e.type) === !0 && (u.type = e.type), m.value === "a" ? (e.disable === !0 ? u["aria-disabled"] = "true" : u.href === void 0 && (u.role = "button"), a.value !== !0 && Me.test(e.type) === !0 && (u.type = e.type)) : e.disable === !0 && (u.disabled = "", u["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(u, {
|
|
108
|
+
role: "progressbar",
|
|
109
|
+
"aria-valuemin": 0,
|
|
110
|
+
"aria-valuemax": 100,
|
|
111
|
+
"aria-valuenow": e.percentage
|
|
112
|
+
}), u;
|
|
113
|
+
}), d = o(() => {
|
|
114
|
+
let u;
|
|
115
|
+
e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? u = `text-${e.textColor || e.color}` : u = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (u = `text-${e.textColor}`);
|
|
116
|
+
const f = e.round === !0 ? "round" : `rectangle${$.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
|
|
117
|
+
return `q-btn--${n.value} q-btn--${f}` + (u !== void 0 ? " " + u : "") + (q.value === !0 ? " q-btn--actionable q-focusable q-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " q-btn--fab" : e.fabMini === !0 ? " q-btn--fab-mini" : "") + (e.noCaps === !0 ? " q-btn--no-uppercase" : "") + (e.dense === !0 ? " q-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius self-stretch" : "") + (e.glossy === !0 ? " glossy" : "") + (e.square ? " q-btn--square" : "");
|
|
118
|
+
}), B = o(
|
|
119
|
+
() => v.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
|
|
120
|
+
);
|
|
121
|
+
return {
|
|
122
|
+
classes: d,
|
|
123
|
+
style: P,
|
|
124
|
+
innerClasses: B,
|
|
125
|
+
attributes: S,
|
|
126
|
+
hasLink: g,
|
|
127
|
+
linkTag: m,
|
|
128
|
+
navigateOnClick: w,
|
|
129
|
+
isActionable: q
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
const { passiveCapture: r } = ge;
|
|
133
|
+
let y = null, k = null, L = null;
|
|
134
|
+
const xe = fe({
|
|
135
|
+
name: "QBtn",
|
|
136
|
+
props: {
|
|
137
|
+
...Pe,
|
|
138
|
+
percentage: Number,
|
|
139
|
+
darkPercentage: Boolean,
|
|
140
|
+
onTouchstart: [Function, Array]
|
|
141
|
+
},
|
|
142
|
+
emits: ["click", "keydown", "mousedown", "keyup"],
|
|
143
|
+
setup(e, { slots: l, emit: v }) {
|
|
144
|
+
const { proxy: a } = Y(), {
|
|
145
|
+
classes: g,
|
|
146
|
+
style: m,
|
|
147
|
+
innerClasses: T,
|
|
148
|
+
attributes: w,
|
|
149
|
+
hasLink: P,
|
|
150
|
+
linkTag: $,
|
|
151
|
+
navigateOnClick: q,
|
|
152
|
+
isActionable: E
|
|
153
|
+
} = $e(e), n = j(null), S = j(null);
|
|
154
|
+
let d = null, B, u = null;
|
|
155
|
+
const f = o(
|
|
156
|
+
() => e.label !== void 0 && e.label !== null && e.label !== ""
|
|
157
|
+
), Q = o(() => e.disable === !0 || e.ripple === !1 ? !1 : {
|
|
158
|
+
keyCodes: P.value === !0 ? [13, 32] : [13],
|
|
159
|
+
...e.ripple === !0 ? {} : e.ripple
|
|
160
|
+
}), V = o(() => ({ center: e.round })), W = o(() => {
|
|
161
|
+
const t = Math.max(0, Math.min(100, e.percentage));
|
|
162
|
+
return t > 0 ? { transition: "transform 0.6s", transform: `translateX(${t - 100}%)` } : {};
|
|
163
|
+
}), F = o(() => {
|
|
164
|
+
if (e.loading === !0)
|
|
165
|
+
return {
|
|
166
|
+
onMousedown: C,
|
|
167
|
+
onTouchstart: C,
|
|
168
|
+
onClick: C,
|
|
169
|
+
onKeydown: C,
|
|
170
|
+
onKeyup: C
|
|
171
|
+
};
|
|
172
|
+
if (E.value === !0) {
|
|
173
|
+
const t = {
|
|
174
|
+
onClick: _,
|
|
175
|
+
onKeydown: H,
|
|
176
|
+
onMousedown: X
|
|
177
|
+
};
|
|
178
|
+
if (a.$q.platform.has.touch === !0) {
|
|
179
|
+
const i = e.onTouchstart !== void 0 ? "" : "Passive";
|
|
180
|
+
t[`onTouchstart${i}`] = U;
|
|
181
|
+
}
|
|
182
|
+
return t;
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
// needed; especially for disabled <a> tags
|
|
186
|
+
onClick: h
|
|
187
|
+
};
|
|
188
|
+
}), G = o(() => ({
|
|
189
|
+
ref: n,
|
|
190
|
+
class: "q-btn q-btn-item non-selectable no-outline " + g.value,
|
|
191
|
+
style: m.value,
|
|
192
|
+
...w.value,
|
|
193
|
+
...F.value
|
|
194
|
+
}));
|
|
195
|
+
function _(t) {
|
|
196
|
+
if (n.value !== null) {
|
|
197
|
+
if (t !== void 0) {
|
|
198
|
+
if (t.defaultPrevented === !0)
|
|
199
|
+
return;
|
|
200
|
+
const i = document.activeElement;
|
|
201
|
+
if (e.type === "submit" && i !== document.body && n.value.contains(i) === !1 && i.contains(n.value) === !1) {
|
|
202
|
+
n.value.focus();
|
|
203
|
+
const M = () => {
|
|
204
|
+
document.removeEventListener("keydown", h, !0), document.removeEventListener("keyup", M, r), n.value !== null && n.value.removeEventListener("blur", M, r);
|
|
205
|
+
};
|
|
206
|
+
document.addEventListener("keydown", h, !0), document.addEventListener("keyup", M, r), n.value.addEventListener("blur", M, r);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
q(t);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function H(t) {
|
|
213
|
+
n.value !== null && (v("keydown", t), D(t, [13, 32]) === !0 && k !== n.value && (k !== null && p(), t.defaultPrevented !== !0 && (n.value.focus(), k = n.value, n.value.classList.add("q-btn--active"), document.addEventListener("keyup", c, !0), n.value.addEventListener("blur", c, r)), h(t)));
|
|
214
|
+
}
|
|
215
|
+
function U(t) {
|
|
216
|
+
n.value !== null && (v("touchstart", t), t.defaultPrevented !== !0 && (y !== n.value && (y !== null && p(), y = n.value, d = t.target, d.addEventListener("touchcancel", c, r), d.addEventListener("touchend", c, r)), B = !0, u !== null && clearTimeout(u), u = setTimeout(() => {
|
|
217
|
+
u = null, B = !1;
|
|
218
|
+
}, 200)));
|
|
219
|
+
}
|
|
220
|
+
function X(t) {
|
|
221
|
+
n.value !== null && (t.qSkipRipple = B === !0, v("mousedown", t), t.defaultPrevented !== !0 && L !== n.value && (L !== null && p(), L = n.value, n.value.classList.add("q-btn--active"), document.addEventListener("mouseup", c, r)));
|
|
222
|
+
}
|
|
223
|
+
function c(t) {
|
|
224
|
+
if (n.value !== null && !(t !== void 0 && t.type === "blur" && document.activeElement === n.value)) {
|
|
225
|
+
if (t !== void 0 && t.type === "keyup") {
|
|
226
|
+
if (k === n.value && D(t, [13, 32]) === !0) {
|
|
227
|
+
const i = new MouseEvent("click", t);
|
|
228
|
+
i.qKeyEvent = !0, t.defaultPrevented === !0 && ve(i), t.cancelBubble === !0 && be(i), n.value.dispatchEvent(i), h(t), t.qKeyEvent = !0;
|
|
229
|
+
}
|
|
230
|
+
v("keyup", t);
|
|
231
|
+
}
|
|
232
|
+
p();
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function p(t) {
|
|
236
|
+
const i = S.value;
|
|
237
|
+
t !== !0 && (y === n.value || L === n.value) && i !== null && i !== document.activeElement && (i.setAttribute("tabindex", -1), i.focus()), y === n.value && (d !== null && (d.removeEventListener("touchcancel", c, r), d.removeEventListener("touchend", c, r)), y = d = null), L === n.value && (document.removeEventListener("mouseup", c, r), L = null), k === n.value && (document.removeEventListener("keyup", c, !0), n.value !== null && n.value.removeEventListener("blur", c, r), k = null), n.value !== null && n.value.classList.remove("q-btn--active");
|
|
238
|
+
}
|
|
239
|
+
function C(t) {
|
|
240
|
+
h(t), t.qSkipRipple = !0;
|
|
241
|
+
}
|
|
242
|
+
return Z(() => {
|
|
243
|
+
p(!0);
|
|
244
|
+
}), Object.assign(a, {
|
|
245
|
+
click: (t) => {
|
|
246
|
+
E.value === !0 && _(t);
|
|
247
|
+
}
|
|
248
|
+
}), () => {
|
|
249
|
+
let t = [];
|
|
250
|
+
e.icon !== void 0 && t.push(
|
|
251
|
+
s(I, {
|
|
252
|
+
name: e.icon,
|
|
253
|
+
left: e.stack !== !0 && f.value === !0,
|
|
254
|
+
role: "img"
|
|
255
|
+
})
|
|
256
|
+
), f.value === !0 && t.push(
|
|
257
|
+
s("span", { class: "block" }, [e.label])
|
|
258
|
+
), t = me(l.default, t), e.iconRight !== void 0 && e.round === !1 && t.push(
|
|
259
|
+
s(I, {
|
|
260
|
+
name: e.iconRight,
|
|
261
|
+
right: e.stack !== !0 && f.value === !0,
|
|
262
|
+
role: "img"
|
|
263
|
+
})
|
|
264
|
+
);
|
|
265
|
+
const i = [
|
|
266
|
+
s("span", {
|
|
267
|
+
class: "q-focus-helper",
|
|
268
|
+
ref: S
|
|
269
|
+
})
|
|
270
|
+
];
|
|
271
|
+
return e.loading === !0 && e.percentage !== void 0 && i.push(
|
|
272
|
+
s("span", {
|
|
273
|
+
class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
|
|
274
|
+
}, [
|
|
275
|
+
s("span", {
|
|
276
|
+
class: "q-btn__progress-indicator fit block",
|
|
277
|
+
style: W.value
|
|
278
|
+
})
|
|
279
|
+
])
|
|
280
|
+
), i.push(
|
|
281
|
+
s("span", {
|
|
282
|
+
class: "q-btn__content text-center col items-center q-anchor--skip " + T.value
|
|
283
|
+
}, t)
|
|
284
|
+
), e.loading !== null && i.push(
|
|
285
|
+
s(J, {
|
|
286
|
+
name: "q-transition--fade"
|
|
287
|
+
}, () => e.loading === !0 ? [
|
|
288
|
+
s("span", {
|
|
289
|
+
key: "loading",
|
|
290
|
+
class: "absolute-full flex flex-center"
|
|
291
|
+
}, l.loading !== void 0 ? l.loading() : [s(he)])
|
|
292
|
+
] : null)
|
|
293
|
+
), ee(
|
|
294
|
+
s(
|
|
295
|
+
$.value,
|
|
296
|
+
G.value,
|
|
297
|
+
i
|
|
298
|
+
),
|
|
299
|
+
[[
|
|
300
|
+
ye,
|
|
301
|
+
Q.value,
|
|
302
|
+
void 0,
|
|
303
|
+
V.value
|
|
304
|
+
]]
|
|
305
|
+
);
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
}), Oe = /* @__PURE__ */ te({
|
|
309
|
+
__name: "index",
|
|
310
|
+
props: {
|
|
311
|
+
size: { default: b.MD },
|
|
312
|
+
transparent: { type: Boolean },
|
|
313
|
+
flat: { type: Boolean },
|
|
314
|
+
rounded: { type: Boolean },
|
|
315
|
+
color: { default: ke.PRIMARY },
|
|
316
|
+
iconLeft: {},
|
|
317
|
+
iconRight: {},
|
|
318
|
+
iconMiddle: {},
|
|
319
|
+
disabled: { type: Boolean },
|
|
320
|
+
loading: { type: Boolean },
|
|
321
|
+
to: {},
|
|
322
|
+
href: {},
|
|
323
|
+
target: {},
|
|
324
|
+
submit: { type: Boolean },
|
|
325
|
+
ariaLabel: {},
|
|
326
|
+
label: {}
|
|
327
|
+
},
|
|
328
|
+
emits: ["click"],
|
|
329
|
+
setup(e) {
|
|
330
|
+
const l = e, v = o(() => [
|
|
331
|
+
"app-btn",
|
|
332
|
+
{
|
|
333
|
+
"app-btn_default": !l.transparent && !l.flat,
|
|
334
|
+
"app-btn_trans": l.transparent,
|
|
335
|
+
"app-btn_flat": l.flat,
|
|
336
|
+
"app-btn_rounded": l.rounded,
|
|
337
|
+
"app-btn_sm": l.size === b.SM,
|
|
338
|
+
"app-btn_md": l.size === b.MD,
|
|
339
|
+
"app-btn_lg": l.size === b.LG,
|
|
340
|
+
"app-btn_icon-left": l.iconLeft,
|
|
341
|
+
"app-btn_icon-right": l.iconRight,
|
|
342
|
+
"app-btn_icon-middle": l.iconMiddle
|
|
343
|
+
},
|
|
344
|
+
`app-btn_${l.color}`
|
|
345
|
+
]);
|
|
346
|
+
return (a, g) => (R(), ne(x(xe), {
|
|
347
|
+
"no-caps": "",
|
|
348
|
+
unelevated: "",
|
|
349
|
+
class: O(v.value),
|
|
350
|
+
padding: x(qe)[a.size || x(b).MD],
|
|
351
|
+
loading: a.loading,
|
|
352
|
+
disable: a.disabled || void 0,
|
|
353
|
+
to: a.to,
|
|
354
|
+
href: a.href,
|
|
355
|
+
target: a.target,
|
|
356
|
+
type: a.submit ? "submit" : void 0,
|
|
357
|
+
"aria-label": a.ariaLabel,
|
|
358
|
+
onClick: g[0] || (g[0] = (m) => a.$emit("click", m))
|
|
359
|
+
}, {
|
|
360
|
+
default: ae(() => [
|
|
361
|
+
a.iconLeft || a.iconMiddle ? (R(), z("i", {
|
|
362
|
+
key: 0,
|
|
363
|
+
class: O([
|
|
364
|
+
"icon-kl",
|
|
365
|
+
a.iconLeft ? "icon-kl_left" : "icon-kl_middle",
|
|
366
|
+
`icon-kl-${a.iconLeft || a.iconMiddle}`,
|
|
367
|
+
a.transparent || a.flat ? `text-${a.color}` : "text-secondary"
|
|
368
|
+
])
|
|
369
|
+
}, null, 2)) : A("", !0),
|
|
370
|
+
le(a.$slots, "default", {}, void 0, !0),
|
|
371
|
+
a.label ? (R(), z(ue, { key: 1 }, [
|
|
372
|
+
ie(oe(a.label), 1)
|
|
373
|
+
], 64)) : A("", !0),
|
|
374
|
+
a.iconRight ? (R(), z("i", {
|
|
375
|
+
key: 2,
|
|
376
|
+
class: O([
|
|
377
|
+
"icon-kl",
|
|
378
|
+
"icon-kl_right",
|
|
379
|
+
`icon-kl-${a.iconRight}`,
|
|
380
|
+
a.transparent ? `text-${a.color}` : "text-secondary"
|
|
381
|
+
])
|
|
382
|
+
}, null, 2)) : A("", !0)
|
|
383
|
+
]),
|
|
384
|
+
_: 3
|
|
385
|
+
}, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label"]));
|
|
386
|
+
}
|
|
387
|
+
}), je = /* @__PURE__ */ Le(Oe, [["__scopeId", "data-v-59859915"]]);
|
|
388
|
+
export {
|
|
389
|
+
je as default
|
|
390
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),l={name:"AppIcon"},r=o.defineComponent({...l,props:{name:{},size:{},color:{}},setup(s){return(e,c)=>(o.openBlock(),o.createElementBlock("i",{class:o.normalizeClass(["icon-kl",`icon-kl-${e.name}`,e.color?`text-${e.color}`:""]),style:o.normalizeStyle(e.size?`font-size: ${e.size}`:void 0)},null,6))}}),t=n._export_sfc(r,[["__scopeId","data-v-e0d1a85c"]]);exports.default=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),a=require("./use-router-link-DiPB_4Ct.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={[a.SIZES.SM]:"3px 9px",[a.SIZES.MD]:"5px 12px",[a.SIZES.LG]:"9px 20px"},$={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},K=Object.keys($),V={align:{type:String,validator:e=>K.includes(e)}};function Q(e){return t.computed(()=>{const o=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${$[o]}`})}const w={none:0,xs:4,sm:8,md:16,lg:24,xl:32},W={xs:8,sm:10,md:14,lg:20,xl:24},F=["button","submit","reset"],G=/[^\s]\/[^\s]/,H=["flat","outline","push","unelevated"];function U(e,o){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":o}const X={...a.useSizeProps,...a.useRouterLinkNonMatchingProps,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...H.reduce((e,o)=>(e[o]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...V.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},Y={...X,round:Boolean};function J(e){const o=a.useSize(e,W),f=Q(e),{hasRouterLink:u,hasLink:b,linkTag:g,linkAttrs:C,navigateOnClick:P}=a.useRouterLink({fallbackTag:"button"}),M=t.computed(()=>{const i=e.fab===!1&&e.fabMini===!1?o.value:{};return e.padding!==void 0?Object.assign({},i,{padding:e.padding.split(/\s+/).map(v=>v in w?w[v]+"px":v).join(" "),minWidth:"0",minHeight:"0"}):i}),R=t.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),k=t.computed(()=>e.disable!==!0&&e.loading!==!0),E=t.computed(()=>k.value===!0?e.tabindex||0:-1),l=t.computed(()=>U(e,"standard")),q=t.computed(()=>{const i={tabindex:E.value};return b.value===!0?Object.assign(i,C.value):F.includes(e.type)===!0&&(i.type=e.type),g.value==="a"?(e.disable===!0?i["aria-disabled"]="true":i.href===void 0&&(i.role="button"),u.value!==!0&&G.test(e.type)===!0&&(i.type=e.type)):e.disable===!0&&(i.disabled="",i["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(i,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),i}),d=t.computed(()=>{let i;e.color!==void 0?e.flat===!0||e.outline===!0?i=`text-${e.textColor||e.color}`:i=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(i=`text-${e.textColor}`);const v=e.round===!0?"round":`rectangle${R.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${l.value} q-btn--${v}`+(i!==void 0?" "+i:"")+(k.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),p=t.computed(()=>f.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:d,style:M,innerClasses:p,attributes:q,hasLink:b,linkTag:g,navigateOnClick:P,isActionable:k}}const{passiveCapture:s}=a.listenOpts;let m=null,h=null,y=null;const ee=a.createComponent({name:"QBtn",props:{...Y,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:o,emit:f}){const{proxy:u}=t.getCurrentInstance(),{classes:b,style:g,innerClasses:C,attributes:P,hasLink:M,linkTag:R,navigateOnClick:k,isActionable:E}=J(e),l=t.ref(null),q=t.ref(null);let d=null,p,i=null;const v=t.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),x=t.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:M.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),A=t.computed(()=>({center:e.round})),I=t.computed(()=>{const n=Math.max(0,Math.min(100,e.percentage));return n>0?{transition:"transform 0.6s",transform:`translateX(${n-100}%)`}:{}}),z=t.computed(()=>{if(e.loading===!0)return{onMousedown:B,onTouchstart:B,onClick:B,onKeydown:B,onKeyup:B};if(E.value===!0){const n={onClick:T,onKeydown:_,onMousedown:D};if(u.$q.platform.has.touch===!0){const r=e.onTouchstart!==void 0?"":"Passive";n[`onTouchstart${r}`]=j}return n}return{onClick:a.stopAndPrevent}}),O=t.computed(()=>({ref:l,class:"q-btn q-btn-item non-selectable no-outline "+b.value,style:g.value,...P.value,...z.value}));function T(n){if(l.value!==null){if(n!==void 0){if(n.defaultPrevented===!0)return;const r=document.activeElement;if(e.type==="submit"&&r!==document.body&&l.value.contains(r)===!1&&r.contains(l.value)===!1){l.value.focus();const L=()=>{document.removeEventListener("keydown",a.stopAndPrevent,!0),document.removeEventListener("keyup",L,s),l.value!==null&&l.value.removeEventListener("blur",L,s)};document.addEventListener("keydown",a.stopAndPrevent,!0),document.addEventListener("keyup",L,s),l.value.addEventListener("blur",L,s)}}k(n)}}function _(n){l.value!==null&&(f("keydown",n),a.isKeyCode(n,[13,32])===!0&&h!==l.value&&(h!==null&&S(),n.defaultPrevented!==!0&&(l.value.focus(),h=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("keyup",c,!0),l.value.addEventListener("blur",c,s)),a.stopAndPrevent(n)))}function j(n){l.value!==null&&(f("touchstart",n),n.defaultPrevented!==!0&&(m!==l.value&&(m!==null&&S(),m=l.value,d=n.target,d.addEventListener("touchcancel",c,s),d.addEventListener("touchend",c,s)),p=!0,i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,p=!1},200)))}function D(n){l.value!==null&&(n.qSkipRipple=p===!0,f("mousedown",n),n.defaultPrevented!==!0&&y!==l.value&&(y!==null&&S(),y=l.value,l.value.classList.add("q-btn--active"),document.addEventListener("mouseup",c,s)))}function c(n){if(l.value!==null&&!(n!==void 0&&n.type==="blur"&&document.activeElement===l.value)){if(n!==void 0&&n.type==="keyup"){if(h===l.value&&a.isKeyCode(n,[13,32])===!0){const r=new MouseEvent("click",n);r.qKeyEvent=!0,n.defaultPrevented===!0&&a.prevent(r),n.cancelBubble===!0&&a.stop(r),l.value.dispatchEvent(r),a.stopAndPrevent(n),n.qKeyEvent=!0}f("keyup",n)}S()}}function S(n){const r=q.value;n!==!0&&(m===l.value||y===l.value)&&r!==null&&r!==document.activeElement&&(r.setAttribute("tabindex",-1),r.focus()),m===l.value&&(d!==null&&(d.removeEventListener("touchcancel",c,s),d.removeEventListener("touchend",c,s)),m=d=null),y===l.value&&(document.removeEventListener("mouseup",c,s),y=null),h===l.value&&(document.removeEventListener("keyup",c,!0),l.value!==null&&l.value.removeEventListener("blur",c,s),h=null),l.value!==null&&l.value.classList.remove("q-btn--active")}function B(n){a.stopAndPrevent(n),n.qSkipRipple=!0}return t.onBeforeUnmount(()=>{S(!0)}),Object.assign(u,{click:n=>{E.value===!0&&T(n)}}),()=>{let n=[];e.icon!==void 0&&n.push(t.h(a.QIcon,{name:e.icon,left:e.stack!==!0&&v.value===!0,role:"img"})),v.value===!0&&n.push(t.h("span",{class:"block"},[e.label])),n=a.hMergeSlot(o.default,n),e.iconRight!==void 0&&e.round===!1&&n.push(t.h(a.QIcon,{name:e.iconRight,right:e.stack!==!0&&v.value===!0,role:"img"}));const r=[t.h("span",{class:"q-focus-helper",ref:q})];return e.loading===!0&&e.percentage!==void 0&&r.push(t.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[t.h("span",{class:"q-btn__progress-indicator fit block",style:I.value})])),r.push(t.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+C.value},n)),e.loading!==null&&r.push(t.h(t.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[t.h("span",{key:"loading",class:"absolute-full flex flex-center"},o.loading!==void 0?o.loading():[t.h(a.QSpinner)])]:null)),t.withDirectives(t.h(R.value,O.value,r),[[a.Ripple,x.value,void 0,A.value]])}}}),te=t.defineComponent({__name:"index",props:{size:{default:a.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:a.COLORS.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{}},emits:["click"],setup(e){const o=e,f=t.computed(()=>["app-btn",{"app-btn_default":!o.transparent&&!o.flat,"app-btn_trans":o.transparent,"app-btn_flat":o.flat,"app-btn_rounded":o.rounded,"app-btn_sm":o.size===a.SIZES.SM,"app-btn_md":o.size===a.SIZES.MD,"app-btn_lg":o.size===a.SIZES.LG,"app-btn_icon-left":o.iconLeft,"app-btn_icon-right":o.iconRight,"app-btn_icon-middle":o.iconMiddle},`app-btn_${o.color}`]);return(u,b)=>(t.openBlock(),t.createBlock(t.unref(ee),{"no-caps":"",unelevated:"",class:t.normalizeClass(f.value),padding:t.unref(Z)[u.size||t.unref(a.SIZES).MD],loading:u.loading,disable:u.disabled||void 0,to:u.to,href:u.href,target:u.target,type:u.submit?"submit":void 0,"aria-label":u.ariaLabel,onClick:b[0]||(b[0]=g=>u.$emit("click",g))},{default:t.withCtx(()=>[u.iconLeft||u.iconMiddle?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["icon-kl",u.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${u.iconLeft||u.iconMiddle}`,u.transparent||u.flat?`text-${u.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default",{},void 0,!0),u.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(u.label),1)],64)):t.createCommentVNode("",!0),u.iconRight?(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${u.iconRight}`,u.transparent?`text-${u.color}`:"text-secondary"])},null,2)):t.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disable","to","href","target","type","aria-label"]))}}),ne=N._export_sfc(te,[["__scopeId","data-v-59859915"]]);exports.default=ne;
|